From 814e50e6622ea9701094f3ec309a395d175c494f Mon Sep 17 00:00:00 2001 From: Katarina Behrens Date: Mon, 26 Feb 2018 13:21:46 +0100 Subject: 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 Reviewed-by: Katarina Behrens --- sd/source/core/drawdoc4.cxx | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) 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; } } -- cgit