diff options
author | Noel Grandin <noel@peralex.com> | 2015-04-16 14:25:53 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-04-22 10:28:39 +0200 |
commit | 8b98bc855d7436828553948a1d28d686848e139c (patch) | |
tree | d66dcf3d316e2694421d90f2694ba8de553811c3 | |
parent | a4d460c5f38e4262a657e4919d093bcc722a7763 (diff) |
convert SFX_STYLESHEET_ constants to scoped enum
Change-Id: Iceba35cb058afa55374cf3cac70ed2207b7bc8b4
-rw-r--r-- | editeng/source/editeng/impedit5.cxx | 6 | ||||
-rw-r--r-- | include/svl/style.hxx | 40 | ||||
-rw-r--r-- | sc/source/ui/condformat/condformatdlgentry.cxx | 4 | ||||
-rw-r--r-- | sc/source/ui/docshell/docsh4.cxx | 4 | ||||
-rw-r--r-- | sd/source/ui/view/drawview.cxx | 2 | ||||
-rw-r--r-- | svl/source/items/style.cxx | 24 | ||||
-rw-r--r-- | svx/source/sdr/properties/attributeproperties.cxx | 10 | ||||
-rw-r--r-- | svx/source/sdr/properties/customshapeproperties.cxx | 4 | ||||
-rw-r--r-- | svx/source/sdr/properties/textproperties.cxx | 2 | ||||
-rw-r--r-- | sw/source/core/doc/docdesc.cxx | 4 | ||||
-rw-r--r-- | sw/source/core/doc/docfmt.cxx | 16 | ||||
-rw-r--r-- | sw/source/core/doc/docnum.cxx | 6 | ||||
-rw-r--r-- | sw/source/core/unocore/unostyle.cxx | 4 | ||||
-rw-r--r-- | sw/source/uibase/app/docst.cxx | 4 | ||||
-rw-r--r-- | sw/source/uibase/app/docstyle.cxx | 14 |
15 files changed, 71 insertions, 73 deletions
diff --git a/editeng/source/editeng/impedit5.cxx b/editeng/source/editeng/impedit5.cxx index 1b019a770d50..2a822cb0322f 100644 --- a/editeng/source/editeng/impedit5.cxx +++ b/editeng/source/editeng/impedit5.cxx @@ -162,13 +162,13 @@ void ImpEditEngine::Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) if ( pStyle ) { if ( ( nId == SFX_HINT_DYING ) || - ( nId == SFX_STYLESHEET_INDESTRUCTION ) || - ( nId == SFX_STYLESHEET_ERASED ) ) + ( nId == SfxStyleSheetHintId::INDESTRUCTION ) || + ( nId == SfxStyleSheetHintId::ERASED ) ) { RemoveStyleFromParagraphs( pStyle ); } else if ( ( nId == SFX_HINT_DATACHANGED ) || - ( nId == SFX_STYLESHEET_MODIFIED ) ) + ( nId == SfxStyleSheetHintId::MODIFIED ) ) { UpdateParagraphsWithStyleSheet( pStyle ); } diff --git a/include/svl/style.hxx b/include/svl/style.hxx index e49dd2af33e1..5798b4936285 100644 --- a/include/svl/style.hxx +++ b/include/svl/style.hxx @@ -49,24 +49,24 @@ must broadcast this using <SfxStyleSheetBasePool::GetBroadcaster()> broadcasts. The class <SfxStyleSheetHint> is used for this, it contains an Action-Id and a pointer to the <SfxStyleSheetBase>. The actions are: -#define SFX_STYLESHEET_CREATED // style is created -#define SFX_STYLESHEET_MODIFIED // style is modified -#define SFX_STYLESHEET_CHANGED // style is replaced -#define SFX_STYLESHEET_ERASED // style is deleted +#define SfxStyleSheetHintId::CREATED // style is created +#define SfxStyleSheetHintId::MODIFIED // style is modified +#define SfxStyleSheetHintId::CHANGED // style is replaced +#define SfxStyleSheetHintId::ERASED // style is deleted The following methods already broadcast themself SfxSimpleHint(SFX_HINT_DYING) from: SfxStyleSheetBasePool::~SfxStyleSheetBasePool() -SfxStyleSheetHint( SFX_STYLESHEET_CREATED, *p ) from: +SfxStyleSheetHint( SfxStyleSheetHintId::CREATED, *p ) from: SfxStyleSheetBasePool::Make( const String& rName, SfxStyleFamily eFam, sal_uInt16 mask) -SfxStyleSheetHint( SFX_STYLESHEET_CHANGED, *pNew ) from: +SfxStyleSheetHint( SfxStyleSheetHintId::CHANGED, *pNew ) from: SfxStyleSheetBasePool::Add( SfxStyleSheetBase& rSheet ) -SfxStyleSheetHint( SFX_STYLESHEET_ERASED, *p ) from: +SfxStyleSheetHint( SfxStyleSheetHintId::ERASED, *p ) from: SfxStyleSheetBasePool::Erase( SfxStyleSheetBase* p ) SfxStyleSheetBasePool::Clear() */ @@ -307,25 +307,23 @@ public: -#define SFX_STYLESHEET_CREATED 1 // new -#define SFX_STYLESHEET_MODIFIED 2 // changed -#define SFX_STYLESHEET_CHANGED 3 // erased and re-created (replaced) -#define SFX_STYLESHEET_ERASED 4 // erased -#define SFX_STYLESHEET_INDESTRUCTION 5 // in the process of being destructed - -#define SFX_STYLESHEETPOOL_CHANGES 1 // Changes which change the state of the pool, but should not be - // broadcasted by STYLESHEET hits. - - +enum SfxStyleSheetHintId +{ + CREATED = 1, // new + MODIFIED = 2, // changed + CHANGED = 3, // erased and re-created (replaced) + ERASED = 4, // erased + INDESTRUCTION = 5, // in the process of being destructed +}; class SVL_DLLPUBLIC SfxStyleSheetPoolHint : public SfxHint { - sal_uInt16 nHint; + SfxStyleSheetHintId nHint; public: - SfxStyleSheetPoolHint(sal_uInt16 nArgHint) : nHint(nArgHint){} - sal_uInt16 GetHint() const - { return nHint; } + SfxStyleSheetPoolHint(SfxStyleSheetHintId nArgHint) : nHint(nArgHint){} + SfxStyleSheetHintId GetHint() const + { return nHint; } }; diff --git a/sc/source/ui/condformat/condformatdlgentry.cxx b/sc/source/ui/condformat/condformatdlgentry.cxx index a7ea722cd0f4..4a8160b3ffe8 100644 --- a/sc/source/ui/condformat/condformatdlgentry.cxx +++ b/sc/source/ui/condformat/condformatdlgentry.cxx @@ -446,7 +446,7 @@ void ScConditionFrmtEntry::Notify(SfxBroadcaster&, const SfxHint& rHint) return; sal_uInt16 nHint = pHint->GetHint(); - if(nHint == SFX_STYLESHEET_MODIFIED) + if(nHint == SfxStyleSheetHintId::MODIFIED) { if(!mbIsInStyleCreate) UpdateStyleList(maLbStyle, mpDoc); @@ -1273,7 +1273,7 @@ void ScDateFrmtEntry::Notify( SfxBroadcaster&, const SfxHint& rHint ) return; sal_uInt16 nHint = pHint->GetHint(); - if(nHint == SFX_STYLESHEET_MODIFIED) + if(nHint == SfxStyleSheetHintId::MODIFIED) { if(!mbIsInStyleCreate) UpdateStyleList(maLbStyle, mpDoc); diff --git a/sc/source/ui/docshell/docsh4.cxx b/sc/source/ui/docshell/docsh4.cxx index 4a9c0d7e8fb8..8e400290014e 100644 --- a/sc/source/ui/docshell/docsh4.cxx +++ b/sc/source/ui/docshell/docsh4.cxx @@ -1283,7 +1283,7 @@ void ScDocShell::NotifyStyle( const SfxStyleSheetHint& rHint ) if ( pStyle->GetFamily() == SFX_STYLE_FAMILY_PAGE ) { - if ( nId == SFX_STYLESHEET_MODIFIED ) + if ( nId == SfxStyleSheetHintId::MODIFIED ) { ScDocShellModificator aModificator( *this ); @@ -1323,7 +1323,7 @@ void ScDocShell::NotifyStyle( const SfxStyleSheetHint& rHint ) } else if ( pStyle->GetFamily() == SFX_STYLE_FAMILY_PARA ) { - if ( nId == SFX_STYLESHEET_MODIFIED) + if ( nId == SfxStyleSheetHintId::MODIFIED) { OUString aNewName = pStyle->GetName(); OUString aOldName = aNewName; diff --git a/sd/source/ui/view/drawview.cxx b/sd/source/ui/view/drawview.cxx index a5ebc69bb11c..55f8872bfb69 100644 --- a/sd/source/ui/view/drawview.cxx +++ b/sd/source/ui/view/drawview.cxx @@ -116,7 +116,7 @@ void DrawView::ModelHasChanged() // force framer to rerender SfxStyleSheetBasePool* pSSPool = mrDoc.GetStyleSheetPool(); - pSSPool->Broadcast(SfxStyleSheetPoolHint(SFX_STYLESHEETPOOL_CHANGES)); + pSSPool->Broadcast(SfxStyleSheetPoolHint(SfxStyleSheetHintId::CREATED)); if( mpDrawViewShell ) mpDrawViewShell->ModelHasChanged(); diff --git a/svl/source/items/style.cxx b/svl/source/items/style.cxx index 9eabf2f473f9..bbbd45ede5e2 100644 --- a/svl/source/items/style.cxx +++ b/svl/source/items/style.cxx @@ -64,7 +64,7 @@ TYPEINIT3(SfxStyleSheet, SfxStyleSheetBase, SfxListener, SfxBroadcaster) SfxStyleSheetHintExtended::SfxStyleSheetHintExtended ( - sal_uInt16 nAction, // SFX_STYLESHEET_... (see above) + sal_uInt16 nAction, // SfxStyleSheetHintId::... (see above) const OUString& rOldName, SfxStyleSheetBase& rStyleSheet // Remains with the caller ) @@ -75,7 +75,7 @@ SfxStyleSheetHintExtended::SfxStyleSheetHintExtended SfxStyleSheetHint::SfxStyleSheetHint ( - sal_uInt16 nAction, // SFX_STYLESHEET_... (see above) + sal_uInt16 nAction, // SfxStyleSheetHintId::... (see above) SfxStyleSheetBase& rStyleSheet // Remains with the caller ) : pStyleSh( &rStyleSheet ), @@ -189,7 +189,7 @@ bool SfxStyleSheetBase::SetName(const OUString& rName, bool bReIndexNow) pPool->Reindex(); pPool->SetSearchMask(eTmpFam, nTmpMask); pPool->Broadcast( SfxStyleSheetHintExtended( - SFX_STYLESHEET_MODIFIED, aOldName, *this ) ); + SfxStyleSheetHintId::MODIFIED, aOldName, *this ) ); } return true; } @@ -237,14 +237,14 @@ bool SfxStyleSheetBase::SetParent( const OUString& rName ) } aParent = rName; } - pPool->Broadcast( SfxStyleSheetHint( SFX_STYLESHEET_MODIFIED, *this ) ); + pPool->Broadcast( SfxStyleSheetHint( SfxStyleSheetHintId::MODIFIED, *this ) ); return true; } void SfxStyleSheetBase::SetHidden( bool hidden ) { bHidden = hidden; - pPool->Broadcast( SfxStyleSheetHint( SFX_STYLESHEET_MODIFIED, *this ) ); + pPool->Broadcast( SfxStyleSheetHint( SfxStyleSheetHintId::MODIFIED, *this ) ); } /** @@ -266,7 +266,7 @@ bool SfxStyleSheetBase::SetFollow( const OUString& rName ) } aFollow = rName; } - pPool->Broadcast( SfxStyleSheetHint( SFX_STYLESHEET_MODIFIED, *this ) ); + pPool->Broadcast( SfxStyleSheetHint( SfxStyleSheetHintId::MODIFIED, *this ) ); return true; } @@ -682,7 +682,7 @@ SfxStyleSheetBase& SfxStyleSheetBasePool::Make( const OUString& rName, SfxStyleF { xStyle = Create( rName, eFam, mask ); StoreStyleSheet(xStyle); - Broadcast( SfxStyleSheetHint( SFX_STYLESHEET_CREATED, *xStyle.get() ) ); + Broadcast( SfxStyleSheetHint( SfxStyleSheetHintId::CREATED, *xStyle.get() ) ); } return *xStyle.get(); } @@ -700,7 +700,7 @@ SfxStyleSheetBase& SfxStyleSheetBasePool::Add( const SfxStyleSheetBase& rSheet ) } rtl::Reference< SfxStyleSheetBase > xNew( Create( rSheet ) ); pImp->mxIndexedStyleSheets->AddStyleSheet(xNew); - Broadcast( SfxStyleSheetHint( SFX_STYLESHEET_CHANGED, *xNew.get() ) ); + Broadcast( SfxStyleSheetHint( SfxStyleSheetHintId::CHANGED, *xNew.get() ) ); return *xNew.get(); } @@ -792,7 +792,7 @@ void SfxStyleSheetBasePool::Remove( SfxStyleSheetBase* p ) // catch( com::sun::star::uno::Exception& ) // { // } - Broadcast( SfxStyleSheetHint( SFX_STYLESHEET_ERASED, *p ) ); + Broadcast( SfxStyleSheetHint( SfxStyleSheetHintId::ERASED, *p ) ); } } } @@ -812,7 +812,7 @@ void SfxStyleSheetBasePool::Insert( SfxStyleSheetBase* p ) } #endif StoreStyleSheet(rtl::Reference< SfxStyleSheetBase >( p ) ); - Broadcast( SfxStyleSheetHint( SFX_STYLESHEET_CREATED, *p ) ); + Broadcast( SfxStyleSheetHint( SfxStyleSheetHintId::CREATED, *p ) ); } namespace @@ -836,7 +836,7 @@ struct StyleSheetDisposerFunctor SAL_FINAL : public svl::StyleSheetDisposer catch( com::sun::star::uno::Exception& ) { } - mPool->Broadcast( SfxStyleSheetHint( SFX_STYLESHEET_ERASED, *styleSheet.get() ) ); + mPool->Broadcast( SfxStyleSheetHint( SfxStyleSheetHintId::ERASED, *styleSheet.get() ) ); } SfxStyleSheetBasePool* mPool; @@ -895,7 +895,7 @@ SfxStyleSheet::SfxStyleSheet(const SfxStyleSheet& rStyle) SfxStyleSheet::~SfxStyleSheet() { - Broadcast( SfxStyleSheetHint( SFX_STYLESHEET_INDESTRUCTION, *this ) ); + Broadcast( SfxStyleSheetHint( SfxStyleSheetHintId::INDESTRUCTION, *this ) ); } diff --git a/svx/source/sdr/properties/attributeproperties.cxx b/svx/source/sdr/properties/attributeproperties.cxx index 51a71598e842..c4609c4fad79 100644 --- a/svx/source/sdr/properties/attributeproperties.cxx +++ b/svx/source/sdr/properties/attributeproperties.cxx @@ -531,19 +531,19 @@ namespace sdr switch(pStyleHint->GetHint()) { - case SFX_STYLESHEET_CREATED : + case SfxStyleSheetHintId::CREATED : { // cannot happen, nothing to do break; } - case SFX_STYLESHEET_MODIFIED : - case SFX_STYLESHEET_CHANGED : + case SfxStyleSheetHintId::MODIFIED : + case SfxStyleSheetHintId::CHANGED : { // notify change break; } - case SFX_STYLESHEET_ERASED : - case SFX_STYLESHEET_INDESTRUCTION : + case SfxStyleSheetHintId::ERASED : + case SfxStyleSheetHintId::INDESTRUCTION : { // Style needs to be exchanged SfxStyleSheet* pNewStSh = 0L; diff --git a/svx/source/sdr/properties/customshapeproperties.cxx b/svx/source/sdr/properties/customshapeproperties.cxx index 2c8b111136ad..3dd95d1ea784 100644 --- a/svx/source/sdr/properties/customshapeproperties.cxx +++ b/svx/source/sdr/properties/customshapeproperties.cxx @@ -219,8 +219,8 @@ namespace sdr { switch( pStyleHint->GetHint() ) { - case SFX_STYLESHEET_MODIFIED : - case SFX_STYLESHEET_CHANGED : + case SfxStyleSheetHintId::MODIFIED : + case SfxStyleSheetHintId::CHANGED : bRemoveRenderGeometry = true; break; }; diff --git a/svx/source/sdr/properties/textproperties.cxx b/svx/source/sdr/properties/textproperties.cxx index a62fb35fcfc7..7bb4e4af908b 100644 --- a/svx/source/sdr/properties/textproperties.cxx +++ b/svx/source/sdr/properties/textproperties.cxx @@ -600,7 +600,7 @@ namespace sdr const SfxStyleSheetHintExtended* pExtendedHint = dynamic_cast<const SfxStyleSheetHintExtended*>(&rHint); if(pExtendedHint - && SFX_STYLESHEET_MODIFIED == pExtendedHint->GetHint()) + && SfxStyleSheetHintId::MODIFIED == pExtendedHint->GetHint()) { OUString aOldName(pExtendedHint->GetOldName()); OUString aNewName(pExtendedHint->GetStyleSheet()->GetName()); diff --git a/sw/source/core/doc/docdesc.cxx b/sw/source/core/doc/docdesc.cxx index 3ef0eaee0940..17f27487831f 100644 --- a/sw/source/core/doc/docdesc.cxx +++ b/sw/source/core/doc/docdesc.cxx @@ -622,7 +622,7 @@ void SwDoc::DelPageDesc( sal_uInt16 i, bool bBroadcast ) if (bBroadcast) BroadcastStyleOperation(rDel.GetName(), SFX_STYLE_FAMILY_PAGE, - SFX_STYLESHEET_ERASED); + SfxStyleSheetHintId::ERASED); if (GetIDocumentUndoRedo().DoesUndo()) { @@ -670,7 +670,7 @@ SwPageDesc* SwDoc::MakePageDesc(const OUString &rName, const SwPageDesc *pCpy, if (bBroadcast) BroadcastStyleOperation(rName, SFX_STYLE_FAMILY_PAGE, - SFX_STYLESHEET_CREATED); + SfxStyleSheetHintId::CREATED); if (GetIDocumentUndoRedo().DoesUndo()) { diff --git a/sw/source/core/doc/docfmt.cxx b/sw/source/core/doc/docfmt.cxx index a253811a3655..08bb0562127e 100644 --- a/sw/source/core/doc/docfmt.cxx +++ b/sw/source/core/doc/docfmt.cxx @@ -673,7 +673,7 @@ void SwDoc::DelCharFmt(sal_uInt16 nFmt, bool bBroadcast) if (bBroadcast) BroadcastStyleOperation(pDel->GetName(), SFX_STYLE_FAMILY_CHAR, - SFX_STYLESHEET_ERASED); + SfxStyleSheetHintId::ERASED); if (GetIDocumentUndoRedo().DoesUndo()) { @@ -714,7 +714,7 @@ void SwDoc::DelFrmFmt( SwFrmFmt *pFmt, bool bBroadcast ) if (bBroadcast) BroadcastStyleOperation(pFmt->GetName(), SFX_STYLE_FAMILY_FRAME, - SFX_STYLESHEET_ERASED); + SfxStyleSheetHintId::ERASED); if (GetIDocumentUndoRedo().DoesUndo()) { @@ -828,7 +828,7 @@ SwFrmFmt *SwDoc::MakeFrmFmt(const OUString &rFmtName, if (bBroadcast) { BroadcastStyleOperation(rFmtName, SFX_STYLE_FAMILY_FRAME, - SFX_STYLESHEET_CREATED); + SfxStyleSheetHintId::CREATED); } return pFmt; @@ -864,7 +864,7 @@ SwCharFmt *SwDoc::MakeCharFmt( const OUString &rFmtName, if (bBroadcast) { BroadcastStyleOperation(rFmtName, SFX_STYLE_FAMILY_CHAR, - SFX_STYLESHEET_CREATED); + SfxStyleSheetHintId::CREATED); } return pFmt; @@ -900,7 +900,7 @@ SwTxtFmtColl* SwDoc::MakeTxtFmtColl( const OUString &rFmtName, if (bBroadcast) BroadcastStyleOperation(rFmtName, SFX_STYLE_FAMILY_PARA, - SFX_STYLESHEET_CREATED); + SfxStyleSheetHintId::CREATED); return pFmtColl; } @@ -934,7 +934,7 @@ SwConditionTxtFmtColl* SwDoc::MakeCondTxtFmtColl( const OUString &rFmtName, if (bBroadcast) BroadcastStyleOperation(rFmtName, SFX_STYLE_FAMILY_PARA, - SFX_STYLESHEET_CREATED); + SfxStyleSheetHintId::CREATED); return pFmtColl; } @@ -963,7 +963,7 @@ void SwDoc::DelTxtFmtColl(sal_uInt16 nFmtColl, bool bBroadcast) if (bBroadcast) BroadcastStyleOperation(pDel->GetName(), SFX_STYLE_FAMILY_PARA, - SFX_STYLESHEET_ERASED); + SfxStyleSheetHintId::ERASED); if (GetIDocumentUndoRedo().DoesUndo()) { @@ -1907,7 +1907,7 @@ void SwDoc::RenameFmt(SwFmt & rFmt, const OUString & sNewName, rFmt.SetName(sNewName); if (bBroadcast) - BroadcastStyleOperation(sNewName, eFamily, SFX_STYLESHEET_MODIFIED); + BroadcastStyleOperation(sNewName, eFamily, SfxStyleSheetHintId::MODIFIED); } void SwDoc::dumpAsXml(xmlTextWriterPtr pWriter) const diff --git a/sw/source/core/doc/docnum.cxx b/sw/source/core/doc/docnum.cxx index 4d3e46df5ed5..aeff01cd1e25 100644 --- a/sw/source/core/doc/docnum.cxx +++ b/sw/source/core/doc/docnum.cxx @@ -1020,7 +1020,7 @@ bool SwDoc::DelNumRule( const OUString& rName, bool bBroadcast ) if (bBroadcast) BroadcastStyleOperation(rName, SFX_STYLE_FAMILY_PSEUDO, - SFX_STYLESHEET_ERASED); + SfxStyleSheetHintId::ERASED); getIDocumentListsAccess().deleteListForListStyle( rName ); getIDocumentListsAccess().deleteListsByDefaultListStyle( rName ); @@ -1091,7 +1091,7 @@ bool SwDoc::RenameNumRule(const OUString & rOldName, const OUString & rNewName, if (bBroadcast) BroadcastStyleOperation(rOldName, SFX_STYLE_FAMILY_PSEUDO, - SFX_STYLESHEET_MODIFIED); + SfxStyleSheetHintId::MODIFIED); } return bResult; @@ -2171,7 +2171,7 @@ sal_uInt16 SwDoc::MakeNumRule( const OUString &rName, if (bBroadcast) BroadcastStyleOperation(pNew->GetName(), SFX_STYLE_FAMILY_PSEUDO, - SFX_STYLESHEET_CREATED); + SfxStyleSheetHintId::CREATED); return nRet; } diff --git a/sw/source/core/unocore/unostyle.cxx b/sw/source/core/unocore/unostyle.cxx index 800ccf49daf2..e9f8a89996c9 100644 --- a/sw/source/core/unocore/unostyle.cxx +++ b/sw/source/core/unocore/unostyle.cxx @@ -3303,12 +3303,12 @@ void SwXStyle::Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) const SfxSimpleHint* pHint = dynamic_cast<const SfxSimpleHint*>(&rHint); if( pHint ) { - if(( pHint->GetId() & SFX_HINT_DYING ) || ( pHint->GetId() & SFX_STYLESHEET_ERASED)) + if(( pHint->GetId() & SFX_HINT_DYING ) || ( pHint->GetId() & SfxStyleSheetHintId::ERASED)) { pBasePool = 0; EndListening(rBC); } - else if( pHint->GetId() &(SFX_STYLESHEET_CHANGED|SFX_STYLESHEET_ERASED) ) + else if( pHint->GetId() &(SfxStyleSheetHintId::CHANGED|SfxStyleSheetHintId::ERASED) ) { static_cast<SfxStyleSheetBasePool&>(rBC).SetSearchMask(eFamily); SfxStyleSheetBase* pOwnBase = static_cast<SfxStyleSheetBasePool&>(rBC).Find(m_sStyleName); diff --git a/sw/source/uibase/app/docst.cxx b/sw/source/uibase/app/docst.cxx index a5f883540500..e110b0d75ed3 100644 --- a/sw/source/uibase/app/docst.cxx +++ b/sw/source/uibase/app/docst.cxx @@ -603,7 +603,7 @@ IMPL_LINK_NOARG(ApplyStyle, ApplyHdl) pView->InvalidateRulerPos(); if( m_bNew ) - m_xBasePool->Broadcast( SfxStyleSheetHint( SFX_STYLESHEET_CREATED, *m_xTmp.get() ) ); + m_xBasePool->Broadcast( SfxStyleSheetHint( SfxStyleSheetHintId::CREATED, *m_xTmp.get() ) ); pDoc->getIDocumentState().SetModified(); if( !m_bModified ) @@ -857,7 +857,7 @@ sal_uInt16 SwDocShell::Edit( m_pView->InvalidateRulerPos(); if( bNew ) - m_xBasePool->Broadcast( SfxStyleSheetHint( SFX_STYLESHEET_CREATED, *xTmp.get() ) ); + m_xBasePool->Broadcast( SfxStyleSheetHint( SfxStyleSheetHintId::CREATED, *xTmp.get() ) ); m_pDoc->getIDocumentState().SetModified(); if( !bModified ) // Bug 57028 diff --git a/sw/source/uibase/app/docstyle.cxx b/sw/source/uibase/app/docstyle.cxx index 75fde3674ffd..1b9c81cb2148 100644 --- a/sw/source/uibase/app/docstyle.cxx +++ b/sw/source/uibase/app/docstyle.cxx @@ -485,7 +485,7 @@ void SwDocStyleSheet::SetGrabBagItem(const uno::Any& rVal) if (bChg) { dynamic_cast<SwDocStyleSheetPool&>(*pPool).InvalidateIterator(); - pPool->Broadcast(SfxStyleSheetHint(SFX_STYLESHEET_MODIFIED, *this)); + pPool->Broadcast(SfxStyleSheetHint(SfxStyleSheetHintId::MODIFIED, *this)); SwEditShell* pSh = rDoc.GetEditShell(); if (pSh) pSh->CallChgLnk(); @@ -582,7 +582,7 @@ void SwDocStyleSheet::SetHidden( bool bValue ) { // calling pPool->First() here would be quite slow... dynamic_cast<SwDocStyleSheetPool&>(*pPool).InvalidateIterator(); // internal list has to be updated - pPool->Broadcast( SfxStyleSheetHint( SFX_STYLESHEET_MODIFIED, *this ) ); + pPool->Broadcast( SfxStyleSheetHint( SfxStyleSheetHintId::MODIFIED, *this ) ); SwEditShell* pSh = rDoc.GetEditShell(); if( pSh ) pSh->CallChgLnk(); @@ -1058,7 +1058,7 @@ bool SwDocStyleSheet::SetName(const OUString& rStr, bool bReindexNow) if( bChg ) { pPool->First(); // internal list has to be updated - pPool->Broadcast( SfxStyleSheetHint( SFX_STYLESHEET_MODIFIED, *this ) ); + pPool->Broadcast( SfxStyleSheetHint( SfxStyleSheetHintId::MODIFIED, *this ) ); SwEditShell* pSh = rDoc.GetEditShell(); if( pSh ) pSh->CallChgLnk(); @@ -1109,7 +1109,7 @@ bool SwDocStyleSheet::SetParent( const OUString& rStr) if( bRet ) { aParent = rStr; - pPool->Broadcast( SfxStyleSheetHint( SFX_STYLESHEET_MODIFIED, + pPool->Broadcast( SfxStyleSheetHint( SfxStyleSheetHintId::MODIFIED, *this ) ); } } @@ -2396,7 +2396,7 @@ void SwDocStyleSheetPool::Remove( SfxStyleSheetBase* pStyle) } if( bBroadcast ) - Broadcast( SfxStyleSheetHint( SFX_STYLESHEET_ERASED, *pStyle ) ); + Broadcast( SfxStyleSheetHint( SfxStyleSheetHintId::ERASED, *pStyle ) ); } bool SwDocStyleSheetPool::SetParent( SfxStyleFamily eFam, @@ -2448,7 +2448,7 @@ bool SwDocStyleSheetPool::SetParent( SfxStyleFamily eFam, else mxStyleSheet->PresetFollow( OUString() ); - Broadcast( SfxStyleSheetHint( SFX_STYLESHEET_MODIFIED, + Broadcast( SfxStyleSheetHint( SfxStyleSheetHintId::MODIFIED, *(mxStyleSheet.get()) ) ); } } @@ -3040,7 +3040,7 @@ void SwStyleSheetIterator::Notify( SfxBroadcaster&, const SfxHint& rHint ) // search and remove from View-List!! const SfxStyleSheetHint* pStyleSheetHint = dynamic_cast<const SfxStyleSheetHint*>(&rHint); if( pStyleSheetHint && - SFX_STYLESHEET_ERASED == pStyleSheetHint->GetHint() ) + SfxStyleSheetHintId::ERASED == pStyleSheetHint->GetHint() ) { SfxStyleSheetBase* pStyle = pStyleSheetHint->GetStyleSheet(); |