[Libreoffice-commits] core.git: editeng/source
Noel Grandin (via logerrit)
logerrit at kemper.freedesktop.org
Fri Apr 26 13:10:04 UTC 2019
editeng/source/outliner/outliner.cxx | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
New commits:
commit f4ea84ff370d33a02a8fb1d6405b9d964491258e
Author: Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Thu Apr 25 16:35:14 2019 +0200
Commit: Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Fri Apr 26 15:08:50 2019 +0200
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 at collabora.co.uk>
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 );
More information about the Libreoffice-commits
mailing list