diff options
author | Szymon Kłos <szymon.klos@collabora.com> | 2020-06-16 11:42:13 +0200 |
---|---|---|
committer | Szymon Kłos <szymon.klos@collabora.com> | 2020-06-23 10:11:58 +0200 |
commit | 7463f150bf8a31b5febe3f91dc082124d53df504 (patch) | |
tree | 16dcd08ed9e602d9c7d60570b80c1c81766454c5 /sw | |
parent | 0ab5bfd495cf7ea1cab99321ff031ae390247825 (diff) |
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@gmail.com>
Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/uibase/app/docstyle.cxx | 7 |
1 files changed, 7 insertions, 0 deletions
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; } |