[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - sw/source

Szymon KÅ‚os (via logerrit) logerrit at kemper.freedesktop.org
Tue Jun 23 08:12:29 UTC 2020


 sw/source/uibase/app/docstyle.cxx |    7 +++++++
 1 file changed, 7 insertions(+)

New commits:
commit 7463f150bf8a31b5febe3f91dc082124d53df504
Author:     Szymon Kłos <szymon.klos at collabora.com>
AuthorDate: Tue Jun 16 11:42:13 2020 +0200
Commit:     Szymon Kłos <szymon.klos at collabora.com>
CommitDate: Tue Jun 23 10:11:58 2020 +0200

    Getting styles info shouldnt set document modification state
    
    Getter function modified document's 'is modified' state
    and broadcasted it due to internal styles creation/delete
    
    That caused spam of SwCursorShell::UpdateCursor calls
    when styles preview widget was used in the notebookbar.
    
    Change-Id: I22ee4e820adf79f6e816cb35161cb21f26abb2b0
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96921
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
    Reviewed-by: Szymon Kłos <szymon.klos at collabora.com>

diff --git a/sw/source/uibase/app/docstyle.cxx b/sw/source/uibase/app/docstyle.cxx
index 4326445cd8ec..def145366ad8 100644
--- a/sw/source/uibase/app/docstyle.cxx
+++ b/sw/source/uibase/app/docstyle.cxx
@@ -1290,7 +1290,14 @@ std::unique_ptr<SfxItemSet> SwDocStyleSheet::GetItemSetForPreview()
         // time, return one "flattened" item set that contains all items from
         // all parents.
         std::unique_ptr<SfxItemSet> pRet;
+
+        bool bModifiedEnabled = rDoc.getIDocumentState().IsEnableSetModified();
+        rDoc.getIDocumentState().SetEnableSetModified(false);
+
         FillStyleSheet(FillPreview, &pRet);
+
+        rDoc.getIDocumentState().SetEnableSetModified(bModifiedEnabled);
+
         assert(pRet);
         return pRet;
     }


More information about the Libreoffice-commits mailing list