[Libreoffice-commits] core.git: sfx2/source sw/source

Jim Raykowski (via logerrit) logerrit at kemper.freedesktop.org
Wed Jun 5 08:35:52 UTC 2019


 sfx2/source/dialog/templdlg.cxx    |    3 ++-
 sw/source/uibase/app/docst.cxx     |    2 ++
 sw/source/uibase/shells/basesh.cxx |    4 ++++
 3 files changed, 8 insertions(+), 1 deletion(-)

New commits:
commit 0d6ec494f83fb26524bf3a5fc7af27c225293e87
Author:     Jim Raykowski <raykowj at gmail.com>
AuthorDate: Thu May 23 01:06:47 2019 -0800
Commit:     Katarina Behrens <Katarina.Behrens at cib.de>
CommitDate: Wed Jun 5 10:34:56 2019 +0200

    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 at libreoffice.org>
    Reviewed-by: Katarina Behrens <Katarina.Behrens at cib.de>

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); }
 }


More information about the Libreoffice-commits mailing list