diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2016-11-24 11:26:19 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2016-11-24 11:27:51 +0200 |
commit | 04a84913ead2f82510d91eea2bb8526274feeeae (patch) | |
tree | a123ff892b74a778c6ae61de2e5caa2ee916416f | |
parent | a250292c5eb7e4cdb2aa83bc08ae6c86c3ca65a1 (diff) |
use o3tl::typed_flags in ConfigurationListener::ConfigurationChanged
Change-Id: I0ad7c02953aa53168dc242f1f374ab871728c84e
43 files changed, 101 insertions, 93 deletions
diff --git a/basctl/source/basicide/baside2.cxx b/basctl/source/basicide/baside2.cxx index dbfe9ca19987..675a0ea57f4a 100644 --- a/basctl/source/basicide/baside2.cxx +++ b/basctl/source/basicide/baside2.cxx @@ -1507,7 +1507,7 @@ ModulWindowLayout::SyntaxColors::~SyntaxColors () } // virtual -void ModulWindowLayout::SyntaxColors::ConfigurationChanged (utl::ConfigurationBroadcaster*, sal_uInt32) +void ModulWindowLayout::SyntaxColors::ConfigurationChanged (utl::ConfigurationBroadcaster*, ConfigurationHints) { NewConfig(false); } diff --git a/basctl/source/basicide/baside2.hxx b/basctl/source/basicide/baside2.hxx index 3463fbb73a6f..465be0b7f491 100644 --- a/basctl/source/basicide/baside2.hxx +++ b/basctl/source/basicide/baside2.hxx @@ -457,7 +457,7 @@ private: Color GetColor (TokenType eType) const { return aColors[eType]; } private: - virtual void ConfigurationChanged (utl::ConfigurationBroadcaster*, sal_uInt32) override; + virtual void ConfigurationChanged (utl::ConfigurationBroadcaster*, ConfigurationHints) override; void NewConfig (bool bFirst); private: diff --git a/dbaccess/source/ui/control/sqledit.cxx b/dbaccess/source/ui/control/sqledit.cxx index 1e2237d66203..810a78a3bb01 100644 --- a/dbaccess/source/ui/control/sqledit.cxx +++ b/dbaccess/source/ui/control/sqledit.cxx @@ -218,7 +218,7 @@ void OSqlEdit::startTimer() m_timerInvalidate.Start(); } -void OSqlEdit::ConfigurationChanged( utl::ConfigurationBroadcaster* pOption, sal_uInt32 ) +void OSqlEdit::ConfigurationChanged( utl::ConfigurationBroadcaster* pOption, ConfigurationHints ) { assert( pOption == &m_ColorConfig ); (void) pOption; // avoid warnings diff --git a/dbaccess/source/ui/inc/sqledit.hxx b/dbaccess/source/ui/inc/sqledit.hxx index 4150b22da09c..038fa361f168 100644 --- a/dbaccess/source/ui/inc/sqledit.hxx +++ b/dbaccess/source/ui/inc/sqledit.hxx @@ -81,7 +81,7 @@ namespace dbaui void stopTimer(); void startTimer(); - virtual void ConfigurationChanged( utl::ConfigurationBroadcaster*, sal_uInt32 ) override; + virtual void ConfigurationChanged( utl::ConfigurationBroadcaster*, ConfigurationHints ) override; using MultiLineEditSyntaxHighlight::Notify; }; } diff --git a/include/svl/hint.hxx b/include/svl/hint.hxx index 8de965d73af5..a31cea4e6a47 100644 --- a/include/svl/hint.hxx +++ b/include/svl/hint.hxx @@ -35,7 +35,6 @@ // unused, formerly SFX_HINT_SAVECOMPLETED // unused, formerly SFX_HINT_RELEASEREF #define SFX_HINT_COLORS_CHANGED 0x00001000 -#define SFX_HINT_CTL_SETTINGS_CHANGED 0x00002000 #define SFX_HINT_ACCESSIBILITY_CHANGED 0x00004000 // unused, formerly SFX_HINT_VIEWCREATED #define SFX_HINT_USER00 0x00010000 diff --git a/include/svx/svdpntv.hxx b/include/svx/svdpntv.hxx index 6188c7b1e474..dcf686230561 100644 --- a/include/svx/svdpntv.hxx +++ b/include/svx/svdpntv.hxx @@ -210,7 +210,7 @@ protected: // Interface to SdrPaintWindow void RemovePaintWindow(SdrPaintWindow& rOld); - void ConfigurationChanged( ::utl::ConfigurationBroadcaster*, sal_uInt32 ) override; + void ConfigurationChanged( ::utl::ConfigurationBroadcaster*, ConfigurationHints ) override; public: sal_uInt32 PaintWindowCount() const { return maPaintWindows.size(); } diff --git a/include/svx/svdview.hxx b/include/svx/svdview.hxx index 4c2152832487..a1611574bf04 100644 --- a/include/svx/svdview.hxx +++ b/include/svx/svdview.hxx @@ -200,7 +200,7 @@ public: virtual bool MouseMove(const MouseEvent& rMEvt, vcl::Window* pWin) override; virtual bool Command(const CommandEvent& rCEvt, vcl::Window* pWin) override; - virtual void ConfigurationChanged( utl::ConfigurationBroadcaster*, sal_uInt32 ) override; + virtual void ConfigurationChanged( utl::ConfigurationBroadcaster*, ConfigurationHints ) override; bool SetAttributes(const SfxItemSet& rSet, bool bReplaceAll=false) { return SdrCreateView::SetAttributes(rSet,bReplaceAll); } bool SetStyleSheet(SfxStyleSheet* pStyleSheet, bool bDontRemoveHardAttr) { return SdrCreateView::SetStyleSheet(pStyleSheet,bDontRemoveHardAttr); } diff --git a/include/unotools/options.hxx b/include/unotools/options.hxx index 5b11373d2f3d..552eb5106a61 100644 --- a/include/unotools/options.hxx +++ b/include/unotools/options.hxx @@ -22,8 +22,24 @@ #include <sal/config.h> #include <unotools/unotoolsdllapi.h> +#include <o3tl/typed_flags_set.hxx> #include <vector> +// bits for broadcasting hints of changes in ConfigurationListener::ConfigurationChanged, may be combined +enum class ConfigurationHints { + NONE = 0x0000, + Locale = 0x0001, + Currency = 0x0002, + UiLocale = 0x0004, + DecSep = 0x0008, + DatePatterns = 0x0010, + IgnoreLang = 0x0020, + CtlSettingsChanged = 0x2000, +}; +namespace o3tl { + template<> struct typed_flags<ConfigurationHints> : is_typed_flags<ConfigurationHints, 0x203f> {}; +} + /* The class utl::detail::Options provides a kind of multiplexer. It implements a ConfigurationListener that is usually registered at a ConfigItem class. At the same time it implements a ConfigurationBroadcaster @@ -43,7 +59,7 @@ namespace utl { public: virtual ~ConfigurationListener(); - virtual void ConfigurationChanged( ConfigurationBroadcaster* p, sal_uInt32 nHint ) = 0; + virtual void ConfigurationChanged( ConfigurationBroadcaster* p, ConfigurationHints nHint ) = 0; }; typedef ::std::vector< ConfigurationListener* > IMPL_ConfigurationListenerList; @@ -52,14 +68,14 @@ namespace utl { { IMPL_ConfigurationListenerList* mpList; sal_Int32 m_nBroadcastBlocked; // broadcast only if this is 0 - sal_uInt32 m_nBlockedHint; + ConfigurationHints m_nBlockedHint; public: void AddListener( utl::ConfigurationListener* pListener ); void RemoveListener( utl::ConfigurationListener* pListener ); // notify listeners; nHint is an implementation detail of the particular class deriving from ConfigurationBroadcaster - void NotifyListeners( sal_uInt32 nHint ); + void NotifyListeners( ConfigurationHints nHint ); ConfigurationBroadcaster(); virtual ~ConfigurationBroadcaster(); virtual void BlockBroadcasts( bool bBlock ); @@ -85,7 +101,7 @@ private: void operator =(Options &) = delete; protected: - virtual void ConfigurationChanged( ::utl::ConfigurationBroadcaster* p, sal_uInt32 nHint ) override; + virtual void ConfigurationChanged( ::utl::ConfigurationBroadcaster* p, ConfigurationHints nHint ) override; }; } } diff --git a/include/unotools/syslocaleoptions.hxx b/include/unotools/syslocaleoptions.hxx index f5cb835b2617..d37fab8a3f9d 100644 --- a/include/unotools/syslocaleoptions.hxx +++ b/include/unotools/syslocaleoptions.hxx @@ -29,14 +29,6 @@ #include <i18nlangtag/languagetag.hxx> #include <unotools/options.hxx> -// bits for broadcasting hints of changes in a SfxSimpleHint, may be combined -const sal_uInt32 SYSLOCALEOPTIONS_HINT_LOCALE = 0x00000001; -const sal_uInt32 SYSLOCALEOPTIONS_HINT_CURRENCY = 0x00000002; -const sal_uInt32 SYSLOCALEOPTIONS_HINT_UILOCALE = 0x00000004; -const sal_uInt32 SYSLOCALEOPTIONS_HINT_DECSEP = 0x00000008; -const sal_uInt32 SYSLOCALEOPTIONS_HINT_DATEPATTERNS = 0x00000010; -const sal_uInt32 SYSLOCALEOPTIONS_HINT_IGNORELANG = 0x00000020; - class SvtSysLocaleOptions_Impl; class SvtListener; namespace osl { class Mutex; } @@ -46,7 +38,7 @@ class SAL_WARN_UNUSED UNOTOOLS_DLLPUBLIC SvtSysLocaleOptions : public utl::detai std::shared_ptr<SvtSysLocaleOptions_Impl> pImpl; UNOTOOLS_DLLPRIVATE static ::osl::Mutex& GetMutex(); - virtual void ConfigurationChanged( utl::ConfigurationBroadcaster* p, sal_uInt32 nHint ) override; + virtual void ConfigurationChanged( utl::ConfigurationBroadcaster* p, ConfigurationHints nHint ) override; public: diff --git a/include/vcl/settings.hxx b/include/vcl/settings.hxx index e8b7c0a6f28a..343559d7e080 100644 --- a/include/vcl/settings.hxx +++ b/include/vcl/settings.hxx @@ -45,6 +45,7 @@ struct ImplMiscData; struct ImplHelpData; struct ImplStyleData; struct ImplAllSettingsData; +enum class ConfigurationHints; namespace vcl { class I18nHelper; @@ -701,7 +702,7 @@ public: bool operator ==( const AllSettings& rSet ) const; bool operator !=( const AllSettings& rSet ) const; - static void LocaleSettingsChanged( sal_uInt32 nHint ); + static void LocaleSettingsChanged( ConfigurationHints nHint ); SvtSysLocale& GetSysLocale(); }; diff --git a/reportdesign/source/ui/inc/ViewsWindow.hxx b/reportdesign/source/ui/inc/ViewsWindow.hxx index 1951426d967b..519a1494d938 100644 --- a/reportdesign/source/ui/inc/ViewsWindow.hxx +++ b/reportdesign/source/ui/inc/ViewsWindow.hxx @@ -103,7 +103,7 @@ namespace rptui virtual void MouseButtonUp( const MouseEvent& rMEvt ) override; virtual void Paint( vcl::RenderContext& /*rRenderContext*/, const Rectangle& rRect ) override; - virtual void ConfigurationChanged( utl::ConfigurationBroadcaster*, sal_uInt32 ) override; + virtual void ConfigurationChanged( utl::ConfigurationBroadcaster*, ConfigurationHints ) override; public: OViewsWindow( OReportWindow* _pReportWindow); diff --git a/reportdesign/source/ui/report/ViewsWindow.cxx b/reportdesign/source/ui/report/ViewsWindow.cxx index 33f9669f6562..bdeaf0699dfd 100644 --- a/reportdesign/source/ui/report/ViewsWindow.cxx +++ b/reportdesign/source/ui/report/ViewsWindow.cxx @@ -533,7 +533,7 @@ void OViewsWindow::unmarkAllObjects(OSectionView* _pSectionView) } } -void OViewsWindow::ConfigurationChanged( utl::ConfigurationBroadcaster*, sal_uInt32) +void OViewsWindow::ConfigurationChanged( utl::ConfigurationBroadcaster*, ConfigurationHints) { ImplInitSettings(); Invalidate(); diff --git a/sc/inc/chgtrack.hxx b/sc/inc/chgtrack.hxx index f00194da025f..1539ed3dfa1c 100644 --- a/sc/inc/chgtrack.hxx +++ b/sc/inc/chgtrack.hxx @@ -977,7 +977,7 @@ class ScChangeTrack : public utl::ConfigurationListener bool IsLastAction( sal_uLong nNum ) const; void ClearMsgQueue(); - virtual void ConfigurationChanged( utl::ConfigurationBroadcaster*, sal_uInt32 ) override; + virtual void ConfigurationChanged( utl::ConfigurationBroadcaster*, ConfigurationHints ) override; public: diff --git a/sc/inc/scmod.hxx b/sc/inc/scmod.hxx index 1715819a7344..15ddc133fdf0 100644 --- a/sc/inc/scmod.hxx +++ b/sc/inc/scmod.hxx @@ -118,7 +118,7 @@ public: virtual ~ScModule() override; virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) override; - virtual void ConfigurationChanged( utl::ConfigurationBroadcaster*, sal_uInt32 ) override; + virtual void ConfigurationChanged( utl::ConfigurationBroadcaster*, ConfigurationHints ) override; void DeleteCfg(); // moved by the application diff --git a/sc/source/core/tool/chgtrack.cxx b/sc/source/core/tool/chgtrack.cxx index 81892b206aa4..9a6963fc1e91 100644 --- a/sc/source/core/tool/chgtrack.cxx +++ b/sc/source/core/tool/chgtrack.cxx @@ -2244,7 +2244,7 @@ ScChangeAction* ScChangeTrack::GetLastSaved() const return nullptr; } -void ScChangeTrack::ConfigurationChanged( utl::ConfigurationBroadcaster*, sal_uInt32 ) +void ScChangeTrack::ConfigurationChanged( utl::ConfigurationBroadcaster*, ConfigurationHints ) { if ( !pDoc->IsInDtorClear() ) { diff --git a/sc/source/ui/app/scmod.cxx b/sc/source/ui/app/scmod.cxx index 435a00b560d4..99e59de5383f 100644 --- a/sc/source/ui/app/scmod.cxx +++ b/sc/source/ui/app/scmod.cxx @@ -212,7 +212,7 @@ ScModule::~ScModule() DeleteCfg(); // Called from Exit() } -void ScModule::ConfigurationChanged( utl::ConfigurationBroadcaster* p, sal_uInt32 ) +void ScModule::ConfigurationChanged( utl::ConfigurationBroadcaster* p, ConfigurationHints ) { if ( p == pColorConfig || p == pAccessOptions ) { diff --git a/sc/source/ui/dbgui/csvgrid.cxx b/sc/source/ui/dbgui/csvgrid.cxx index 2a26cc9b8cd9..31cb87ee0e4c 100644 --- a/sc/source/ui/dbgui/csvgrid.cxx +++ b/sc/source/ui/dbgui/csvgrid.cxx @@ -1012,7 +1012,7 @@ void ScCsvGrid::DataChanged( const DataChangedEvent& rDCEvt ) ScCsvControl::DataChanged( rDCEvt ); } -void ScCsvGrid::ConfigurationChanged( utl::ConfigurationBroadcaster*, sal_uInt32 ) +void ScCsvGrid::ConfigurationChanged( utl::ConfigurationBroadcaster*, ConfigurationHints ) { InitColors(); Repaint(); diff --git a/sc/source/ui/inc/csvgrid.hxx b/sc/source/ui/inc/csvgrid.hxx index 65f909a5d1b4..f813c79a8223 100644 --- a/sc/source/ui/inc/csvgrid.hxx +++ b/sc/source/ui/inc/csvgrid.hxx @@ -254,7 +254,7 @@ protected: virtual void DataChanged( const DataChangedEvent& rDCEvt ) override; - virtual void ConfigurationChanged( ::utl::ConfigurationBroadcaster*, sal_uInt32 ) override; + virtual void ConfigurationChanged( ::utl::ConfigurationBroadcaster*, ConfigurationHints ) override; // painting --------------------------------------------------------------- protected: diff --git a/sd/source/ui/inc/DrawViewShell.hxx b/sd/source/ui/inc/DrawViewShell.hxx index a752df79070e..9a20e3431b8e 100644 --- a/sd/source/ui/inc/DrawViewShell.hxx +++ b/sd/source/ui/inc/DrawViewShell.hxx @@ -488,7 +488,7 @@ private: std::vector<std::unique_ptr<SdrExternalToolEdit>> m_ExternalEdits; - virtual void ConfigurationChanged( utl::ConfigurationBroadcaster* pCb, sal_uInt32 ) override; + virtual void ConfigurationChanged( utl::ConfigurationBroadcaster* pCb, ConfigurationHints ) override; void ConfigureAppBackgroundColor( svtools::ColorConfig* pColorConfig = nullptr ); diff --git a/sd/source/ui/inc/WindowUpdater.hxx b/sd/source/ui/inc/WindowUpdater.hxx index fe531de9735a..ee5dcd0f55f8 100644 --- a/sd/source/ui/inc/WindowUpdater.hxx +++ b/sd/source/ui/inc/WindowUpdater.hxx @@ -98,7 +98,7 @@ public: /** Callback that waits for notifications of a <type>SvtCTLOptions</type> object. */ - virtual void ConfigurationChanged ( utl::ConfigurationBroadcaster*, sal_uInt32 nHint) override; + virtual void ConfigurationChanged ( utl::ConfigurationBroadcaster*, ConfigurationHints nHint) override; private: /// Options to monitor for changes. diff --git a/sd/source/ui/slidesorter/inc/view/SlideSorterView.hxx b/sd/source/ui/slidesorter/inc/view/SlideSorterView.hxx index 87c5e8a62399..b0b5f5534dbe 100644 --- a/sd/source/ui/slidesorter/inc/view/SlideSorterView.hxx +++ b/sd/source/ui/slidesorter/inc/view/SlideSorterView.hxx @@ -133,7 +133,7 @@ public: virtual void ConfigurationChanged ( utl::ConfigurationBroadcaster* pBroadcaster, - sal_uInt32 nHint) override; + ConfigurationHints nHint) override; void HandleDataChangeEvent(); diff --git a/sd/source/ui/slidesorter/view/SlideSorterView.cxx b/sd/source/ui/slidesorter/view/SlideSorterView.cxx index f7cbdcf762c6..e41790b0b2cb 100644 --- a/sd/source/ui/slidesorter/view/SlideSorterView.cxx +++ b/sd/source/ui/slidesorter/view/SlideSorterView.cxx @@ -678,7 +678,7 @@ void SlideSorterView::Paint ( void SlideSorterView::ConfigurationChanged ( utl::ConfigurationBroadcaster* pBroadcaster, - sal_uInt32 nHint) + ConfigurationHints nHint) { // Some changes of the configuration (some of the colors for example) // may affect the previews. Throw away the old ones and create new ones. diff --git a/sd/source/ui/view/WindowUpdater.cxx b/sd/source/ui/view/WindowUpdater.cxx index 4ed9b9fa93d6..54ce0e292f6f 100644 --- a/sd/source/ui/view/WindowUpdater.cxx +++ b/sd/source/ui/view/WindowUpdater.cxx @@ -120,7 +120,7 @@ void WindowUpdater::UpdateWindow (OutputDevice* pDevice) const } } -void WindowUpdater::ConfigurationChanged( utl::ConfigurationBroadcaster*, sal_uInt32 ) +void WindowUpdater::ConfigurationChanged( utl::ConfigurationBroadcaster*, ConfigurationHints ) { // Set the current state at all registered output devices. tWindowList::iterator aWindowIterator (maWindowList.begin()); diff --git a/sd/source/ui/view/drviewsk.cxx b/sd/source/ui/view/drviewsk.cxx index aaf11ddfb471..739fa58fa248 100644 --- a/sd/source/ui/view/drviewsk.cxx +++ b/sd/source/ui/view/drviewsk.cxx @@ -14,7 +14,7 @@ namespace sd { -void DrawViewShell::ConfigurationChanged( utl::ConfigurationBroadcaster* pCb, sal_uInt32 ) +void DrawViewShell::ConfigurationChanged( utl::ConfigurationBroadcaster* pCb, ConfigurationHints ) { ConfigureAppBackgroundColor( dynamic_cast<svtools::ColorConfig*>(pCb) ); } diff --git a/starmath/inc/smmod.hxx b/starmath/inc/smmod.hxx index f88b5f13a18d..15036a7f6792 100644 --- a/starmath/inc/smmod.hxx +++ b/starmath/inc/smmod.hxx @@ -103,7 +103,7 @@ public: explicit SmModule(SfxObjectFactory* pObjFact); virtual ~SmModule() override; - virtual void ConfigurationChanged( utl::ConfigurationBroadcaster*, sal_uInt32 ) override; + virtual void ConfigurationChanged( utl::ConfigurationBroadcaster*, ConfigurationHints ) override; svtools::ColorConfig & GetColorConfig(); diff --git a/starmath/source/smmod.cxx b/starmath/source/smmod.cxx index 149288099666..c50cf31733be 100644 --- a/starmath/source/smmod.cxx +++ b/starmath/source/smmod.cxx @@ -185,7 +185,7 @@ svtools::ColorConfig & SmModule::GetColorConfig() return *mpColorConfig; } -void SmModule::ConfigurationChanged( utl::ConfigurationBroadcaster*, sal_uInt32 ) +void SmModule::ConfigurationChanged( utl::ConfigurationBroadcaster*, ConfigurationHints ) { ApplyColorConfigValues(*mpColorConfig); } diff --git a/svl/source/config/cjkoptions.cxx b/svl/source/config/cjkoptions.cxx index 3556cb7fb0dc..691948830636 100644 --- a/svl/source/config/cjkoptions.cxx +++ b/svl/source/config/cjkoptions.cxx @@ -144,7 +144,7 @@ void SvtCJKOptions_Impl::SetAll(bool bSet) SetModified(); Commit(); - NotifyListeners(0); + NotifyListeners(ConfigurationHints::NONE); } } @@ -231,7 +231,7 @@ void SvtCJKOptions_Impl::Load() void SvtCJKOptions_Impl::Notify( const Sequence< OUString >& ) { Load(); - NotifyListeners(0); + NotifyListeners(ConfigurationHints::NONE); } void SvtCJKOptions_Impl::ImplCommit() diff --git a/svl/source/config/ctloptions.cxx b/svl/source/config/ctloptions.cxx index 311a56a84fda..cc4604004f3b 100644 --- a/svl/source/config/ctloptions.cxx +++ b/svl/source/config/ctloptions.cxx @@ -134,7 +134,7 @@ SvtCTLOptions_Impl::~SvtCTLOptions_Impl() void SvtCTLOptions_Impl::Notify( const Sequence< OUString >& ) { Load(); - NotifyListeners(SFX_HINT_CTL_SETTINGS_CHANGED); + NotifyListeners(ConfigurationHints::CtlSettingsChanged); } void SvtCTLOptions_Impl::ImplCommit() @@ -224,7 +224,7 @@ void SvtCTLOptions_Impl::ImplCommit() aValues.realloc(nRealCount); PutProperties( aNames, aValues ); //broadcast changes - NotifyListeners(SFX_HINT_CTL_SETTINGS_CHANGED); + NotifyListeners(ConfigurationHints::CtlSettingsChanged); } void SvtCTLOptions_Impl::Load() @@ -324,7 +324,7 @@ void SvtCTLOptions_Impl::SetCTLFontEnabled( bool _bEnabled ) { m_bCTLFontEnabled = _bEnabled; SetModified(); - NotifyListeners(0); + NotifyListeners(ConfigurationHints::NONE); } } void SvtCTLOptions_Impl::SetCTLSequenceChecking( bool _bEnabled ) @@ -333,7 +333,7 @@ void SvtCTLOptions_Impl::SetCTLSequenceChecking( bool _bEnabled ) { SetModified(); m_bCTLSequenceChecking = _bEnabled; - NotifyListeners(0); + NotifyListeners(ConfigurationHints::NONE); } } void SvtCTLOptions_Impl::SetCTLSequenceCheckingRestricted( bool _bEnabled ) @@ -342,7 +342,7 @@ void SvtCTLOptions_Impl::SetCTLSequenceCheckingRestricted( bool _bEnabled ) { SetModified(); m_bCTLRestricted = _bEnabled; - NotifyListeners(0); + NotifyListeners(ConfigurationHints::NONE); } } void SvtCTLOptions_Impl::SetCTLSequenceCheckingTypeAndReplace( bool _bEnabled ) @@ -351,7 +351,7 @@ void SvtCTLOptions_Impl::SetCTLSequenceCheckingTypeAndReplace( bool _bEnabled ) { SetModified(); m_bCTLTypeAndReplace = _bEnabled; - NotifyListeners(0); + NotifyListeners(ConfigurationHints::NONE); } } void SvtCTLOptions_Impl::SetCTLCursorMovement( SvtCTLOptions::CursorMovement _eMovement ) @@ -360,7 +360,7 @@ void SvtCTLOptions_Impl::SetCTLCursorMovement( SvtCTLOptions::CursorMovement _eM { SetModified(); m_eCTLCursorMovement = _eMovement; - NotifyListeners(0); + NotifyListeners(ConfigurationHints::NONE); } } void SvtCTLOptions_Impl::SetCTLTextNumerals( SvtCTLOptions::TextNumerals _eNumerals ) @@ -369,7 +369,7 @@ void SvtCTLOptions_Impl::SetCTLTextNumerals( SvtCTLOptions::TextNumerals _eNumer { SetModified(); m_eCTLTextNumerals = _eNumerals; - NotifyListeners(0); + NotifyListeners(ConfigurationHints::NONE); } } diff --git a/svl/source/numbers/zforlist.cxx b/svl/source/numbers/zforlist.cxx index c2617a534a4b..964abdce3a0c 100644 --- a/svl/source/numbers/zforlist.cxx +++ b/svl/source/numbers/zforlist.cxx @@ -178,7 +178,7 @@ public: size_t Count() { return aFormatters.size(); } - virtual void ConfigurationChanged( utl::ConfigurationBroadcaster*, sal_uInt32 ) override; + virtual void ConfigurationChanged( utl::ConfigurationBroadcaster*, ConfigurationHints ) override; }; SvNumberFormatterRegistry_Impl::SvNumberFormatterRegistry_Impl() @@ -208,22 +208,22 @@ void SvNumberFormatterRegistry_Impl::Remove( SvNumberFormatter* pThis ) } void SvNumberFormatterRegistry_Impl::ConfigurationChanged( utl::ConfigurationBroadcaster*, - sal_uInt32 nHint) + ConfigurationHints nHint) { ::osl::MutexGuard aGuard( SvNumberFormatter::GetMutex() ); - if ( nHint & SYSLOCALEOPTIONS_HINT_LOCALE ) + if ( nHint & ConfigurationHints::Locale ) { for(SvNumberFormatter* pFormatter : aFormatters) pFormatter->ReplaceSystemCL( eSysLanguage ); eSysLanguage = MsLangId::getRealLanguage( LANGUAGE_SYSTEM ); } - if ( nHint & SYSLOCALEOPTIONS_HINT_CURRENCY ) + if ( nHint & ConfigurationHints::Currency ) { for(SvNumberFormatter* pFormatter : aFormatters) pFormatter->ResetDefaultSystemCurrency(); } - if ( nHint & SYSLOCALEOPTIONS_HINT_DATEPATTERNS ) + if ( nHint & ConfigurationHints::DatePatterns ) { for(SvNumberFormatter* pFormatter : aFormatters) pFormatter->InvalidateDateAcceptancePatterns(); diff --git a/svtools/source/config/accessibilityoptions.cxx b/svtools/source/config/accessibilityoptions.cxx index 3078b11ca449..32bd75a5973c 100644 --- a/svtools/source/config/accessibilityoptions.cxx +++ b/svtools/source/config/accessibilityoptions.cxx @@ -390,7 +390,7 @@ SvtAccessibilityOptions::~SvtAccessibilityOptions() void SvtAccessibilityOptions::Notify( SfxBroadcaster&, const SfxHint& rHint ) { - NotifyListeners(0); + NotifyListeners(ConfigurationHints::NONE); if ( rHint.GetId() == SFX_HINT_ACCESSIBILITY_CHANGED ) SetVCLSettings(); } diff --git a/svtools/source/config/colorcfg.cxx b/svtools/source/config/colorcfg.cxx index d48f7cca6eee..da09eac04d12 100644 --- a/svtools/source/config/colorcfg.cxx +++ b/svtools/source/config/colorcfg.cxx @@ -252,7 +252,7 @@ void ColorConfig_Impl::Notify( const uno::Sequence<OUString>& ) { //loading via notification always uses the default setting Load(OUString()); - NotifyListeners(0); + NotifyListeners(ConfigurationHints::NONE); } void ColorConfig_Impl::ImplCommit() @@ -330,7 +330,7 @@ void ColorConfig_Impl::SettingsChanged() ImplUpdateApplicationSettings(); - NotifyListeners(0); + NotifyListeners(ConfigurationHints::NONE); } IMPL_LINK( ColorConfig_Impl, DataChangedEventListener, VclSimpleEvent&, rEvent, void ) diff --git a/svx/source/svdraw/svdpntv.cxx b/svx/source/svdraw/svdpntv.cxx index c374c756e599..ba49f814d698 100644 --- a/svx/source/svdraw/svdpntv.cxx +++ b/svx/source/svdraw/svdpntv.cxx @@ -264,7 +264,7 @@ void SdrPaintView::Notify(SfxBroadcaster& rBC, const SfxHint& rHint) } } -void SdrPaintView::ConfigurationChanged( ::utl::ConfigurationBroadcaster* , sal_uInt32 ) +void SdrPaintView::ConfigurationChanged( ::utl::ConfigurationBroadcaster* , ConfigurationHints ) { onChangeColorConfig(); InvalidateAllWin(); diff --git a/svx/source/svdraw/svdview.cxx b/svx/source/svdraw/svdview.cxx index 329ca480b815..ace5cef55ebd 100644 --- a/svx/source/svdraw/svdview.cxx +++ b/svx/source/svdraw/svdview.cxx @@ -1424,10 +1424,10 @@ bool SdrView::BegMark(const Point& rPnt, bool bAddMark, bool bUnmark) } } -void SdrView::ConfigurationChanged( ::utl::ConfigurationBroadcaster*p, sal_uInt32 nHint) +void SdrView::ConfigurationChanged( ::utl::ConfigurationBroadcaster*p, ConfigurationHints nHint) { onAccessibilityOptionsChanged(); - SdrCreateView::ConfigurationChanged(p, nHint); + SdrCreateView::ConfigurationChanged(p, nHint); } diff --git a/sw/inc/swmodule.hxx b/sw/inc/swmodule.hxx index 427732c8d08b..669950f9752e 100644 --- a/sw/inc/swmodule.hxx +++ b/sw/inc/swmodule.hxx @@ -109,7 +109,7 @@ class SW_DLLPUBLIC SwModule: public SfxModule, public SfxListener, public utl::C // Catch hint for DocInfo. virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) override; - virtual void ConfigurationChanged( utl::ConfigurationBroadcaster*, sal_uInt32 ) override; + virtual void ConfigurationChanged( utl::ConfigurationBroadcaster*, ConfigurationHints ) override; protected: // Envelopes, labels. diff --git a/sw/source/uibase/app/apphdl.cxx b/sw/source/uibase/app/apphdl.cxx index 9de333208729..3db0af314bf0 100644 --- a/sw/source/uibase/app/apphdl.cxx +++ b/sw/source/uibase/app/apphdl.cxx @@ -912,7 +912,7 @@ void SwModule::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint ) } } -void SwModule::ConfigurationChanged( utl::ConfigurationBroadcaster* pBrdCst, sal_uInt32 ) +void SwModule::ConfigurationChanged( utl::ConfigurationBroadcaster* pBrdCst, ConfigurationHints ) { if( pBrdCst == m_pUserOptions ) { diff --git a/unotools/source/config/lingucfg.cxx b/unotools/source/config/lingucfg.cxx index c9d9c639c6a1..96f21575bb30 100644 --- a/unotools/source/config/lingucfg.cxx +++ b/unotools/source/config/lingucfg.cxx @@ -206,7 +206,7 @@ SvtLinguConfigItem::~SvtLinguConfigItem() void SvtLinguConfigItem::Notify( const uno::Sequence< OUString > &rPropertyNames ) { LoadOptions( rPropertyNames ); - NotifyListeners(0); + NotifyListeners(ConfigurationHints::NONE); } void SvtLinguConfigItem::ImplCommit() @@ -536,7 +536,7 @@ bool SvtLinguConfigItem::SetProperty( sal_Int32 nPropertyHandle, const uno::Any if (bMod) SetModified(); - NotifyListeners(0); + NotifyListeners(ConfigurationHints::NONE); return bSucc; } diff --git a/unotools/source/config/options.cxx b/unotools/source/config/options.cxx index 435a453219a5..c6e66c502aca 100644 --- a/unotools/source/config/options.cxx +++ b/unotools/source/config/options.cxx @@ -28,7 +28,7 @@ utl::ConfigurationListener::~ConfigurationListener() {} ConfigurationBroadcaster::ConfigurationBroadcaster() : mpList(nullptr) , m_nBroadcastBlocked( 0 ) -, m_nBlockedHint( 0 ) +, m_nBlockedHint( ConfigurationHints::NONE ) { } @@ -59,14 +59,14 @@ void ConfigurationBroadcaster::RemoveListener( utl::ConfigurationListener* pList } } -void ConfigurationBroadcaster::NotifyListeners( sal_uInt32 nHint ) +void ConfigurationBroadcaster::NotifyListeners( ConfigurationHints nHint ) { if ( m_nBroadcastBlocked ) m_nBlockedHint |= nHint; else { nHint |= m_nBlockedHint; - m_nBlockedHint = 0; + m_nBlockedHint = ConfigurationHints::NONE; if ( mpList ) { for ( size_t n = 0; n < mpList->size(); n++ ) (*mpList)[ n ]->ConfigurationChanged( this, nHint ); @@ -81,7 +81,7 @@ void ConfigurationBroadcaster::BlockBroadcasts( bool bBlock ) else if ( m_nBroadcastBlocked ) { if ( --m_nBroadcastBlocked == 0 ) - NotifyListeners( 0 ); + NotifyListeners( ConfigurationHints::NONE ); } } @@ -93,7 +93,7 @@ Options::~Options() { } -void Options::ConfigurationChanged( ConfigurationBroadcaster*, sal_uInt32 nHint ) +void Options::ConfigurationChanged( ConfigurationBroadcaster*, ConfigurationHints nHint ) { NotifyListeners( nHint ); } diff --git a/unotools/source/config/syslocaleoptions.cxx b/unotools/source/config/syslocaleoptions.cxx index 9b24977f949c..5f3b00cdf1f3 100644 --- a/unotools/source/config/syslocaleoptions.cxx +++ b/unotools/source/config/syslocaleoptions.cxx @@ -394,9 +394,9 @@ void SvtSysLocaleOptions_Impl::SetLocaleString( const OUString& rStr ) MakeRealLocale(); LanguageTag::setConfiguredSystemLanguage( m_aRealLocale.getLanguageType() ); SetModified(); - sal_uInt32 nHint = SYSLOCALEOPTIONS_HINT_LOCALE; + ConfigurationHints nHint = ConfigurationHints::Locale; if ( m_aCurrencyString.isEmpty() ) - nHint |= SYSLOCALEOPTIONS_HINT_CURRENCY; + nHint |= ConfigurationHints::Currency; NotifyListeners( nHint ); } } @@ -410,7 +410,7 @@ void SvtSysLocaleOptions_Impl::SetUILocaleString( const OUString& rStr ) // as we can't switch UILocale at runtime, we only store changes in the configuration MakeRealUILocale(); SetModified(); - NotifyListeners( SYSLOCALEOPTIONS_HINT_UILOCALE ); + NotifyListeners( ConfigurationHints::UiLocale ); } } @@ -420,7 +420,7 @@ void SvtSysLocaleOptions_Impl::SetCurrencyString( const OUString& rStr ) { m_aCurrencyString = rStr; SetModified(); - NotifyListeners( SYSLOCALEOPTIONS_HINT_CURRENCY ); + NotifyListeners( ConfigurationHints::Currency ); } } @@ -430,7 +430,7 @@ void SvtSysLocaleOptions_Impl::SetDatePatternsString( const OUString& rStr ) { m_aDatePatternsString = rStr; SetModified(); - NotifyListeners( SYSLOCALEOPTIONS_HINT_DATEPATTERNS ); + NotifyListeners( ConfigurationHints::DatePatterns ); } } @@ -440,7 +440,7 @@ void SvtSysLocaleOptions_Impl::SetDecimalSeparatorAsLocale( bool bSet) { m_bDecimalSeparator = bSet; SetModified(); - NotifyListeners( SYSLOCALEOPTIONS_HINT_DECSEP ); + NotifyListeners( ConfigurationHints::DecSep ); } } @@ -450,13 +450,13 @@ void SvtSysLocaleOptions_Impl::SetIgnoreLanguageChange( bool bSet) { m_bIgnoreLanguageChange = bSet; SetModified(); - NotifyListeners( SYSLOCALEOPTIONS_HINT_IGNORELANG ); + NotifyListeners( ConfigurationHints::IgnoreLang ); } } void SvtSysLocaleOptions_Impl::Notify( const Sequence< OUString >& seqPropertyNames ) { - sal_uInt32 nHint = 0; + ConfigurationHints nHint = ConfigurationHints::NONE; Sequence< Any > seqValues = GetProperties( seqPropertyNames ); Sequence< sal_Bool > seqROStates = GetReadOnlyStates( seqPropertyNames ); sal_Int32 nCount = seqPropertyNames.getLength(); @@ -467,9 +467,9 @@ void SvtSysLocaleOptions_Impl::Notify( const Sequence< OUString >& seqPropertyNa DBG_ASSERT( seqValues[nProp].getValueTypeClass() == TypeClass_STRING, "Locale property type" ); seqValues[nProp] >>= m_aLocaleString; m_bROLocale = seqROStates[nProp]; - nHint |= SYSLOCALEOPTIONS_HINT_LOCALE; + nHint |= ConfigurationHints::Locale; if ( m_aCurrencyString.isEmpty() ) - nHint |= SYSLOCALEOPTIONS_HINT_CURRENCY; + nHint |= ConfigurationHints::Currency; MakeRealLocale(); } if( seqPropertyNames[nProp] == PROPERTYNAME_UILOCALE ) @@ -477,7 +477,7 @@ void SvtSysLocaleOptions_Impl::Notify( const Sequence< OUString >& seqPropertyNa DBG_ASSERT( seqValues[nProp].getValueTypeClass() == TypeClass_STRING, "Locale property type" ); seqValues[nProp] >>= m_aUILocaleString; m_bROUILocale = seqROStates[nProp]; - nHint |= SYSLOCALEOPTIONS_HINT_UILOCALE; + nHint |= ConfigurationHints::UiLocale; MakeRealUILocale(); } else if( seqPropertyNames[nProp] == PROPERTYNAME_CURRENCY ) @@ -485,7 +485,7 @@ void SvtSysLocaleOptions_Impl::Notify( const Sequence< OUString >& seqPropertyNa DBG_ASSERT( seqValues[nProp].getValueTypeClass() == TypeClass_STRING, "Currency property type" ); seqValues[nProp] >>= m_aCurrencyString; m_bROCurrency = seqROStates[nProp]; - nHint |= SYSLOCALEOPTIONS_HINT_CURRENCY; + nHint |= ConfigurationHints::Currency; } else if( seqPropertyNames[nProp] == PROPERTYNAME_DECIMALSEPARATOR ) { @@ -502,10 +502,10 @@ void SvtSysLocaleOptions_Impl::Notify( const Sequence< OUString >& seqPropertyNa DBG_ASSERT( seqValues[nProp].getValueTypeClass() == TypeClass_STRING, "DatePatterns property type" ); seqValues[nProp] >>= m_aDatePatternsString; m_bRODatePatterns = seqROStates[nProp]; - nHint |= SYSLOCALEOPTIONS_HINT_DATEPATTERNS; + nHint |= ConfigurationHints::DatePatterns; } } - if ( nHint ) + if ( nHint != ConfigurationHints::NONE ) NotifyListeners( nHint ); } @@ -689,9 +689,9 @@ const Link<LinkParamNone*,void>& SvtSysLocaleOptions::GetCurrencyChangeLink() return CurrencyChangeLink::get(); } -void SvtSysLocaleOptions::ConfigurationChanged( utl::ConfigurationBroadcaster* p, sal_uInt32 nHint ) +void SvtSysLocaleOptions::ConfigurationChanged( utl::ConfigurationBroadcaster* p, ConfigurationHints nHint ) { - if ( nHint & SYSLOCALEOPTIONS_HINT_CURRENCY ) + if ( nHint & ConfigurationHints::Currency ) { const Link<LinkParamNone*,void>& rLink = GetCurrencyChangeLink(); rLink.Call( nullptr ); diff --git a/unotools/source/config/useroptions.cxx b/unotools/source/config/useroptions.cxx index 292c0001a9ab..747997dcca61 100644 --- a/unotools/source/config/useroptions.cxx +++ b/unotools/source/config/useroptions.cxx @@ -217,7 +217,7 @@ OUString SvtUserOptions::Impl::GetFullName () const void SvtUserOptions::Impl::Notify () { - NotifyListeners(0); + NotifyListeners(ConfigurationHints::NONE); } bool SvtUserOptions::Impl::IsTokenReadonly (UserOptToken nToken) const diff --git a/unotools/source/misc/syslocale.cxx b/unotools/source/misc/syslocale.cxx index 6b0155b8653b..0955090391a2 100644 --- a/unotools/source/misc/syslocale.cxx +++ b/unotools/source/misc/syslocale.cxx @@ -51,7 +51,7 @@ public: virtual ~SvtSysLocale_Impl() override; CharClass* GetCharClass(); - virtual void ConfigurationChanged( utl::ConfigurationBroadcaster*, sal_uInt32 ) override; + virtual void ConfigurationChanged( utl::ConfigurationBroadcaster*, ConfigurationHints ) override; private: void setDateAcceptancePatternsConfig(); @@ -80,17 +80,17 @@ CharClass* SvtSysLocale_Impl::GetCharClass() return pCharClass; } -void SvtSysLocale_Impl::ConfigurationChanged( utl::ConfigurationBroadcaster*, sal_uInt32 nHint ) +void SvtSysLocale_Impl::ConfigurationChanged( utl::ConfigurationBroadcaster*, ConfigurationHints nHint ) { MutexGuard aGuard( SvtSysLocale::GetMutex() ); - if ( nHint & SYSLOCALEOPTIONS_HINT_LOCALE ) + if ( nHint & ConfigurationHints::Locale ) { const LanguageTag& rLanguageTag = aSysLocaleOptions.GetRealLanguageTag(); pLocaleData->setLanguageTag( rLanguageTag ); GetCharClass()->setLanguageTag( rLanguageTag ); } - if ( nHint & SYSLOCALEOPTIONS_HINT_DATEPATTERNS ) + if ( nHint & ConfigurationHints::DatePatterns ) { setDateAcceptancePatternsConfig(); } diff --git a/vcl/inc/svdata.hxx b/vcl/inc/svdata.hxx index 5ed1464787ac..18adb49b3364 100644 --- a/vcl/inc/svdata.hxx +++ b/vcl/inc/svdata.hxx @@ -94,7 +94,7 @@ namespace vcl { class DisplayConnectionDispatch; class SettingsConfigItem; class class LocaleConfigurationListener : public utl::ConfigurationListener { public: - virtual void ConfigurationChanged( utl::ConfigurationBroadcaster*, sal_uInt32 ) override; + virtual void ConfigurationChanged( utl::ConfigurationBroadcaster*, ConfigurationHints ) override; }; typedef std::vector<Link<VclWindowEvent&,bool> > SVAppKeyListeners; diff --git a/vcl/source/app/settings.cxx b/vcl/source/app/settings.cxx index d9dbe571081d..1888379f966a 100644 --- a/vcl/source/app/settings.cxx +++ b/vcl/source/app/settings.cxx @@ -2945,10 +2945,10 @@ const vcl::I18nHelper& AllSettings::GetUILocaleI18nHelper() const return *mxData->mpUII18nHelper; } -void AllSettings::LocaleSettingsChanged( sal_uInt32 nHint ) +void AllSettings::LocaleSettingsChanged( ConfigurationHints nHint ) { AllSettings aAllSettings( Application::GetSettings() ); - if ( nHint & SYSLOCALEOPTIONS_HINT_DECSEP ) + if ( nHint & ConfigurationHints::DecSep ) { MiscSettings aMiscSettings = aAllSettings.GetMiscSettings(); bool bIsDecSepAsLocale = aAllSettings.mxData->maSysLocale.GetOptions().IsDecimalSeparatorAsLocale(); @@ -2959,7 +2959,7 @@ void AllSettings::LocaleSettingsChanged( sal_uInt32 nHint ) } } - if ( (nHint & SYSLOCALEOPTIONS_HINT_LOCALE) ) + if ( nHint & ConfigurationHints::Locale ) aAllSettings.SetLanguageTag( aAllSettings.mxData->maSysLocale.GetOptions().GetLanguageTag() ); Application::SetSettings( aAllSettings ); diff --git a/vcl/source/app/svdata.cxx b/vcl/source/app/svdata.cxx index 81b70aada41a..f8f1e3d370b4 100644 --- a/vcl/source/app/svdata.cxx +++ b/vcl/source/app/svdata.cxx @@ -288,7 +288,7 @@ bool ImplInitAccessBridge() } #endif -void LocaleConfigurationListener::ConfigurationChanged( utl::ConfigurationBroadcaster*, sal_uInt32 nHint ) +void LocaleConfigurationListener::ConfigurationChanged( utl::ConfigurationBroadcaster*, ConfigurationHints nHint ) { AllSettings::LocaleSettingsChanged( nHint ); } |