diff options
Diffstat (limited to 'vcl')
30 files changed, 66 insertions, 100 deletions
diff --git a/vcl/source/app/settings.cxx b/vcl/source/app/settings.cxx index 7a7e4259d667..95308ef0686a 100644 --- a/vcl/source/app/settings.cxx +++ b/vcl/source/app/settings.cxx @@ -240,7 +240,7 @@ struct ImplAllSettingsData MiscSettings maMiscSettings; HelpSettings maHelpSettings; LanguageTag maLocale; - sal_uLong mnWindowUpdate; + AllSettingsFlags mnWindowUpdate; LanguageTag maUILocale; LocaleDataWrapper* mpLocaleDataWrapper; LocaleDataWrapper* mpUILocaleDataWrapper; @@ -2640,7 +2640,7 @@ ImplAllSettingsData::ImplAllSettingsData() maLocale( LANGUAGE_SYSTEM ), maUILocale( LANGUAGE_SYSTEM ) { - mnWindowUpdate = SETTINGS_ALLSETTINGS; + mnWindowUpdate = AllSettingsFlags::STYLE | AllSettingsFlags::MISC | AllSettingsFlags::LOCALE; mpLocaleDataWrapper = NULL; mpUILocaleDataWrapper = NULL; mpI18nHelper = NULL; @@ -2699,87 +2699,56 @@ void AllSettings::CopyData() } -sal_uLong AllSettings::Update( sal_uLong nFlags, const AllSettings& rSet ) +AllSettingsFlags AllSettings::Update( AllSettingsFlags nFlags, const AllSettings& rSet ) { - sal_uLong nChangeFlags = 0; + AllSettingsFlags nChangeFlags = AllSettingsFlags::NONE; - if ( nFlags & SETTINGS_MOUSE ) - { - if ( mpData->maMouseSettings != rSet.mpData->maMouseSettings ) - { - CopyData(); - mpData->maMouseSettings = rSet.mpData->maMouseSettings; - nChangeFlags |= SETTINGS_MOUSE; - } - } - - if ( nFlags & SETTINGS_STYLE ) + if ( nFlags & AllSettingsFlags::STYLE ) { if ( mpData->maStyleSettings != rSet.mpData->maStyleSettings ) { CopyData(); mpData->maStyleSettings = rSet.mpData->maStyleSettings; - nChangeFlags |= SETTINGS_STYLE; + nChangeFlags |= AllSettingsFlags::STYLE; } } - if ( nFlags & SETTINGS_MISC ) + if ( nFlags & AllSettingsFlags::MISC ) { if ( mpData->maMiscSettings != rSet.mpData->maMiscSettings ) { CopyData(); mpData->maMiscSettings = rSet.mpData->maMiscSettings; - nChangeFlags |= SETTINGS_MISC; - } - } - - if ( nFlags & SETTINGS_HELP ) - { - if ( mpData->maHelpSettings != rSet.mpData->maHelpSettings ) - { - CopyData(); - mpData->maHelpSettings = rSet.mpData->maHelpSettings; - nChangeFlags |= SETTINGS_HELP; + nChangeFlags |= AllSettingsFlags::MISC; } } - if ( nFlags & SETTINGS_LOCALE ) + if ( nFlags & AllSettingsFlags::LOCALE ) { if ( mpData->maLocale != rSet.mpData->maLocale ) { SetLanguageTag( rSet.mpData->maLocale ); - nChangeFlags |= SETTINGS_LOCALE; + nChangeFlags |= AllSettingsFlags::LOCALE; } } - if ( nFlags & SETTINGS_UILOCALE ) - { - // UILocale can't be changed - } - return nChangeFlags; } -sal_uLong AllSettings::GetChangeFlags( const AllSettings& rSet ) const +AllSettingsFlags AllSettings::GetChangeFlags( const AllSettings& rSet ) const { - sal_uLong nChangeFlags = 0; - - if ( mpData->maMouseSettings != rSet.mpData->maMouseSettings ) - nChangeFlags |= SETTINGS_MOUSE; + AllSettingsFlags nChangeFlags = AllSettingsFlags::NONE; if ( mpData->maStyleSettings != rSet.mpData->maStyleSettings ) - nChangeFlags |= SETTINGS_STYLE; + nChangeFlags |= AllSettingsFlags::STYLE; if ( mpData->maMiscSettings != rSet.mpData->maMiscSettings ) - nChangeFlags |= SETTINGS_MISC; - - if ( mpData->maHelpSettings != rSet.mpData->maHelpSettings ) - nChangeFlags |= SETTINGS_HELP; + nChangeFlags |= AllSettingsFlags::MISC; if ( mpData->maLocale != rSet.mpData->maLocale ) - nChangeFlags |= SETTINGS_LOCALE; + nChangeFlags |= AllSettingsFlags::LOCALE; return nChangeFlags; } @@ -3076,7 +3045,7 @@ AllSettings::GetHelpSettings() const return mpData->maHelpSettings; } -sal_uLong +AllSettingsFlags AllSettings::GetWindowUpdate() const { return mpData->mnWindowUpdate; diff --git a/vcl/source/app/svapp.cxx b/vcl/source/app/svapp.cxx index 55cc90811299..c02f0a93a138 100644 --- a/vcl/source/app/svapp.cxx +++ b/vcl/source/app/svapp.cxx @@ -511,8 +511,8 @@ void Application::SetSettings( const AllSettings& rSettings ) } ResMgr::SetDefaultLocale( rSettings.GetUILanguageTag() ); *pSVData->maAppData.mpSettings = rSettings; - sal_uLong nChangeFlags = aOldSettings.GetChangeFlags( *pSVData->maAppData.mpSettings ); - if ( nChangeFlags ) + AllSettingsFlags nChangeFlags = aOldSettings.GetChangeFlags( *pSVData->maAppData.mpSettings ); + if ( bool(nChangeFlags) ) { DataChangedEvent aDCEvt( DataChangedEventType::SETTINGS, &aOldSettings, nChangeFlags ); diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx index a2ad12efd1c1..be4b464d0574 100644 --- a/vcl/source/control/button.cxx +++ b/vcl/source/control/button.cxx @@ -1485,7 +1485,7 @@ void PushButton::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)) ) { ImplInitSettings( true, true, true ); Invalidate(); @@ -2600,7 +2600,7 @@ void RadioButton::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)) ) { ImplInitSettings( true, true, true ); Invalidate(); @@ -3534,7 +3534,7 @@ void CheckBox::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)) ) { ImplInitSettings( true, true, true ); Invalidate(); diff --git a/vcl/source/control/combobox.cxx b/vcl/source/control/combobox.cxx index d3998e2ffb82..44be889f717d 100644 --- a/vcl/source/control/combobox.cxx +++ b/vcl/source/control/combobox.cxx @@ -669,7 +669,7 @@ void ComboBox::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 ( mpBtn ) { diff --git a/vcl/source/control/edit.cxx b/vcl/source/control/edit.cxx index 9aefbd513f90..d525fe83992b 100644 --- a/vcl/source/control/edit.cxx +++ b/vcl/source/control/edit.cxx @@ -2296,7 +2296,7 @@ void Edit::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 ( !mpSubEdit ) { diff --git a/vcl/source/control/field.cxx b/vcl/source/control/field.cxx index 874b2d90d770..23681d6a1c52 100644 --- a/vcl/source/control/field.cxx +++ b/vcl/source/control/field.cxx @@ -798,7 +798,7 @@ void NumericField::DataChanged( const DataChangedEvent& rDCEvt ) { SpinField::DataChanged( rDCEvt ); - if ( (rDCEvt.GetType() == DataChangedEventType::SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_LOCALE) ) + if ( (rDCEvt.GetType() == DataChangedEventType::SETTINGS) && (rDCEvt.GetFlags() & AllSettingsFlags::LOCALE) ) { OUString sOldDecSep = ImplGetLocaleDataWrapper().getNumDecimalSep(); OUString sOldThSep = ImplGetLocaleDataWrapper().getNumThousandSep(); @@ -935,7 +935,7 @@ void NumericBox::DataChanged( const DataChangedEvent& rDCEvt ) { ComboBox::DataChanged( rDCEvt ); - if ( (rDCEvt.GetType() == DataChangedEventType::SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_LOCALE) ) + if ( (rDCEvt.GetType() == DataChangedEventType::SETTINGS) && (rDCEvt.GetFlags() & AllSettingsFlags::LOCALE) ) { OUString sOldDecSep = ImplGetLocaleDataWrapper().getNumDecimalSep(); OUString sOldThSep = ImplGetLocaleDataWrapper().getNumThousandSep(); @@ -1681,7 +1681,7 @@ void MetricField::DataChanged( const DataChangedEvent& rDCEvt ) { SpinField::DataChanged( rDCEvt ); - if ( (rDCEvt.GetType() == DataChangedEventType::SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_LOCALE) ) + if ( (rDCEvt.GetType() == DataChangedEventType::SETTINGS) && (rDCEvt.GetFlags() & AllSettingsFlags::LOCALE) ) { OUString sOldDecSep = ImplGetLocaleDataWrapper().getNumDecimalSep(); OUString sOldThSep = ImplGetLocaleDataWrapper().getNumThousandSep(); @@ -1782,7 +1782,7 @@ void MetricBox::DataChanged( const DataChangedEvent& rDCEvt ) { ComboBox::DataChanged( rDCEvt ); - if ( (rDCEvt.GetType() == DataChangedEventType::SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_LOCALE) ) + if ( (rDCEvt.GetType() == DataChangedEventType::SETTINGS) && (rDCEvt.GetFlags() & AllSettingsFlags::LOCALE) ) { OUString sOldDecSep = ImplGetLocaleDataWrapper().getNumDecimalSep(); OUString sOldThSep = ImplGetLocaleDataWrapper().getNumThousandSep(); @@ -2012,7 +2012,7 @@ void CurrencyField::DataChanged( const DataChangedEvent& rDCEvt ) { SpinField::DataChanged( rDCEvt ); - if ( (rDCEvt.GetType() == DataChangedEventType::SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_LOCALE) ) + if ( (rDCEvt.GetType() == DataChangedEventType::SETTINGS) && (rDCEvt.GetFlags() & AllSettingsFlags::LOCALE) ) { OUString sOldDecSep = ImplGetLocaleDataWrapper().getNumDecimalSep(); OUString sOldThSep = ImplGetLocaleDataWrapper().getNumThousandSep(); @@ -2094,7 +2094,7 @@ void CurrencyBox::DataChanged( const DataChangedEvent& rDCEvt ) { ComboBox::DataChanged( rDCEvt ); - if ( (rDCEvt.GetType() == DataChangedEventType::SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_LOCALE) ) + if ( (rDCEvt.GetType() == DataChangedEventType::SETTINGS) && (rDCEvt.GetFlags() & AllSettingsFlags::LOCALE) ) { OUString sOldDecSep = ImplGetLocaleDataWrapper().getNumDecimalSep(); OUString sOldThSep = ImplGetLocaleDataWrapper().getNumThousandSep(); diff --git a/vcl/source/control/field2.cxx b/vcl/source/control/field2.cxx index 6cff1c002490..759b3f6b405e 100644 --- a/vcl/source/control/field2.cxx +++ b/vcl/source/control/field2.cxx @@ -1794,9 +1794,9 @@ void DateField::DataChanged( const DataChangedEvent& rDCEvt ) { SpinField::DataChanged( rDCEvt ); - if ( (rDCEvt.GetType() == DataChangedEventType::SETTINGS) && (rDCEvt.GetFlags() & (SETTINGS_LOCALE|SETTINGS_MISC)) ) + if ( (rDCEvt.GetType() == DataChangedEventType::SETTINGS) && (rDCEvt.GetFlags() & (AllSettingsFlags::LOCALE|AllSettingsFlags::MISC)) ) { - if ( IsDefaultLocale() && ( rDCEvt.GetFlags() & SETTINGS_LOCALE ) ) + if ( IsDefaultLocale() && ( rDCEvt.GetFlags() & AllSettingsFlags::LOCALE ) ) ImplGetLocaleDataWrapper().setLanguageTag( GetSettings().GetLanguageTag() ); ReformatAll(); } @@ -1861,7 +1861,7 @@ void DateBox::DataChanged( const DataChangedEvent& rDCEvt ) { ComboBox::DataChanged( rDCEvt ); - if ( (rDCEvt.GetType() == DataChangedEventType::SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_LOCALE) ) + if ( (rDCEvt.GetType() == DataChangedEventType::SETTINGS) && (rDCEvt.GetFlags() & AllSettingsFlags::LOCALE) ) { if ( IsDefaultLocale() ) ImplGetLocaleDataWrapper().setLanguageTag( GetSettings().GetLanguageTag() ); @@ -2574,7 +2574,7 @@ void TimeField::DataChanged( const DataChangedEvent& rDCEvt ) { SpinField::DataChanged( rDCEvt ); - if ( (rDCEvt.GetType() == DataChangedEventType::SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_LOCALE) ) + if ( (rDCEvt.GetType() == DataChangedEventType::SETTINGS) && (rDCEvt.GetFlags() & AllSettingsFlags::LOCALE) ) { if ( IsDefaultLocale() ) ImplGetLocaleDataWrapper().setLanguageTag( GetSettings().GetLanguageTag() ); @@ -2704,7 +2704,7 @@ void TimeBox::DataChanged( const DataChangedEvent& rDCEvt ) { ComboBox::DataChanged( rDCEvt ); - if ( (rDCEvt.GetType() == DataChangedEventType::SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_LOCALE) ) + if ( (rDCEvt.GetType() == DataChangedEventType::SETTINGS) && (rDCEvt.GetFlags() & AllSettingsFlags::LOCALE) ) { if ( IsDefaultLocale() ) ImplGetLocaleDataWrapper().setLanguageTag( GetSettings().GetLanguageTag() ); diff --git a/vcl/source/control/fixed.cxx b/vcl/source/control/fixed.cxx index 1f0bc50e0216..0f1bb2a7911d 100644 --- a/vcl/source/control/fixed.cxx +++ b/vcl/source/control/fixed.cxx @@ -329,7 +329,7 @@ void FixedText::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)) ) { ImplInitSettings( true, true, true ); Invalidate(); @@ -693,7 +693,7 @@ void FixedLine::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)) ) { ImplInitSettings( true, true, true ); Invalidate(); @@ -832,7 +832,7 @@ void FixedBitmap::DataChanged( const DataChangedEvent& rDCEvt ) Control::DataChanged( rDCEvt ); if ( (rDCEvt.GetType() == DataChangedEventType::SETTINGS) && - (rDCEvt.GetFlags() & SETTINGS_STYLE) ) + (rDCEvt.GetFlags() & AllSettingsFlags::STYLE) ) { ImplInitSettings(); Invalidate(); @@ -1020,7 +1020,7 @@ void FixedImage::DataChanged( const DataChangedEvent& rDCEvt ) Control::DataChanged( rDCEvt ); if ( (rDCEvt.GetType() == DataChangedEventType::SETTINGS) && - (rDCEvt.GetFlags() & SETTINGS_STYLE) ) + (rDCEvt.GetFlags() & AllSettingsFlags::STYLE) ) { ImplInitSettings(); Invalidate(); diff --git a/vcl/source/control/group.cxx b/vcl/source/control/group.cxx index 61d72a38aa1a..209bd14d9a9b 100644 --- a/vcl/source/control/group.cxx +++ b/vcl/source/control/group.cxx @@ -262,7 +262,7 @@ void GroupBox::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)) ) { ImplInitSettings( true, true, true ); Invalidate(); diff --git a/vcl/source/control/ilstbox.cxx b/vcl/source/control/ilstbox.cxx index 0c0051ca7037..8b6af6a6f2ba 100644 --- a/vcl/source/control/ilstbox.cxx +++ b/vcl/source/control/ilstbox.cxx @@ -2103,7 +2103,7 @@ void ImplListBoxWindow::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)) ) { ImplClearLayoutData(); ImplInitSettings( true, true, true ); diff --git a/vcl/source/control/lstbox.cxx b/vcl/source/control/lstbox.cxx index 217d5ebea621..4b91eddf0d83 100644 --- a/vcl/source/control/lstbox.cxx +++ b/vcl/source/control/lstbox.cxx @@ -533,7 +533,7 @@ void ListBox::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)) ) { SetBackground(); // Due to a hack in Window::UpdateSettings the background must be reset // otherwise it will overpaint NWF drawn listboxes diff --git a/vcl/source/control/prgsbar.cxx b/vcl/source/control/prgsbar.cxx index 07ce086184e7..d6443cd16515 100644 --- a/vcl/source/control/prgsbar.cxx +++ b/vcl/source/control/prgsbar.cxx @@ -210,7 +210,7 @@ void ProgressBar::StateChanged( StateChangedType nType ) void ProgressBar::DataChanged( const DataChangedEvent& rDCEvt ) { if ( (rDCEvt.GetType() == DataChangedEventType::SETTINGS) && - (rDCEvt.GetFlags() & SETTINGS_STYLE) ) + (rDCEvt.GetFlags() & AllSettingsFlags::STYLE) ) { ImplInitSettings( true, true, true ); Invalidate(); diff --git a/vcl/source/control/scrbar.cxx b/vcl/source/control/scrbar.cxx index 5901a8dc85fd..98d753363f18 100644 --- a/vcl/source/control/scrbar.cxx +++ b/vcl/source/control/scrbar.cxx @@ -1221,7 +1221,7 @@ void ScrollBar::DataChanged( const DataChangedEvent& rDCEvt ) Control::DataChanged( rDCEvt ); if ( (rDCEvt.GetType() == DataChangedEventType::SETTINGS) && - (rDCEvt.GetFlags() & SETTINGS_STYLE) ) + (rDCEvt.GetFlags() & AllSettingsFlags::STYLE) ) { mbCalcSize = true; ImplCalc( false ); @@ -1489,7 +1489,7 @@ void ScrollBarBox::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/control/slider.cxx b/vcl/source/control/slider.cxx index 56fbd46c9059..4ef2adcb1ae2 100644 --- a/vcl/source/control/slider.cxx +++ b/vcl/source/control/slider.cxx @@ -876,7 +876,7 @@ void Slider::DataChanged( const DataChangedEvent& rDCEvt ) Control::DataChanged( rDCEvt ); if ( (rDCEvt.GetType() == DataChangedEventType::SETTINGS) && - (rDCEvt.GetFlags() & SETTINGS_STYLE) ) + (rDCEvt.GetFlags() & AllSettingsFlags::STYLE) ) { ImplInitSettings(); Invalidate(); diff --git a/vcl/source/control/spinfld.cxx b/vcl/source/control/spinfld.cxx index 1842f7a9b632..85aa37b07769 100644 --- a/vcl/source/control/spinfld.cxx +++ b/vcl/source/control/spinfld.cxx @@ -835,7 +835,7 @@ void SpinField::DataChanged( const DataChangedEvent& rDCEvt ) Edit::DataChanged( rDCEvt ); if ( (rDCEvt.GetType() == DataChangedEventType::SETTINGS) && - (rDCEvt.GetFlags() & SETTINGS_STYLE) ) + (rDCEvt.GetFlags() & AllSettingsFlags::STYLE) ) { Resize(); Invalidate(); diff --git a/vcl/source/control/tabctrl.cxx b/vcl/source/control/tabctrl.cxx index ec333e5f02b2..27f517990c7c 100644 --- a/vcl/source/control/tabctrl.cxx +++ b/vcl/source/control/tabctrl.cxx @@ -1504,7 +1504,7 @@ void TabControl::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)) ) { ImplInitSettings( true, true, true ); Invalidate(); diff --git a/vcl/source/edit/vclmedit.cxx b/vcl/source/edit/vclmedit.cxx index 89e4933cd3ff..d27d72328780 100644 --- a/vcl/source/edit/vclmedit.cxx +++ b/vcl/source/edit/vclmedit.cxx @@ -1286,7 +1286,7 @@ void VclMultiLineEdit::StateChanged( StateChangedType nType ) void VclMultiLineEdit::DataChanged( const DataChangedEvent& rDCEvt ) { if ( (rDCEvt.GetType() == DataChangedEventType::SETTINGS) && - (rDCEvt.GetFlags() & SETTINGS_STYLE) ) + (rDCEvt.GetFlags() & AllSettingsFlags::STYLE) ) { ImplInitSettings( true, true, true ); Resize(); 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 |