avmedia/source/viewer/mediawindow_impl.cxx | 4 cui/source/dialogs/hangulhanjadlg.cxx | 2 cui/source/dialogs/iconcdlg.cxx | 2 cui/source/options/connpooloptions.cxx | 2 cui/source/tabpages/autocdlg.cxx | 2 cui/source/tabpages/numfmt.cxx | 4 dbaccess/source/ui/browser/dataview.cxx | 4 dbaccess/source/ui/control/dbtreelistbox.cxx | 2 dbaccess/source/ui/dlg/indexdialog.cxx | 4 dbaccess/source/ui/dlg/tablespage.cxx | 2 dbaccess/source/ui/querydesign/JoinTableView.cxx | 2 dbaccess/source/ui/querydesign/TableWindow.cxx | 2 dbaccess/source/ui/querydesign/TableWindowTitle.cxx | 2 extensions/source/propctrlr/browserpage.cxx | 2 forms/source/richtext/richtextimplcontrol.hxx | 2 forms/source/richtext/richtextvclcontrol.cxx | 6 - forms/source/solar/control/navtoolbar.cxx | 9 + framework/source/uielement/addonstoolbarmanager.cxx | 2 framework/source/uielement/toolbarmanager.cxx | 6 - include/svtools/wizdlg.hxx | 2 include/svx/sidebar/PanelLayout.hxx | 2 include/vcl/dialog.hxx | 2 include/vcl/layout.hxx | 2 include/vcl/syswin.hxx | 2 include/vcl/tabctrl.hxx | 2 include/vcl/window.hxx | 48 +++++---- sc/source/ui/app/inputwin.cxx | 2 sc/source/ui/formdlg/dwfunctr.cxx | 4 sc/source/ui/formdlg/privsplt.cxx | 8 - sc/source/ui/miscdlgs/anyrefdg.cxx | 2 sc/source/ui/namedlg/namemgrtable.cxx | 2 sd/source/ui/animations/CustomAnimationPane.cxx | 2 sd/source/ui/dlg/PaneDockingWindow.cxx | 10 +- sfx2/source/control/thumbnailview.cxx | 16 +-- sfx2/source/dialog/basedlgs.cxx | 4 sfx2/source/dialog/dockwin.cxx | 4 sfx2/source/dialog/recfloat.cxx | 2 sfx2/source/dialog/srchdlg.cxx | 2 sfx2/source/dialog/templdlg.cxx | 4 sfx2/source/dialog/titledockwin.cxx | 3 sfx2/source/view/frame2.cxx | 2 sfx2/source/view/viewfrm2.cxx | 2 starmath/source/toolbox.cxx | 2 starmath/source/view.cxx | 4 svtools/source/brwbox/brwbox1.cxx | 2 svtools/source/brwbox/brwbox2.cxx | 14 +- svtools/source/brwbox/ebbcontrols.cxx | 2 svtools/source/brwbox/editbrowsebox.cxx | 12 +- svtools/source/contnr/fileview.cxx | 2 svtools/source/contnr/treelistbox.cxx | 4 svtools/source/control/calendar.cxx | 4 svtools/source/control/filectrl.cxx | 12 +- svtools/source/control/headbar.cxx | 10 +- svtools/source/control/ruler.cxx | 12 +- svtools/source/control/tabbar.cxx | 12 +- svtools/source/control/toolbarmenu.cxx | 2 svtools/source/control/valueset.cxx | 16 +-- svtools/source/dialogs/wizdlg.cxx | 2 svtools/source/table/tablecontrol.cxx | 9 + svx/source/dialog/charmap.cxx | 4 svx/source/dialog/dialcontrol.cxx | 7 - svx/source/dialog/dlgctrl.cxx | 8 - svx/source/dialog/fntctrl.cxx | 4 svx/source/fmcomp/gridctrl.cxx | 16 +-- svx/source/sidebar/paragraph/ParaBulletsControl.cxx | 4 svx/source/sidebar/paragraph/ParaNumberingControl.cxx | 4 svx/source/tbxctrls/tbcontrl.cxx | 4 sw/source/ui/dbui/mmoutputtypepage.cxx | 2 sw/source/ui/fldui/inpdlg.cxx | 2 sw/source/uibase/dbui/mailmergehelper.cxx | 2 vcl/source/control/button.cxx | 88 +++++++++--------- vcl/source/control/combobox.cxx | 20 ++-- vcl/source/control/ctrl.cxx | 16 +-- vcl/source/control/edit.cxx | 22 ++-- vcl/source/control/fixed.cxx | 56 +++++------ vcl/source/control/group.cxx | 16 +-- vcl/source/control/ilstbox.cxx | 40 ++++---- vcl/source/control/lstbox.cxx | 20 ++-- vcl/source/control/prgsbar.cxx | 8 - vcl/source/control/scrbar.cxx | 18 +-- vcl/source/control/slider.cxx | 16 +-- vcl/source/control/spinbtn.cxx | 15 +-- vcl/source/control/spinfld.cxx | 16 +-- vcl/source/control/tabctrl.cxx | 12 +- vcl/source/edit/vclmedit.cxx | 16 +-- vcl/source/uipreviewer/previewer.cxx | 2 vcl/source/window/brdwin.cxx | 6 - vcl/source/window/btndlg.cxx | 2 vcl/source/window/dialog.cxx | 4 vcl/source/window/dockingarea.cxx | 2 vcl/source/window/dockwin.cxx | 4 vcl/source/window/event.cxx | 2 vcl/source/window/floatwin.cxx | 4 vcl/source/window/globalization.cxx | 2 vcl/source/window/layout.cxx | 2 vcl/source/window/menubarwindow.cxx | 4 vcl/source/window/menufloatingwindow.cxx | 2 vcl/source/window/msgbox.cxx | 2 vcl/source/window/splitwin.cxx | 7 - vcl/source/window/status.cxx | 12 +- vcl/source/window/tabdlg.cxx | 2 vcl/source/window/tabpage.cxx | 4 vcl/source/window/toolbox.cxx | 14 +- vcl/source/window/window.cxx | 34 +++--- vcl/source/window/window2.cxx | 20 ++-- 105 files changed, 446 insertions(+), 432 deletions(-)
New commits: commit cb7ede2d9970a4d162dc71922f578922c0d6235a Author: Noel Grandin <[email protected]> Date: Tue Oct 7 16:08:25 2014 +0200 convert vcl StateChangedType to enum class Change-Id: Ifa46523619ae7fb8d112525b8df594836e51bb8f Reviewed-on: https://gerrit.libreoffice.org/11843 Tested-by: LibreOffice gerrit bot <[email protected]> Reviewed-by: Noel Grandin <[email protected]> diff --git a/avmedia/source/viewer/mediawindow_impl.cxx b/avmedia/source/viewer/mediawindow_impl.cxx index 3bd2b46..66a6251 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 4ff53ba..067397c 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 b85829c..835829d 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 f905137..7743d82 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 7475cd1..e529566 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 4121b72..ed15991 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 bf06baa..3938953 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 0eb0fc5..213933f 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 9f2989e..e17a8ed 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 4a34d38..4e03551 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 8d64d01..46f0ddb 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 78b212f..418d0d1 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 a2a2299..4ff6e20 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 8f03f67..2e733a9 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 8153fd2..5c6c448 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 5b293b3..21c8a51 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 7b332a2..7793005 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 82e7596..35abdca 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 555d967..b9ec538 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 480032d..a4ab002 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 9e8b90a..93b0030 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 e8b7dce..c967c95 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 374a42c..0eed7cb 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 11877a0..1f98a6b 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 5351e45..526bc25 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 14c23bd..3e94287 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 9b9457f..6393ed3 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 e602a56..9c03ed7 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 d111b79..683d3d6 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 0d06e75..348dddb 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 a024b72..1f37f67 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 0c29199..96465a4 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 cc2dd55..286f3e1 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 96ae388..0ee422f 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 f3d4a3d..faa7093 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 5124b47..7129fb3 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 981cd9c..ccb6da5 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 6e08e6f..efc3c78 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 ed3b6a2..688250d 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 6588213..5ada9dd 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 5701c33..7be4839 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 60bee86..531f1b4 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 455441f..04a9355 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 c023365..f9c77ca 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 e69a4e0..f7374bf 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 d4c0e7d..d04a618 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 8628179..2d12692 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 f9fe560..e009e82 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 1d2e63d..974ac7a 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 35c47af..59c18fd 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 ff3a748..348f9d7 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 f6df0e4..cf72f0f 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 b5d56ba..82a9bb0 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 a74ce2d..f25a0e6 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 9c4fc54..20d570b 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 b28a9e4..cb01684 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 9bdd65a..a0d8446 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 54febf2..8b0b3d5 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 9afa63d..eefe81a 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 62418f0..b728212 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 c14125d..e826363 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 10b7f40..6290079 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 5e20a83..fc76569 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 317e2d1..f651c63 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 268728a..d33d490 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 7125ef9..86fe21f 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 7d59ac0..6900cda 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 a587b1c..0fe5dae 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 40d0483..4498bc8 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 92adafc..81c6409 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 5db9d6d..52ef7b3 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 2880c90..857e389 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 4282453..3654cbd 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 5d0bb1d..2c57dee 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 beaa5b8..06a3cde 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 795bb3b..5fa38b2 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 d936d3b..693070f 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 c045128..9942aeb 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 d1b7bf9..1536f93 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 d9ee757..df763dd 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 0ebdc37..106ca0d 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 b7d9de8..122aed1 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 ); ... etc. - the rest is truncated _______________________________________________ Libreoffice-commits mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
