Commit ebea5ef 1 parent e52899e commit ebea5ef Copy full SHA for ebea5ef
File tree 4 files changed +4
-4
lines changed
4 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -254,7 +254,7 @@ void ScTabViewShell::GetState( SfxItemSet& rSet )
254
254
SearchOptionFlags nOptions = SearchOptionFlags::ALL;
255
255
256
256
// No replacement if ReadOnly
257
- if (GetViewData ().GetDocShell ()->IsReadOnly ())
257
+ if (GetViewData ().GetDocShell ()->IsReadOnly () || IsCurrentLokViewReadOnly () )
258
258
nOptions &= ~SearchOptionFlags ( SearchOptionFlags::REPLACE | SearchOptionFlags::REPLACE_ALL );
259
259
rSet.Put ( SfxUInt16Item ( nWhich, static_cast <sal_uInt16>(nOptions) ) );
260
260
}
Original file line number Diff line number Diff line change @@ -241,7 +241,7 @@ void DrawDocShell::GetState(SfxItemSet &rSet)
241
241
SearchOptionFlags::SIMILARITY |
242
242
SearchOptionFlags::SELECTION;
243
243
244
- if (!IsReadOnly ())
244
+ if (!IsReadOnly () && ! SfxViewShell::IsCurrentLokViewReadOnly () )
245
245
{
246
246
nOpt |= SearchOptionFlags::REPLACE;
247
247
nOpt |= SearchOptionFlags::REPLACE_ALL;
Original file line number Diff line number Diff line change @@ -4002,7 +4002,7 @@ SfxBoolItem SearchDialog SID_SEARCH_DLG
4002
4002
[
4003
4003
AutoUpdate = TRUE,
4004
4004
FastCall = FALSE,
4005
- ReadOnlyDoc = FALSE ,
4005
+ ReadOnlyDoc = TRUE ,
4006
4006
Toggle = FALSE,
4007
4007
Container = FALSE,
4008
4008
RecordAbsolute = FALSE,
Original file line number Diff line number Diff line change @@ -869,7 +869,7 @@ void SwView::StateSearch(SfxItemSet &rSet)
869
869
case SID_SEARCH_OPTIONS:
870
870
{
871
871
SearchOptionFlags nOpt = SearchOptionFlags::ALL;
872
- if ( GetDocShell ()->IsReadOnly () )
872
+ if ( GetDocShell ()->IsReadOnly () || IsCurrentLokViewReadOnly () )
873
873
nOpt &= ~SearchOptionFlags ( SearchOptionFlags::REPLACE |
874
874
SearchOptionFlags::REPLACE_ALL );
875
875
rSet.Put ( SfxUInt16Item ( SID_SEARCH_OPTIONS, static_cast <sal_uInt16>(nOpt) ));
You can’t perform that action at this time.
0 commit comments