Kaydet (Commit) 0d6ec494 authored tarafından Jim Raykowski's avatar Jim Raykowski Kaydeden (comit) Katarina Behrens

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: 's avatarXisco Faulí <xiscofauli@libreoffice.org>
Reviewed-by: 's avatarKatarina Behrens <Katarina.Behrens@cib.de>
üst ada2b5be
......@@ -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)
{
......
......@@ -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 )
......
......@@ -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); }
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment