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

New commits:
commit 5e8bc55b676116d55c3458cd799bdf4e3aebab44
Author: Miklos Vajna <vmik...@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 );
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to