summaryrefslogtreecommitdiff
path: root/framework/source/uielement
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/source/uielement
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/source/uielement')
-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
5 files changed, 12 insertions, 12 deletions
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