officecfg/registry/schema/org/openoffice/Office/Writer.xcs |    6 ++++++
 sw/source/core/text/redlnitr.cxx                           |    4 +++-
 sw/source/core/text/txtfld.cxx                             |    3 ++-
 3 files changed, 11 insertions(+), 2 deletions(-)

New commits:
commit 2b68729253437600db43f5c24838677b963a8c2f
Author:     Matthew Kogan <matt...@epoq.co.uk>
AuthorDate: Tue Sep 10 10:22:36 2024 +0100
Commit:     László Németh <nem...@numbertext.org>
CommitDate: Thu Sep 26 10:03:33 2024 +0200

    tdf#162566 sw: Make it optional for moved text to be displayed as green
    
    by the new config option "DisplayMovedTextInGreen", as a temporary fix
    to hide incorrect changes in corner cases.
    
    Change-Id: Ie629ca22a2411db4ddbfc9f6b96fe6fe69681213
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173127
    Tested-by: László Németh <nem...@numbertext.org>
    Tested-by: Jenkins
    Reviewed-by: László Németh <nem...@numbertext.org>

diff --git a/officecfg/registry/schema/org/openoffice/Office/Writer.xcs 
b/officecfg/registry/schema/org/openoffice/Office/Writer.xcs
index b2d7d503b35b..b21efe63c7f1 100644
--- a/officecfg/registry/schema/org/openoffice/Office/Writer.xcs
+++ b/officecfg/registry/schema/org/openoffice/Office/Writer.xcs
@@ -2436,6 +2436,12 @@
         </info>
         <value>true</value>
       </prop>
+      <prop oor:name="DisplayMovedTextInGreen" oor:type="xs:boolean" 
oor:nillable="false">
+        <info>
+          <desc>Specifies whether moved text is displayed in green.</desc>
+        </info>
+        <value>true</value>
+      </prop>
     </group>
     <group oor:name="Insert">
       <info>
diff --git a/sw/source/core/text/redlnitr.cxx b/sw/source/core/text/redlnitr.cxx
index 3483b2bb8d09..9b4175d9697e 100644
--- a/sw/source/core/text/redlnitr.cxx
+++ b/sw/source/core/text/redlnitr.cxx
@@ -53,6 +53,7 @@
 #include <editeng/crossedoutitem.hxx>
 #include <editeng/formatbreakitem.hxx>
 #include <editeng/udlnitem.hxx>
+#include <officecfg/Office/Writer.hxx>
 
 using namespace ::com::sun::star;
 
@@ -799,7 +800,8 @@ short SwRedlineItr::Seek(SwFont& rFnt,
                     SfxWhichIter aIter( *m_pSet );
 
                     // moved text: dark green with double underline or 
strikethrough
-                    if ( pRed->IsMoved() )
+                    bool bDisplayMovedTextInGreen = 
officecfg::Office::Writer::Comparison::DisplayMovedTextInGreen::get();
+                    if ( bDisplayMovedTextInGreen && pRed->IsMoved() )
                     {
                         m_pSet->Put(SvxColorItem( COL_GREEN, RES_CHRATR_COLOR 
));
                         if (SfxItemState::SET == 
m_pSet->GetItemState(RES_CHRATR_CROSSEDOUT, true))
diff --git a/sw/source/core/text/txtfld.cxx b/sw/source/core/text/txtfld.cxx
index 59869bb4abd9..3020a2118722 100644
--- a/sw/source/core/text/txtfld.cxx
+++ b/sw/source/core/text/txtfld.cxx
@@ -466,7 +466,8 @@ static bool lcl_setRedlineAttr( SwTextFormatInfo &rInf, 
const SwTextNode& rTextN
         return false;
 
     // moved text: dark green with double underline or strikethrough
-    if ( bIsMoved )
+    bool bDisplayMovedTextInGreen = 
officecfg::Office::Writer::Comparison::DisplayMovedTextInGreen::get();
+    if ( bDisplayMovedTextInGreen && bIsMoved )
     {
         pNumFnt->SetColor(COL_GREEN);
         if ( RedlineType::Delete == pRedlineNum->GetType() )

Reply via email to