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 | |
parent | 4b8f1dc1c8635c412b4669101e8871fa0cf26ff9 (diff) |
fdo#84938: replace DATACHANGED_ constants with 'enum class'
and drop DATACHANGED_DATETIME because no-one is using it
Change-Id: Id5ac9a7fbba0e35501ed82e5252f66858621f7ff
157 files changed, 354 insertions, 346 deletions
diff --git a/basctl/source/basicide/baside2.cxx b/basctl/source/basicide/baside2.cxx index 1d2daa63eaac..6818d8124b84 100644 --- a/basctl/source/basicide/baside2.cxx +++ b/basctl/source/basicide/baside2.cxx @@ -1458,7 +1458,7 @@ void ModulWindowLayout::Paint (Rectangle const&) void ModulWindowLayout::DataChanged (DataChangedEvent const& rDCEvt) { Layout::DataChanged(rDCEvt); - if (rDCEvt.GetType() == DATACHANGED_SETTINGS && (rDCEvt.GetFlags() & SETTINGS_STYLE)) + if (rDCEvt.GetType() == DataChangedEventType::SETTINGS && (rDCEvt.GetFlags() & SETTINGS_STYLE)) aSyntaxColors.SettingsChanged(); } diff --git a/basctl/source/basicide/baside2b.cxx b/basctl/source/basicide/baside2b.cxx index cdd734d02452..1b8420bfcd7e 100644 --- a/basctl/source/basicide/baside2b.cxx +++ b/basctl/source/basicide/baside2b.cxx @@ -1024,7 +1024,7 @@ void EditorWindow::CreateEditEngine() void EditorWindow::DataChanged(DataChangedEvent const & rDCEvt) { Window::DataChanged(rDCEvt); - if (rDCEvt.GetType() == DATACHANGED_SETTINGS + if (rDCEvt.GetType() == DataChangedEventType::SETTINGS && (rDCEvt.GetFlags() & SETTINGS_STYLE) != 0) { Color aColor(GetSettings().GetStyleSettings().GetFieldColor()); @@ -1542,7 +1542,7 @@ bool BreakPointWindow::SyncYOffset() void BreakPointWindow::DataChanged(DataChangedEvent const & rDCEvt) { Window::DataChanged(rDCEvt); - if (rDCEvt.GetType() == DATACHANGED_SETTINGS + if (rDCEvt.GetType() == DataChangedEventType::SETTINGS && (rDCEvt.GetFlags() & SETTINGS_STYLE) != 0) { Color aColor(GetSettings().GetStyleSettings().GetFieldColor()); @@ -2065,7 +2065,7 @@ IMPL_LINK( ComplexEditorWindow, ScrollHdl, ScrollBar *, pCurScrollBar ) void ComplexEditorWindow::DataChanged(DataChangedEvent const & rDCEvt) { Window::DataChanged(rDCEvt); - if (rDCEvt.GetType() == DATACHANGED_SETTINGS + if (rDCEvt.GetType() == DataChangedEventType::SETTINGS && (rDCEvt.GetFlags() & SETTINGS_STYLE) != 0) { Color aColor(GetSettings().GetStyleSettings().GetFaceColor()); diff --git a/basctl/source/basicide/baside3.cxx b/basctl/source/basicide/baside3.cxx index 84e2ee5d6423..57b6592dec37 100644 --- a/basctl/source/basicide/baside3.cxx +++ b/basctl/source/basicide/baside3.cxx @@ -1351,7 +1351,7 @@ void DialogWindow::printPage( sal_Int32 nPage, Printer* pPrinter ) void DialogWindow::DataChanged( const DataChangedEvent& rDCEvt ) { - if( (rDCEvt.GetType()==DATACHANGED_SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_STYLE) ) + if( (rDCEvt.GetType()==DataChangedEventType::SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_STYLE) ) { InitSettings( true, true, true ); Invalidate(); diff --git a/basctl/source/basicide/layout.cxx b/basctl/source/basicide/layout.cxx index 50c9d5e41dc4..c4f4615ea09e 100644 --- a/basctl/source/basicide/layout.cxx +++ b/basctl/source/basicide/layout.cxx @@ -132,7 +132,7 @@ void Layout::Deactivating () void Layout::DataChanged (DataChangedEvent const& rDCEvt) { Window::DataChanged(rDCEvt); - if (rDCEvt.GetType() == DATACHANGED_SETTINGS && (rDCEvt.GetFlags() & SETTINGS_STYLE)) + if (rDCEvt.GetType() == DataChangedEventType::SETTINGS && (rDCEvt.GetFlags() & SETTINGS_STYLE)) { bool bInvalidate = false; Color aColor = GetSettings().GetStyleSettings().GetWindowColor(); diff --git a/basctl/source/basicide/linenumberwindow.cxx b/basctl/source/basicide/linenumberwindow.cxx index ff3b3d599c35..14872783f22d 100644 --- a/basctl/source/basicide/linenumberwindow.cxx +++ b/basctl/source/basicide/linenumberwindow.cxx @@ -78,7 +78,7 @@ void LineNumberWindow::Paint( const Rectangle& ) void LineNumberWindow::DataChanged(DataChangedEvent const & rDCEvt) { Window::DataChanged(rDCEvt); - if (rDCEvt.GetType() == DATACHANGED_SETTINGS + if (rDCEvt.GetType() == DataChangedEventType::SETTINGS && (rDCEvt.GetFlags() & SETTINGS_STYLE) != 0) { Color aColor(GetSettings().GetStyleSettings().GetFieldColor()); diff --git a/chart2/source/controller/dialogs/dlg_InsertErrorBars.cxx b/chart2/source/controller/dialogs/dlg_InsertErrorBars.cxx index fd7f0a0e03bb..004fec933383 100644 --- a/chart2/source/controller/dialogs/dlg_InsertErrorBars.cxx +++ b/chart2/source/controller/dialogs/dlg_InsertErrorBars.cxx @@ -70,7 +70,7 @@ void InsertErrorBarsDialog::DataChanged( const DataChangedEvent& rDCEvt ) { ModalDialog::DataChanged( rDCEvt ); - if ( (rDCEvt.GetType() == DATACHANGED_SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_STYLE) ) + if ( (rDCEvt.GetType() == DataChangedEventType::SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_STYLE) ) m_apErrorBarResources->FillValueSets(); } diff --git a/chart2/source/controller/dialogs/tp_ErrorBars.cxx b/chart2/source/controller/dialogs/tp_ErrorBars.cxx index 28280253b48f..c83c42f36614 100644 --- a/chart2/source/controller/dialogs/tp_ErrorBars.cxx +++ b/chart2/source/controller/dialogs/tp_ErrorBars.cxx @@ -61,7 +61,7 @@ void ErrorBarsTabPage::DataChanged( const DataChangedEvent& rDCEvt ) { SfxTabPage::DataChanged( rDCEvt ); - if ( (rDCEvt.GetType() == DATACHANGED_SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_STYLE) ) + if ( (rDCEvt.GetType() == DataChangedEventType::SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_STYLE) ) m_aErrorBarResources.FillValueSets(); } diff --git a/chart2/source/controller/dialogs/tp_Trendline.cxx b/chart2/source/controller/dialogs/tp_Trendline.cxx index d95a213dafa9..8b630931664a 100644 --- a/chart2/source/controller/dialogs/tp_Trendline.cxx +++ b/chart2/source/controller/dialogs/tp_Trendline.cxx @@ -55,7 +55,7 @@ void TrendlineTabPage::DataChanged( const DataChangedEvent& rDCEvt ) { SfxTabPage::DataChanged( rDCEvt ); - if ( (rDCEvt.GetType() == DATACHANGED_SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_STYLE) ) + if ( (rDCEvt.GetType() == DataChangedEventType::SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_STYLE) ) m_aTrendlineResources.FillValueSets(); } diff --git a/chart2/source/controller/main/ChartWindow.cxx b/chart2/source/controller/main/ChartWindow.cxx index a0c9784764d9..70f6c1131767 100644 --- a/chart2/source/controller/main/ChartWindow.cxx +++ b/chart2/source/controller/main/ChartWindow.cxx @@ -217,7 +217,7 @@ void ChartWindow::DataChanged( const DataChangedEvent& rDCEvt ) { vcl::Window::DataChanged( rDCEvt ); - if ( (rDCEvt.GetType() == DATACHANGED_SETTINGS) && + if ( (rDCEvt.GetType() == DataChangedEventType::SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_STYLE) ) { adjustHighContrastMode(); diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx index 88b0bf637b9d..adba2c90c1a6 100644 --- a/cui/source/customize/cfg.cxx +++ b/cui/source/customize/cfg.cxx @@ -4585,7 +4585,7 @@ void SvxToolbarEntriesListBox::DataChanged( const DataChangedEvent& rDCEvt ) { SvTreeListBox::DataChanged( rDCEvt ); - if (( rDCEvt.GetType() == DATACHANGED_SETTINGS ) && + if (( rDCEvt.GetType() == DataChangedEventType::SETTINGS ) && ( rDCEvt.GetFlags() & SETTINGS_STYLE )) { BuildCheckBoxButtonImages( m_pButtonData ); diff --git a/cui/source/dialogs/iconcdlg.cxx b/cui/source/dialogs/iconcdlg.cxx index 5d558c0807a2..a62545f2c015 100644 --- a/cui/source/dialogs/iconcdlg.cxx +++ b/cui/source/dialogs/iconcdlg.cxx @@ -146,7 +146,7 @@ void IconChoicePage::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/cui/source/options/optcolor.cxx b/cui/source/options/optcolor.cxx index 778b42962821..99f1b20b23b0 100644 --- a/cui/source/options/optcolor.cxx +++ b/cui/source/options/optcolor.cxx @@ -803,7 +803,7 @@ bool ColorConfigWindow_Impl::IsGroupVisible (Group eGroup) const void ColorConfigWindow_Impl::DataChanged (DataChangedEvent const& rDCEvt) { Window::DataChanged( rDCEvt ); - if ( (rDCEvt.GetType() == DATACHANGED_SETTINGS) && + if ( (rDCEvt.GetType() == DataChangedEventType::SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_STYLE) ) { StyleSettings const& rStyleSettings = GetSettings().GetStyleSettings(); @@ -972,7 +972,7 @@ void ColorConfigCtrl_Impl::Command( const CommandEvent& rCEvt ) void ColorConfigCtrl_Impl::DataChanged( const DataChangedEvent& rDCEvt ) { Window::DataChanged( rDCEvt ); - if ( (rDCEvt.GetType() == DATACHANGED_SETTINGS) && + if ( (rDCEvt.GetType() == DataChangedEventType::SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_STYLE) ) { const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); diff --git a/cui/source/options/personalization.cxx b/cui/source/options/personalization.cxx index bf7ccd8261ce..173755a1b462 100644 --- a/cui/source/options/personalization.cxx +++ b/cui/source/options/personalization.cxx @@ -329,7 +329,7 @@ bool SvxPersonalizationTabPage::FillItemSet( SfxItemSet * ) if ( bModified ) { // broadcast the change - DataChangedEvent aDataChanged( DATACHANGED_SETTINGS, NULL, SETTINGS_STYLE ); + DataChangedEvent aDataChanged( DataChangedEventType::SETTINGS, NULL, SETTINGS_STYLE ); Application::NotifyAllWindows( aDataChanged ); } diff --git a/cui/source/tabpages/align.cxx b/cui/source/tabpages/align.cxx index 7eac0ade3164..cfd5abacca6c 100644 --- a/cui/source/tabpages/align.cxx +++ b/cui/source/tabpages/align.cxx @@ -313,7 +313,7 @@ int AlignmentTabPage::DeactivatePage( SfxItemSet* _pSet ) void AlignmentTabPage::DataChanged( const DataChangedEvent& rDCEvt ) { SfxTabPage::DataChanged( rDCEvt ); - if( (rDCEvt.GetType() == DATACHANGED_SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_STYLE) ) + if( (rDCEvt.GetType() == DataChangedEventType::SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_STYLE) ) { InitVsRefEgde(); } diff --git a/cui/source/tabpages/backgrnd.cxx b/cui/source/tabpages/backgrnd.cxx index 5c0c9ed7102c..12b0254295fb 100644 --- a/cui/source/tabpages/backgrnd.cxx +++ b/cui/source/tabpages/backgrnd.cxx @@ -338,7 +338,7 @@ void BackgroundPreviewImpl::Paint( const Rectangle& ) void BackgroundPreviewImpl::DataChanged( const DataChangedEvent& rDCEvt ) { - if ( (rDCEvt.GetType() == DATACHANGED_SETTINGS) && + if ( (rDCEvt.GetType() == DataChangedEventType::SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_STYLE) ) { Invalidate(); diff --git a/cui/source/tabpages/border.cxx b/cui/source/tabpages/border.cxx index 4eec6c2c6b50..e19bdd837e7d 100644 --- a/cui/source/tabpages/border.cxx +++ b/cui/source/tabpages/border.cxx @@ -1187,7 +1187,7 @@ IMPL_LINK( SvxBorderTabPage, SyncHdl_Impl, CheckBox*, pBox) void SvxBorderTabPage::DataChanged( const DataChangedEvent& rDCEvt ) { - if( (rDCEvt.GetType() == DATACHANGED_SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_STYLE) ) + if( (rDCEvt.GetType() == DataChangedEventType::SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_STYLE) ) FillValueSets(); SfxTabPage::DataChanged( rDCEvt ); diff --git a/cui/source/tabpages/labdlg.cxx b/cui/source/tabpages/labdlg.cxx index 8b8c196c3051..d073f7939e8b 100644 --- a/cui/source/tabpages/labdlg.cxx +++ b/cui/source/tabpages/labdlg.cxx @@ -498,7 +498,7 @@ void SvxCaptionTabPage::DataChanged( const DataChangedEvent& rDCEvt ) { SfxTabPage::DataChanged( rDCEvt ); - if ( (rDCEvt.GetType() == DATACHANGED_SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_STYLE) ) + if ( (rDCEvt.GetType() == DataChangedEventType::SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_STYLE) ) FillValueSet(); } diff --git a/cui/source/tabpages/numfmt.cxx b/cui/source/tabpages/numfmt.cxx index ce26ca8fc310..2e77686a33e8 100644 --- a/cui/source/tabpages/numfmt.cxx +++ b/cui/source/tabpages/numfmt.cxx @@ -219,7 +219,7 @@ void SvxNumberPreview::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 ) ) InitSettings( true, true ); } diff --git a/cui/source/tabpages/tphatch.cxx b/cui/source/tabpages/tphatch.cxx index 2f988e44a5f5..b4d821e75424 100644 --- a/cui/source/tabpages/tphatch.cxx +++ b/cui/source/tabpages/tphatch.cxx @@ -821,7 +821,7 @@ void SvxHatchTabPage::PointChanged( vcl::Window* pWindow, RECT_POINT eRcPt ) void SvxHatchTabPage::DataChanged( const DataChangedEvent& rDCEvt ) { - if ( ( rDCEvt.GetType() == DATACHANGED_SETTINGS ) && ( rDCEvt.GetFlags() & SETTINGS_STYLE ) ) + if ( ( rDCEvt.GetType() == DataChangedEventType::SETTINGS ) && ( rDCEvt.GetFlags() & SETTINGS_STYLE ) ) m_pCtlPreview->SetDrawMode( GetSettings().GetStyleSettings().GetHighContrastMode() ? OUTPUT_DRAWMODE_CONTRAST : OUTPUT_DRAWMODE_COLOR ); SvxTabPage::DataChanged( rDCEvt ); diff --git a/cui/source/tabpages/tpline.cxx b/cui/source/tabpages/tpline.cxx index 4be237f1710a..9ce242df5055 100644 --- a/cui/source/tabpages/tpline.cxx +++ b/cui/source/tabpages/tpline.cxx @@ -1813,7 +1813,7 @@ void SvxLineTabPage::DataChanged( const DataChangedEvent& rDCEvt ) { SvxTabPage::DataChanged( rDCEvt ); - if ( (rDCEvt.GetType() == DATACHANGED_SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_STYLE) ) + if ( (rDCEvt.GetType() == DataChangedEventType::SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_STYLE) ) { FillListboxes(); } diff --git a/cui/source/tabpages/tplnedef.cxx b/cui/source/tabpages/tplnedef.cxx index 2918f2db641b..4b31f991efce 100644 --- a/cui/source/tabpages/tplnedef.cxx +++ b/cui/source/tabpages/tplnedef.cxx @@ -898,7 +898,7 @@ void SvxLineDefTabPage::DataChanged( const DataChangedEvent& rDCEvt ) { SfxTabPage::DataChanged( rDCEvt ); - if ( (rDCEvt.GetType() == DATACHANGED_SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_STYLE) ) + if ( (rDCEvt.GetType() == DataChangedEventType::SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_STYLE) ) { sal_Int32 nOldSelect = m_pLbLineStyles->GetSelectEntryPos(); m_pLbLineStyles->Clear(); diff --git a/cui/source/tabpages/tplneend.cxx b/cui/source/tabpages/tplneend.cxx index 54d1e714c237..3916d015228c 100644 --- a/cui/source/tabpages/tplneend.cxx +++ b/cui/source/tabpages/tplneend.cxx @@ -664,7 +664,7 @@ void SvxLineEndDefTabPage::DataChanged( const DataChangedEvent& rDCEvt ) { SfxTabPage::DataChanged( rDCEvt ); - if ( (rDCEvt.GetType() == DATACHANGED_SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_STYLE) ) + if ( (rDCEvt.GetType() == DataChangedEventType::SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_STYLE) ) { sal_Int32 nOldSelect = m_pLbLineEnds->GetSelectEntryPos(); m_pLbLineEnds->Clear(); diff --git a/dbaccess/source/ui/app/AppDetailPageHelper.cxx b/dbaccess/source/ui/app/AppDetailPageHelper.cxx index 5c26d3a65250..575dffd0b925 100644 --- a/dbaccess/source/ui/app/AppDetailPageHelper.cxx +++ b/dbaccess/source/ui/app/AppDetailPageHelper.cxx @@ -155,7 +155,7 @@ namespace { Window::DataChanged( rDCEvt ); - if ( (rDCEvt.GetType() == DATACHANGED_SETTINGS) && + if ( (rDCEvt.GetType() == DataChangedEventType::SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_STYLE) ) { ImplInitSettings( true, true, true ); @@ -1232,10 +1232,10 @@ void OAppDetailPageHelper::DataChanged( const DataChangedEvent& rDCEvt ) { Window::DataChanged( rDCEvt ); - if ( (rDCEvt.GetType() == DATACHANGED_FONTS) || - (rDCEvt.GetType() == DATACHANGED_DISPLAY) || - (rDCEvt.GetType() == DATACHANGED_FONTSUBSTITUTION) || - ((rDCEvt.GetType() == DATACHANGED_SETTINGS) && + if ( (rDCEvt.GetType() == DataChangedEventType::FONTS) || + (rDCEvt.GetType() == DataChangedEventType::DISPLAY) || + (rDCEvt.GetType() == DataChangedEventType::FONTSUBSTITUTION) || + ((rDCEvt.GetType() == DataChangedEventType::SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_STYLE)) ) { @@ -1332,7 +1332,7 @@ void OPreviewWindow::DataChanged( const DataChangedEvent& rDCEvt ) { Window::DataChanged( rDCEvt ); - if ( (rDCEvt.GetType() == DATACHANGED_SETTINGS) && + if ( (rDCEvt.GetType() == DataChangedEventType::SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_STYLE) ) { ImplInitSettings( true, true, true ); diff --git a/dbaccess/source/ui/app/AppDetailView.cxx b/dbaccess/source/ui/app/AppDetailView.cxx index 4882593c2526..c89c310ca50d 100644 --- a/dbaccess/source/ui/app/AppDetailView.cxx +++ b/dbaccess/source/ui/app/AppDetailView.cxx @@ -371,7 +371,7 @@ void OTasksWindow::DataChanged( const DataChangedEvent& rDCEvt ) { Window::DataChanged( rDCEvt ); - if ( (rDCEvt.GetType() == DATACHANGED_SETTINGS) && + if ( (rDCEvt.GetType() == DataChangedEventType::SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_STYLE) ) { ImplInitSettings( true, true, true ); @@ -589,10 +589,10 @@ void OApplicationDetailView::DataChanged( const DataChangedEvent& rDCEvt ) { OSplitterView::DataChanged( rDCEvt ); - if ( (rDCEvt.GetType() == DATACHANGED_FONTS) || - (rDCEvt.GetType() == DATACHANGED_DISPLAY) || - (rDCEvt.GetType() == DATACHANGED_FONTSUBSTITUTION) || - ((rDCEvt.GetType() == DATACHANGED_SETTINGS) && + if ( (rDCEvt.GetType() == DataChangedEventType::FONTS) || + (rDCEvt.GetType() == DataChangedEventType::DISPLAY) || + (rDCEvt.GetType() == DataChangedEventType::FONTSUBSTITUTION) || + ((rDCEvt.GetType() == DataChangedEventType::SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_STYLE)) ) { ImplInitSettings( true, true, true ); diff --git a/dbaccess/source/ui/app/AppSwapWindow.cxx b/dbaccess/source/ui/app/AppSwapWindow.cxx index 8c3d451bd0e3..386c3a35dfe4 100644 --- a/dbaccess/source/ui/app/AppSwapWindow.cxx +++ b/dbaccess/source/ui/app/AppSwapWindow.cxx @@ -93,10 +93,10 @@ void OApplicationSwapWindow::ImplInitSettings( bool bFont, bool bForeground, boo void OApplicationSwapWindow::DataChanged( const DataChangedEvent& rDCEvt ) { Window::DataChanged( rDCEvt ); - if ( (rDCEvt.GetType() == DATACHANGED_FONTS) || - (rDCEvt.GetType() == DATACHANGED_DISPLAY) || - (rDCEvt.GetType() == DATACHANGED_FONTSUBSTITUTION) || - ((rDCEvt.GetType() == DATACHANGED_SETTINGS) && + if ( (rDCEvt.GetType() == DataChangedEventType::FONTS) || + (rDCEvt.GetType() == DataChangedEventType::DISPLAY) || + (rDCEvt.GetType() == DataChangedEventType::FONTSUBSTITUTION) || + ((rDCEvt.GetType() == DataChangedEventType::SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_STYLE)) ) { ImplInitSettings( true, true, true ); diff --git a/dbaccess/source/ui/app/AppTitleWindow.cxx b/dbaccess/source/ui/app/AppTitleWindow.cxx index f4108f9db23b..1678d9e7a223 100644 --- a/dbaccess/source/ui/app/AppTitleWindow.cxx +++ b/dbaccess/source/ui/app/AppTitleWindow.cxx @@ -114,10 +114,10 @@ void OTitleWindow::DataChanged( const DataChangedEvent& rDCEvt ) { Window::DataChanged( rDCEvt ); - if ( (rDCEvt.GetType() == DATACHANGED_FONTS) || - (rDCEvt.GetType() == DATACHANGED_DISPLAY) || - (rDCEvt.GetType() == DATACHANGED_FONTSUBSTITUTION) || - ((rDCEvt.GetType() == DATACHANGED_SETTINGS) && + if ( (rDCEvt.GetType() == DataChangedEventType::FONTS) || + (rDCEvt.GetType() == DataChangedEventType::DISPLAY) || + (rDCEvt.GetType() == DataChangedEventType::FONTSUBSTITUTION) || + ((rDCEvt.GetType() == DataChangedEventType::SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_STYLE)) ) { ImplInitSettings( true, true, true ); diff --git a/dbaccess/source/ui/app/AppView.cxx b/dbaccess/source/ui/app/AppView.cxx index 4a9921e8468e..8b06212650ed 100644 --- a/dbaccess/source/ui/app/AppView.cxx +++ b/dbaccess/source/ui/app/AppView.cxx @@ -137,10 +137,10 @@ void OAppBorderWindow::DataChanged( const DataChangedEvent& rDCEvt ) { Window::DataChanged( rDCEvt ); - if ( (rDCEvt.GetType() == DATACHANGED_FONTS) || - (rDCEvt.GetType() == DATACHANGED_DISPLAY) || - (rDCEvt.GetType() == DATACHANGED_FONTSUBSTITUTION) || - ((rDCEvt.GetType() == DATACHANGED_SETTINGS) && + if ( (rDCEvt.GetType() == DataChangedEventType::FONTS) || + (rDCEvt.GetType() == DataChangedEventType::DISPLAY) || + (rDCEvt.GetType() == DataChangedEventType::FONTSUBSTITUTION) || + ((rDCEvt.GetType() == DataChangedEventType::SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_STYLE)) ) { ImplInitSettings(); @@ -229,10 +229,10 @@ void OApplicationView::DataChanged( const DataChangedEvent& rDCEvt ) { ODataView::DataChanged( rDCEvt ); - if ( (rDCEvt.GetType() == DATACHANGED_FONTS) || - (rDCEvt.GetType() == DATACHANGED_DISPLAY) || - (rDCEvt.GetType() == DATACHANGED_FONTSUBSTITUTION) || - ((rDCEvt.GetType() == DATACHANGED_SETTINGS) && + if ( (rDCEvt.GetType() == DataChangedEventType::FONTS) || + (rDCEvt.GetType() == DataChangedEventType::DISPLAY) || + (rDCEvt.GetType() == DataChangedEventType::FONTSUBSTITUTION) || + ((rDCEvt.GetType() == DataChangedEventType::SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_STYLE)) ) { ImplInitSettings(); diff --git a/dbaccess/source/ui/browser/dataview.cxx b/dbaccess/source/ui/browser/dataview.cxx index 7c5f33f629bf..0fc07aec03b9 100644 --- a/dbaccess/source/ui/browser/dataview.cxx +++ b/dbaccess/source/ui/browser/dataview.cxx @@ -176,10 +176,10 @@ namespace dbaui { Window::DataChanged( rDCEvt ); - if ( (rDCEvt.GetType() == DATACHANGED_FONTS) || - (rDCEvt.GetType() == DATACHANGED_DISPLAY) || - (rDCEvt.GetType() == DATACHANGED_FONTSUBSTITUTION) || - ((rDCEvt.GetType() == DATACHANGED_SETTINGS) && + if ( (rDCEvt.GetType() == DataChangedEventType::FONTS) || + (rDCEvt.GetType() == DataChangedEventType::DISPLAY) || + (rDCEvt.GetType() == DataChangedEventType::FONTSUBSTITUTION) || + ((rDCEvt.GetType() == DataChangedEventType::SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_STYLE)) ) { // Check if we need to get new images for normal/high contrast mode diff --git a/dbaccess/source/ui/control/VertSplitView.cxx b/dbaccess/source/ui/control/VertSplitView.cxx index d199b6f32fef..a52c730f1f82 100644 --- a/dbaccess/source/ui/control/VertSplitView.cxx +++ b/dbaccess/source/ui/control/VertSplitView.cxx @@ -91,7 +91,7 @@ void OSplitterView::DataChanged( const DataChangedEvent& rDCEvt ) { Window::DataChanged( rDCEvt ); - if ( (rDCEvt.GetType() == DATACHANGED_SETTINGS) && + if ( (rDCEvt.GetType() == DataChangedEventType::SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_STYLE) ) { ImplInitSettings( true, true, true ); diff --git a/dbaccess/source/ui/dlg/indexdialog.cxx b/dbaccess/source/ui/dlg/indexdialog.cxx index e17a8ed4d3a7..6f36e7458f66 100644 --- a/dbaccess/source/ui/dlg/indexdialog.cxx +++ b/dbaccess/source/ui/dlg/indexdialog.cxx @@ -820,8 +820,8 @@ namespace dbaui { ModalDialog::DataChanged( rDCEvt ); - if ((( rDCEvt.GetType() == DATACHANGED_SETTINGS ) || - ( rDCEvt.GetType() == DATACHANGED_DISPLAY )) && + if ((( rDCEvt.GetType() == DataChangedEventType::SETTINGS ) || + ( rDCEvt.GetType() == DataChangedEventType::DISPLAY )) && ( rDCEvt.GetFlags() & SETTINGS_STYLE )) { // Check if we need to get new images for normal/high contrast mode diff --git a/dbaccess/source/ui/dlg/tablespage.cxx b/dbaccess/source/ui/dlg/tablespage.cxx index 863841e92e73..d5932f002564 100644 --- a/dbaccess/source/ui/dlg/tablespage.cxx +++ b/dbaccess/source/ui/dlg/tablespage.cxx @@ -121,8 +121,8 @@ namespace dbaui { OGenericAdministrationPage::DataChanged( rDCEvt ); - if ((( rDCEvt.GetType() == DATACHANGED_SETTINGS ) || - ( rDCEvt.GetType() == DATACHANGED_DISPLAY )) && + if ((( rDCEvt.GetType() == DataChangedEventType::SETTINGS ) || + ( rDCEvt.GetType() == DataChangedEventType::DISPLAY )) && ( rDCEvt.GetFlags() & SETTINGS_STYLE )) { // Check if we need to get new images for normal/high contrast mode diff --git a/dbaccess/source/ui/misc/ToolBoxHelper.cxx b/dbaccess/source/ui/misc/ToolBoxHelper.cxx index 0e05165bcaad..e5332c622318 100644 --- a/dbaccess/source/ui/misc/ToolBoxHelper.cxx +++ b/dbaccess/source/ui/misc/ToolBoxHelper.cxx @@ -81,8 +81,8 @@ namespace dbaui if ( m_pToolBox && _pEvt && _pEvt->GetId() == VCLEVENT_APPLICATION_DATACHANGED ) { DataChangedEvent* pData = reinterpret_cast<DataChangedEvent*>(_pEvt->GetData()); - if ( pData && ((( pData->GetType() == DATACHANGED_SETTINGS ) || - ( pData->GetType() == DATACHANGED_DISPLAY )) && + if ( pData && ((( pData->GetType() == DataChangedEventType::SETTINGS ) || + ( pData->GetType() == DataChangedEventType::DISPLAY )) && ( pData->GetFlags() & SETTINGS_STYLE ))) // check if imagelist changed checkImageList(); diff --git a/dbaccess/source/ui/querydesign/JoinTableView.cxx b/dbaccess/source/ui/querydesign/JoinTableView.cxx index 020e990e4db7..1b2bc5110cd2 100644 --- a/dbaccess/source/ui/querydesign/JoinTableView.cxx +++ b/dbaccess/source/ui/querydesign/JoinTableView.cxx @@ -583,7 +583,7 @@ void OJoinTableView::SetDefaultTabWinPosSize( OTableWindow* pTabWin ) void OJoinTableView::DataChanged(const DataChangedEvent& rDCEvt) { - if (rDCEvt.GetType() == DATACHANGED_SETTINGS) + if (rDCEvt.GetType() == DataChangedEventType::SETTINGS) { // consider the worst case: the colors changed, so adjust me InitColors(); diff --git a/dbaccess/source/ui/querydesign/TableWindow.cxx b/dbaccess/source/ui/querydesign/TableWindow.cxx index 3584044a87df..35888462af34 100644 --- a/dbaccess/source/ui/querydesign/TableWindow.cxx +++ b/dbaccess/source/ui/querydesign/TableWindow.cxx @@ -296,7 +296,7 @@ bool OTableWindow::Init() void OTableWindow::DataChanged(const DataChangedEvent& rDCEvt) { - if (rDCEvt.GetType() == DATACHANGED_SETTINGS) + if (rDCEvt.GetType() == DataChangedEventType::SETTINGS) { // In the worst-case the colours have changed so // adapt myself to the new colours diff --git a/dbaccess/source/ui/querydesign/TableWindowTitle.cxx b/dbaccess/source/ui/querydesign/TableWindowTitle.cxx index 648e77736d17..79bcc29c871d 100644 --- a/dbaccess/source/ui/querydesign/TableWindowTitle.cxx +++ b/dbaccess/source/ui/querydesign/TableWindowTitle.cxx @@ -156,7 +156,7 @@ void OTableWindowTitle::MouseButtonDown( const MouseEvent& rEvt ) void OTableWindowTitle::DataChanged(const DataChangedEvent& rDCEvt) { - if (rDCEvt.GetType() == DATACHANGED_SETTINGS) + if (rDCEvt.GetType() == DataChangedEventType::SETTINGS) { // assume worst-case: colours have changed, therefore I have to adept StyleSettings aSystemStyle = Application::GetSettings().GetStyleSettings(); diff --git a/dbaccess/source/ui/tabledesign/TableDesignView.cxx b/dbaccess/source/ui/tabledesign/TableDesignView.cxx index ed577c6778f3..cc1df57bee4a 100644 --- a/dbaccess/source/ui/tabledesign/TableDesignView.cxx +++ b/dbaccess/source/ui/tabledesign/TableDesignView.cxx @@ -149,7 +149,7 @@ void OTableBorderWindow::DataChanged( const DataChangedEvent& rDCEvt ) { Window::DataChanged( rDCEvt ); - if ( (rDCEvt.GetType() == DATACHANGED_SETTINGS) && + if ( (rDCEvt.GetType() == DataChangedEventType::SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_STYLE) ) { ImplInitSettings( true, true, true ); diff --git a/extensions/source/bibliography/toolbar.cxx b/extensions/source/bibliography/toolbar.cxx index 17f595124c21..bcd511b043ba 100644 --- a/extensions/source/bibliography/toolbar.cxx +++ b/extensions/source/bibliography/toolbar.cxx @@ -519,7 +519,7 @@ void BibToolBar::statusChanged(const frame::FeatureStateEvent& rEvent) void BibToolBar::DataChanged( const DataChangedEvent& rDCEvt ) { - if ( (rDCEvt.GetType() == DATACHANGED_SETTINGS) && + if ( (rDCEvt.GetType() == DataChangedEventType::SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_STYLE) ) ApplyImageList(); ToolBox::DataChanged( rDCEvt ); diff --git a/fpicker/source/office/iodlg.cxx b/fpicker/source/office/iodlg.cxx index c82b320d3625..295a0e74df01 100644 --- a/fpicker/source/office/iodlg.cxx +++ b/fpicker/source/office/iodlg.cxx @@ -2352,7 +2352,7 @@ void SvtFileDialog::implUpdateImages( ) void SvtFileDialog::DataChanged( const DataChangedEvent& _rDCEvt ) { - if ( DATACHANGED_SETTINGS == _rDCEvt.GetType() ) + if ( DataChangedEventType::SETTINGS == _rDCEvt.GetType() ) implUpdateImages( ); ModalDialog::DataChanged( _rDCEvt ); diff --git a/framework/source/uielement/addonstoolbarmanager.cxx b/framework/source/uielement/addonstoolbarmanager.cxx index 467976dd2d7d..53f8f065f369 100644 --- a/framework/source/uielement/addonstoolbarmanager.cxx +++ b/framework/source/uielement/addonstoolbarmanager.cxx @@ -467,8 +467,8 @@ IMPL_LINK( AddonsToolBarManager, StateChanged, StateChangedType*, pStateChangedT IMPL_LINK( AddonsToolBarManager, DataChanged, DataChangedEvent*, pDataChangedEvent ) { - if ((( pDataChangedEvent->GetType() == DATACHANGED_SETTINGS ) || - ( pDataChangedEvent->GetType() == DATACHANGED_DISPLAY )) && + if ((( pDataChangedEvent->GetType() == DataChangedEventType::SETTINGS ) || + ( pDataChangedEvent->GetType() == DataChangedEventType::DISPLAY )) && ( pDataChangedEvent->GetFlags() & SETTINGS_STYLE )) { CheckAndUpdateImages(); diff --git a/framework/source/uielement/statusbarmanager.cxx b/framework/source/uielement/statusbarmanager.cxx index 23a630649cb2..44f189a140c3 100644 --- a/framework/source/uielement/statusbarmanager.cxx +++ b/framework/source/uielement/statusbarmanager.cxx @@ -552,10 +552,10 @@ void StatusBarManager::DataChanged( const DataChangedEvent& rDCEvt ) { SolarMutexClearableGuard aGuard; - if ((( rDCEvt.GetType() == DATACHANGED_SETTINGS ) || - ( rDCEvt.GetType() == DATACHANGED_FONTS ) || - ( rDCEvt.GetType() == DATACHANGED_FONTSUBSTITUTION ) || - ( rDCEvt.GetType() == DATACHANGED_DISPLAY )) && + if ((( rDCEvt.GetType() == DataChangedEventType::SETTINGS ) || + ( rDCEvt.GetType() == DataChangedEventType::FONTS ) || + ( rDCEvt.GetType() == DataChangedEventType::FONTSUBSTITUTION ) || + ( rDCEvt.GetType() == DataChangedEventType::DISPLAY )) && ( rDCEvt.GetFlags() & SETTINGS_STYLE )) { css::uno::Reference< css::frame::XLayoutManager > xLayoutManager; diff --git a/framework/source/uielement/toolbarmanager.cxx b/framework/source/uielement/toolbarmanager.cxx index 22ab0b10a373..3ef8de628af3 100644 --- a/framework/source/uielement/toolbarmanager.cxx +++ b/framework/source/uielement/toolbarmanager.cxx @@ -2064,8 +2064,8 @@ IMPL_LINK( ToolBarManager, StateChanged, StateChangedType*, pStateChangedType ) IMPL_LINK( ToolBarManager, DataChanged, DataChangedEvent*, pDataChangedEvent ) { - if ((( pDataChangedEvent->GetType() == DATACHANGED_SETTINGS ) || - ( pDataChangedEvent->GetType() == DATACHANGED_DISPLAY )) && + if ((( pDataChangedEvent->GetType() == DataChangedEventType::SETTINGS ) || + ( pDataChangedEvent->GetType() == DataChangedEventType::DISPLAY )) && ( pDataChangedEvent->GetFlags() & SETTINGS_STYLE )) { CheckAndUpdateImages(); diff --git a/include/vcl/event.hxx b/include/vcl/event.hxx index a73c57138b5e..b04e0c470002 100644 --- a/include/vcl/event.hxx +++ b/include/vcl/event.hxx @@ -479,30 +479,32 @@ inline const CommandEvent* NotifyEvent::GetCommandEvent() const // - DataChangedEvent - -#define DATACHANGED_SETTINGS ((sal_uInt16)1) -#define DATACHANGED_DISPLAY ((sal_uInt16)2) -#define DATACHANGED_DATETIME ((sal_uInt16)3) -#define DATACHANGED_FONTS ((sal_uInt16)4) -#define DATACHANGED_PRINTER ((sal_uInt16)5) -#define DATACHANGED_FONTSUBSTITUTION ((sal_uInt16)6) -#define DATACHANGED_USER ((sal_uInt16)10000) +enum class DataChangedEventType { + NONE = 0, + SETTINGS = 1, + DISPLAY = 2, + FONTS = 4, + PRINTER = 5, + FONTSUBSTITUTION = 6, + USER = 10000 +}; class VCL_DLLPUBLIC DataChangedEvent { private: void* mpData; - sal_uLong mnFlags; - sal_uInt16 mnType; + sal_uLong mnFlags; + DataChangedEventType mnType; public: explicit DataChangedEvent(); - explicit DataChangedEvent( sal_uInt16 nType, + explicit DataChangedEvent( DataChangedEventType nType, const void* pData = NULL, sal_uLong nFlags = 0 ); - sal_uInt16 GetType() const { return mnType; } + DataChangedEventType GetType() const { return mnType; } void* GetData() const { return mpData; } - sal_uLong GetFlags() const { return mnFlags; } + sal_uLong GetFlags() const { return mnFlags; } const AllSettings* GetOldSettings() const; }; @@ -511,10 +513,10 @@ inline DataChangedEvent::DataChangedEvent() { mpData = NULL; mnFlags = 0; - mnType = 0; + mnType = DataChangedEventType::NONE; } -inline DataChangedEvent::DataChangedEvent( sal_uInt16 nType, +inline DataChangedEvent::DataChangedEvent( DataChangedEventType nType, const void* pData, sal_uLong nChangeFlags ) { @@ -525,7 +527,7 @@ inline DataChangedEvent::DataChangedEvent( sal_uInt16 nType, inline const AllSettings* DataChangedEvent::GetOldSettings() const { - if ( mnType == DATACHANGED_SETTINGS ) + if ( mnType == DataChangedEventType::SETTINGS ) return (const AllSettings*)mpData; else return NULL; diff --git a/include/vcl/print.hxx b/include/vcl/print.hxx index f49a1638a6fe..00c05547bded 100644 --- a/include/vcl/print.hxx +++ b/include/vcl/print.hxx @@ -376,7 +376,7 @@ public: /** checks the printer list and updates it necessary * - * sends a DataChanged event of type DATACHANGED_PRINTER + * sends a DataChanged event of type DataChangedEventType::PRINTER * if the printer list changed */ static void updatePrinters(); diff --git a/reportdesign/source/ui/misc/ColorListener.cxx b/reportdesign/source/ui/misc/ColorListener.cxx index c1c330eb7156..3b52b4d2116e 100644 --- a/reportdesign/source/ui/misc/ColorListener.cxx +++ b/reportdesign/source/ui/misc/ColorListener.cxx @@ -58,7 +58,7 @@ void OColorListener::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/reportdesign/source/ui/report/DesignView.cxx b/reportdesign/source/ui/report/DesignView.cxx index bca85bcea186..532bdea1a68f 100644 --- a/reportdesign/source/ui/report/DesignView.cxx +++ b/reportdesign/source/ui/report/DesignView.cxx @@ -168,7 +168,7 @@ void ODesignView::DataChanged( const DataChangedEvent& rDCEvt ) { ODataView::DataChanged( rDCEvt ); - if ( (rDCEvt.GetType() == DATACHANGED_SETTINGS) && + if ( (rDCEvt.GetType() == DataChangedEventType::SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_STYLE) ) { ImplInitSettings(); diff --git a/reportdesign/source/ui/report/ReportControllerObserver.cxx b/reportdesign/source/ui/report/ReportControllerObserver.cxx index 4bb23fe98ed7..d1402db5de02 100644 --- a/reportdesign/source/ui/report/ReportControllerObserver.cxx +++ b/reportdesign/source/ui/report/ReportControllerObserver.cxx @@ -103,8 +103,8 @@ public: if (nEvent == VCLEVENT_APPLICATION_DATACHANGED ) { DataChangedEvent* pData = reinterpret_cast<DataChangedEvent*>(_pEvt->GetData()); - if ( pData && ((( pData->GetType() == DATACHANGED_SETTINGS ) || - ( pData->GetType() == DATACHANGED_DISPLAY )) && + if ( pData && ((( pData->GetType() == DataChangedEventType::SETTINGS ) || + ( pData->GetType() == DataChangedEventType::DISPLAY )) && ( pData->GetFlags() & SETTINGS_STYLE ))) { OEnvLock aLock(*this); diff --git a/reportdesign/source/ui/report/ReportWindow.cxx b/reportdesign/source/ui/report/ReportWindow.cxx index 675f6ba6077e..86a1911caa52 100644 --- a/reportdesign/source/ui/report/ReportWindow.cxx +++ b/reportdesign/source/ui/report/ReportWindow.cxx @@ -216,7 +216,7 @@ void OReportWindow::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/reportdesign/source/ui/report/ScrollHelper.cxx b/reportdesign/source/ui/report/ScrollHelper.cxx index 9dd32a52d31f..4f8c90d82355 100644 --- a/reportdesign/source/ui/report/ScrollHelper.cxx +++ b/reportdesign/source/ui/report/ScrollHelper.cxx @@ -354,7 +354,7 @@ void OScrollWindowHelper::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/reportdesign/source/ui/report/SectionWindow.cxx b/reportdesign/source/ui/report/SectionWindow.cxx index a04f4760f363..fbfd18b241c5 100644 --- a/reportdesign/source/ui/report/SectionWindow.cxx +++ b/reportdesign/source/ui/report/SectionWindow.cxx @@ -207,7 +207,7 @@ void OSectionWindow::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/reportdesign/source/ui/report/ViewsWindow.cxx b/reportdesign/source/ui/report/ViewsWindow.cxx index b35e862d7be2..c3e8c2de802d 100644 --- a/reportdesign/source/ui/report/ViewsWindow.cxx +++ b/reportdesign/source/ui/report/ViewsWindow.cxx @@ -286,7 +286,7 @@ void OViewsWindow::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/sc/source/ui/app/inputwin.cxx b/sc/source/ui/app/inputwin.cxx index 937888eb757e..80296637bbd5 100644 --- a/sc/source/ui/app/inputwin.cxx +++ b/sc/source/ui/app/inputwin.cxx @@ -779,7 +779,7 @@ void ScInputWindow::StateChanged( StateChangedType nType ) void ScInputWindow::DataChanged( const DataChangedEvent& rDCEvt ) { - if ( rDCEvt.GetType() == DATACHANGED_SETTINGS && (rDCEvt.GetFlags() & SETTINGS_STYLE) ) + if ( rDCEvt.GetType() == DataChangedEventType::SETTINGS && (rDCEvt.GetFlags() & SETTINGS_STYLE) ) { // update item images ScModule* pScMod = SC_MOD(); @@ -1109,7 +1109,7 @@ void ScInputBarGroup::TriggerToolboxLayout() else rParent.SetToolbarLayoutMode( TBX_LAYOUT_NORMAL ); xLayoutManager->lock(); - DataChangedEvent aFakeUpdate( DATACHANGED_SETTINGS, NULL, SETTINGS_STYLE ); + DataChangedEvent aFakeUpdate( DataChangedEventType::SETTINGS, NULL, SETTINGS_STYLE ); // this basically will trigger the reposititioning of the // items in the toolbar from ImplFormat ( which is controlled by @@ -2032,7 +2032,7 @@ void ScTextWnd::RemoveAccessibleTextData( ScAccessibleEditLineTextData& rTextDat void ScTextWnd::DataChanged( const DataChangedEvent& rDCEvt ) { - if ( (rDCEvt.GetType() == DATACHANGED_SETTINGS) && + if ( (rDCEvt.GetType() == DataChangedEventType::SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_STYLE) ) { ImplInitSettings(); diff --git a/sc/source/ui/dbgui/csvgrid.cxx b/sc/source/ui/dbgui/csvgrid.cxx index 37a8f1e20ef4..78c9ea0175c6 100644 --- a/sc/source/ui/dbgui/csvgrid.cxx +++ b/sc/source/ui/dbgui/csvgrid.cxx @@ -982,7 +982,7 @@ void ScCsvGrid::Command( const CommandEvent& rCEvt ) void ScCsvGrid::DataChanged( const DataChangedEvent& rDCEvt ) { - if( (rDCEvt.GetType() == DATACHANGED_SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_STYLE) ) + if( (rDCEvt.GetType() == DataChangedEventType::SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_STYLE) ) { InitColors(); InitFonts(); diff --git a/sc/source/ui/dbgui/csvruler.cxx b/sc/source/ui/dbgui/csvruler.cxx index ae6edcebd416..c04a7d46ecba 100644 --- a/sc/source/ui/dbgui/csvruler.cxx +++ b/sc/source/ui/dbgui/csvruler.cxx @@ -372,7 +372,7 @@ void ScCsvRuler::LoseFocus() void ScCsvRuler::DataChanged( const DataChangedEvent& rDCEvt ) { - if( (rDCEvt.GetType() == DATACHANGED_SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_STYLE) ) + if( (rDCEvt.GetType() == DataChangedEventType::SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_STYLE) ) { InitColors(); Repaint(); diff --git a/sc/source/ui/dbgui/csvtablebox.cxx b/sc/source/ui/dbgui/csvtablebox.cxx index c78aabaeab67..5deb5834d422 100644 --- a/sc/source/ui/dbgui/csvtablebox.cxx +++ b/sc/source/ui/dbgui/csvtablebox.cxx @@ -233,7 +233,7 @@ void ScCsvTableBox::Resize() void ScCsvTableBox::DataChanged( const DataChangedEvent& rDCEvt ) { - if( (rDCEvt.GetType() == DATACHANGED_SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_STYLE) ) + if( (rDCEvt.GetType() == DataChangedEventType::SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_STYLE) ) InitControls(); ScCsvControl::DataChanged( rDCEvt ); } diff --git a/sc/source/ui/formdlg/privsplt.cxx b/sc/source/ui/formdlg/privsplt.cxx index 683d3d6285f0..e80a88b9c49d 100644 --- a/sc/source/ui/formdlg/privsplt.cxx +++ b/sc/source/ui/formdlg/privsplt.cxx @@ -391,7 +391,7 @@ void ScPrivatSplit::StateChanged( StateChangedType nType ) void ScPrivatSplit::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/sc/source/ui/navipi/navipi.cxx b/sc/source/ui/navipi/navipi.cxx index fc4fbbdf5ced..74be9381cc05 100644 --- a/sc/source/ui/navipi/navipi.cxx +++ b/sc/source/ui/navipi/navipi.cxx @@ -452,7 +452,7 @@ void CommandToolBox::InitImageList() void CommandToolBox::DataChanged( const DataChangedEvent& rDCEvt ) { - if ( rDCEvt.GetType() == DATACHANGED_SETTINGS && (rDCEvt.GetFlags() & SETTINGS_STYLE) ) + if ( rDCEvt.GetType() == DataChangedEventType::SETTINGS && (rDCEvt.GetFlags() & SETTINGS_STYLE) ) { // update item images @@ -735,7 +735,7 @@ void ScNavigatorDlg::Paint( const Rectangle& rRect ) void ScNavigatorDlg::DataChanged( const DataChangedEvent& rDCEvt ) { - if ( rDCEvt.GetType() == DATACHANGED_SETTINGS && (rDCEvt.GetFlags() & SETTINGS_STYLE) ) + if ( rDCEvt.GetType() == DataChangedEventType::SETTINGS && (rDCEvt.GetFlags() & SETTINGS_STYLE) ) { // toolbox images are exchanged in CommandToolBox::DataChanged Invalidate(); diff --git a/sc/source/ui/pagedlg/tptable.cxx b/sc/source/ui/pagedlg/tptable.cxx index 591b324b7d23..8213ef96fade 100644 --- a/sc/source/ui/pagedlg/tptable.cxx +++ b/sc/source/ui/pagedlg/tptable.cxx @@ -330,7 +330,7 @@ int ScTablePage::DeactivatePage( SfxItemSet* pSetP ) void ScTablePage::DataChanged( const DataChangedEvent& rDCEvt ) { - if( (rDCEvt.GetType() == DATACHANGED_SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_STYLE) ) + if( (rDCEvt.GetType() == DataChangedEventType::SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_STYLE) ) ShowImage(); SfxTabPage::DataChanged( rDCEvt ); } diff --git a/sc/source/ui/view/gridwin4.cxx b/sc/source/ui/view/gridwin4.cxx index 545e071d4086..860a48769c1d 100644 --- a/sc/source/ui/view/gridwin4.cxx +++ b/sc/source/ui/view/gridwin4.cxx @@ -1526,17 +1526,17 @@ void ScGridWindow::DataChanged( const DataChangedEvent& rDCEvt ) { Window::DataChanged(rDCEvt); - if ( (rDCEvt.GetType() == DATACHANGED_PRINTER) || - (rDCEvt.GetType() == DATACHANGED_DISPLAY) || - (rDCEvt.GetType() == DATACHANGED_FONTS) || - (rDCEvt.GetType() == DATACHANGED_FONTSUBSTITUTION) || - ((rDCEvt.GetType() == DATACHANGED_SETTINGS) && + if ( (rDCEvt.GetType() == DataChangedEventType::PRINTER) || + (rDCEvt.GetType() == DataChangedEventType::DISPLAY) || + (rDCEvt.GetType() == DataChangedEventType::FONTS) || + (rDCEvt.GetType() == DataChangedEventType::FONTSUBSTITUTION) || + ((rDCEvt.GetType() == DataChangedEventType::SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_STYLE)) ) { - if ( rDCEvt.GetType() == DATACHANGED_FONTS && eWhich == pViewData->GetActivePart() ) + if ( rDCEvt.GetType() == DataChangedEventType::FONTS && eWhich == pViewData->GetActivePart() ) pViewData->GetDocShell()->UpdateFontList(); - if ( (rDCEvt.GetType() == DATACHANGED_SETTINGS) && + if ( (rDCEvt.GetType() == DataChangedEventType::SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_STYLE) ) { if ( eWhich == pViewData->GetActivePart() ) // only once for the view diff --git a/sc/source/ui/view/olinewin.cxx b/sc/source/ui/view/olinewin.cxx index 89ee877e3b7a..757d20092ba0 100644 --- a/sc/source/ui/view/olinewin.cxx +++ b/sc/source/ui/view/olinewin.cxx @@ -497,7 +497,7 @@ void ScOutlineWindow::Resize() void ScOutlineWindow::DataChanged( const DataChangedEvent& rDCEvt ) { - if ( (rDCEvt.GetType() == DATACHANGED_SETTINGS) && + if ( (rDCEvt.GetType() == DataChangedEventType::SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_STYLE) ) { InitSettings(); diff --git a/sc/source/ui/view/preview.cxx b/sc/source/ui/view/preview.cxx index e7977eacfa29..1dadb1fbb3f3 100644 --- a/sc/source/ui/view/preview.cxx +++ b/sc/source/ui/view/preview.cxx @@ -933,21 +933,21 @@ void ScPreview::DataChanged( const DataChangedEvent& rDCEvt ) { Window::DataChanged(rDCEvt); - if ( (rDCEvt.GetType() == DATACHANGED_PRINTER) || - (rDCEvt.GetType() == DATACHANGED_DISPLAY) || - (rDCEvt.GetType() == DATACHANGED_FONTS) || - (rDCEvt.GetType() == DATACHANGED_FONTSUBSTITUTION) || - ((rDCEvt.GetType() == DATACHANGED_SETTINGS) && + if ( (rDCEvt.GetType() == DataChangedEventType::PRINTER) || + (rDCEvt.GetType() == DataChangedEventType::DISPLAY) || + (rDCEvt.GetType() == DataChangedEventType::FONTS) || + (rDCEvt.GetType() == DataChangedEventType::FONTSUBSTITUTION) || + ((rDCEvt.GetType() == DataChangedEventType::SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_STYLE)) ) { - if ( rDCEvt.GetType() == DATACHANGED_FONTS ) + if ( rDCEvt.GetType() == DataChangedEventType::FONTS ) pDocShell->UpdateFontList(); // #i114518# Paint of form controls may modify the window's settings. // Ignore the event if it is called from within Paint. if ( !bInPaint ) { - if ( rDCEvt.GetType() == DATACHANGED_SETTINGS && + if ( rDCEvt.GetType() == DataChangedEventType::SETTINGS && (rDCEvt.GetFlags() & SETTINGS_STYLE) ) { // scroll bar size may have changed diff --git a/sd/source/ui/dlg/animobjs.cxx b/sd/source/ui/dlg/animobjs.cxx index 4372d10d3dbb..17b2ae6a57b8 100644 --- a/sd/source/ui/dlg/animobjs.cxx +++ b/sd/source/ui/dlg/animobjs.cxx @@ -112,7 +112,7 @@ void SdDisplay::DataChanged( const DataChangedEvent& rDCEvt ) { Control::DataChanged( rDCEvt ); - if ( (rDCEvt.GetType() == DATACHANGED_SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_STYLE) ) + if ( (rDCEvt.GetType() == DataChangedEventType::SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_STYLE) ) { const StyleSettings& rStyles = Application::GetSettings().GetStyleSettings(); SetBackground( Wallpaper( Color( rStyles.GetFieldColor() ) ) ); @@ -1112,7 +1112,7 @@ void AnimationWindow::DataChanged( const DataChangedEvent& rDCEvt ) { SfxDockingWindow::DataChanged( rDCEvt ); - if ( (rDCEvt.GetType() == DATACHANGED_SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_STYLE) ) + if ( (rDCEvt.GetType() == DataChangedEventType::SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_STYLE) ) { UpdateControl(); } diff --git a/sd/source/ui/dlg/docprev.cxx b/sd/source/ui/dlg/docprev.cxx index ec0b4e6b893f..5701e941e1fd 100644 --- a/sd/source/ui/dlg/docprev.cxx +++ b/sd/source/ui/dlg/docprev.cxx @@ -303,7 +303,7 @@ void SdDocPreviewWin::DataChanged( const DataChangedEvent& rDCEvt ) { Control::DataChanged( rDCEvt ); - if ( (rDCEvt.GetType() == DATACHANGED_SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_STYLE) ) + if ( (rDCEvt.GetType() == DataChangedEventType::SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_STYLE) ) { updateViewSettings(); } diff --git a/sd/source/ui/dlg/navigatr.cxx b/sd/source/ui/dlg/navigatr.cxx index ed45f06e8230..5ac34cc6a2f1 100644 --- a/sd/source/ui/dlg/navigatr.cxx +++ b/sd/source/ui/dlg/navigatr.cxx @@ -826,7 +826,7 @@ void SdNavigatorWin::KeyInput( const KeyEvent& rKEvt ) void SdNavigatorWin::DataChanged( const DataChangedEvent& rDCEvt ) { - if ( (rDCEvt.GetType() == DATACHANGED_SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_STYLE) ) + if ( (rDCEvt.GetType() == DataChangedEventType::SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_STYLE) ) ApplyImageList(); Window::DataChanged( rDCEvt ); diff --git a/sd/source/ui/slideshow/slideshow.cxx b/sd/source/ui/slideshow/slideshow.cxx index 1192989e3a47..ff04b309fa9d 100644 --- a/sd/source/ui/slideshow/slideshow.cxx +++ b/sd/source/ui/slideshow/slideshow.cxx @@ -89,7 +89,7 @@ namespace { virtual void DataChanged (const DataChangedEvent& rEvent) SAL_OVERRIDE { - if (rEvent.GetType() == DATACHANGED_DISPLAY) + if (rEvent.GetType() == DataChangedEventType::DISPLAY) Restart(false); } diff --git a/sd/source/ui/view/sdwindow.cxx b/sd/source/ui/view/sdwindow.cxx index 622774bbf672..0bd6522c6b80 100644 --- a/sd/source/ui/view/sdwindow.cxx +++ b/sd/source/ui/view/sdwindow.cxx @@ -719,14 +719,14 @@ void Window::DataChanged( const DataChangedEvent& rDCEvt ) Omit FONTS and FONTSUBSTITUTION if no text output is available or if the document does not allow text. */ - if ( (rDCEvt.GetType() == DATACHANGED_PRINTER) || - (rDCEvt.GetType() == DATACHANGED_DISPLAY) || - (rDCEvt.GetType() == DATACHANGED_FONTS) || - (rDCEvt.GetType() == DATACHANGED_FONTSUBSTITUTION) || - ((rDCEvt.GetType() == DATACHANGED_SETTINGS) && + if ( (rDCEvt.GetType() == DataChangedEventType::PRINTER) || + (rDCEvt.GetType() == DataChangedEventType::DISPLAY) || + (rDCEvt.GetType() == DataChangedEventType::FONTS) || + (rDCEvt.GetType() == DataChangedEventType::FONTSUBSTITUTION) || + ((rDCEvt.GetType() == DataChangedEventType::SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_STYLE)) ) { - if ( (rDCEvt.GetType() == DATACHANGED_SETTINGS) && + if ( (rDCEvt.GetType() == DataChangedEventType::SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_STYLE) ) { // When the screen zoom factor has changed then reset the zoom @@ -793,20 +793,20 @@ void Window::DataChanged( const DataChangedEvent& rDCEvt ) } } - if ( (rDCEvt.GetType() == DATACHANGED_DISPLAY) || - ((rDCEvt.GetType() == DATACHANGED_SETTINGS) && + if ( (rDCEvt.GetType() == DataChangedEventType::DISPLAY) || + ((rDCEvt.GetType() == DataChangedEventType::SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_STYLE)) ) { /* Virtual devices, which also depends on the resolution or the system control, should be updated. Otherwise, we should update - the virtual devices at least at DATACHANGED_DISPLAY since some + the virtual devices at least at DataChangedEventType::DISPLAY since some systems allow to change the resolution and color depth during runtime. Or the virtual devices have to be updated when the color palette has changed since a different color matching can be used when outputting. */ } - if ( rDCEvt.GetType() == DATACHANGED_FONTS ) + if ( rDCEvt.GetType() == DataChangedEventType::FONTS ) { /* If the document provides font choose boxes, we have to update them. I don't know how this looks like (also not really me, I @@ -815,8 +815,8 @@ void Window::DataChanged( const DataChangedEvent& rDCEvt ) Before we handle it here, discuss it with PB and me. */ } - if ( (rDCEvt.GetType() == DATACHANGED_FONTS) || - (rDCEvt.GetType() == DATACHANGED_FONTSUBSTITUTION) ) + if ( (rDCEvt.GetType() == DataChangedEventType::FONTS) || + (rDCEvt.GetType() == DataChangedEventType::FONTSUBSTITUTION) ) { /* Do reformating since the fonts of the document may no longer exist, or exist now, or are replaced with others. */ @@ -828,7 +828,7 @@ void Window::DataChanged( const DataChangedEvent& rDCEvt ) } } - if ( rDCEvt.GetType() == DATACHANGED_PRINTER ) + if ( rDCEvt.GetType() == DataChangedEventType::PRINTER ) { /* I don't know how the handling should look like. Maybe we delete a printer and look what we have to do. Maybe I have to add diff --git a/sfx2/source/appl/newhelp.cxx b/sfx2/source/appl/newhelp.cxx index 61fa1596f66a..f9b1377b4c54 100644 --- a/sfx2/source/appl/newhelp.cxx +++ b/sfx2/source/appl/newhelp.cxx @@ -1647,8 +1647,8 @@ void SfxHelpIndexWindow_Impl::DataChanged( const DataChangedEvent& rDCEvt ) { Window::DataChanged( rDCEvt ); - if ( ( ( rDCEvt.GetType() == DATACHANGED_SETTINGS ) || - ( rDCEvt.GetType() == DATACHANGED_DISPLAY ) ) && + if ( ( ( rDCEvt.GetType() == DataChangedEventType::SETTINGS ) || + ( rDCEvt.GetType() == DataChangedEventType::DISPLAY ) ) && ( rDCEvt.GetFlags() & SETTINGS_STYLE ) ) { SetBackground( Wallpaper( GetSettings().GetStyleSettings().GetFaceColor() ) ); @@ -2468,8 +2468,8 @@ void SfxHelpTextWindow_Impl::DataChanged( const DataChangedEvent& rDCEvt ) { Window::DataChanged( rDCEvt ); - if ( ( ( rDCEvt.GetType() == DATACHANGED_SETTINGS ) || - ( rDCEvt.GetType() == DATACHANGED_DISPLAY ) ) && + if ( ( ( rDCEvt.GetType() == DataChangedEventType::SETTINGS ) || + ( rDCEvt.GetType() == DataChangedEventType::DISPLAY ) ) && ( rDCEvt.GetFlags() & SETTINGS_STYLE ) ) { SetBackground( Wallpaper( GetSettings().GetStyleSettings().GetFaceColor() ) ); diff --git a/sfx2/source/control/thumbnailview.cxx b/sfx2/source/control/thumbnailview.cxx index 0ee422f94db6..91696f8efb7c 100644 --- a/sfx2/source/control/thumbnailview.cxx +++ b/sfx2/source/control/thumbnailview.cxx @@ -963,10 +963,10 @@ void ThumbnailView::DataChanged( const DataChangedEvent& rDCEvt ) { Control::DataChanged( rDCEvt ); - if ( (rDCEvt.GetType() == DATACHANGED_FONTS) || - (rDCEvt.GetType() == DATACHANGED_DISPLAY) || - (rDCEvt.GetType() == DATACHANGED_FONTSUBSTITUTION) || - ((rDCEvt.GetType() == DATACHANGED_SETTINGS) && + if ( (rDCEvt.GetType() == DataChangedEventType::FONTS) || + (rDCEvt.GetType() == DataChangedEventType::DISPLAY) || + (rDCEvt.GetType() == DataChangedEventType::FONTSUBSTITUTION) || + ((rDCEvt.GetType() == DataChangedEventType::SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_STYLE)) ) { ImplInitSettings( true, true, true ); diff --git a/sfx2/source/dialog/templdlg.cxx b/sfx2/source/dialog/templdlg.cxx index 387069a395ae..5f9c4d062f93 100644 --- a/sfx2/source/dialog/templdlg.cxx +++ b/sfx2/source/dialog/templdlg.cxx @@ -292,7 +292,7 @@ SfxTemplatePanelControl::~SfxTemplatePanelControl (void) void SfxTemplatePanelControl::DataChanged( const DataChangedEvent& _rDCEvt ) { - if ( ( DATACHANGED_SETTINGS == _rDCEvt.GetType() ) && + if ( ( DataChangedEventType::SETTINGS == _rDCEvt.GetType() ) && ( 0 != ( SETTINGS_STYLE & _rDCEvt.GetFlags() ) ) ) { pImpl->updateFamilyImages(); diff --git a/sfx2/source/dialog/titledockwin.cxx b/sfx2/source/dialog/titledockwin.cxx index 74bc4eed5e01..fd57865e2dcb 100644 --- a/sfx2/source/dialog/titledockwin.cxx +++ b/sfx2/source/dialog/titledockwin.cxx @@ -287,12 +287,12 @@ namespace sfx2 switch ( i_rDataChangedEvent.GetType() ) { - case DATACHANGED_SETTINGS: + case DataChangedEventType::SETTINGS: if ( ( i_rDataChangedEvent.GetFlags() & SETTINGS_STYLE ) == 0) break; // else fall through. - case DATACHANGED_FONTS: - case DATACHANGED_FONTSUBSTITUTION: + case DataChangedEventType::FONTS: + case DataChangedEventType::FONTSUBSTITUTION: { const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); @@ -315,6 +315,7 @@ namespace sfx2 Invalidate(); } break; + default: break; } } diff --git a/sfx2/source/sidebar/SidebarController.cxx b/sfx2/source/sidebar/SidebarController.cxx index 22223c32a52f..60b61c4dbd62 100644 --- a/sfx2/source/sidebar/SidebarController.cxx +++ b/sfx2/source/sidebar/SidebarController.cxx @@ -284,7 +284,7 @@ void SAL_CALL SidebarController::requestLayout (void) void SidebarController::BroadcastPropertyChange (void) { - DataChangedEvent aEvent (DATACHANGED_USER); + DataChangedEvent aEvent (DataChangedEventType::USER); mpParentWindow->NotifyAllChildren(aEvent); mpParentWindow->Invalidate(INVALIDATE_CHILDREN); } diff --git a/starmath/source/dialog.cxx b/starmath/source/dialog.cxx index 55be81ef6938..ca19bfa88969 100644 --- a/starmath/source/dialog.cxx +++ b/starmath/source/dialog.cxx @@ -398,7 +398,7 @@ void SmFontDialog::InitColor_Impl() void SmFontDialog::DataChanged( const DataChangedEvent& rDCEvt ) { - if ( rDCEvt.GetType() == DATACHANGED_SETTINGS && + if ( rDCEvt.GetType() == DataChangedEventType::SETTINGS && (rDCEvt.GetFlags() & SETTINGS_STYLE) ) InitColor_Impl(); @@ -1503,7 +1503,7 @@ void SmSymbolDialog::InitColor_Impl() void SmSymbolDialog::DataChanged( const DataChangedEvent& rDCEvt ) { - if ( rDCEvt.GetType() == DATACHANGED_SETTINGS && + if ( rDCEvt.GetType() == DataChangedEventType::SETTINGS && (rDCEvt.GetFlags() & SETTINGS_STYLE) ) InitColor_Impl(); @@ -2068,7 +2068,7 @@ void SmSymDefineDialog::InitColor_Impl() void SmSymDefineDialog::DataChanged( const DataChangedEvent& rDCEvt ) { - if ( rDCEvt.GetType() == DATACHANGED_SETTINGS && + if ( rDCEvt.GetType() == DataChangedEventType::SETTINGS && (rDCEvt.GetFlags() & SETTINGS_STYLE) ) InitColor_Impl(); diff --git a/starmath/source/toolbox.cxx b/starmath/source/toolbox.cxx index 48be0fd72177..1d487812046f 100644 --- a/starmath/source/toolbox.cxx +++ b/starmath/source/toolbox.cxx @@ -192,7 +192,7 @@ void SmToolBoxWindow::ApplyImageLists( sal_uInt16 nCategoryRID ) void SmToolBoxWindow::DataChanged( const DataChangedEvent &rEvt ) { - if ( (rEvt.GetType() == DATACHANGED_SETTINGS) && (rEvt.GetFlags() & SETTINGS_STYLE) ) + if ( (rEvt.GetType() == DataChangedEventType::SETTINGS) && (rEvt.GetFlags() & SETTINGS_STYLE) ) ApplyImageLists( nActiveCategoryRID ); SfxFloatingWindow::DataChanged( rEvt ); diff --git a/svtools/source/brwbox/datwin.cxx b/svtools/source/brwbox/datwin.cxx index ebf6219919bc..2578c12d4407 100644 --- a/svtools/source/brwbox/datwin.cxx +++ b/svtools/source/brwbox/datwin.cxx @@ -283,7 +283,7 @@ void BrowserDataWin::Update() void BrowserDataWin::DataChanged( const DataChangedEvent& rDCEvt ) { - if ( (rDCEvt.GetType() == DATACHANGED_SETTINGS) && + if ( (rDCEvt.GetType() == DataChangedEventType::SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_STYLE) ) { if( !bOwnDataChangedHdl ) diff --git a/svtools/source/brwbox/ebbcontrols.cxx b/svtools/source/brwbox/ebbcontrols.cxx index 7b0e577a038d..c4bedd3c27bf 100644 --- a/svtools/source/brwbox/ebbcontrols.cxx +++ b/svtools/source/brwbox/ebbcontrols.cxx @@ -269,7 +269,7 @@ namespace svt void CheckBoxControl::DataChanged( const DataChangedEvent& _rEvent ) { - if ( _rEvent.GetType() == DATACHANGED_SETTINGS ) + if ( _rEvent.GetType() == DataChangedEventType::SETTINGS ) pBox->SetSettings( GetSettings() ); } diff --git a/svtools/source/brwbox/editbrowsebox.cxx b/svtools/source/brwbox/editbrowsebox.cxx index d63be61f1cc5..026a2fb8d083 100644 --- a/svtools/source/brwbox/editbrowsebox.cxx +++ b/svtools/source/brwbox/editbrowsebox.cxx @@ -802,8 +802,8 @@ namespace svt { BrowseBox::DataChanged( rDCEvt ); - if ((( rDCEvt.GetType() == DATACHANGED_SETTINGS ) || - ( rDCEvt.GetType() == DATACHANGED_DISPLAY )) && + if ((( rDCEvt.GetType() == DataChangedEventType::SETTINGS ) || + ( rDCEvt.GetType() == DataChangedEventType::DISPLAY )) && ( rDCEvt.GetFlags() & SETTINGS_STYLE )) { ImplInitSettings( true, true, true ); diff --git a/svtools/source/config/colorcfg.cxx b/svtools/source/config/colorcfg.cxx index 77dbfd0bbe24..c79a34e640f1 100644 --- a/svtools/source/config/colorcfg.cxx +++ b/svtools/source/config/colorcfg.cxx @@ -349,7 +349,7 @@ IMPL_LINK( ColorConfig_Impl, DataChangedEventListener, VclWindowEvent*, pEvent ) if ( pEvent->GetId() == VCLEVENT_APPLICATION_DATACHANGED ) { DataChangedEvent* pData = (DataChangedEvent*)(pEvent->GetData()); - if ( (pData->GetType() == DATACHANGED_SETTINGS) && + if ( (pData->GetType() == DataChangedEventType::SETTINGS) && (pData->GetFlags() & SETTINGS_STYLE) ) { SettingsChanged(); diff --git a/svtools/source/config/extcolorcfg.cxx b/svtools/source/config/extcolorcfg.cxx index d2a0536613c1..dd6eb881915c 100644 --- a/svtools/source/config/extcolorcfg.cxx +++ b/svtools/source/config/extcolorcfg.cxx @@ -545,7 +545,7 @@ IMPL_LINK( ExtendedColorConfig_Impl, DataChangedEventListener, VclWindowEvent*, if ( pEvent->GetId() == VCLEVENT_APPLICATION_DATACHANGED ) { DataChangedEvent* pData = (DataChangedEvent*)(pEvent->GetData()); - if ( (pData->GetType() == DATACHANGED_SETTINGS) && + if ( (pData->GetType() == DataChangedEventType::SETTINGS) && (pData->GetFlags() & SETTINGS_STYLE) ) { SettingsChanged(); diff --git a/svtools/source/contnr/ivctrl.cxx b/svtools/source/contnr/ivctrl.cxx index da44f6e5ef64..ae82f24e5a30 100644 --- a/svtools/source/contnr/ivctrl.cxx +++ b/svtools/source/contnr/ivctrl.cxx @@ -366,9 +366,9 @@ void SvtIconChoiceCtrl::StateChanged( StateChangedType nType ) void SvtIconChoiceCtrl::DataChanged( const DataChangedEvent& rDCEvt ) { - if ( ((rDCEvt.GetType() == DATACHANGED_SETTINGS) || - (rDCEvt.GetType() == DATACHANGED_FONTSUBSTITUTION) || - (rDCEvt.GetType() == DATACHANGED_FONTS) ) && + if ( ((rDCEvt.GetType() == DataChangedEventType::SETTINGS) || + (rDCEvt.GetType() == DataChangedEventType::FONTSUBSTITUTION) || + (rDCEvt.GetType() == DataChangedEventType::FONTS) ) && (rDCEvt.GetFlags() & SETTINGS_STYLE) ) { _pImp->InitSettings(); diff --git a/svtools/source/contnr/treelistbox.cxx b/svtools/source/contnr/treelistbox.cxx index 28de1224101b..d131137712c0 100644 --- a/svtools/source/contnr/treelistbox.cxx +++ b/svtools/source/contnr/treelistbox.cxx @@ -3771,7 +3771,7 @@ void SvTreeListBox::ShowFocusRect( const SvTreeListEntry* pEntry ) void SvTreeListBox::DataChanged( const DataChangedEvent& rDCEvt ) { - if( (rDCEvt.GetType()==DATACHANGED_SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_STYLE) ) + if( (rDCEvt.GetType()==DataChangedEventType::SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_STYLE) ) { nEntryHeight = 0; // _together_ with true of 1. par (bFont) of InitSettings() a zero-height // forces complete recalc of heights! diff --git a/svtools/source/control/calendar.cxx b/svtools/source/control/calendar.cxx index fa20f9910d91..ed609788ca71 100644 --- a/svtools/source/control/calendar.cxx +++ b/svtools/source/control/calendar.cxx @@ -1766,9 +1766,9 @@ void Calendar::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(); diff --git a/svtools/source/control/ctrlbox.cxx b/svtools/source/control/ctrlbox.cxx index e1a26e7f5a6d..0fb5c06b4598 100644 --- a/svtools/source/control/ctrlbox.cxx +++ b/svtools/source/control/ctrlbox.cxx @@ -949,7 +949,7 @@ void LineListBox::DataChanged( const DataChangedEvent& rDCEvt ) { ListBox::DataChanged( rDCEvt ); - if( ( rDCEvt.GetType() == DATACHANGED_SETTINGS ) && ( rDCEvt.GetFlags() & SETTINGS_STYLE ) ) + if( ( rDCEvt.GetType() == DataChangedEventType::SETTINGS ) && ( rDCEvt.GetFlags() & SETTINGS_STYLE ) ) UpdateEntries( m_nWidth ); } diff --git a/svtools/source/control/headbar.cxx b/svtools/source/control/headbar.cxx index 8913ca006edc..8f5df1b0faea 100644 --- a/svtools/source/control/headbar.cxx +++ b/svtools/source/control/headbar.cxx @@ -1193,9 +1193,9 @@ void HeaderBar::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)) ) { ImplInitSettings( true, true, true ); diff --git a/svtools/source/control/hyperlabel.cxx b/svtools/source/control/hyperlabel.cxx index 5c724842f7d1..a9a28134e6ad 100644 --- a/svtools/source/control/hyperlabel.cxx +++ b/svtools/source/control/hyperlabel.cxx @@ -194,8 +194,8 @@ namespace svt { const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); FixedText::DataChanged( rDCEvt ); - if ((( rDCEvt.GetType() == DATACHANGED_SETTINGS ) || - ( rDCEvt.GetType() == DATACHANGED_DISPLAY )) && + if ((( rDCEvt.GetType() == DataChangedEventType::SETTINGS ) || + ( rDCEvt.GetType() == DataChangedEventType::DISPLAY )) && ( rDCEvt.GetFlags() & SETTINGS_STYLE )) { const Color& rGBColor = GetControlBackground(); diff --git a/svtools/source/control/roadmap.cxx b/svtools/source/control/roadmap.cxx index 7d8705eab97b..1007e27f6c78 100644 --- a/svtools/source/control/roadmap.cxx +++ b/svtools/source/control/roadmap.cxx @@ -652,8 +652,8 @@ namespace svt void ORoadmap::DataChanged( const DataChangedEvent& rDCEvt ) { - if ((( rDCEvt.GetType() == DATACHANGED_SETTINGS ) || - ( rDCEvt.GetType() == DATACHANGED_DISPLAY )) && + if ((( rDCEvt.GetType() == DataChangedEventType::SETTINGS ) || + ( rDCEvt.GetType() == DataChangedEventType::DISPLAY )) && ( rDCEvt.GetFlags() & SETTINGS_STYLE )) { const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); @@ -859,8 +859,8 @@ namespace svt { const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); FixedText::DataChanged( rDCEvt ); - if ((( rDCEvt.GetType() == DATACHANGED_SETTINGS ) || - ( rDCEvt.GetType() == DATACHANGED_DISPLAY )) && + if ((( rDCEvt.GetType() == DataChangedEventType::SETTINGS ) || + ( rDCEvt.GetType() == DataChangedEventType::DISPLAY )) && ( rDCEvt.GetFlags() & SETTINGS_STYLE )) { const Color& rGBColor = GetControlBackground(); diff --git a/svtools/source/control/ruler.cxx b/svtools/source/control/ruler.cxx index 43584cd76acc..249c4add7c46 100644 --- a/svtools/source/control/ruler.cxx +++ b/svtools/source/control/ruler.cxx @@ -2238,10 +2238,10 @@ void Ruler::DataChanged( const DataChangedEvent& rDCEvt ) { Window::DataChanged( rDCEvt ); - if ( (rDCEvt.GetType() == DATACHANGED_FONTS) || - (rDCEvt.GetType() == DATACHANGED_DISPLAY) || - (rDCEvt.GetType() == DATACHANGED_FONTSUBSTITUTION) || - ((rDCEvt.GetType() == DATACHANGED_SETTINGS) && + if ( (rDCEvt.GetType() == DataChangedEventType::FONTS) || + (rDCEvt.GetType() == DataChangedEventType::DISPLAY) || + (rDCEvt.GetType() == DataChangedEventType::FONTSUBSTITUTION) || + ((rDCEvt.GetType() == DataChangedEventType::SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_STYLE)) ) { mbFormat = true; diff --git a/svtools/source/control/scrwin.cxx b/svtools/source/control/scrwin.cxx index e948e2c76144..e638002a5eb9 100644 --- a/svtools/source/control/scrwin.cxx +++ b/svtools/source/control/scrwin.cxx @@ -79,7 +79,7 @@ void ScrollableWindow::Command( const CommandEvent& rCEvt ) void ScrollableWindow::DataChanged( const DataChangedEvent& rDCEvt ) { - if ( (rDCEvt.GetType() == DATACHANGED_SETTINGS) && + if ( (rDCEvt.GetType() == DataChangedEventType::SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_STYLE) ) { Resize(); diff --git a/svtools/source/control/tabbar.cxx b/svtools/source/control/tabbar.cxx index 629e52d6aa70..65bd901f51e3 100644 --- a/svtools/source/control/tabbar.cxx +++ b/svtools/source/control/tabbar.cxx @@ -1602,9 +1602,9 @@ void TabBar::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)) ) { ImplInitSettings( true, true ); diff --git a/svtools/source/control/toolbarmenu.cxx b/svtools/source/control/toolbarmenu.cxx index beb142b21c0a..d7404dcbd611 100644 --- a/svtools/source/control/toolbarmenu.cxx +++ b/svtools/source/control/toolbarmenu.cxx @@ -1513,9 +1513,9 @@ void ToolbarMenu::DataChanged( const DataChangedEvent& rDCEvt ) { DockingWindow::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)) ) { initWindow(); diff --git a/svtools/source/control/valueset.cxx b/svtools/source/control/valueset.cxx index 4c0e80a4f26d..d0f1d7cd830a 100644 --- a/svtools/source/control/valueset.cxx +++ b/svtools/source/control/valueset.cxx @@ -1532,10 +1532,10 @@ void ValueSet::DataChanged( const DataChangedEvent& rDataChangedEvent ) { Control::DataChanged( rDataChangedEvent ); - if ( rDataChangedEvent.GetType() == DATACHANGED_FONTS || - rDataChangedEvent.GetType() == DATACHANGED_DISPLAY || - rDataChangedEvent.GetType() == DATACHANGED_FONTSUBSTITUTION || - (rDataChangedEvent.GetType() == DATACHANGED_SETTINGS && + if ( rDataChangedEvent.GetType() == DataChangedEventType::FONTS || + rDataChangedEvent.GetType() == DataChangedEventType::DISPLAY || + rDataChangedEvent.GetType() == DataChangedEventType::FONTSUBSTITUTION || + (rDataChangedEvent.GetType() == DataChangedEventType::SETTINGS && rDataChangedEvent.GetFlags() & SETTINGS_STYLE) ) { mbFormat = true; diff --git a/svtools/source/dialogs/prnsetup.cxx b/svtools/source/dialogs/prnsetup.cxx index ddadba678879..498f03862ecb 100644 --- a/svtools/source/dialogs/prnsetup.cxx +++ b/svtools/source/dialogs/prnsetup.cxx @@ -323,7 +323,7 @@ bool PrinterSetupDialog::Notify( NotifyEvent& rNEvt ) void PrinterSetupDialog::DataChanged( const DataChangedEvent& rDCEvt ) { - if ( rDCEvt.GetType() == DATACHANGED_PRINTER ) + if ( rDCEvt.GetType() == DataChangedEventType::PRINTER ) { mpTempPrinter = ImplPrnDlgUpdatePrinter( mpPrinter, mpTempPrinter ); Printer* pPrn; diff --git a/svtools/source/toolpanel/paneltabbar.cxx b/svtools/source/toolpanel/paneltabbar.cxx index d8813475f84d..484cc3cc9d5d 100644 --- a/svtools/source/toolpanel/paneltabbar.cxx +++ b/svtools/source/toolpanel/paneltabbar.cxx @@ -1297,7 +1297,7 @@ namespace svt { Control::DataChanged( i_rDataChanedEvent ); - if ( ( i_rDataChanedEvent.GetType() == DATACHANGED_SETTINGS ) + if ( ( i_rDataChanedEvent.GetType() == DataChangedEventType::SETTINGS ) && ( ( i_rDataChanedEvent.GetFlags() & SETTINGS_STYLE ) != 0 ) ) { diff --git a/svtools/source/toolpanel/toolpaneldrawer.cxx b/svtools/source/toolpanel/toolpaneldrawer.cxx index 8fce1ad89f1c..d63840924903 100644 --- a/svtools/source/toolpanel/toolpaneldrawer.cxx +++ b/svtools/source/toolpanel/toolpaneldrawer.cxx @@ -257,7 +257,7 @@ namespace svt switch ( i_rEvent.GetType() ) { - case DATACHANGED_SETTINGS: + case DataChangedEventType::SETTINGS: if ( ( i_rEvent.GetFlags() & SETTINGS_STYLE ) == 0 ) break; SetSettings( Application::GetSettings() ); @@ -265,8 +265,8 @@ namespace svt // fall through. - case DATACHANGED_FONTS: - case DATACHANGED_FONTSUBSTITUTION: + case DataChangedEventType::FONTS: + case DataChangedEventType::FONTSUBSTITUTION: { const StyleSettings& rStyleSettings( GetSettings().GetStyleSettings() ); @@ -288,6 +288,7 @@ namespace svt Invalidate(); } break; + default: break; } } diff --git a/svx/source/dialog/charmap.cxx b/svx/source/dialog/charmap.cxx index 133b84bf68e1..cfc9fbc2a933 100644 --- a/svx/source/dialog/charmap.cxx +++ b/svx/source/dialog/charmap.cxx @@ -119,7 +119,7 @@ void SvxShowCharSet::StateChanged( StateChangedType nType ) void SvxShowCharSet::DataChanged( const DataChangedEvent& rDCEvt ) { - if ( ( rDCEvt.GetType() == DATACHANGED_SETTINGS ) + if ( ( rDCEvt.GetType() == DataChangedEventType::SETTINGS ) && ( rDCEvt.GetFlags() & SETTINGS_STYLE ) ) InitSettings( true, true ); else diff --git a/svx/source/dialog/connctrl.cxx b/svx/source/dialog/connctrl.cxx index 4d2ca798bf79..3d8666160080 100644 --- a/svx/source/dialog/connctrl.cxx +++ b/svx/source/dialog/connctrl.cxx @@ -316,7 +316,7 @@ void SvxXConnectionPreview::DataChanged( const DataChangedEvent& rDCEvt ) { Control::DataChanged( rDCEvt ); - if ( (rDCEvt.GetType() == DATACHANGED_SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_STYLE) ) + if ( (rDCEvt.GetType() == DataChangedEventType::SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_STYLE) ) { SetStyles(); } diff --git a/svx/source/dialog/dialcontrol.cxx b/svx/source/dialog/dialcontrol.cxx index e826363fef4d..d020bad2711e 100644 --- a/svx/source/dialog/dialcontrol.cxx +++ b/svx/source/dialog/dialcontrol.cxx @@ -314,7 +314,7 @@ void DialControl::StateChanged( StateChangedType nStateChange ) void DialControl::DataChanged( const DataChangedEvent& rDCEvt ) { - if( (rDCEvt.GetType() == DATACHANGED_SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_STYLE) ) + if( (rDCEvt.GetType() == DataChangedEventType::SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_STYLE) ) { Init( mpImpl->maWinSize, mpImpl->maWinFont ); InvalidateControl(); diff --git a/svx/source/dialog/dlgctrl.cxx b/svx/source/dialog/dlgctrl.cxx index f4d7d8b76171..93babc456237 100644 --- a/svx/source/dialog/dlgctrl.cxx +++ b/svx/source/dialog/dlgctrl.cxx @@ -374,7 +374,7 @@ void SvxRectCtl::StateChanged( StateChangedType nType ) void SvxRectCtl::DataChanged( const DataChangedEvent& rDCEvt ) { - if ( ( rDCEvt.GetType() == DATACHANGED_SETTINGS ) && ( rDCEvt.GetFlags() & SETTINGS_STYLE ) ) + if ( ( rDCEvt.GetType() == DataChangedEventType::SETTINGS ) && ( rDCEvt.GetFlags() & SETTINGS_STYLE ) ) InitSettings( true, true ); else Window::DataChanged( rDCEvt ); @@ -1914,7 +1914,7 @@ void SvxPreviewBase::DataChanged(const DataChangedEvent& rDCEvt) { SetDrawMode(GetSettings().GetStyleSettings().GetHighContrastMode() ? OUTPUT_DRAWMODE_CONTRAST : OUTPUT_DRAWMODE_COLOR); - if((DATACHANGED_SETTINGS == rDCEvt.GetType()) && (rDCEvt.GetFlags() & SETTINGS_STYLE)) + if((DataChangedEventType::SETTINGS == rDCEvt.GetType()) && (rDCEvt.GetFlags() & SETTINGS_STYLE)) { InitSettings(true, true); } diff --git a/svx/source/dialog/fntctrl.cxx b/svx/source/dialog/fntctrl.cxx index 5188cd086c69..fa40867eb408 100644 --- a/svx/source/dialog/fntctrl.cxx +++ b/svx/source/dialog/fntctrl.cxx @@ -535,7 +535,7 @@ void SvxFontPrevWindow::StateChanged( StateChangedType nType ) void SvxFontPrevWindow::DataChanged( const DataChangedEvent& rDCEvt ) { - if ( ( rDCEvt.GetType() == DATACHANGED_SETTINGS ) && ( rDCEvt.GetFlags() & SETTINGS_STYLE ) ) + if ( ( rDCEvt.GetType() == DataChangedEventType::SETTINGS ) && ( rDCEvt.GetFlags() & SETTINGS_STYLE ) ) InitSettings( true, true ); else Window::DataChanged( rDCEvt ); diff --git a/svx/source/dialog/frmsel.cxx b/svx/source/dialog/frmsel.cxx index 7de05065cdec..9977b60ef788 100644 --- a/svx/source/dialog/frmsel.cxx +++ b/svx/source/dialog/frmsel.cxx @@ -1229,7 +1229,7 @@ void FrameSelector::LoseFocus() void FrameSelector::DataChanged( const DataChangedEvent& rDCEvt ) { Control::DataChanged( rDCEvt ); - if( (rDCEvt.GetType() == DATACHANGED_SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_STYLE) ) + if( (rDCEvt.GetType() == DataChangedEventType::SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_STYLE) ) mxImpl->InitVirtualDevice(); } diff --git a/svx/source/dialog/measctrl.cxx b/svx/source/dialog/measctrl.cxx index 8810a874ba91..a3a0a3f0e4fa 100644 --- a/svx/source/dialog/measctrl.cxx +++ b/svx/source/dialog/measctrl.cxx @@ -159,7 +159,7 @@ void SvxXMeasurePreview::DataChanged( const DataChangedEvent& rDCEvt ) { Control::DataChanged( rDCEvt ); - if ( (rDCEvt.GetType() == DATACHANGED_SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_STYLE) ) + if ( (rDCEvt.GetType() == DataChangedEventType::SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_STYLE) ) { SetDrawMode( GetSettings().GetStyleSettings().GetHighContrastMode() ? OUTPUT_DRAWMODE_CONTRAST : OUTPUT_DRAWMODE_COLOR ); } diff --git a/svx/source/dialog/rubydialog.cxx b/svx/source/dialog/rubydialog.cxx index c44d7b25af9b..0185826436f8 100644 --- a/svx/source/dialog/rubydialog.cxx +++ b/svx/source/dialog/rubydialog.cxx @@ -742,7 +742,7 @@ void SvxRubyDialog::DataChanged( const DataChangedEvent& rDCEvt ) { SfxModelessDialog::DataChanged( rDCEvt ); - if( ( rDCEvt.GetType() == DATACHANGED_SETTINGS ) && ( rDCEvt.GetFlags() & SETTINGS_STYLE ) ) + if( ( rDCEvt.GetType() == DataChangedEventType::SETTINGS ) && ( rDCEvt.GetFlags() & SETTINGS_STYLE ) ) UpdateColors(); } diff --git a/svx/source/dialog/swframeexample.cxx b/svx/source/dialog/swframeexample.cxx index bea9c10078b6..ae5ab7b81015 100644 --- a/svx/source/dialog/swframeexample.cxx +++ b/svx/source/dialog/swframeexample.cxx @@ -90,7 +90,7 @@ void SvxSwFrameExample::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 ) ) InitColors_Impl(); } diff --git a/svx/source/fmcomp/gridctrl.cxx b/svx/source/fmcomp/gridctrl.cxx index 444e322b4f07..60bae53b51d7 100644 --- a/svx/source/fmcomp/gridctrl.cxx +++ b/svx/source/fmcomp/gridctrl.cxx @@ -1005,7 +1005,7 @@ void DbGridControl::StateChanged( StateChangedType nType ) void DbGridControl::DataChanged( const DataChangedEvent& rDCEvt ) { DbGridControl_Base::DataChanged( rDCEvt ); - if ( (rDCEvt.GetType() == DATACHANGED_SETTINGS ) && + if ( (rDCEvt.GetType() == DataChangedEventType::SETTINGS ) && (rDCEvt.GetFlags() & SETTINGS_STYLE) ) { ImplInitWindow( InitAll ); diff --git a/svx/source/gallery2/galbrws1.cxx b/svx/source/gallery2/galbrws1.cxx index 183480dc48eb..75bcc0f7c578 100644 --- a/svx/source/gallery2/galbrws1.cxx +++ b/svx/source/gallery2/galbrws1.cxx @@ -82,7 +82,7 @@ void GalleryThemeListBox::InitSettings() void GalleryThemeListBox::DataChanged( const DataChangedEvent& rDCEvt ) { - if ( ( rDCEvt.GetType() == DATACHANGED_SETTINGS ) && ( rDCEvt.GetFlags() & SETTINGS_STYLE ) ) + if ( ( rDCEvt.GetType() == DataChangedEventType::SETTINGS ) && ( rDCEvt.GetFlags() & SETTINGS_STYLE ) ) InitSettings(); else ListBox::DataChanged( rDCEvt ); diff --git a/svx/source/gallery2/galbrws2.cxx b/svx/source/gallery2/galbrws2.cxx index 84159671b6aa..6e13cf1596c9 100644 --- a/svx/source/gallery2/galbrws2.cxx +++ b/svx/source/gallery2/galbrws2.cxx @@ -507,7 +507,7 @@ void GalleryBrowser2::InitSettings() void GalleryBrowser2::DataChanged( const DataChangedEvent& rDCEvt ) { - if ( ( rDCEvt.GetType() == DATACHANGED_SETTINGS ) && ( rDCEvt.GetFlags() & SETTINGS_STYLE ) ) + if ( ( rDCEvt.GetType() == DataChangedEventType::SETTINGS ) && ( rDCEvt.GetFlags() & SETTINGS_STYLE ) ) InitSettings(); else Control::DataChanged( rDCEvt ); diff --git a/svx/source/gallery2/galctrl.cxx b/svx/source/gallery2/galctrl.cxx index 74d97120c86f..f3c440359beb 100644 --- a/svx/source/gallery2/galctrl.cxx +++ b/svx/source/gallery2/galctrl.cxx @@ -92,7 +92,7 @@ void GalleryPreview::InitSettings() void GalleryPreview::DataChanged( const DataChangedEvent& rDCEvt ) { - if ( ( rDCEvt.GetType() == DATACHANGED_SETTINGS ) && ( rDCEvt.GetFlags() & SETTINGS_STYLE ) ) + if ( ( rDCEvt.GetType() == DataChangedEventType::SETTINGS ) && ( rDCEvt.GetFlags() & SETTINGS_STYLE ) ) InitSettings(); else Window::DataChanged( rDCEvt ); @@ -303,7 +303,7 @@ void GalleryIconView::InitSettings() void GalleryIconView::DataChanged( const DataChangedEvent& rDCEvt ) { - if ( ( rDCEvt.GetType() == DATACHANGED_SETTINGS ) && ( rDCEvt.GetFlags() & SETTINGS_STYLE ) ) + if ( ( rDCEvt.GetType() == DataChangedEventType::SETTINGS ) && ( rDCEvt.GetFlags() & SETTINGS_STYLE ) ) InitSettings(); else ValueSet::DataChanged( rDCEvt ); @@ -445,7 +445,7 @@ void GalleryListView::InitSettings() void GalleryListView::DataChanged( const DataChangedEvent& rDCEvt ) { - if ( ( rDCEvt.GetType() == DATACHANGED_SETTINGS ) && ( rDCEvt.GetFlags() & SETTINGS_STYLE ) ) + if ( ( rDCEvt.GetType() == DataChangedEventType::SETTINGS ) && ( rDCEvt.GetFlags() & SETTINGS_STYLE ) ) InitSettings(); else BrowseBox::DataChanged( rDCEvt ); diff --git a/svx/source/tbxctrls/extrusioncontrols.cxx b/svx/source/tbxctrls/extrusioncontrols.cxx index bb0062f4ad64..50f78bed8e72 100644 --- a/svx/source/tbxctrls/extrusioncontrols.cxx +++ b/svx/source/tbxctrls/extrusioncontrols.cxx @@ -108,7 +108,7 @@ void ExtrusionDirectionWindow::DataChanged( const DataChangedEvent& rDCEvt ) { ToolbarMenu::DataChanged( rDCEvt ); - if( ( rDCEvt.GetType() == DATACHANGED_SETTINGS ) && ( rDCEvt.GetFlags() & SETTINGS_STYLE ) ) + if( ( rDCEvt.GetType() == DataChangedEventType::SETTINGS ) && ( rDCEvt.GetFlags() & SETTINGS_STYLE ) ) { for( sal_uInt16 i = DIRECTION_NW; i <= DIRECTION_SE; i++ ) { @@ -656,7 +656,7 @@ void ExtrusionLightingWindow::DataChanged( const DataChangedEvent& rDCEvt ) { ToolbarMenu::DataChanged( rDCEvt ); - if( ( rDCEvt.GetType() == DATACHANGED_SETTINGS ) && ( rDCEvt.GetFlags() & SETTINGS_STYLE ) ) + if( ( rDCEvt.GetType() == DataChangedEventType::SETTINGS ) && ( rDCEvt.GetFlags() & SETTINGS_STYLE ) ) { implSetDirection( mnDirection, mbDirectionEnabled ); setEntryImage( 0, maImgBright ); diff --git a/svx/source/tbxctrls/fillctrl.cxx b/svx/source/tbxctrls/fillctrl.cxx index ea0d91d7fa8c..89f98d1d39aa 100644 --- a/svx/source/tbxctrls/fillctrl.cxx +++ b/svx/source/tbxctrls/fillctrl.cxx @@ -880,7 +880,7 @@ void FillControl::Resize() void FillControl::DataChanged(const DataChangedEvent& rDCEvt) { - if((rDCEvt.GetType() == DATACHANGED_SETTINGS) && + if((rDCEvt.GetType() == DataChangedEventType::SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_STYLE)) { Size aTypeSize(LogicToPixel(maLogicalFillSize,MAP_APPFONT)); diff --git a/svx/source/tbxctrls/itemwin.cxx b/svx/source/tbxctrls/itemwin.cxx index 2fa69a6c408b..fb35ef0b4db2 100644 --- a/svx/source/tbxctrls/itemwin.cxx +++ b/svx/source/tbxctrls/itemwin.cxx @@ -231,7 +231,7 @@ void SvxLineBox::ReleaseFocus_Impl() void SvxLineBox::DataChanged( const DataChangedEvent& rDCEvt ) { - if ( (rDCEvt.GetType() == DATACHANGED_SETTINGS) && + if ( (rDCEvt.GetType() == DataChangedEventType::SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_STYLE) ) { SetSizePixel(LogicToPixel(aLogicalSize, MAP_APPFONT)); @@ -408,7 +408,7 @@ bool SvxMetricField::Notify( NotifyEvent& rNEvt ) void SvxMetricField::DataChanged( const DataChangedEvent& rDCEvt ) { - if ( (rDCEvt.GetType() == DATACHANGED_SETTINGS) && + if ( (rDCEvt.GetType() == DataChangedEventType::SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_STYLE) ) { SetSizePixel(LogicToPixel(aLogicalSize, MAP_APPFONT)); diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx index aa3b63eb9412..2b1abe607f7c 100644 --- a/svx/source/tbxctrls/tbcontrl.cxx +++ b/svx/source/tbxctrls/tbcontrl.cxx @@ -521,7 +521,7 @@ bool SvxStyleBox_Impl::Notify( NotifyEvent& rNEvt ) void SvxStyleBox_Impl::DataChanged( const DataChangedEvent& rDCEvt ) { - if ( (rDCEvt.GetType() == DATACHANGED_SETTINGS) && + if ( (rDCEvt.GetType() == DataChangedEventType::SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_STYLE) ) { SetSizePixel(LogicToPixel(aLogicalSize, MAP_APPFONT)); @@ -988,15 +988,15 @@ bool SvxFontNameBox_Impl::Notify( NotifyEvent& rNEvt ) void SvxFontNameBox_Impl::DataChanged( const DataChangedEvent& rDCEvt ) { - if ( (rDCEvt.GetType() == DATACHANGED_SETTINGS) && + if ( (rDCEvt.GetType() == DataChangedEventType::SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_STYLE) ) { SetSizePixel(LogicToPixel(aLogicalSize, MAP_APPFONT)); Size aDropSize( aLogicalSize.Width(), LOGICAL_EDIT_HEIGHT); SetDropDownSizePixel(LogicToPixel(aDropSize, MAP_APPFONT)); } - else if ( ( rDCEvt.GetType() == DATACHANGED_FONTS ) || - ( rDCEvt.GetType() == DATACHANGED_DISPLAY ) ) + else if ( ( rDCEvt.GetType() == DataChangedEventType::FONTS ) || + ( rDCEvt.GetType() == DataChangedEventType::DISPLAY ) ) { // The old font list in shell has likely been destroyed at this point, so we need to get // the new one before doing anything further. @@ -1520,7 +1520,7 @@ void SvxFrameWindow_Impl::DataChanged( const DataChangedEvent& rDCEvt ) { SfxPopupWindow::DataChanged( rDCEvt ); - if( ( rDCEvt.GetType() == DATACHANGED_SETTINGS ) && ( rDCEvt.GetFlags() & SETTINGS_STYLE ) ) + if( ( rDCEvt.GetType() == DataChangedEventType::SETTINGS ) && ( rDCEvt.GetFlags() & SETTINGS_STYLE ) ) { aImgList = ImageList( SVX_RES( RID_SVXIL_FRAME ) ); @@ -1830,7 +1830,7 @@ void SvxLineWindow_Impl::DataChanged( const DataChangedEvent& rDCEvt ) { SfxPopupWindow::DataChanged( rDCEvt ); #if 0 - if( ( rDCEvt.GetType() == DATACHANGED_SETTINGS ) && ( rDCEvt.GetFlags() & SETTINGS_STYLE ) ) + if( ( rDCEvt.GetType() == DataChangedEventType::SETTINGS ) && ( rDCEvt.GetFlags() & SETTINGS_STYLE ) ) { CreateBitmaps(); Invalidate(); diff --git a/svx/source/tbxctrls/tbunocontroller.cxx b/svx/source/tbxctrls/tbunocontroller.cxx index 0317b84e8979..0e089f234c09 100644 --- a/svx/source/tbxctrls/tbunocontroller.cxx +++ b/svx/source/tbxctrls/tbunocontroller.cxx @@ -272,7 +272,7 @@ void SvxFontSizeBox_Impl::SetOptimalSize() void SvxFontSizeBox_Impl::DataChanged( const DataChangedEvent& rDCEvt ) { - if ( (rDCEvt.GetType() == DATACHANGED_SETTINGS) && + if ( (rDCEvt.GetType() == DataChangedEventType::SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_STYLE) ) { SetOptimalSize(); diff --git a/sw/source/ui/config/optpage.cxx b/sw/source/ui/config/optpage.cxx index 1a3dad150388..5847c8f9b091 100644 --- a/sw/source/ui/config/optpage.cxx +++ b/sw/source/ui/config/optpage.cxx @@ -1517,7 +1517,7 @@ void SwMarkPreview::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 ) ) InitColors(); } diff --git a/sw/source/ui/envelp/envlop1.cxx b/sw/source/ui/envelp/envlop1.cxx index 908d8739d383..6747f745cfe8 100644 --- a/sw/source/ui/envelp/envlop1.cxx +++ b/sw/source/ui/envelp/envlop1.cxx @@ -65,7 +65,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT vcl::Window* SAL_CALL makeSwEnvPreview(vcl::Wind void SwEnvPreview::DataChanged( const DataChangedEvent& rDCEvt ) { Window::DataChanged( rDCEvt ); - if ( DATACHANGED_SETTINGS == rDCEvt.GetType() ) + if ( DataChangedEventType::SETTINGS == rDCEvt.GetType() ) SetBackground( GetSettings().GetStyleSettings().GetDialogColor() ); } diff --git a/sw/source/ui/frmdlg/column.cxx b/sw/source/ui/frmdlg/column.cxx index 46747c933992..a19251bf127c 100644 --- a/sw/source/ui/frmdlg/column.cxx +++ b/sw/source/ui/frmdlg/column.cxx @@ -1383,7 +1383,7 @@ void ColumnValueSet::UserDraw( const UserDrawEvent& rUDEvt ) void ColumnValueSet::DataChanged( const DataChangedEvent& rDCEvt ) { - if ( (rDCEvt.GetType() == DATACHANGED_SETTINGS) && + if ( (rDCEvt.GetType() == DataChangedEventType::SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_STYLE) ) { Format(); diff --git a/sw/source/ui/frmdlg/wrap.cxx b/sw/source/ui/frmdlg/wrap.cxx index d5d84c64560c..f41265e78f1c 100644 --- a/sw/source/ui/frmdlg/wrap.cxx +++ b/sw/source/ui/frmdlg/wrap.cxx @@ -630,7 +630,7 @@ const sal_uInt16* SwWrapTabPage::GetRanges() void SwWrapTabPage::DataChanged( const DataChangedEvent& rDCEvt ) { - if ( (rDCEvt.GetType() == DATACHANGED_SETTINGS) && + if ( (rDCEvt.GetType() == DataChangedEventType::SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_STYLE) ) ApplyImageList(); diff --git a/sw/source/uibase/docvw/edtwin3.cxx b/sw/source/uibase/docvw/edtwin3.cxx index 558b7dc92086..7b56e3583487 100644 --- a/sw/source/uibase/docvw/edtwin3.cxx +++ b/sw/source/uibase/docvw/edtwin3.cxx @@ -135,7 +135,7 @@ void SwEditWin::DataChanged( const DataChangedEvent& rDCEvt ) pSh->LockView( true ); switch( rDCEvt.GetType() ) { - case DATACHANGED_SETTINGS: + case DataChangedEventType::SETTINGS: // rearrange ScrollBars, respectively trigger resize, because // the ScrollBar size can have change. For that, in the reset // handler, the size of the ScrollBars also has to be queried @@ -149,14 +149,15 @@ void SwEditWin::DataChanged( const DataChangedEvent& rDCEvt ) } break; - case DATACHANGED_PRINTER: - case DATACHANGED_DISPLAY: - case DATACHANGED_FONTS: - case DATACHANGED_FONTSUBSTITUTION: + case DataChangedEventType::PRINTER: + case DataChangedEventType::DISPLAY: + case DataChangedEventType::FONTS: + case DataChangedEventType::FONTSUBSTITUTION: pSh->LockPaint(); bUnlockPaint = true; GetView().GetDocShell()->UpdateFontList(); //e.g. printer change break; + default: break; } pSh->LockView( bViewWasLocked ); if( bUnlockPaint ) diff --git a/sw/source/uibase/docvw/srcedtw.cxx b/sw/source/uibase/docvw/srcedtw.cxx index 34ca9921a31b..586b931c55da 100644 --- a/sw/source/uibase/docvw/srcedtw.cxx +++ b/sw/source/uibase/docvw/srcedtw.cxx @@ -299,7 +299,7 @@ void SwSrcEditWindow::DataChanged( const DataChangedEvent& rDCEvt ) switch ( rDCEvt.GetType() ) { - case DATACHANGED_SETTINGS: + case DataChangedEventType::SETTINGS: // newly rearrange ScrollBars or trigger Resize, because // ScrollBar size could have changed. For this, in the // Resize handler the size of ScrollBars has to be queried @@ -307,6 +307,7 @@ void SwSrcEditWindow::DataChanged( const DataChangedEvent& rDCEvt ) if( rDCEvt.GetFlags() & SETTINGS_STYLE ) Resize(); break; + default: break; } } @@ -368,7 +369,7 @@ void TextViewOutWin::DataChanged( const DataChangedEvent& rDCEvt ) switch( rDCEvt.GetType() ) { - case DATACHANGED_SETTINGS: + case DataChangedEventType::SETTINGS: // query settings if( rDCEvt.GetFlags() & SETTINGS_STYLE ) { @@ -379,6 +380,7 @@ void TextViewOutWin::DataChanged( const DataChangedEvent& rDCEvt ) pTextView->GetTextEngine()->SetFont( aFont ); } break; + default: break; } } diff --git a/sw/source/uibase/ribbar/inputwin.cxx b/sw/source/uibase/ribbar/inputwin.cxx index 46f5a15a3267..d9b2b281eb2a 100644 --- a/sw/source/uibase/ribbar/inputwin.cxx +++ b/sw/source/uibase/ribbar/inputwin.cxx @@ -161,7 +161,7 @@ void SwInputWindow::CleanupUglyHackWithUndo() void SwInputWindow::DataChanged( const DataChangedEvent& rDCEvt ) { - if ( rDCEvt.GetType() == DATACHANGED_SETTINGS && (rDCEvt.GetFlags() & SETTINGS_STYLE) ) + if ( rDCEvt.GetType() == DataChangedEventType::SETTINGS && (rDCEvt.GetFlags() & SETTINGS_STYLE) ) { // update item images SwModule *pMod = SW_MOD(); diff --git a/sw/source/uibase/ribbar/workctrl.cxx b/sw/source/uibase/ribbar/workctrl.cxx index 629ff1513acc..c97682a5dbf9 100644 --- a/sw/source/uibase/ribbar/workctrl.cxx +++ b/sw/source/uibase/ribbar/workctrl.cxx @@ -449,7 +449,7 @@ SwScrollNaviPopup::~SwScrollNaviPopup() void SwScrollNaviPopup::DataChanged( const DataChangedEvent& rDCEvt ) { - if ( (rDCEvt.GetType() == DATACHANGED_SETTINGS) && + if ( (rDCEvt.GetType() == DataChangedEventType::SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_STYLE) ) ApplyImageList(); diff --git a/sw/source/uibase/uiview/pview.cxx b/sw/source/uibase/uiview/pview.cxx index 612b4aa3ba50..d5ad1f28c52e 100644 --- a/sw/source/uibase/uiview/pview.cxx +++ b/sw/source/uibase/uiview/pview.cxx @@ -570,7 +570,7 @@ void SwPagePreviewWin::DataChanged( const DataChangedEvent& rDCEvt ) switch( rDCEvt.GetType() ) { - case DATACHANGED_SETTINGS: + case DataChangedEventType::SETTINGS: // Rearrange the scrollbars or trigger resize, because the // size of the scrollbars may have be changed. Also the // size of the scrollbars has to be retrieved from the settings @@ -581,14 +581,15 @@ void SwPagePreviewWin::DataChanged( const DataChangedEvent& rDCEvt ) lcl_InvalidateZoomSlots(mrView.GetViewFrame()->GetBindings()); break; - case DATACHANGED_PRINTER: - case DATACHANGED_DISPLAY: - case DATACHANGED_FONTS: - case DATACHANGED_FONTSUBSTITUTION: + case DataChangedEventType::PRINTER: + case DataChangedEventType::DISPLAY: + case DataChangedEventType::FONTS: + case DataChangedEventType::FONTSUBSTITUTION: mrView.GetDocShell()->UpdateFontList(); // Font change if ( mpViewShell->GetWin() ) mpViewShell->GetWin()->Invalidate(); break; + default: break; } } diff --git a/sw/source/uibase/utlui/content.cxx b/sw/source/uibase/utlui/content.cxx index 2d83cd945e6c..24042b5e2cc9 100644 --- a/sw/source/uibase/utlui/content.cxx +++ b/sw/source/uibase/utlui/content.cxx @@ -3526,7 +3526,7 @@ void SwContentLBoxString::Paint( void SwContentTree::DataChanged( const DataChangedEvent& rDCEvt ) { - if ( (rDCEvt.GetType() == DATACHANGED_SETTINGS) && + if ( (rDCEvt.GetType() == DataChangedEventType::SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_STYLE) ) { FindActiveTypeAndRemoveUserData(); diff --git a/sw/source/uibase/utlui/glbltree.cxx b/sw/source/uibase/utlui/glbltree.cxx index eb4ffa36c866..f03e4ef14a91 100644 --- a/sw/source/uibase/utlui/glbltree.cxx +++ b/sw/source/uibase/utlui/glbltree.cxx @@ -1246,7 +1246,7 @@ void SwLBoxString::Paint( void SwGlobalTree::DataChanged( const DataChangedEvent& rDCEvt ) { - if ( (rDCEvt.GetType() == DATACHANGED_SETTINGS) && + if ( (rDCEvt.GetType() == DataChangedEventType::SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_STYLE) ) { aEntryImages = ImageList(SW_RES(IMG_NAVI_ENTRYBMP)); diff --git a/sw/source/uibase/utlui/navipi.cxx b/sw/source/uibase/utlui/navipi.cxx index bf04b618250c..674481f6e0ea 100644 --- a/sw/source/uibase/utlui/navipi.cxx +++ b/sw/source/uibase/utlui/navipi.cxx @@ -1348,7 +1348,7 @@ SwNavigationChild::SwNavigationChild( vcl::Window* pParent, void SwNavigationPI::DataChanged( const DataChangedEvent& rDCEvt ) { Window::DataChanged( rDCEvt ); - if ( (rDCEvt.GetType() == DATACHANGED_SETTINGS) && + if ( (rDCEvt.GetType() == DataChangedEventType::SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_STYLE) ) { InitImageList(); diff --git a/toolkit/source/awt/stylesettings.cxx b/toolkit/source/awt/stylesettings.cxx index 5250952e1abb..c65024971664 100644 --- a/toolkit/source/awt/stylesettings.cxx +++ b/toolkit/source/awt/stylesettings.cxx @@ -74,7 +74,7 @@ namespace toolkit if ( !i_pEvent || ( i_pEvent->GetId() != VCLEVENT_WINDOW_DATACHANGED ) ) return 0L; const DataChangedEvent* pDataChangedEvent = static_cast< const DataChangedEvent* >( i_pEvent->GetData() ); - if ( !pDataChangedEvent || ( pDataChangedEvent->GetType() != DATACHANGED_SETTINGS ) ) + if ( !pDataChangedEvent || ( pDataChangedEvent->GetType() != DataChangedEventType::SETTINGS ) ) return 0L; if ( ( pDataChangedEvent->GetFlags() & SETTINGS_STYLE ) == 0 ) return 0L; 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 ); |