[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - sw/source

Michael Stahl (via logerrit) logerrit at kemper.freedesktop.org
Tue Mar 2 12:09:18 UTC 2021


 sw/source/core/layout/newfrm.cxx |    4 +---
 sw/source/core/view/viewsh.cxx   |    9 +--------
 2 files changed, 2 insertions(+), 11 deletions(-)

New commits:
commit 9bc548e1c7da69c3f886b5925df3df4f78cd6239
Author:     Michael Stahl <michael.stahl at allotropia.de>
AuthorDate: Mon Mar 1 12:47:53 2021 +0100
Commit:     Xisco Fauli <xiscofauli at libreoffice.org>
CommitDate: Tue Mar 2 13:08:43 2021 +0100

    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 at allotropia.de>
    (cherry picked from commit 70dd95aabd11b2146e2556c1da87da4a22d6f7b5)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111779
    Reviewed-by: Xisco Fauli <xiscofauli at libreoffice.org>

diff --git a/sw/source/core/layout/newfrm.cxx b/sw/source/core/layout/newfrm.cxx
index 0431299cdd72..cd527d13903c 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 acf81134ba6b..f99dd73c7b5e 100644
--- a/sw/source/core/view/viewsh.cxx
+++ b/sw/source/core/view/viewsh.cxx
@@ -2214,16 +2214,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() )
     {


More information about the Libreoffice-commits mailing list