diff options
author | Michael Stahl <michael.stahl@allotropia.de> | 2021-11-19 16:08:57 +0100 |
---|---|---|
committer | Michael Stahl <michael.stahl@allotropia.de> | 2021-12-23 09:11:59 +0100 |
commit | 657de5fba12b0e9afcdee361654d2a2d0dbd7311 (patch) | |
tree | 5826d4081b90c4e55e262d203b0dffff3bbbc51d /sw/source | |
parent | d11fb6cecaf72787973990e09cc7e8d03bdbf9d7 (diff) |
Revert "Revert "sw_fieldmarkhide: init fieldmark mode from options""
This reverts commit 70dd95aabd11b2146e2556c1da87da4a22d6f7b5.
Looks like we might get some time to fix bugs.
Change-Id: I7038c5e854676e2540011dd2a8dcfb8870788502
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125558
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
Diffstat (limited to 'sw/source')
-rw-r--r-- | sw/source/core/layout/newfrm.cxx | 4 | ||||
-rw-r--r-- | sw/source/core/view/viewsh.cxx | 9 |
2 files changed, 11 insertions, 2 deletions
diff --git a/sw/source/core/layout/newfrm.cxx b/sw/source/core/layout/newfrm.cxx index b433436c571c..c09c55779f46 100644 --- a/sw/source/core/layout/newfrm.cxx +++ b/sw/source/core/layout/newfrm.cxx @@ -415,7 +415,9 @@ SwRootFrame::SwRootFrame( SwFrameFormat *pFormat, SwViewShell * pSh ) : mbCallbackActionEnabled ( false ), mbLayoutFreezed ( false ), mbHideRedlines(pFormat->GetDoc()->GetDocumentRedlineManager().IsHideRedlines()), - m_FieldmarkMode(sw::FieldmarkMode::ShowBoth), + m_FieldmarkMode(pSh->GetViewOptions()->IsFieldName() + ? sw::FieldmarkMode::ShowCommand + : sw::FieldmarkMode::ShowResult), mnBrowseWidth(MIN_BROWSE_WIDTH), mpTurbo( nullptr ), mpLastPage( nullptr ), diff --git a/sw/source/core/view/viewsh.cxx b/sw/source/core/view/viewsh.cxx index 6de1382143b7..1c5981c08a56 100644 --- a/sw/source/core/view/viewsh.cxx +++ b/sw/source/core/view/viewsh.cxx @@ -2326,9 +2326,16 @@ void SwViewShell::ImplApplyViewOptions( const SwViewOption &rOpt ) // - fieldnames apply or not ... // ( - SwEndPortion must _no_ longer be generated. ) // - Of course, the screen is something completely different than the printer ... - bReformat = bReformat || mpOpt->IsFieldName() != rOpt.IsFieldName(); bool const isToggleFieldNames(mpOpt->IsFieldName() != rOpt.IsFieldName()); + if (mpOpt->IsFieldName() != rOpt.IsFieldName()) + { + GetLayout()->SetFieldmarkMode( rOpt.IsFieldName() + ? sw::FieldmarkMode::ShowCommand + : sw::FieldmarkMode::ShowResult ); + bReformat = true; + } + // The map mode is changed, minima/maxima will be attended by UI if( mpOpt->GetZoom() != rOpt.GetZoom() && !IsPreview() ) { |