diff options
author | Tor Lillqvist <tml@collabora.com> | 2014-08-23 22:22:32 +0300 |
---|---|---|
committer | Tor Lillqvist <tml@collabora.com> | 2014-08-23 22:33:30 +0300 |
commit | 30ae83c268125383866d47a7ee3e4a5dfcf59f71 (patch) | |
tree | ab52f8ecd7ed9517d70e13b22843b7948f20c9e9 /cui/source/customize | |
parent | 02f6c270e79879188b2be670c6db4feb56bb064e (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 'cui/source/customize')
-rw-r--r-- | cui/source/customize/acccfg.cxx | 22 | ||||
-rw-r--r-- | cui/source/customize/cfg.cxx | 2 |
2 files changed, 12 insertions, 12 deletions
diff --git a/cui/source/customize/acccfg.cxx b/cui/source/customize/acccfg.cxx index 311804cfd6c2..037abce3d564 100644 --- a/cui/source/customize/acccfg.cxx +++ b/cui/source/customize/acccfg.cxx @@ -688,9 +688,9 @@ void SfxAccCfgTabListBox_Impl::InitEntry(SvTreeListEntry* pEntry, */ void SfxAccCfgTabListBox_Impl::KeyInput(const KeyEvent& aKey) { - KeyCode aCode1 = aKey.GetKeyCode(); - sal_uInt16 nCode1 = aCode1.GetCode(); - sal_uInt16 nMod1 = aCode1.GetModifier(); + vcl::KeyCode aCode1 = aKey.GetKeyCode(); + sal_uInt16 nCode1 = aCode1.GetCode(); + sal_uInt16 nMod1 = aCode1.GetModifier(); // is it related to our list box ? if ( @@ -795,7 +795,7 @@ SfxAcceleratorConfigPage::SfxAcceleratorConfigPage( Window* pParent, const SfxIt long nMaxWidth = 0; for ( sal_uInt16 i = 0; i < KEYCODE_ARRAY_SIZE; ++i ) { - long nTmp = GetTextWidth( KeyCode( KEYCODE_ARRAY[i] ).GetName() ); + long nTmp = GetTextWidth( vcl::KeyCode( KEYCODE_ARRAY[i] ).GetName() ); if ( nTmp > nMaxWidth ) nMaxWidth = nTmp; } @@ -930,8 +930,8 @@ void SfxAcceleratorConfigPage::Init(const css::uno::Reference< css::ui::XAcceler sal_Int32 nListPos = 0; for (i1=0; i1<c1; ++i1) { - KeyCode aKey = KEYCODE_ARRAY[i1]; - OUString sKey = aKey.GetName(); + vcl::KeyCode aKey = KEYCODE_ARRAY[i1]; + OUString sKey = aKey.GetName(); if (sKey.isEmpty()) continue; TAccInfo* pEntry = new TAccInfo(i1, nListPos, aKey); @@ -950,8 +950,8 @@ void SfxAcceleratorConfigPage::Init(const css::uno::Reference< css::ui::XAcceler const css::awt::KeyEvent& aAWTKey = lKeys[i2]; OUString sCommand = xAccMgr->getCommandByKeyEvent(aAWTKey); OUString sLabel = GetLabel4Command(sCommand); - KeyCode aKeyCode = ::svt::AcceleratorExecute::st_AWTKey2VCLKey(aAWTKey); - sal_uLong nPos = MapKeyCodeToPos(aKeyCode); + vcl::KeyCode aKeyCode = ::svt::AcceleratorExecute::st_AWTKey2VCLKey(aAWTKey); + sal_uLong nPos = MapKeyCodeToPos(aKeyCode); if (nPos == TREELIST_ENTRY_NOTFOUND) continue; @@ -971,8 +971,8 @@ void SfxAcceleratorConfigPage::Init(const css::uno::Reference< css::ui::XAcceler sal_uLong i3 = 0; for (i3=0; i3<c3; ++i3) { - const KeyCode* pKeyCode = Application::GetReservedKeyCode(i3); - sal_uLong nPos = MapKeyCodeToPos(*pKeyCode); + const vcl::KeyCode* pKeyCode = Application::GetReservedKeyCode(i3); + sal_uLong nPos = MapKeyCodeToPos(*pKeyCode); if (nPos == TREELIST_ENTRY_NOTFOUND) continue; @@ -1483,7 +1483,7 @@ void SfxAcceleratorConfigPage::Reset( const SfxItemSet* rSet ) } -sal_uLong SfxAcceleratorConfigPage::MapKeyCodeToPos(const KeyCode& aKey) const +sal_uLong SfxAcceleratorConfigPage::MapKeyCodeToPos(const vcl::KeyCode& aKey) const { sal_uInt16 nCode1 = aKey.GetCode()+aKey.GetModifier(); SvTreeListEntry* pEntry = m_pEntriesBox->First(); diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx index 34edd30e19e5..56d4bff2c6b0 100644 --- a/cui/source/customize/cfg.cxx +++ b/cui/source/customize/cfg.cxx @@ -1487,7 +1487,7 @@ TriState SvxMenuEntriesListBox::NotifyCopying( void SvxMenuEntriesListBox::KeyInput( const KeyEvent& rKeyEvent ) { - KeyCode keycode = rKeyEvent.GetKeyCode(); + vcl::KeyCode keycode = rKeyEvent.GetKeyCode(); // support DELETE for removing the current entry if ( keycode == KEY_DELETE ) |