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

New commits:
commit d67d47bf0e9c9b24fb9aeed8807c31ed28d7fec2
Author:     Matthew Kogan <matt...@epoq.co.uk>
AuthorDate: Fri Oct 13 14:53:24 2023 +0100
Commit:     László Németh <nem...@numbertext.org>
CommitDate: Tue Oct 17 14:50:03 2023 +0200

    tdf#154454 sw: make comparison of changed paragraph numbering optional
    
    by the new config option "DisplayChangedParagraphNumbering", as a
    temporary fix to hide incorrect changes in corner cases.
    
    Regression from commit 2413f213625253a9c2b1787b3b9fe859d724a9bd
    "tdf#115523 sw_redlinenum: show correct, also original numbering".
    
    Change-Id: I6d85033cc3f60ac1075501fedfcd4c9862e00a9e
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157940
    Tested-by: László Németh <nem...@numbertext.org>
    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 028552cca820..75a019c63c73 100644
--- a/officecfg/registry/schema/org/openoffice/Office/Writer.xcs
+++ b/officecfg/registry/schema/org/openoffice/Office/Writer.xcs
@@ -2622,6 +2622,12 @@
           <desc>Specifies whether RSIDs are stored in the document 
model.</desc>
         </info>
       </prop>
+      <prop oor:name="DisplayChangedParagraphNumbering" oor:type="xs:boolean" 
oor:nillable="false">
+        <info>
+          <desc>Specifies whether changed paragraph numbering is 
displayed.</desc>
+        </info>
+        <value>true</value>
+      </prop>
     </group>
     <group oor:name="Insert">
       <info>
diff --git a/sw/source/core/text/txtfld.cxx b/sw/source/core/text/txtfld.cxx
index aa8fef7331c5..464781428010 100644
--- a/sw/source/core/text/txtfld.cxx
+++ b/sw/source/core/text/txtfld.cxx
@@ -58,6 +58,7 @@
 #include <editeng/colritem.hxx>
 #include <editeng/udlnitem.hxx>
 #include <editeng/crossedoutitem.hxx>
+#include <officecfg/Office/Writer.hxx>
 
 static bool lcl_IsInBody( SwFrame const *pFrame )
 {
@@ -721,7 +722,8 @@ SwNumberPortion *SwTextFormatter::NewNumberPortion( 
SwTextFormatInfo &rInf ) con
 
                     if ( !aText.isEmpty() || !aHiddenText.isEmpty() )
                     {
-                        if (aText != aHiddenText && !aHiddenText.isEmpty())
+                        bool bDisplayChangedParagraphNumbering = 
officecfg::Office::Writer::Comparison::DisplayChangedParagraphNumbering::get();
+                        if (bDisplayChangedParagraphNumbering && aText != 
aHiddenText && !aHiddenText.isEmpty())
                         {
                             bHasHiddenNum = true;
                             // show also original number after the actual one 
enclosed in [ and ],

Reply via email to