sw/source/core/doc/fmtcol.cxx |   12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

New commits:
commit cafb0235fde21065770fd34a36b97c738c4174b0
Author:     Justin Luth <jl...@mail.com>
AuthorDate: Tue Jul 2 19:08:19 2024 -0400
Commit:     Miklos Vajna <vmik...@collabora.com>
CommitDate: Thu Jul 18 10:30:30 2024 +0200

    related tdf#134204 : notify change unless all properties are handled #1
    
    This is an NFC-ish patch.
    
    SetFormatAttr immediately calls a ClientNotify
    about the single property that it has changed.
    So if this was a direct property change,
    or the set included only one property,
    then there is no need to re-notify about this parent change.
    
    The problem with the logic so far has been a failure
    to notify about changes. In this patch, we had the opposite
    problem of notifying unnecessarily, which isn't terrible.
    The main benefit will be seen in a follow-up patch
    which allows a single bContinue assignment per property.
    
    Change-Id: I51d961f03910f0b8f50c6402894c5269f15bf00d
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169897
    Tested-by: Jenkins
    Reviewed-by: Justin Luth <jl...@mail.com>

diff --git a/sw/source/core/doc/fmtcol.cxx b/sw/source/core/doc/fmtcol.cxx
index bf8d8a3aaeea..6f8edb6c10de 100644
--- a/sw/source/core/doc/fmtcol.cxx
+++ b/sw/source/core/doc/fmtcol.cxx
@@ -267,8 +267,8 @@ void SwTextFormatColl::SwClientNotify(const SwModify& 
rModify, const SfxHint& rH
             }
             if( bChg )
             {
-                SetFormatAttr( aNew );
-                bContinue = pOldChgSet; // #3, #4
+                SetFormatAttr(aNew); // triggered separate notification about 
only this one property
+                bContinue = pOldChgSet && pOldChgSet->GetChgSet()->Count() > 
1; // #3, #4
             }
             // We set it to absolute -> do not propagate it further
             else if( pNewChgSet )
@@ -294,7 +294,7 @@ void SwTextFormatColl::SwClientNotify(const SwModify& 
rModify, const SfxHint& rH
             if( bChg )
             {
                 SetFormatAttr( aNew );
-                bContinue = pOldChgSet;
+                bContinue = pOldChgSet && pOldChgSet->GetChgSet()->Count() > 1;
             }
             // We set it to absolute -> do not propagate it further
             else if( pNewChgSet )
@@ -318,7 +318,7 @@ void SwTextFormatColl::SwClientNotify(const SwModify& 
rModify, const SfxHint& rH
             if( bChg )
             {
                 SetFormatAttr( aNew );
-                bContinue = pOldChgSet;
+                bContinue = pOldChgSet && pOldChgSet->GetChgSet()->Count() > 1;
             }
             // We set it to absolute -> do not propagate it further
             else if( pNewChgSet )
@@ -348,7 +348,7 @@ void SwTextFormatColl::SwClientNotify(const SwModify& 
rModify, const SfxHint& rH
         if( bChg )
         {
             SetFormatAttr( aNew );
-            bContinue = pOldChgSet;
+            bContinue = pOldChgSet && pOldChgSet->GetChgSet()->Count() > 1;
         }
         // We set it to absolute -> do not propagate it further
         else if( pNewChgSet )
@@ -380,7 +380,7 @@ void SwTextFormatColl::SwClientNotify(const SwModify& 
rModify, const SfxHint& rH
                 if (nOld != aNew.GetHeight())
                 {
                     SetFormatAttr( aNew );
-                    bContinue = pOldChgSet;
+                    bContinue = pOldChgSet && pOldChgSet->GetChgSet()->Count() 
> 1;
                 }
                 // We set it to absolute -> do not propagate it further
                 else if( pNewChgSet )

Reply via email to