[Libreoffice-commits] core.git: Branch 'feature/fixes22' - sw/source

Miklos Vajna vmiklos at collabora.co.uk
Tue May 31 09:08:59 UTC 2016


 sw/source/core/doc/DocumentStateManager.cxx |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 5e8bc55b676116d55c3458cd799bdf4e3aebab44
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Tue May 31 10:11:56 2016 +0200

    sw::DocumentStateManager::SetModified: don't call the OLE link unconditionally
    
    This shows up in a performance profile and also inconsistent with
    ResetModified() which also calls the OLE link only in case the document was
    marked as modified previously.
    
    Change-Id: Ica6a4711ece40d133b97ef8728be74c06271f2c7

diff --git a/sw/source/core/doc/DocumentStateManager.cxx b/sw/source/core/doc/DocumentStateManager.cxx
index ec6286a..575a010 100644
--- a/sw/source/core/doc/DocumentStateManager.cxx
+++ b/sw/source/core/doc/DocumentStateManager.cxx
@@ -40,9 +40,10 @@ DocumentStateManager::DocumentStateManager( SwDoc& i_rSwdoc ) :
 void DocumentStateManager::SetModified()
 {
     m_rDoc.GetDocumentLayoutManager().ClearSwLayouterEntries();
+    bool bOldModified = mbModified;
     mbModified = true;
     m_rDoc.GetDocumentStatisticsManager().GetDocStat().bModified = true;
-    if( m_rDoc.GetOle2Link().IsSet() )
+    if( !bOldModified && m_rDoc.GetOle2Link().IsSet() )
     {
         mbInCallModified = true;
         m_rDoc.GetOle2Link().Call( true );


More information about the Libreoffice-commits mailing list