summaryrefslogtreecommitdiff
path: root/editeng
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-04-25 16:35:14 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-04-26 15:08:50 +0200
commitf4ea84ff370d33a02a8fb1d6405b9d964491258e (patch)
tree5007df20b17511e1abe1c383894f1be6e323c5f5 /editeng
parentae381d9c95c1097922051a6abb0b2e573e3522b3 (diff)
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>
Diffstat (limited to 'editeng')
-rw-r--r--editeng/source/outliner/outliner.cxx7
1 files changed, 5 insertions, 2 deletions
diff --git a/editeng/source/outliner/outliner.cxx b/editeng/source/outliner/outliner.cxx
index f8ee31a3eb7b..13d371eba8b7 100644
--- a/editeng/source/outliner/outliner.cxx
+++ b/editeng/source/outliner/outliner.cxx
@@ -407,12 +407,15 @@ void Outliner::SetText( const OUString& rText, Paragraph* pPara )
{
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 );