diff options
author | Noel Grandin <noel@peralex.com> | 2015-01-12 12:55:32 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-01-12 12:57:05 +0200 |
commit | 5333782d090a9e147c0c431f0f741863d1d8cf8e (patch) | |
tree | efff4a9394099568688559d52a36c8d9fe94ebd2 /vcl/source/window | |
parent | a5b5ad9f9306d868430ed9efd210b95c24a15161 (diff) |
convert SETTINGS_ #defines to 'enum class'
and dump the ones that nothing is listening to
Change-Id: I253ef284df785812a439dd160edba1b07fdbaac4
Diffstat (limited to 'vcl/source/window')
-rw-r--r-- | vcl/source/window/brdwin.cxx | 2 | ||||
-rw-r--r-- | vcl/source/window/dialog.cxx | 2 | ||||
-rw-r--r-- | vcl/source/window/dockingarea.cxx | 2 | ||||
-rw-r--r-- | vcl/source/window/dockwin.cxx | 2 | ||||
-rw-r--r-- | vcl/source/window/floatwin.cxx | 2 | ||||
-rw-r--r-- | vcl/source/window/menubarwindow.cxx | 4 | ||||
-rw-r--r-- | vcl/source/window/menufloatingwindow.cxx | 2 | ||||
-rw-r--r-- | vcl/source/window/settings.cxx | 13 | ||||
-rw-r--r-- | vcl/source/window/splitwin.cxx | 2 | ||||
-rw-r--r-- | vcl/source/window/status.cxx | 2 | ||||
-rw-r--r-- | vcl/source/window/tabpage.cxx | 2 | ||||
-rw-r--r-- | vcl/source/window/toolbox.cxx | 2 | ||||
-rw-r--r-- | vcl/source/window/window.cxx | 2 |
13 files changed, 18 insertions, 21 deletions
diff --git a/vcl/source/window/brdwin.cxx b/vcl/source/window/brdwin.cxx index f771a15c683f..85dce0ffeb5b 100644 --- a/vcl/source/window/brdwin.cxx +++ b/vcl/source/window/brdwin.cxx @@ -1988,7 +1988,7 @@ void ImplBorderWindow::DataChanged( const DataChangedEvent& rDCEvt ) if ( (rDCEvt.GetType() == DataChangedEventType::FONTS) || (rDCEvt.GetType() == DataChangedEventType::FONTSUBSTITUTION) || ((rDCEvt.GetType() == DataChangedEventType::SETTINGS) && - (rDCEvt.GetFlags() & SETTINGS_STYLE)) ) + (rDCEvt.GetFlags() & AllSettingsFlags::STYLE)) ) { if ( !mpWindowImpl->mbFrame || (GetStyle() & (WB_OWNERDRAWDECORATION | WB_POPUP)) ) UpdateView( true, ImplGetWindow()->GetOutputSizePixel() ); diff --git a/vcl/source/window/dialog.cxx b/vcl/source/window/dialog.cxx index a403126f9c6c..90260bfc9827 100644 --- a/vcl/source/window/dialog.cxx +++ b/vcl/source/window/dialog.cxx @@ -655,7 +655,7 @@ void Dialog::DataChanged( const DataChangedEvent& rDCEvt ) SystemWindow::DataChanged( rDCEvt ); if ( (rDCEvt.GetType() == DataChangedEventType::SETTINGS) && - (rDCEvt.GetFlags() & SETTINGS_STYLE) ) + (rDCEvt.GetFlags() & AllSettingsFlags::STYLE) ) { ImplInitSettings(); Invalidate(); diff --git a/vcl/source/window/dockingarea.cxx b/vcl/source/window/dockingarea.cxx index 66c3681e8d17..0348709d34f4 100644 --- a/vcl/source/window/dockingarea.cxx +++ b/vcl/source/window/dockingarea.cxx @@ -99,7 +99,7 @@ void DockingAreaWindow::DataChanged( const DataChangedEvent& rDCEvt ) { Window::DataChanged( rDCEvt ); - if ( (rDCEvt.GetType() == DataChangedEventType::SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_STYLE) ) + if ( (rDCEvt.GetType() == DataChangedEventType::SETTINGS) && (rDCEvt.GetFlags() & AllSettingsFlags::STYLE) ) { ImplInitBackground( this ); Invalidate(); diff --git a/vcl/source/window/dockwin.cxx b/vcl/source/window/dockwin.cxx index 6bd629d36230..cdc6084511ba 100644 --- a/vcl/source/window/dockwin.cxx +++ b/vcl/source/window/dockwin.cxx @@ -765,7 +765,7 @@ void DockingWindow::StateChanged( StateChangedType nType ) void DockingWindow::DataChanged( const DataChangedEvent& rDCEvt ) { if ( (rDCEvt.GetType() == DataChangedEventType::SETTINGS) && - (rDCEvt.GetFlags() & SETTINGS_STYLE) ) + (rDCEvt.GetFlags() & AllSettingsFlags::STYLE) ) { ImplInitSettings(); Invalidate(); diff --git a/vcl/source/window/floatwin.cxx b/vcl/source/window/floatwin.cxx index 2bfc01e30ced..ed0e3c147535 100644 --- a/vcl/source/window/floatwin.cxx +++ b/vcl/source/window/floatwin.cxx @@ -556,7 +556,7 @@ void FloatingWindow::DataChanged( const DataChangedEvent& rDCEvt ) SystemWindow::DataChanged( rDCEvt ); if ( (rDCEvt.GetType() == DataChangedEventType::SETTINGS) && - (rDCEvt.GetFlags() & SETTINGS_STYLE) ) + (rDCEvt.GetFlags() & AllSettingsFlags::STYLE) ) { ImplInitSettings(); Invalidate(); diff --git a/vcl/source/window/menubarwindow.cxx b/vcl/source/window/menubarwindow.cxx index 0beffbaf7854..d051bea37b12 100644 --- a/vcl/source/window/menubarwindow.cxx +++ b/vcl/source/window/menubarwindow.cxx @@ -50,7 +50,7 @@ void DecoToolBox::DataChanged( const DataChangedEvent& rDCEvt ) { Window::DataChanged( rDCEvt ); - if ( rDCEvt.GetFlags() & SETTINGS_STYLE ) + if ( rDCEvt.GetFlags() & AllSettingsFlags::STYLE ) { calcMinSize(); SetBackground(); @@ -1038,7 +1038,7 @@ void MenuBarWindow::DataChanged( const DataChangedEvent& rDCEvt ) if ( (rDCEvt.GetType() == DataChangedEventType::FONTS) || (rDCEvt.GetType() == DataChangedEventType::FONTSUBSTITUTION) || ((rDCEvt.GetType() == DataChangedEventType::SETTINGS) && - (rDCEvt.GetFlags() & SETTINGS_STYLE)) ) + (rDCEvt.GetFlags() & AllSettingsFlags::STYLE)) ) { ImplInitStyleSettings(); LayoutChanged(); diff --git a/vcl/source/window/menufloatingwindow.cxx b/vcl/source/window/menufloatingwindow.cxx index e1ee5f7a857a..36479605fdd5 100644 --- a/vcl/source/window/menufloatingwindow.cxx +++ b/vcl/source/window/menufloatingwindow.cxx @@ -1173,7 +1173,7 @@ void MenuFloatingWindow::DataChanged( const DataChangedEvent& rDCEvt ) if ( (rDCEvt.GetType() == DataChangedEventType::FONTS) || (rDCEvt.GetType() == DataChangedEventType::FONTSUBSTITUTION) || ((rDCEvt.GetType() == DataChangedEventType::SETTINGS) && - (rDCEvt.GetFlags() & SETTINGS_STYLE)) ) + (rDCEvt.GetFlags() & AllSettingsFlags::STYLE)) ) { ImplInitMenuWindow( this, false, false ); Invalidate(); diff --git a/vcl/source/window/settings.cxx b/vcl/source/window/settings.cxx index d9a9b78d9d78..705efeca746b 100644 --- a/vcl/source/window/settings.cxx +++ b/vcl/source/window/settings.cxx @@ -57,12 +57,12 @@ void Window::SetSettings( const AllSettings& rSettings, bool bChild ) AllSettings aOldSettings(*mxSettings); OutputDevice::SetSettings( rSettings ); - sal_uLong nChangeFlags = aOldSettings.GetChangeFlags( rSettings ); + AllSettingsFlags nChangeFlags = aOldSettings.GetChangeFlags( rSettings ); // recalculate AppFont-resolution and DPI-resolution ImplInitResolutionSettings(); - if ( nChangeFlags ) + if ( bool(nChangeFlags) ) { DataChangedEvent aDCEvt( DataChangedEventType::SETTINGS, &aOldSettings, nChangeFlags ); DataChanged( aDCEvt ); @@ -91,10 +91,7 @@ void Window::UpdateSettings( const AllSettings& rSettings, bool bChild ) } AllSettings aOldSettings(*mxSettings); - sal_uLong nChangeFlags = mxSettings->Update( mxSettings->GetWindowUpdate(), rSettings ); - nChangeFlags |= SETTINGS_IN_UPDATE_SETTINGS; // Set this flag so the receiver of the data changed - // event can distinguish between the changing of global - // setting and a local change ( with SetSettings ) + AllSettingsFlags nChangeFlags = mxSettings->Update( mxSettings->GetWindowUpdate(), rSettings ); // recalculate AppFont-resolution and DPI-resolution ImplInitResolutionSettings(); @@ -110,7 +107,7 @@ void Window::UpdateSettings( const AllSettings& rSettings, bool bChild ) aSet.SetWheelBehavior( aOldSettings.GetMouseSettings().GetWheelBehavior() ); mxSettings->SetMouseSettings( aSet ); - if( (nChangeFlags & SETTINGS_STYLE) && IsBackground() ) + if( (nChangeFlags & AllSettingsFlags::STYLE) && IsBackground() ) { Wallpaper aWallpaper = GetBackground(); if( !aWallpaper.IsBitmap() && !aWallpaper.IsGradient() ) @@ -128,7 +125,7 @@ void Window::UpdateSettings( const AllSettings& rSettings, bool bChild ) } } - if ( nChangeFlags ) + if ( bool(nChangeFlags) ) { DataChangedEvent aDCEvt( DataChangedEventType::SETTINGS, &aOldSettings, nChangeFlags ); DataChanged( aDCEvt ); diff --git a/vcl/source/window/splitwin.cxx b/vcl/source/window/splitwin.cxx index b488d63978fc..ab313f9d6aa9 100644 --- a/vcl/source/window/splitwin.cxx +++ b/vcl/source/window/splitwin.cxx @@ -2623,7 +2623,7 @@ void SplitWindow::StateChanged( StateChangedType nType ) void SplitWindow::DataChanged( const DataChangedEvent& rDCEvt ) { if ( (rDCEvt.GetType() == DataChangedEventType::SETTINGS) && - (rDCEvt.GetFlags() & SETTINGS_STYLE) ) + (rDCEvt.GetFlags() & AllSettingsFlags::STYLE) ) { ImplInitSettings(); Invalidate(); diff --git a/vcl/source/window/status.cxx b/vcl/source/window/status.cxx index 82c49d4b7bf6..0eebdbe737d6 100644 --- a/vcl/source/window/status.cxx +++ b/vcl/source/window/status.cxx @@ -851,7 +851,7 @@ void StatusBar::DataChanged( const DataChangedEvent& rDCEvt ) || (rDCEvt.GetType() == DataChangedEventType::FONTS ) || (rDCEvt.GetType() == DataChangedEventType::FONTSUBSTITUTION) || ( (rDCEvt.GetType() == DataChangedEventType::SETTINGS) - && (rDCEvt.GetFlags() & SETTINGS_STYLE ) + && (rDCEvt.GetFlags() & AllSettingsFlags::STYLE ) ) ) { diff --git a/vcl/source/window/tabpage.cxx b/vcl/source/window/tabpage.cxx index b001bb4512ac..d55496412e2b 100644 --- a/vcl/source/window/tabpage.cxx +++ b/vcl/source/window/tabpage.cxx @@ -108,7 +108,7 @@ void TabPage::DataChanged( const DataChangedEvent& rDCEvt ) Window::DataChanged( rDCEvt ); if ( (rDCEvt.GetType() == DataChangedEventType::SETTINGS) && - (rDCEvt.GetFlags() & SETTINGS_STYLE) ) + (rDCEvt.GetFlags() & AllSettingsFlags::STYLE) ) { ImplInitSettings(); Invalidate(); diff --git a/vcl/source/window/toolbox.cxx b/vcl/source/window/toolbox.cxx index 1f7c694fbabf..4d2ff5fdcc90 100644 --- a/vcl/source/window/toolbox.cxx +++ b/vcl/source/window/toolbox.cxx @@ -4455,7 +4455,7 @@ void ToolBox::DataChanged( const DataChangedEvent& rDCEvt ) (rDCEvt.GetType() == DataChangedEventType::FONTS) || (rDCEvt.GetType() == DataChangedEventType::FONTSUBSTITUTION) || ((rDCEvt.GetType() == DataChangedEventType::SETTINGS) && - (rDCEvt.GetFlags() & SETTINGS_STYLE)) ) + (rDCEvt.GetFlags() & AllSettingsFlags::STYLE)) ) { mbCalc = true; mbFormat = true; diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx index c4dc9afda607..0182a6c2b69e 100644 --- a/vcl/source/window/window.cxx +++ b/vcl/source/window/window.cxx @@ -3689,7 +3689,7 @@ void Window::EnableNativeWidget( bool bEnable ) // send datachanged event to allow for internal changes required for NWF // like clipmode, transparency, etc. - DataChangedEvent aDCEvt( DataChangedEventType::SETTINGS, mxSettings.get(), SETTINGS_STYLE ); + DataChangedEvent aDCEvt( DataChangedEventType::SETTINGS, mxSettings.get(), AllSettingsFlags::STYLE ); DataChanged( aDCEvt ); // sometimes the borderwindow is queried, so keep it in sync |