diff options
105 files changed, 446 insertions, 432 deletions
diff --git a/avmedia/source/viewer/mediawindow_impl.cxx b/avmedia/source/viewer/mediawindow_impl.cxx index 3bd2b46595f5..66a625169502 100644 --- a/avmedia/source/viewer/mediawindow_impl.cxx +++ b/avmedia/source/viewer/mediawindow_impl.cxx @@ -639,14 +639,14 @@ void MediaWindowImpl::StateChanged( StateChangedType eType ) // stop playing when going disabled or hidden switch( eType ) { - case STATE_CHANGE_VISIBLE: + case StateChangedType::VISIBLE: { stopPlayingInternal( !IsVisible() ); mxPlayerWindow->setVisible( IsVisible() ); } break; - case STATE_CHANGE_ENABLE: + case StateChangedType::ENABLE: { stopPlayingInternal( !IsEnabled() ); mxPlayerWindow->setEnable( IsEnabled() ); diff --git a/cui/source/dialogs/hangulhanjadlg.cxx b/cui/source/dialogs/hangulhanjadlg.cxx index 4ff53ba2457a..067397cef2e8 100644 --- a/cui/source/dialogs/hangulhanjadlg.cxx +++ b/cui/source/dialogs/hangulhanjadlg.cxx @@ -402,7 +402,7 @@ namespace svx void SuggestionDisplay::StateChanged( StateChangedType nStateChange ) { - if( STATE_CHANGE_VISIBLE == nStateChange ) + if( StateChangedType::VISIBLE == nStateChange ) implUpdateDisplay(); } diff --git a/cui/source/dialogs/iconcdlg.cxx b/cui/source/dialogs/iconcdlg.cxx index b85829c22f08..835829d77b79 100644 --- a/cui/source/dialogs/iconcdlg.cxx +++ b/cui/source/dialogs/iconcdlg.cxx @@ -133,7 +133,7 @@ void IconChoicePage::StateChanged( StateChangedType nType ) { Window::StateChanged( nType ); - if ( nType == STATE_CHANGE_CONTROLBACKGROUND ) + if ( nType == StateChangedType::CONTROLBACKGROUND ) { ImplInitSettings(); Invalidate(); diff --git a/cui/source/options/connpooloptions.cxx b/cui/source/options/connpooloptions.cxx index f905137967c5..7743d8207874 100644 --- a/cui/source/options/connpooloptions.cxx +++ b/cui/source/options/connpooloptions.cxx @@ -220,7 +220,7 @@ namespace offapp void DriverListControl::StateChanged( StateChangedType nStateChange ) { - if (STATE_CHANGE_ENABLE == nStateChange) + if (StateChangedType::ENABLE == nStateChange) Window::Invalidate(INVALIDATE_UPDATE); EditBrowseBox::StateChanged( nStateChange ); } diff --git a/cui/source/tabpages/autocdlg.cxx b/cui/source/tabpages/autocdlg.cxx index 7475cd1af6f9..e52956604e5a 100644 --- a/cui/source/tabpages/autocdlg.cxx +++ b/cui/source/tabpages/autocdlg.cxx @@ -884,7 +884,7 @@ void OfaAutocorrReplacePage::StateChanged(StateChangedType nStateChange) { SfxTabPage::StateChanged(nStateChange); - if (nStateChange == STATE_CHANGE_INITSHOW) + if (nStateChange == StateChangedType::INITSHOW) { setTabs(); } diff --git a/cui/source/tabpages/numfmt.cxx b/cui/source/tabpages/numfmt.cxx index 4121b72341d7..ed1599155ae1 100644 --- a/cui/source/tabpages/numfmt.cxx +++ b/cui/source/tabpages/numfmt.cxx @@ -205,9 +205,9 @@ void SvxNumberPreview::InitSettings( bool bForeground, bool bBackground ) void SvxNumberPreview::StateChanged( StateChangedType nType ) { - if ( nType == STATE_CHANGE_CONTROLFOREGROUND ) + if ( nType == StateChangedType::CONTROLFOREGROUND ) InitSettings( true, false ); - else if ( nType == STATE_CHANGE_CONTROLBACKGROUND ) + else if ( nType == StateChangedType::CONTROLBACKGROUND ) InitSettings( false, true ); Window::StateChanged( nType ); diff --git a/dbaccess/source/ui/browser/dataview.cxx b/dbaccess/source/ui/browser/dataview.cxx index bf06baa5ebbe..393895367739 100644 --- a/dbaccess/source/ui/browser/dataview.cxx +++ b/dbaccess/source/ui/browser/dataview.cxx @@ -143,13 +143,13 @@ namespace dbaui { Window::StateChanged( nType ); - if ( nType == STATE_CHANGE_CONTROLBACKGROUND ) + if ( nType == StateChangedType::CONTROLBACKGROUND ) { // Check if we need to get new images for normal/high contrast mode m_rController.notifyHiContrastChanged(); } - if ( nType == STATE_CHANGE_INITSHOW ) + if ( nType == StateChangedType::INITSHOW ) { // now that there's a view which is finally visible, remove the "Hidden" value from the // model's arguments. diff --git a/dbaccess/source/ui/control/dbtreelistbox.cxx b/dbaccess/source/ui/control/dbtreelistbox.cxx index 0eb0fc5b690a..213933fc4408 100644 --- a/dbaccess/source/ui/control/dbtreelistbox.cxx +++ b/dbaccess/source/ui/control/dbtreelistbox.cxx @@ -663,7 +663,7 @@ IMPL_LINK(DBTreeListBox, OnTimeOut, void*, /*EMPTY_ARG*/) void DBTreeListBox::StateChanged( StateChangedType nStateChange ) { - if ( nStateChange == STATE_CHANGE_VISIBLE ) + if ( nStateChange == StateChangedType::VISIBLE ) implStopSelectionTimer(); } diff --git a/dbaccess/source/ui/dlg/indexdialog.cxx b/dbaccess/source/ui/dlg/indexdialog.cxx index 9f2989efc949..e17a8ed4d3a7 100644 --- a/dbaccess/source/ui/dlg/indexdialog.cxx +++ b/dbaccess/source/ui/dlg/indexdialog.cxx @@ -803,12 +803,12 @@ namespace dbaui { ModalDialog::StateChanged( nType ); - if ( nType == STATE_CHANGE_CONTROLBACKGROUND ) + if ( nType == StateChangedType::CONTROLBACKGROUND ) { // Check if we need to get new images for normal/high contrast mode checkImageList(); } - else if ( nType == STATE_CHANGE_TEXT ) + else if ( nType == StateChangedType::TEXT ) { // The physical toolbar changed its outlook and shows another logical toolbar! // We have to set the correct high contrast mode on the new tbx manager. diff --git a/dbaccess/source/ui/dlg/tablespage.cxx b/dbaccess/source/ui/dlg/tablespage.cxx index 4a34d3809877..4e035515e663 100644 --- a/dbaccess/source/ui/dlg/tablespage.cxx +++ b/dbaccess/source/ui/dlg/tablespage.cxx @@ -111,7 +111,7 @@ namespace dbaui { OGenericAdministrationPage::StateChanged( nType ); - if ( nType == STATE_CHANGE_CONTROLBACKGROUND ) + if ( nType == StateChangedType::CONTROLBACKGROUND ) { // Check if we need to get new images for normal/high contrast mode m_pTablesList->notifyHiContrastChanged(); diff --git a/dbaccess/source/ui/querydesign/JoinTableView.cxx b/dbaccess/source/ui/querydesign/JoinTableView.cxx index 8d64d01840ff..46f0ddb961b6 100644 --- a/dbaccess/source/ui/querydesign/JoinTableView.cxx +++ b/dbaccess/source/ui/querydesign/JoinTableView.cxx @@ -1448,7 +1448,7 @@ void OJoinTableView::StateChanged( StateChangedType nType ) { Window::StateChanged( nType ); - if ( nType == STATE_CHANGE_ZOOM ) + if ( nType == StateChangedType::ZOOM ) { const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); diff --git a/dbaccess/source/ui/querydesign/TableWindow.cxx b/dbaccess/source/ui/querydesign/TableWindow.cxx index 78b212ff2437..418d0d145f74 100644 --- a/dbaccess/source/ui/querydesign/TableWindow.cxx +++ b/dbaccess/source/ui/querydesign/TableWindow.cxx @@ -550,7 +550,7 @@ void OTableWindow::StateChanged( StateChangedType nType ) { Window::StateChanged( nType ); - if ( nType == STATE_CHANGE_ZOOM ) + if ( nType == StateChangedType::ZOOM ) { const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); diff --git a/dbaccess/source/ui/querydesign/TableWindowTitle.cxx b/dbaccess/source/ui/querydesign/TableWindowTitle.cxx index a2a22997de02..4ff6e20b985c 100644 --- a/dbaccess/source/ui/querydesign/TableWindowTitle.cxx +++ b/dbaccess/source/ui/querydesign/TableWindowTitle.cxx @@ -169,7 +169,7 @@ void OTableWindowTitle::StateChanged( StateChangedType nType ) { Window::StateChanged( nType ); - if ( nType == STATE_CHANGE_ZOOM ) + if ( nType == StateChangedType::ZOOM ) { const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); diff --git a/extensions/source/propctrlr/browserpage.cxx b/extensions/source/propctrlr/browserpage.cxx index 8f03f67ea1ca..2e733a9ed727 100644 --- a/extensions/source/propctrlr/browserpage.cxx +++ b/extensions/source/propctrlr/browserpage.cxx @@ -64,7 +64,7 @@ namespace pcr void OBrowserPage::StateChanged(StateChangedType nType) { Window::StateChanged( nType); - if (STATE_CHANGE_VISIBLE == nType) + if (StateChangedType::VISIBLE == nType) m_aListBox.ActivateListBox(IsVisible()); } diff --git a/forms/source/richtext/richtextimplcontrol.hxx b/forms/source/richtext/richtextimplcontrol.hxx index 8153fd201042..5c6c448879b3 100644 --- a/forms/source/richtext/richtextimplcontrol.hxx +++ b/forms/source/richtext/richtextimplcontrol.hxx @@ -127,7 +127,7 @@ namespace frm */ void notifyZoomChanged(); - /** to be called when the STATE_CHANGE_INITSHOW event arrives + /** to be called when the StateChangedType::INITSHOW event arrives */ void notifyInitShow(); diff --git a/forms/source/richtext/richtextvclcontrol.cxx b/forms/source/richtext/richtextvclcontrol.cxx index 5b293b34fcd2..21c8a51ba81c 100644 --- a/forms/source/richtext/richtextvclcontrol.cxx +++ b/forms/source/richtext/richtextvclcontrol.cxx @@ -168,16 +168,16 @@ namespace frm void RichTextControl::StateChanged( StateChangedType _nStateChange ) { - if ( _nStateChange == STATE_CHANGE_STYLE ) + if ( _nStateChange == StateChangedType::STYLE ) { SetStyle( implInitStyle( GetStyle() ) ); m_pImpl->notifyStyleChanged(); } - else if ( _nStateChange == STATE_CHANGE_ZOOM ) + else if ( _nStateChange == StateChangedType::ZOOM ) { m_pImpl->notifyZoomChanged(); } - else if ( _nStateChange == STATE_CHANGE_INITSHOW ) + else if ( _nStateChange == StateChangedType::INITSHOW ) { m_pImpl->notifyInitShow(); } diff --git a/forms/source/solar/control/navtoolbar.cxx b/forms/source/solar/control/navtoolbar.cxx index 7b332a24e79a..779300574404 100644 --- a/forms/source/solar/control/navtoolbar.cxx +++ b/forms/source/solar/control/navtoolbar.cxx @@ -476,23 +476,23 @@ namespace frm switch ( nType ) { - case STATE_CHANGE_ZOOM: + case StateChangedType::ZOOM: // m_pToolbar->SetZoom( GetZoom() ); // forEachItemWindow( setItemWindowZoom, NULL ); // the ToolBox class is not zoomable at the moment, so // we better have no zoom at all instead of only half a zoom ... break; - case STATE_CHANGE_CONTROLFONT: + case StateChangedType::CONTROLFONT: forEachItemWindow( &NavigationToolBar::setItemControlFont, NULL ); forEachItemWindow( &NavigationToolBar::adjustItemWindowWidth, NULL ); break; - case STATE_CHANGE_CONTROLFOREGROUND: + case StateChangedType::CONTROLFOREGROUND: forEachItemWindow( &NavigationToolBar::setItemControlForeground, NULL ); break; - case STATE_CHANGE_MIRRORING: + case StateChangedType::MIRRORING: { sal_Bool bIsRTLEnabled( IsRTLEnabled() ); m_pToolbar->EnableRTL( bIsRTLEnabled ); @@ -500,6 +500,7 @@ namespace frm Resize(); } break; + default:; } } diff --git a/framework/source/uielement/addonstoolbarmanager.cxx b/framework/source/uielement/addonstoolbarmanager.cxx index 82e7596c422d..35abdcab9d43 100644 --- a/framework/source/uielement/addonstoolbarmanager.cxx +++ b/framework/source/uielement/addonstoolbarmanager.cxx @@ -458,7 +458,7 @@ IMPL_LINK_NOARG(AddonsToolBarManager, Deactivate) IMPL_LINK( AddonsToolBarManager, StateChanged, StateChangedType*, pStateChangedType ) { - if ( *pStateChangedType == STATE_CHANGE_CONTROLBACKGROUND ) + if ( *pStateChangedType == StateChangedType::CONTROLBACKGROUND ) { CheckAndUpdateImages(); } diff --git a/framework/source/uielement/toolbarmanager.cxx b/framework/source/uielement/toolbarmanager.cxx index 555d9672ba3b..b9ec5385d099 100644 --- a/framework/source/uielement/toolbarmanager.cxx +++ b/framework/source/uielement/toolbarmanager.cxx @@ -2031,16 +2031,16 @@ IMPL_LINK( ToolBarManager, StateChanged, StateChangedType*, pStateChangedType ) if ( m_bDisposed ) return 1; - if ( *pStateChangedType == STATE_CHANGE_CONTROLBACKGROUND ) + if ( *pStateChangedType == StateChangedType::CONTROLBACKGROUND ) { CheckAndUpdateImages(); } - else if ( *pStateChangedType == STATE_CHANGE_VISIBLE ) + else if ( *pStateChangedType == StateChangedType::VISIBLE ) { if ( m_pToolBar->IsReallyVisible() ) m_aAsyncUpdateControllersTimer.Start(); } - else if ( *pStateChangedType == STATE_CHANGE_INITSHOW ) + else if ( *pStateChangedType == StateChangedType::INITSHOW ) { m_aAsyncUpdateControllersTimer.Start(); } diff --git a/include/svtools/wizdlg.hxx b/include/svtools/wizdlg.hxx index 480032d3b896..a4ab0027cc81 100644 --- a/include/svtools/wizdlg.hxx +++ b/include/svtools/wizdlg.hxx @@ -249,7 +249,7 @@ public: virtual void ActivatePage(); virtual long DeactivatePage(); - virtual void queue_resize(StateChangedType eReason = STATE_CHANGE_LAYOUT) SAL_OVERRIDE; + virtual void queue_resize(StateChangedType eReason = StateChangedType::LAYOUT) SAL_OVERRIDE; bool ShowPrevPage(); bool ShowNextPage(); diff --git a/include/svx/sidebar/PanelLayout.hxx b/include/svx/sidebar/PanelLayout.hxx index 9e8b90aac1fe..93b0030127da 100644 --- a/include/svx/sidebar/PanelLayout.hxx +++ b/include/svx/sidebar/PanelLayout.hxx @@ -36,7 +36,7 @@ public: virtual Size GetOptimalSize() const SAL_OVERRIDE; virtual void setPosSizePixel(long nX, long nY, long nWidth, long nHeight, sal_uInt16 nFlags = WINDOW_POSSIZE_ALL) SAL_OVERRIDE; - virtual void queue_resize(StateChangedType eReason = STATE_CHANGE_LAYOUT) SAL_OVERRIDE; + virtual void queue_resize(StateChangedType eReason = StateChangedType::LAYOUT) SAL_OVERRIDE; }; diff --git a/include/vcl/dialog.hxx b/include/vcl/dialog.hxx index e8b7dce37ca8..c967c95dc43d 100644 --- a/include/vcl/dialog.hxx +++ b/include/vcl/dialog.hxx @@ -87,7 +87,7 @@ public: virtual void StateChanged( StateChangedType nStateChange ) SAL_OVERRIDE; virtual void DataChanged( const DataChangedEvent& rDCEvt ) SAL_OVERRIDE; - virtual void queue_resize(StateChangedType eReason = STATE_CHANGE_LAYOUT) SAL_OVERRIDE; + virtual void queue_resize(StateChangedType eReason = StateChangedType::LAYOUT) SAL_OVERRIDE; virtual bool set_property(const OString &rKey, const OString &rValue) SAL_OVERRIDE; VclButtonBox* get_action_area() { return mpActionArea;} VclBox* get_content_area() { return mpContentArea;} diff --git a/include/vcl/layout.hxx b/include/vcl/layout.hxx index 374a42c6e9fe..0eed7cb6f723 100644 --- a/include/vcl/layout.hxx +++ b/include/vcl/layout.hxx @@ -40,7 +40,7 @@ public: m_bLayoutDirty = true; } - virtual void queue_resize(StateChangedType eReason = STATE_CHANGE_LAYOUT) SAL_OVERRIDE; + virtual void queue_resize(StateChangedType eReason = StateChangedType::LAYOUT) SAL_OVERRIDE; protected: //these are the two that need to be implemented by //containers, figure out how much space you want... diff --git a/include/vcl/syswin.hxx b/include/vcl/syswin.hxx index 11877a000cbb..1f98a6b1d713 100644 --- a/include/vcl/syswin.hxx +++ b/include/vcl/syswin.hxx @@ -189,7 +189,7 @@ public: virtual void Resizing( Size& rSize ); virtual void Resize() SAL_OVERRIDE; virtual Size GetOptimalSize() const SAL_OVERRIDE; - virtual void queue_resize(StateChangedType eReason = STATE_CHANGE_LAYOUT) SAL_OVERRIDE; + virtual void queue_resize(StateChangedType eReason = StateChangedType::LAYOUT) SAL_OVERRIDE; bool isLayoutEnabled() const; void setOptimalLayoutSize(); bool isCalculatingInitialLayoutSize() const { return mbIsCalculatingInitialLayoutSize; } diff --git a/include/vcl/tabctrl.hxx b/include/vcl/tabctrl.hxx index 5351e452e924..526bc25ddfec 100644 --- a/include/vcl/tabctrl.hxx +++ b/include/vcl/tabctrl.hxx @@ -189,7 +189,7 @@ public: mbLayoutDirty = true; } - virtual void queue_resize(StateChangedType eReason = STATE_CHANGE_LAYOUT) SAL_OVERRIDE; + virtual void queue_resize(StateChangedType eReason = StateChangedType::LAYOUT) SAL_OVERRIDE; }; #endif // INCLUDED_VCL_TABCTRL_HXX diff --git a/include/vcl/window.hxx b/include/vcl/window.hxx index 14c23bdfbcff..3e942872364e 100644 --- a/include/vcl/window.hxx +++ b/include/vcl/window.hxx @@ -228,28 +228,30 @@ namespace svt { class PopupWindowControllerImpl; } #define AUTOSCROLL_HORZ ((sal_uInt16)0x0002) // Flags for StateChanged() -typedef sal_uInt16 StateChangedType; -#define STATE_CHANGE_INITSHOW ((StateChangedType)1) -#define STATE_CHANGE_VISIBLE ((StateChangedType)2) -#define STATE_CHANGE_UPDATEMODE ((StateChangedType)3) -#define STATE_CHANGE_ENABLE ((StateChangedType)4) -#define STATE_CHANGE_TEXT ((StateChangedType)5) -#define STATE_CHANGE_IMAGE ((StateChangedType)6) -#define STATE_CHANGE_DATA ((StateChangedType)7) -#define STATE_CHANGE_STATE ((StateChangedType)8) -#define STATE_CHANGE_STYLE ((StateChangedType)9) -#define STATE_CHANGE_ZOOM ((StateChangedType)10) -#define STATE_CHANGE_BORDER ((StateChangedType)11) -#define STATE_CHANGE_TRANSPARENT ((StateChangedType)12) -#define STATE_CHANGE_CONTROLFONT ((StateChangedType)13) -#define STATE_CHANGE_CONTROLFOREGROUND ((StateChangedType)14) -#define STATE_CHANGE_CONTROLBACKGROUND ((StateChangedType)15) -#define STATE_CHANGE_READONLY ((StateChangedType)16) -#define STATE_CHANGE_EXTENDEDSTYLE ((StateChangedType)17) -#define STATE_CHANGE_MIRRORING ((StateChangedType)18) -#define STATE_CHANGE_LAYOUT ((StateChangedType)19) -#define STATE_CHANGE_CONTROL_FOCUS ((StateChangedType)20) -#define STATE_CHANGE_USER ((StateChangedType)10000) +enum class StateChangedType : sal_uInt16 +{ + INITSHOW = 1, + VISIBLE = 2, + UPDATEMODE = 3, + ENABLE = 4, + TEXT = 5, + IMAGE = 6, + DATA = 7, + STATE = 8, + STYLE = 9, + ZOOM = 10, + BORDER = 11, + TRANSPARENT = 12, + CONTROLFONT = 13, + CONTROLFOREGROUND = 14, + CONTROLBACKGROUND = 15, + READONLY = 16, + EXTENDEDSTYLE = 17, + MIRRORING = 18, + LAYOUT = 19, + CONTROL_FOCUS = 20, + USER = 10000 +}; // GetFocusFlags #define GETFOCUS_TAB ((sal_uInt16)0x0001) @@ -1226,7 +1228,7 @@ public: * * akin to gtk_widget_queue_resize */ - virtual void queue_resize(StateChangedType eReason = STATE_CHANGE_LAYOUT); + virtual void queue_resize(StateChangedType eReason = StateChangedType::LAYOUT); /* * Sets the "width-request" property diff --git a/sc/source/ui/app/inputwin.cxx b/sc/source/ui/app/inputwin.cxx index 9b9457f33bed..6393ed3e65b6 100644 --- a/sc/source/ui/app/inputwin.cxx +++ b/sc/source/ui/app/inputwin.cxx @@ -774,7 +774,7 @@ void ScInputWindow::StateChanged( StateChangedType nType ) { ToolBox::StateChanged( nType ); - if ( nType == STATE_CHANGE_INITSHOW ) Resize(); + if ( nType == StateChangedType::INITSHOW ) Resize(); } void ScInputWindow::DataChanged( const DataChangedEvent& rDCEvt ) diff --git a/sc/source/ui/formdlg/dwfunctr.cxx b/sc/source/ui/formdlg/dwfunctr.cxx index e602a5608641..9c03ed77920a 100644 --- a/sc/source/ui/formdlg/dwfunctr.cxx +++ b/sc/source/ui/formdlg/dwfunctr.cxx @@ -581,7 +581,7 @@ void ScFunctionDockWin::SetDescription() aBuf.append(*pDesc->pFuncDesc); aFiFuncDesc.SetText(aBuf.makeStringAndClear()); - aFiFuncDesc.StateChanged(STATE_CHANGE_TEXT); + aFiFuncDesc.StateChanged(StateChangedType::TEXT); aFiFuncDesc.Invalidate(); aFiFuncDesc.Update(); @@ -1105,7 +1105,7 @@ void ScFunctionDockWin::StateChanged( StateChangedType nStateChange ) { SfxDockingWindow::StateChanged( nStateChange ); - if (nStateChange == STATE_CHANGE_INITSHOW) + if (nStateChange == StateChangedType::INITSHOW) { UseSplitterInitPos(); // set initial splitter position if necessary } diff --git a/sc/source/ui/formdlg/privsplt.cxx b/sc/source/ui/formdlg/privsplt.cxx index d111b7970f34..683d3d6285f0 100644 --- a/sc/source/ui/formdlg/privsplt.cxx +++ b/sc/source/ui/formdlg/privsplt.cxx @@ -369,18 +369,18 @@ void ScPrivatSplit::ImplInitSettings( bool bFont, bool bForeground, bool bBackgr void ScPrivatSplit::StateChanged( StateChangedType nType ) { - if ( (nType == STATE_CHANGE_ZOOM) || - (nType == STATE_CHANGE_CONTROLFONT) ) + if ( (nType == StateChangedType::ZOOM) || + (nType == StateChangedType::CONTROLFONT) ) { ImplInitSettings( true, false, false ); Invalidate(); } - if ( nType == STATE_CHANGE_CONTROLFOREGROUND ) + if ( nType == StateChangedType::CONTROLFOREGROUND ) { ImplInitSettings( false, true, false ); Invalidate(); } - else if ( nType == STATE_CHANGE_CONTROLBACKGROUND ) + else if ( nType == StateChangedType::CONTROLBACKGROUND ) { ImplInitSettings( false, false, true ); Invalidate(); diff --git a/sc/source/ui/miscdlgs/anyrefdg.cxx b/sc/source/ui/miscdlgs/anyrefdg.cxx index 0d06e7507067..348dddb6341c 100644 --- a/sc/source/ui/miscdlgs/anyrefdg.cxx +++ b/sc/source/ui/miscdlgs/anyrefdg.cxx @@ -949,7 +949,7 @@ void ScRefHandler::stateChanged(const StateChangedType nStateChange, const bool { if( !bBindRef && !m_bInRefMode ) return; - if(nStateChange == STATE_CHANGE_VISIBLE) + if(nStateChange == StateChangedType::VISIBLE) { if(m_rWindow.IsVisible()) { diff --git a/sc/source/ui/namedlg/namemgrtable.cxx b/sc/source/ui/namedlg/namemgrtable.cxx index a024b72cb7fd..1f37f67291e4 100644 --- a/sc/source/ui/namedlg/namemgrtable.cxx +++ b/sc/source/ui/namedlg/namemgrtable.cxx @@ -75,7 +75,7 @@ void ScRangeManagerTable::StateChanged( StateChangedType nStateChange ) { SvSimpleTable::StateChanged(nStateChange); - if (nStateChange == STATE_CHANGE_INITSHOW) + if (nStateChange == StateChangedType::INITSHOW) { if (GetEntryCount()) { diff --git a/sd/source/ui/animations/CustomAnimationPane.cxx b/sd/source/ui/animations/CustomAnimationPane.cxx index 0c29199b3302..96465a4ff93a 100644 --- a/sd/source/ui/animations/CustomAnimationPane.cxx +++ b/sd/source/ui/animations/CustomAnimationPane.cxx @@ -253,7 +253,7 @@ void CustomAnimationPane::StateChanged( StateChangedType nStateChange ) { Control::StateChanged( nStateChange ); - if( nStateChange == STATE_CHANGE_VISIBLE ) + if( nStateChange == StateChangedType::VISIBLE ) updateMotionPathTags(); } diff --git a/sd/source/ui/dlg/PaneDockingWindow.cxx b/sd/source/ui/dlg/PaneDockingWindow.cxx index cc2dd553bcc4..286f3e1a28c6 100644 --- a/sd/source/ui/dlg/PaneDockingWindow.cxx +++ b/sd/source/ui/dlg/PaneDockingWindow.cxx @@ -53,12 +53,13 @@ void PaneDockingWindow::StateChanged( StateChangedType nType ) { switch (nType) { - case STATE_CHANGE_INITSHOW: + case StateChangedType::INITSHOW: Resize(); GetContentWindow().SetStyle(GetContentWindow().GetStyle() | WB_DIALOGCONTROL); break; - case STATE_CHANGE_VISIBLE: + case StateChangedType::VISIBLE: + { // The visibility of the docking window has changed. Tell the // ConfigurationController so that it can activate or deactivate // a/the view for the pane. @@ -70,7 +71,10 @@ void PaneDockingWindow::StateChanged( StateChangedType nType ) { framework::FrameworkHelper::Instance(*pBase)->UpdateConfiguration(); } - break; + } + break; + + default:; } SfxDockingWindow::StateChanged (nType); } diff --git a/sfx2/source/control/thumbnailview.cxx b/sfx2/source/control/thumbnailview.cxx index 96ae388e3df3..0ee422f94db6 100644 --- a/sfx2/source/control/thumbnailview.cxx +++ b/sfx2/source/control/thumbnailview.cxx @@ -923,36 +923,36 @@ void ThumbnailView::StateChanged( StateChangedType nType ) { Control::StateChanged( nType ); - if ( nType == STATE_CHANGE_INITSHOW ) + if ( nType == StateChangedType::INITSHOW ) { if ( IsReallyVisible() && IsUpdateMode() ) Invalidate(); } - else if ( nType == STATE_CHANGE_UPDATEMODE ) + else if ( nType == StateChangedType::UPDATEMODE ) { if ( IsReallyVisible() && IsUpdateMode() ) Invalidate(); } - else if ( nType == STATE_CHANGE_TEXT ) + else if ( nType == StateChangedType::TEXT ) { } - else if ( (nType == STATE_CHANGE_ZOOM) || - (nType == STATE_CHANGE_CONTROLFONT) ) + else if ( (nType == StateChangedType::ZOOM) || + (nType == StateChangedType::CONTROLFONT) ) { ImplInitSettings( true, false, false ); Invalidate(); } - else if ( nType == STATE_CHANGE_CONTROLFOREGROUND ) + else if ( nType == StateChangedType::CONTROLFOREGROUND ) { ImplInitSettings( false, true, false ); Invalidate(); } - else if ( nType == STATE_CHANGE_CONTROLBACKGROUND ) + else if ( nType == StateChangedType::CONTROLBACKGROUND ) { ImplInitSettings( false, false, true ); Invalidate(); } - else if ( (nType == STATE_CHANGE_STYLE) || (nType == STATE_CHANGE_ENABLE) ) + else if ( (nType == StateChangedType::STYLE) || (nType == StateChangedType::ENABLE) ) { ImplInitSettings( false, false, true ); Invalidate(); diff --git a/sfx2/source/dialog/basedlgs.cxx b/sfx2/source/dialog/basedlgs.cxx index f3d4a3d5a86e..faa709386790 100644 --- a/sfx2/source/dialog/basedlgs.cxx +++ b/sfx2/source/dialog/basedlgs.cxx @@ -196,7 +196,7 @@ void SfxModalDialog::CreateOutputItemSet( const SfxItemSet& rSet ) void SfxModelessDialog::StateChanged( StateChangedType nStateChange ) { - if ( nStateChange == STATE_CHANGE_INITSHOW ) + if ( nStateChange == StateChangedType::INITSHOW ) { if ( !pImp->aWinState.isEmpty() ) { @@ -570,7 +570,7 @@ IMPL_LINK_NOARG(SfxFloatingWindow, TimerHdl) void SfxFloatingWindow::StateChanged( StateChangedType nStateChange ) { - if ( nStateChange == STATE_CHANGE_INITSHOW ) + if ( nStateChange == StateChangedType::INITSHOW ) { // FloatingWindows are not centered by default if ( !pImp->aWinState.isEmpty() ) diff --git a/sfx2/source/dialog/dockwin.cxx b/sfx2/source/dialog/dockwin.cxx index 5124b47a8db2..7129fb300e8b 100644 --- a/sfx2/source/dialog/dockwin.cxx +++ b/sfx2/source/dialog/dockwin.cxx @@ -272,7 +272,7 @@ bool SfxTitleDockingWindow::Notify( NotifyEvent& rNEvt ) void SfxTitleDockingWindow::StateChanged( StateChangedType nType ) { - if ( nType == STATE_CHANGE_INITSHOW ) + if ( nType == StateChangedType::INITSHOW ) { vcl::Window* pWindow = GetWrappedWindow(); if ( pWindow ) @@ -1860,7 +1860,7 @@ void SfxDockingWindow::FadeIn( bool /*bFadeIn*/ ) void SfxDockingWindow::StateChanged( StateChangedType nStateChange ) { - if ( nStateChange == STATE_CHANGE_INITSHOW ) + if ( nStateChange == StateChangedType::INITSHOW ) Initialize_Impl(); DockingWindow::StateChanged( nStateChange ); diff --git a/sfx2/source/dialog/recfloat.cxx b/sfx2/source/dialog/recfloat.cxx index 981cd9ca6dc7..ccb6da5cf6d4 100644 --- a/sfx2/source/dialog/recfloat.cxx +++ b/sfx2/source/dialog/recfloat.cxx @@ -227,7 +227,7 @@ void SfxRecordingFloat_Impl::FillInfo( SfxChildWinInfo& rInfo ) const void SfxRecordingFloat_Impl::StateChanged( StateChangedType nStateChange ) { - if ( nStateChange == STATE_CHANGE_INITSHOW ) + if ( nStateChange == StateChangedType::INITSHOW ) { SfxViewFrame *pFrame = GetBindings().GetDispatcher_Impl()->GetFrame(); vcl::Window* pEditWin = pFrame->GetViewShell()->GetWindow(); diff --git a/sfx2/source/dialog/srchdlg.cxx b/sfx2/source/dialog/srchdlg.cxx index 6e08e6f02c9f..efc3c78009db 100644 --- a/sfx2/source/dialog/srchdlg.cxx +++ b/sfx2/source/dialog/srchdlg.cxx @@ -148,7 +148,7 @@ bool SearchDialog::Close() void SearchDialog::StateChanged( StateChangedType nStateChange ) { - if ( nStateChange == STATE_CHANGE_INITSHOW ) + if ( nStateChange == StateChangedType::INITSHOW ) { if (!m_sWinState.isEmpty()) SetWindowState( m_sWinState ); diff --git a/sfx2/source/dialog/templdlg.cxx b/sfx2/source/dialog/templdlg.cxx index ed3b6a275fbd..688250db96db 100644 --- a/sfx2/source/dialog/templdlg.cxx +++ b/sfx2/source/dialog/templdlg.cxx @@ -436,7 +436,7 @@ SfxChildAlignment SfxTemplatePanelControl::CheckAlignment(SfxChildAlignment eAct void SfxTemplatePanelControl::StateChanged( StateChangedType nStateChange ) { - if ( nStateChange == STATE_CHANGE_INITSHOW ) + if ( nStateChange == StateChangedType::INITSHOW ) { SfxViewFrame *pFrame = mpBindings->GetDispatcher_Impl()->GetFrame(); vcl::Window* pEditWin = pFrame->GetViewShell()->GetWindow(); @@ -2779,7 +2779,7 @@ void SfxCommonTemplateDialog_Impl::ReplaceUpdateButtonByMenu() void SfxTemplateDialog::StateChanged( StateChangedType nStateChange ) { - if ( nStateChange == STATE_CHANGE_INITSHOW ) + if ( nStateChange == StateChangedType::INITSHOW ) { SfxViewFrame *pFrame = GetBindings().GetDispatcher_Impl()->GetFrame(); vcl::Window* pEditWin = pFrame->GetViewShell()->GetWindow(); diff --git a/sfx2/source/dialog/titledockwin.cxx b/sfx2/source/dialog/titledockwin.cxx index 65882136b12b..5ada9dd90cc6 100644 --- a/sfx2/source/dialog/titledockwin.cxx +++ b/sfx2/source/dialog/titledockwin.cxx @@ -284,9 +284,10 @@ namespace sfx2 { switch ( i_nType ) { - case STATE_CHANGE_INITSHOW: + case StateChangedType::INITSHOW: impl_scheduleLayout(); break; + default:; } SfxDockingWindow::StateChanged( i_nType ); } diff --git a/sfx2/source/view/frame2.cxx b/sfx2/source/view/frame2.cxx index 5701c33ed695..7be4839992fc 100644 --- a/sfx2/source/view/frame2.cxx +++ b/sfx2/source/view/frame2.cxx @@ -186,7 +186,7 @@ void SfxFrameWindow_Impl::Resize() void SfxFrameWindow_Impl::StateChanged( StateChangedType nStateChange ) { - if ( nStateChange == STATE_CHANGE_INITSHOW ) + if ( nStateChange == StateChangedType::INITSHOW ) { pFrame->pImp->bHidden = false; if ( pFrame->IsInPlace() ) diff --git a/sfx2/source/view/viewfrm2.cxx b/sfx2/source/view/viewfrm2.cxx index 60bee868f016..531f1b433ac3 100644 --- a/sfx2/source/view/viewfrm2.cxx +++ b/sfx2/source/view/viewfrm2.cxx @@ -58,7 +58,7 @@ using ::com::sun::star::lang::XComponent; void SfxFrameViewWindow_Impl::StateChanged( StateChangedType nStateChange ) { - if ( nStateChange == STATE_CHANGE_INITSHOW ) + if ( nStateChange == StateChangedType::INITSHOW ) { SfxObjectShell* pDoc = pFrame->GetObjectShell(); if ( pDoc && !pFrame->IsVisible() ) diff --git a/starmath/source/toolbox.cxx b/starmath/source/toolbox.cxx index 455441f4ab61..04a93553be68 100644 --- a/starmath/source/toolbox.cxx +++ b/starmath/source/toolbox.cxx @@ -201,7 +201,7 @@ void SmToolBoxWindow::DataChanged( const DataChangedEvent &rEvt ) void SmToolBoxWindow::StateChanged( StateChangedType nStateChange ) { static bool bSetPosition = true; - if (STATE_CHANGE_INITSHOW == nStateChange) + if (StateChangedType::INITSHOW == nStateChange) { SetCategory( nActiveCategoryRID == USHRT_MAX ? RID_UNBINOPS_CAT : nActiveCategoryRID ); diff --git a/starmath/source/view.cxx b/starmath/source/view.cxx index c023365333a1..f9c77ca2b4ca 100644 --- a/starmath/source/view.cxx +++ b/starmath/source/view.cxx @@ -128,7 +128,7 @@ SmGraphicWindow::~SmGraphicWindow() void SmGraphicWindow::StateChanged( StateChangedType eType ) { - if ( eType == STATE_CHANGE_INITSHOW ) + if ( eType == StateChangedType::INITSHOW ) Show(); ScrollableWindow::StateChanged( eType ); } @@ -796,7 +796,7 @@ SfxChildAlignment SmCmdBoxWindow::CheckAlignment(SfxChildAlignment eActual, void SmCmdBoxWindow::StateChanged( StateChangedType nStateChange ) { - if (STATE_CHANGE_INITSHOW == nStateChange) + if (StateChangedType::INITSHOW == nStateChange) { Resize(); // avoid SmEditWindow not being painted correctly diff --git a/svtools/source/brwbox/brwbox1.cxx b/svtools/source/brwbox/brwbox1.cxx index e69a4e0f8450..f7374bf91db1 100644 --- a/svtools/source/brwbox/brwbox1.cxx +++ b/svtools/source/brwbox/brwbox1.cxx @@ -2329,7 +2329,7 @@ void BrowseBox::SetMode( BrowserMode nMode ) if ( bBootstrapped ) { - StateChanged( STATE_CHANGE_INITSHOW ); + StateChanged( StateChangedType::INITSHOW ); if ( bMultiSelection && !pOldRowSel && nOldRowSel != BROWSER_ENDOFSELECTION ) uRow.pSel->Select( nOldRowSel ); diff --git a/svtools/source/brwbox/brwbox2.cxx b/svtools/source/brwbox/brwbox2.cxx index d4c0e7d46f4e..d04a6182e912 100644 --- a/svtools/source/brwbox/brwbox2.cxx +++ b/svtools/source/brwbox/brwbox2.cxx @@ -131,7 +131,7 @@ void BrowseBox::StateChanged( StateChangedType nStateChange ) { Control::StateChanged( nStateChange ); - if ( STATE_CHANGE_MIRRORING == nStateChange ) + if ( StateChangedType::MIRRORING == nStateChange ) { getDataWindow()->EnableRTL( IsRTLEnabled() ); @@ -143,7 +143,7 @@ void BrowseBox::StateChanged( StateChangedType nStateChange ) pVScroll->EnableRTL( IsRTLEnabled() ); Resize(); } - else if ( STATE_CHANGE_INITSHOW == nStateChange ) + else if ( StateChangedType::INITSHOW == nStateChange ) { bBootstrapped = true; // must be set first! @@ -165,7 +165,7 @@ void BrowseBox::StateChanged( StateChangedType nStateChange ) AutoSizeLastColumn(); CursorMoved(); } - else if (STATE_CHANGE_ZOOM == nStateChange) + else if (StateChangedType::ZOOM == nStateChange) { pDataWin->SetZoom(GetZoom()); HeaderBar* pHeaderBar = getDataWindow()->pHeaderBar; @@ -183,7 +183,7 @@ void BrowseBox::StateChanged( StateChangedType nStateChange ) // all our controls have to be repositioned Resize(); } - else if (STATE_CHANGE_ENABLE == nStateChange) + else if (StateChangedType::ENABLE == nStateChange) { // do we have a handle column? bool bHandleCol = !pCols->empty() && (0 == (*pCols)[ 0 ]->GetId()); @@ -536,7 +536,7 @@ void BrowseBox::ExpandRowSelection( const BrowserMouseEvent& rEvt ) void BrowseBox::Resize() { if ( !bBootstrapped && IsReallyVisible() ) - BrowseBox::StateChanged( STATE_CHANGE_INITSHOW ); + BrowseBox::StateChanged( StateChangedType::INITSHOW ); if ( pCols->empty() ) { getDataWindow()->bResizeOnPaint = true; @@ -616,7 +616,7 @@ void BrowseBox::Paint( const Rectangle& rRect ) // initializations if ( !bBootstrapped && IsReallyVisible() ) - BrowseBox::StateChanged( STATE_CHANGE_INITSHOW ); + BrowseBox::StateChanged( StateChangedType::INITSHOW ); if ( pCols->empty() ) return; @@ -1104,7 +1104,7 @@ void BrowseBox::ImplPaintData(OutputDevice& _rOut, const Rectangle& _rRect, bool void BrowseBox::PaintData( vcl::Window& rWin, const Rectangle& rRect ) { if ( !bBootstrapped && IsReallyVisible() ) - BrowseBox::StateChanged( STATE_CHANGE_INITSHOW ); + BrowseBox::StateChanged( StateChangedType::INITSHOW ); // initializations if ( !pCols || pCols->empty() || !rWin.IsUpdateMode() ) diff --git a/svtools/source/brwbox/ebbcontrols.cxx b/svtools/source/brwbox/ebbcontrols.cxx index 86281790a647..2d12692c74a2 100644 --- a/svtools/source/brwbox/ebbcontrols.cxx +++ b/svtools/source/brwbox/ebbcontrols.cxx @@ -299,7 +299,7 @@ namespace svt void CheckBoxControl::StateChanged( StateChangedType nStateChange ) { Control::StateChanged(nStateChange); - if ( nStateChange == STATE_CHANGE_ZOOM ) + if ( nStateChange == StateChangedType::ZOOM ) pBox->SetZoom(GetZoom()); } diff --git a/svtools/source/brwbox/editbrowsebox.cxx b/svtools/source/brwbox/editbrowsebox.cxx index f9fe560da615..e009e82c885d 100644 --- a/svtools/source/brwbox/editbrowsebox.cxx +++ b/svtools/source/brwbox/editbrowsebox.cxx @@ -755,31 +755,31 @@ namespace svt BrowseBox::StateChanged( nType ); bool bNeedCellReActivation = false; - if ( nType == STATE_CHANGE_MIRRORING ) + if ( nType == StateChangedType::MIRRORING ) { bNeedCellReActivation = true; } - else if ( nType == STATE_CHANGE_ZOOM ) + else if ( nType == StateChangedType::ZOOM ) { ImplInitSettings( true, false, false ); bNeedCellReActivation = true; } - else if ( nType == STATE_CHANGE_CONTROLFONT ) + else if ( nType == StateChangedType::CONTROLFONT ) { ImplInitSettings( true, false, false ); Invalidate(); } - else if ( nType == STATE_CHANGE_CONTROLFOREGROUND ) + else if ( nType == StateChangedType::CONTROLFOREGROUND ) { ImplInitSettings( false, true, false ); Invalidate(); } - else if ( nType == STATE_CHANGE_CONTROLBACKGROUND ) + else if ( nType == StateChangedType::CONTROLBACKGROUND ) { ImplInitSettings( false, false, true ); Invalidate(); } - else if (nType == STATE_CHANGE_STYLE) + else if (nType == StateChangedType::STYLE) { WinBits nStyle = GetStyle(); if (!(nStyle & WB_NOTABSTOP) ) diff --git a/svtools/source/contnr/fileview.cxx b/svtools/source/contnr/fileview.cxx index 1d2e63d33734..974ac7a20079 100644 --- a/svtools/source/contnr/fileview.cxx +++ b/svtools/source/contnr/fileview.cxx @@ -1487,7 +1487,7 @@ void SvtFileView::SetConfigString( const OUString& rCfgStr ) void SvtFileView::StateChanged( StateChangedType nStateChange ) { - if ( nStateChange == STATE_CHANGE_ENABLE ) + if ( nStateChange == StateChangedType::ENABLE ) Invalidate(); Control::StateChanged( nStateChange ); } diff --git a/svtools/source/contnr/treelistbox.cxx b/svtools/source/contnr/treelistbox.cxx index 35c47af64bb8..59c18fd615a6 100644 --- a/svtools/source/contnr/treelistbox.cxx +++ b/svtools/source/contnr/treelistbox.cxx @@ -3784,12 +3784,12 @@ void SvTreeListBox::DataChanged( const DataChangedEvent& rDCEvt ) void SvTreeListBox::StateChanged( StateChangedType eType ) { - if( eType == STATE_CHANGE_ENABLE ) + if( eType == StateChangedType::ENABLE ) Invalidate( INVALIDATE_CHILDREN ); Control::StateChanged( eType ); - if ( eType == STATE_CHANGE_STYLE ) + if ( eType == StateChangedType::STYLE ) ImplInitStyle(); } diff --git a/svtools/source/control/calendar.cxx b/svtools/source/control/calendar.cxx index ff3a748a4475..348f9d741289 100644 --- a/svtools/source/control/calendar.cxx +++ b/svtools/source/control/calendar.cxx @@ -1759,7 +1759,7 @@ void Calendar::StateChanged( StateChangedType nType ) { Control::StateChanged( nType ); - if ( nType == STATE_CHANGE_INITSHOW ) + if ( nType == StateChangedType::INITSHOW ) ImplFormat(); } @@ -2540,7 +2540,7 @@ void CalendarField::StateChanged( StateChangedType nStateChange ) { DateField::StateChanged( nStateChange ); - if ( ( nStateChange == STATE_CHANGE_STYLE ) && GetSubEdit() ) + if ( ( nStateChange == StateChangedType::STYLE ) && GetSubEdit() ) { WinBits nAllAlignmentBits = ( WB_LEFT | WB_CENTER | WB_RIGHT | WB_TOP | WB_VCENTER | WB_BOTTOM ); WinBits nMyAlignment = GetStyle() & nAllAlignmentBits; diff --git a/svtools/source/control/filectrl.cxx b/svtools/source/control/filectrl.cxx index f6df0e4fac02..cf72f0f2080a 100644 --- a/svtools/source/control/filectrl.cxx +++ b/svtools/source/control/filectrl.cxx @@ -108,21 +108,21 @@ OUString FileControl::GetText() const void FileControl::StateChanged( StateChangedType nType ) { - if ( nType == STATE_CHANGE_ENABLE ) + if ( nType == StateChangedType::ENABLE ) { maEdit.Enable( IsEnabled() ); maButton.Enable( IsEnabled() ); } - else if ( nType == STATE_CHANGE_ZOOM ) + else if ( nType == StateChangedType::ZOOM ) { GetEdit().SetZoom( GetZoom() ); GetButton().SetZoom( GetZoom() ); } - else if ( nType == STATE_CHANGE_STYLE ) + else if ( nType == StateChangedType::STYLE ) { SetStyle( ImplInitStyle( GetStyle() ) ); } - else if ( nType == STATE_CHANGE_CONTROLFONT ) + else if ( nType == StateChangedType::CONTROLFONT ) { GetEdit().SetControlFont( GetControlFont() ); // Only use height of the button, as in HTML @@ -131,12 +131,12 @@ void FileControl::StateChanged( StateChangedType nType ) aFont.SetSize( GetControlFont().GetSize() ); GetButton().SetControlFont( aFont ); } - else if ( nType == STATE_CHANGE_CONTROLFOREGROUND ) + else if ( nType == StateChangedType::CONTROLFOREGROUND ) { GetEdit().SetControlForeground( GetControlForeground() ); GetButton().SetControlForeground( GetControlForeground() ); } - else if ( nType == STATE_CHANGE_CONTROLBACKGROUND ) + else if ( nType == StateChangedType::CONTROLBACKGROUND ) { GetEdit().SetControlBackground( GetControlBackground() ); GetButton().SetControlBackground( GetControlBackground() ); diff --git a/svtools/source/control/headbar.cxx b/svtools/source/control/headbar.cxx index b5d56bac97b3..82a9bb02d94e 100644 --- a/svtools/source/control/headbar.cxx +++ b/svtools/source/control/headbar.cxx @@ -1166,20 +1166,20 @@ void HeaderBar::StateChanged( StateChangedType nType ) { Window::StateChanged( nType ); - if ( nType == STATE_CHANGE_ENABLE ) + if ( nType == StateChangedType::ENABLE ) Invalidate(); - else if ( (nType == STATE_CHANGE_ZOOM) || - (nType == STATE_CHANGE_CONTROLFONT) ) + else if ( (nType == StateChangedType::ZOOM) || + (nType == StateChangedType::CONTROLFONT) ) { ImplInitSettings( true, false, false ); Invalidate(); } - else if ( nType == STATE_CHANGE_CONTROLFOREGROUND ) + else if ( nType == StateChangedType::CONTROLFOREGROUND ) { ImplInitSettings( false, true, false ); Invalidate(); } - else if ( nType == STATE_CHANGE_CONTROLBACKGROUND ) + else if ( nType == StateChangedType::CONTROLBACKGROUND ) { ImplInitSettings( false, false, true ); Invalidate(); diff --git a/svtools/source/control/ruler.cxx b/svtools/source/control/ruler.cxx index a74ce2d4fcae..f25a0e6a50d5 100644 --- a/svtools/source/control/ruler.cxx +++ b/svtools/source/control/ruler.cxx @@ -2199,25 +2199,25 @@ void Ruler::StateChanged( StateChangedType nType ) { Window::StateChanged( nType ); - if ( nType == STATE_CHANGE_INITSHOW ) + if ( nType == StateChangedType::INITSHOW ) ImplFormat(); - else if ( nType == STATE_CHANGE_UPDATEMODE ) + else if ( nType == StateChangedType::UPDATEMODE ) { if ( IsReallyVisible() && IsUpdateMode() ) Paint(Rectangle()); } - else if ( (nType == STATE_CHANGE_ZOOM) || - (nType == STATE_CHANGE_CONTROLFONT) ) + else if ( (nType == StateChangedType::ZOOM) || + (nType == StateChangedType::CONTROLFONT) ) { ImplInitSettings( true, false, false ); Invalidate(); } - else if ( nType == STATE_CHANGE_CONTROLFOREGROUND ) + else if ( nType == StateChangedType::CONTROLFOREGROUND ) { ImplInitSettings( false, true, false ); Invalidate(); } - else if ( nType == STATE_CHANGE_CONTROLBACKGROUND ) + else if ( nType == StateChangedType::CONTROLBACKGROUND ) { ImplInitSettings( false, false, true ); Invalidate(); diff --git a/svtools/source/control/tabbar.cxx b/svtools/source/control/tabbar.cxx index 9c4fc546657c..20d570b0e7c1 100644 --- a/svtools/source/control/tabbar.cxx +++ b/svtools/source/control/tabbar.cxx @@ -1558,25 +1558,25 @@ void TabBar::StateChanged( StateChangedType nType ) { Window::StateChanged( nType ); - if ( nType == STATE_CHANGE_INITSHOW ) + if ( nType == StateChangedType::INITSHOW ) { if ( (mbSizeFormat || mbFormat) && !mpItemList->empty() ) ImplFormat(); } - else if ( (nType == STATE_CHANGE_ZOOM) || - (nType == STATE_CHANGE_CONTROLFONT) ) + else if ( (nType == StateChangedType::ZOOM) || + (nType == StateChangedType::CONTROLFONT) ) { ImplInitSettings( true, false ); Invalidate(); } - else if ( nType == STATE_CHANGE_CONTROLFOREGROUND ) + else if ( nType == StateChangedType::CONTROLFOREGROUND ) Invalidate(); - else if ( nType == STATE_CHANGE_CONTROLBACKGROUND ) + else if ( nType == StateChangedType::CONTROLBACKGROUND ) { ImplInitSettings( false, true ); Invalidate(); } - else if ( nType == STATE_CHANGE_MIRRORING ) + else if ( nType == StateChangedType::MIRRORING ) { // reacts on calls of EnableRTL, have to mirror all child controls if( mpFirstBtn ) mpFirstBtn->EnableRTL( IsRTLEnabled() ); diff --git a/svtools/source/control/toolbarmenu.cxx b/svtools/source/control/toolbarmenu.cxx index b28a9e4953e9..cb016846b3d5 100644 --- a/svtools/source/control/toolbarmenu.cxx +++ b/svtools/source/control/toolbarmenu.cxx @@ -1512,7 +1512,7 @@ void ToolbarMenu::StateChanged( StateChangedType nType ) { DockingWindow::StateChanged( nType ); - if ( ( nType == STATE_CHANGE_CONTROLFOREGROUND ) || ( nType == STATE_CHANGE_CONTROLBACKGROUND ) ) + if ( ( nType == StateChangedType::CONTROLFOREGROUND ) || ( nType == StateChangedType::CONTROLBACKGROUND ) ) { initWindow(); Invalidate(); diff --git a/svtools/source/control/valueset.cxx b/svtools/source/control/valueset.cxx index 9bdd65a34705..a0d84467386a 100644 --- a/svtools/source/control/valueset.cxx +++ b/svtools/source/control/valueset.cxx @@ -1486,17 +1486,17 @@ void ValueSet::StateChanged( StateChangedType nType ) { Control::StateChanged( nType ); - if ( nType == STATE_CHANGE_INITSHOW ) + if ( nType == StateChangedType::INITSHOW ) { if ( mbFormat ) Format(); } - else if ( nType == STATE_CHANGE_UPDATEMODE ) + else if ( nType == StateChangedType::UPDATEMODE ) { if ( IsReallyVisible() && IsUpdateMode() ) Invalidate(); } - else if ( nType == STATE_CHANGE_TEXT ) + else if ( nType == StateChangedType::TEXT ) { if ( mpNoneItem.get() && !mbFormat && IsReallyVisible() && IsUpdateMode() ) { @@ -1504,23 +1504,23 @@ void ValueSet::StateChanged( StateChangedType nType ) Invalidate( maNoneItemRect ); } } - else if ( (nType == STATE_CHANGE_ZOOM) || - (nType == STATE_CHANGE_CONTROLFONT) ) + else if ( (nType == StateChangedType::ZOOM) || + (nType == StateChangedType::CONTROLFONT) ) { ImplInitSettings( true, false, false ); Invalidate(); } - else if ( nType == STATE_CHANGE_CONTROLFOREGROUND ) + else if ( nType == StateChangedType::CONTROLFOREGROUND ) { ImplInitSettings( false, true, false ); Invalidate(); } - else if ( nType == STATE_CHANGE_CONTROLBACKGROUND ) + else if ( nType == StateChangedType::CONTROLBACKGROUND ) { ImplInitSettings( false, false, true ); Invalidate(); } - else if ( (nType == STATE_CHANGE_STYLE) || (nType == STATE_CHANGE_ENABLE) ) + else if ( (nType == StateChangedType::STYLE) || (nType == StateChangedType::ENABLE) ) { mbFormat = true; ImplInitSettings( false, false, true ); diff --git a/svtools/source/dialogs/wizdlg.cxx b/svtools/source/dialogs/wizdlg.cxx index 54febf2b8797..8b0b3d5ede1e 100644 --- a/svtools/source/dialogs/wizdlg.cxx +++ b/svtools/source/dialogs/wizdlg.cxx @@ -391,7 +391,7 @@ void WizardDialog::Resize() void WizardDialog::StateChanged( StateChangedType nType ) { - if ( nType == STATE_CHANGE_INITSHOW ) + if ( nType == StateChangedType::INITSHOW ) { if ( IsDefaultSize() ) { diff --git a/svtools/source/table/tablecontrol.cxx b/svtools/source/table/tablecontrol.cxx index 9afa63df04cc..eefe81ab2ea5 100644 --- a/svtools/source/table/tablecontrol.cxx +++ b/svtools/source/table/tablecontrol.cxx @@ -122,30 +122,31 @@ namespace svt { namespace table // forward certain settings to the data window switch ( i_nStateChange ) { - case STATE_CHANGE_CONTROL_FOCUS: + case StateChangedType::CONTROL_FOCUS: m_pImpl->invalidateSelectedRows(); break; - case STATE_CHANGE_CONTROLBACKGROUND: + case StateChangedType::CONTROLBACKGROUND: if ( IsControlBackground() ) getDataWindow().SetControlBackground( GetControlBackground() ); else getDataWindow().SetControlBackground(); break; - case STATE_CHANGE_CONTROLFOREGROUND: + case StateChangedType::CONTROLFOREGROUND: if ( IsControlForeground() ) getDataWindow().SetControlForeground( GetControlForeground() ); else getDataWindow().SetControlForeground(); break; - case STATE_CHANGE_CONTROLFONT: + case StateChangedType::CONTROLFONT: if ( IsControlFont() ) getDataWindow().SetControlFont( GetControlFont() ); else getDataWindow().SetControlFont(); break; + default:; } } diff --git a/svx/source/dialog/charmap.cxx b/svx/source/dialog/charmap.cxx index 62418f043dd2..b72821245796 100644 --- a/svx/source/dialog/charmap.cxx +++ b/svx/source/dialog/charmap.cxx @@ -107,9 +107,9 @@ void SvxShowCharSet::LoseFocus() void SvxShowCharSet::StateChanged( StateChangedType nType ) { - if ( nType == STATE_CHANGE_CONTROLFOREGROUND ) + if ( nType == StateChangedType::CONTROLFOREGROUND ) InitSettings( true, false ); - else if ( nType == STATE_CHANGE_CONTROLBACKGROUND ) + else if ( nType == StateChangedType::CONTROLBACKGROUND ) InitSettings( false, true ); Control::StateChanged( nType ); diff --git a/svx/source/dialog/dialcontrol.cxx b/svx/source/dialog/dialcontrol.cxx index c14125ddb0e6..e826363fef4d 100644 --- a/svx/source/dialog/dialcontrol.cxx +++ b/svx/source/dialog/dialcontrol.cxx @@ -294,7 +294,7 @@ void DialControl::Paint( const Rectangle& ) void DialControl::StateChanged( StateChangedType nStateChange ) { - if( nStateChange == STATE_CHANGE_ENABLE ) + if( nStateChange == StateChangedType::ENABLE ) InvalidateControl(); // update the linked edit field @@ -303,8 +303,9 @@ void DialControl::StateChanged( StateChangedType nStateChange ) NumericField& rField = *mpImpl->mpLinkField; switch( nStateChange ) { - case STATE_CHANGE_VISIBLE: rField.Show( IsVisible() ); break; - case STATE_CHANGE_ENABLE: rField.Enable( IsEnabled() ); break; + case StateChangedType::VISIBLE: rField.Show( IsVisible() ); break; + case StateChangedType::ENABLE: rField.Enable( IsEnabled() ); break; + default:; } } diff --git a/svx/source/dialog/dlgctrl.cxx b/svx/source/dialog/dlgctrl.cxx index 10b7f40f0679..6290079307d1 100644 --- a/svx/source/dialog/dlgctrl.cxx +++ b/svx/source/dialog/dlgctrl.cxx @@ -361,9 +361,9 @@ void SvxRectCtl::KeyInput( const KeyEvent& rKeyEvt ) void SvxRectCtl::StateChanged( StateChangedType nType ) { - if ( nType == STATE_CHANGE_CONTROLFOREGROUND ) + if ( nType == StateChangedType::CONTROLFOREGROUND ) InitSettings( true, false ); - else if ( nType == STATE_CHANGE_CONTROLBACKGROUND ) + else if ( nType == StateChangedType::CONTROLBACKGROUND ) InitSettings( false, true ); Window::StateChanged( nType ); @@ -1899,11 +1899,11 @@ void SvxPreviewBase::StateChanged(StateChangedType nType) { Control::StateChanged(nType); - if(STATE_CHANGE_CONTROLFOREGROUND == nType) + if(StateChangedType::CONTROLFOREGROUND == nType) { InitSettings(true, false); } - else if(STATE_CHANGE_CONTROLBACKGROUND == nType) + else if(StateChangedType::CONTROLBACKGROUND == nType) { InitSettings(false, true); } diff --git a/svx/source/dialog/fntctrl.cxx b/svx/source/dialog/fntctrl.cxx index 5e20a83fad8f..fc7656920688 100644 --- a/svx/source/dialog/fntctrl.cxx +++ b/svx/source/dialog/fntctrl.cxx @@ -522,9 +522,9 @@ SvxFont& SvxFontPrevWindow::GetCJKFont() void SvxFontPrevWindow::StateChanged( StateChangedType nType ) { - if ( nType == STATE_CHANGE_CONTROLFOREGROUND ) + if ( nType == StateChangedType::CONTROLFOREGROUND ) InitSettings( true, false ); - else if ( nType == STATE_CHANGE_CONTROLBACKGROUND ) + else if ( nType == StateChangedType::CONTROLBACKGROUND ) InitSettings( false, true ); Window::StateChanged( nType ); diff --git a/svx/source/fmcomp/gridctrl.cxx b/svx/source/fmcomp/gridctrl.cxx index 317e2d1069b8..f651c6385f2d 100644 --- a/svx/source/fmcomp/gridctrl.cxx +++ b/svx/source/fmcomp/gridctrl.cxx @@ -726,7 +726,7 @@ void DbGridControl::NavigationBar::StateChanged( StateChangedType nType ) switch ( nType ) { - case STATE_CHANGE_MIRRORING: + case StateChangedType::MIRRORING: { bool bIsRTLEnabled = IsRTLEnabled(); for ( size_t i=0; i < (sizeof (pWindows) / sizeof(pWindows[0])); ++i ) @@ -734,7 +734,7 @@ void DbGridControl::NavigationBar::StateChanged( StateChangedType nType ) } break; - case STATE_CHANGE_ZOOM: + case StateChangedType::ZOOM: { boost::rational<long> aZoom = GetZoom(); @@ -755,6 +755,7 @@ void DbGridControl::NavigationBar::StateChanged( StateChangedType nType ) m_nDefaultWidth = ArrangeControls(); } break; + default:; } } @@ -968,12 +969,12 @@ void DbGridControl::StateChanged( StateChangedType nType ) switch (nType) { - case STATE_CHANGE_MIRRORING: + case StateChangedType::MIRRORING: ImplInitWindow( InitWritingMode ); Invalidate(); break; - case STATE_CHANGE_ZOOM: + case StateChangedType::ZOOM: { ImplInitWindow( InitFontFacet ); @@ -984,18 +985,19 @@ void DbGridControl::StateChanged( StateChangedType nType ) ReserveControlArea((sal_uInt16)nX); } break; - case STATE_CHANGE_CONTROLFONT: + case StateChangedType::CONTROLFONT: ImplInitWindow( InitFontFacet ); Invalidate(); break; - case STATE_CHANGE_CONTROLFOREGROUND: + case StateChangedType::CONTROLFOREGROUND: ImplInitWindow( InitForeground ); Invalidate(); break; - case STATE_CHANGE_CONTROLBACKGROUND: + case StateChangedType::CONTROLBACKGROUND: ImplInitWindow( InitBackground ); Invalidate(); break; + default:; } } diff --git a/svx/source/sidebar/paragraph/ParaBulletsControl.cxx b/svx/source/sidebar/paragraph/ParaBulletsControl.cxx index 268728a4a76e..d33d490a0c6b 100644 --- a/svx/source/sidebar/paragraph/ParaBulletsControl.cxx +++ b/svx/source/sidebar/paragraph/ParaBulletsControl.cxx @@ -88,8 +88,8 @@ ParaBulletsControl::~ParaBulletsControl() void ParaBulletsControl::UpdateValueSet() { - maBulletsVS.StateChanged(STATE_CHANGE_STYLE); - maBulletsVS.StateChanged(STATE_CHANGE_INITSHOW); + maBulletsVS.StateChanged(StateChangedType::STYLE); + maBulletsVS.StateChanged(StateChangedType::INITSHOW); const sal_uInt16 nTypeIndex = mrParaPropertyPanel.GetBulletTypeIndex(); if ( nTypeIndex != (sal_uInt16)0xFFFF ) diff --git a/svx/source/sidebar/paragraph/ParaNumberingControl.cxx b/svx/source/sidebar/paragraph/ParaNumberingControl.cxx index 7125ef9b443a..86fe21f6cb38 100644 --- a/svx/source/sidebar/paragraph/ParaNumberingControl.cxx +++ b/svx/source/sidebar/paragraph/ParaNumberingControl.cxx @@ -127,8 +127,8 @@ IMPL_LINK(ParaNumberingControl, MoreButtonClickHdl_Impl, void*, EMPTYARG) void ParaNumberingControl::UpdateValueSet() { - maNumberVS.StateChanged(STATE_CHANGE_STYLE); - maNumberVS.StateChanged(STATE_CHANGE_INITSHOW); + maNumberVS.StateChanged(StateChangedType::STYLE); + maNumberVS.StateChanged(StateChangedType::INITSHOW); const sal_uInt16 nTypeIndex = mrParaPropertyPanel.GetNumTypeIndex(); if ( nTypeIndex != (sal_uInt16)0xFFFF ) diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx index 7d59ac0b2b1c..6900cda8184f 100644 --- a/svx/source/tbxctrls/tbcontrl.cxx +++ b/svx/source/tbxctrls/tbcontrl.cxx @@ -535,13 +535,13 @@ void SvxStyleBox_Impl::StateChanged( StateChangedType nStateChange ) { ComboBox::StateChanged( nStateChange ); - if ( nStateChange == STATE_CHANGE_VISIBLE ) + if ( nStateChange == StateChangedType::VISIBLE ) { bVisible = IsReallyVisible(); if ( aVisibilityListener.IsSet() ) aVisibilityListener.Call( this ); } - else if ( nStateChange == STATE_CHANGE_INITSHOW ) + else if ( nStateChange == StateChangedType::INITSHOW ) { bVisible = true; if ( aVisibilityListener.IsSet() ) diff --git a/sw/source/ui/dbui/mmoutputtypepage.cxx b/sw/source/ui/dbui/mmoutputtypepage.cxx index a587b1c9f21e..0fe5dae3a84c 100644 --- a/sw/source/ui/dbui/mmoutputtypepage.cxx +++ b/sw/source/ui/dbui/mmoutputtypepage.cxx @@ -513,7 +513,7 @@ void SwSendMailDialog::ShowDialog() void SwSendMailDialog::StateChanged( StateChangedType nStateChange ) { ModelessDialog::StateChanged( nStateChange ); - if(STATE_CHANGE_VISIBLE == nStateChange && !IsVisible()) + if(StateChangedType::VISIBLE == nStateChange && !IsVisible()) { m_pImpl->aRemoveTimer.SetTimeoutHdl( STATIC_LINK( this, SwSendMailDialog, RemoveThis ) ); diff --git a/sw/source/ui/fldui/inpdlg.cxx b/sw/source/ui/fldui/inpdlg.cxx index 40d04832896b..4498bc83f884 100644 --- a/sw/source/ui/fldui/inpdlg.cxx +++ b/sw/source/ui/fldui/inpdlg.cxx @@ -108,7 +108,7 @@ SwFldInputDlg::SwFldInputDlg( vcl::Window *pParent, SwWrtShell &rS, void SwFldInputDlg::StateChanged( StateChangedType nType ) { - if ( nType == STATE_CHANGE_INITSHOW ) + if ( nType == StateChangedType::INITSHOW ) m_pEditED->GrabFocus(); SvxStandardDialog::StateChanged( nType ); } diff --git a/sw/source/uibase/dbui/mailmergehelper.cxx b/sw/source/uibase/dbui/mailmergehelper.cxx index 92adafca85d7..81c640929817 100644 --- a/sw/source/uibase/dbui/mailmergehelper.cxx +++ b/sw/source/uibase/dbui/mailmergehelper.cxx @@ -417,7 +417,7 @@ void SwAddressPreview::KeyInput( const KeyEvent& rKEvt ) void SwAddressPreview::StateChanged( StateChangedType nStateChange ) { - if(nStateChange == STATE_CHANGE_ENABLE) + if(nStateChange == StateChangedType::ENABLE) Invalidate(); Window::StateChanged(nStateChange); } diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx index 5db9d6d1fa5e..52ef7b3afd84 100644 --- a/vcl/source/control/button.cxx +++ b/vcl/source/control/button.cxx @@ -163,7 +163,7 @@ bool Button::SetModeImage( const Image& rImage ) if ( rImage != mpButtonData->maImage ) { mpButtonData->maImage = rImage; - StateChanged( STATE_CHANGE_DATA ); + StateChanged( StateChangedType::DATA ); queue_resize(); } return true; @@ -184,7 +184,7 @@ void Button::SetImageAlign( ImageAlign eAlign ) if ( mpButtonData->meImageAlign != eAlign ) { mpButtonData->meImageAlign = eAlign; - StateChanged( STATE_CHANGE_DATA ); + StateChanged( StateChangedType::DATA ); } } @@ -549,7 +549,7 @@ void Button::ImplSetSymbolAlign( SymbolAlign eAlign ) if ( mpButtonData->meSymbolAlign != eAlign ) { mpButtonData->meSymbolAlign = eAlign; - StateChanged( STATE_CHANGE_DATA ); + StateChanged( StateChangedType::DATA ); } } @@ -1434,17 +1434,17 @@ void PushButton::StateChanged( StateChangedType nType ) { Button::StateChanged( nType ); - if ( (nType == STATE_CHANGE_ENABLE) || - (nType == STATE_CHANGE_TEXT) || - (nType == STATE_CHANGE_IMAGE) || - (nType == STATE_CHANGE_DATA) || - (nType == STATE_CHANGE_STATE) || - (nType == STATE_CHANGE_UPDATEMODE) ) + if ( (nType == StateChangedType::ENABLE) || + (nType == StateChangedType::TEXT) || + (nType == StateChangedType::IMAGE) || + (nType == StateChangedType::DATA) || + (nType == StateChangedType::STATE) || + (nType == StateChangedType::UPDATEMODE) ) { if ( IsReallyVisible() && IsUpdateMode() ) Invalidate(); } - else if ( nType == STATE_CHANGE_STYLE ) + else if ( nType == StateChangedType::STYLE ) { SetStyle( ImplInitStyle( GetWindow( WINDOW_PREV ), GetStyle() ) ); @@ -1460,18 +1460,18 @@ void PushButton::StateChanged( StateChangedType nType ) Invalidate(); } } - else if ( (nType == STATE_CHANGE_ZOOM) || - (nType == STATE_CHANGE_CONTROLFONT) ) + else if ( (nType == StateChangedType::ZOOM) || + (nType == StateChangedType::CONTROLFONT) ) { ImplInitSettings( true, false, false ); Invalidate(); } - else if ( nType == STATE_CHANGE_CONTROLFOREGROUND ) + else if ( nType == StateChangedType::CONTROLFOREGROUND ) { ImplInitSettings( false, true, false ); Invalidate(); } - else if ( nType == STATE_CHANGE_CONTROLBACKGROUND ) + else if ( nType == StateChangedType::CONTROLBACKGROUND ) { ImplInitSettings( false, false, true ); Invalidate(); @@ -1567,7 +1567,7 @@ void PushButton::SetSymbol( SymbolType eSymbol ) if ( meSymbol != eSymbol ) { meSymbol = eSymbol; - StateChanged( STATE_CHANGE_DATA ); + StateChanged( StateChangedType::DATA ); } } @@ -1581,7 +1581,7 @@ void PushButton::SetDropDown( sal_uInt16 nStyle ) if ( mnDDStyle != nStyle ) { mnDDStyle = nStyle; - StateChanged( STATE_CHANGE_DATA ); + StateChanged( StateChangedType::DATA ); } } @@ -1603,7 +1603,7 @@ void PushButton::SetState( TriState eState ) ImplGetButtonState() |= BUTTON_DRAW_DONTKNOW; } - StateChanged( STATE_CHANGE_STATE ); + StateChanged( StateChangedType::STATE ); Toggle(); } } @@ -1613,7 +1613,7 @@ void PushButton::SetPressed( bool bPressed ) if ( mbPressed != bPressed ) { mbPressed = bPressed; - StateChanged( STATE_CHANGE_DATA ); + StateChanged( StateChangedType::DATA ); } } @@ -2562,21 +2562,21 @@ void RadioButton::StateChanged( StateChangedType nType ) { Button::StateChanged( nType ); - if ( nType == STATE_CHANGE_STATE ) + if ( nType == StateChangedType::STATE ) { if ( IsReallyVisible() && IsUpdateMode() ) Invalidate( maStateRect ); } - else if ( (nType == STATE_CHANGE_ENABLE) || - (nType == STATE_CHANGE_TEXT) || - (nType == STATE_CHANGE_IMAGE) || - (nType == STATE_CHANGE_DATA) || - (nType == STATE_CHANGE_UPDATEMODE) ) + else if ( (nType == StateChangedType::ENABLE) || + (nType == StateChangedType::TEXT) || + (nType == StateChangedType::IMAGE) || + (nType == StateChangedType::DATA) || + (nType == StateChangedType::UPDATEMODE) ) { if ( IsUpdateMode() ) Invalidate(); } - else if ( nType == STATE_CHANGE_STYLE ) + else if ( nType == StateChangedType::STYLE ) { SetStyle( ImplInitStyle( GetWindow( WINDOW_PREV ), GetStyle() ) ); @@ -2587,18 +2587,18 @@ void RadioButton::StateChanged( StateChangedType nType ) Invalidate(); } } - else if ( (nType == STATE_CHANGE_ZOOM) || - (nType == STATE_CHANGE_CONTROLFONT) ) + else if ( (nType == StateChangedType::ZOOM) || + (nType == StateChangedType::CONTROLFONT) ) { ImplInitSettings( true, false, false ); Invalidate(); } - else if ( nType == STATE_CHANGE_CONTROLFOREGROUND ) + else if ( nType == StateChangedType::CONTROLFOREGROUND ) { ImplInitSettings( false, true, false ); Invalidate(); } - else if ( nType == STATE_CHANGE_CONTROLBACKGROUND ) + else if ( nType == StateChangedType::CONTROLBACKGROUND ) { ImplInitSettings( false, false, true ); Invalidate(); @@ -2655,7 +2655,7 @@ bool RadioButton::SetModeRadioImage( const Image& rImage ) if ( rImage != maImage ) { maImage = rImage; - StateChanged( STATE_CHANGE_DATA ); + StateChanged( StateChangedType::DATA ); queue_resize(); } return true; @@ -2673,7 +2673,7 @@ void RadioButton::SetState( bool bCheck ) if ( mbChecked != bCheck ) { mbChecked = bCheck; - StateChanged( STATE_CHANGE_STATE ); + StateChanged( StateChangedType::STATE ); Toggle(); } } @@ -2730,7 +2730,7 @@ void RadioButton::Check( bool bCheck ) mbChecked = bCheck; ImplDelData aDelData; ImplAddDel( &aDelData ); - StateChanged( STATE_CHANGE_STATE ); + StateChanged( StateChangedType::STATE ); if ( aDelData.IsDead() ) return; if ( bCheck && mbRadioCheck ) @@ -3496,21 +3496,21 @@ void CheckBox::StateChanged( StateChangedType nType ) { Button::StateChanged( nType ); - if ( nType == STATE_CHANGE_STATE ) + if ( nType == StateChangedType::STATE ) { if ( IsReallyVisible() && IsUpdateMode() ) Invalidate( maStateRect ); } - else if ( (nType == STATE_CHANGE_ENABLE) || - (nType == STATE_CHANGE_TEXT) || - (nType == STATE_CHANGE_IMAGE) || - (nType == STATE_CHANGE_DATA) || - (nType == STATE_CHANGE_UPDATEMODE) ) + else if ( (nType == StateChangedType::ENABLE) || + (nType == StateChangedType::TEXT) || + (nType == StateChangedType::IMAGE) || + (nType == StateChangedType::DATA) || + (nType == StateChangedType::UPDATEMODE) ) { if ( IsUpdateMode() ) Invalidate(); } - else if ( nType == STATE_CHANGE_STYLE ) + else if ( nType == StateChangedType::STYLE ) { SetStyle( ImplInitStyle( GetWindow( WINDOW_PREV ), GetStyle() ) ); @@ -3521,18 +3521,18 @@ void CheckBox::StateChanged( StateChangedType nType ) Invalidate(); } } - else if ( (nType == STATE_CHANGE_ZOOM) || - (nType == STATE_CHANGE_CONTROLFONT) ) + else if ( (nType == StateChangedType::ZOOM) || + (nType == StateChangedType::CONTROLFONT) ) { ImplInitSettings( true, false, false ); Invalidate(); } - else if ( nType == STATE_CHANGE_CONTROLFOREGROUND ) + else if ( nType == StateChangedType::CONTROLFOREGROUND ) { ImplInitSettings( false, true, false ); Invalidate(); } - else if ( nType == STATE_CHANGE_CONTROLBACKGROUND ) + else if ( nType == StateChangedType::CONTROLBACKGROUND ) { ImplInitSettings( false, false, true ); Invalidate(); @@ -3592,7 +3592,7 @@ void CheckBox::SetState( TriState eState ) if ( meState != eState ) { meState = eState; - StateChanged( STATE_CHANGE_STATE ); + StateChanged( StateChangedType::STATE ); Toggle(); } } diff --git a/vcl/source/control/combobox.cxx b/vcl/source/control/combobox.cxx index 2880c9011c95..857e38926651 100644 --- a/vcl/source/control/combobox.cxx +++ b/vcl/source/control/combobox.cxx @@ -599,13 +599,13 @@ void ComboBox::StateChanged( StateChangedType nType ) { Edit::StateChanged( nType ); - if ( nType == STATE_CHANGE_READONLY ) + if ( nType == StateChangedType::READONLY ) { mpImplLB->SetReadOnly( IsReadOnly() ); if ( mpBtn ) mpBtn->Enable( IsEnabled() && !IsReadOnly() ); } - else if ( nType == STATE_CHANGE_ENABLE ) + else if ( nType == StateChangedType::ENABLE ) { mpSubEdit->Enable( IsEnabled() ); mpImplLB->Enable( IsEnabled() && !IsReadOnly() ); @@ -613,47 +613,47 @@ void ComboBox::StateChanged( StateChangedType nType ) mpBtn->Enable( IsEnabled() && !IsReadOnly() ); Invalidate(); } - else if( nType == STATE_CHANGE_UPDATEMODE ) + else if( nType == StateChangedType::UPDATEMODE ) { mpImplLB->SetUpdateMode( IsUpdateMode() ); } - else if ( nType == STATE_CHANGE_ZOOM ) + else if ( nType == StateChangedType::ZOOM ) { mpImplLB->SetZoom( GetZoom() ); mpSubEdit->SetZoom( GetZoom() ); ImplCalcEditHeight(); Resize(); } - else if ( nType == STATE_CHANGE_CONTROLFONT ) + else if ( nType == StateChangedType::CONTROLFONT ) { mpImplLB->SetControlFont( GetControlFont() ); mpSubEdit->SetControlFont( GetControlFont() ); ImplCalcEditHeight(); Resize(); } - else if ( nType == STATE_CHANGE_CONTROLFOREGROUND ) + else if ( nType == StateChangedType::CONTROLFOREGROUND ) { mpImplLB->SetControlForeground( GetControlForeground() ); mpSubEdit->SetControlForeground( GetControlForeground() ); } - else if ( nType == STATE_CHANGE_CONTROLBACKGROUND ) + else if ( nType == StateChangedType::CONTROLBACKGROUND ) { mpImplLB->SetControlBackground( GetControlBackground() ); mpSubEdit->SetControlBackground( GetControlBackground() ); } - else if ( nType == STATE_CHANGE_STYLE ) + else if ( nType == StateChangedType::STYLE ) { SetStyle( ImplInitStyle( GetStyle() ) ); mpImplLB->GetMainWindow().EnableSort( ( GetStyle() & WB_SORT ) ? true : false ); } - else if( nType == STATE_CHANGE_MIRRORING ) + else if( nType == StateChangedType::MIRRORING ) { if( mpBtn ) { mpBtn->EnableRTL( IsRTLEnabled() ); ImplInitDropDownButton( mpBtn ); } - mpSubEdit->StateChanged( STATE_CHANGE_MIRRORING ); + mpSubEdit->StateChanged( StateChangedType::MIRRORING ); mpImplLB->EnableRTL( IsRTLEnabled() ); Resize(); } diff --git a/vcl/source/control/ctrl.cxx b/vcl/source/control/ctrl.cxx index 4282453df27d..3654cbd51b48 100644 --- a/vcl/source/control/ctrl.cxx +++ b/vcl/source/control/ctrl.cxx @@ -75,7 +75,7 @@ void Control::EnableRTL( bool bEnable ) // convenience: for controls also switch layout mode SetLayoutMode( bEnable ? TEXT_LAYOUT_BIDI_RTL | TEXT_LAYOUT_TEXTORIGIN_LEFT : TEXT_LAYOUT_TEXTORIGIN_LEFT ); - StateChanged( STATE_CHANGE_MIRRORING ); + StateChanged( StateChangedType::MIRRORING ); OutputDevice::EnableRTL(bEnable); } @@ -248,7 +248,7 @@ bool Control::Notify( NotifyEvent& rNEvt ) if ( !mbHasControlFocus ) { mbHasControlFocus = true; - StateChanged( STATE_CHANGE_CONTROL_FOCUS ); + StateChanged( StateChangedType::CONTROL_FOCUS ); if ( ImplCallEventListenersAndHandler( VCLEVENT_CONTROL_GETFOCUS, maGetFocusHdl, this ) ) // been destroyed within the handler return true; @@ -262,7 +262,7 @@ bool Control::Notify( NotifyEvent& rNEvt ) if ( !pFocusWin || !ImplIsWindowOrChild( pFocusWin ) ) { mbHasControlFocus = false; - StateChanged( STATE_CHANGE_CONTROL_FOCUS ); + StateChanged( StateChangedType::CONTROL_FOCUS ); if ( ImplCallEventListenersAndHandler( VCLEVENT_CONTROL_LOSEFOCUS, maLoseFocusHdl, this ) ) // been destroyed within the handler return true; @@ -275,11 +275,11 @@ bool Control::Notify( NotifyEvent& rNEvt ) void Control::StateChanged( StateChangedType nStateChange ) { - if( nStateChange == STATE_CHANGE_INITSHOW || - nStateChange == STATE_CHANGE_VISIBLE || - nStateChange == STATE_CHANGE_ZOOM || - nStateChange == STATE_CHANGE_BORDER || - nStateChange == STATE_CHANGE_CONTROLFONT + if( nStateChange == StateChangedType::INITSHOW || + nStateChange == StateChangedType::VISIBLE || + nStateChange == StateChangedType::ZOOM || + nStateChange == StateChangedType::BORDER || + nStateChange == StateChangedType::CONTROLFONT ) { ImplClearLayoutData(); diff --git a/vcl/source/control/edit.cxx b/vcl/source/control/edit.cxx index 5d0bb1db13b4..2c57deecd063 100644 --- a/vcl/source/control/edit.cxx +++ b/vcl/source/control/edit.cxx @@ -2193,7 +2193,7 @@ void Edit::Command( const CommandEvent& rCEvt ) void Edit::StateChanged( StateChangedType nType ) { - if ( nType == STATE_CHANGE_INITSHOW ) + if ( nType == StateChangedType::INITSHOW ) { if ( !mpSubEdit ) { @@ -2205,7 +2205,7 @@ void Edit::StateChanged( StateChangedType nType ) // update background (eventual SetPaintTransparent) ImplInitSettings( false, false, true ); } - else if ( nType == STATE_CHANGE_ENABLE ) + else if ( nType == StateChangedType::ENABLE ) { if ( !mpSubEdit ) { @@ -2213,10 +2213,10 @@ void Edit::StateChanged( StateChangedType nType ) ImplInvalidateOrRepaint(); } } - else if ( nType == STATE_CHANGE_STYLE || nType == STATE_CHANGE_MIRRORING ) + else if ( nType == StateChangedType::STYLE || nType == StateChangedType::MIRRORING ) { WinBits nStyle = GetStyle(); - if( nType == STATE_CHANGE_STYLE ) + if( nType == StateChangedType::STYLE ) { nStyle = ImplInitStyle( GetStyle() ); SetStyle( nStyle ); @@ -2232,12 +2232,12 @@ void Edit::StateChanged( StateChangedType nType ) { if( GetParent()->GetStyle() & WB_LEFT ) mnAlign = EDIT_ALIGN_RIGHT; - if ( nType == STATE_CHANGE_MIRRORING ) + if ( nType == StateChangedType::MIRRORING ) SetLayoutMode( TEXT_LAYOUT_BIDI_RTL | TEXT_LAYOUT_TEXTORIGIN_LEFT ); } else if( mbIsSubEdit && !GetParent()->IsRTLEnabled() ) { - if ( nType == STATE_CHANGE_MIRRORING ) + if ( nType == StateChangedType::MIRRORING ) SetLayoutMode( TEXT_LAYOUT_TEXTORIGIN_LEFT ); } @@ -2252,7 +2252,7 @@ void Edit::StateChanged( StateChangedType nType ) } } - else if ( nType == STATE_CHANGE_ZOOM ) + else if ( nType == StateChangedType::ZOOM ) { if ( !mpSubEdit ) { @@ -2261,7 +2261,7 @@ void Edit::StateChanged( StateChangedType nType ) Invalidate(); } } - else if ( nType == STATE_CHANGE_CONTROLFONT ) + else if ( nType == StateChangedType::CONTROLFONT ) { if ( !mpSubEdit ) { @@ -2270,7 +2270,7 @@ void Edit::StateChanged( StateChangedType nType ) Invalidate(); } } - else if ( nType == STATE_CHANGE_CONTROLFOREGROUND ) + else if ( nType == StateChangedType::CONTROLFOREGROUND ) { if ( !mpSubEdit ) { @@ -2278,7 +2278,7 @@ void Edit::StateChanged( StateChangedType nType ) Invalidate(); } } - else if ( nType == STATE_CHANGE_CONTROLBACKGROUND ) + else if ( nType == StateChangedType::CONTROLBACKGROUND ) { if ( !mpSubEdit ) { @@ -2442,7 +2442,7 @@ void Edit::SetReadOnly( bool bReadOnly ) if ( mpSubEdit ) mpSubEdit->SetReadOnly( bReadOnly ); - StateChanged( STATE_CHANGE_READONLY ); + StateChanged( StateChangedType::READONLY ); } } diff --git a/vcl/source/control/fixed.cxx b/vcl/source/control/fixed.cxx index beaa5b835aa7..06a3cde5cee0 100644 --- a/vcl/source/control/fixed.cxx +++ b/vcl/source/control/fixed.cxx @@ -287,14 +287,14 @@ void FixedText::StateChanged( StateChangedType nType ) { Control::StateChanged( nType ); - if ( (nType == STATE_CHANGE_ENABLE) || - (nType == STATE_CHANGE_TEXT) || - (nType == STATE_CHANGE_UPDATEMODE) ) + if ( (nType == StateChangedType::ENABLE) || + (nType == StateChangedType::TEXT) || + (nType == StateChangedType::UPDATEMODE) ) { if ( IsReallyVisible() && IsUpdateMode() ) Invalidate(); } - else if ( nType == STATE_CHANGE_STYLE ) + else if ( nType == StateChangedType::STYLE ) { SetStyle( ImplInitStyle( GetStyle() ) ); if ( (GetPrevStyle() & FIXEDTEXT_VIEW_STYLE) != @@ -304,18 +304,18 @@ void FixedText::StateChanged( StateChangedType nType ) Invalidate(); } } - else if ( (nType == STATE_CHANGE_ZOOM) || - (nType == STATE_CHANGE_CONTROLFONT) ) + else if ( (nType == StateChangedType::ZOOM) || + (nType == StateChangedType::CONTROLFONT) ) { ImplInitSettings( true, false, false ); Invalidate(); } - else if ( nType == STATE_CHANGE_CONTROLFOREGROUND ) + else if ( nType == StateChangedType::CONTROLFOREGROUND ) { ImplInitSettings( false, true, false ); Invalidate(); } - else if ( nType == STATE_CHANGE_CONTROLBACKGROUND ) + else if ( nType == StateChangedType::CONTROLBACKGROUND ) { ImplInitSettings( false, false, true ); Invalidate(); @@ -653,33 +653,33 @@ void FixedLine::StateChanged( StateChangedType nType ) { Control::StateChanged( nType ); - if ( (nType == STATE_CHANGE_ENABLE) || - (nType == STATE_CHANGE_TEXT) || - (nType == STATE_CHANGE_UPDATEMODE) ) + if ( (nType == StateChangedType::ENABLE) || + (nType == StateChangedType::TEXT) || + (nType == StateChangedType::UPDATEMODE) ) { if ( IsReallyVisible() && IsUpdateMode() ) Invalidate(); } - else if ( nType == STATE_CHANGE_STYLE ) + else if ( nType == StateChangedType::STYLE ) { SetStyle( ImplInitStyle( GetStyle() ) ); if ( (GetPrevStyle() & FIXEDLINE_VIEW_STYLE) != (GetStyle() & FIXEDLINE_VIEW_STYLE) ) Invalidate(); } - else if ( (nType == STATE_CHANGE_ZOOM) || - (nType == STATE_CHANGE_STYLE) || - (nType == STATE_CHANGE_CONTROLFONT) ) + else if ( (nType == StateChangedType::ZOOM) || + (nType == StateChangedType::STYLE) || + (nType == StateChangedType::CONTROLFONT) ) { ImplInitSettings( true, false, false ); Invalidate(); } - else if ( nType == STATE_CHANGE_CONTROLFOREGROUND ) + else if ( nType == StateChangedType::CONTROLFOREGROUND ) { ImplInitSettings( false, true, false ); Invalidate(); } - else if ( nType == STATE_CHANGE_CONTROLBACKGROUND ) + else if ( nType == StateChangedType::CONTROLBACKGROUND ) { ImplInitSettings( false, false, true ); Invalidate(); @@ -807,20 +807,20 @@ void FixedBitmap::StateChanged( StateChangedType nType ) { Control::StateChanged( nType ); - if ( (nType == STATE_CHANGE_DATA) || - (nType == STATE_CHANGE_UPDATEMODE) ) + if ( (nType == StateChangedType::DATA) || + (nType == StateChangedType::UPDATEMODE) ) { if ( IsReallyVisible() && IsUpdateMode() ) Invalidate(); } - else if ( nType == STATE_CHANGE_STYLE ) + else if ( nType == StateChangedType::STYLE ) { SetStyle( ImplInitStyle( GetStyle() ) ); if ( (GetPrevStyle() & FIXEDBITMAP_VIEW_STYLE) != (GetStyle() & FIXEDBITMAP_VIEW_STYLE) ) Invalidate(); } - else if ( nType == STATE_CHANGE_CONTROLBACKGROUND ) + else if ( nType == StateChangedType::CONTROLBACKGROUND ) { ImplInitSettings(); Invalidate(); @@ -842,7 +842,7 @@ void FixedBitmap::DataChanged( const DataChangedEvent& rDCEvt ) void FixedBitmap::SetBitmap( const Bitmap& rBitmap ) { maBitmap = rBitmap; - StateChanged( STATE_CHANGE_DATA ); + StateChanged( StateChangedType::DATA ); queue_resize(); } @@ -994,21 +994,21 @@ void FixedImage::StateChanged( StateChangedType nType ) { Control::StateChanged( nType ); - if ( (nType == STATE_CHANGE_ENABLE) || - (nType == STATE_CHANGE_DATA) || - (nType == STATE_CHANGE_UPDATEMODE) ) + if ( (nType == StateChangedType::ENABLE) || + (nType == StateChangedType::DATA) || + (nType == StateChangedType::UPDATEMODE) ) { if ( IsReallyVisible() && IsUpdateMode() ) Invalidate(); } - else if ( nType == STATE_CHANGE_STYLE ) + else if ( nType == StateChangedType::STYLE ) { SetStyle( ImplInitStyle( GetStyle() ) ); if ( (GetPrevStyle() & FIXEDIMAGE_VIEW_STYLE) != (GetStyle() & FIXEDIMAGE_VIEW_STYLE) ) Invalidate(); } - else if ( nType == STATE_CHANGE_CONTROLBACKGROUND ) + else if ( nType == StateChangedType::CONTROLBACKGROUND ) { ImplInitSettings(); Invalidate(); @@ -1032,7 +1032,7 @@ void FixedImage::SetImage( const Image& rImage ) if ( rImage != maImage ) { maImage = rImage; - StateChanged( STATE_CHANGE_DATA ); + StateChanged( StateChangedType::DATA ); queue_resize(); } } diff --git a/vcl/source/control/group.cxx b/vcl/source/control/group.cxx index 795bb3b43797..5fa38b242244 100644 --- a/vcl/source/control/group.cxx +++ b/vcl/source/control/group.cxx @@ -223,32 +223,32 @@ void GroupBox::StateChanged( StateChangedType nType ) { Control::StateChanged( nType ); - if ( (nType == STATE_CHANGE_ENABLE) || - (nType == STATE_CHANGE_TEXT) || - (nType == STATE_CHANGE_UPDATEMODE) ) + if ( (nType == StateChangedType::ENABLE) || + (nType == StateChangedType::TEXT) || + (nType == StateChangedType::UPDATEMODE) ) { if ( IsUpdateMode() ) Invalidate(); } - else if ( nType == STATE_CHANGE_STYLE ) + else if ( nType == StateChangedType::STYLE ) { SetStyle( ImplInitStyle( GetStyle() ) ); if ( (GetPrevStyle() & GROUP_VIEW_STYLE) != (GetStyle() & GROUP_VIEW_STYLE) ) Invalidate(); } - else if ( (nType == STATE_CHANGE_ZOOM) || - (nType == STATE_CHANGE_CONTROLFONT) ) + else if ( (nType == StateChangedType::ZOOM) || + (nType == StateChangedType::CONTROLFONT) ) { ImplInitSettings( true, false, false ); Invalidate(); } - else if ( nType == STATE_CHANGE_CONTROLFOREGROUND ) + else if ( nType == StateChangedType::CONTROLFOREGROUND ) { ImplInitSettings( false, true, false ); Invalidate(); } - else if ( nType == STATE_CHANGE_CONTROLBACKGROUND ) + else if ( nType == StateChangedType::CONTROLBACKGROUND ) { ImplInitSettings( false, false, true ); Invalidate(); diff --git a/vcl/source/control/ilstbox.cxx b/vcl/source/control/ilstbox.cxx index d936d3b2f6dc..693070fe6261 100644 --- a/vcl/source/control/ilstbox.cxx +++ b/vcl/source/control/ilstbox.cxx @@ -2061,34 +2061,34 @@ void ImplListBoxWindow::StateChanged( StateChangedType nType ) { Control::StateChanged( nType ); - if ( nType == STATE_CHANGE_ZOOM ) + if ( nType == StateChangedType::ZOOM ) { ImplInitSettings( true, false, false ); ImplCalcMetrics(); Invalidate(); } - else if ( nType == STATE_CHANGE_UPDATEMODE ) + else if ( nType == StateChangedType::UPDATEMODE ) { if ( IsUpdateMode() && IsReallyVisible() ) Invalidate(); } - else if ( nType == STATE_CHANGE_CONTROLFONT ) + else if ( nType == StateChangedType::CONTROLFONT ) { ImplInitSettings( true, false, false ); ImplCalcMetrics(); Invalidate(); } - else if ( nType == STATE_CHANGE_CONTROLFOREGROUND ) + else if ( nType == StateChangedType::CONTROLFOREGROUND ) { ImplInitSettings( false, true, false ); Invalidate(); } - else if ( nType == STATE_CHANGE_CONTROLBACKGROUND ) + else if ( nType == StateChangedType::CONTROLBACKGROUND ) { ImplInitSettings( false, false, true ); Invalidate(); } - else if( nType == STATE_CHANGE_ENABLE ) + else if( nType == StateChangedType::ENABLE ) { Invalidate(); } @@ -2173,7 +2173,7 @@ void ImplListBox::Clear() } mpVScrollBar->SetThumbPos( 0 ); mpHScrollBar->SetThumbPos( 0 ); - StateChanged( STATE_CHANGE_DATA ); + StateChanged( StateChangedType::DATA ); } sal_Int32 ImplListBox::InsertEntry( sal_Int32 nPos, const OUString& rStr ) @@ -2185,7 +2185,7 @@ sal_Int32 ImplListBox::InsertEntry( sal_Int32 nPos, const OUString& rStr ) delete pNewEntry; return nNewPos; } - StateChanged( STATE_CHANGE_DATA ); + StateChanged( StateChangedType::DATA ); return nNewPos; } @@ -2198,14 +2198,14 @@ sal_Int32 ImplListBox::InsertEntry( sal_Int32 nPos, const OUString& rStr, const delete pNewEntry; return nNewPos; } - StateChanged( STATE_CHANGE_DATA ); + StateChanged( StateChangedType::DATA ); return nNewPos; } void ImplListBox::RemoveEntry( sal_Int32 nPos ) { maLBWindow.RemoveEntry( nPos ); - StateChanged( STATE_CHANGE_DATA ); + StateChanged( StateChangedType::DATA ); } void ImplListBox::SetEntryFlags( sal_Int32 nPos, long nFlags ) @@ -2242,7 +2242,7 @@ void ImplListBox::Resize() IMPL_LINK_NOARG(ImplListBox, MRUChanged) { - StateChanged( STATE_CHANGE_DATA ); + StateChanged( StateChangedType::DATA ); return 1; } @@ -2438,18 +2438,18 @@ void ImplListBox::ImplResizeControls() void ImplListBox::StateChanged( StateChangedType nType ) { - if ( nType == STATE_CHANGE_INITSHOW ) + if ( nType == StateChangedType::INITSHOW ) { ImplCheckScrollBars(); } - else if ( ( nType == STATE_CHANGE_UPDATEMODE ) || ( nType == STATE_CHANGE_DATA ) ) + else if ( ( nType == StateChangedType::UPDATEMODE ) || ( nType == StateChangedType::DATA ) ) { bool bUpdate = IsUpdateMode(); maLBWindow.SetUpdateMode( bUpdate ); if ( bUpdate && IsReallyVisible() ) ImplCheckScrollBars(); } - else if( nType == STATE_CHANGE_ENABLE ) + else if( nType == StateChangedType::ENABLE ) { mpHScrollBar->Enable( IsEnabled() ); mpVScrollBar->Enable( IsEnabled() ); @@ -2458,24 +2458,24 @@ void ImplListBox::StateChanged( StateChangedType nType ) Invalidate(); } - else if ( nType == STATE_CHANGE_ZOOM ) + else if ( nType == StateChangedType::ZOOM ) { maLBWindow.SetZoom( GetZoom() ); Resize(); } - else if ( nType == STATE_CHANGE_CONTROLFONT ) + else if ( nType == StateChangedType::CONTROLFONT ) { maLBWindow.SetControlFont( GetControlFont() ); } - else if ( nType == STATE_CHANGE_CONTROLFOREGROUND ) + else if ( nType == StateChangedType::CONTROLFOREGROUND ) { maLBWindow.SetControlForeground( GetControlForeground() ); } - else if ( nType == STATE_CHANGE_CONTROLBACKGROUND ) + else if ( nType == StateChangedType::CONTROLBACKGROUND ) { maLBWindow.SetControlBackground( GetControlBackground() ); } - else if( nType == STATE_CHANGE_MIRRORING ) + else if( nType == StateChangedType::MIRRORING ) { maLBWindow.EnableRTL( IsRTLEnabled() ); mpHScrollBar->EnableRTL( IsRTLEnabled() ); @@ -2558,7 +2558,7 @@ void ImplListBox::SetMRUEntries( const OUString& rEntries, sal_Unicode cSep ) { maLBWindow.GetEntryList()->SetMRUCount( nMRUCount ); SetSeparatorPos( nMRUCount ? nMRUCount-1 : 0 ); - StateChanged( STATE_CHANGE_DATA ); + StateChanged( StateChangedType::DATA ); } } diff --git a/vcl/source/control/lstbox.cxx b/vcl/source/control/lstbox.cxx index c0451281ce5f..9942aeb56cf4 100644 --- a/vcl/source/control/lstbox.cxx +++ b/vcl/source/control/lstbox.cxx @@ -769,14 +769,14 @@ long ListBox::GetIndexForPoint( const Point& rPoint, sal_Int32& rPos ) const void ListBox::StateChanged( StateChangedType nType ) { - if( nType == STATE_CHANGE_READONLY ) + if( nType == StateChangedType::READONLY ) { if( mpImplWin ) mpImplWin->Enable( !IsReadOnly() ); if( mpBtn ) mpBtn->Enable( !IsReadOnly() ); } - else if( nType == STATE_CHANGE_ENABLE ) + else if( nType == StateChangedType::ENABLE ) { mpImplLB->Enable( IsEnabled() ); if( mpImplWin ) @@ -793,11 +793,11 @@ void ListBox::StateChanged( StateChangedType nType ) if( mpBtn ) mpBtn->Enable( IsEnabled() ); } - else if( nType == STATE_CHANGE_UPDATEMODE ) + else if( nType == StateChangedType::UPDATEMODE ) { mpImplLB->SetUpdateMode( IsUpdateMode() ); } - else if ( nType == STATE_CHANGE_ZOOM ) + else if ( nType == StateChangedType::ZOOM ) { mpImplLB->SetZoom( GetZoom() ); if ( mpImplWin ) @@ -808,7 +808,7 @@ void ListBox::StateChanged( StateChangedType nType ) } Resize(); } - else if ( nType == STATE_CHANGE_CONTROLFONT ) + else if ( nType == StateChangedType::CONTROLFONT ) { mpImplLB->SetControlFont( GetControlFont() ); if ( mpImplWin ) @@ -819,7 +819,7 @@ void ListBox::StateChanged( StateChangedType nType ) } Resize(); } - else if ( nType == STATE_CHANGE_CONTROLFOREGROUND ) + else if ( nType == StateChangedType::CONTROLFOREGROUND ) { mpImplLB->SetControlForeground( GetControlForeground() ); if ( mpImplWin ) @@ -830,7 +830,7 @@ void ListBox::StateChanged( StateChangedType nType ) mpImplWin->Invalidate(); } } - else if ( nType == STATE_CHANGE_CONTROLBACKGROUND ) + else if ( nType == StateChangedType::CONTROLBACKGROUND ) { mpImplLB->SetControlBackground( GetControlBackground() ); if ( mpImplWin ) @@ -850,14 +850,14 @@ void ListBox::StateChanged( StateChangedType nType ) mpImplWin->Invalidate(); } } - else if ( nType == STATE_CHANGE_STYLE ) + else if ( nType == StateChangedType::STYLE ) { SetStyle( ImplInitStyle( GetStyle() ) ); mpImplLB->GetMainWindow().EnableSort( ( GetStyle() & WB_SORT ) ? true : false ); bool bSimpleMode = ( GetStyle() & WB_SIMPLEMODE ) ? true : false; mpImplLB->SetMultiSelectionSimpleMode( bSimpleMode ); } - else if( nType == STATE_CHANGE_MIRRORING ) + else if( nType == StateChangedType::MIRRORING ) { if( mpBtn ) { @@ -1396,7 +1396,7 @@ void ListBox::SetReadOnly( bool bReadOnly ) if ( mpImplLB->IsReadOnly() != bReadOnly ) { mpImplLB->SetReadOnly( bReadOnly ); - StateChanged( STATE_CHANGE_READONLY ); + StateChanged( StateChangedType::READONLY ); } } diff --git a/vcl/source/control/prgsbar.cxx b/vcl/source/control/prgsbar.cxx index d1b7bf9d6d69..1536f9336b09 100644 --- a/vcl/source/control/prgsbar.cxx +++ b/vcl/source/control/prgsbar.cxx @@ -185,20 +185,20 @@ void ProgressBar::SetValue( sal_uInt16 nNewPercent ) void ProgressBar::StateChanged( StateChangedType nType ) { /* FIXME: !!! We do not support text output at the moment - if ( (nType == STATE_CHANGE_ZOOM) || - (nType == STATE_CHANGE_CONTROLFONT) ) + if ( (nType == StateChangedType::ZOOM) || + (nType == StateChangedType::CONTROLFONT) ) { ImplInitSettings( true, false, false ); Invalidate(); } else */ - if ( nType == STATE_CHANGE_CONTROLFOREGROUND ) + if ( nType == StateChangedType::CONTROLFOREGROUND ) { ImplInitSettings( false, true, false ); Invalidate(); } - else if ( nType == STATE_CHANGE_CONTROLBACKGROUND ) + else if ( nType == StateChangedType::CONTROLBACKGROUND ) { ImplInitSettings( false, false, true ); Invalidate(); diff --git a/vcl/source/control/scrbar.cxx b/vcl/source/control/scrbar.cxx index d9ee7576306b..df763dd5ad4f 100644 --- a/vcl/source/control/scrbar.cxx +++ b/vcl/source/control/scrbar.cxx @@ -1166,14 +1166,14 @@ void ScrollBar::StateChanged( StateChangedType nType ) { Control::StateChanged( nType ); - if ( nType == STATE_CHANGE_INITSHOW ) + if ( nType == StateChangedType::INITSHOW ) ImplCalc( false ); - else if ( nType == STATE_CHANGE_DATA ) + else if ( nType == StateChangedType::DATA ) { if ( IsReallyVisible() && IsUpdateMode() ) ImplCalc( true ); } - else if ( nType == STATE_CHANGE_UPDATEMODE ) + else if ( nType == StateChangedType::UPDATEMODE ) { if ( IsReallyVisible() && IsUpdateMode() ) { @@ -1181,12 +1181,12 @@ void ScrollBar::StateChanged( StateChangedType nType ) Invalidate(); } } - else if ( nType == STATE_CHANGE_ENABLE ) + else if ( nType == StateChangedType::ENABLE ) { if ( IsReallyVisible() && IsUpdateMode() ) Invalidate(); } - else if ( nType == STATE_CHANGE_STYLE ) + else if ( nType == StateChangedType::STYLE ) { ImplInitStyle( GetStyle() ); if ( IsReallyVisible() && IsUpdateMode() ) @@ -1363,7 +1363,7 @@ void ScrollBar::SetRange( const Range& rRange ) if ( mnThumbPos < mnMinRange ) mnThumbPos = mnMinRange; - StateChanged( STATE_CHANGE_DATA ); + StateChanged( StateChangedType::DATA ); } } @@ -1377,7 +1377,7 @@ void ScrollBar::SetThumbPos( long nNewThumbPos ) if ( mnThumbPos != nNewThumbPos ) { mnThumbPos = nNewThumbPos; - StateChanged( STATE_CHANGE_DATA ); + StateChanged( StateChangedType::DATA ); } } @@ -1392,7 +1392,7 @@ void ScrollBar::SetVisibleSize( long nNewSize ) mnThumbPos = mnMaxRange-mnVisibleSize; if ( mnThumbPos < mnMinRange ) mnThumbPos = mnMinRange; - StateChanged( STATE_CHANGE_DATA ); + StateChanged( StateChangedType::DATA ); } } @@ -1463,7 +1463,7 @@ void ScrollBarBox::StateChanged( StateChangedType nType ) { Window::StateChanged( nType ); - if ( nType == STATE_CHANGE_CONTROLBACKGROUND ) + if ( nType == StateChangedType::CONTROLBACKGROUND ) { ImplInitSettings(); Invalidate(); diff --git a/vcl/source/control/slider.cxx b/vcl/source/control/slider.cxx index 0ebdc37dc66e..106ca0d7f31f 100644 --- a/vcl/source/control/slider.cxx +++ b/vcl/source/control/slider.cxx @@ -831,14 +831,14 @@ void Slider::StateChanged( StateChangedType nType ) { Control::StateChanged( nType ); - if ( nType == STATE_CHANGE_INITSHOW ) + if ( nType == StateChangedType::INITSHOW ) ImplCalc( false ); - else if ( nType == STATE_CHANGE_DATA ) + else if ( nType == StateChangedType::DATA ) { if ( IsReallyVisible() && IsUpdateMode() ) ImplCalc( true ); } - else if ( nType == STATE_CHANGE_UPDATEMODE ) + else if ( nType == StateChangedType::UPDATEMODE ) { if ( IsReallyVisible() && IsUpdateMode() ) { @@ -846,12 +846,12 @@ void Slider::StateChanged( StateChangedType nType ) Invalidate(); } } - else if ( nType == STATE_CHANGE_ENABLE ) + else if ( nType == StateChangedType::ENABLE ) { if ( IsReallyVisible() && IsUpdateMode() ) Invalidate(); } - else if ( nType == STATE_CHANGE_STYLE ) + else if ( nType == StateChangedType::STYLE ) { if ( IsReallyVisible() && IsUpdateMode() ) { @@ -864,7 +864,7 @@ void Slider::StateChanged( StateChangedType nType ) } } } - else if ( nType == STATE_CHANGE_CONTROLBACKGROUND ) + else if ( nType == StateChangedType::CONTROLBACKGROUND ) { ImplInitSettings(); Invalidate(); @@ -914,7 +914,7 @@ void Slider::SetRange( const Range& rRange ) if ( mnThumbPos < mnMinRange ) mnThumbPos = mnMinRange; - StateChanged( STATE_CHANGE_DATA ); + StateChanged( StateChangedType::DATA ); } } @@ -928,7 +928,7 @@ void Slider::SetThumbPos( long nNewThumbPos ) if ( mnThumbPos != nNewThumbPos ) { mnThumbPos = nNewThumbPos; - StateChanged( STATE_CHANGE_DATA ); + StateChanged( StateChangedType::DATA ); } } diff --git a/vcl/source/control/spinbtn.cxx b/vcl/source/control/spinbtn.cxx index b7d9de824902..122aed10c89d 100644 --- a/vcl/source/control/spinbtn.cxx +++ b/vcl/source/control/spinbtn.cxx @@ -82,7 +82,7 @@ void SpinButton::Up() if ( ImplIsUpperEnabled() ) { mnValue += mnValueStep; - StateChanged( STATE_CHANGE_DATA ); + StateChanged( StateChangedType::DATA ); ImplMoveFocus( true ); } @@ -95,7 +95,7 @@ void SpinButton::Down() if ( ImplIsLowerEnabled() ) { mnValue -= mnValueStep; - StateChanged( STATE_CHANGE_DATA ); + StateChanged( StateChangedType::DATA ); ImplMoveFocus( false ); } @@ -315,12 +315,12 @@ void SpinButton::StateChanged( StateChangedType nType ) { switch ( nType ) { - case STATE_CHANGE_DATA: - case STATE_CHANGE_ENABLE: + case StateChangedType::DATA: + case StateChangedType::ENABLE: Invalidate(); break; - case STATE_CHANGE_STYLE: + case StateChangedType::STYLE: { bool bNewRepeat = 0 != ( GetStyle() & WB_REPEAT ); if ( bNewRepeat != mbRepeat ) @@ -341,6 +341,7 @@ void SpinButton::StateChanged( StateChangedType nType ) } } break; + default:; } Control::StateChanged( nType ); @@ -377,7 +378,7 @@ void SpinButton::SetRange( const Range& rRange ) if ( mnValue < mnMinRange ) mnValue = mnMinRange; - StateChanged( STATE_CHANGE_DATA ); + StateChanged( StateChangedType::DATA ); } } @@ -392,7 +393,7 @@ void SpinButton::SetValue( long nValue ) if ( mnValue != nValue ) { mnValue = nValue; - StateChanged( STATE_CHANGE_DATA ); + StateChanged( StateChangedType::DATA ); } } diff --git a/vcl/source/control/spinfld.cxx b/vcl/source/control/spinfld.cxx index a6c558317eea..c1a81b2e73d6 100644 --- a/vcl/source/control/spinfld.cxx +++ b/vcl/source/control/spinfld.cxx @@ -772,7 +772,7 @@ void SpinField::StateChanged( StateChangedType nType ) { Edit::StateChanged( nType ); - if ( nType == STATE_CHANGE_ENABLE ) + if ( nType == StateChangedType::ENABLE ) { if ( mbSpin || ( GetStyle() & WB_DROPDOWN ) ) { @@ -787,45 +787,45 @@ void SpinField::StateChanged( StateChangedType nType ) Invalidate( maDropDownRect ); } } - else if ( nType == STATE_CHANGE_STYLE ) + else if ( nType == StateChangedType::STYLE ) { if ( GetStyle() & WB_REPEAT ) mbRepeat = true; else mbRepeat = false; } - else if ( nType == STATE_CHANGE_ZOOM ) + else if ( nType == StateChangedType::ZOOM ) { Resize(); if ( mpEdit ) mpEdit->SetZoom( GetZoom() ); Invalidate(); } - else if ( nType == STATE_CHANGE_CONTROLFONT ) + else if ( nType == StateChangedType::CONTROLFONT ) { if ( mpEdit ) mpEdit->SetControlFont( GetControlFont() ); ImplInitSettings( true, false, false ); Invalidate(); } - else if ( nType == STATE_CHANGE_CONTROLFOREGROUND ) + else if ( nType == StateChangedType::CONTROLFOREGROUND ) { if ( mpEdit ) mpEdit->SetControlForeground( GetControlForeground() ); ImplInitSettings( false, true, false ); Invalidate(); } - else if ( nType == STATE_CHANGE_CONTROLBACKGROUND ) + else if ( nType == StateChangedType::CONTROLBACKGROUND ) { if ( mpEdit ) mpEdit->SetControlBackground( GetControlBackground() ); ImplInitSettings( false, false, true ); Invalidate(); } - else if( nType == STATE_CHANGE_MIRRORING ) + else if( nType == StateChangedType::MIRRORING ) { if( mpEdit ) - mpEdit->StateChanged( STATE_CHANGE_MIRRORING ); + mpEdit->StateChanged( StateChangedType::MIRRORING ); Resize(); } } diff --git a/vcl/source/control/tabctrl.cxx b/vcl/source/control/tabctrl.cxx index 446f0727ceb0..b28b4ca030b3 100644 --- a/vcl/source/control/tabctrl.cxx +++ b/vcl/source/control/tabctrl.cxx @@ -1468,29 +1468,29 @@ void TabControl::StateChanged( StateChangedType nType ) { Control::StateChanged( nType ); - if ( nType == STATE_CHANGE_INITSHOW ) + if ( nType == StateChangedType::INITSHOW ) { ImplPosCurTabPage(); if( mpTabCtrlData->mpListBox ) Resize(); } - else if ( nType == STATE_CHANGE_UPDATEMODE ) + else if ( nType == StateChangedType::UPDATEMODE ) { if ( IsUpdateMode() ) Invalidate(); } - else if ( (nType == STATE_CHANGE_ZOOM) || - (nType == STATE_CHANGE_CONTROLFONT) ) + else if ( (nType == StateChangedType::ZOOM) || + (nType == StateChangedType::CONTROLFONT) ) { ImplInitSettings( true, false, false ); Invalidate(); } - else if ( nType == STATE_CHANGE_CONTROLFOREGROUND ) + else if ( nType == StateChangedType::CONTROLFOREGROUND ) { ImplInitSettings( false, true, false ); Invalidate(); } - else if ( nType == STATE_CHANGE_CONTROLBACKGROUND ) + else if ( nType == StateChangedType::CONTROLBACKGROUND ) { ImplInitSettings( false, false, true ); Invalidate(); diff --git a/vcl/source/edit/vclmedit.cxx b/vcl/source/edit/vclmedit.cxx index ff7cd6c8ae25..7314fa1386c9 100644 --- a/vcl/source/edit/vclmedit.cxx +++ b/vcl/source/edit/vclmedit.cxx @@ -1234,43 +1234,43 @@ void VclMultiLineEdit::GetMaxVisColumnsAndLines( sal_uInt16& rnCols, sal_uInt16& void VclMultiLineEdit::StateChanged( StateChangedType nType ) { - if( nType == STATE_CHANGE_ENABLE ) + if( nType == StateChangedType::ENABLE ) { pImpVclMEdit->Enable( IsEnabled() ); ImplInitSettings( true, false, false ); } - else if( nType == STATE_CHANGE_READONLY ) + else if( nType == StateChangedType::READONLY ) { pImpVclMEdit->SetReadOnly( IsReadOnly() ); } - else if ( nType == STATE_CHANGE_ZOOM ) + else if ( nType == StateChangedType::ZOOM ) { pImpVclMEdit->GetTextWindow()->SetZoom( GetZoom() ); ImplInitSettings( true, false, false ); Resize(); } - else if ( nType == STATE_CHANGE_CONTROLFONT ) + else if ( nType == StateChangedType::CONTROLFONT ) { ImplInitSettings( true, false, false ); Resize(); Invalidate(); } - else if ( nType == STATE_CHANGE_CONTROLFOREGROUND ) + else if ( nType == StateChangedType::CONTROLFOREGROUND ) { ImplInitSettings( false, true, false ); Invalidate(); } - else if ( nType == STATE_CHANGE_CONTROLBACKGROUND ) + else if ( nType == StateChangedType::CONTROLBACKGROUND ) { ImplInitSettings( false, false, true ); Invalidate(); } - else if ( nType == STATE_CHANGE_STYLE ) + else if ( nType == StateChangedType::STYLE ) { pImpVclMEdit->InitFromStyle( GetStyle() ); SetStyle( ImplInitStyle( GetStyle() ) ); } - else if ( nType == STATE_CHANGE_INITSHOW ) + else if ( nType == StateChangedType::INITSHOW ) { if( IsPaintTransparent() ) { diff --git a/vcl/source/uipreviewer/previewer.cxx b/vcl/source/uipreviewer/previewer.cxx index 24f4dbed31c1..e889e78f8644 100644 --- a/vcl/source/uipreviewer/previewer.cxx +++ b/vcl/source/uipreviewer/previewer.cxx @@ -81,7 +81,7 @@ int UIPreviewApp::Main() pRealDialog->SetText(OUString("LibreOffice ui-previewer")); pRealDialog->SetStyle(pDialog->GetStyle()|WB_CLOSEABLE); /* - Force a new STATE_CHANGE_INITSHOW for the edge case where pRoot + Force a new StateChangedType::INITSHOW for the edge case where pRoot is not a dialog or contents of a dialog, but instead a visible floating window which may have had initshow already done before it was given children */ diff --git a/vcl/source/window/brdwin.cxx b/vcl/source/window/brdwin.cxx index a9640614c887..d008582da02d 100644 --- a/vcl/source/window/brdwin.cxx +++ b/vcl/source/window/brdwin.cxx @@ -1967,9 +1967,9 @@ void ImplBorderWindow::Resize() void ImplBorderWindow::StateChanged( StateChangedType nType ) { - if ( (nType == STATE_CHANGE_TEXT) || - (nType == STATE_CHANGE_IMAGE) || - (nType == STATE_CHANGE_DATA) ) + if ( (nType == StateChangedType::TEXT) || + (nType == StateChangedType::IMAGE) || + (nType == StateChangedType::DATA) ) { if ( IsReallyVisible() && mbFrameBorder ) { diff --git a/vcl/source/window/btndlg.cxx b/vcl/source/window/btndlg.cxx index b5871954b713..3c9880134a86 100644 --- a/vcl/source/window/btndlg.cxx +++ b/vcl/source/window/btndlg.cxx @@ -227,7 +227,7 @@ void ButtonDialog::Resize() void ButtonDialog::StateChanged( StateChangedType nType ) { - if ( nType == STATE_CHANGE_INITSHOW ) + if ( nType == StateChangedType::INITSHOW ) { ImplPosControls(); for (btn_iterator it = maItemList.begin(); it != maItemList.end(); ++it) diff --git a/vcl/source/window/dialog.cxx b/vcl/source/window/dialog.cxx index c654423092cf..afb219726e30 100644 --- a/vcl/source/window/dialog.cxx +++ b/vcl/source/window/dialog.cxx @@ -616,7 +616,7 @@ Size bestmaxFrameSizeForScreenSize(const Size &rScreenSize) void Dialog::StateChanged( StateChangedType nType ) { - if (nType == STATE_CHANGE_INITSHOW) + if (nType == StateChangedType::INITSHOW) { DoInitialLayout(); @@ -636,7 +636,7 @@ void Dialog::StateChanged( StateChangedType nType ) SystemWindow::StateChanged( nType ); - if (nType == STATE_CHANGE_CONTROLBACKGROUND) + if (nType == StateChangedType::CONTROLBACKGROUND) { ImplInitSettings(); Invalidate(); diff --git a/vcl/source/window/dockingarea.cxx b/vcl/source/window/dockingarea.cxx index 6d6416d6ce04..8266c642d9cd 100644 --- a/vcl/source/window/dockingarea.cxx +++ b/vcl/source/window/dockingarea.cxx @@ -129,7 +129,7 @@ void DockingAreaWindow::StateChanged( StateChangedType nType ) { Window::StateChanged( nType ); - if ( nType == STATE_CHANGE_VISIBLE ) + if ( nType == StateChangedType::VISIBLE ) ImplInvalidateMenubar( this ); } diff --git a/vcl/source/window/dockwin.cxx b/vcl/source/window/dockwin.cxx index bf04f1afc719..c487bfe7b390 100644 --- a/vcl/source/window/dockwin.cxx +++ b/vcl/source/window/dockwin.cxx @@ -691,12 +691,12 @@ void DockingWindow::StateChanged( StateChangedType nType ) { switch(nType) { - case STATE_CHANGE_CONTROLBACKGROUND: + case StateChangedType::CONTROLBACKGROUND: ImplInitSettings(); Invalidate(); break; - case STATE_CHANGE_STYLE: + case StateChangedType::STYLE: mbDockable = (GetStyle() & WB_DOCKABLE) != 0; break; diff --git a/vcl/source/window/event.cxx b/vcl/source/window/event.cxx index 2f900ff97266..95bb1586274e 100644 --- a/vcl/source/window/event.cxx +++ b/vcl/source/window/event.cxx @@ -423,7 +423,7 @@ void Window::ImplCallInitShow() { mpWindowImpl->mbReallyShown = true; mpWindowImpl->mbInInitShow = true; - StateChanged( STATE_CHANGE_INITSHOW ); + StateChanged( StateChangedType::INITSHOW ); mpWindowImpl->mbInInitShow = false; vcl::Window* pWindow = mpWindowImpl->mpFirstOverlap; diff --git a/vcl/source/window/floatwin.cxx b/vcl/source/window/floatwin.cxx index bc1642d43194..ec8c6a5566f7 100644 --- a/vcl/source/window/floatwin.cxx +++ b/vcl/source/window/floatwin.cxx @@ -537,14 +537,14 @@ bool FloatingWindow::Notify( NotifyEvent& rNEvt ) void FloatingWindow::StateChanged( StateChangedType nType ) { - if (nType == STATE_CHANGE_INITSHOW) + if (nType == StateChangedType::INITSHOW) { DoInitialLayout(); } SystemWindow::StateChanged( nType ); - if ( nType == STATE_CHANGE_CONTROLBACKGROUND ) + if ( nType == StateChangedType::CONTROLBACKGROUND ) { ImplInitSettings(); Invalidate(); diff --git a/vcl/source/window/globalization.cxx b/vcl/source/window/globalization.cxx index 59081a2a48d3..ed9f17e746a7 100644 --- a/vcl/source/window/globalization.cxx +++ b/vcl/source/window/globalization.cxx @@ -24,7 +24,7 @@ namespace vcl { void Window::EnableRTL ( bool bEnable ) { - StateChanged( STATE_CHANGE_MIRRORING ); + StateChanged( StateChangedType::MIRRORING ); OutputDevice::EnableRTL(bEnable); } diff --git a/vcl/source/window/layout.cxx b/vcl/source/window/layout.cxx index f448b0242500..1709f34bb695 100644 --- a/vcl/source/window/layout.cxx +++ b/vcl/source/window/layout.cxx @@ -1573,7 +1573,7 @@ void VclExpander::StateChanged(StateChangedType nType) { VclBin::StateChanged( nType ); - if (nType == STATE_CHANGE_INITSHOW) + if (nType == StateChangedType::INITSHOW) { vcl::Window *pChild = get_child(); if (pChild) diff --git a/vcl/source/window/menubarwindow.cxx b/vcl/source/window/menubarwindow.cxx index 840c5e19e83c..7a96ac850c87 100644 --- a/vcl/source/window/menubarwindow.cxx +++ b/vcl/source/window/menubarwindow.cxx @@ -980,8 +980,8 @@ void MenuBarWindow::StateChanged( StateChangedType nType ) { Window::StateChanged( nType ); - if ( ( nType == STATE_CHANGE_CONTROLFOREGROUND ) || - ( nType == STATE_CHANGE_CONTROLBACKGROUND ) ) + if ( ( nType == StateChangedType::CONTROLFOREGROUND ) || + ( nType == StateChangedType::CONTROLBACKGROUND ) ) { ImplInitMenuWindow( this, false, true ); Invalidate(); diff --git a/vcl/source/window/menufloatingwindow.cxx b/vcl/source/window/menufloatingwindow.cxx index 2e34bde30433..9b2b4392ba5a 100644 --- a/vcl/source/window/menufloatingwindow.cxx +++ b/vcl/source/window/menufloatingwindow.cxx @@ -1159,7 +1159,7 @@ void MenuFloatingWindow::StateChanged( StateChangedType nType ) { FloatingWindow::StateChanged( nType ); - if ( ( nType == STATE_CHANGE_CONTROLFOREGROUND ) || ( nType == STATE_CHANGE_CONTROLBACKGROUND ) ) + if ( ( nType == StateChangedType::CONTROLFOREGROUND ) || ( nType == StateChangedType::CONTROLBACKGROUND ) ) { ImplInitMenuWindow( this, false, false ); Invalidate(); diff --git a/vcl/source/window/msgbox.cxx b/vcl/source/window/msgbox.cxx index f6c6399e8db1..035d97f7e968 100644 --- a/vcl/source/window/msgbox.cxx +++ b/vcl/source/window/msgbox.cxx @@ -353,7 +353,7 @@ void MessBox::ImplPosControls() void MessBox::StateChanged( StateChangedType nType ) { - if ( nType == STATE_CHANGE_INITSHOW ) + if ( nType == StateChangedType::INITSHOW ) { ImplPosControls(); } diff --git a/vcl/source/window/splitwin.cxx b/vcl/source/window/splitwin.cxx index 3d99653d5975..4c07b25392a2 100644 --- a/vcl/source/window/splitwin.cxx +++ b/vcl/source/window/splitwin.cxx @@ -2602,18 +2602,19 @@ void SplitWindow::StateChanged( StateChangedType nType ) { switch ( nType ) { - case STATE_CHANGE_INITSHOW: + case StateChangedType::INITSHOW: if ( IsUpdateMode() ) ImplCalcLayout(); break; - case STATE_CHANGE_UPDATEMODE: + case StateChangedType::UPDATEMODE: if ( IsUpdateMode() && IsReallyShown() ) ImplCalcLayout(); break; - case STATE_CHANGE_CONTROLBACKGROUND: + case StateChangedType::CONTROLBACKGROUND: ImplInitSettings(); Invalidate(); break; + default:; } DockingWindow::StateChanged( nType ); diff --git a/vcl/source/window/status.cxx b/vcl/source/window/status.cxx index 545b0a6e0bb3..82d99d01141c 100644 --- a/vcl/source/window/status.cxx +++ b/vcl/source/window/status.cxx @@ -814,23 +814,23 @@ void StatusBar::StateChanged( StateChangedType nType ) { Window::StateChanged( nType ); - if ( nType == STATE_CHANGE_INITSHOW ) + if ( nType == StateChangedType::INITSHOW ) ImplFormat(); - else if ( nType == STATE_CHANGE_UPDATEMODE ) + else if ( nType == StateChangedType::UPDATEMODE ) Invalidate(); - else if ( (nType == STATE_CHANGE_ZOOM) || - (nType == STATE_CHANGE_CONTROLFONT) ) + else if ( (nType == StateChangedType::ZOOM) || + (nType == StateChangedType::CONTROLFONT) ) { mbFormat = true; ImplInitSettings( true, false, false ); Invalidate(); } - else if ( nType == STATE_CHANGE_CONTROLFOREGROUND ) + else if ( nType == StateChangedType::CONTROLFOREGROUND ) { ImplInitSettings( false, true, false ); Invalidate(); } - else if ( nType == STATE_CHANGE_CONTROLBACKGROUND ) + else if ( nType == StateChangedType::CONTROLBACKGROUND ) { ImplInitSettings( false, false, true ); Invalidate(); diff --git a/vcl/source/window/tabdlg.cxx b/vcl/source/window/tabdlg.cxx index b67b978d9166..c3258b4f0390 100644 --- a/vcl/source/window/tabdlg.cxx +++ b/vcl/source/window/tabdlg.cxx @@ -226,7 +226,7 @@ TabDialog::~TabDialog() void TabDialog::StateChanged( StateChangedType nType ) { - if ( nType == STATE_CHANGE_INITSHOW ) + if ( nType == StateChangedType::INITSHOW ) { // Calculate the Layout only for the initialized state if ( mbPosControls ) diff --git a/vcl/source/window/tabpage.cxx b/vcl/source/window/tabpage.cxx index f96cbebd0cb7..c7648f05692c 100644 --- a/vcl/source/window/tabpage.cxx +++ b/vcl/source/window/tabpage.cxx @@ -89,14 +89,14 @@ void TabPage::StateChanged( StateChangedType nType ) { Window::StateChanged( nType ); - if ( nType == STATE_CHANGE_INITSHOW ) + if ( nType == StateChangedType::INITSHOW ) { if ( GetSettings().GetStyleSettings().GetAutoMnemonic() ) ImplWindowAutoMnemonic( this ); // FIXME: no layouting, workaround some clipping issues ImplAdjustNWFSizes(); } - else if ( nType == STATE_CHANGE_CONTROLBACKGROUND ) + else if ( nType == StateChangedType::CONTROLBACKGROUND ) { ImplInitSettings(); Invalidate(); diff --git a/vcl/source/window/toolbox.cxx b/vcl/source/window/toolbox.cxx index d6245bf763f1..adcf55128543 100644 --- a/vcl/source/window/toolbox.cxx +++ b/vcl/source/window/toolbox.cxx @@ -4416,29 +4416,29 @@ void ToolBox::StateChanged( StateChangedType nType ) { DockingWindow::StateChanged( nType ); - if ( nType == STATE_CHANGE_INITSHOW ) + if ( nType == StateChangedType::INITSHOW ) ImplFormat(); - else if ( nType == STATE_CHANGE_ENABLE ) + else if ( nType == StateChangedType::ENABLE ) ImplUpdateItem(); - else if ( nType == STATE_CHANGE_UPDATEMODE ) + else if ( nType == StateChangedType::UPDATEMODE ) { if ( IsUpdateMode() ) Invalidate(); } - else if ( (nType == STATE_CHANGE_ZOOM) || - (nType == STATE_CHANGE_CONTROLFONT) ) + else if ( (nType == StateChangedType::ZOOM) || + (nType == StateChangedType::CONTROLFONT) ) { mbCalc = true; mbFormat = true; ImplInitSettings( true, false, false ); Invalidate(); } - else if ( nType == STATE_CHANGE_CONTROLFOREGROUND ) + else if ( nType == StateChangedType::CONTROLFOREGROUND ) { ImplInitSettings( false, true, false ); Invalidate(); } - else if ( nType == STATE_CHANGE_CONTROLBACKGROUND ) + else if ( nType == StateChangedType::CONTROLBACKGROUND ) { ImplInitSettings( false, false, true ); // font, foreground, background Invalidate(); diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx index be0e35cd1613..8d8eb6cea652 100644 --- a/vcl/source/window/window.cxx +++ b/vcl/source/window/window.cxx @@ -1981,16 +1981,16 @@ void Window::StateChanged(StateChangedType eType) switch (eType) { //stuff that doesn't invalidate the layout - case STATE_CHANGE_CONTROLFOREGROUND: - case STATE_CHANGE_CONTROLBACKGROUND: - case STATE_CHANGE_TRANSPARENT: - case STATE_CHANGE_UPDATEMODE: - case STATE_CHANGE_READONLY: - case STATE_CHANGE_ENABLE: - case STATE_CHANGE_STATE: - case STATE_CHANGE_DATA: - case STATE_CHANGE_INITSHOW: - case STATE_CHANGE_CONTROL_FOCUS: + case StateChangedType::CONTROLFOREGROUND: + case StateChangedType::CONTROLBACKGROUND: + case StateChangedType::TRANSPARENT: + case StateChangedType::UPDATEMODE: + case StateChangedType::READONLY: + case StateChangedType::ENABLE: + case StateChangedType::STATE: + case StateChangedType::DATA: + case StateChangedType::INITSHOW: + case StateChangedType::CONTROL_FOCUS: break; //stuff that does invalidate the layout default: @@ -2025,7 +2025,7 @@ void Window::SetStyle( WinBits nStyle ) { mpWindowImpl->mnPrevStyle = mpWindowImpl->mnStyle; mpWindowImpl->mnStyle = nStyle; - StateChanged( STATE_CHANGE_STYLE ); + StateChanged( StateChangedType::STYLE ); } } @@ -2049,7 +2049,7 @@ void Window::SetExtendedStyle( WinBits nExtendedStyle ) } mpWindowImpl->mnPrevExtendedStyle = mpWindowImpl->mnExtendedStyle; mpWindowImpl->mnExtendedStyle = nExtendedStyle; - StateChanged( STATE_CHANGE_EXTENDEDSTYLE ); + StateChanged( StateChangedType::EXTENDEDSTYLE ); } } @@ -2262,7 +2262,7 @@ void Window::Show( bool bVisible, sal_uInt16 nFlags ) mpWindowImpl->mpFrame->Show( false, false ); } - StateChanged( STATE_CHANGE_VISIBLE ); + StateChanged( StateChangedType::VISIBLE ); if ( mpWindowImpl->mbReallyVisible ) { @@ -2350,7 +2350,7 @@ void Window::Show( bool bVisible, sal_uInt16 nFlags ) ImplCallResize(); } - StateChanged( STATE_CHANGE_VISIBLE ); + StateChanged( StateChangedType::VISIBLE ); vcl::Window* pTestParent; if ( ImplIsOverlapWindow() ) @@ -2535,7 +2535,7 @@ void Window::Enable( bool bEnable, bool bChild ) mpWindowImpl->mbDisabled = !bEnable; if ( mpWindowImpl->mpSysObj ) mpWindowImpl->mpSysObj->Enable( bEnable && !mpWindowImpl->mbInputDisabled ); - StateChanged( STATE_CHANGE_ENABLE ); + StateChanged( StateChangedType::ENABLE ); ImplCallEventListeners( bEnable ? VCLEVENT_WINDOW_ENABLED : VCLEVENT_WINDOW_DISABLED ); } @@ -3089,7 +3089,7 @@ void Window::SetUpdateMode( bool bUpdate ) { mpWindowImpl->mbNoUpdate = !bUpdate; - StateChanged( STATE_CHANGE_UPDATEMODE ); + StateChanged( StateChangedType::UPDATEMODE ); } void Window::GrabFocus() @@ -3161,7 +3161,7 @@ void Window::SetText( const OUString& rStr ) pWindow->ImplCallEventListeners( VCLEVENT_WINDOW_FRAMETITLECHANGED, &oldTitle ); } - StateChanged( STATE_CHANGE_TEXT ); + StateChanged( StateChangedType::TEXT ); } OUString Window::GetText() const diff --git a/vcl/source/window/window2.cxx b/vcl/source/window/window2.cxx index f3588f59e548..bf09d53b4e94 100644 --- a/vcl/source/window/window2.cxx +++ b/vcl/source/window/window2.cxx @@ -512,7 +512,7 @@ void Window::SetZoom( const boost::rational<long>& rZoom ) if ( mpWindowImpl->maZoom != rZoom ) { mpWindowImpl->maZoom = rZoom; - StateChanged( STATE_CHANGE_ZOOM ); + StateChanged( StateChangedType::ZOOM ); } } @@ -579,7 +579,7 @@ void Window::SetControlFont() { delete mpWindowImpl->mpControlFont; mpWindowImpl->mpControlFont = NULL; - StateChanged( STATE_CHANGE_CONTROLFONT ); + StateChanged( StateChangedType::CONTROLFONT ); } } @@ -600,7 +600,7 @@ void Window::SetControlFont( const vcl::Font& rFont ) else mpWindowImpl->mpControlFont = new vcl::Font( rFont ); - StateChanged( STATE_CHANGE_CONTROLFONT ); + StateChanged( StateChangedType::CONTROLFONT ); } vcl::Font Window::GetControlFont() const @@ -620,7 +620,7 @@ void Window::SetControlForeground() { mpWindowImpl->maControlForeground = Color( COL_TRANSPARENT ); mpWindowImpl->mbControlForeground = false; - StateChanged( STATE_CHANGE_CONTROLFOREGROUND ); + StateChanged( StateChangedType::CONTROLFOREGROUND ); } } @@ -632,7 +632,7 @@ void Window::SetControlForeground( const Color& rColor ) { mpWindowImpl->maControlForeground = Color( COL_TRANSPARENT ); mpWindowImpl->mbControlForeground = false; - StateChanged( STATE_CHANGE_CONTROLFOREGROUND ); + StateChanged( StateChangedType::CONTROLFOREGROUND ); } } else @@ -641,7 +641,7 @@ void Window::SetControlForeground( const Color& rColor ) { mpWindowImpl->maControlForeground = rColor; mpWindowImpl->mbControlForeground = true; - StateChanged( STATE_CHANGE_CONTROLFOREGROUND ); + StateChanged( StateChangedType::CONTROLFOREGROUND ); } } } @@ -652,7 +652,7 @@ void Window::SetControlBackground() { mpWindowImpl->maControlBackground = Color( COL_TRANSPARENT ); mpWindowImpl->mbControlBackground = false; - StateChanged( STATE_CHANGE_CONTROLBACKGROUND ); + StateChanged( StateChangedType::CONTROLBACKGROUND ); } } @@ -664,7 +664,7 @@ void Window::SetControlBackground( const Color& rColor ) { mpWindowImpl->maControlBackground = Color( COL_TRANSPARENT ); mpWindowImpl->mbControlBackground = false; - StateChanged( STATE_CHANGE_CONTROLBACKGROUND ); + StateChanged( StateChangedType::CONTROLBACKGROUND ); } } else @@ -673,7 +673,7 @@ void Window::SetControlBackground( const Color& rColor ) { mpWindowImpl->maControlBackground = rColor; mpWindowImpl->mbControlBackground = true; - StateChanged( STATE_CHANGE_CONTROLBACKGROUND ); + StateChanged( StateChangedType::CONTROLBACKGROUND ); } } } @@ -1430,7 +1430,7 @@ void Window::queue_resize(StateChangedType eReason) bool bSomeoneCares = queue_ungrouped_resize(this); WindowImpl *pWindowImpl = mpWindowImpl->mpBorderWindow ? mpWindowImpl->mpBorderWindow->mpWindowImpl : mpWindowImpl; - if (eReason != STATE_CHANGE_VISIBLE) + if (eReason != StateChangedType::VISIBLE) { pWindowImpl->mnOptimalWidthCache = -1; pWindowImpl->mnOptimalHeightCache = -1; |