summaryrefslogtreecommitdiff
path: root/framework
diff options
context:
space:
mode:
authorTor Lillqvist <tml@collabora.com>2014-08-23 22:22:32 +0300
committerTor Lillqvist <tml@collabora.com>2014-08-23 22:33:30 +0300
commit30ae83c268125383866d47a7ee3e4a5dfcf59f71 (patch)
treeab52f8ecd7ed9517d70e13b22843b7948f20c9e9 /framework
parent02f6c270e79879188b2be670c6db4feb56bb064e (diff)
fdo#82577: Handle KeyCode
Put the VCL KeyCode class in the vcl namespace. Avoids clash with the X11 KeyCode typedef. Change-Id: I624c9d937f7c5f5986d313b6c5f060bd8bb7e028
Diffstat (limited to 'framework')
-rw-r--r--framework/inc/uielement/menubarmanager.hxx2
-rw-r--r--framework/inc/uielement/newmenucontroller.hxx4
-rw-r--r--framework/source/accelerators/acceleratorconfiguration.cxx2
-rw-r--r--framework/source/dispatch/menudispatcher.cxx2
-rw-r--r--framework/source/uielement/comboboxtoolbarcontroller.cxx2
-rw-r--r--framework/source/uielement/edittoolbarcontroller.cxx2
-rw-r--r--framework/source/uielement/menubarmanager.cxx10
-rw-r--r--framework/source/uielement/newmenucontroller.cxx8
-rw-r--r--framework/source/uielement/spinfieldtoolbarcontroller.cxx2
9 files changed, 17 insertions, 17 deletions
diff --git a/framework/inc/uielement/menubarmanager.hxx b/framework/inc/uielement/menubarmanager.hxx
index 15c343021d26..f3d167392cf5 100644
--- a/framework/inc/uielement/menubarmanager.hxx
+++ b/framework/inc/uielement/menubarmanager.hxx
@@ -193,7 +193,7 @@ class MenuBarManager : public com::sun::star::frame::XStatusListener
::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch > xMenuItemDispatch;
::com::sun::star::uno::Reference< ::com::sun::star::frame::XPopupMenuController > xPopupMenuController;
::com::sun::star::uno::Reference< ::com::sun::star::awt::XPopupMenu > xPopupMenu;
- KeyCode aKeyCode;
+ vcl::KeyCode aKeyCode;
};
void RetrieveShortcuts( std::vector< MenuItemHandler* >& aMenuShortCuts );
diff --git a/framework/inc/uielement/newmenucontroller.hxx b/framework/inc/uielement/newmenucontroller.hxx
index 943ef9206fff..c812d0c78029 100644
--- a/framework/inc/uielement/newmenucontroller.hxx
+++ b/framework/inc/uielement/newmenucontroller.hxx
@@ -91,9 +91,9 @@ namespace framework
void fillPopupMenu( com::sun::star::uno::Reference< com::sun::star::awt::XPopupMenu >& rPopupMenu );
void retrieveShortcutsFromConfiguration( const ::com::sun::star::uno::Reference< ::com::sun::star::ui::XAcceleratorConfiguration >& rAccelCfg,
const ::com::sun::star::uno::Sequence< OUString >& rCommands,
- std::vector< KeyCode >& aMenuShortCuts );
+ std::vector< vcl::KeyCode >& aMenuShortCuts );
void setAccelerators( PopupMenu* pPopupMenu );
- void determineAndSetNewDocAccel( PopupMenu* pPopupMenu, const KeyCode& rKeyCode );
+ void determineAndSetNewDocAccel( PopupMenu* pPopupMenu, const vcl::KeyCode& rKeyCode );
void setMenuImages( PopupMenu* pPopupMenu, bool bSetImages );
private:
diff --git a/framework/source/accelerators/acceleratorconfiguration.cxx b/framework/source/accelerators/acceleratorconfiguration.cxx
index 5dc8c25374f7..5a83c35ac97d 100644
--- a/framework/source/accelerators/acceleratorconfiguration.cxx
+++ b/framework/source/accelerators/acceleratorconfiguration.cxx
@@ -723,7 +723,7 @@ AcceleratorCache::TKeyList::const_iterator lcl_getPreferredKey(const Accelerator
++pIt )
{
const css::awt::KeyEvent& rAWTKey = *pIt;
- const KeyCode aVCLKey = ::svt::AcceleratorExecute::st_AWTKey2VCLKey(rAWTKey);
+ const vcl::KeyCode aVCLKey = ::svt::AcceleratorExecute::st_AWTKey2VCLKey(rAWTKey);
const OUString sName = aVCLKey.GetName();
if (!sName.isEmpty())
diff --git a/framework/source/dispatch/menudispatcher.cxx b/framework/source/dispatch/menudispatcher.cxx
index 3305dc90f48f..748d89c5b230 100644
--- a/framework/source/dispatch/menudispatcher.cxx
+++ b/framework/source/dispatch/menudispatcher.cxx
@@ -202,7 +202,7 @@ void MenuDispatcher::impl_setAccelerators( Menu* pMenu, const Accelerator& aAcce
impl_setAccelerators( (Menu *)pPopup, aAccel );
else if ( nId && !pMenu->GetPopupMenu(nId))
{
- KeyCode aCode = aAccel.GetKeyCode( nId );
+ vcl::KeyCode aCode = aAccel.GetKeyCode( nId );
if ( aCode.GetCode() )
pMenu->SetAccelKey( nId, aCode );
}
diff --git a/framework/source/uielement/comboboxtoolbarcontroller.cxx b/framework/source/uielement/comboboxtoolbarcontroller.cxx
index edc205e078ea..ba60e2bd8a19 100644
--- a/framework/source/uielement/comboboxtoolbarcontroller.cxx
+++ b/framework/source/uielement/comboboxtoolbarcontroller.cxx
@@ -225,7 +225,7 @@ bool ComboboxToolbarController::PreNotify( NotifyEvent& rNEvt )
case EVENT_KEYINPUT :
{
const ::KeyEvent* pKeyEvent = rNEvt.GetKeyEvent();
- const KeyCode& rKeyCode = pKeyEvent->GetKeyCode();
+ const vcl::KeyCode& rKeyCode = pKeyEvent->GetKeyCode();
if(( rKeyCode.GetModifier() | rKeyCode.GetCode()) == KEY_RETURN )
{
// Call execute only with non-empty text
diff --git a/framework/source/uielement/edittoolbarcontroller.cxx b/framework/source/uielement/edittoolbarcontroller.cxx
index 5a6b6b9ae7ac..64d1d196ef16 100644
--- a/framework/source/uielement/edittoolbarcontroller.cxx
+++ b/framework/source/uielement/edittoolbarcontroller.cxx
@@ -189,7 +189,7 @@ bool EditToolbarController::PreNotify( NotifyEvent& rNEvt )
if( rNEvt.GetType() == EVENT_KEYINPUT )
{
const ::KeyEvent* pKeyEvent = rNEvt.GetKeyEvent();
- const KeyCode& rKeyCode = pKeyEvent->GetKeyCode();
+ const vcl::KeyCode& rKeyCode = pKeyEvent->GetKeyCode();
if(( rKeyCode.GetModifier() | rKeyCode.GetCode()) == KEY_RETURN )
{
// Call execute only with non-empty text
diff --git a/framework/source/uielement/menubarmanager.cxx b/framework/source/uielement/menubarmanager.cxx
index 341225135ee2..48626c1794bd 100644
--- a/framework/source/uielement/menubarmanager.cxx
+++ b/framework/source/uielement/menubarmanager.cxx
@@ -835,7 +835,7 @@ IMPL_LINK( MenuBarManager, Activate, Menu *, pMenu )
// Only non-popup menu items can have a short-cut
if ( pMenuItemHandler->aMenuItemURL == aCmdHelpIndex )
{
- KeyCode aKeyCode( KEY_F1 );
+ vcl::KeyCode aKeyCode( KEY_F1 );
pMenu->SetAccelKey( pMenuItemHandler->nItemId, aKeyCode );
}
else if ( pMenu->GetPopupMenu( pMenuItemHandler->nItemId ) == 0 )
@@ -854,8 +854,8 @@ IMPL_LINK( MenuBarManager, Activate, Menu *, pMenu )
if ( xDispatchProvider.is() )
{
- KeyCode aEmptyKeyCode;
- SvtCommandOptions aCmdOptions;
+ vcl::KeyCode aEmptyKeyCode;
+ SvtCommandOptions aCmdOptions;
std::vector< MenuItemHandler* >::iterator p;
for ( p = m_aMenuItemHandlerVector.begin(); p != m_aMenuItemHandlerVector.end(); ++p )
{
@@ -1407,7 +1407,7 @@ void MenuBarManager::FillMenuManager( Menu* pMenu, const Reference< XFrame >& rF
// Only non-popup menu items can have a short-cut
if ( pMenuItemHandler->aMenuItemURL == aCmdHelpIndex )
{
- KeyCode aKeyCode( KEY_F1 );
+ vcl::KeyCode aKeyCode( KEY_F1 );
pMenu->SetAccelKey( pMenuItemHandler->nItemId, aKeyCode );
}
else if ( pMenu->GetPopupMenu( pMenuItemHandler->nItemId ) == 0 )
@@ -1524,7 +1524,7 @@ void MenuBarManager::RetrieveShortcuts( std::vector< MenuItemHandler* >& aMenuSh
}
}
- KeyCode aEmptyKeyCode;
+ vcl::KeyCode aEmptyKeyCode;
Sequence< OUString > aSeq( aMenuShortCuts.size() );
const sal_uInt32 nCount = aMenuShortCuts.size();
for ( sal_uInt32 i = 0; i < nCount; ++i )
diff --git a/framework/source/uielement/newmenucontroller.cxx b/framework/source/uielement/newmenucontroller.cxx
index cbe08737a01a..fe473bc36324 100644
--- a/framework/source/uielement/newmenucontroller.cxx
+++ b/framework/source/uielement/newmenucontroller.cxx
@@ -113,7 +113,7 @@ void NewMenuController::setMenuImages( PopupMenu* pPopupMenu, bool bSetImages )
}
}
-void NewMenuController::determineAndSetNewDocAccel( PopupMenu* pPopupMenu, const KeyCode& rKeyCode )
+void NewMenuController::determineAndSetNewDocAccel( PopupMenu* pPopupMenu, const vcl::KeyCode& rKeyCode )
{
sal_uInt16 nCount( pPopupMenu->GetItemCount() );
sal_uInt16 nId( 0 );
@@ -217,9 +217,9 @@ void NewMenuController::setAccelerators( PopupMenu* pPopupMenu )
}
}
- KeyCode aEmptyKeyCode;
+ vcl::KeyCode aEmptyKeyCode;
sal_uInt32 nItemCount( pPopupMenu->GetItemCount() );
- std::vector< KeyCode > aMenuShortCuts;
+ std::vector< vcl::KeyCode > aMenuShortCuts;
std::vector< OUString > aCmds;
std::vector< sal_uInt32 > aIds;
for ( sal_uInt32 i = 0; i < nItemCount; i++ )
@@ -275,7 +275,7 @@ void NewMenuController::setAccelerators( PopupMenu* pPopupMenu )
void NewMenuController::retrieveShortcutsFromConfiguration(
const Reference< XAcceleratorConfiguration >& rAccelCfg,
const Sequence< OUString >& rCommands,
- std::vector< KeyCode >& aMenuShortCuts )
+ std::vector< vcl::KeyCode >& aMenuShortCuts )
{
if ( rAccelCfg.is() )
{
diff --git a/framework/source/uielement/spinfieldtoolbarcontroller.cxx b/framework/source/uielement/spinfieldtoolbarcontroller.cxx
index 093a082ebf91..ae4fba5d1095 100644
--- a/framework/source/uielement/spinfieldtoolbarcontroller.cxx
+++ b/framework/source/uielement/spinfieldtoolbarcontroller.cxx
@@ -311,7 +311,7 @@ bool SpinfieldToolbarController::PreNotify( NotifyEvent& rNEvt )
if( rNEvt.GetType() == EVENT_KEYINPUT )
{
const ::KeyEvent* pKeyEvent = rNEvt.GetKeyEvent();
- const KeyCode& rKeyCode = pKeyEvent->GetKeyCode();
+ const vcl::KeyCode& rKeyCode = pKeyEvent->GetKeyCode();
if(( rKeyCode.GetModifier() | rKeyCode.GetCode()) == KEY_RETURN )
{
// Call execute only with non-empty text