editeng/source/outliner/outliner.cxx |    7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

New commits:
commit f4ea84ff370d33a02a8fb1d6405b9d964491258e
Author:     Noel Grandin <noel.gran...@collabora.co.uk>
AuthorDate: Thu Apr 25 16:35:14 2019 +0200
Commit:     Noel Grandin <noel.gran...@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.gran...@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 );
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to