[Libreoffice-commits] core.git: sd/source

Katarina Behrens Katarina.Behrens at cib.de
Tue Feb 27 09:06:09 UTC 2018


 sd/source/core/drawdoc4.cxx |    9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

New commits:
commit 814e50e6622ea9701094f3ec309a395d175c494f
Author: Katarina Behrens <Katarina.Behrens at cib.de>
Date:   Mon Feb 26 13:21:46 2018 +0100

    Performance is still sluggish, so use non-broadcasting function
    
    avoid O(n^2) due to broadcasting in the initial round of spellcheck.
    Also always delete OPO
    
    Change-Id: I70f2165686dee6a22ab7803e21ed886ff1679d07
    Reviewed-on: https://gerrit.libreoffice.org/50360
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Katarina Behrens <Katarina.Behrens at cib.de>

diff --git a/sd/source/core/drawdoc4.cxx b/sd/source/core/drawdoc4.cxx
index e9540d7bf318..a990a41ef772 100644
--- a/sd/source/core/drawdoc4.cxx
+++ b/sd/source/core/drawdoc4.cxx
@@ -903,15 +903,12 @@ void SdDrawDocument::SpellObject(SdrTextObj* pObj)
                         sd::ModifyGuard aGuard( this );
 
                         // taking text from the outliner
-                        pObj->SetOutlinerParaObject( pOPO );
-                        // SetOPO takes care of broadcasting object change
-
+                        // use non-broadcasting version to avoid O(n^2)
+                        pObj->NbcSetOutlinerParaObject( pOPO );
                         pOPO = nullptr;
                     }
-                    else
-                        delete pOPO;
                 }
-
+                delete pOPO;
             }
         }
 


More information about the Libreoffice-commits mailing list