summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Raykowski <raykowj@gmail.com>2019-05-23 01:06:47 -0800
committerKatarina Behrens <Katarina.Behrens@cib.de>2019-06-05 10:34:56 +0200
commit0d6ec494f83fb26524bf3a5fc7af27c225293e87 (patch)
treeb26f7cd16eea1aae6859638ea4aa79e316b54a7a
parentada2b5be85f8c4d16c627a990e3f362ae0663d9f (diff)
tdf#124152 Broadcast StyleSheetModified to update style tree list box
...and also make undo redo update Change-Id: I49d62d487bed27d9dbe2ab813d992d02ecaeb77a Reviewed-on: https://gerrit.libreoffice.org/72826 Tested-by: Jenkins Tested-by: Xisco Faulí <xiscofauli@libreoffice.org> Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>
-rw-r--r--sfx2/source/dialog/templdlg.cxx3
-rw-r--r--sw/source/uibase/app/docst.cxx2
-rw-r--r--sw/source/uibase/shells/basesh.cxx4
3 files changed, 8 insertions, 1 deletions
diff --git a/sfx2/source/dialog/templdlg.cxx b/sfx2/source/dialog/templdlg.cxx
index e47900441476..98db80802603 100644
--- a/sfx2/source/dialog/templdlg.cxx
+++ b/sfx2/source/dialog/templdlg.cxx
@@ -1489,7 +1489,8 @@ void SfxCommonTemplateDialog_Impl::Notify(SfxBroadcaster& /*rBC*/, const SfxHint
if(!bDontUpdate && nId != SfxHintId::Dying &&
(dynamic_cast<const SfxStyleSheetPoolHint*>(&rHint) ||
dynamic_cast<const SfxStyleSheetHint*>(&rHint) ||
- dynamic_cast<const SfxStyleSheetModifiedHint*>(&rHint)))
+ dynamic_cast<const SfxStyleSheetModifiedHint*>(&rHint) ||
+ nId == SfxHintId::StyleSheetModified))
{
if(!pIdle)
{
diff --git a/sw/source/uibase/app/docst.cxx b/sw/source/uibase/app/docst.cxx
index 4336e37d10cf..292095ae2544 100644
--- a/sw/source/uibase/app/docst.cxx
+++ b/sw/source/uibase/app/docst.cxx
@@ -633,6 +633,8 @@ IMPL_LINK_NOARG(ApplyStyle, ApplyHdl, LinkParamNone*, void)
if( m_bNew )
m_xBasePool->Broadcast(SfxStyleSheetHint(SfxHintId::StyleSheetCreated, *m_xTmp));
+ else
+ m_xBasePool->Broadcast(SfxStyleSheetHint(SfxHintId::StyleSheetModified, *m_xTmp));
pDoc->getIDocumentState().SetModified();
if( !m_bModified )
diff --git a/sw/source/uibase/shells/basesh.cxx b/sw/source/uibase/shells/basesh.cxx
index 6f33b6142174..0c76cd643f9a 100644
--- a/sw/source/uibase/shells/basesh.cxx
+++ b/sw/source/uibase/shells/basesh.cxx
@@ -539,6 +539,10 @@ void SwBaseShell::ExecUndo(SfxRequest &rReq)
{
rReq.SetReturnValue( SfxUInt32Item(nId, static_cast<sal_uInt32>(SID_REPAIRPACKAGE)) );
}
+ else if (nUndoId == SwUndoId::INSFMTATTR)
+ {
+ rWrtShell.GetDoc()->GetDocShell()->GetStyleSheetPool()->Broadcast(SfxHint(SfxHintId::StyleSheetModified));
+ }
if (pViewFrame) { pViewFrame->GetBindings().InvalidateAll(false); }
}