Revert "sw_fieldmarkhide: init fieldmark mode from options"
This reverts commit c0864f26f3143ea81c65d3826fae32a8fd54c531.
Revert "sw_fieldmarkhide: toggle mode depending on View->Field Names"
This reverts commit c74a2fd835474caf311be10703c985e2f916a83b.
Currently no time to fix the remaining bugs, for example
tdf#138771 tdf#139638 tdf#139737
Change-Id: I800c5c8df10c02ac8be6234141e7c58d73915cd9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111758
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
diff --git a/sw/source/core/layout/newfrm.cxx b/sw/source/core/layout/newfrm.cxx
index 4b40f4d6..4d4e76d 100644
--- a/sw/source/core/layout/newfrm.cxx
+++ b/sw/source/core/layout/newfrm.cxx
@@ -414,9 +414,7 @@ SwRootFrame::SwRootFrame( SwFrameFormat *pFormat, SwViewShell * pSh ) :
mbCallbackActionEnabled ( false ),
mbLayoutFreezed ( false ),
mbHideRedlines(pFormat->GetDoc()->GetDocumentRedlineManager().IsHideRedlines()),
m_FieldmarkMode(pSh->GetViewOptions()->IsFieldName()
? sw::FieldmarkMode::ShowCommand
: sw::FieldmarkMode::ShowResult),
m_FieldmarkMode(sw::FieldmarkMode::ShowBoth),
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 2c4ad8f..3940f36 100644
--- a/sw/source/core/view/viewsh.cxx
+++ b/sw/source/core/view/viewsh.cxx
@@ -2226,16 +2226,9 @@ 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() )
{