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 /sw | |
parent | 4b8f1dc1c8635c412b4669101e8871fa0cf26ff9 (diff) |
fdo#84938: replace DATACHANGED_ constants with 'enum class'
and drop DATACHANGED_DATETIME because no-one is using it
Change-Id: Id5ac9a7fbba0e35501ed82e5252f66858621f7ff
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/ui/config/optpage.cxx | 2 | ||||
-rw-r--r-- | sw/source/ui/envelp/envlop1.cxx | 2 | ||||
-rw-r--r-- | sw/source/ui/frmdlg/column.cxx | 2 | ||||
-rw-r--r-- | sw/source/ui/frmdlg/wrap.cxx | 2 | ||||
-rw-r--r-- | sw/source/uibase/docvw/edtwin3.cxx | 11 | ||||
-rw-r--r-- | sw/source/uibase/docvw/srcedtw.cxx | 6 | ||||
-rw-r--r-- | sw/source/uibase/ribbar/inputwin.cxx | 2 | ||||
-rw-r--r-- | sw/source/uibase/ribbar/workctrl.cxx | 2 | ||||
-rw-r--r-- | sw/source/uibase/uiview/pview.cxx | 11 | ||||
-rw-r--r-- | sw/source/uibase/utlui/content.cxx | 2 | ||||
-rw-r--r-- | sw/source/uibase/utlui/glbltree.cxx | 2 | ||||
-rw-r--r-- | sw/source/uibase/utlui/navipi.cxx | 2 |
12 files changed, 25 insertions, 21 deletions
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(); |