summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2016-12-06 13:26:09 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2016-12-07 07:10:39 +0000
commit2d48f5fc0a4f7b5b8c9d3a4f4cc85d5f3a7e5053 (patch)
treec2e18df7dd44255e98c91f242194fd9bb66f3f3e /svx
parented80d28d9f019a1afa2edd66e115eae26ea19963 (diff)
convert VCLEVENT constants to scoped enum
Change-Id: Ic8ccb0a9715ec05182dacddab2c015b0de6a0fba Reviewed-on: https://gerrit.libreoffice.org/31675 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svx')
-rw-r--r--svx/source/accessibility/AccessibleFrameSelector.cxx6
-rw-r--r--svx/source/fmcomp/gridcell.cxx52
-rw-r--r--svx/source/form/databaselocationinput.cxx4
-rw-r--r--svx/source/inc/gridcell.hxx10
-rw-r--r--svx/source/svdraw/sdrpaintwindow.cxx2
-rw-r--r--svx/source/tbxctrls/tbcontrl.cxx4
6 files changed, 40 insertions, 38 deletions
diff --git a/svx/source/accessibility/AccessibleFrameSelector.cxx b/svx/source/accessibility/AccessibleFrameSelector.cxx
index 26ae123968d0..c7c9af11b270 100644
--- a/svx/source/accessibility/AccessibleFrameSelector.cxx
+++ b/svx/source/accessibility/AccessibleFrameSelector.cxx
@@ -483,12 +483,12 @@ IMPL_LINK( AccFrameSelector, WindowEventListener, VclWindowEvent&, rEvent, void
{
vcl::Window* pWindow = rEvent.GetWindow();
DBG_ASSERT( pWindow, "AccFrameSelector::WindowEventListener: no window!" );
- if ( pWindow->IsAccessibilityEventsSuppressed() && ( rEvent.GetId() != VCLEVENT_OBJECT_DYING ) )
+ if ( pWindow->IsAccessibilityEventsSuppressed() && ( rEvent.GetId() != VclEventId::ObjectDying ) )
return;
switch ( rEvent.GetId() )
{
- case VCLEVENT_WINDOW_GETFOCUS:
+ case VclEventId::WindowGetFocus:
{
if ( meBorder == FrameBorderType::NONE )
{
@@ -498,7 +498,7 @@ IMPL_LINK( AccFrameSelector, WindowEventListener, VclWindowEvent&, rEvent, void
}
}
break;
- case VCLEVENT_WINDOW_LOSEFOCUS:
+ case VclEventId::WindowLoseFocus:
{
if ( meBorder == FrameBorderType::NONE )
{
diff --git a/svx/source/fmcomp/gridcell.cxx b/svx/source/fmcomp/gridcell.cxx
index 63c6024bdda9..fc59e76fbb95 100644
--- a/svx/source/fmcomp/gridcell.cxx
+++ b/svx/source/fmcomp/gridcell.cxx
@@ -3397,23 +3397,23 @@ void FmXGridCell::onFocusLost( const awt::FocusEvent& _rEvent )
}
-void FmXGridCell::onWindowEvent( const sal_uIntPtr _nEventId, const vcl::Window& _rWindow, const void* _pEventData )
+void FmXGridCell::onWindowEvent( const VclEventId _nEventId, const vcl::Window& _rWindow, const void* _pEventData )
{
switch ( _nEventId )
{
- case VCLEVENT_CONTROL_GETFOCUS:
- case VCLEVENT_WINDOW_GETFOCUS:
- case VCLEVENT_CONTROL_LOSEFOCUS:
- case VCLEVENT_WINDOW_LOSEFOCUS:
+ case VclEventId::ControlGetFocus:
+ case VclEventId::WindowGetFocus:
+ case VclEventId::ControlLoseFocus:
+ case VclEventId::WindowLoseFocus:
{
if ( ( _rWindow.IsCompoundControl()
- && ( _nEventId == VCLEVENT_CONTROL_GETFOCUS
- || _nEventId == VCLEVENT_CONTROL_LOSEFOCUS
+ && ( _nEventId == VclEventId::ControlGetFocus
+ || _nEventId == VclEventId::ControlLoseFocus
)
)
|| ( !_rWindow.IsCompoundControl()
- && ( _nEventId == VCLEVENT_WINDOW_GETFOCUS
- || _nEventId == VCLEVENT_WINDOW_LOSEFOCUS
+ && ( _nEventId == VclEventId::WindowGetFocus
+ || _nEventId == VclEventId::WindowLoseFocus
)
)
)
@@ -3421,7 +3421,7 @@ void FmXGridCell::onWindowEvent( const sal_uIntPtr _nEventId, const vcl::Window&
if ( !m_aFocusListeners.getLength() )
break;
- bool bFocusGained = ( _nEventId == VCLEVENT_CONTROL_GETFOCUS ) || ( _nEventId == VCLEVENT_WINDOW_GETFOCUS );
+ bool bFocusGained = ( _nEventId == VclEventId::ControlGetFocus ) || ( _nEventId == VclEventId::WindowGetFocus );
awt::FocusEvent aEvent;
aEvent.Source = *this;
@@ -3435,19 +3435,19 @@ void FmXGridCell::onWindowEvent( const sal_uIntPtr _nEventId, const vcl::Window&
}
}
break;
- case VCLEVENT_WINDOW_MOUSEBUTTONDOWN:
- case VCLEVENT_WINDOW_MOUSEBUTTONUP:
+ case VclEventId::WindowMouseButtonDown:
+ case VclEventId::WindowMouseButtonUp:
{
if ( !m_aMouseListeners.getLength() )
break;
- const bool bButtonDown = ( _nEventId == VCLEVENT_WINDOW_MOUSEBUTTONDOWN );
+ const bool bButtonDown = ( _nEventId == VclEventId::WindowMouseButtonDown );
awt::MouseEvent aEvent( VCLUnoHelper::createMouseEvent( *static_cast< const ::MouseEvent* >( _pEventData ), *this ) );
m_aMouseListeners.notifyEach( bButtonDown ? &awt::XMouseListener::mousePressed : &awt::XMouseListener::mouseReleased, aEvent );
}
break;
- case VCLEVENT_WINDOW_MOUSEMOVE:
+ case VclEventId::WindowMouseMove:
{
const MouseEvent& rMouseEvent = *static_cast< const ::MouseEvent* >( _pEventData );
if ( rMouseEvent.IsEnterWindow() || rMouseEvent.IsLeaveWindow() )
@@ -3470,17 +3470,18 @@ void FmXGridCell::onWindowEvent( const sal_uIntPtr _nEventId, const vcl::Window&
}
}
break;
- case VCLEVENT_WINDOW_KEYINPUT:
- case VCLEVENT_WINDOW_KEYUP:
+ case VclEventId::WindowKeyInput:
+ case VclEventId::WindowKeyUp:
{
if ( !m_aKeyListeners.getLength() )
break;
- const bool bKeyPressed = ( _nEventId == VCLEVENT_WINDOW_KEYINPUT );
+ const bool bKeyPressed = ( _nEventId == VclEventId::WindowKeyInput );
awt::KeyEvent aEvent( VCLUnoHelper::createKeyEvent( *static_cast< const ::KeyEvent* >( _pEventData ), *this ) );
m_aKeyListeners.notifyEach( bKeyPressed ? &awt::XKeyListener::keyPressed: &awt::XKeyListener::keyReleased, aEvent );
}
break;
+ default: break;
}
}
@@ -3802,16 +3803,17 @@ void FmXEditCell::onFocusLost( const awt::FocusEvent& _rEvent )
}
-void FmXEditCell::onWindowEvent( const sal_uIntPtr _nEventId, const vcl::Window& _rWindow, const void* _pEventData )
+void FmXEditCell::onWindowEvent( const VclEventId _nEventId, const vcl::Window& _rWindow, const void* _pEventData )
{
switch ( _nEventId )
{
- case VCLEVENT_EDIT_MODIFY:
+ case VclEventId::EditModify:
{
if ( m_pEditImplementation && m_aTextListeners.getLength() )
onTextChanged();
return;
}
+ default: break;
}
FmXTextCell::onWindowEvent( _nEventId, _rWindow, _pEventData );
@@ -3955,11 +3957,11 @@ vcl::Window* FmXCheckBoxCell::getEventWindow() const
}
-void FmXCheckBoxCell::onWindowEvent( const sal_uIntPtr _nEventId, const vcl::Window& _rWindow, const void* _pEventData )
+void FmXCheckBoxCell::onWindowEvent( const VclEventId _nEventId, const vcl::Window& _rWindow, const void* _pEventData )
{
switch ( _nEventId )
{
- case VCLEVENT_CHECKBOX_TOGGLE:
+ case VclEventId::CheckboxToggle:
{
// check boxes are to be committed immediately (this holds for ordinary check box controls in
// documents, and this must hold for check boxes in grid columns, too
@@ -4287,10 +4289,10 @@ void SAL_CALL FmXListBoxCell::makeVisible(sal_Int16 nEntry) throw( RuntimeExcept
}
-void FmXListBoxCell::onWindowEvent( const sal_uIntPtr _nEventId, const vcl::Window& _rWindow, const void* _pEventData )
+void FmXListBoxCell::onWindowEvent( const VclEventId _nEventId, const vcl::Window& _rWindow, const void* _pEventData )
{
if ( ( &_rWindow == m_pBox )
- && ( _nEventId == VCLEVENT_LISTBOX_SELECT )
+ && ( _nEventId == VclEventId::ListboxSelect )
)
{
OnDoubleClick( *m_pBox );
@@ -4488,12 +4490,12 @@ void SAL_CALL FmXComboBoxCell::setDropDownLineCount(sal_Int16 nLines) throw( Run
}
-void FmXComboBoxCell::onWindowEvent( const sal_uIntPtr _nEventId, const vcl::Window& _rWindow, const void* _pEventData )
+void FmXComboBoxCell::onWindowEvent( const VclEventId _nEventId, const vcl::Window& _rWindow, const void* _pEventData )
{
switch ( _nEventId )
{
- case VCLEVENT_COMBOBOX_SELECT:
+ case VclEventId::ComboboxSelect:
{
awt::ItemEvent aEvent;
aEvent.Source = *this;
diff --git a/svx/source/form/databaselocationinput.cxx b/svx/source/form/databaselocationinput.cxx
index 64419352961e..be1665d8eebd 100644
--- a/svx/source/form/databaselocationinput.cxx
+++ b/svx/source/form/databaselocationinput.cxx
@@ -198,14 +198,14 @@ namespace svx
IMPL_LINK( DatabaseLocationInputController_Impl, OnControlAction, VclWindowEvent&, _rEvent, void )
{
if ( ( _rEvent.GetWindow() == &m_rBrowseButton )
- && ( _rEvent.GetId() == VCLEVENT_BUTTON_CLICK )
+ && ( _rEvent.GetId() == VclEventId::ButtonClick )
)
{
impl_onBrowseButtonClicked();
}
if ( ( _rEvent.GetWindow() == &m_rLocationInput )
- && ( _rEvent.GetId() == VCLEVENT_EDIT_MODIFY )
+ && ( _rEvent.GetId() == VclEventId::EditModify )
)
{
m_bNeedExistenceCheck = true;
diff --git a/svx/source/inc/gridcell.hxx b/svx/source/inc/gridcell.hxx
index a6150aad4148..13d0a8aba8ed 100644
--- a/svx/source/inc/gridcell.hxx
+++ b/svx/source/inc/gridcell.hxx
@@ -793,7 +793,7 @@ public:
protected:
virtual vcl::Window* getEventWindow() const;
- virtual void onWindowEvent( const sal_uLong _nEventId, const vcl::Window& _rWindow, const void* _pEventData );
+ virtual void onWindowEvent( const VclEventId _nEventId, const vcl::Window& _rWindow, const void* _pEventData );
// default implementations call our focus listeners, don't forget to call them if you override this
virtual void onFocusGained( const css::awt::FocusEvent& _rEvent );
@@ -907,7 +907,7 @@ public:
virtual void SAL_CALL removeChangeListener( const css::uno::Reference< css::form::XChangeListener >& aListener ) throw (css::uno::RuntimeException, std::exception) override;
protected:
- virtual void onWindowEvent( const sal_uLong _nEventId, const vcl::Window& _rWindow, const void* _pEventData ) override;
+ virtual void onWindowEvent( const VclEventId _nEventId, const vcl::Window& _rWindow, const void* _pEventData ) override;
virtual void onFocusGained( const css::awt::FocusEvent& _rEvent ) override;
virtual void onFocusLost( const css::awt::FocusEvent& _rEvent ) override;
@@ -959,7 +959,7 @@ public:
protected:
virtual vcl::Window* getEventWindow() const override;
- virtual void onWindowEvent( const sal_uLong _nEventId, const vcl::Window& _rWindow, const void* _pEventData ) override;
+ virtual void onWindowEvent( const VclEventId _nEventId, const vcl::Window& _rWindow, const void* _pEventData ) override;
};
@@ -1011,7 +1011,7 @@ public:
virtual void SAL_CALL SAL_CALL makeVisible(sal_Int16 nEntry) throw(css::uno::RuntimeException, std::exception) override;
protected:
- virtual void onWindowEvent( const sal_uLong _nEventId, const vcl::Window& _rWindow, const void* _pEventData ) override;
+ virtual void onWindowEvent( const VclEventId _nEventId, const vcl::Window& _rWindow, const void* _pEventData ) override;
DECL_LINK( OnDoubleClick, ListBox&, void );
};
@@ -1056,7 +1056,7 @@ public:
virtual void SAL_CALL setDropDownLineCount( ::sal_Int16 Lines ) throw (css::uno::RuntimeException, std::exception) override;
protected:
- virtual void onWindowEvent( const sal_uLong _nEventId, const vcl::Window& _rWindow, const void* _pEventData ) override;
+ virtual void onWindowEvent( const VclEventId _nEventId, const vcl::Window& _rWindow, const void* _pEventData ) override;
};
diff --git a/svx/source/svdraw/sdrpaintwindow.cxx b/svx/source/svdraw/sdrpaintwindow.cxx
index 46897dfc1b9f..a83954a6fef1 100644
--- a/svx/source/svdraw/sdrpaintwindow.cxx
+++ b/svx/source/svdraw/sdrpaintwindow.cxx
@@ -45,7 +45,7 @@ public:
IMPL_LINK(CandidateMgr, WindowEventListener, VclWindowEvent&, rEvent, void)
{
vcl::Window* pWindow = rEvent.GetWindow();
- if (rEvent.GetId() == VCLEVENT_OBJECT_DYING)
+ if (rEvent.GetId() == VclEventId::ObjectDying)
{
m_aDeletedCandidates.insert(pWindow);
}
diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx
index d2252e64a3e1..f60dc31e588a 100644
--- a/svx/source/tbxctrls/tbcontrl.cxx
+++ b/svx/source/tbxctrls/tbcontrl.cxx
@@ -826,7 +826,7 @@ void SvxStyleBox_Impl::UserDraw( const UserDrawEvent& rUDEvt )
IMPL_LINK(SvxStyleBox_Impl, CalcOptimalExtraUserWidth, VclWindowEvent&, event, void)
{
// perform the calculation only when we are opening the dropdown
- if (event.GetId() != VCLEVENT_DROPDOWN_PRE_OPEN)
+ if (event.GetId() != VclEventId::DropdownPreOpen)
return;
long nMaxNormalFontWidth = 0;
@@ -999,7 +999,7 @@ void SvxFontNameBox_Impl::FillList()
IMPL_LINK( SvxFontNameBox_Impl, CheckAndMarkUnknownFont, VclWindowEvent&, event, void )
{
- if( event.GetId() != VCLEVENT_EDIT_MODIFY )
+ if( event.GetId() != VclEventId::EditModify )
return;
OUString fontname = GetSubEdit()->GetText();
lcl_GetDocFontList( &pFontList, this );