summaryrefslogtreecommitdiffstats
path: root/svtools
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 /svtools
parentResolves fdo#82970: Insert footnote button has incorrect tooltip (diff)
downloadcore-30ae83c268125383866d47a7ee3e4a5dfcf59f71.tar.gz
core-30ae83c268125383866d47a7ee3e4a5dfcf59f71.zip
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 'svtools')
-rw-r--r--svtools/source/brwbox/ebbcontrols.cxx8
-rw-r--r--svtools/source/contnr/fileview.cxx2
-rw-r--r--svtools/source/contnr/imivctl1.cxx6
-rw-r--r--svtools/source/contnr/simptabl.cxx2
-rw-r--r--svtools/source/contnr/svimpbox.cxx2
-rw-r--r--svtools/source/contnr/templwin.cxx2
-rw-r--r--svtools/source/contnr/treelistbox.cxx6
-rw-r--r--svtools/source/control/inettbc.cxx8
-rw-r--r--svtools/source/dialogs/wizdlg.cxx4
-rw-r--r--svtools/source/misc/acceleratorexecute.cxx8
-rw-r--r--svtools/source/table/defaultinputhandler.cxx2
-rw-r--r--svtools/source/toolpanel/drawerlayouter.cxx2
-rw-r--r--svtools/source/toolpanel/paneltabbar.cxx2
-rw-r--r--svtools/source/toolpanel/toolpaneldeck.cxx2
14 files changed, 28 insertions, 28 deletions
diff --git a/svtools/source/brwbox/ebbcontrols.cxx b/svtools/source/brwbox/ebbcontrols.cxx
index 13988ce97cfe..da54a710f408 100644
--- a/svtools/source/brwbox/ebbcontrols.cxx
+++ b/svtools/source/brwbox/ebbcontrols.cxx
@@ -58,7 +58,7 @@ namespace svt
if (!IsInDropDown())
{
const KeyEvent *pEvt = rNEvt.GetKeyEvent();
- const KeyCode rKey = pEvt->GetKeyCode();
+ const vcl::KeyCode rKey = pEvt->GetKeyCode();
if ((rKey.GetCode() == KEY_UP || rKey.GetCode() == KEY_DOWN) &&
(!pEvt->GetKeyCode().IsShift() && pEvt->GetKeyCode().IsMod1()))
@@ -166,7 +166,7 @@ namespace svt
if (!IsInDropDown())
{
const KeyEvent *pEvt = rNEvt.GetKeyEvent();
- const KeyCode rKey = pEvt->GetKeyCode();
+ const vcl::KeyCode rKey = pEvt->GetKeyCode();
if ((rKey.GetCode() == KEY_UP || rKey.GetCode() == KEY_DOWN) &&
(!pEvt->GetKeyCode().IsShift() && pEvt->GetKeyCode().IsMod1()))
@@ -583,13 +583,13 @@ namespace svt
// which is used by both the text view and the edit browse box
const KeyEvent* pKeyEvent = rNEvt.GetKeyEvent();
- const KeyCode& rKeyCode = pKeyEvent->GetKeyCode();
+ const vcl::KeyCode& rKeyCode = pKeyEvent->GetKeyCode();
sal_uInt16 nCode = rKeyCode.GetCode();
if ( ( nCode == KEY_RETURN ) && ( rKeyCode.GetModifier() == KEY_MOD1 ) )
{
KeyEvent aEvent( pKeyEvent->GetCharCode(),
- KeyCode( KEY_RETURN ),
+ vcl::KeyCode( KEY_RETURN ),
pKeyEvent->GetRepeat()
);
if ( dispatchKeyEvent( aEvent ) )
diff --git a/svtools/source/contnr/fileview.cxx b/svtools/source/contnr/fileview.cxx
index 81bf2dba6a09..24c08b01bb2b 100644
--- a/svtools/source/contnr/fileview.cxx
+++ b/svtools/source/contnr/fileview.cxx
@@ -717,7 +717,7 @@ void ViewTabListBox_Impl::KeyInput( const KeyEvent& rKEvt )
{
bool bHandled = false;
- const KeyCode& rKeyCode = rKEvt.GetKeyCode();
+ const vcl::KeyCode& rKeyCode = rKEvt.GetKeyCode();
if ( 0 == rKeyCode.GetModifier() )
{
if ( rKeyCode.GetCode() == KEY_RETURN )
diff --git a/svtools/source/contnr/imivctl1.cxx b/svtools/source/contnr/imivctl1.cxx
index 6b00f95824b7..adc522973a67 100644
--- a/svtools/source/contnr/imivctl1.cxx
+++ b/svtools/source/contnr/imivctl1.cxx
@@ -3306,8 +3306,8 @@ IcnViewEdit_Impl::IcnViewEdit_Impl( SvtIconChoiceCtrl* pParent, const Point& rPo
SetText( rData );
SaveValue();
- aAccReturn.InsertItem( IMPICNVIEW_ACC_RETURN, KeyCode(KEY_RETURN) );
- aAccEscape.InsertItem( IMPICNVIEW_ACC_ESCAPE, KeyCode(KEY_ESCAPE) );
+ aAccReturn.InsertItem( IMPICNVIEW_ACC_RETURN, vcl::KeyCode(KEY_RETURN) );
+ aAccEscape.InsertItem( IMPICNVIEW_ACC_ESCAPE, vcl::KeyCode(KEY_ESCAPE) );
aAccReturn.SetActivateHdl( LINK( this, IcnViewEdit_Impl, ReturnHdl_Impl) );
aAccEscape.SetActivateHdl( LINK( this, IcnViewEdit_Impl, EscapeHdl_Impl) );
@@ -3363,7 +3363,7 @@ IMPL_LINK( IcnViewEdit_Impl, EscapeHdl_Impl, Accelerator*, EMPTYARG )
void IcnViewEdit_Impl::KeyInput( const KeyEvent& rKEvt )
{
- KeyCode aCode = rKEvt.GetKeyCode();
+ vcl::KeyCode aCode = rKEvt.GetKeyCode();
sal_uInt16 nCode = aCode.GetCode();
switch ( nCode )
diff --git a/svtools/source/contnr/simptabl.cxx b/svtools/source/contnr/simptabl.cxx
index 62e275c15a93..05a155612f4d 100644
--- a/svtools/source/contnr/simptabl.cxx
+++ b/svtools/source/contnr/simptabl.cxx
@@ -48,7 +48,7 @@ bool SvSimpleTableContainer::PreNotify( NotifyEvent& rNEvt )
bool nResult = true;
if ( rNEvt.GetType() == EVENT_KEYINPUT )
{
- const KeyCode& aKeyCode = rNEvt.GetKeyEvent()->GetKeyCode();
+ const vcl::KeyCode& aKeyCode = rNEvt.GetKeyEvent()->GetKeyCode();
sal_uInt16 nKey = aKeyCode.GetCode();
if (nKey == KEY_TAB)
GetParent()->Notify( rNEvt );
diff --git a/svtools/source/contnr/svimpbox.cxx b/svtools/source/contnr/svimpbox.cxx
index a04856cb7a3c..99ca76f95dcf 100644
--- a/svtools/source/contnr/svimpbox.cxx
+++ b/svtools/source/contnr/svimpbox.cxx
@@ -2143,7 +2143,7 @@ void SvImpLBox::MouseMove( const MouseEvent& rMEvt)
bool SvImpLBox::KeyInput( const KeyEvent& rKEvt)
{
aEditTimer.Stop();
- const KeyCode& rKeyCode = rKEvt.GetKeyCode();
+ const vcl::KeyCode& rKeyCode = rKEvt.GetKeyCode();
if( rKeyCode.IsMod2() )
return false; // don't evaluate Alt key
diff --git a/svtools/source/contnr/templwin.cxx b/svtools/source/contnr/templwin.cxx
index 13c9c0507914..557756e88ac1 100644
--- a/svtools/source/contnr/templwin.cxx
+++ b/svtools/source/contnr/templwin.cxx
@@ -1117,7 +1117,7 @@ bool SvtTemplateWindow::PreNotify( NotifyEvent& rNEvt )
if ( EVENT_KEYINPUT == nType && rNEvt.GetKeyEvent() )
{
- const KeyCode& rKeyCode = rNEvt.GetKeyEvent()->GetKeyCode();
+ const vcl::KeyCode& rKeyCode = rNEvt.GetKeyEvent()->GetKeyCode();
sal_uInt16 nCode = rKeyCode.GetCode();
if ( KEY_BACKSPACE == nCode && !rKeyCode.GetModifier() && pFileWin->HasChildPathFocus() )
diff --git a/svtools/source/contnr/treelistbox.cxx b/svtools/source/contnr/treelistbox.cxx
index 2f6bc55d6b95..e165ace86b84 100644
--- a/svtools/source/contnr/treelistbox.cxx
+++ b/svtools/source/contnr/treelistbox.cxx
@@ -147,8 +147,8 @@ SvInplaceEdit2::SvInplaceEdit2
pEdit->SetSelection( rSelection );
pEdit->SaveValue();
- aAccReturn.InsertItem( SVLBOX_ACC_RETURN, KeyCode(KEY_RETURN) );
- aAccEscape.InsertItem( SVLBOX_ACC_ESCAPE, KeyCode(KEY_ESCAPE) );
+ aAccReturn.InsertItem( SVLBOX_ACC_RETURN, vcl::KeyCode(KEY_RETURN) );
+ aAccEscape.InsertItem( SVLBOX_ACC_ESCAPE, vcl::KeyCode(KEY_ESCAPE) );
aAccReturn.SetActivateHdl( LINK( this, SvInplaceEdit2, ReturnHdl_Impl) );
aAccEscape.SetActivateHdl( LINK( this, SvInplaceEdit2, EscapeHdl_Impl) );
@@ -199,7 +199,7 @@ IMPL_LINK_NOARG_INLINE_END(SvInplaceEdit2, EscapeHdl_Impl)
bool SvInplaceEdit2::KeyInput( const KeyEvent& rKEvt )
{
- KeyCode aCode = rKEvt.GetKeyCode();
+ vcl::KeyCode aCode = rKEvt.GetKeyCode();
sal_uInt16 nCode = aCode.GetCode();
switch ( nCode )
diff --git a/svtools/source/control/inettbc.cxx b/svtools/source/control/inettbc.cxx
index ff00562e5734..e8e4d1c07b74 100644
--- a/svtools/source/control/inettbc.cxx
+++ b/svtools/source/control/inettbc.cxx
@@ -1007,7 +1007,7 @@ void SvtURLBox::UpdatePicklistForSmartProtocol_Impl()
}
-bool SvtURLBox::ProcessKey( const KeyCode& rKey )
+bool SvtURLBox::ProcessKey( const vcl::KeyCode& rKey )
{
// every key input stops the current matching thread
if( pCtx.is() )
@@ -1017,7 +1017,7 @@ bool SvtURLBox::ProcessKey( const KeyCode& rKey )
pCtx.clear();
}
- KeyCode aCode( rKey.GetCode() );
+ vcl::KeyCode aCode( rKey.GetCode() );
if ( aCode == KEY_RETURN && !GetText().isEmpty() )
{
// wait for completion of matching thread
@@ -1100,8 +1100,8 @@ bool SvtURLBox::PreNotify( NotifyEvent& rNEvt )
{
const KeyEvent& rEvent = *rNEvt.GetKeyEvent();
- const KeyCode& rKey = rEvent.GetKeyCode();
- KeyCode aCode( rKey.GetCode() );
+ const vcl::KeyCode& rKey = rEvent.GetKeyCode();
+ vcl::KeyCode aCode( rKey.GetCode() );
if( ProcessKey( rKey ) )
{
return true;
diff --git a/svtools/source/dialogs/wizdlg.cxx b/svtools/source/dialogs/wizdlg.cxx
index 9ad0dfeb2d44..eba9962d71f1 100644
--- a/svtools/source/dialogs/wizdlg.cxx
+++ b/svtools/source/dialogs/wizdlg.cxx
@@ -432,8 +432,8 @@ bool WizardDialog::Notify( NotifyEvent& rNEvt )
if ( (rNEvt.GetType() == EVENT_KEYINPUT) && mpPrevBtn && mpNextBtn )
{
const KeyEvent* pKEvt = rNEvt.GetKeyEvent();
- KeyCode aKeyCode = pKEvt->GetKeyCode();
- sal_uInt16 nKeyCode = aKeyCode.GetCode();
+ vcl::KeyCode aKeyCode = pKEvt->GetKeyCode();
+ sal_uInt16 nKeyCode = aKeyCode.GetCode();
if ( aKeyCode.IsMod1() )
{
diff --git a/svtools/source/misc/acceleratorexecute.cxx b/svtools/source/misc/acceleratorexecute.cxx
index 83348b1a779b..8d8ebc94e89a 100644
--- a/svtools/source/misc/acceleratorexecute.cxx
+++ b/svtools/source/misc/acceleratorexecute.cxx
@@ -169,7 +169,7 @@ void AcceleratorExecute::init(const css::uno::Reference< css::uno::XComponentCon
}
-bool AcceleratorExecute::execute(const KeyCode& aVCLKey)
+bool AcceleratorExecute::execute(const vcl::KeyCode& aVCLKey)
{
css::awt::KeyEvent aAWTKey = AcceleratorExecute::st_VCLKey2AWTKey(aVCLKey);
return execute(aAWTKey);
@@ -212,7 +212,7 @@ bool AcceleratorExecute::execute(const css::awt::KeyEvent& aAWTKey)
}
-css::awt::KeyEvent AcceleratorExecute::st_VCLKey2AWTKey(const KeyCode& aVCLKey)
+css::awt::KeyEvent AcceleratorExecute::st_VCLKey2AWTKey(const vcl::KeyCode& aVCLKey)
{
css::awt::KeyEvent aAWTKey;
aAWTKey.Modifiers = 0;
@@ -230,7 +230,7 @@ css::awt::KeyEvent AcceleratorExecute::st_VCLKey2AWTKey(const KeyCode& aVCLKey)
}
-KeyCode AcceleratorExecute::st_AWTKey2VCLKey(const css::awt::KeyEvent& aAWTKey)
+vcl::KeyCode AcceleratorExecute::st_AWTKey2VCLKey(const css::awt::KeyEvent& aAWTKey)
{
bool bShift = ((aAWTKey.Modifiers & css::awt::KeyModifier::SHIFT) == css::awt::KeyModifier::SHIFT );
bool bMod1 = ((aAWTKey.Modifiers & css::awt::KeyModifier::MOD1 ) == css::awt::KeyModifier::MOD1 );
@@ -238,7 +238,7 @@ KeyCode AcceleratorExecute::st_AWTKey2VCLKey(const css::awt::KeyEvent& aAWTKey)
bool bMod3 = ((aAWTKey.Modifiers & css::awt::KeyModifier::MOD3 ) == css::awt::KeyModifier::MOD3 );
sal_uInt16 nKey = (sal_uInt16)aAWTKey.KeyCode;
- return KeyCode(nKey, bShift, bMod1, bMod2, bMod3);
+ return vcl::KeyCode(nKey, bShift, bMod1, bMod2, bMod3);
}
OUString AcceleratorExecute::findCommand(const css::awt::KeyEvent& aKey)
diff --git a/svtools/source/table/defaultinputhandler.cxx b/svtools/source/table/defaultinputhandler.cxx
index 292121eefb6f..cfa98ea8c4f9 100644
--- a/svtools/source/table/defaultinputhandler.cxx
+++ b/svtools/source/table/defaultinputhandler.cxx
@@ -138,7 +138,7 @@ namespace svt { namespace table
{
bool bHandled = false;
- const KeyCode& rKeyCode = rKEvt.GetKeyCode();
+ const vcl::KeyCode& rKeyCode = rKEvt.GetKeyCode();
sal_uInt16 nKeyCode = rKeyCode.GetCode();
struct _ActionMapEntry
diff --git a/svtools/source/toolpanel/drawerlayouter.cxx b/svtools/source/toolpanel/drawerlayouter.cxx
index 97ff39552519..d8abf3395315 100644
--- a/svtools/source/toolpanel/drawerlayouter.cxx
+++ b/svtools/source/toolpanel/drawerlayouter.cxx
@@ -256,7 +256,7 @@ namespace svt
{
const KeyEvent* pKeyEvent = static_cast< const KeyEvent* >( pWindowEvent->GetData() );
ENSURE_OR_RETURN( pKeyEvent, "no key event with KeyInput", 0L );
- const KeyCode& rKeyCode( pKeyEvent->GetKeyCode() );
+ const vcl::KeyCode& rKeyCode( pKeyEvent->GetKeyCode() );
if ( ( rKeyCode.GetModifier() == 0 ) && ( rKeyCode.GetCode() == KEY_RETURN ) )
{
bActivatePanel = true;
diff --git a/svtools/source/toolpanel/paneltabbar.cxx b/svtools/source/toolpanel/paneltabbar.cxx
index f5e449ec08bd..f955f2fe365e 100644
--- a/svtools/source/toolpanel/paneltabbar.cxx
+++ b/svtools/source/toolpanel/paneltabbar.cxx
@@ -1236,7 +1236,7 @@ namespace svt
{
KeyInputHandler aKeyInputHandler( *this, i_rKeyEvent );
- const KeyCode& rKeyCode( i_rKeyEvent.GetKeyCode() );
+ const vcl::KeyCode& rKeyCode( i_rKeyEvent.GetKeyCode() );
if ( rKeyCode.GetModifier() != 0 )
// only interested in mere key presses
return;
diff --git a/svtools/source/toolpanel/toolpaneldeck.cxx b/svtools/source/toolpanel/toolpaneldeck.cxx
index 1cce8c97e1ad..272a0d7d0f4b 100644
--- a/svtools/source/toolpanel/toolpaneldeck.cxx
+++ b/svtools/source/toolpanel/toolpaneldeck.cxx
@@ -450,7 +450,7 @@ namespace svt
if ( i_rNotifyEvent.GetType() == EVENT_KEYINPUT )
{
const KeyEvent* pEvent = i_rNotifyEvent.GetKeyEvent();
- const KeyCode& rKeyCode = pEvent->GetKeyCode();
+ const vcl::KeyCode& rKeyCode = pEvent->GetKeyCode();
if ( rKeyCode.GetModifier() == KEY_MOD1 )
{
bHandled = true;