diff options
author | Noel Grandin <noel@peralex.com> | 2015-01-09 16:29:43 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-01-12 12:57:04 +0200 |
commit | a5b5ad9f9306d868430ed9efd210b95c24a15161 (patch) | |
tree | d028638ef38e1e7a062944923b0db1fd6f03d3f5 /vcl | |
parent | 4b8f1dc1c8635c412b4669101e8871fa0cf26ff9 (diff) |
fdo#84938: replace DATACHANGED_ constants with 'enum class'
and drop DATACHANGED_DATETIME because no-one is using it
Change-Id: Id5ac9a7fbba0e35501ed82e5252f66858621f7ff
Diffstat (limited to 'vcl')
34 files changed, 92 insertions, 92 deletions
diff --git a/vcl/source/app/svapp.cxx b/vcl/source/app/svapp.cxx index ed8cd9f13942..55cc90811299 100644 --- a/vcl/source/app/svapp.cxx +++ b/vcl/source/app/svapp.cxx @@ -514,7 +514,7 @@ void Application::SetSettings( const AllSettings& rSettings ) sal_uLong nChangeFlags = aOldSettings.GetChangeFlags( *pSVData->maAppData.mpSettings ); if ( nChangeFlags ) { - DataChangedEvent aDCEvt( DATACHANGED_SETTINGS, &aOldSettings, nChangeFlags ); + DataChangedEvent aDCEvt( DataChangedEventType::SETTINGS, &aOldSettings, nChangeFlags ); // notify data change handler ImplCallEventListeners( VCLEVENT_APPLICATION_DATACHANGED, NULL, &aDCEvt); diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx index 4978659b67eb..a2ad12efd1c1 100644 --- a/vcl/source/control/button.cxx +++ b/vcl/source/control/button.cxx @@ -1482,9 +1482,9 @@ void PushButton::DataChanged( const DataChangedEvent& rDCEvt ) { Button::DataChanged( rDCEvt ); - if ( (rDCEvt.GetType() == DATACHANGED_FONTS) || - (rDCEvt.GetType() == DATACHANGED_FONTSUBSTITUTION) || - ((rDCEvt.GetType() == DATACHANGED_SETTINGS) && + if ( (rDCEvt.GetType() == DataChangedEventType::FONTS) || + (rDCEvt.GetType() == DataChangedEventType::FONTSUBSTITUTION) || + ((rDCEvt.GetType() == DataChangedEventType::SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_STYLE)) ) { ImplInitSettings( true, true, true ); @@ -2597,9 +2597,9 @@ void RadioButton::DataChanged( const DataChangedEvent& rDCEvt ) { Button::DataChanged( rDCEvt ); - if ( (rDCEvt.GetType() == DATACHANGED_FONTS) || - (rDCEvt.GetType() == DATACHANGED_FONTSUBSTITUTION) || - ((rDCEvt.GetType() == DATACHANGED_SETTINGS) && + if ( (rDCEvt.GetType() == DataChangedEventType::FONTS) || + (rDCEvt.GetType() == DataChangedEventType::FONTSUBSTITUTION) || + ((rDCEvt.GetType() == DataChangedEventType::SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_STYLE)) ) { ImplInitSettings( true, true, true ); @@ -3531,9 +3531,9 @@ void CheckBox::DataChanged( const DataChangedEvent& rDCEvt ) { Button::DataChanged( rDCEvt ); - if ( (rDCEvt.GetType() == DATACHANGED_FONTS) || - (rDCEvt.GetType() == DATACHANGED_FONTSUBSTITUTION) || - ((rDCEvt.GetType() == DATACHANGED_SETTINGS) && + if ( (rDCEvt.GetType() == DataChangedEventType::FONTS) || + (rDCEvt.GetType() == DataChangedEventType::FONTSUBSTITUTION) || + ((rDCEvt.GetType() == DataChangedEventType::SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_STYLE)) ) { ImplInitSettings( true, true, true ); diff --git a/vcl/source/control/combobox.cxx b/vcl/source/control/combobox.cxx index fe7ba1c7636a..d3998e2ffb82 100644 --- a/vcl/source/control/combobox.cxx +++ b/vcl/source/control/combobox.cxx @@ -666,9 +666,9 @@ void ComboBox::DataChanged( const DataChangedEvent& rDCEvt ) { Control::DataChanged( rDCEvt ); - if ( (rDCEvt.GetType() == DATACHANGED_FONTS) || - (rDCEvt.GetType() == DATACHANGED_FONTSUBSTITUTION) || - ((rDCEvt.GetType() == DATACHANGED_SETTINGS) && + if ( (rDCEvt.GetType() == DataChangedEventType::FONTS) || + (rDCEvt.GetType() == DataChangedEventType::FONTSUBSTITUTION) || + ((rDCEvt.GetType() == DataChangedEventType::SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_STYLE)) ) { if ( mpBtn ) diff --git a/vcl/source/control/edit.cxx b/vcl/source/control/edit.cxx index b499dfd99305..9aefbd513f90 100644 --- a/vcl/source/control/edit.cxx +++ b/vcl/source/control/edit.cxx @@ -2293,9 +2293,9 @@ void Edit::StateChanged( StateChangedType nType ) void Edit::DataChanged( const DataChangedEvent& rDCEvt ) { - if ( (rDCEvt.GetType() == DATACHANGED_FONTS) || - (rDCEvt.GetType() == DATACHANGED_FONTSUBSTITUTION) || - ((rDCEvt.GetType() == DATACHANGED_SETTINGS) && + if ( (rDCEvt.GetType() == DataChangedEventType::FONTS) || + (rDCEvt.GetType() == DataChangedEventType::FONTSUBSTITUTION) || + ((rDCEvt.GetType() == DataChangedEventType::SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_STYLE)) ) { if ( !mpSubEdit ) diff --git a/vcl/source/control/field.cxx b/vcl/source/control/field.cxx index 18d4d881e1a1..874b2d90d770 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() == DATACHANGED_SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_LOCALE) ) + if ( (rDCEvt.GetType() == DataChangedEventType::SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_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() == DATACHANGED_SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_LOCALE) ) + if ( (rDCEvt.GetType() == DataChangedEventType::SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_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() == DATACHANGED_SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_LOCALE) ) + if ( (rDCEvt.GetType() == DataChangedEventType::SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_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() == DATACHANGED_SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_LOCALE) ) + if ( (rDCEvt.GetType() == DataChangedEventType::SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_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() == DATACHANGED_SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_LOCALE) ) + if ( (rDCEvt.GetType() == DataChangedEventType::SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_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() == DATACHANGED_SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_LOCALE) ) + if ( (rDCEvt.GetType() == DataChangedEventType::SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_LOCALE) ) { OUString sOldDecSep = ImplGetLocaleDataWrapper().getNumDecimalSep(); OUString sOldThSep = ImplGetLocaleDataWrapper().getNumThousandSep(); diff --git a/vcl/source/control/field2.cxx b/vcl/source/control/field2.cxx index 185ba22c4a24..6cff1c002490 100644 --- a/vcl/source/control/field2.cxx +++ b/vcl/source/control/field2.cxx @@ -1794,7 +1794,7 @@ void DateField::DataChanged( const DataChangedEvent& rDCEvt ) { SpinField::DataChanged( rDCEvt ); - if ( (rDCEvt.GetType() == DATACHANGED_SETTINGS) && (rDCEvt.GetFlags() & (SETTINGS_LOCALE|SETTINGS_MISC)) ) + if ( (rDCEvt.GetType() == DataChangedEventType::SETTINGS) && (rDCEvt.GetFlags() & (SETTINGS_LOCALE|SETTINGS_MISC)) ) { if ( IsDefaultLocale() && ( rDCEvt.GetFlags() & SETTINGS_LOCALE ) ) ImplGetLocaleDataWrapper().setLanguageTag( GetSettings().GetLanguageTag() ); @@ -1861,7 +1861,7 @@ void DateBox::DataChanged( const DataChangedEvent& rDCEvt ) { ComboBox::DataChanged( rDCEvt ); - if ( (rDCEvt.GetType() == DATACHANGED_SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_LOCALE) ) + if ( (rDCEvt.GetType() == DataChangedEventType::SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_LOCALE) ) { if ( IsDefaultLocale() ) ImplGetLocaleDataWrapper().setLanguageTag( GetSettings().GetLanguageTag() ); @@ -2574,7 +2574,7 @@ void TimeField::DataChanged( const DataChangedEvent& rDCEvt ) { SpinField::DataChanged( rDCEvt ); - if ( (rDCEvt.GetType() == DATACHANGED_SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_LOCALE) ) + if ( (rDCEvt.GetType() == DataChangedEventType::SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_LOCALE) ) { if ( IsDefaultLocale() ) ImplGetLocaleDataWrapper().setLanguageTag( GetSettings().GetLanguageTag() ); @@ -2704,7 +2704,7 @@ void TimeBox::DataChanged( const DataChangedEvent& rDCEvt ) { ComboBox::DataChanged( rDCEvt ); - if ( (rDCEvt.GetType() == DATACHANGED_SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_LOCALE) ) + if ( (rDCEvt.GetType() == DataChangedEventType::SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_LOCALE) ) { if ( IsDefaultLocale() ) ImplGetLocaleDataWrapper().setLanguageTag( GetSettings().GetLanguageTag() ); diff --git a/vcl/source/control/fixed.cxx b/vcl/source/control/fixed.cxx index 0dc4705428ce..1f0bc50e0216 100644 --- a/vcl/source/control/fixed.cxx +++ b/vcl/source/control/fixed.cxx @@ -326,9 +326,9 @@ void FixedText::DataChanged( const DataChangedEvent& rDCEvt ) { Control::DataChanged( rDCEvt ); - if ( (rDCEvt.GetType() == DATACHANGED_FONTS) || - (rDCEvt.GetType() == DATACHANGED_FONTSUBSTITUTION) || - ((rDCEvt.GetType() == DATACHANGED_SETTINGS) && + if ( (rDCEvt.GetType() == DataChangedEventType::FONTS) || + (rDCEvt.GetType() == DataChangedEventType::FONTSUBSTITUTION) || + ((rDCEvt.GetType() == DataChangedEventType::SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_STYLE)) ) { ImplInitSettings( true, true, true ); @@ -690,9 +690,9 @@ void FixedLine::DataChanged( const DataChangedEvent& rDCEvt ) { Control::DataChanged( rDCEvt ); - if ( (rDCEvt.GetType() == DATACHANGED_FONTS) || - (rDCEvt.GetType() == DATACHANGED_FONTSUBSTITUTION) || - ((rDCEvt.GetType() == DATACHANGED_SETTINGS) && + if ( (rDCEvt.GetType() == DataChangedEventType::FONTS) || + (rDCEvt.GetType() == DataChangedEventType::FONTSUBSTITUTION) || + ((rDCEvt.GetType() == DataChangedEventType::SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_STYLE)) ) { ImplInitSettings( true, true, true ); @@ -831,7 +831,7 @@ void FixedBitmap::DataChanged( const DataChangedEvent& rDCEvt ) { Control::DataChanged( rDCEvt ); - if ( (rDCEvt.GetType() == DATACHANGED_SETTINGS) && + if ( (rDCEvt.GetType() == DataChangedEventType::SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_STYLE) ) { ImplInitSettings(); @@ -1019,7 +1019,7 @@ void FixedImage::DataChanged( const DataChangedEvent& rDCEvt ) { Control::DataChanged( rDCEvt ); - if ( (rDCEvt.GetType() == DATACHANGED_SETTINGS) && + if ( (rDCEvt.GetType() == DataChangedEventType::SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_STYLE) ) { ImplInitSettings(); diff --git a/vcl/source/control/group.cxx b/vcl/source/control/group.cxx index 5fa38b242244..61d72a38aa1a 100644 --- a/vcl/source/control/group.cxx +++ b/vcl/source/control/group.cxx @@ -259,9 +259,9 @@ void GroupBox::DataChanged( const DataChangedEvent& rDCEvt ) { Control::DataChanged( rDCEvt ); - if ( (rDCEvt.GetType() == DATACHANGED_FONTS) || - (rDCEvt.GetType() == DATACHANGED_FONTSUBSTITUTION) || - ((rDCEvt.GetType() == DATACHANGED_SETTINGS) && + if ( (rDCEvt.GetType() == DataChangedEventType::FONTS) || + (rDCEvt.GetType() == DataChangedEventType::FONTSUBSTITUTION) || + ((rDCEvt.GetType() == DataChangedEventType::SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_STYLE)) ) { ImplInitSettings( true, true, true ); diff --git a/vcl/source/control/ilstbox.cxx b/vcl/source/control/ilstbox.cxx index fbdd66245867..0c0051ca7037 100644 --- a/vcl/source/control/ilstbox.cxx +++ b/vcl/source/control/ilstbox.cxx @@ -2100,9 +2100,9 @@ void ImplListBoxWindow::DataChanged( const DataChangedEvent& rDCEvt ) { Control::DataChanged( rDCEvt ); - if ( (rDCEvt.GetType() == DATACHANGED_FONTS) || - (rDCEvt.GetType() == DATACHANGED_FONTSUBSTITUTION) || - ((rDCEvt.GetType() == DATACHANGED_SETTINGS) && + if ( (rDCEvt.GetType() == DataChangedEventType::FONTS) || + (rDCEvt.GetType() == DataChangedEventType::FONTSUBSTITUTION) || + ((rDCEvt.GetType() == DataChangedEventType::SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_STYLE)) ) { ImplClearLayoutData(); diff --git a/vcl/source/control/lstbox.cxx b/vcl/source/control/lstbox.cxx index 96d0951438f8..217d5ebea621 100644 --- a/vcl/source/control/lstbox.cxx +++ b/vcl/source/control/lstbox.cxx @@ -530,9 +530,9 @@ void ListBox::DataChanged( const DataChangedEvent& rDCEvt ) { Control::DataChanged( rDCEvt ); - if ( (rDCEvt.GetType() == DATACHANGED_FONTS) || - (rDCEvt.GetType() == DATACHANGED_FONTSUBSTITUTION) || - ((rDCEvt.GetType() == DATACHANGED_SETTINGS) && + if ( (rDCEvt.GetType() == DataChangedEventType::FONTS) || + (rDCEvt.GetType() == DataChangedEventType::FONTSUBSTITUTION) || + ((rDCEvt.GetType() == DataChangedEventType::SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_STYLE)) ) { SetBackground(); // Due to a hack in Window::UpdateSettings the background must be reset diff --git a/vcl/source/control/prgsbar.cxx b/vcl/source/control/prgsbar.cxx index 4dc523c8aafb..07ce086184e7 100644 --- a/vcl/source/control/prgsbar.cxx +++ b/vcl/source/control/prgsbar.cxx @@ -209,7 +209,7 @@ void ProgressBar::StateChanged( StateChangedType nType ) void ProgressBar::DataChanged( const DataChangedEvent& rDCEvt ) { - if ( (rDCEvt.GetType() == DATACHANGED_SETTINGS) && + if ( (rDCEvt.GetType() == DataChangedEventType::SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_STYLE) ) { ImplInitSettings( true, true, true ); diff --git a/vcl/source/control/scrbar.cxx b/vcl/source/control/scrbar.cxx index 6026e09557d5..5901a8dc85fd 100644 --- a/vcl/source/control/scrbar.cxx +++ b/vcl/source/control/scrbar.cxx @@ -1220,7 +1220,7 @@ void ScrollBar::DataChanged( const DataChangedEvent& rDCEvt ) { Control::DataChanged( rDCEvt ); - if ( (rDCEvt.GetType() == DATACHANGED_SETTINGS) && + if ( (rDCEvt.GetType() == DataChangedEventType::SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_STYLE) ) { mbCalcSize = true; @@ -1488,7 +1488,7 @@ void ScrollBarBox::DataChanged( const DataChangedEvent& rDCEvt ) { Window::DataChanged( rDCEvt ); - if ( (rDCEvt.GetType() == DATACHANGED_SETTINGS) && + if ( (rDCEvt.GetType() == DataChangedEventType::SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_STYLE) ) { ImplInitSettings(); diff --git a/vcl/source/control/slider.cxx b/vcl/source/control/slider.cxx index e0832b509531..56fbd46c9059 100644 --- a/vcl/source/control/slider.cxx +++ b/vcl/source/control/slider.cxx @@ -875,7 +875,7 @@ void Slider::DataChanged( const DataChangedEvent& rDCEvt ) { Control::DataChanged( rDCEvt ); - if ( (rDCEvt.GetType() == DATACHANGED_SETTINGS) && + if ( (rDCEvt.GetType() == DataChangedEventType::SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_STYLE) ) { ImplInitSettings(); diff --git a/vcl/source/control/spinfld.cxx b/vcl/source/control/spinfld.cxx index 6c2a059dda13..1842f7a9b632 100644 --- a/vcl/source/control/spinfld.cxx +++ b/vcl/source/control/spinfld.cxx @@ -834,7 +834,7 @@ void SpinField::DataChanged( const DataChangedEvent& rDCEvt ) { Edit::DataChanged( rDCEvt ); - if ( (rDCEvt.GetType() == DATACHANGED_SETTINGS) && + if ( (rDCEvt.GetType() == DataChangedEventType::SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_STYLE) ) { Resize(); diff --git a/vcl/source/control/tabctrl.cxx b/vcl/source/control/tabctrl.cxx index 9825bab610be..ec333e5f02b2 100644 --- a/vcl/source/control/tabctrl.cxx +++ b/vcl/source/control/tabctrl.cxx @@ -1501,9 +1501,9 @@ void TabControl::DataChanged( const DataChangedEvent& rDCEvt ) { Control::DataChanged( rDCEvt ); - if ( (rDCEvt.GetType() == DATACHANGED_FONTS) || - (rDCEvt.GetType() == DATACHANGED_FONTSUBSTITUTION) || - ((rDCEvt.GetType() == DATACHANGED_SETTINGS) && + if ( (rDCEvt.GetType() == DataChangedEventType::FONTS) || + (rDCEvt.GetType() == DataChangedEventType::FONTSUBSTITUTION) || + ((rDCEvt.GetType() == DataChangedEventType::SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_STYLE)) ) { ImplInitSettings( true, true, true ); diff --git a/vcl/source/edit/vclmedit.cxx b/vcl/source/edit/vclmedit.cxx index c160340917b4..89e4933cd3ff 100644 --- a/vcl/source/edit/vclmedit.cxx +++ b/vcl/source/edit/vclmedit.cxx @@ -1285,7 +1285,7 @@ void VclMultiLineEdit::StateChanged( StateChangedType nType ) void VclMultiLineEdit::DataChanged( const DataChangedEvent& rDCEvt ) { - if ( (rDCEvt.GetType() == DATACHANGED_SETTINGS) && + if ( (rDCEvt.GetType() == DataChangedEventType::SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_STYLE) ) { ImplInitSettings( true, true, true ); diff --git a/vcl/source/gdi/print.cxx b/vcl/source/gdi/print.cxx index 4cdb39647dec..658363dff292 100644 --- a/vcl/source/gdi/print.cxx +++ b/vcl/source/gdi/print.cxx @@ -1798,7 +1798,7 @@ void Printer::updatePrinters() Application* pApp = GetpApp(); if( pApp ) { - DataChangedEvent aDCEvt( DATACHANGED_PRINTER ); + DataChangedEvent aDCEvt( DataChangedEventType::PRINTER ); Application::NotifyAllWindows( aDCEvt ); } } diff --git a/vcl/source/outdev/font.cxx b/vcl/source/outdev/font.cxx index 4b9f9c4bd38c..c2e820e4c0ab 100644 --- a/vcl/source/outdev/font.cxx +++ b/vcl/source/outdev/font.cxx @@ -648,7 +648,7 @@ void OutputDevice::EndFontSubstitution() { ImplUpdateAllFontData( false ); - DataChangedEvent aDCEvt( DATACHANGED_FONTSUBSTITUTION ); + DataChangedEvent aDCEvt( DataChangedEventType::FONTSUBSTITUTION ); Application::NotifyAllWindows( aDCEvt ); pSVData->maGDIData.mbFontSubChanged = false; } diff --git a/vcl/source/window/brdwin.cxx b/vcl/source/window/brdwin.cxx index 0e7f8c586703..f771a15c683f 100644 --- a/vcl/source/window/brdwin.cxx +++ b/vcl/source/window/brdwin.cxx @@ -1985,9 +1985,9 @@ void ImplBorderWindow::StateChanged( StateChangedType nType ) void ImplBorderWindow::DataChanged( const DataChangedEvent& rDCEvt ) { - if ( (rDCEvt.GetType() == DATACHANGED_FONTS) || - (rDCEvt.GetType() == DATACHANGED_FONTSUBSTITUTION) || - ((rDCEvt.GetType() == DATACHANGED_SETTINGS) && + if ( (rDCEvt.GetType() == DataChangedEventType::FONTS) || + (rDCEvt.GetType() == DataChangedEventType::FONTSUBSTITUTION) || + ((rDCEvt.GetType() == DataChangedEventType::SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_STYLE)) ) { if ( !mpWindowImpl->mbFrame || (GetStyle() & (WB_OWNERDRAWDECORATION | WB_POPUP)) ) diff --git a/vcl/source/window/dialog.cxx b/vcl/source/window/dialog.cxx index 33cdbf65efb5..a403126f9c6c 100644 --- a/vcl/source/window/dialog.cxx +++ b/vcl/source/window/dialog.cxx @@ -654,7 +654,7 @@ void Dialog::DataChanged( const DataChangedEvent& rDCEvt ) { SystemWindow::DataChanged( rDCEvt ); - if ( (rDCEvt.GetType() == DATACHANGED_SETTINGS) && + if ( (rDCEvt.GetType() == DataChangedEventType::SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_STYLE) ) { ImplInitSettings(); diff --git a/vcl/source/window/dockingarea.cxx b/vcl/source/window/dockingarea.cxx index a5fa39bd66ab..66c3681e8d17 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() == DATACHANGED_SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_STYLE) ) + if ( (rDCEvt.GetType() == DataChangedEventType::SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_STYLE) ) { ImplInitBackground( this ); Invalidate(); diff --git a/vcl/source/window/dockwin.cxx b/vcl/source/window/dockwin.cxx index 6d9186eca6ec..6bd629d36230 100644 --- a/vcl/source/window/dockwin.cxx +++ b/vcl/source/window/dockwin.cxx @@ -764,7 +764,7 @@ void DockingWindow::StateChanged( StateChangedType nType ) void DockingWindow::DataChanged( const DataChangedEvent& rDCEvt ) { - if ( (rDCEvt.GetType() == DATACHANGED_SETTINGS) && + if ( (rDCEvt.GetType() == DataChangedEventType::SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_STYLE) ) { ImplInitSettings(); diff --git a/vcl/source/window/floatwin.cxx b/vcl/source/window/floatwin.cxx index b1534ec7d2c4..2bfc01e30ced 100644 --- a/vcl/source/window/floatwin.cxx +++ b/vcl/source/window/floatwin.cxx @@ -555,7 +555,7 @@ void FloatingWindow::DataChanged( const DataChangedEvent& rDCEvt ) { SystemWindow::DataChanged( rDCEvt ); - if ( (rDCEvt.GetType() == DATACHANGED_SETTINGS) && + if ( (rDCEvt.GetType() == DataChangedEventType::SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_STYLE) ) { ImplInitSettings(); diff --git a/vcl/source/window/menubarwindow.cxx b/vcl/source/window/menubarwindow.cxx index eb3bf182e194..0beffbaf7854 100644 --- a/vcl/source/window/menubarwindow.cxx +++ b/vcl/source/window/menubarwindow.cxx @@ -1035,9 +1035,9 @@ void MenuBarWindow::DataChanged( const DataChangedEvent& rDCEvt ) { Window::DataChanged( rDCEvt ); - if ( (rDCEvt.GetType() == DATACHANGED_FONTS) || - (rDCEvt.GetType() == DATACHANGED_FONTSUBSTITUTION) || - ((rDCEvt.GetType() == DATACHANGED_SETTINGS) && + if ( (rDCEvt.GetType() == DataChangedEventType::FONTS) || + (rDCEvt.GetType() == DataChangedEventType::FONTSUBSTITUTION) || + ((rDCEvt.GetType() == DataChangedEventType::SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_STYLE)) ) { ImplInitStyleSettings(); diff --git a/vcl/source/window/menufloatingwindow.cxx b/vcl/source/window/menufloatingwindow.cxx index 0d28645229ca..e1ee5f7a857a 100644 --- a/vcl/source/window/menufloatingwindow.cxx +++ b/vcl/source/window/menufloatingwindow.cxx @@ -1170,9 +1170,9 @@ void MenuFloatingWindow::DataChanged( const DataChangedEvent& rDCEvt ) { FloatingWindow::DataChanged( rDCEvt ); - if ( (rDCEvt.GetType() == DATACHANGED_FONTS) || - (rDCEvt.GetType() == DATACHANGED_FONTSUBSTITUTION) || - ((rDCEvt.GetType() == DATACHANGED_SETTINGS) && + if ( (rDCEvt.GetType() == DataChangedEventType::FONTS) || + (rDCEvt.GetType() == DataChangedEventType::FONTSUBSTITUTION) || + ((rDCEvt.GetType() == DataChangedEventType::SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_STYLE)) ) { ImplInitMenuWindow( this, false, false ); diff --git a/vcl/source/window/printdlg.cxx b/vcl/source/window/printdlg.cxx index 715e75e2909d..0633409347d6 100644 --- a/vcl/source/window/printdlg.cxx +++ b/vcl/source/window/printdlg.cxx @@ -89,7 +89,7 @@ const sal_Int32 PrintDialog::PrintPreviewWindow::PREVIEW_BITMAP_WIDTH = 1600; void PrintDialog::PrintPreviewWindow::DataChanged( const DataChangedEvent& i_rDCEvt ) { // react on settings changed - if( i_rDCEvt.GetType() == DATACHANGED_SETTINGS ) + if( i_rDCEvt.GetType() == DataChangedEventType::SETTINGS ) { maPageVDev.SetBackground( Color( COL_WHITE ) ); } @@ -1190,7 +1190,7 @@ void PrintDialog::setupOptionalUI() void PrintDialog::DataChanged( const DataChangedEvent& i_rDCEvt ) { // react on settings changed - if( i_rDCEvt.GetType() == DATACHANGED_SETTINGS ) + if( i_rDCEvt.GetType() == DataChangedEventType::SETTINGS ) checkControlDependencies(); ModalDialog::DataChanged( i_rDCEvt ); } diff --git a/vcl/source/window/settings.cxx b/vcl/source/window/settings.cxx index 862626e2336d..d9a9b78d9d78 100644 --- a/vcl/source/window/settings.cxx +++ b/vcl/source/window/settings.cxx @@ -64,7 +64,7 @@ void Window::SetSettings( const AllSettings& rSettings, bool bChild ) if ( nChangeFlags ) { - DataChangedEvent aDCEvt( DATACHANGED_SETTINGS, &aOldSettings, nChangeFlags ); + DataChangedEvent aDCEvt( DataChangedEventType::SETTINGS, &aOldSettings, nChangeFlags ); DataChanged( aDCEvt ); } @@ -130,7 +130,7 @@ void Window::UpdateSettings( const AllSettings& rSettings, bool bChild ) if ( nChangeFlags ) { - DataChangedEvent aDCEvt( DATACHANGED_SETTINGS, &aOldSettings, nChangeFlags ); + DataChangedEvent aDCEvt( DataChangedEventType::SETTINGS, &aOldSettings, nChangeFlags ); DataChanged( aDCEvt ); // notify data change handler ImplCallEventListeners( VCLEVENT_WINDOW_DATACHANGED, &aDCEvt); diff --git a/vcl/source/window/split.cxx b/vcl/source/window/split.cxx index fe8a3f775fad..947dc986cf20 100644 --- a/vcl/source/window/split.cxx +++ b/vcl/source/window/split.cxx @@ -668,7 +668,7 @@ bool Splitter::Notify( NotifyEvent& rNEvt ) void Splitter::DataChanged( const DataChangedEvent& rDCEvt ) { Window::DataChanged( rDCEvt ); - if( rDCEvt.GetType() == DATACHANGED_SETTINGS ) + if( rDCEvt.GetType() == DataChangedEventType::SETTINGS ) { const AllSettings* pOldSettings = rDCEvt.GetOldSettings(); if(!pOldSettings) diff --git a/vcl/source/window/splitwin.cxx b/vcl/source/window/splitwin.cxx index 47976fd9be45..b488d63978fc 100644 --- a/vcl/source/window/splitwin.cxx +++ b/vcl/source/window/splitwin.cxx @@ -2622,7 +2622,7 @@ void SplitWindow::StateChanged( StateChangedType nType ) void SplitWindow::DataChanged( const DataChangedEvent& rDCEvt ) { - if ( (rDCEvt.GetType() == DATACHANGED_SETTINGS) && + if ( (rDCEvt.GetType() == DataChangedEventType::SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_STYLE) ) { ImplInitSettings(); diff --git a/vcl/source/window/status.cxx b/vcl/source/window/status.cxx index b3bc67193d57..82c49d4b7bf6 100644 --- a/vcl/source/window/status.cxx +++ b/vcl/source/window/status.cxx @@ -847,10 +847,10 @@ void StatusBar::DataChanged( const DataChangedEvent& rDCEvt ) { Window::DataChanged( rDCEvt ); - if ( (rDCEvt.GetType() == DATACHANGED_DISPLAY ) - || (rDCEvt.GetType() == DATACHANGED_FONTS ) - || (rDCEvt.GetType() == DATACHANGED_FONTSUBSTITUTION) - || ( (rDCEvt.GetType() == DATACHANGED_SETTINGS) + if ( (rDCEvt.GetType() == DataChangedEventType::DISPLAY ) + || (rDCEvt.GetType() == DataChangedEventType::FONTS ) + || (rDCEvt.GetType() == DataChangedEventType::FONTSUBSTITUTION) + || ( (rDCEvt.GetType() == DataChangedEventType::SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_STYLE ) ) ) diff --git a/vcl/source/window/tabpage.cxx b/vcl/source/window/tabpage.cxx index e23c91672762..b001bb4512ac 100644 --- a/vcl/source/window/tabpage.cxx +++ b/vcl/source/window/tabpage.cxx @@ -107,7 +107,7 @@ void TabPage::DataChanged( const DataChangedEvent& rDCEvt ) { Window::DataChanged( rDCEvt ); - if ( (rDCEvt.GetType() == DATACHANGED_SETTINGS) && + if ( (rDCEvt.GetType() == DataChangedEventType::SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_STYLE) ) { ImplInitSettings(); diff --git a/vcl/source/window/toolbox.cxx b/vcl/source/window/toolbox.cxx index 0654bffd906a..1f7c694fbabf 100644 --- a/vcl/source/window/toolbox.cxx +++ b/vcl/source/window/toolbox.cxx @@ -4451,10 +4451,10 @@ void ToolBox::DataChanged( const DataChangedEvent& rDCEvt ) { DockingWindow::DataChanged( rDCEvt ); - if ( (rDCEvt.GetType() == DATACHANGED_DISPLAY) || - (rDCEvt.GetType() == DATACHANGED_FONTS) || - (rDCEvt.GetType() == DATACHANGED_FONTSUBSTITUTION) || - ((rDCEvt.GetType() == DATACHANGED_SETTINGS) && + if ( (rDCEvt.GetType() == DataChangedEventType::DISPLAY) || + (rDCEvt.GetType() == DataChangedEventType::FONTS) || + (rDCEvt.GetType() == DataChangedEventType::FONTSUBSTITUTION) || + ((rDCEvt.GetType() == DataChangedEventType::SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_STYLE)) ) { mbCalc = true; diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx index 9c585d111d80..c4dc9afda607 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( DATACHANGED_SETTINGS, mxSettings.get(), SETTINGS_STYLE ); + DataChangedEvent aDCEvt( DataChangedEventType::SETTINGS, mxSettings.get(), SETTINGS_STYLE ); DataChanged( aDCEvt ); // sometimes the borderwindow is queried, so keep it in sync diff --git a/vcl/source/window/winproc.cxx b/vcl/source/window/winproc.cxx index 0f50b85efd3d..ec2526737eef 100644 --- a/vcl/source/window/winproc.cxx +++ b/vcl/source/window/winproc.cxx @@ -2105,35 +2105,35 @@ static void ImplHandleSalSettings( sal_uInt16 nEvent ) } else { - sal_uInt16 nType; + DataChangedEventType nType; switch ( nEvent ) { case SALEVENT_VOLUMECHANGED: - nType = 0; + nType = DataChangedEventType::NONE; break; case SALEVENT_PRINTERCHANGED: ImplDeletePrnQueueList(); - nType = DATACHANGED_PRINTER; + nType = DataChangedEventType::PRINTER; break; case SALEVENT_DISPLAYCHANGED: - nType = DATACHANGED_DISPLAY; + nType = DataChangedEventType::DISPLAY; break; case SALEVENT_FONTCHANGED: OutputDevice::ImplUpdateAllFontData( true ); - nType = DATACHANGED_FONTS; + nType = DataChangedEventType::FONTS; break; case SALEVENT_DATETIMECHANGED: - nType = DATACHANGED_DATETIME; + nType = DataChangedEventType::NONE; break; case SALEVENT_KEYBOARDCHANGED: - nType = 0; + nType = DataChangedEventType::NONE; break; default: - nType = 0; + nType = DataChangedEventType::NONE; break; } - if ( nType ) + if ( nType != DataChangedEventType::NONE ) { DataChangedEvent aDCEvt( nType ); Application::NotifyAllWindows( aDCEvt ); |