tdf#119650 slow saving spreadsheet with comments, part 1
Reducing the number of times the editeng needs to reformat text takes
saving from from 278s to 151s
Change-Id: I32ba0ab65b4dc0f268cc2cda802570673a316ea0
Reviewed-on: https://gerrit.libreoffice.org/71358
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
diff --git a/editeng/source/outliner/outliner.cxx b/editeng/source/outliner/outliner.cxx
index f8ee31a..13d371e 100644
--- a/editeng/source/outliner/outliner.cxx
+++ b/editeng/source/outliner/outliner.cxx
@@ -407,12 +407,15 @@
{
DBG_ASSERT(pPara,"SetText:No Para");
sal_Int32 nPara = pParaList->GetAbsPos( pPara );
if (pEditEngine->GetText( nPara ) == rText)
return; // do nothing
bool bUpdate = pEditEngine->GetUpdateMode();
pEditEngine->SetUpdateMode( false );
ImplBlockInsertionCallbacks( true );
sal_Int32 nPara = pParaList->GetAbsPos( pPara );
if (rText.isEmpty())
{
pEditEngine->SetText( nPara, rText );