accessibility/source/standard/vclxaccessiblebutton.cxx | 2 accessibility/source/standard/vclxaccessiblecheckbox.cxx | 2 accessibility/source/standard/vclxaccessiblemenuitem.cxx | 4 accessibility/source/standard/vclxaccessibleradiobutton.cxx | 2 avmedia/source/viewer/mediaevent_impl.cxx | 16 +-- basctl/source/basicide/baside2b.cxx | 4 basctl/source/basicide/bastypes.cxx | 2 basctl/source/dlged/dlgedfunc.cxx | 2 chart2/source/controller/main/ChartController_Window.cxx | 2 cui/source/customize/acccfg.cxx | 22 ++-- cui/source/customize/cfg.cxx | 2 cui/source/dialogs/SpellDialog.cxx | 2 cui/source/dialogs/colorpicker.cxx | 2 cui/source/dialogs/hangulhanjadlg.cxx | 8 - cui/source/dialogs/thesdlg.cxx | 2 cui/source/inc/acccfg.hxx | 6 - cui/source/options/optaboutconfig.cxx | 2 cui/source/options/optdict.cxx | 2 cui/source/options/optinet2.cxx | 2 cui/source/options/treeopt.cxx | 2 cui/source/tabpages/autocdlg.cxx | 6 - dbaccess/source/ui/app/AppDetailView.cxx | 4 dbaccess/source/ui/app/AppSwapWindow.cxx | 2 dbaccess/source/ui/browser/brwview.cxx | 6 - dbaccess/source/ui/browser/dataview.cxx | 2 dbaccess/source/ui/querydesign/TableWindow.cxx | 6 - dbaccess/source/ui/querydesign/TableWindowListBox.cxx | 2 desktop/source/deployment/gui/dp_gui_dialog2.cxx | 8 - desktop/source/deployment/gui/dp_gui_extlistbox.cxx | 4 editeng/source/outliner/outlvw.cxx | 2 extensions/source/bibliography/bibcont.cxx | 2 extensions/source/bibliography/toolbar.cxx | 2 extensions/source/plugin/inc/plugin/unx/plugcon.hxx | 2 extensions/source/propctrlr/commoncontrol.cxx | 2 extensions/source/propctrlr/standardcontrol.cxx | 4 filter/source/msfilter/msvbahelper.cxx | 2 filter/source/xsltdialog/xmlfiltersettingsdialog.cxx | 6 - forms/source/richtext/richtextvclcontrol.cxx | 2 formula/source/ui/dlg/funcutl.cxx | 12 +- fpicker/source/office/iodlg.cxx | 2 framework/inc/uielement/menubarmanager.hxx | 2 framework/inc/uielement/newmenucontroller.hxx | 4 framework/source/accelerators/acceleratorconfiguration.cxx | 2 framework/source/dispatch/menudispatcher.cxx | 2 framework/source/uielement/comboboxtoolbarcontroller.cxx | 2 framework/source/uielement/edittoolbarcontroller.cxx | 2 framework/source/uielement/menubarmanager.cxx | 10 - framework/source/uielement/newmenucontroller.cxx | 8 - framework/source/uielement/spinfieldtoolbarcontroller.cxx | 2 include/postx.h | 1 include/prex.h | 4 include/svtools/acceleratorexecute.hxx | 6 - include/svtools/inettbc.hxx | 2 include/vcl/accel.hxx | 12 +- include/vcl/event.hxx | 15 +- include/vcl/keycod.hxx | 15 +- include/vcl/menu.hxx | 14 +- include/vcl/split.hxx | 2 include/vcl/svapp.hxx | 4 include/vcl/toolbox.hxx | 4 reportdesign/source/ui/dlg/AddField.cxx | 2 reportdesign/source/ui/dlg/CondFormat.cxx | 2 reportdesign/source/ui/inc/ViewsWindow.hxx | 2 reportdesign/source/ui/report/DesignView.cxx | 2 reportdesign/source/ui/report/ViewsWindow.cxx | 2 reportdesign/source/ui/report/dlgedfunc.cxx | 2 sc/source/ui/app/inputhdl.cxx | 6 - sc/source/ui/cctrl/checklistmenu.cxx | 6 - sc/source/ui/dbgui/PivotLayoutTreeList.cxx | 2 sc/source/ui/dbgui/PivotLayoutTreeListData.cxx | 2 sc/source/ui/dbgui/PivotLayoutTreeListLabel.cxx | 2 sc/source/ui/dbgui/csvgrid.cxx | 2 sc/source/ui/dbgui/csvruler.cxx | 2 sc/source/ui/drawfunc/fudraw.cxx | 6 - sc/source/ui/miscdlgs/anyrefdg.cxx | 4 sc/source/ui/miscdlgs/optsolver.cxx | 2 sc/source/ui/navipi/content.cxx | 2 sc/source/ui/navipi/navipi.cxx | 4 sc/source/ui/navipi/scenwnd.cxx | 2 sc/source/ui/view/cellsh1.cxx | 2 sc/source/ui/view/gridwin.cxx | 8 - sc/source/ui/view/olinewin.cxx | 2 sc/source/ui/view/preview.cxx | 2 sc/source/ui/view/tabview3.cxx | 2 sc/source/ui/view/tabvwsh2.cxx | 2 sc/source/ui/view/tabvwsh4.cxx | 2 sc/source/ui/view/viewfun2.cxx | 2 sd/source/ui/animations/CustomAnimationDialog.cxx | 2 sd/source/ui/annotations/annotationwindow.cxx | 2 sd/source/ui/dlg/RemoteDialogClientBox.cxx | 4 sd/source/ui/func/fudraw.cxx | 6 - sd/source/ui/func/futext.cxx | 4 sd/source/ui/sidebar/SidebarFocusManager.hxx | 6 - sd/source/ui/slidesorter/controller/SlsSelectionFunction.cxx | 2 sd/source/ui/view/drviewse.cxx | 6 - sd/source/ui/view/outlnvsh.cxx | 4 sd/source/ui/view/viewshel.cxx | 2 sfx2/source/appl/newhelp.cxx | 10 - sfx2/source/appl/newhelp.hxx | 2 sfx2/source/control/thumbnailview.cxx | 2 sfx2/source/control/thumbnailviewitem.cxx | 2 sfx2/source/dialog/backingwindow.cxx | 4 sfx2/source/dialog/templdlg.cxx | 4 sfx2/source/dialog/versdlg.cxx | 2 sfx2/source/sidebar/FocusManager.cxx | 2 sfx2/source/sidebar/FocusManager.hxx | 5 svtools/source/brwbox/ebbcontrols.cxx | 8 - svtools/source/contnr/fileview.cxx | 2 svtools/source/contnr/imivctl1.cxx | 6 - svtools/source/contnr/simptabl.cxx | 2 svtools/source/contnr/svimpbox.cxx | 2 svtools/source/contnr/templwin.cxx | 2 svtools/source/contnr/treelistbox.cxx | 6 - svtools/source/control/inettbc.cxx | 8 - svtools/source/dialogs/wizdlg.cxx | 4 svtools/source/misc/acceleratorexecute.cxx | 8 - svtools/source/table/defaultinputhandler.cxx | 2 svtools/source/toolpanel/drawerlayouter.cxx | 2 svtools/source/toolpanel/paneltabbar.cxx | 2 svtools/source/toolpanel/toolpaneldeck.cxx | 2 svx/source/dialog/_bmpmask.cxx | 2 svx/source/dialog/charmap.cxx | 2 svx/source/dialog/checklbx.cxx | 2 svx/source/dialog/dialcontrol.cxx | 2 svx/source/dialog/dlgctl3d.cxx | 2 svx/source/dialog/dlgctrl.cxx | 2 svx/source/dialog/frmsel.cxx | 2 svx/source/dialog/graphctl.cxx | 2 svx/source/dialog/rubydialog.cxx | 2 svx/source/fmcomp/fmgridcl.cxx | 2 svx/source/fmcomp/gridctrl.cxx | 2 svx/source/form/filtnav.cxx | 2 svx/source/form/fmview.cxx | 2 svx/source/form/navigatortree.cxx | 2 svx/source/form/tabwin.cxx | 2 svx/source/svdraw/svdview.cxx | 2 svx/source/tbxctrls/itemwin.cxx | 2 sw/inc/IDocumentMarkAccess.hxx | 1 sw/inc/IMark.hxx | 4 sw/inc/crsrsh.hxx | 4 sw/inc/doc.hxx | 1 sw/source/core/crsr/bookmrk.cxx | 2 sw/source/core/crsr/crbm.cxx | 2 sw/source/core/crsr/crossrefbookmark.cxx | 6 - sw/source/core/doc/docbm.cxx | 6 - sw/source/core/inc/bookmrk.hxx | 9 - sw/source/core/inc/crossrefbookmark.hxx | 7 - sw/source/core/inc/mvsave.hxx | 2 sw/source/core/inc/rolbck.hxx | 5 sw/source/filter/inc/fltshell.hxx | 2 sw/source/ui/dbui/dbinsdlg.cxx | 2 sw/source/ui/fldui/fldvar.cxx | 2 sw/source/ui/index/cnttab.cxx | 8 - sw/source/ui/misc/bookmark.cxx | 2 sw/source/ui/misc/glosbib.cxx | 2 sw/source/uibase/cctrl/actctrl.cxx | 4 sw/source/uibase/dochdl/swdtflvr.cxx | 2 sw/source/uibase/docvw/AnnotationMenuButton.cxx | 2 sw/source/uibase/docvw/SidebarTxtControl.cxx | 2 sw/source/uibase/docvw/edtwin.cxx | 4 sw/source/uibase/docvw/edtwin2.cxx | 4 sw/source/uibase/ribbar/inputwin.cxx | 2 sw/source/uibase/shells/textsh1.cxx | 2 sw/source/uibase/uiview/pview.cxx | 2 sw/source/uibase/utlui/content.cxx | 4 sw/source/uibase/utlui/glbltree.cxx | 2 sw/source/uibase/utlui/initui.cxx | 4 sw/source/uibase/utlui/navipi.cxx | 2 toolkit/source/awt/vclxmenu.cxx | 10 - vcl/headless/svpframe.cxx | 2 vcl/inc/accel.h | 4 vcl/inc/accmgr.hxx | 5 vcl/inc/headless/svpframe.hxx | 2 vcl/inc/osx/salframe.h | 2 vcl/inc/osx/salmenu.h | 2 vcl/inc/salframe.hxx | 2 vcl/inc/salmenu.hxx | 2 vcl/inc/svdata.hxx | 11 -- vcl/inc/unx/gtk/gtkframe.hxx | 2 vcl/inc/unx/gtk/gtksalmenu.hxx | 4 vcl/inc/unx/salframe.h | 2 vcl/inc/unx/salmenu.h | 2 vcl/inc/win/salframe.h | 2 vcl/inc/win/salmenu.h | 2 vcl/osx/salframe.cxx | 2 vcl/osx/salmenu.cxx | 2 vcl/source/app/svapp.cxx | 56 +++++------ vcl/source/control/button.cxx | 14 +- vcl/source/control/edit.cxx | 14 +- vcl/source/control/field2.cxx | 2 vcl/source/control/ilstbox.cxx | 4 vcl/source/control/menubtn.cxx | 2 vcl/source/control/tabctrl.cxx | 6 - vcl/source/window/accel.cxx | 22 ++-- vcl/source/window/accmgr.cxx | 6 - vcl/source/window/builder.cxx | 14 +- vcl/source/window/dialog.cxx | 4 vcl/source/window/dlgctrl.cxx | 4 vcl/source/window/dockmgr.cxx | 2 vcl/source/window/dockwin.cxx | 2 vcl/source/window/event.cxx | 2 vcl/source/window/floatwin.cxx | 4 vcl/source/window/keycod.cxx | 8 - vcl/source/window/keyevent.cxx | 12 +- vcl/source/window/split.cxx | 8 - vcl/source/window/taskpanelist.cxx | 2 vcl/source/window/toolbox.cxx | 14 +- vcl/source/window/winproc.cxx | 6 - vcl/unx/generic/app/saldisp.cxx | 4 vcl/unx/generic/window/salframe.cxx | 2 vcl/unx/gtk/window/gtksalframe.cxx | 2 vcl/win/source/window/salframe.cxx | 4 vcl/win/source/window/salmenu.cxx | 2 213 files changed, 448 insertions(+), 453 deletions(-)
New commits: commit 30ae83c268125383866d47a7ee3e4a5dfcf59f71 Author: Tor Lillqvist <t...@collabora.com> Date: Sat Aug 23 22:22:32 2014 +0300 fdo#82577: Handle KeyCode Put the VCL KeyCode class in the vcl namespace. Avoids clash with the X11 KeyCode typedef. Change-Id: I624c9d937f7c5f5986d313b6c5f060bd8bb7e028 diff --git a/accessibility/source/standard/vclxaccessiblebutton.cxx b/accessibility/source/standard/vclxaccessiblebutton.cxx index ba057d5..e26e41b 100644 --- a/accessibility/source/standard/vclxaccessiblebutton.cxx +++ b/accessibility/source/standard/vclxaccessiblebutton.cxx @@ -231,7 +231,7 @@ Reference< XAccessibleKeyBinding > VCLXAccessibleButton::getAccessibleActionKeyB if ( pWindow ) { KeyEvent aKeyEvent = pWindow->GetActivationKey(); - KeyCode aKeyCode = aKeyEvent.GetKeyCode(); + vcl::KeyCode aKeyCode = aKeyEvent.GetKeyCode(); if ( aKeyCode.GetCode() != 0 ) { awt::KeyStroke aKeyStroke; diff --git a/accessibility/source/standard/vclxaccessiblecheckbox.cxx b/accessibility/source/standard/vclxaccessiblecheckbox.cxx index 2ce86d5..f565598 100644 --- a/accessibility/source/standard/vclxaccessiblecheckbox.cxx +++ b/accessibility/source/standard/vclxaccessiblecheckbox.cxx @@ -252,7 +252,7 @@ Reference< XAccessibleKeyBinding > VCLXAccessibleCheckBox::getAccessibleActionKe if ( pWindow ) { KeyEvent aKeyEvent = pWindow->GetActivationKey(); - KeyCode aKeyCode = aKeyEvent.GetKeyCode(); + vcl::KeyCode aKeyCode = aKeyEvent.GetKeyCode(); if ( aKeyCode.GetCode() != 0 ) { awt::KeyStroke aKeyStroke; diff --git a/accessibility/source/standard/vclxaccessiblemenuitem.cxx b/accessibility/source/standard/vclxaccessiblemenuitem.cxx index 6daadb4..2d69dc1 100644 --- a/accessibility/source/standard/vclxaccessiblemenuitem.cxx +++ b/accessibility/source/standard/vclxaccessiblemenuitem.cxx @@ -478,7 +478,7 @@ Reference< XAccessibleKeyBinding > VCLXAccessibleMenuItem::getAccessibleActionKe // activation key KeyEvent aKeyEvent = m_pParent->GetActivationKey( m_pParent->GetItemId( m_nItemPos ) ); - KeyCode aKeyCode = aKeyEvent.GetKeyCode(); + vcl::KeyCode aKeyCode = aKeyEvent.GetKeyCode(); Sequence< awt::KeyStroke > aSeq1(1); aSeq1[0].Modifiers = 0; Reference< XAccessible > xParent( getAccessibleParent() ); @@ -513,7 +513,7 @@ Reference< XAccessibleKeyBinding > VCLXAccessibleMenuItem::getAccessibleActionKe pKeyBindingHelper->AddKeyBinding( aSeq2 ); // accelerator key - KeyCode aAccelKeyCode = m_pParent->GetAccelKey( m_pParent->GetItemId( m_nItemPos ) ); + vcl::KeyCode aAccelKeyCode = m_pParent->GetAccelKey( m_pParent->GetItemId( m_nItemPos ) ); if ( aAccelKeyCode.GetCode() != 0 ) { Sequence< awt::KeyStroke > aSeq3(1); diff --git a/accessibility/source/standard/vclxaccessibleradiobutton.cxx b/accessibility/source/standard/vclxaccessibleradiobutton.cxx index 331075b..1f629fd 100644 --- a/accessibility/source/standard/vclxaccessibleradiobutton.cxx +++ b/accessibility/source/standard/vclxaccessibleradiobutton.cxx @@ -208,7 +208,7 @@ Reference< XAccessibleKeyBinding > VCLXAccessibleRadioButton::getAccessibleActio if ( pWindow ) { KeyEvent aKeyEvent = pWindow->GetActivationKey(); - KeyCode aKeyCode = aKeyEvent.GetKeyCode(); + vcl::KeyCode aKeyCode = aKeyEvent.GetKeyCode(); if ( aKeyCode.GetCode() != 0 ) { awt::KeyStroke aKeyStroke; diff --git a/avmedia/source/viewer/mediaevent_impl.cxx b/avmedia/source/viewer/mediaevent_impl.cxx index 3c411b9..b994bd3 100644 --- a/avmedia/source/viewer/mediaevent_impl.cxx +++ b/avmedia/source/viewer/mediaevent_impl.cxx @@ -66,10 +66,10 @@ void SAL_CALL MediaEventListenersImpl::keyPressed( const ::com::sun::star::awt:: if( mpNotifyWindow ) { - KeyCode aVCLKeyCode( e.KeyCode, - ( ( e.Modifiers & 1 ) ? KEY_SHIFT : 0 ) | - ( ( e.Modifiers & 2 ) ? KEY_MOD1 : 0 ) | - ( ( e.Modifiers & 4 ) ? KEY_MOD2 : 0 ) ); + vcl::KeyCode aVCLKeyCode( e.KeyCode, + ( ( e.Modifiers & 1 ) ? KEY_SHIFT : 0 ) | + ( ( e.Modifiers & 2 ) ? KEY_MOD1 : 0 ) | + ( ( e.Modifiers & 4 ) ? KEY_MOD2 : 0 ) ); KeyEvent aVCLKeyEvt( e.KeyChar, aVCLKeyCode ); Application::PostKeyEvent( VCLEVENT_WINDOW_KEYINPUT, reinterpret_cast< ::Window* >( mpNotifyWindow ), &aVCLKeyEvt ); @@ -86,10 +86,10 @@ void SAL_CALL MediaEventListenersImpl::keyReleased( const ::com::sun::star::awt: if( mpNotifyWindow ) { - KeyCode aVCLKeyCode( e.KeyCode, - ( ( e.Modifiers & 1 ) ? KEY_SHIFT : 0 ) | - ( ( e.Modifiers & 2 ) ? KEY_MOD1 : 0 ) | - ( ( e.Modifiers & 4 ) ? KEY_MOD2 : 0 ) ); + vcl::KeyCode aVCLKeyCode( e.KeyCode, + ( ( e.Modifiers & 1 ) ? KEY_SHIFT : 0 ) | + ( ( e.Modifiers & 2 ) ? KEY_MOD1 : 0 ) | + ( ( e.Modifiers & 4 ) ? KEY_MOD2 : 0 ) ); KeyEvent aVCLKeyEvt( e.KeyChar, aVCLKeyCode ); Application::PostKeyEvent( VCLEVENT_WINDOW_KEYUP, reinterpret_cast< ::Window* >( mpNotifyWindow ), &aVCLKeyEvt ); } diff --git a/basctl/source/basicide/baside2b.cxx b/basctl/source/basicide/baside2b.cxx index e97d1cc..9d53af5 100644 --- a/basctl/source/basicide/baside2b.cxx +++ b/basctl/source/basicide/baside2b.cxx @@ -1597,8 +1597,8 @@ WatchWindow::WatchWindow (Layout* pParent) : long nTextLen = GetTextWidth( aWatchStr ) + DWBORDER + 3; aXEdit.SetPosPixel( Point( nTextLen, 3 ) ); aXEdit.SetAccHdl( LINK( this, WatchWindow, EditAccHdl ) ); - aXEdit.GetAccelerator().InsertItem( 1, KeyCode( KEY_RETURN ) ); - aXEdit.GetAccelerator().InsertItem( 2, KeyCode( KEY_ESCAPE ) ); + aXEdit.GetAccelerator().InsertItem( 1, vcl::KeyCode( KEY_RETURN ) ); + aXEdit.GetAccelerator().InsertItem( 2, vcl::KeyCode( KEY_ESCAPE ) ); aXEdit.Show(); aRemoveWatchButton.Disable(); diff --git a/basctl/source/basicide/bastypes.cxx b/basctl/source/basicide/bastypes.cxx index 718b6e3..5fbdd63 100644 --- a/basctl/source/basicide/bastypes.cxx +++ b/basctl/source/basicide/bastypes.cxx @@ -115,7 +115,7 @@ bool BaseWindow::Notify( NotifyEvent& rNEvt ) if ( rNEvt.GetType() == EVENT_KEYINPUT ) { KeyEvent aKEvt = *rNEvt.GetKeyEvent(); - KeyCode aCode = aKEvt.GetKeyCode(); + vcl::KeyCode aCode = aKEvt.GetKeyCode(); sal_uInt16 nCode = aCode.GetCode(); switch ( nCode ) diff --git a/basctl/source/dlged/dlgedfunc.cxx b/basctl/source/dlged/dlgedfunc.cxx index f5f2c41..76c43de 100644 --- a/basctl/source/dlged/dlgedfunc.cxx +++ b/basctl/source/dlged/dlgedfunc.cxx @@ -113,7 +113,7 @@ bool DlgEdFunc::KeyInput( const KeyEvent& rKEvt ) SdrView& rView = rParent.GetView(); Window& rWindow = rParent.GetWindow(); - KeyCode aCode = rKEvt.GetKeyCode(); + vcl::KeyCode aCode = rKEvt.GetKeyCode(); sal_uInt16 nCode = aCode.GetCode(); switch ( nCode ) diff --git a/chart2/source/controller/main/ChartController_Window.cxx b/chart2/source/controller/main/ChartController_Window.cxx index ada5129..d4f60ea 100644 --- a/chart2/source/controller/main/ChartController_Window.cxx +++ b/chart2/source/controller/main/ChartController_Window.cxx @@ -1292,7 +1292,7 @@ bool ChartController::execute_KeyInput( const KeyEvent& rKEvt ) m_apAccelExecute->init( m_xCC, m_xFrame ); } - KeyCode aKeyCode( rKEvt.GetKeyCode()); + vcl::KeyCode aKeyCode( rKEvt.GetKeyCode()); sal_uInt16 nCode = aKeyCode.GetCode(); bool bAlternate = aKeyCode.IsMod2(); bool bCtrl = aKeyCode.IsMod1(); diff --git a/cui/source/customize/acccfg.cxx b/cui/source/customize/acccfg.cxx index 311804c..037abce 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 34edd30..56d4bff 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 ) diff --git a/cui/source/dialogs/SpellDialog.cxx b/cui/source/dialogs/SpellDialog.cxx index a62e702..df75005 100644 --- a/cui/source/dialogs/SpellDialog.cxx +++ b/cui/source/dialogs/SpellDialog.cxx @@ -1380,7 +1380,7 @@ bool SentenceEditWindow_Impl::PreNotify( NotifyEvent& rNEvt ) nSelectionType == INVALID, "cui.dialogs", "selection type not set"); - const KeyCode& rKeyCode = rKeyEvt.GetKeyCode(); + const vcl::KeyCode& rKeyCode = rKeyEvt.GetKeyCode(); bool bDelete = rKeyCode.GetCode() == KEY_DELETE; bool bBackspace = rKeyCode.GetCode() == KEY_BACKSPACE; diff --git a/cui/source/dialogs/colorpicker.cxx b/cui/source/dialogs/colorpicker.cxx index 092c382..d972c2c 100644 --- a/cui/source/dialogs/colorpicker.cxx +++ b/cui/source/dialogs/colorpicker.cxx @@ -243,7 +243,7 @@ void HexColorControl::Paste() bool HexColorControl::ImplProcessKeyInput( const KeyEvent& rKEv ) { - const KeyCode& rKeyCode = rKEv.GetKeyCode(); + const vcl::KeyCode& rKeyCode = rKEv.GetKeyCode(); if( rKeyCode.GetGroup() == KEYGROUP_ALPHA && !rKeyCode.IsMod1() && !rKeyCode.IsMod2() ) { diff --git a/cui/source/dialogs/hangulhanjadlg.cxx b/cui/source/dialogs/hangulhanjadlg.cxx index 5953a21..99a5b1f 100644 --- a/cui/source/dialogs/hangulhanjadlg.cxx +++ b/cui/source/dialogs/hangulhanjadlg.cxx @@ -1367,10 +1367,10 @@ namespace svx bool nHandled = false; if( rNEvt.GetType() == EVENT_KEYINPUT ) { - const KeyEvent* pKEvt = rNEvt.GetKeyEvent(); - const KeyCode& rKeyCode = pKEvt->GetKeyCode(); - sal_uInt16 nMod = rKeyCode.GetModifier(); - sal_uInt16 nCode = rKeyCode.GetCode(); + const KeyEvent* pKEvt = rNEvt.GetKeyEvent(); + const vcl::KeyCode& rKeyCode = pKEvt->GetKeyCode(); + sal_uInt16 nMod = rKeyCode.GetModifier(); + sal_uInt16 nCode = rKeyCode.GetCode(); if( nCode == KEY_TAB && ( !nMod || KEY_SHIFT == nMod ) ) { bool bUp = KEY_SHIFT == nMod; diff --git a/cui/source/dialogs/thesdlg.cxx b/cui/source/dialogs/thesdlg.cxx index 162862d..d9d6ec76 100644 --- a/cui/source/dialogs/thesdlg.cxx +++ b/cui/source/dialogs/thesdlg.cxx @@ -236,7 +236,7 @@ SvTreeListEntry * ThesaurusAlternativesCtrl::AddEntry( sal_Int32 nVal, const OUS void ThesaurusAlternativesCtrl::KeyInput( const KeyEvent& rKEvt ) { - const KeyCode& rKey = rKEvt.GetKeyCode(); + const vcl::KeyCode& rKey = rKEvt.GetKeyCode(); if (rKey.GetCode() == KEY_RETURN || rKey.GetCode() == KEY_ESCAPE) GetParent()->KeyInput( rKEvt ); // parent will close dialog... diff --git a/cui/source/inc/acccfg.hxx b/cui/source/inc/acccfg.hxx index 9a3a1a3..7ece823 100644 --- a/cui/source/inc/acccfg.hxx +++ b/cui/source/inc/acccfg.hxx @@ -83,7 +83,7 @@ struct TAccInfo public: TAccInfo( sal_Int32 nKeyPos , sal_Int32 nListPos, - const KeyCode& aKey ) + const vcl::KeyCode& aKey ) : m_nKeyPos (nKeyPos ) , m_nListPos (nListPos ) , m_bIsConfigurable(true ) /**< its important to set sal_True as default - @@ -101,7 +101,7 @@ struct TAccInfo sal_Int32 m_nListPos; bool m_bIsConfigurable; OUString m_sCommand; - KeyCode m_aKey; + vcl::KeyCode m_aKey; }; namespace sfx2 @@ -160,7 +160,7 @@ private: OUString GetLabel4Command(const OUString& rCommand); void InitAccCfg(); - sal_uLong MapKeyCodeToPos( const KeyCode &rCode ) const; + sal_uLong MapKeyCodeToPos( const vcl::KeyCode &rCode ) const; css::uno::Reference< css::frame::XModel > SearchForAlreadyLoadedDoc(const OUString& sName); void StartFileDialog( WinBits nBits, const OUString& rTitle ); diff --git a/cui/source/options/optaboutconfig.cxx b/cui/source/options/optaboutconfig.cxx index e918c8a..2baf4f9 100644 --- a/cui/source/options/optaboutconfig.cxx +++ b/cui/source/options/optaboutconfig.cxx @@ -68,7 +68,7 @@ void CuiCustomMultilineEdit::KeyInput( const KeyEvent& rKeyEvent ) bool bNonSpace = rKeyEvent.GetKeyCode().GetCode() != KEY_SPACE; if( bNumericOnly && bNonSpace ) { - const KeyCode& rKeyCode = rKeyEvent.GetKeyCode(); + const vcl::KeyCode& rKeyCode = rKeyEvent.GetKeyCode(); sal_uInt16 nGroup = rKeyCode.GetGroup(); sal_uInt16 nKey = rKeyCode.GetCode(); diff --git a/cui/source/options/optdict.cxx b/cui/source/options/optdict.cxx index 23c7d23..f7ca651 100644 --- a/cui/source/options/optdict.cxx +++ b/cui/source/options/optdict.cxx @@ -779,7 +779,7 @@ IMPL_LINK(SvxEditDictionaryDialog, ModifyHdl, Edit*, pEdt) void SvxDictEdit::KeyInput( const KeyEvent& rKEvt ) { - const KeyCode aKeyCode = rKEvt.GetKeyCode(); + const vcl::KeyCode aKeyCode = rKEvt.GetKeyCode(); const sal_uInt16 nModifier = aKeyCode.GetModifier(); if( aKeyCode.GetCode() == KEY_RETURN ) { diff --git a/cui/source/options/optinet2.cxx b/cui/source/options/optinet2.cxx index 45f2a54..4909b89 100644 --- a/cui/source/options/optinet2.cxx +++ b/cui/source/options/optinet2.cxx @@ -106,7 +106,7 @@ void SvxNoSpaceEdit::KeyInput( const KeyEvent& rKEvent ) bool bValid = rKEvent.GetKeyCode().GetCode() != KEY_SPACE; if (bValid && bOnlyNumeric) { - const KeyCode& rKeyCode = rKEvent.GetKeyCode(); + const vcl::KeyCode& rKeyCode = rKEvent.GetKeyCode(); sal_uInt16 nGroup = rKeyCode.GetGroup(); sal_uInt16 nKey = rKeyCode.GetCode(); bValid = ( KEYGROUP_NUM == nGroup || KEYGROUP_CURSOR == nGroup || diff --git a/cui/source/options/treeopt.cxx b/cui/source/options/treeopt.cxx index f6a48c5..d7293b8 100644 --- a/cui/source/options/treeopt.cxx +++ b/cui/source/options/treeopt.cxx @@ -888,7 +888,7 @@ bool OfaTreeOptionsDialog::Notify( NotifyEvent& rNEvt ) if ( rNEvt.GetType() == EVENT_KEYINPUT ) { const KeyEvent* pKEvt = rNEvt.GetKeyEvent(); - const KeyCode aKeyCode = pKEvt->GetKeyCode(); + const vcl::KeyCode aKeyCode = pKEvt->GetKeyCode(); if( aKeyCode.GetCode() == KEY_PAGEUP || aKeyCode.GetCode() == KEY_PAGEDOWN) diff --git a/cui/source/tabpages/autocdlg.cxx b/cui/source/tabpages/autocdlg.cxx index 27c0ba1..29ed3c2 100644 --- a/cui/source/tabpages/autocdlg.cxx +++ b/cui/source/tabpages/autocdlg.cxx @@ -1693,7 +1693,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeAutoCorrEdit(Window *pParen void AutoCorrEdit::KeyInput( const KeyEvent& rKEvt ) { - const KeyCode aKeyCode = rKEvt.GetKeyCode(); + const vcl::KeyCode aKeyCode = rKEvt.GetKeyCode(); const sal_uInt16 nModifier = aKeyCode.GetModifier(); if( aKeyCode.GetCode() == KEY_RETURN ) { @@ -2130,7 +2130,7 @@ OfaAutoCompleteTabPage::OfaAutoCompleteTabPage(Window* pParent, for( const sal_uInt16* pKeys = aKeyCodes; *pKeys; ++pKeys ) { - KeyCode aKCode( *pKeys ); + vcl::KeyCode aKCode( *pKeys ); sal_Int32 nPos = m_pDCBExpandKey->InsertEntry( aKCode.GetName() ); m_pDCBExpandKey->SetEntryData( nPos, (void*)(sal_uLong)*pKeys ); if( KEY_RETURN == *pKeys ) // default to RETURN @@ -2326,7 +2326,7 @@ bool OfaAutoCompleteTabPage::AutoCompleteMultiListBox::PreNotify( if( !nHandled && EVENT_KEYUP == rNEvt.GetType() ) { - const KeyCode& rKeyCode = rNEvt.GetKeyEvent()->GetKeyCode(); + const vcl::KeyCode& rKeyCode = rNEvt.GetKeyEvent()->GetKeyCode(); switch( rKeyCode.GetModifier() | rKeyCode.GetCode() ) { case KEY_DELETE: diff --git a/dbaccess/source/ui/app/AppDetailView.cxx b/dbaccess/source/ui/app/AppDetailView.cxx index d4a971c..477c0f3 100644 --- a/dbaccess/source/ui/app/AppDetailView.cxx +++ b/dbaccess/source/ui/app/AppDetailView.cxx @@ -311,7 +311,7 @@ void OCreationList::onSelected( SvTreeListEntry* _pEntry ) const void OCreationList::KeyInput( const KeyEvent& rKEvt ) { - const KeyCode& rCode = rKEvt.GetKeyCode(); + const vcl::KeyCode& rCode = rKEvt.GetKeyCode(); if ( !rCode.IsMod1() && !rCode.IsMod2() && !rCode.IsShift() ) { if ( rCode.GetCode() == KEY_RETURN ) @@ -612,7 +612,7 @@ void OApplicationDetailView::setTaskExternalMnemonics( MnemonicGenerator& _rMnem bool OApplicationDetailView::interceptKeyInput( const KeyEvent& _rEvent ) { - const KeyCode& rKeyCode = _rEvent.GetKeyCode(); + const vcl::KeyCode& rKeyCode = _rEvent.GetKeyCode(); if ( rKeyCode.GetModifier() == KEY_MOD2 ) return getTasksWindow().HandleKeyInput( _rEvent ); diff --git a/dbaccess/source/ui/app/AppSwapWindow.cxx b/dbaccess/source/ui/app/AppSwapWindow.cxx index 9fe2900..746a969 100644 --- a/dbaccess/source/ui/app/AppSwapWindow.cxx +++ b/dbaccess/source/ui/app/AppSwapWindow.cxx @@ -121,7 +121,7 @@ void OApplicationSwapWindow::createIconAutoMnemonics( MnemonicGenerator& _rMnemo bool OApplicationSwapWindow::interceptKeyInput( const KeyEvent& _rEvent ) { - const KeyCode& rKeyCode = _rEvent.GetKeyCode(); + const vcl::KeyCode& rKeyCode = _rEvent.GetKeyCode(); if ( rKeyCode.GetModifier() == KEY_MOD2 ) return m_aIconControl.DoKeyInput( _rEvent ); diff --git a/dbaccess/source/ui/browser/brwview.cxx b/dbaccess/source/ui/browser/brwview.cxx index f348dc6..6be18a1 100644 --- a/dbaccess/source/ui/browser/brwview.cxx +++ b/dbaccess/source/ui/browser/brwview.cxx @@ -311,9 +311,9 @@ bool UnoDataBrowserView::PreNotify( NotifyEvent& rNEvt ) if ( bGrabAllowed ) { const KeyEvent* pKeyEvt = rNEvt.GetKeyEvent(); - const KeyCode& rKeyCode = pKeyEvt->GetKeyCode(); - if ( ( rKeyCode == KeyCode( KEY_E, true, true, false, false ) ) - || ( rKeyCode == KeyCode( KEY_TAB, true, false, false, false ) ) + const vcl::KeyCode& rKeyCode = pKeyEvt->GetKeyCode(); + if ( ( rKeyCode == vcl::KeyCode( KEY_E, true, true, false, false ) ) + || ( rKeyCode == vcl::KeyCode( KEY_TAB, true, false, false, false ) ) ) { if ( m_pTreeView && m_pVclControl && m_pTreeView->HasChildPathFocus() ) diff --git a/dbaccess/source/ui/browser/dataview.cxx b/dbaccess/source/ui/browser/dataview.cxx index edd48b4..ec220d3 100644 --- a/dbaccess/source/ui/browser/dataview.cxx +++ b/dbaccess/source/ui/browser/dataview.cxx @@ -125,7 +125,7 @@ namespace dbaui case EVENT_KEYINPUT: { const KeyEvent* pKeyEvent = _rNEvt.GetKeyEvent(); - const KeyCode& aKeyCode = pKeyEvent->GetKeyCode(); + const vcl::KeyCode& aKeyCode = pKeyEvent->GetKeyCode(); if ( m_pAccel.get() && m_pAccel->execute( aKeyCode ) ) // the accelerator consumed the event return true; diff --git a/dbaccess/source/ui/querydesign/TableWindow.cxx b/dbaccess/source/ui/querydesign/TableWindow.cxx index 56efb9f..fcbb884 100644 --- a/dbaccess/source/ui/querydesign/TableWindow.cxx +++ b/dbaccess/source/ui/querydesign/TableWindow.cxx @@ -508,7 +508,7 @@ void OTableWindow::Remove() bool OTableWindow::HandleKeyInput( const KeyEvent& rEvt ) { - const KeyCode& rCode = rEvt.GetKeyCode(); + const vcl::KeyCode& rCode = rEvt.GetKeyCode(); sal_uInt16 nCode = rCode.GetCode(); bool bShift = rCode.IsShift(); bool bCtrl = rCode.IsMod1(); @@ -618,7 +618,7 @@ bool OTableWindow::PreNotify(NotifyEvent& rNEvt) break; const KeyEvent* pKeyEvent = rNEvt.GetKeyEvent(); - const KeyCode& rCode = pKeyEvent->GetKeyCode(); + const vcl::KeyCode& rCode = pKeyEvent->GetKeyCode(); if ( rCode.IsMod1() ) { Point aStartPoint = GetPosPixel(); @@ -725,7 +725,7 @@ bool OTableWindow::PreNotify(NotifyEvent& rNEvt) case EVENT_KEYUP: { const KeyEvent* pKeyEvent = rNEvt.GetKeyEvent(); - const KeyCode& rCode = pKeyEvent->GetKeyCode(); + const vcl::KeyCode& rCode = pKeyEvent->GetKeyCode(); sal_uInt16 nKeyCode = rCode.GetCode(); if ( rCode.IsMod2() && nKeyCode != KEY_UP && nKeyCode != KEY_DOWN && nKeyCode != KEY_LEFT && nKeyCode != KEY_RIGHT ) { diff --git a/dbaccess/source/ui/querydesign/TableWindowListBox.cxx b/dbaccess/source/ui/querydesign/TableWindowListBox.cxx index 6421b79..75ab938 100644 --- a/dbaccess/source/ui/querydesign/TableWindowListBox.cxx +++ b/dbaccess/source/ui/querydesign/TableWindowListBox.cxx @@ -135,7 +135,7 @@ bool OTableWindowListBox::PreNotify(NotifyEvent& rNEvt) case EVENT_KEYINPUT: { const KeyEvent* pKeyEvent = rNEvt.GetKeyEvent(); - const KeyCode& rCode = pKeyEvent->GetKeyCode(); + const vcl::KeyCode& rCode = pKeyEvent->GetKeyCode(); if (rCode.GetCode() != KEY_RETURN) { diff --git a/desktop/source/deployment/gui/dp_gui_dialog2.cxx b/desktop/source/deployment/gui/dp_gui_dialog2.cxx index 183e97b..50c17bc 100644 --- a/desktop/source/deployment/gui/dp_gui_dialog2.cxx +++ b/desktop/source/deployment/gui/dp_gui_dialog2.cxx @@ -426,8 +426,8 @@ bool ExtBoxWithBtns_Impl::Notify( NotifyEvent& rNEvt ) if ( rNEvt.GetType() == EVENT_KEYINPUT ) { 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 ( nKeyCode == KEY_TAB ) bHandled = HandleTabKey( aKeyCode.IsShift() ); @@ -1135,8 +1135,8 @@ bool ExtMgrDialog::Notify( NotifyEvent& rNEvt ) if ( rNEvt.GetType() == EVENT_KEYINPUT ) { 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 ( nKeyCode == KEY_TAB ) { diff --git a/desktop/source/deployment/gui/dp_gui_extlistbox.cxx b/desktop/source/deployment/gui/dp_gui_extlistbox.cxx index 051220e..457e6dd 100644 --- a/desktop/source/deployment/gui/dp_gui_extlistbox.cxx +++ b/desktop/source/deployment/gui/dp_gui_extlistbox.cxx @@ -882,8 +882,8 @@ bool ExtensionBox_Impl::Notify( NotifyEvent& rNEvt ) if ( rNEvt.GetType() == EVENT_KEYINPUT ) { 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 ( nKeyCode == KEY_TAB ) bHandled = HandleTabKey( aKeyCode.IsShift() ); diff --git a/editeng/source/outliner/outlvw.cxx b/editeng/source/outliner/outlvw.cxx index 4d0b4b8..5f80f00 100644 --- a/editeng/source/outliner/outlvw.cxx +++ b/editeng/source/outliner/outlvw.cxx @@ -83,7 +83,7 @@ bool OutlinerView::PostKeyEvent( const KeyEvent& rKEvt, Window* pFrameWin ) bool bKeyProcessed = false; ESelection aSel( pEditView->GetSelection() ); bool bSelection = aSel.HasRange(); - KeyCode aKeyCode = rKEvt.GetKeyCode(); + vcl::KeyCode aKeyCode = rKEvt.GetKeyCode(); KeyFuncType eFunc = aKeyCode.GetFunction(); sal_uInt16 nCode = aKeyCode.GetCode(); bool bReadOnly = IsReadOnly(); diff --git a/extensions/source/bibliography/bibcont.cxx b/extensions/source/bibliography/bibcont.cxx index 346478b..955f479 100644 --- a/extensions/source/bibliography/bibcont.cxx +++ b/extensions/source/bibliography/bibcont.cxx @@ -216,7 +216,7 @@ bool BibBookContainer::PreNotify( NotifyEvent& rNEvt ) if( EVENT_KEYINPUT == rNEvt.GetType() ) { const KeyEvent* pKEvt = rNEvt.GetKeyEvent(); - const KeyCode aKeyCode = pKEvt->GetKeyCode(); + const vcl::KeyCode aKeyCode = pKEvt->GetKeyCode(); sal_uInt16 nKey = aKeyCode.GetCode(); const sal_uInt16 nModifier = aKeyCode.GetModifier(); diff --git a/extensions/source/bibliography/toolbar.cxx b/extensions/source/bibliography/toolbar.cxx index 965700a..54a0ef0 100644 --- a/extensions/source/bibliography/toolbar.cxx +++ b/extensions/source/bibliography/toolbar.cxx @@ -430,7 +430,7 @@ bool BibToolBar::PreNotify( NotifyEvent& rNEvt ) sal_uInt16 nSwitch=rNEvt.GetType(); if(aEdQuery.HasFocus() && nSwitch==EVENT_KEYINPUT) { - const KeyCode& aKeyCode=rNEvt.GetKeyEvent()->GetKeyCode(); + const vcl::KeyCode& aKeyCode=rNEvt.GetKeyEvent()->GetKeyCode(); sal_uInt16 nKey = aKeyCode.GetCode(); if(nKey == KEY_RETURN) { diff --git a/extensions/source/plugin/inc/plugin/unx/plugcon.hxx b/extensions/source/plugin/inc/plugin/unx/plugcon.hxx index 4b0a5e6..14ed547 100644 --- a/extensions/source/plugin/inc/plugin/unx/plugcon.hxx +++ b/extensions/source/plugin/inc/plugin/unx/plugcon.hxx @@ -41,7 +41,6 @@ #define Window XLIB_Window #define Font XLIB_Font -#define KeyCode XLIB_KeyCode #define Time XLIB_Time #define Region XLIB_Region #define String XLIB_String @@ -103,7 +102,6 @@ extern "C" { #undef Window #undef Font -#undef KeyCode #undef Time #undef String #undef Region diff --git a/extensions/source/propctrlr/commoncontrol.cxx b/extensions/source/propctrlr/commoncontrol.cxx index 2b42630..ae676b7 100644 --- a/extensions/source/propctrlr/commoncontrol.cxx +++ b/extensions/source/propctrlr/commoncontrol.cxx @@ -130,7 +130,7 @@ namespace pcr { if (EVENT_KEYINPUT == rNEvt.GetType()) { - const KeyCode& aKeyCode = rNEvt.GetKeyEvent()->GetKeyCode(); + const vcl::KeyCode& aKeyCode = rNEvt.GetKeyEvent()->GetKeyCode(); sal_uInt16 nKey = aKeyCode.GetCode(); if (nKey == KEY_RETURN && !aKeyCode.IsShift()) diff --git a/extensions/source/propctrlr/standardcontrol.cxx b/extensions/source/propctrlr/standardcontrol.cxx index 4039e6f..21ae567 100644 --- a/extensions/source/propctrlr/standardcontrol.cxx +++ b/extensions/source/propctrlr/standardcontrol.cxx @@ -996,7 +996,7 @@ namespace pcr sal_uInt16 nSwitch = _rNEvt.GetType(); if (EVENT_KEYINPUT == nSwitch) { - const KeyCode& aKeyCode = _rNEvt.GetKeyEvent()->GetKeyCode(); + const vcl::KeyCode& aKeyCode = _rNEvt.GetKeyEvent()->GetKeyCode(); sal_uInt16 nKey = aKeyCode.GetCode(); if ( ( (KEY_RETURN == nKey) @@ -1101,7 +1101,7 @@ namespace pcr 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_RETURN && !aKeyCode.IsShift() ) diff --git a/filter/source/msfilter/msvbahelper.cxx b/filter/source/msfilter/msvbahelper.cxx index 310e632..4510110 100644 --- a/filter/source/msfilter/msvbahelper.cxx +++ b/filter/source/msfilter/msvbahelper.cxx @@ -737,7 +737,7 @@ awt::KeyEvent parseKeyEvent( const OUString& Key ) throw ( uno::RuntimeException } } - awt::KeyEvent aKeyEvent = svt::AcceleratorExecute::st_VCLKey2AWTKey( KeyCode( nVclKey ) ); + awt::KeyEvent aKeyEvent = svt::AcceleratorExecute::st_VCLKey2AWTKey( vcl::KeyCode( nVclKey ) ); return aKeyEvent; } diff --git a/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx b/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx index ccc9b17..444559b 100644 --- a/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx +++ b/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx @@ -1007,9 +1007,9 @@ bool XMLFilterSettingsDialog::Notify( NotifyEvent& rNEvt ) if ( rNEvt.GetType() == EVENT_KEYINPUT ) { const KeyEvent* pKEvt = rNEvt.GetKeyEvent(); - KeyCode aKeyCode = pKEvt->GetKeyCode(); - sal_uInt16 nKeyCode = aKeyCode.GetCode(); - bool bMod1 = pKEvt->GetKeyCode().IsMod1(); + vcl::KeyCode aKeyCode = pKEvt->GetKeyCode(); + sal_uInt16 nKeyCode = aKeyCode.GetCode(); + bool bMod1 = pKEvt->GetKeyCode().IsMod1(); if( nKeyCode == KEY_ESCAPE || (bMod1 && (nKeyCode == KEY_W))) { diff --git a/forms/source/richtext/richtextvclcontrol.cxx b/forms/source/richtext/richtextvclcontrol.cxx index 5adea77..54c00b4 100644 --- a/forms/source/richtext/richtextvclcontrol.cxx +++ b/forms/source/richtext/richtextvclcontrol.cxx @@ -201,7 +201,7 @@ namespace frm { // Ctrl-Tab is used to step out of the control // -> build a new key event without the Ctrl-key, and let the very base class handle it - KeyCode aNewCode( KEY_TAB, bShift, false, false, false ); + vcl::KeyCode aNewCode( KEY_TAB, bShift, false, false, false ); ::KeyEvent aNewEvent( pKeyEvent->GetCharCode(), aNewCode ); Control::KeyInput( aNewEvent ); return true; // handled diff --git a/formula/source/ui/dlg/funcutl.cxx b/formula/source/ui/dlg/funcutl.cxx index 856d8ba..bb700b2 100644 --- a/formula/source/ui/dlg/funcutl.cxx +++ b/formula/source/ui/dlg/funcutl.cxx @@ -59,9 +59,9 @@ void ArgEdit::Init( ArgEdit* pPrevEdit, ArgEdit* pNextEdit, // Cursor control for Edit Fields in Argument Dialog void ArgEdit::KeyInput( const KeyEvent& rKEvt ) { - KeyCode aCode = rKEvt.GetKeyCode(); - bool bUp = (aCode.GetCode() == KEY_UP); - bool bDown = (aCode.GetCode() == KEY_DOWN); + vcl::KeyCode aCode = rKEvt.GetKeyCode(); + bool bUp = (aCode.GetCode() == KEY_UP); + bool bDown = (aCode.GetCode() == KEY_DOWN); if ( pSlider && ( !aCode.IsShift() && !aCode.IsMod1() && !aCode.IsMod2() ) @@ -401,7 +401,7 @@ bool EditBox::PreNotify( NotifyEvent& rNEvt ) sal_uInt16 nSwitch=rNEvt.GetType(); if(nSwitch==EVENT_KEYINPUT)// || nSwitch==EVENT_KEYUP) { - const KeyCode& aKeyCode=rNEvt.GetKeyEvent()->GetKeyCode(); + const vcl::KeyCode& aKeyCode=rNEvt.GetKeyEvent()->GetKeyCode(); sal_uInt16 nKey=aKeyCode.GetCode(); if( (nKey==KEY_RETURN && !aKeyCode.IsShift()) || nKey==KEY_TAB ) { @@ -543,7 +543,7 @@ void RefEdit::Modify() void RefEdit::KeyInput( const KeyEvent& rKEvt ) { - const KeyCode& rKeyCode = rKEvt.GetKeyCode(); + const vcl::KeyCode& rKeyCode = rKEvt.GetKeyCode(); if( pAnyRefDlg && !rKeyCode.GetModifier() && (rKeyCode.GetCode() == KEY_F2) ) pAnyRefDlg->ReleaseFocus( this ); else @@ -614,7 +614,7 @@ void RefButton::Click() void RefButton::KeyInput( const KeyEvent& rKEvt ) { - const KeyCode& rKeyCode = rKEvt.GetKeyCode(); + const vcl::KeyCode& rKeyCode = rKEvt.GetKeyCode(); if( pAnyRefDlg && !rKeyCode.GetModifier() && (rKeyCode.GetCode() == KEY_F2) ) pAnyRefDlg->ReleaseFocus( pRefEdit ); else diff --git a/fpicker/source/office/iodlg.cxx b/fpicker/source/office/iodlg.cxx index a147814..ec215c9 100644 --- a/fpicker/source/office/iodlg.cxx +++ b/fpicker/source/office/iodlg.cxx @@ -1598,7 +1598,7 @@ bool SvtFileDialog::Notify( 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 ( !rKeyCode.GetModifier() && diff --git a/framework/inc/uielement/menubarmanager.hxx b/framework/inc/uielement/menubarmanager.hxx index 15c3430..f3d1673 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 943ef92..c812d0c 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 5dc8c25..5a83c35 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 3305dc9..748d89c 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 edc205e..ba60e2b 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 5a6b6b9..64d1d19 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 3412251..48626c1 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 cbe0873..fe473bc 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 093a082..ae4fba5 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 diff --git a/include/postx.h b/include/postx.h index a55b710..677af68 100644 --- a/include/postx.h +++ b/include/postx.h @@ -27,7 +27,6 @@ /* X Types */ #undef Window #undef Font -#undef KeyCode #undef Region #undef Icon #undef Time diff --git a/include/prex.h b/include/prex.h index 995e829..6a0db36 100644 --- a/include/prex.h +++ b/include/prex.h @@ -31,7 +31,6 @@ #define Icon HIDE_XLIB_Icon /* Types from <X11/X.h> that clash, but we do use. */ -#define KeyCode XLIB_KeyCode #define Region XLIB_Region #define Time XLIB_Time #define Window XLIB_Window @@ -50,9 +49,6 @@ extern "C" { /* From <X11/Intrinsic.h> */ typedef unsigned long Pixel; -#undef KeyCode -#define KeyCode XLIB_KeyCode //undef in intrinsics - #endif /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/svtools/acceleratorexecute.hxx b/include/svtools/acceleratorexecute.hxx index e65547e..20b8a22 100644 --- a/include/svtools/acceleratorexecute.hxx +++ b/include/svtools/acceleratorexecute.hxx @@ -185,7 +185,7 @@ class SVT_DLLPUBLIC AcceleratorExecute : private TMutexInit Attention: This state does not mean the success state of the corresponding execute. Because its done asynchronous! */ - bool execute(const KeyCode& aKey); + bool execute(const vcl::KeyCode& aKey); bool execute(const css::awt::KeyEvent& aKey); /** search the command for the given key event. @@ -196,8 +196,8 @@ class SVT_DLLPUBLIC AcceleratorExecute : private TMutexInit OUString findCommand(const ::com::sun::star::awt::KeyEvent& aKey); /** TODO document me */ - static css::awt::KeyEvent st_VCLKey2AWTKey(const KeyCode& aKey); - static KeyCode st_AWTKey2VCLKey(const css::awt::KeyEvent& aKey); + static css::awt::KeyEvent st_VCLKey2AWTKey(const vcl::KeyCode& aKey); + static vcl::KeyCode st_AWTKey2VCLKey(const css::awt::KeyEvent& aKey); /** TODO document me */ diff --git a/include/svtools/inettbc.hxx b/include/svtools/inettbc.hxx index 8bd931e..82e3248 100644 --- a/include/svtools/inettbc.hxx +++ b/include/svtools/inettbc.hxx @@ -45,7 +45,7 @@ friend class SvtURLBox_Impl; bool bNoSelection : 1; bool bIsAutoCompleteEnabled : 1; - SVT_DLLPRIVATE bool ProcessKey( const KeyCode& rCode ); + SVT_DLLPRIVATE bool ProcessKey( const vcl::KeyCode& rCode ); SVT_DLLPRIVATE void TryAutoComplete(); SVT_DLLPRIVATE void UpdatePicklistForSmartProtocol_Impl(); DECL_DLLPRIVATE_LINK( AutoCompleteHdl_Impl, void* ); diff --git a/include/vcl/accel.hxx b/include/vcl/accel.hxx index 362d2c7..2e6e26d 100644 --- a/include/vcl/accel.hxx +++ b/include/vcl/accel.hxx @@ -41,7 +41,7 @@ private: Link maSelectHdl; // Will be set by AcceleratorManager - KeyCode maCurKeyCode; + vcl::KeyCode maCurKeyCode; sal_uInt16 mnCurId; sal_uInt16 mnCurRepeat; bool mbIsCancel; @@ -50,10 +50,10 @@ private: SAL_DLLPRIVATE void ImplInit(); SAL_DLLPRIVATE void ImplCopyData( ImplAccelData& rAccelData ); SAL_DLLPRIVATE void ImplDeleteData(); - SAL_DLLPRIVATE void ImplInsertAccel( sal_uInt16 nItemId, const KeyCode& rKeyCode, + SAL_DLLPRIVATE void ImplInsertAccel( sal_uInt16 nItemId, const vcl::KeyCode& rKeyCode, bool bEnable, Accelerator* pAutoAccel ); - SAL_DLLPRIVATE ImplAccelEntry* ImplGetAccelData( const KeyCode& rKeyCode ) const; + SAL_DLLPRIVATE ImplAccelEntry* ImplGetAccelData( const vcl::KeyCode& rKeyCode ) const; protected: SAL_DLLPRIVATE void ImplLoadRes( const ResId& rResId ); @@ -68,17 +68,17 @@ public: virtual void Deactivate(); virtual void Select(); - void InsertItem( sal_uInt16 nItemId, const KeyCode& rKeyCode ); + void InsertItem( sal_uInt16 nItemId, const vcl::KeyCode& rKeyCode ); void InsertItem( const ResId& rResId ); sal_uInt16 GetCurItemId() const { return mnCurId; } - const KeyCode& GetCurKeyCode() const { return maCurKeyCode; } + const vcl::KeyCode& GetCurKeyCode() const { return maCurKeyCode; } sal_uInt16 GetCurRepeat() const { return mnCurRepeat; } bool IsCancel() const { return mbIsCancel; } sal_uInt16 GetItemCount() const; sal_uInt16 GetItemId( sal_uInt16 nPos ) const; - KeyCode GetKeyCode( sal_uInt16 nItemId ) const; + vcl::KeyCode GetKeyCode( sal_uInt16 nItemId ) const; Accelerator* GetAccel( sal_uInt16 nItemId ) const; diff --git a/include/vcl/event.hxx b/include/vcl/event.hxx index e43c1b1..9f7ab05 100644 --- a/include/vcl/event.hxx +++ b/include/vcl/event.hxx @@ -42,23 +42,20 @@ enum TextDirectionality { TextDirectionality_TopToBottom_RightToLeft }; - -// - KeyEvent - - class VCL_DLLPUBLIC KeyEvent { private: - KeyCode maKeyCode; - sal_uInt16 mnRepeat; + vcl::KeyCode maKeyCode; + sal_uInt16 mnRepeat; sal_Unicode mnCharCode; public: KeyEvent(); - KeyEvent( sal_Unicode nChar, const KeyCode& rKeyCode, + KeyEvent( sal_Unicode nChar, const vcl::KeyCode& rKeyCode, sal_uInt16 nRepeat = 0 ); - sal_Unicode GetCharCode() const { return mnCharCode; } - const KeyCode& GetKeyCode() const { return maKeyCode; } + sal_Unicode GetCharCode() const { return mnCharCode; } + const vcl::KeyCode& GetKeyCode() const { return maKeyCode; } sal_uInt16 GetRepeat() const { return mnRepeat; } KeyEvent LogicalTextDirectionality (TextDirectionality eMode) const; @@ -72,7 +69,7 @@ inline KeyEvent::KeyEvent() mnRepeat = 0; } -inline KeyEvent::KeyEvent( sal_Unicode nChar, const KeyCode& rKeyCode, +inline KeyEvent::KeyEvent( sal_Unicode nChar, const vcl::KeyCode& rKeyCode, sal_uInt16 nRepeat ) : maKeyCode( rKeyCode ) diff --git a/include/vcl/keycod.hxx b/include/vcl/keycod.hxx index 20e80cf..b7e745c 100644 --- a/include/vcl/keycod.hxx +++ b/include/vcl/keycod.hxx @@ -28,6 +28,9 @@ class Window; +namespace vcl +{ + class VCL_DLLPUBLIC KeyCode { private: @@ -76,7 +79,9 @@ public: bool operator !=( const KeyCode& rKeyCode ) const; }; -inline KeyCode::KeyCode( sal_uInt16 nKey, bool bShift, bool bMod1, bool bMod2, bool bMod3 ) +} // namespace vcl + +inline vcl::KeyCode::KeyCode( sal_uInt16 nKey, bool bShift, bool bMod1, bool bMod2, bool bMod3 ) { nCode = nKey; if( bShift ) @@ -90,7 +95,7 @@ inline KeyCode::KeyCode( sal_uInt16 nKey, bool bShift, bool bMod1, bool bMod2, b eFunc = KEYFUNC_DONTKNOW; } -inline bool KeyCode::operator ==( const KeyCode& rKeyCode ) const +inline bool vcl::KeyCode::operator ==( const vcl::KeyCode& rKeyCode ) const { if ( (eFunc == KEYFUNC_DONTKNOW) && (rKeyCode.eFunc == KEYFUNC_DONTKNOW) ) return (nCode == rKeyCode.nCode); @@ -98,7 +103,7 @@ inline bool KeyCode::operator ==( const KeyCode& rKeyCode ) const return (GetFunction() == rKeyCode.GetFunction()); } -inline bool KeyCode::operator !=( const KeyCode& rKeyCode ) const +inline bool vcl::KeyCode::operator !=( const vcl::KeyCode& rKeyCode ) const { if ( (eFunc == KEYFUNC_DONTKNOW) && (rKeyCode.eFunc == KEYFUNC_DONTKNOW) ) return (nCode != rKeyCode.nCode); @@ -106,14 +111,14 @@ inline bool KeyCode::operator !=( const KeyCode& rKeyCode ) const return (GetFunction() != rKeyCode.GetFunction()); } -inline bool KeyCode::IsDefinedKeyCodeEqual( const KeyCode& rKeyCode ) const +inline bool vcl::KeyCode::IsDefinedKeyCodeEqual( const vcl::KeyCode& rKeyCode ) const { if ( (eFunc == KEYFUNC_DONTKNOW) && (rKeyCode.eFunc == KEYFUNC_DONTKNOW) ) return (GetFullCode() == rKeyCode.GetFullCode()); return (GetFunction() == rKeyCode.GetFunction()); } -inline KeyCode& KeyCode::operator = ( const KeyCode& rKeyCode ) +inline vcl::KeyCode& vcl::KeyCode::operator = ( const vcl::KeyCode& rKeyCode ) { nCode = rKeyCode.nCode; eFunc = rKeyCode.eFunc; diff --git a/include/vcl/menu.hxx b/include/vcl/menu.hxx index d7b3550..6642af3 100644 --- a/include/vcl/menu.hxx +++ b/include/vcl/menu.hxx @@ -20,13 +20,14 @@ #ifndef INCLUDED_VCL_MENU_HXX #define INCLUDED_VCL_MENU_HXX -#include <tools/solar.h> -#include <vcl/dllapi.h> +#include <rsc/rsc-vcl-shared-types.hxx> +#include <tools/color.hxx> #include <tools/rc.hxx> #include <tools/resid.hxx> -#include <rsc/rsc-vcl-shared-types.hxx> +#include <tools/solar.h> +#include <vcl/dllapi.h> #include <vcl/bitmapex.hxx> -#include <tools/color.hxx> +#include <vcl/keycod.hxx> #include <vcl/vclevent.hxx> #include <com/sun/star/uno/Reference.hxx> @@ -40,7 +41,6 @@ class MenuItemList; class HelpEvent; class Image; class PopupMenu; -class KeyCode; class KeyEvent; class MenuFloatingWindow; class Window; @@ -251,8 +251,8 @@ public: void SetPopupMenu( sal_uInt16 nItemId, PopupMenu* pMenu ); PopupMenu* GetPopupMenu( sal_uInt16 nItemId ) const; - void SetAccelKey( sal_uInt16 nItemId, const KeyCode& rKeyCode ); - KeyCode GetAccelKey( sal_uInt16 nItemId ) const; + void SetAccelKey( sal_uInt16 nItemId, const vcl::KeyCode& rKeyCode ); + vcl::KeyCode GetAccelKey( sal_uInt16 nItemId ) const; void CheckItem( sal_uInt16 nItemId, bool bCheck = true ); bool IsItemChecked( sal_uInt16 nItemId ) const; diff --git a/include/vcl/split.hxx b/include/vcl/split.hxx index 65cc90e..ff42f32 100644 --- a/include/vcl/split.hxx +++ b/include/vcl/split.hxx @@ -47,7 +47,7 @@ private: SAL_DLLPRIVATE void ImplDrawSplitter(); SAL_DLLPRIVATE void ImplSplitMousePos( Point& rPos ); SAL_DLLPRIVATE void ImplStartKbdSplitting(); - SAL_DLLPRIVATE void ImplKbdTracking( KeyCode aKeyCode ); + SAL_DLLPRIVATE void ImplKbdTracking( vcl::KeyCode aKeyCode ); SAL_DLLPRIVATE bool ImplSplitterActive(); SAL_DLLPRIVATE Splitter* ImplFindSibling(); SAL_DLLPRIVATE void ImplRestoreSplitter(); diff --git a/include/vcl/svapp.hxx b/include/vcl/svapp.hxx index 8b3ef42..f4b7abc 100644 --- a/include/vcl/svapp.hxx +++ b/include/vcl/svapp.hxx @@ -36,6 +36,7 @@ #include <tools/solar.h> #include <vcl/dllapi.h> #include <vcl/apptypes.hxx> +#include <vcl/keycod.hxx> #include <vcl/vclevent.hxx> #include <vcl/metric.hxx> #include <unotools/localedatawrapper.hxx> @@ -52,7 +53,6 @@ class WorkWindow; class MenuBar; class UnoWrapperBase; class Reflection; -class KeyCode; class NotifyEvent; class KeyEvent; class MouseEvent; @@ -1202,7 +1202,7 @@ public: @see GetReservedKeyCodeCount */ - static const KeyCode* GetReservedKeyCode( sal_uLong i ); + static const vcl::KeyCode* GetReservedKeyCode( sal_uLong i ); ///@} diff --git a/include/vcl/toolbox.hxx b/include/vcl/toolbox.hxx index f3328e4..6844893 100644 --- a/include/vcl/toolbox.hxx +++ b/include/vcl/toolbox.hxx @@ -223,8 +223,8 @@ private: SAL_DLLPRIVATE bool ImplChangeHighlightUpDn( bool bUp, bool bNoCycle = false ); SAL_DLLPRIVATE sal_uInt16 ImplGetItemLine( ImplToolItem* pCurrentItem ); SAL_DLLPRIVATE ImplToolItem* ImplGetFirstValidItem( sal_uInt16 nLine ); - SAL_DLLPRIVATE bool ImplOpenItem( KeyCode aKeyCode ); - SAL_DLLPRIVATE bool ImplActivateItem( KeyCode aKeyCode ); + SAL_DLLPRIVATE bool ImplOpenItem( vcl::KeyCode aKeyCode ); + SAL_DLLPRIVATE bool ImplActivateItem( vcl::KeyCode aKeyCode ); SAL_DLLPRIVATE void ImplShowFocus(); SAL_DLLPRIVATE void ImplHideFocus(); SAL_DLLPRIVATE void ImplUpdateInputEnable(); diff --git a/reportdesign/source/ui/dlg/AddField.cxx b/reportdesign/source/ui/dlg/AddField.cxx index 5bea9c5..686c97f 100644 --- a/reportdesign/source/ui/dlg/AddField.cxx +++ b/reportdesign/source/ui/dlg/AddField.cxx @@ -243,7 +243,7 @@ bool OAddFieldWindow::PreNotify( NotifyEvent& _rNEvt ) { if ( EVENT_KEYINPUT == _rNEvt.GetType() ) { - const KeyCode& rKeyCode = _rNEvt.GetKeyEvent()->GetKeyCode(); + const vcl::KeyCode& rKeyCode = _rNEvt.GetKeyEvent()->GetKeyCode(); if ( ( 0 == rKeyCode.GetModifier() ) && ( KEY_RETURN == rKeyCode.GetCode() ) ) { if ( m_aCreateLink.IsSet() ) diff --git a/reportdesign/source/ui/dlg/CondFormat.cxx b/reportdesign/source/ui/dlg/CondFormat.cxx index 7390352..6f73a53 100644 --- a/reportdesign/source/ui/dlg/CondFormat.cxx +++ b/reportdesign/source/ui/dlg/CondFormat.cxx @@ -475,7 +475,7 @@ namespace rptui case EVENT_KEYINPUT: { const KeyEvent* pKeyEvent( _rNEvt.GetKeyEvent() ); - const KeyCode& rKeyCode = pKeyEvent->GetKeyCode(); + const vcl::KeyCode& rKeyCode = pKeyEvent->GetKeyCode(); if ( rKeyCode.IsMod1() && rKeyCode.IsMod2() ) { if ( rKeyCode.GetCode() == 0x0508 ) diff --git a/reportdesign/source/ui/inc/ViewsWindow.hxx b/reportdesign/source/ui/inc/ViewsWindow.hxx index fde7caf..f4c4577 100644 --- a/reportdesign/source/ui/inc/ViewsWindow.hxx +++ b/reportdesign/source/ui/inc/ViewsWindow.hxx @@ -302,7 +302,7 @@ namespace rptui void ForceMarkedToAnotherPage(); bool IsAction() const; bool IsDragObj() const; - void handleKey(const KeyCode& _rCode); + void handleKey(const vcl::KeyCode& _rCode); void stopScrollTimer(); /** return the section at the given point which is relative to the given section diff --git a/reportdesign/source/ui/report/DesignView.cxx b/reportdesign/source/ui/report/DesignView.cxx index c94c27a..b4e9de9 100644 --- a/reportdesign/source/ui/report/DesignView.cxx +++ b/reportdesign/source/ui/report/DesignView.cxx @@ -202,7 +202,7 @@ bool ODesignView::PreNotify( NotifyEvent& rNEvt ) nRet = true; else if ( nRet && m_pAccel.get() ) { - const KeyCode& rCode = pKeyEvent->GetKeyCode(); + const vcl::KeyCode& rCode = pKeyEvent->GetKeyCode(); util::URL aUrl; aUrl.Complete = m_pAccel->findCommand(svt::AcceleratorExecute::st_VCLKey2AWTKey(rCode)); if ( aUrl.Complete.isEmpty() || !m_rController.isCommandEnabled( aUrl.Complete ) ) diff --git a/reportdesign/source/ui/report/ViewsWindow.cxx b/reportdesign/source/ui/report/ViewsWindow.cxx index 154eaf9..5fb908d 100644 --- a/reportdesign/source/ui/report/ViewsWindow.cxx +++ b/reportdesign/source/ui/report/ViewsWindow.cxx @@ -1437,7 +1437,7 @@ sal_uInt32 OViewsWindow::getMarkedObjectCount() const return nCount; } -void OViewsWindow::handleKey(const KeyCode& _rCode) +void OViewsWindow::handleKey(const vcl::KeyCode& _rCode) { const sal_uInt16 nCode = _rCode.GetCode(); if ( _rCode.IsMod1() ) diff --git a/reportdesign/source/ui/report/dlgedfunc.cxx b/reportdesign/source/ui/report/dlgedfunc.cxx index 087ad6e..0706761 100644 --- a/reportdesign/source/ui/report/dlgedfunc.cxx +++ b/reportdesign/source/ui/report/dlgedfunc.cxx @@ -272,7 +272,7 @@ bool DlgEdFunc::handleKeyEvent(const KeyEvent& _rEvent) if ( !m_bUiActive ) { - const KeyCode& rCode = _rEvent.GetKeyCode(); + const vcl::KeyCode& rCode = _rEvent.GetKeyCode(); sal_uInt16 nCode = rCode.GetCode(); switch ( nCode ) diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx index 3e50219..8ba9457 100644 --- a/sc/source/ui/app/inputhdl.cxx +++ b/sc/source/ui/app/inputhdl.cxx @@ -2972,7 +2972,7 @@ bool ScInputHandler::KeyInput( const KeyEvent& rKEvt, bool bStartEdit /* = false bOptLoaded = true; } - KeyCode aCode = rKEvt.GetKeyCode(); + vcl::KeyCode aCode = rKEvt.GetKeyCode(); sal_uInt16 nModi = aCode.GetModifier(); bool bShift = aCode.IsShift(); bool bControl = aCode.IsMod1(); @@ -3135,10 +3135,10 @@ bool ScInputHandler::KeyInput( const KeyEvent& rKEvt, bool bStartEdit /* = false if (bDoEnter) { if (pTableView) - if( pTableView->PostKeyEvent( KeyEvent( CHAR_CR, KeyCode(KEY_RETURN) ) ) ) + if( pTableView->PostKeyEvent( KeyEvent( CHAR_CR, vcl::KeyCode(KEY_RETURN) ) ) ) bUsed = true; if (pTopView) - if( pTopView->PostKeyEvent( KeyEvent( CHAR_CR, KeyCode(KEY_RETURN) ) ) ) + if( pTopView->PostKeyEvent( KeyEvent( CHAR_CR, vcl::KeyCode(KEY_RETURN) ) ) ) bUsed = true; } else if ( nAutoPar && nChar == ')' && CursorAtClosingPar() ) diff --git a/sc/source/ui/cctrl/checklistmenu.cxx b/sc/source/ui/cctrl/checklistmenu.cxx index 99ca3a6..570117e 100644 --- a/sc/source/ui/cctrl/checklistmenu.cxx +++ b/sc/source/ui/cctrl/checklistmenu.cxx @@ -134,7 +134,7 @@ void ScMenuFloatingWindow::KeyInput(const KeyEvent& rKEvt) return; } - const KeyCode& rKeyCode = rKEvt.GetKeyCode(); + const vcl::KeyCode& rKeyCode = rKEvt.GetKeyCode(); bool bHandled = true; size_t nSelectedMenu = mnSelectedMenu; size_t nLastMenuPos = maMenuItems.size() - 1; @@ -1174,7 +1174,7 @@ bool ScCheckListMenuWindow::Notify(NotifyEvent& rNEvt) case EVENT_KEYUP: { const KeyEvent* pKeyEvent = rNEvt.GetKeyEvent(); - const KeyCode& rCode = pKeyEvent->GetKeyCode(); + const vcl::KeyCode& rCode = pKeyEvent->GetKeyCode(); bool bShift = rCode.IsShift(); if (rCode.GetCode() == KEY_TAB) { @@ -1456,7 +1456,7 @@ void ScCheckListBox::ExpandChildren( SvTreeListEntry* pParent ) void ScCheckListBox::KeyInput( const KeyEvent& rKEvt ) { - const KeyCode& rKey = rKEvt.GetKeyCode(); + const vcl::KeyCode& rKey = rKEvt.GetKeyCode(); if ( rKey.GetCode() == KEY_RETURN || rKey.GetCode() == KEY_SPACE ) { diff --git a/sc/source/ui/dbgui/PivotLayoutTreeList.cxx b/sc/source/ui/dbgui/PivotLayoutTreeList.cxx index 32c55ce..eedd01e2 100644 --- a/sc/source/ui/dbgui/PivotLayoutTreeList.cxx +++ b/sc/source/ui/dbgui/PivotLayoutTreeList.cxx @@ -102,7 +102,7 @@ void ScPivotLayoutTreeList::InsertEntryForItem(ScItemValue* pItemValue, sal_uLon void ScPivotLayoutTreeList::KeyInput(const KeyEvent& rKeyEvent) { - KeyCode aCode = rKeyEvent.GetKeyCode(); + vcl::KeyCode aCode = rKeyEvent.GetKeyCode(); sal_uInt16 nCode = aCode.GetCode(); switch (nCode) diff --git a/sc/source/ui/dbgui/PivotLayoutTreeListData.cxx b/sc/source/ui/dbgui/PivotLayoutTreeListData.cxx index e8f4805..a9daa31 100644 --- a/sc/source/ui/dbgui/PivotLayoutTreeListData.cxx +++ b/sc/source/ui/dbgui/PivotLayoutTreeListData.cxx @@ -250,7 +250,7 @@ void ScPivotLayoutTreeListData::AdjustDuplicateCount(ScItemValue* pInputItemValu void ScPivotLayoutTreeListData::KeyInput(const KeyEvent& rKeyEvent) { - KeyCode aCode = rKeyEvent.GetKeyCode(); + vcl::KeyCode aCode = rKeyEvent.GetKeyCode(); sal_uInt16 nCode = aCode.GetCode(); switch (nCode) diff --git a/sc/source/ui/dbgui/PivotLayoutTreeListLabel.cxx b/sc/source/ui/dbgui/PivotLayoutTreeListLabel.cxx index a094f2a..7056934 100644 --- a/sc/source/ui/dbgui/PivotLayoutTreeListLabel.cxx +++ b/sc/source/ui/dbgui/PivotLayoutTreeListLabel.cxx @@ -77,7 +77,7 @@ ScItemValue* ScPivotLayoutTreeListLabel::GetItem(SCCOL nColumn) void ScPivotLayoutTreeListLabel::KeyInput(const KeyEvent& rKeyEvent) { - KeyCode aCode = rKeyEvent.GetKeyCode(); + vcl::KeyCode aCode = rKeyEvent.GetKeyCode(); sal_uInt16 nCode = aCode.GetCode(); switch (nCode) diff --git a/sc/source/ui/dbgui/csvgrid.cxx b/sc/source/ui/dbgui/csvgrid.cxx index 5b2cbc6..5001e1e 100644 --- a/sc/source/ui/dbgui/csvgrid.cxx +++ b/sc/source/ui/dbgui/csvgrid.cxx @@ -883,7 +883,7 @@ void ScCsvGrid::Tracking( const TrackingEvent& rTEvt ) void ScCsvGrid::KeyInput( const KeyEvent& rKEvt ) { - const KeyCode& rKCode = rKEvt.GetKeyCode(); + const vcl::KeyCode& rKCode = rKEvt.GetKeyCode(); sal_uInt16 nCode = rKCode.GetCode(); bool bShift = rKCode.IsShift(); bool bMod1 = rKCode.IsMod1(); diff --git a/sc/source/ui/dbgui/csvruler.cxx b/sc/source/ui/dbgui/csvruler.cxx index 060b034..24eb276 100644 --- a/sc/source/ui/dbgui/csvruler.cxx +++ b/sc/source/ui/dbgui/csvruler.cxx @@ -429,7 +429,7 @@ void ScCsvRuler::Tracking( const TrackingEvent& rTEvt ) void ScCsvRuler::KeyInput( const KeyEvent& rKEvt ) { - const KeyCode& rKCode = rKEvt.GetKeyCode(); + const vcl::KeyCode& rKCode = rKEvt.GetKeyCode(); sal_uInt16 nCode = rKCode.GetCode(); bool bNoMod = !rKCode.GetModifier(); bool bShift = (rKCode.GetModifier() == KEY_SHIFT); diff --git a/sc/source/ui/drawfunc/fudraw.cxx b/sc/source/ui/drawfunc/fudraw.cxx index aef82de..1a49040 100644 --- a/sc/source/ui/drawfunc/fudraw.cxx +++ b/sc/source/ui/drawfunc/fudraw.cxx @@ -307,7 +307,7 @@ bool FuDraw::KeyInput(const KeyEvent& rKEvt) // there is not yet a object selected if(pView->AreObjectsMarked()) { - KeyCode aCode = rKEvt.GetKeyCode(); + vcl::KeyCode aCode = rKEvt.GetKeyCode(); if ( !aCode.IsMod1() && !aCode.IsMod2() ) { @@ -364,7 +364,7 @@ bool FuDraw::KeyInput(const KeyEvent& rKEvt) // there is not yet a object selected if(pView->AreObjectsMarked()) { - KeyCode aCode = rKEvt.GetKeyCode(); + vcl::KeyCode aCode = rKEvt.GetKeyCode(); if ( aCode.IsMod1() ) { @@ -389,7 +389,7 @@ bool FuDraw::KeyInput(const KeyEvent& rKEvt) // there is not yet a object selected if(pView->AreObjectsMarked()) { - KeyCode aCode = rKEvt.GetKeyCode(); + vcl::KeyCode aCode = rKEvt.GetKeyCode(); if ( aCode.IsMod1() ) { diff --git a/sc/source/ui/miscdlgs/anyrefdg.cxx b/sc/source/ui/miscdlgs/anyrefdg.cxx index 61ac61f..3e75593 100644 --- a/sc/source/ui/miscdlgs/anyrefdg.cxx +++ b/sc/source/ui/miscdlgs/anyrefdg.cxx @@ -569,8 +569,8 @@ void ScFormulaReferenceHelper::RefInputStart( formula::RefEdit* pEdit, formula:: if (!pAccel.get()) { pAccel.reset( new Accelerator ); - pAccel->InsertItem( 1, KeyCode( KEY_RETURN ) ); - pAccel->InsertItem( 2, KeyCode( KEY_ESCAPE ) ); + pAccel->InsertItem( 1, vcl::KeyCode( KEY_RETURN ) ); + pAccel->InsertItem( 2, vcl::KeyCode( KEY_ESCAPE ) ); pAccel->SetSelectHdl( LINK( this, ScFormulaReferenceHelper, AccelSelectHdl ) ); } Application::InsertAccel( pAccel.get() ); diff --git a/sc/source/ui/miscdlgs/optsolver.cxx b/sc/source/ui/miscdlgs/optsolver.cxx index 72cf968..e42917a 100644 --- a/sc/source/ui/miscdlgs/optsolver.cxx +++ b/sc/source/ui/miscdlgs/optsolver.cxx @@ -112,7 +112,7 @@ void ScCursorRefEdit::SetCursorLinks( const Link& rUp, const Link& rDown ) void ScCursorRefEdit::KeyInput( const KeyEvent& rKEvt ) { - KeyCode aCode = rKEvt.GetKeyCode(); + vcl::KeyCode aCode = rKEvt.GetKeyCode(); bool bUp = (aCode.GetCode() == KEY_UP); bool bDown = (aCode.GetCode() == KEY_DOWN); if ( !aCode.IsShift() && !aCode.IsMod1() && !aCode.IsMod2() && ( bUp || bDown ) ) diff --git a/sc/source/ui/navipi/content.cxx b/sc/source/ui/navipi/content.cxx index ee6d14a..029eca2 100644 --- a/sc/source/ui/navipi/content.cxx +++ b/sc/source/ui/navipi/content.cxx @@ -425,7 +425,7 @@ void ScContentTree::KeyInput( const KeyEvent& rKEvt ) { bool bUsed = false; - const KeyCode aCode = rKEvt.GetKeyCode(); + const vcl::KeyCode aCode = rKEvt.GetKeyCode(); if (aCode.GetCode() == KEY_RETURN) { switch (aCode.GetModifier()) diff --git a/sc/source/ui/navipi/navipi.cxx b/sc/source/ui/navipi/navipi.cxx index 70624af..a219184 100644 --- a/sc/source/ui/navipi/navipi.cxx +++ b/sc/source/ui/navipi/navipi.cxx @@ -99,7 +99,7 @@ bool ColumnEdit::Notify( NotifyEvent& rNEvt ) if ( nType == EVENT_KEYINPUT ) { const KeyEvent* pKEvt = rNEvt.GetKeyEvent(); - KeyCode aCode = pKEvt->GetKeyCode(); + vcl::KeyCode aCode = pKEvt->GetKeyCode(); if ( !aCode.IsMod1() && !aCode.IsMod2() ) { @@ -270,7 +270,7 @@ bool RowEdit::Notify( NotifyEvent& rNEvt ) if ( rNEvt.GetType() == EVENT_KEYINPUT ) { const KeyEvent* pKEvt = rNEvt.GetKeyEvent(); - KeyCode aCode = pKEvt->GetKeyCode(); + vcl::KeyCode aCode = pKEvt->GetKeyCode(); if ( aCode.GetCode() == KEY_RETURN && !aCode.IsMod1() && !aCode.IsMod2() ) { ScNavigatorDlg::ReleaseFocus(); diff --git a/sc/source/ui/navipi/scenwnd.cxx b/sc/source/ui/navipi/scenwnd.cxx index e415d09..d17c24b 100644 --- a/sc/source/ui/navipi/scenwnd.cxx +++ b/sc/source/ui/navipi/scenwnd.cxx @@ -113,7 +113,7 @@ bool ScScenarioListBox::Notify( NotifyEvent& rNEvt ) if( rNEvt.GetType() == EVENT_KEYINPUT ) { - KeyCode aCode = rNEvt.GetKeyEvent()->GetKeyCode(); + vcl::KeyCode aCode = rNEvt.GetKeyEvent()->GetKeyCode(); switch( aCode.GetCode() ) { case KEY_RETURN: diff --git a/sc/source/ui/view/cellsh1.cxx b/sc/source/ui/view/cellsh1.cxx index 2797222..3d682b4 100644 --- a/sc/source/ui/view/cellsh1.cxx +++ b/sc/source/ui/view/cellsh1.cxx @@ -2093,7 +2093,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq ) if (pHdl) { // "=" in KeyEvent, switches to input-mode - pScMod->InputKeyEvent( KeyEvent('=',KeyCode()) ); + pScMod->InputKeyEvent( KeyEvent('=', vcl::KeyCode()) ); std::vector<OUString> aNames = pDlg->GetSelectedNames(); if (!aNames.empty()) diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx index 48e82b6..e405524 100644 --- a/sc/source/ui/view/gridwin.cxx +++ b/sc/source/ui/view/gridwin.cxx @@ -280,7 +280,7 @@ bool ScFilterListBox::PreNotify( NotifyEvent& rNEvt ) if ( rNEvt.GetType() == EVENT_KEYINPUT ) { KeyEvent aKeyEvt = *rNEvt.GetKeyEvent(); - KeyCode aCode = aKeyEvt.GetKeyCode(); + vcl::KeyCode aCode = aKeyEvt.GetKeyCode(); if ( !aCode.GetModifier() ) // ohne alle Modifiers { sal_uInt16 nKey = aCode.GetCode(); @@ -3269,7 +3269,7 @@ void ScGridWindow::SelectForContextMenu( const Point& rPosPixel, SCsCOL nCellX, void ScGridWindow::KeyInput(const KeyEvent& rKEvt) { // Cursor control for ref input dialog - const KeyCode& rKeyCode = rKEvt.GetKeyCode(); + const vcl::KeyCode& rKeyCode = rKEvt.GetKeyCode(); if( SC_MOD()->IsRefDialogOpen() ) { if( !rKeyCode.GetModifier() && (rKeyCode.GetCode() == KEY_F2) ) @@ -3326,7 +3326,7 @@ void ScGridWindow::KeyInput(const KeyEvent& rKEvt) if (DrawKeyInput(rKEvt)) { - const KeyCode& rLclKeyCode = rKEvt.GetKeyCode(); + const vcl::KeyCode& rLclKeyCode = rKEvt.GetKeyCode(); if (rLclKeyCode.GetCode() == KEY_DOWN || rLclKeyCode.GetCode() == KEY_UP || rLclKeyCode.GetCode() == KEY_LEFT @@ -3349,7 +3349,7 @@ void ScGridWindow::KeyInput(const KeyEvent& rKEvt) if (pViewSh->SfxViewShell::KeyInput(rKEvt)) // von SfxViewShell return; - KeyCode aCode = rKEvt.GetKeyCode(); + vcl::KeyCode aCode = rKEvt.GetKeyCode(); if ( aCode.GetCode() == KEY_ESCAPE && aCode.GetModifier() == 0 ) { if ( bHadKeyMarker ) diff --git a/sc/source/ui/view/olinewin.cxx b/sc/source/ui/view/olinewin.cxx index 165e488..88590de 100644 --- a/sc/source/ui/view/olinewin.cxx +++ b/sc/source/ui/view/olinewin.cxx @@ -972,7 +972,7 @@ void ScOutlineWindow::MouseButtonDown( const MouseEvent& rMEvt ) void ScOutlineWindow::KeyInput( const KeyEvent& rKEvt ) { - const KeyCode& rKCode = rKEvt.GetKeyCode(); + const vcl::KeyCode& rKCode = rKEvt.GetKeyCode(); bool bNoMod = !rKCode.GetModifier(); bool bShift = (rKCode.GetModifier() == KEY_SHIFT); bool bCtrl = (rKCode.GetModifier() == KEY_MOD1); diff --git a/sc/source/ui/view/preview.cxx b/sc/source/ui/view/preview.cxx index a642991..bd7d984 100644 --- a/sc/source/ui/view/preview.cxx +++ b/sc/source/ui/view/preview.cxx @@ -651,7 +651,7 @@ void ScPreview::KeyInput( const KeyEvent& rKEvt ) // The + and - keys can't be configured as accelerator entries, so they must be handled directly // (in ScPreview, not ScPreviewShell -> only if the preview window has the focus) - const KeyCode& rKeyCode = rKEvt.GetKeyCode(); + const vcl::KeyCode& rKeyCode = rKEvt.GetKeyCode(); sal_uInt16 nKey = rKeyCode.GetCode(); bool bHandled = false; if(!rKeyCode.GetModifier()) diff --git a/sc/source/ui/view/tabview3.cxx b/sc/source/ui/view/tabview3.cxx index 8bba5896..0e24bc2 100644 --- a/sc/source/ui/view/tabview3.cxx +++ b/sc/source/ui/view/tabview3.cxx @@ -1237,7 +1237,7 @@ void ScTabView::MoveCursorEnter( bool bShift ) // bShift -> hoch/runter bool ScTabView::MoveCursorKeyInput( const KeyEvent& rKeyEvent ) { - const KeyCode& rKCode = rKeyEvent.GetKeyCode(); + const vcl::KeyCode& rKCode = rKeyEvent.GetKeyCode(); enum { MOD_NONE, MOD_CTRL, MOD_ALT, MOD_BOTH } eModifier = rKCode.IsMod1() ? diff --git a/sc/source/ui/view/tabvwsh2.cxx b/sc/source/ui/view/tabvwsh2.cxx index 197e952..c29ac7d 100644 --- a/sc/source/ui/view/tabvwsh2.cxx +++ b/sc/source/ui/view/tabvwsh2.cxx @@ -373,7 +373,7 @@ void ScTabViewShell::ExecDraw(SfxRequest& rReq) // For FuText objects, edit mode is handled within CreateDefaultObject. // KEY_F2 is handled in FuDraw::KeyInput. - pFuActual->KeyInput( KeyEvent( 0, KeyCode( KEY_F2 ) ) ); + pFuActual->KeyInput( KeyEvent( 0, vcl::KeyCode( KEY_F2 ) ) ); } } } diff --git a/sc/source/ui/view/tabvwsh4.cxx b/sc/source/ui/view/tabvwsh4.cxx index 87e326d..2fc3849 100644 --- a/sc/source/ui/view/tabvwsh4.cxx +++ b/sc/source/ui/view/tabvwsh4.cxx @@ -1263,7 +1263,7 @@ bool ScTabViewShell::TabKeyInput(const KeyEvent& rKEvt) if ( pThisFrame->GetChildWindow( SID_OPENDLG_FUNCTION ) ) return false; - KeyCode aCode = rKEvt.GetKeyCode(); + vcl::KeyCode aCode = rKEvt.GetKeyCode(); bool bShift = aCode.IsShift(); bool bControl = aCode.IsMod1(); bool bAlt = aCode.IsMod2(); diff --git a/sc/source/ui/view/viewfun2.cxx b/sc/source/ui/view/viewfun2.cxx index eb868ac..6f92ac9 100644 --- a/sc/source/ui/view/viewfun2.cxx +++ b/sc/source/ui/view/viewfun2.cxx @@ -2786,7 +2786,7 @@ void ScViewFunc::InsertSpecialChar( const OUString& rStr, const Font& rFont ) ApplyUserItemSet( aSetItem.GetItemSet() ); while ( *pChar ) - pViewShell->TabKeyInput( KeyEvent( *(pChar++), KeyCode() ) ); + pViewShell->TabKeyInput( KeyEvent( *(pChar++), vcl::KeyCode() ) ); } void ScViewFunc::UpdateLineAttrs( SvxBorderLine& rLine, diff --git a/sd/source/ui/animations/CustomAnimationDialog.cxx b/sd/source/ui/animations/CustomAnimationDialog.cxx index 99446e9..c3bc421 100644 --- a/sd/source/ui/animations/CustomAnimationDialog.cxx +++ b/sd/source/ui/animations/CustomAnimationDialog.cxx @@ -373,7 +373,7 @@ bool DropdownMenuBox::PreNotify( NotifyEvent& rNEvt ) sal_uInt16 nSwitch=rNEvt.GetType(); if (nSwitch==EVENT_KEYINPUT) { - const KeyCode& aKeyCode=rNEvt.GetKeyEvent()->GetKeyCode(); + const vcl::KeyCode& aKeyCode=rNEvt.GetKeyEvent()->GetKeyCode(); sal_uInt16 nKey=aKeyCode.GetCode(); if (nKey==KEY_DOWN && aKeyCode.IsMod2()) diff --git a/sd/source/ui/annotations/annotationwindow.cxx b/sd/source/ui/annotations/annotationwindow.cxx index 9c6e530..c9f0e31 100644 --- a/sd/source/ui/annotations/annotationwindow.cxx +++ b/sd/source/ui/annotations/annotationwindow.cxx @@ -145,7 +145,7 @@ void AnnotationTextWindow::Paint( const Rectangle& rRect) void AnnotationTextWindow::KeyInput( const KeyEvent& rKeyEvt ) { - const KeyCode& rKeyCode = rKeyEvt.GetKeyCode(); + const vcl::KeyCode& rKeyCode = rKeyEvt.GetKeyCode(); sal_uInt16 nKey = rKeyCode.GetCode(); if ((rKeyCode.IsMod1() && rKeyCode.IsMod2()) && ((nKey == KEY_PAGEUP) || (nKey == KEY_PAGEDOWN))) diff --git a/sd/source/ui/dlg/RemoteDialogClientBox.cxx b/sd/source/ui/dlg/RemoteDialogClientBox.cxx index ab454a1..4cbe097 100644 --- a/sd/source/ui/dlg/RemoteDialogClientBox.cxx +++ b/sd/source/ui/dlg/RemoteDialogClientBox.cxx @@ -598,8 +598,8 @@ bool ClientBox::Notify( NotifyEvent& rNEvt ) if ( rNEvt.GetType() == EVENT_KEYINPUT ) { 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 ( nKeyCode == KEY_TAB ) bHandled = HandleTabKey( aKeyCode.IsShift() ); diff --git a/sd/source/ui/func/fudraw.cxx b/sd/source/ui/func/fudraw.cxx index f127995..39228ef 100644 --- a/sd/source/ui/func/fudraw.cxx +++ b/sd/source/ui/func/fudraw.cxx @@ -409,7 +409,7 @@ bool FuDraw::KeyInput(const KeyEvent& rKEvt) case KEY_TAB: { - KeyCode aCode = rKEvt.GetKeyCode(); + vcl::KeyCode aCode = rKEvt.GetKeyCode(); if ( !aCode.IsMod1() && !aCode.IsMod2() ) { @@ -445,7 +445,7 @@ bool FuDraw::KeyInput(const KeyEvent& rKEvt) case KEY_END: { - KeyCode aCode = rKEvt.GetKeyCode(); + vcl::KeyCode aCode = rKEvt.GetKeyCode(); if ( aCode.IsMod1() ) { @@ -463,7 +463,7 @@ bool FuDraw::KeyInput(const KeyEvent& rKEvt) case KEY_HOME: { - KeyCode aCode = rKEvt.GetKeyCode(); + vcl::KeyCode aCode = rKEvt.GetKeyCode(); if ( aCode.IsMod1() ) { diff --git a/sd/source/ui/func/futext.cxx b/sd/source/ui/func/futext.cxx index cafa2da..2b4ca73 100644 --- a/sd/source/ui/func/futext.cxx +++ b/sd/source/ui/func/futext.cxx @@ -895,7 +895,7 @@ bool FuText::KeyInput(const KeyEvent& rKEvt) bool bReturn = false; mpView->SetMarkHdlWhenTextEdit(true); - KeyCode nCode = rKEvt.GetKeyCode(); + vcl::KeyCode nCode = rKEvt.GetKeyCode(); bool bShift = nCode.IsShift(); if(mxTextObj.is()) @@ -923,7 +923,7 @@ bool FuText::KeyInput(const KeyEvent& rKEvt) } sal_uInt16 nKey = nCode.GetCode(); - KeyCode aKeyCode (nKey, bShift, nCode.IsMod1(), nCode.IsMod2(), nCode.IsMod3() ); + vcl::KeyCode aKeyCode (nKey, bShift, nCode.IsMod1(), nCode.IsMod2(), nCode.IsMod3() ); KeyEvent aKEvt(rKEvt.GetCharCode(), aKeyCode); bool bOK = true; diff --git a/sd/source/ui/sidebar/SidebarFocusManager.hxx b/sd/source/ui/sidebar/SidebarFocusManager.hxx index 7fed490..2904dd5 100644 --- a/sd/source/ui/sidebar/SidebarFocusManager.hxx +++ b/sd/source/ui/sidebar/SidebarFocusManager.hxx @@ -21,10 +21,10 @@ #define INCLUDED_SD_SOURCE_UI_SIDEBAR_SIDEBARFOCUSMANAGER_HXX #include <tools/link.hxx> +#include <vcl/keycod.hxx> #include <memory> -class KeyCode; class VclSimpleEvent; class Window; @@ -56,7 +56,7 @@ public: void RegisterLink ( ::Window* pSource, ::Window* pTarget, - const KeyCode& rKey); + const vcl::KeyCode& rKey); /** Register a link that will move the focus from the source window to the target window when the source window is focused and KEY_ESCAPE @@ -92,7 +92,7 @@ public: When there is no rule for this combination of source window and key code then the focus stays where it is. */ - bool TransferFocus (::Window* pSource, const KeyCode& rCode); + bool TransferFocus (::Window* pSource, const vcl::KeyCode& rCode); private: friend struct FocusManagerCreator; diff --git a/sd/source/ui/slidesorter/controller/SlsSelectionFunction.cxx b/sd/source/ui/slidesorter/controller/SlsSelectionFunction.cxx index 85c6701..0da6c42 100644 --- a/sd/source/ui/slidesorter/controller/SlsSelectionFunction.cxx +++ b/sd/source/ui/slidesorter/controller/SlsSelectionFunction.cxx @@ -390,7 +390,7 @@ bool SelectionFunction::KeyInput (const KeyEvent& rEvent) FocusManager& rFocusManager (mrController.GetFocusManager()); bool bResult = false; - const KeyCode& rCode (rEvent.GetKeyCode()); + const vcl::KeyCode& rCode (rEvent.GetKeyCode()); switch (rCode.GetCode()) { case KEY_RETURN: diff --git a/sd/source/ui/view/drviewse.cxx b/sd/source/ui/view/drviewse.cxx index f9340b0..77ebf96 100644 --- a/sd/source/ui/view/drviewse.cxx +++ b/sd/source/ui/view/drviewse.cxx @@ -125,7 +125,7 @@ void ImpAddPrintableCharactersToTextEdit(SfxRequest& rReq, ::sd::View* pView) for(sal_Int32 a(0); a < aInputString.getLength(); a++) { sal_Char aChar = (sal_Char)aInputString[a]; - KeyCode aKeyCode; + vcl::KeyCode aKeyCode; KeyEvent aKeyEvent(aChar, aKeyCode); // add actual character @@ -866,7 +866,7 @@ void DrawViewShell::FuSupport(SfxRequest& rReq) if (pOLV) { - KeyCode aKCode(KEY_DELETE); + vcl::KeyCode aKCode(KEY_DELETE); KeyEvent aKEvt( 0, aKCode); pOLV->PostKeyEvent(aKEvt); } @@ -878,7 +878,7 @@ void DrawViewShell::FuSupport(SfxRequest& rReq) } else { - KeyCode aKCode(KEY_DELETE); + vcl::KeyCode aKCode(KEY_DELETE); KeyEvent aKEvt( 0, aKCode); bool bConsumed = mpDrawView && mpDrawView->getSmartTags().KeyInput( aKEvt ); diff --git a/sd/source/ui/view/outlnvsh.cxx b/sd/source/ui/view/outlnvsh.cxx index e3b4aa7..8e8b35e 100644 --- a/sd/source/ui/view/outlnvsh.cxx +++ b/sd/source/ui/view/outlnvsh.cxx @@ -541,7 +541,7 @@ void OutlineViewShell::FuSupport(SfxRequest &rReq) { OutlineViewPageChangesGuard aGuard2(pOlView); - KeyCode aKCode(KEY_DELETE); + vcl::KeyCode aKCode(KEY_DELETE); KeyEvent aKEvt( 0, aKCode ); pOutlView->PostKeyEvent(aKEvt); @@ -1445,7 +1445,7 @@ bool OutlineViewShell::KeyInput(const KeyEvent& rKEvt, ::sd::Window* pWin) Invalidate(SID_STYLE_FAMILY5); // check and distinguish cursor movements- or input-keys - KeyCode aKeyGroup( rKEvt.GetKeyCode().GetGroup() ); + vcl::KeyCode aKeyGroup( rKEvt.GetKeyCode().GetGroup() ); if( (aKeyGroup != KEYGROUP_CURSOR && aKeyGroup != KEYGROUP_FKEYS) || (GetActualPage() != pLastPage) ) { diff --git a/sd/source/ui/view/viewshel.cxx b/sd/source/ui/view/viewshel.cxx index 440eaf7..23de401 100644 --- a/sd/source/ui/view/viewshel.cxx +++ b/sd/source/ui/view/viewshel.cxx @@ -450,7 +450,7 @@ bool ViewShell::KeyInput(const KeyEvent& rKEvt, ::sd::Window* pWin) if(!bReturn && GetActiveWindow()) { - KeyCode aKeyCode = rKEvt.GetKeyCode(); + vcl::KeyCode aKeyCode = rKEvt.GetKeyCode(); if (aKeyCode.IsMod1() && aKeyCode.IsShift() && aKeyCode.GetCode() == KEY_R) diff --git a/sfx2/source/appl/newhelp.cxx b/sfx2/source/appl/newhelp.cxx index a10c8a8..188ef59 100644 --- a/sfx2/source/appl/newhelp.cxx +++ b/sfx2/source/appl/newhelp.cxx @@ -1610,7 +1610,7 @@ bool SfxHelpIndexWindow_Impl::PreNotify(NotifyEvent& rNEvt) sal_uInt16 nType = rNEvt.GetType(); 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_TAB == nCode ) @@ -2125,7 +2125,7 @@ Reference< XTextRange > SfxHelpTextWindow_Impl::getCursor() const -bool SfxHelpTextWindow_Impl::isHandledKey( const KeyCode& _rKeyCode ) +bool SfxHelpTextWindow_Impl::isHandledKey( const vcl::KeyCode& _rKeyCode ) { bool bRet = false; sal_uInt16 nCode = _rKeyCode.GetCode(); @@ -2429,8 +2429,8 @@ bool SfxHelpTextWindow_Impl::PreNotify( NotifyEvent& rNEvt ) } else if ( EVENT_KEYINPUT == nType && rNEvt.GetKeyEvent() ) { - const KeyEvent* pKEvt = rNEvt.GetKeyEvent(); - const KeyCode& rKeyCode = pKEvt->GetKeyCode(); + const KeyEvent* pKEvt = rNEvt.GetKeyEvent(); + const vcl::KeyCode& rKeyCode = pKEvt->GetKeyCode(); sal_uInt16 nKeyGroup = rKeyCode.GetGroup(); sal_uInt16 nKey = rKeyCode.GetCode(); if ( KEYGROUP_ALPHA == nKeyGroup && !isHandledKey( rKeyCode ) ) @@ -3022,7 +3022,7 @@ bool SfxHelpWindow_Impl::PreNotify( NotifyEvent& rNEvt ) if ( rNEvt.GetType() == EVENT_KEYINPUT ) { // Backward == <ALT><LEFT> or <BACKSPACE> Forward == <ALT><RIGHT> - const KeyCode& rKeyCode = rNEvt.GetKeyEvent()->GetKeyCode(); + const vcl::KeyCode& rKeyCode = rNEvt.GetKeyEvent()->GetKeyCode(); sal_uInt16 nKey = rKeyCode.GetCode(); if ( ( rKeyCode.IsMod2() && ( KEY_LEFT == nKey || KEY_RIGHT == nKey ) ) || ( !rKeyCode.GetModifier() && KEY_BACKSPACE == nKey && !pIndexWin->HasFocusOnEdit() ) ) diff --git a/sfx2/source/appl/newhelp.hxx b/sfx2/source/appl/newhelp.hxx index 53bb10c..01dfbb8 100644 --- a/sfx2/source/appl/newhelp.hxx +++ b/sfx2/source/appl/newhelp.hxx @@ -438,7 +438,7 @@ private: GetBreakIterator(); ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > getCursor() const; - bool isHandledKey( const KeyCode& _rKeyCode ); + bool isHandledKey( const vcl::KeyCode& _rKeyCode ); DECL_LINK(SelectHdl, void *); DECL_LINK( NotifyHdl, SvtMiscOptions* ); diff --git a/sfx2/source/control/thumbnailview.cxx b/sfx2/source/control/thumbnailview.cxx index 0f93b77..5c9a20b 100644 --- a/sfx2/source/control/thumbnailview.cxx +++ b/sfx2/source/control/thumbnailview.cxx @@ -537,7 +537,7 @@ void ThumbnailView::KeyInput( const KeyEvent& rKEvt ) bool bValidRange = false; bool bHasSelRange = mpStartSelRange != mFilteredItemList.end(); size_t nNextPos = nLastPos; - KeyCode aKeyCode = rKEvt.GetKeyCode(); + vcl::KeyCode aKeyCode = rKEvt.GetKeyCode(); ThumbnailViewItem* pNext = NULL; if (aKeyCode.IsShift() && bHasSelRange) diff --git a/sfx2/source/control/thumbnailviewitem.cxx b/sfx2/source/control/thumbnailviewitem.cxx index c23521c..b2e4462 100644 --- a/sfx2/source/control/thumbnailviewitem.cxx +++ b/sfx2/source/control/thumbnailviewitem.cxx @@ -78,7 +78,7 @@ bool ResizableMultiLineEdit::PreNotify(NotifyEvent& rNEvt) if( rNEvt.GetType() == EVENT_KEYINPUT ) { const KeyEvent& rKEvt = *rNEvt.GetKeyEvent(); - KeyCode aCode = rKEvt.GetKeyCode(); + vcl::KeyCode aCode = rKEvt.GetKeyCode(); switch (aCode.GetCode()) { case KEY_RETURN: diff --git a/sfx2/source/dialog/backingwindow.cxx b/sfx2/source/dialog/backingwindow.cxx index 60ab3fd..1e6c4c8 100644 --- a/sfx2/source/dialog/backingwindow.cxx +++ b/sfx2/source/dialog/backingwindow.cxx @@ -372,7 +372,7 @@ bool BackingWindow::PreNotify( NotifyEvent& rNEvt ) if( rNEvt.GetType() == EVENT_KEYINPUT ) { const KeyEvent* pEvt = rNEvt.GetKeyEvent(); - const KeyCode& rKeyCode(pEvt->GetKeyCode()); + const vcl::KeyCode& rKeyCode(pEvt->GetKeyCode()); // Subwindows of BackingWindow: Sidebar and Thumbnail view if( rKeyCode.GetCode() == KEY_F6 ) { @@ -413,7 +413,7 @@ bool BackingWindow::Notify( NotifyEvent& rNEvt ) mpAccExec->init( comphelper::getProcessComponentContext(), mxFrame); } const KeyEvent* pEvt = rNEvt.GetKeyEvent(); - const KeyCode& rKeyCode(pEvt->GetKeyCode()); + const vcl::KeyCode& rKeyCode(pEvt->GetKeyCode()); const OUString aCommand = mpAccExec->findCommand(svt::AcceleratorExecute::st_VCLKey2AWTKey(rKeyCode)); if((aCommand != "vnd.sun.star.findbar:FocusToFindbar") && pEvt && mpAccExec->execute(rKeyCode)) return true; diff --git a/sfx2/source/dialog/templdlg.cxx b/sfx2/source/dialog/templdlg.cxx index 35565df..7b022d3 100644 --- a/sfx2/source/dialog/templdlg.cxx +++ b/sfx2/source/dialog/templdlg.cxx @@ -302,7 +302,7 @@ bool DropListBox_Impl::Notify( NotifyEvent& rNEvt ) bool nRet = false; if( rNEvt.GetType() == EVENT_KEYINPUT ) { - const KeyCode& rKeyCode = rNEvt.GetKeyEvent()->GetKeyCode(); + const vcl::KeyCode& rKeyCode = rNEvt.GetKeyEvent()->GetKeyCode(); if(!rKeyCode.GetModifier()) { if( pDialog->bCanDel && KEY_DELETE == rKeyCode.GetCode()) @@ -541,7 +541,7 @@ bool StyleTreeListBox_Impl::Notify( NotifyEvent& rNEvt ) bool nRet = false; if ( rNEvt.GetType() == EVENT_KEYINPUT ) { - const KeyCode& rKeyCode = rNEvt.GetKeyEvent()->GetKeyCode(); + const vcl::KeyCode& rKeyCode = rNEvt.GetKeyEvent()->GetKeyCode(); if ( !rKeyCode.GetModifier() && KEY_RETURN == rKeyCode.GetCode() ) { aDoubleClickLink.Call( this ); diff --git a/sfx2/source/dialog/versdlg.cxx b/sfx2/source/dialog/versdlg.cxx index d1128aa..503d0dd 100644 --- a/sfx2/source/dialog/versdlg.cxx +++ b/sfx2/source/dialog/versdlg.cxx @@ -133,7 +133,7 @@ SfxVersionInfo::SfxVersionInfo() void SfxVersionsTabListBox_Impl::KeyInput(const KeyEvent& rKeyEvent) { - const KeyCode& rCode = rKeyEvent.GetKeyCode(); + const vcl::KeyCode& rCode = rKeyEvent.GetKeyCode(); switch (rCode.GetCode()) { case KEY_RETURN : diff --git a/sfx2/source/sidebar/FocusManager.cxx b/sfx2/source/sidebar/FocusManager.cxx index 0b12d60..244fc94 100644 --- a/sfx2/source/sidebar/FocusManager.cxx +++ b/sfx2/source/sidebar/FocusManager.cxx @@ -434,7 +434,7 @@ bool FocusManager::MoveFocusInsideDeckTitle ( void FocusManager::HandleKeyEvent ( - const KeyCode& rKeyCode, + const vcl::KeyCode& rKeyCode, const Window& rWindow) { const FocusLocation aLocation (GetFocusLocation(rWindow)); diff --git a/sfx2/source/sidebar/FocusManager.hxx b/sfx2/source/sidebar/FocusManager.hxx index 23f2f52..d0d9c2c 100644 --- a/sfx2/source/sidebar/FocusManager.hxx +++ b/sfx2/source/sidebar/FocusManager.hxx @@ -21,12 +21,11 @@ #include "Panel.hxx" #include <tools/link.hxx> +#include <vcl/keycod.hxx> class Button; -class KeyCode; class VclSimpleEvent; - namespace sfx2 { namespace sidebar { class DeckTitleBar; @@ -141,7 +140,7 @@ private: const sal_Int32 nDirection); void HandleKeyEvent ( - const KeyCode& rKeyCode, + const vcl::KeyCode& rKeyCode, const Window& rWindow); FocusLocation GetFocusLocation (const Window& rWindow) const; diff --git a/svtools/source/brwbox/ebbcontrols.cxx b/svtools/source/brwbox/ebbcontrols.cxx index 13988ce..da54a71 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 81bf2db..24c08b0 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 6b00f95..adc5229 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 62e275c..05a15561 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 a04856c..99ca76f 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 13c9c05..557756e 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 2f6bc55..e165ace 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 ) ... etc. - the rest is truncated _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits