From 30ae83c268125383866d47a7ee3e4a5dfcf59f71 Mon Sep 17 00:00:00 2001 From: Tor Lillqvist Date: Sat, 23 Aug 2014 22:22:32 +0300 Subject: fdo#82577: Handle KeyCode Put the VCL KeyCode class in the vcl namespace. Avoids clash with the X11 KeyCode typedef. Change-Id: I624c9d937f7c5f5986d313b6c5f060bd8bb7e028 --- .../source/standard/vclxaccessiblebutton.cxx | 2 +- .../source/standard/vclxaccessiblecheckbox.cxx | 2 +- .../source/standard/vclxaccessiblemenuitem.cxx | 4 +- .../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 +- .../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 +-- .../source/ui/querydesign/TableWindowListBox.cxx | 2 +- desktop/source/deployment/gui/dp_gui_dialog2.cxx | 8 ++-- .../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 +- .../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 +- .../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 +- .../accelerators/acceleratorconfiguration.cxx | 2 +- framework/source/dispatch/menudispatcher.cxx | 2 +- .../source/uielement/comboboxtoolbarcontroller.cxx | 2 +- .../source/uielement/edittoolbarcontroller.cxx | 2 +- framework/source/uielement/menubarmanager.cxx | 10 ++-- framework/source/uielement/newmenucontroller.cxx | 8 ++-- .../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 +-- .../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(-) diff --git a/accessibility/source/standard/vclxaccessiblebutton.cxx b/accessibility/source/standard/vclxaccessiblebutton.cxx index ba057d5cddcc..e26e41b9558a 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 2ce86d579b22..f5655989d0ef 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 6daadb440ee5..2d69dc10f859 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 331075bb4e6e..1f629fdb7934 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 3c411b9b4b08..b994bd3ecdf1 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 e97d1cc0d148..9d53af5e587d 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 718b6e3ba908..5fbdd63c2004 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 f5f2c4137b99..76c43de874b4 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 ada5129c1bc6..d4f60ea97a81 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 311804cfd6c2..037abce3d564 100644 --- a/cui/source/customize/acccfg.cxx +++ b/cui/source/customize/acccfg.cxx @@ -688,9 +688,9 @@ void SfxAccCfgTabListBox_Impl::InitEntry(SvTreeListEntry* pEntry, */ void SfxAccCfgTabListBox_Impl::KeyInput(const KeyEvent& aKey) { - KeyCode aCode1 = aKey.GetKeyCode(); - sal_uInt16 nCode1 = aCode1.GetCode(); - sal_uInt16 nMod1 = aCode1.GetModifier(); + vcl::KeyCode aCode1 = aKey.GetKeyCode(); + sal_uInt16 nCode1 = aCode1.GetCode(); + sal_uInt16 nMod1 = aCode1.GetModifier(); // is it related to our list box ? if ( @@ -795,7 +795,7 @@ SfxAcceleratorConfigPage::SfxAcceleratorConfigPage( Window* pParent, const SfxIt long nMaxWidth = 0; for ( sal_uInt16 i = 0; i < KEYCODE_ARRAY_SIZE; ++i ) { - long nTmp = GetTextWidth( KeyCode( KEYCODE_ARRAY[i] ).GetName() ); + long nTmp = GetTextWidth( vcl::KeyCode( KEYCODE_ARRAY[i] ).GetName() ); if ( nTmp > nMaxWidth ) nMaxWidth = nTmp; } @@ -930,8 +930,8 @@ void SfxAcceleratorConfigPage::Init(const css::uno::Reference< css::ui::XAcceler sal_Int32 nListPos = 0; for (i1=0; i1getCommandByKeyEvent(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; i3First(); diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx index 34edd30e19e5..56d4bff2c6b0 100644 --- a/cui/source/customize/cfg.cxx +++ b/cui/source/customize/cfg.cxx @@ -1487,7 +1487,7 @@ TriState SvxMenuEntriesListBox::NotifyCopying( void SvxMenuEntriesListBox::KeyInput( const KeyEvent& rKeyEvent ) { - KeyCode keycode = rKeyEvent.GetKeyCode(); + vcl::KeyCode keycode = rKeyEvent.GetKeyCode(); // support DELETE for removing the current entry if ( keycode == KEY_DELETE ) diff --git a/cui/source/dialogs/SpellDialog.cxx b/cui/source/dialogs/SpellDialog.cxx index a62e70292ff4..df7500531e31 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 092c3823a59a..d972c2c02341 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 5953a2128bb8..99a5b1f7b75b 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 162862dbfa1a..d9d6ec7682aa 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 9a3a1a30c128..7ece823d5b88 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 e918c8a6b702..2baf4f9e6a7d 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 23c7d2355e55..f7ca6510f43f 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 45f2a5423ba3..4909b894ebe6 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 f6a48c5b3236..d7293b8bb1b5 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 27c0ba1b4194..29ed3c2e3e82 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 d4a971c48c2c..477c0f3f40bd 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 9fe2900c0f3c..746a969ea49d 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 f348dc678810..6be18a14ae17 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 edd48b43a31d..ec220d3b562a 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 56efb9f631a1..fcbb884784f5 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 6421b79c7cf1..75ab9389f1c9 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 183e97b7079a..50c17bcfe029 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 051220eed894..457e6ddbbdcc 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 4d0b4b8f5ddc..5f80f00b4425 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 346478b97c87..955f47919f2c 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 965700a5f385..54a0ef09c30d 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 4b0a5e6671a6..14ed54750ff9 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 2b4263058802..ae676b764c06 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 4039e6f1384e..21ae5674eb40 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 310e63201e51..45101103cc11 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 ccc9b179a96f..444559b6f368 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 5adea77205e9..54c00b4ba290 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 856d8ba1d062..bb700b22ff84 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 a1478140687b..ec215c9d3c8f 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 15c343021d26..f3d167392cf5 100644 --- a/framework/inc/uielement/menubarmanager.hxx +++ b/framework/inc/uielement/menubarmanager.hxx @@ -193,7 +193,7 @@ class MenuBarManager : public com::sun::star::frame::XStatusListener ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch > xMenuItemDispatch; ::com::sun::star::uno::Reference< ::com::sun::star::frame::XPopupMenuController > xPopupMenuController; ::com::sun::star::uno::Reference< ::com::sun::star::awt::XPopupMenu > xPopupMenu; - KeyCode aKeyCode; + vcl::KeyCode aKeyCode; }; void RetrieveShortcuts( std::vector< MenuItemHandler* >& aMenuShortCuts ); diff --git a/framework/inc/uielement/newmenucontroller.hxx b/framework/inc/uielement/newmenucontroller.hxx index 943ef9206fff..c812d0c78029 100644 --- a/framework/inc/uielement/newmenucontroller.hxx +++ b/framework/inc/uielement/newmenucontroller.hxx @@ -91,9 +91,9 @@ namespace framework void fillPopupMenu( com::sun::star::uno::Reference< com::sun::star::awt::XPopupMenu >& rPopupMenu ); void retrieveShortcutsFromConfiguration( const ::com::sun::star::uno::Reference< ::com::sun::star::ui::XAcceleratorConfiguration >& rAccelCfg, const ::com::sun::star::uno::Sequence< OUString >& rCommands, - std::vector< KeyCode >& aMenuShortCuts ); + std::vector< vcl::KeyCode >& aMenuShortCuts ); void setAccelerators( PopupMenu* pPopupMenu ); - void determineAndSetNewDocAccel( PopupMenu* pPopupMenu, const KeyCode& rKeyCode ); + void determineAndSetNewDocAccel( PopupMenu* pPopupMenu, const vcl::KeyCode& rKeyCode ); void setMenuImages( PopupMenu* pPopupMenu, bool bSetImages ); private: diff --git a/framework/source/accelerators/acceleratorconfiguration.cxx b/framework/source/accelerators/acceleratorconfiguration.cxx index 5dc8c25374f7..5a83c35ac97d 100644 --- a/framework/source/accelerators/acceleratorconfiguration.cxx +++ b/framework/source/accelerators/acceleratorconfiguration.cxx @@ -723,7 +723,7 @@ AcceleratorCache::TKeyList::const_iterator lcl_getPreferredKey(const Accelerator ++pIt ) { const css::awt::KeyEvent& rAWTKey = *pIt; - const KeyCode aVCLKey = ::svt::AcceleratorExecute::st_AWTKey2VCLKey(rAWTKey); + const vcl::KeyCode aVCLKey = ::svt::AcceleratorExecute::st_AWTKey2VCLKey(rAWTKey); const OUString sName = aVCLKey.GetName(); if (!sName.isEmpty()) diff --git a/framework/source/dispatch/menudispatcher.cxx b/framework/source/dispatch/menudispatcher.cxx index 3305dc90f48f..748d89c5b230 100644 --- a/framework/source/dispatch/menudispatcher.cxx +++ b/framework/source/dispatch/menudispatcher.cxx @@ -202,7 +202,7 @@ void MenuDispatcher::impl_setAccelerators( Menu* pMenu, const Accelerator& aAcce impl_setAccelerators( (Menu *)pPopup, aAccel ); else if ( nId && !pMenu->GetPopupMenu(nId)) { - KeyCode aCode = aAccel.GetKeyCode( nId ); + vcl::KeyCode aCode = aAccel.GetKeyCode( nId ); if ( aCode.GetCode() ) pMenu->SetAccelKey( nId, aCode ); } diff --git a/framework/source/uielement/comboboxtoolbarcontroller.cxx b/framework/source/uielement/comboboxtoolbarcontroller.cxx index edc205e078ea..ba60e2bd8a19 100644 --- a/framework/source/uielement/comboboxtoolbarcontroller.cxx +++ b/framework/source/uielement/comboboxtoolbarcontroller.cxx @@ -225,7 +225,7 @@ bool ComboboxToolbarController::PreNotify( NotifyEvent& rNEvt ) case EVENT_KEYINPUT : { const ::KeyEvent* pKeyEvent = rNEvt.GetKeyEvent(); - const KeyCode& rKeyCode = pKeyEvent->GetKeyCode(); + const vcl::KeyCode& rKeyCode = pKeyEvent->GetKeyCode(); if(( rKeyCode.GetModifier() | rKeyCode.GetCode()) == KEY_RETURN ) { // Call execute only with non-empty text diff --git a/framework/source/uielement/edittoolbarcontroller.cxx b/framework/source/uielement/edittoolbarcontroller.cxx index 5a6b6b9ae7ac..64d1d196ef16 100644 --- a/framework/source/uielement/edittoolbarcontroller.cxx +++ b/framework/source/uielement/edittoolbarcontroller.cxx @@ -189,7 +189,7 @@ bool EditToolbarController::PreNotify( NotifyEvent& rNEvt ) if( rNEvt.GetType() == EVENT_KEYINPUT ) { const ::KeyEvent* pKeyEvent = rNEvt.GetKeyEvent(); - const KeyCode& rKeyCode = pKeyEvent->GetKeyCode(); + const vcl::KeyCode& rKeyCode = pKeyEvent->GetKeyCode(); if(( rKeyCode.GetModifier() | rKeyCode.GetCode()) == KEY_RETURN ) { // Call execute only with non-empty text diff --git a/framework/source/uielement/menubarmanager.cxx b/framework/source/uielement/menubarmanager.cxx index 341225135ee2..48626c1794bd 100644 --- a/framework/source/uielement/menubarmanager.cxx +++ b/framework/source/uielement/menubarmanager.cxx @@ -835,7 +835,7 @@ IMPL_LINK( MenuBarManager, Activate, Menu *, pMenu ) // Only non-popup menu items can have a short-cut if ( pMenuItemHandler->aMenuItemURL == aCmdHelpIndex ) { - KeyCode aKeyCode( KEY_F1 ); + vcl::KeyCode aKeyCode( KEY_F1 ); pMenu->SetAccelKey( pMenuItemHandler->nItemId, aKeyCode ); } else if ( pMenu->GetPopupMenu( pMenuItemHandler->nItemId ) == 0 ) @@ -854,8 +854,8 @@ IMPL_LINK( MenuBarManager, Activate, Menu *, pMenu ) if ( xDispatchProvider.is() ) { - KeyCode aEmptyKeyCode; - SvtCommandOptions aCmdOptions; + vcl::KeyCode aEmptyKeyCode; + SvtCommandOptions aCmdOptions; std::vector< MenuItemHandler* >::iterator p; for ( p = m_aMenuItemHandlerVector.begin(); p != m_aMenuItemHandlerVector.end(); ++p ) { @@ -1407,7 +1407,7 @@ void MenuBarManager::FillMenuManager( Menu* pMenu, const Reference< XFrame >& rF // Only non-popup menu items can have a short-cut if ( pMenuItemHandler->aMenuItemURL == aCmdHelpIndex ) { - KeyCode aKeyCode( KEY_F1 ); + vcl::KeyCode aKeyCode( KEY_F1 ); pMenu->SetAccelKey( pMenuItemHandler->nItemId, aKeyCode ); } else if ( pMenu->GetPopupMenu( pMenuItemHandler->nItemId ) == 0 ) @@ -1524,7 +1524,7 @@ void MenuBarManager::RetrieveShortcuts( std::vector< MenuItemHandler* >& aMenuSh } } - KeyCode aEmptyKeyCode; + vcl::KeyCode aEmptyKeyCode; Sequence< OUString > aSeq( aMenuShortCuts.size() ); const sal_uInt32 nCount = aMenuShortCuts.size(); for ( sal_uInt32 i = 0; i < nCount; ++i ) diff --git a/framework/source/uielement/newmenucontroller.cxx b/framework/source/uielement/newmenucontroller.cxx index cbe08737a01a..fe473bc36324 100644 --- a/framework/source/uielement/newmenucontroller.cxx +++ b/framework/source/uielement/newmenucontroller.cxx @@ -113,7 +113,7 @@ void NewMenuController::setMenuImages( PopupMenu* pPopupMenu, bool bSetImages ) } } -void NewMenuController::determineAndSetNewDocAccel( PopupMenu* pPopupMenu, const KeyCode& rKeyCode ) +void NewMenuController::determineAndSetNewDocAccel( PopupMenu* pPopupMenu, const vcl::KeyCode& rKeyCode ) { sal_uInt16 nCount( pPopupMenu->GetItemCount() ); sal_uInt16 nId( 0 ); @@ -217,9 +217,9 @@ void NewMenuController::setAccelerators( PopupMenu* pPopupMenu ) } } - KeyCode aEmptyKeyCode; + vcl::KeyCode aEmptyKeyCode; sal_uInt32 nItemCount( pPopupMenu->GetItemCount() ); - std::vector< KeyCode > aMenuShortCuts; + std::vector< vcl::KeyCode > aMenuShortCuts; std::vector< OUString > aCmds; std::vector< sal_uInt32 > aIds; for ( sal_uInt32 i = 0; i < nItemCount; i++ ) @@ -275,7 +275,7 @@ void NewMenuController::setAccelerators( PopupMenu* pPopupMenu ) void NewMenuController::retrieveShortcutsFromConfiguration( const Reference< XAcceleratorConfiguration >& rAccelCfg, const Sequence< OUString >& rCommands, - std::vector< KeyCode >& aMenuShortCuts ) + std::vector< vcl::KeyCode >& aMenuShortCuts ) { if ( rAccelCfg.is() ) { diff --git a/framework/source/uielement/spinfieldtoolbarcontroller.cxx b/framework/source/uielement/spinfieldtoolbarcontroller.cxx index 093a082ebf91..ae4fba5d1095 100644 --- a/framework/source/uielement/spinfieldtoolbarcontroller.cxx +++ b/framework/source/uielement/spinfieldtoolbarcontroller.cxx @@ -311,7 +311,7 @@ bool SpinfieldToolbarController::PreNotify( NotifyEvent& rNEvt ) if( rNEvt.GetType() == EVENT_KEYINPUT ) { const ::KeyEvent* pKeyEvent = rNEvt.GetKeyEvent(); - const KeyCode& rKeyCode = pKeyEvent->GetKeyCode(); + const vcl::KeyCode& rKeyCode = pKeyEvent->GetKeyCode(); if(( rKeyCode.GetModifier() | rKeyCode.GetCode()) == KEY_RETURN ) { // Call execute only with non-empty text diff --git a/include/postx.h b/include/postx.h index a55b710e6cea..677af6876627 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 995e829b260f..6a0db3676e66 100644 --- a/include/prex.h +++ b/include/prex.h @@ -31,7 +31,6 @@ #define Icon HIDE_XLIB_Icon /* Types from 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 */ 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 e65547ede3e1..20b8a22633f8 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 8bd931e2bec1..82e324887a68 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 362d2c788f3b..2e6e26d3e9d1 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 e43c1b1aa138..9f7ab05f8ecf 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 20e80cf02eae..b7e745c365c9 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 d7b3550cfe4d..6642af32ddb6 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 -#include +#include +#include #include #include -#include +#include +#include #include -#include +#include #include #include @@ -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 65cc90ec17e9..ff42f32030b3 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 8b3ef420b17f..f4b7abc97d2c 100644 --- a/include/vcl/svapp.hxx +++ b/include/vcl/svapp.hxx @@ -36,6 +36,7 @@ #include #include #include +#include #include #include #include @@ -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 f3328e4fe441..68448933b830 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 5bea9c5d311d..686c97f9925c 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 7390352cb0fe..6f73a53e9b22 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 fde7caf0d79d..f4c457728e81 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 c94c27a9555b..b4e9de932b96 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 154eaf9c1b18..5fb908d71dee 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 087ad6e3fd3d..07067619fff9 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 3e5021943c57..8ba945766748 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 99ca3a6c0630..570117ea5caf 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 32c55ce6b2f5..eedd01e2b469 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 e8f4805de3ea..a9daa316b513 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 a094f2a21e34..705693441c6b 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 5b2cbc6a0b52..5001e1e843be 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 060b03405638..24eb276672c0 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 aef82de665ea..1a49040ffecf 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 61ac61fb3aaf..3e755930c139 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 72cf968d96cf..e42917a4d469 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 ee6d14a1cb1a..029eca29e968 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 70624af0cfb5..a2191840d5ae 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 e415d09d48ec..d17c24be4f73 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 2797222dd85e..3d682b4749b2 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 aNames = pDlg->GetSelectedNames(); if (!aNames.empty()) diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx index 48e82b69785c..e405524aa874 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 165e488d8cf3..88590de2b441 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 a642991cbabd..bd7d984e8d81 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 8bba5896dc18..0e24bc2dc173 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 197e952b1ef0..c29ac7daf37f 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 87e326d4b98c..2fc38495a3cb 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 eb868acb17b1..6f92ac9aa737 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 99446e92d7b9..c3bc421df3b7 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 9c6e530e0bc6..c9f0e31b2663 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 ab454a1809c9..4cbe097eca8b 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 f12799583fc4..39228ef29f6e 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 cafa2da771b7..2b4ca731a409 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 7fed4902be13..2904dd56767c 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 +#include #include -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 85c67010f317..0da6c42d5874 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 f9340b08ea56..77ebf9616f89 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 e3b4aa7a7522..8e8b35ee978a 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 440eaf748b77..23de40151bbf 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 a10c8a82b3c6..188ef595d6ec 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 == or Forward == - 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 53bb10c23fbf..01dfbb8922b1 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 0f93b77e1c2e..5c9a20b8dc32 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 c23521c47f84..b2e44621a527 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 60ab3fde3f95..1e6c4c82d534 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 35565df6ca58..7b022d35f825 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 d1128aa23f1e..503d0ddc6518 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 0b12d607ee40..244fc9413412 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 23f2f5280043..d0d9c2c2a5b2 100644 --- a/sfx2/source/sidebar/FocusManager.hxx +++ b/sfx2/source/sidebar/FocusManager.hxx @@ -21,12 +21,11 @@ #include "Panel.hxx" #include +#include 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 13988ce97cfe..da54a710f408 100644 --- a/svtools/source/brwbox/ebbcontrols.cxx +++ b/svtools/source/brwbox/ebbcontrols.cxx @@ -58,7 +58,7 @@ namespace svt if (!IsInDropDown()) { const KeyEvent *pEvt = rNEvt.GetKeyEvent(); - const KeyCode rKey = pEvt->GetKeyCode(); + const vcl::KeyCode rKey = pEvt->GetKeyCode(); if ((rKey.GetCode() == KEY_UP || rKey.GetCode() == KEY_DOWN) && (!pEvt->GetKeyCode().IsShift() && pEvt->GetKeyCode().IsMod1())) @@ -166,7 +166,7 @@ namespace svt if (!IsInDropDown()) { const KeyEvent *pEvt = rNEvt.GetKeyEvent(); - const KeyCode rKey = pEvt->GetKeyCode(); + const vcl::KeyCode rKey = pEvt->GetKeyCode(); if ((rKey.GetCode() == KEY_UP || rKey.GetCode() == KEY_DOWN) && (!pEvt->GetKeyCode().IsShift() && pEvt->GetKeyCode().IsMod1())) @@ -583,13 +583,13 @@ namespace svt // which is used by both the text view and the edit browse box const KeyEvent* pKeyEvent = rNEvt.GetKeyEvent(); - const KeyCode& rKeyCode = pKeyEvent->GetKeyCode(); + const vcl::KeyCode& rKeyCode = pKeyEvent->GetKeyCode(); sal_uInt16 nCode = rKeyCode.GetCode(); if ( ( nCode == KEY_RETURN ) && ( rKeyCode.GetModifier() == KEY_MOD1 ) ) { KeyEvent aEvent( pKeyEvent->GetCharCode(), - KeyCode( KEY_RETURN ), + vcl::KeyCode( KEY_RETURN ), pKeyEvent->GetRepeat() ); if ( dispatchKeyEvent( aEvent ) ) diff --git a/svtools/source/contnr/fileview.cxx b/svtools/source/contnr/fileview.cxx index 81bf2dba6a09..24c08b01bb2b 100644 --- a/svtools/source/contnr/fileview.cxx +++ b/svtools/source/contnr/fileview.cxx @@ -717,7 +717,7 @@ void ViewTabListBox_Impl::KeyInput( const KeyEvent& rKEvt ) { bool bHandled = false; - const KeyCode& rKeyCode = rKEvt.GetKeyCode(); + const vcl::KeyCode& rKeyCode = rKEvt.GetKeyCode(); if ( 0 == rKeyCode.GetModifier() ) { if ( rKeyCode.GetCode() == KEY_RETURN ) diff --git a/svtools/source/contnr/imivctl1.cxx b/svtools/source/contnr/imivctl1.cxx index 6b00f95824b7..adc522973a67 100644 --- a/svtools/source/contnr/imivctl1.cxx +++ b/svtools/source/contnr/imivctl1.cxx @@ -3306,8 +3306,8 @@ IcnViewEdit_Impl::IcnViewEdit_Impl( SvtIconChoiceCtrl* pParent, const Point& rPo SetText( rData ); SaveValue(); - aAccReturn.InsertItem( IMPICNVIEW_ACC_RETURN, KeyCode(KEY_RETURN) ); - aAccEscape.InsertItem( IMPICNVIEW_ACC_ESCAPE, KeyCode(KEY_ESCAPE) ); + aAccReturn.InsertItem( IMPICNVIEW_ACC_RETURN, vcl::KeyCode(KEY_RETURN) ); + aAccEscape.InsertItem( IMPICNVIEW_ACC_ESCAPE, vcl::KeyCode(KEY_ESCAPE) ); aAccReturn.SetActivateHdl( LINK( this, IcnViewEdit_Impl, ReturnHdl_Impl) ); aAccEscape.SetActivateHdl( LINK( this, IcnViewEdit_Impl, EscapeHdl_Impl) ); @@ -3363,7 +3363,7 @@ IMPL_LINK( IcnViewEdit_Impl, EscapeHdl_Impl, Accelerator*, EMPTYARG ) void IcnViewEdit_Impl::KeyInput( const KeyEvent& rKEvt ) { - KeyCode aCode = rKEvt.GetKeyCode(); + vcl::KeyCode aCode = rKEvt.GetKeyCode(); sal_uInt16 nCode = aCode.GetCode(); switch ( nCode ) diff --git a/svtools/source/contnr/simptabl.cxx b/svtools/source/contnr/simptabl.cxx index 62e275c15a93..05a155612f4d 100644 --- a/svtools/source/contnr/simptabl.cxx +++ b/svtools/source/contnr/simptabl.cxx @@ -48,7 +48,7 @@ bool SvSimpleTableContainer::PreNotify( NotifyEvent& rNEvt ) bool nResult = true; if ( rNEvt.GetType() == EVENT_KEYINPUT ) { - const KeyCode& aKeyCode = rNEvt.GetKeyEvent()->GetKeyCode(); + const vcl::KeyCode& aKeyCode = rNEvt.GetKeyEvent()->GetKeyCode(); sal_uInt16 nKey = aKeyCode.GetCode(); if (nKey == KEY_TAB) GetParent()->Notify( rNEvt ); diff --git a/svtools/source/contnr/svimpbox.cxx b/svtools/source/contnr/svimpbox.cxx index a04856cb7a3c..99ca76f95dcf 100644 --- a/svtools/source/contnr/svimpbox.cxx +++ b/svtools/source/contnr/svimpbox.cxx @@ -2143,7 +2143,7 @@ void SvImpLBox::MouseMove( const MouseEvent& rMEvt) bool SvImpLBox::KeyInput( const KeyEvent& rKEvt) { aEditTimer.Stop(); - const KeyCode& rKeyCode = rKEvt.GetKeyCode(); + const vcl::KeyCode& rKeyCode = rKEvt.GetKeyCode(); if( rKeyCode.IsMod2() ) return false; // don't evaluate Alt key diff --git a/svtools/source/contnr/templwin.cxx b/svtools/source/contnr/templwin.cxx index 13c9c0507914..557756e88ac1 100644 --- a/svtools/source/contnr/templwin.cxx +++ b/svtools/source/contnr/templwin.cxx @@ -1117,7 +1117,7 @@ bool SvtTemplateWindow::PreNotify( NotifyEvent& rNEvt ) if ( EVENT_KEYINPUT == nType && rNEvt.GetKeyEvent() ) { - const KeyCode& rKeyCode = rNEvt.GetKeyEvent()->GetKeyCode(); + const vcl::KeyCode& rKeyCode = rNEvt.GetKeyEvent()->GetKeyCode(); sal_uInt16 nCode = rKeyCode.GetCode(); if ( KEY_BACKSPACE == nCode && !rKeyCode.GetModifier() && pFileWin->HasChildPathFocus() ) diff --git a/svtools/source/contnr/treelistbox.cxx b/svtools/source/contnr/treelistbox.cxx index 2f6bc55d6b95..e165ace86b84 100644 --- a/svtools/source/contnr/treelistbox.cxx +++ b/svtools/source/contnr/treelistbox.cxx @@ -147,8 +147,8 @@ SvInplaceEdit2::SvInplaceEdit2 pEdit->SetSelection( rSelection ); pEdit->SaveValue(); - aAccReturn.InsertItem( SVLBOX_ACC_RETURN, KeyCode(KEY_RETURN) ); - aAccEscape.InsertItem( SVLBOX_ACC_ESCAPE, KeyCode(KEY_ESCAPE) ); + aAccReturn.InsertItem( SVLBOX_ACC_RETURN, vcl::KeyCode(KEY_RETURN) ); + aAccEscape.InsertItem( SVLBOX_ACC_ESCAPE, vcl::KeyCode(KEY_ESCAPE) ); aAccReturn.SetActivateHdl( LINK( this, SvInplaceEdit2, ReturnHdl_Impl) ); aAccEscape.SetActivateHdl( LINK( this, SvInplaceEdit2, EscapeHdl_Impl) ); @@ -199,7 +199,7 @@ IMPL_LINK_NOARG_INLINE_END(SvInplaceEdit2, EscapeHdl_Impl) bool SvInplaceEdit2::KeyInput( const KeyEvent& rKEvt ) { - KeyCode aCode = rKEvt.GetKeyCode(); + vcl::KeyCode aCode = rKEvt.GetKeyCode(); sal_uInt16 nCode = aCode.GetCode(); switch ( nCode ) diff --git a/svtools/source/control/inettbc.cxx b/svtools/source/control/inettbc.cxx index ff00562e5734..e8e4d1c07b74 100644 --- a/svtools/source/control/inettbc.cxx +++ b/svtools/source/control/inettbc.cxx @@ -1007,7 +1007,7 @@ void SvtURLBox::UpdatePicklistForSmartProtocol_Impl() } -bool SvtURLBox::ProcessKey( const KeyCode& rKey ) +bool SvtURLBox::ProcessKey( const vcl::KeyCode& rKey ) { // every key input stops the current matching thread if( pCtx.is() ) @@ -1017,7 +1017,7 @@ bool SvtURLBox::ProcessKey( const KeyCode& rKey ) pCtx.clear(); } - KeyCode aCode( rKey.GetCode() ); + vcl::KeyCode aCode( rKey.GetCode() ); if ( aCode == KEY_RETURN && !GetText().isEmpty() ) { // wait for completion of matching thread @@ -1100,8 +1100,8 @@ bool SvtURLBox::PreNotify( NotifyEvent& rNEvt ) { const KeyEvent& rEvent = *rNEvt.GetKeyEvent(); - const KeyCode& rKey = rEvent.GetKeyCode(); - KeyCode aCode( rKey.GetCode() ); + const vcl::KeyCode& rKey = rEvent.GetKeyCode(); + vcl::KeyCode aCode( rKey.GetCode() ); if( ProcessKey( rKey ) ) { return true; diff --git a/svtools/source/dialogs/wizdlg.cxx b/svtools/source/dialogs/wizdlg.cxx index 9ad0dfeb2d44..eba9962d71f1 100644 --- a/svtools/source/dialogs/wizdlg.cxx +++ b/svtools/source/dialogs/wizdlg.cxx @@ -432,8 +432,8 @@ bool WizardDialog::Notify( NotifyEvent& rNEvt ) if ( (rNEvt.GetType() == EVENT_KEYINPUT) && mpPrevBtn && mpNextBtn ) { const KeyEvent* pKEvt = rNEvt.GetKeyEvent(); - KeyCode aKeyCode = pKEvt->GetKeyCode(); - sal_uInt16 nKeyCode = aKeyCode.GetCode(); + vcl::KeyCode aKeyCode = pKEvt->GetKeyCode(); + sal_uInt16 nKeyCode = aKeyCode.GetCode(); if ( aKeyCode.IsMod1() ) { diff --git a/svtools/source/misc/acceleratorexecute.cxx b/svtools/source/misc/acceleratorexecute.cxx index 83348b1a779b..8d8ebc94e89a 100644 --- a/svtools/source/misc/acceleratorexecute.cxx +++ b/svtools/source/misc/acceleratorexecute.cxx @@ -169,7 +169,7 @@ void AcceleratorExecute::init(const css::uno::Reference< css::uno::XComponentCon } -bool AcceleratorExecute::execute(const KeyCode& aVCLKey) +bool AcceleratorExecute::execute(const vcl::KeyCode& aVCLKey) { css::awt::KeyEvent aAWTKey = AcceleratorExecute::st_VCLKey2AWTKey(aVCLKey); return execute(aAWTKey); @@ -212,7 +212,7 @@ bool AcceleratorExecute::execute(const css::awt::KeyEvent& aAWTKey) } -css::awt::KeyEvent AcceleratorExecute::st_VCLKey2AWTKey(const KeyCode& aVCLKey) +css::awt::KeyEvent AcceleratorExecute::st_VCLKey2AWTKey(const vcl::KeyCode& aVCLKey) { css::awt::KeyEvent aAWTKey; aAWTKey.Modifiers = 0; @@ -230,7 +230,7 @@ css::awt::KeyEvent AcceleratorExecute::st_VCLKey2AWTKey(const KeyCode& aVCLKey) } -KeyCode AcceleratorExecute::st_AWTKey2VCLKey(const css::awt::KeyEvent& aAWTKey) +vcl::KeyCode AcceleratorExecute::st_AWTKey2VCLKey(const css::awt::KeyEvent& aAWTKey) { bool bShift = ((aAWTKey.Modifiers & css::awt::KeyModifier::SHIFT) == css::awt::KeyModifier::SHIFT ); bool bMod1 = ((aAWTKey.Modifiers & css::awt::KeyModifier::MOD1 ) == css::awt::KeyModifier::MOD1 ); @@ -238,7 +238,7 @@ KeyCode AcceleratorExecute::st_AWTKey2VCLKey(const css::awt::KeyEvent& aAWTKey) bool bMod3 = ((aAWTKey.Modifiers & css::awt::KeyModifier::MOD3 ) == css::awt::KeyModifier::MOD3 ); sal_uInt16 nKey = (sal_uInt16)aAWTKey.KeyCode; - return KeyCode(nKey, bShift, bMod1, bMod2, bMod3); + return vcl::KeyCode(nKey, bShift, bMod1, bMod2, bMod3); } OUString AcceleratorExecute::findCommand(const css::awt::KeyEvent& aKey) diff --git a/svtools/source/table/defaultinputhandler.cxx b/svtools/source/table/defaultinputhandler.cxx index 292121eefb6f..cfa98ea8c4f9 100644 --- a/svtools/source/table/defaultinputhandler.cxx +++ b/svtools/source/table/defaultinputhandler.cxx @@ -138,7 +138,7 @@ namespace svt { namespace table { bool bHandled = false; - const KeyCode& rKeyCode = rKEvt.GetKeyCode(); + const vcl::KeyCode& rKeyCode = rKEvt.GetKeyCode(); sal_uInt16 nKeyCode = rKeyCode.GetCode(); struct _ActionMapEntry diff --git a/svtools/source/toolpanel/drawerlayouter.cxx b/svtools/source/toolpanel/drawerlayouter.cxx index 97ff39552519..d8abf3395315 100644 --- a/svtools/source/toolpanel/drawerlayouter.cxx +++ b/svtools/source/toolpanel/drawerlayouter.cxx @@ -256,7 +256,7 @@ namespace svt { const KeyEvent* pKeyEvent = static_cast< const KeyEvent* >( pWindowEvent->GetData() ); ENSURE_OR_RETURN( pKeyEvent, "no key event with KeyInput", 0L ); - const KeyCode& rKeyCode( pKeyEvent->GetKeyCode() ); + const vcl::KeyCode& rKeyCode( pKeyEvent->GetKeyCode() ); if ( ( rKeyCode.GetModifier() == 0 ) && ( rKeyCode.GetCode() == KEY_RETURN ) ) { bActivatePanel = true; diff --git a/svtools/source/toolpanel/paneltabbar.cxx b/svtools/source/toolpanel/paneltabbar.cxx index f5e449ec08bd..f955f2fe365e 100644 --- a/svtools/source/toolpanel/paneltabbar.cxx +++ b/svtools/source/toolpanel/paneltabbar.cxx @@ -1236,7 +1236,7 @@ namespace svt { KeyInputHandler aKeyInputHandler( *this, i_rKeyEvent ); - const KeyCode& rKeyCode( i_rKeyEvent.GetKeyCode() ); + const vcl::KeyCode& rKeyCode( i_rKeyEvent.GetKeyCode() ); if ( rKeyCode.GetModifier() != 0 ) // only interested in mere key presses return; diff --git a/svtools/source/toolpanel/toolpaneldeck.cxx b/svtools/source/toolpanel/toolpaneldeck.cxx index 1cce8c97e1ad..272a0d7d0f4b 100644 --- a/svtools/source/toolpanel/toolpaneldeck.cxx +++ b/svtools/source/toolpanel/toolpaneldeck.cxx @@ -450,7 +450,7 @@ namespace svt if ( i_rNotifyEvent.GetType() == EVENT_KEYINPUT ) { const KeyEvent* pEvent = i_rNotifyEvent.GetKeyEvent(); - const KeyCode& rKeyCode = pEvent->GetKeyCode(); + const vcl::KeyCode& rKeyCode = pEvent->GetKeyCode(); if ( rKeyCode.GetModifier() == KEY_MOD1 ) { bHandled = true; diff --git a/svx/source/dialog/_bmpmask.cxx b/svx/source/dialog/_bmpmask.cxx index c39bfbbda0cc..aca2ea65e989 100644 --- a/svx/source/dialog/_bmpmask.cxx +++ b/svx/source/dialog/_bmpmask.cxx @@ -124,7 +124,7 @@ void MaskSet::GetFocus() void MaskSet::KeyInput( const KeyEvent& rKEvt ) { - KeyCode aCode = rKEvt.GetKeyCode(); + vcl::KeyCode aCode = rKEvt.GetKeyCode(); // if the key has a modifier we don't care if( aCode.GetModifier() ) diff --git a/svx/source/dialog/charmap.cxx b/svx/source/dialog/charmap.cxx index 0903a3259115..81c42a16454c 100644 --- a/svx/source/dialog/charmap.cxx +++ b/svx/source/dialog/charmap.cxx @@ -251,7 +251,7 @@ int SvxShowCharSet::PixelToMapIndex( const Point& point) const void SvxShowCharSet::KeyInput( const KeyEvent& rKEvt ) { - KeyCode aCode = rKEvt.GetKeyCode(); + vcl::KeyCode aCode = rKEvt.GetKeyCode(); if( aCode.GetModifier() ) { diff --git a/svx/source/dialog/checklbx.cxx b/svx/source/dialog/checklbx.cxx index 0180643b9af5..a3738c97ae13 100644 --- a/svx/source/dialog/checklbx.cxx +++ b/svx/source/dialog/checklbx.cxx @@ -221,7 +221,7 @@ void SvxCheckListBox::MouseButtonDown( const MouseEvent& rMEvt ) void SvxCheckListBox::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/svx/source/dialog/dialcontrol.cxx b/svx/source/dialog/dialcontrol.cxx index d8da2985b566..5b270e680b51 100644 --- a/svx/source/dialog/dialcontrol.cxx +++ b/svx/source/dialog/dialcontrol.cxx @@ -353,7 +353,7 @@ void DialControl::MouseButtonUp( const MouseEvent& rMEvt ) void DialControl::KeyInput( const KeyEvent& rKEvt ) { - const KeyCode& rKCode = rKEvt.GetKeyCode(); + const vcl::KeyCode& rKCode = rKEvt.GetKeyCode(); if( !rKCode.GetModifier() && (rKCode.GetCode() == KEY_ESCAPE) ) HandleEscapeEvent(); else diff --git a/svx/source/dialog/dlgctl3d.cxx b/svx/source/dialog/dlgctl3d.cxx index d0bfeb33d2a6..a7a2d3121af7 100644 --- a/svx/source/dialog/dlgctl3d.cxx +++ b/svx/source/dialog/dlgctl3d.cxx @@ -1108,7 +1108,7 @@ void SvxLightCtl3D::move( double fDeltaHor, double fDeltaVer ) void SvxLightCtl3D::KeyInput( const KeyEvent& rKEvt ) { - const KeyCode aCode(rKEvt.GetKeyCode()); + const vcl::KeyCode aCode(rKEvt.GetKeyCode()); if( aCode.GetModifier() ) { diff --git a/svx/source/dialog/dlgctrl.cxx b/svx/source/dialog/dlgctrl.cxx index 79c2176acd66..b8b677c12e6b 100644 --- a/svx/source/dialog/dlgctrl.cxx +++ b/svx/source/dialog/dlgctrl.cxx @@ -953,7 +953,7 @@ Rectangle SvxPixelCtl::implCalFocusRect( const Point& aPosition ) //Solution:Keyboard function void SvxPixelCtl::KeyInput( const KeyEvent& rKEvt ) { - KeyCode aKeyCode = rKEvt.GetKeyCode(); + vcl::KeyCode aKeyCode = rKEvt.GetKeyCode(); sal_uInt16 nCode = aKeyCode.GetCode(); bool bIsMod = aKeyCode.IsShift() || aKeyCode.IsMod1() || aKeyCode.IsMod2(); diff --git a/svx/source/dialog/frmsel.cxx b/svx/source/dialog/frmsel.cxx index 3a8b0e32a7ed..e72575baa366 100644 --- a/svx/source/dialog/frmsel.cxx +++ b/svx/source/dialog/frmsel.cxx @@ -1136,7 +1136,7 @@ void FrameSelector::MouseButtonDown( const MouseEvent& rMEvt ) void FrameSelector::KeyInput( const KeyEvent& rKEvt ) { bool bHandled = false; - KeyCode aKeyCode = rKEvt.GetKeyCode(); + vcl::KeyCode aKeyCode = rKEvt.GetKeyCode(); if( !aKeyCode.GetModifier() ) { sal_uInt16 nCode = aKeyCode.GetCode(); diff --git a/svx/source/dialog/graphctl.cxx b/svx/source/dialog/graphctl.cxx index 8e6316c37df5..f11e6892db23 100644 --- a/svx/source/dialog/graphctl.cxx +++ b/svx/source/dialog/graphctl.cxx @@ -305,7 +305,7 @@ void GraphCtrl::MarkListHasChanged() void GraphCtrl::KeyInput( const KeyEvent& rKEvt ) { - KeyCode aCode( rKEvt.GetKeyCode() ); + vcl::KeyCode aCode( rKEvt.GetKeyCode() ); bool bProc = false; Dialog* pDialog = GetParentDialog(); diff --git a/svx/source/dialog/rubydialog.cxx b/svx/source/dialog/rubydialog.cxx index cb6898a77225..5e71d5015d90 100644 --- a/svx/source/dialog/rubydialog.cxx +++ b/svx/source/dialog/rubydialog.cxx @@ -893,7 +893,7 @@ bool RubyEdit::PreNotify( NotifyEvent& rNEvt ) if ( rNEvt.GetType() == EVENT_KEYINPUT ) { const KeyEvent* pKEvt = rNEvt.GetKeyEvent(); - const KeyCode& rKeyCode = pKEvt->GetKeyCode(); + const vcl::KeyCode& rKeyCode = pKEvt->GetKeyCode(); sal_uInt16 nMod = rKeyCode.GetModifier(); sal_uInt16 nCode = rKeyCode.GetCode(); if( nCode == KEY_TAB && (!nMod || KEY_SHIFT == nMod)) diff --git a/svx/source/fmcomp/fmgridcl.cxx b/svx/source/fmcomp/fmgridcl.cxx index 2a585d50136b..8d4fee971643 100644 --- a/svx/source/fmcomp/fmgridcl.cxx +++ b/svx/source/fmcomp/fmgridcl.cxx @@ -2008,7 +2008,7 @@ void FmGridControl::Select() void FmGridControl::KeyInput( const KeyEvent& rKEvt ) { bool bDone = false; - const KeyCode& rKeyCode = rKEvt.GetKeyCode(); + const vcl::KeyCode& rKeyCode = rKEvt.GetKeyCode(); if ( IsDesignMode() && !rKeyCode.IsShift() && !rKeyCode.IsMod1() diff --git a/svx/source/fmcomp/gridctrl.cxx b/svx/source/fmcomp/gridctrl.cxx index f991024fb783..bbe947224c58 100644 --- a/svx/source/fmcomp/gridctrl.cxx +++ b/svx/source/fmcomp/gridctrl.cxx @@ -3205,7 +3205,7 @@ bool DbGridControl::PreNotify(NotifyEvent& rEvt) // Ctrl-Tab is used to step out of the control, without traveling to the // remaining cells first // -> 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 ); // call the Control - our direct base class will interpret this in a way we do not want (and do diff --git a/svx/source/form/filtnav.cxx b/svx/source/form/filtnav.cxx index 7de8f32a1730..4b1b2dd5b30e 100644 --- a/svx/source/form/filtnav.cxx +++ b/svx/source/form/filtnav.cxx @@ -1766,7 +1766,7 @@ SvTreeListEntry* FmFilterNavigator::getPrevEntry(SvTreeListEntry* _pStartWith) void FmFilterNavigator::KeyInput(const KeyEvent& rKEvt) { - const KeyCode& rKeyCode = rKEvt.GetKeyCode(); + const vcl::KeyCode& rKeyCode = rKEvt.GetKeyCode(); switch ( rKeyCode.GetCode() ) { diff --git a/svx/source/form/fmview.cxx b/svx/source/form/fmview.cxx index 702fd00ef0c1..343c624c6f17 100644 --- a/svx/source/form/fmview.cxx +++ b/svx/source/form/fmview.cxx @@ -486,7 +486,7 @@ void FmFormView::EndCompleteRedraw( SdrPaintWindow& rPaintWindow, bool bPaintFor bool FmFormView::KeyInput(const KeyEvent& rKEvt, Window* pWin) { bool bDone = false; - const KeyCode& rKeyCode = rKEvt.GetKeyCode(); + const vcl::KeyCode& rKeyCode = rKEvt.GetKeyCode(); if ( IsDesignMode() && rKeyCode.GetCode() == KEY_RETURN ) diff --git a/svx/source/form/navigatortree.cxx b/svx/source/form/navigatortree.cxx index 80298a70c78f..187a1cb7af17 100644 --- a/svx/source/form/navigatortree.cxx +++ b/svx/source/form/navigatortree.cxx @@ -1273,7 +1273,7 @@ namespace svxform void NavigatorTree::KeyInput(const ::KeyEvent& rKEvt) { - const KeyCode& rCode = rKEvt.GetKeyCode(); + const vcl::KeyCode& rCode = rKEvt.GetKeyCode(); // delete? if (rKEvt.GetKeyCode().GetCode() == KEY_DELETE && !rKEvt.GetKeyCode().GetModifier()) diff --git a/svx/source/form/tabwin.cxx b/svx/source/form/tabwin.cxx index adcda345e5f8..a5c524b985b1 100644 --- a/svx/source/form/tabwin.cxx +++ b/svx/source/form/tabwin.cxx @@ -247,7 +247,7 @@ bool FmFieldWin::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 ( createSelectionControls() ) diff --git a/svx/source/svdraw/svdview.cxx b/svx/source/svdraw/svdview.cxx index dbaee9279103..b981adfc882d 100644 --- a/svx/source/svdraw/svdview.cxx +++ b/svx/source/svdraw/svdview.cxx @@ -1386,7 +1386,7 @@ void SdrView::DeleteMarked() { if (IsTextEdit()) { - SdrObjEditView::KeyInput(KeyEvent(0,KeyCode(KEYFUNC_DELETE)),pTextEditWin); + SdrObjEditView::KeyInput(KeyEvent(0,vcl::KeyCode(KEYFUNC_DELETE)),pTextEditWin); } else { diff --git a/svx/source/tbxctrls/itemwin.cxx b/svx/source/tbxctrls/itemwin.cxx index acf76892d0bc..f40bf9a53aa5 100644 --- a/svx/source/tbxctrls/itemwin.cxx +++ b/svx/source/tbxctrls/itemwin.cxx @@ -371,7 +371,7 @@ bool SvxMetricField::Notify( NotifyEvent& rNEvt ) if ( rNEvt.GetType() == EVENT_KEYINPUT ) { const KeyEvent* pKEvt = rNEvt.GetKeyEvent(); - const KeyCode& rKey = pKEvt->GetKeyCode(); + const vcl::KeyCode& rKey = pKEvt->GetKeyCode(); SfxViewShell* pSh = SfxViewShell::Current(); if ( rKey.GetModifier() && rKey.GetGroup() != KEYGROUP_CURSOR && pSh ) diff --git a/sw/inc/IDocumentMarkAccess.hxx b/sw/inc/IDocumentMarkAccess.hxx index c565a91c18ba..ba6e24779080 100644 --- a/sw/inc/IDocumentMarkAccess.hxx +++ b/sw/inc/IDocumentMarkAccess.hxx @@ -25,7 +25,6 @@ #include class SwPaM; -class KeyCode; struct SwPosition; class SwTxtNode; diff --git a/sw/inc/IMark.hxx b/sw/inc/IMark.hxx index 13c1e00ffff2..47bab9c37442 100644 --- a/sw/inc/IMark.hxx +++ b/sw/inc/IMark.hxx @@ -75,9 +75,9 @@ namespace sw { namespace mark { public: virtual const OUString& GetShortName() const =0; - virtual const KeyCode& GetKeyCode() const =0; + virtual const vcl::KeyCode& GetKeyCode() const =0; virtual void SetShortName(const OUString&) =0; - virtual void SetKeyCode(const KeyCode&) =0; + virtual void SetKeyCode(const vcl::KeyCode&) =0; }; class SW_DLLPUBLIC IFieldmark diff --git a/sw/inc/crsrsh.hxx b/sw/inc/crsrsh.hxx index a7f9b1f0a9e7..93083005e06f 100644 --- a/sw/inc/crsrsh.hxx +++ b/sw/inc/crsrsh.hxx @@ -24,6 +24,7 @@ #include #include #include +#include #include #include "swdllapi.h" @@ -38,7 +39,6 @@ #include #include -class KeyCode; class SfxItemSet; class SfxPoolItem; class SwCntntFrm; @@ -559,7 +559,7 @@ public: // at CurCrsr.SPoint ::sw::mark::IMark* SetBookmark( - const KeyCode&, + const vcl::KeyCode&, const OUString& rName, const OUString& rShortName, IDocumentMarkAccess::MarkType eMark = IDocumentMarkAccess::BOOKMARK); diff --git a/sw/inc/doc.hxx b/sw/inc/doc.hxx index 2ff506bbaa52..a1d6236cc9b5 100644 --- a/sw/inc/doc.hxx +++ b/sw/inc/doc.hxx @@ -62,7 +62,6 @@ class DateTime; class EditFieldInfo; class JobSetup; class Color; -class KeyCode; class Outliner; class OutputDevice; class Point; diff --git a/sw/source/core/crsr/bookmrk.cxx b/sw/source/core/crsr/bookmrk.cxx index 8284ec0ca01e..588283e0c416 100644 --- a/sw/source/core/crsr/bookmrk.cxx +++ b/sw/source/core/crsr/bookmrk.cxx @@ -248,7 +248,7 @@ namespace sw { namespace mark } Bookmark::Bookmark(const SwPaM& aPaM, - const KeyCode& rCode, + const vcl::KeyCode& rCode, const OUString& rName, const OUString& rShortName) : DdeBookmark(aPaM) diff --git a/sw/source/core/crsr/crbm.cxx b/sw/source/core/crsr/crbm.cxx index 219d8607b0d1..30031ae971c6 100644 --- a/sw/source/core/crsr/crbm.cxx +++ b/sw/source/core/crsr/crbm.cxx @@ -80,7 +80,7 @@ namespace // at CurCrsr.SPoint ::sw::mark::IMark* SwCrsrShell::SetBookmark( - const KeyCode& rCode, + const vcl::KeyCode& rCode, const OUString& rName, const OUString& rShortName, IDocumentMarkAccess::MarkType eMark) diff --git a/sw/source/core/crsr/crossrefbookmark.cxx b/sw/source/core/crsr/crossrefbookmark.cxx index 89c5471e6a1d..269af4e5f2cb 100644 --- a/sw/source/core/crsr/crossrefbookmark.cxx +++ b/sw/source/core/crsr/crossrefbookmark.cxx @@ -33,7 +33,7 @@ namespace namespace sw { namespace mark { CrossRefBookmark::CrossRefBookmark(const SwPaM& rPaM, - const KeyCode& rCode, + const vcl::KeyCode& rCode, const OUString& rName, const OUString& rShortName, const OUString& rPrefix) @@ -67,7 +67,7 @@ namespace sw { namespace mark } CrossRefHeadingBookmark::CrossRefHeadingBookmark(const SwPaM& rPaM, - const KeyCode& rCode, + const vcl::KeyCode& rCode, const OUString& rName, const OUString& rShortName) : CrossRefBookmark(rPaM, rCode, rName, rShortName, IDocumentMarkAccess::GetCrossRefHeadingBookmarkNamePrefix()) @@ -79,7 +79,7 @@ namespace sw { namespace mark } CrossRefNumItemBookmark::CrossRefNumItemBookmark(const SwPaM& rPaM, - const KeyCode& rCode, + const vcl::KeyCode& rCode, const OUString& rName, const OUString& rShortName) : CrossRefBookmark(rPaM, rCode, rName, rShortName, IDocumentMarkAccess::GetCrossRefHeadingBookmarkNamePrefix()) diff --git a/sw/source/core/doc/docbm.cxx b/sw/source/core/doc/docbm.cxx index 68499060670c..4a04d1dc6a79 100644 --- a/sw/source/core/doc/docbm.cxx +++ b/sw/source/core/doc/docbm.cxx @@ -396,16 +396,16 @@ namespace sw { namespace mark pMark = boost::shared_ptr(new NavigatorReminder(rPaM)); break; case IDocumentMarkAccess::BOOKMARK: - pMark = boost::shared_ptr(new Bookmark(rPaM, KeyCode(), rName, OUString())); + pMark = boost::shared_ptr(new Bookmark(rPaM, vcl::KeyCode(), rName, OUString())); break; case IDocumentMarkAccess::DDE_BOOKMARK: pMark = boost::shared_ptr(new DdeBookmark(rPaM)); break; case IDocumentMarkAccess::CROSSREF_HEADING_BOOKMARK: - pMark = boost::shared_ptr(new CrossRefHeadingBookmark(rPaM, KeyCode(), rName, OUString())); + pMark = boost::shared_ptr(new CrossRefHeadingBookmark(rPaM, vcl::KeyCode(), rName, OUString())); break; case IDocumentMarkAccess::CROSSREF_NUMITEM_BOOKMARK: - pMark = boost::shared_ptr(new CrossRefNumItemBookmark(rPaM, KeyCode(), rName, OUString())); + pMark = boost::shared_ptr(new CrossRefNumItemBookmark(rPaM, vcl::KeyCode(), rName, OUString())); break; case IDocumentMarkAccess::UNO_BOOKMARK: pMark = boost::shared_ptr(new UnoMark(rPaM)); diff --git a/sw/source/core/inc/bookmrk.hxx b/sw/source/core/inc/bookmrk.hxx index 5b5e6e62f610..b5eef562e59a 100644 --- a/sw/source/core/inc/bookmrk.hxx +++ b/sw/source/core/inc/bookmrk.hxx @@ -22,6 +22,7 @@ #include #include +#include #include #include #include @@ -165,18 +166,18 @@ namespace sw { { public: Bookmark(const SwPaM& rPaM, - const KeyCode& rCode, + const vcl::KeyCode& rCode, const OUString& rName, const OUString& rShortName); virtual void InitDoc(SwDoc* const io_Doc) SAL_OVERRIDE; virtual const OUString& GetShortName() const SAL_OVERRIDE { return m_sShortName; } - virtual const KeyCode& GetKeyCode() const SAL_OVERRIDE + virtual const vcl::KeyCode& GetKeyCode() const SAL_OVERRIDE { return m_aCode; } virtual void SetShortName(const OUString& rShortName) SAL_OVERRIDE { m_sShortName = rShortName; } - virtual void SetKeyCode(const KeyCode& rCode) SAL_OVERRIDE + virtual void SetKeyCode(const vcl::KeyCode& rCode) SAL_OVERRIDE { m_aCode = rCode; } // ::sfx2::Metadatable @@ -188,7 +189,7 @@ namespace sw { ::com::sun::star::rdf::XMetadatable > MakeUnoObject() SAL_OVERRIDE; private: - KeyCode m_aCode; + vcl::KeyCode m_aCode; OUString m_sShortName; }; diff --git a/sw/source/core/inc/crossrefbookmark.hxx b/sw/source/core/inc/crossrefbookmark.hxx index b43775de0f78..1b8c2b10db82 100644 --- a/sw/source/core/inc/crossrefbookmark.hxx +++ b/sw/source/core/inc/crossrefbookmark.hxx @@ -23,6 +23,7 @@ #include #include #include +#include namespace sw { namespace mark { @@ -31,7 +32,7 @@ namespace sw { { public: CrossRefBookmark(const SwPaM& rPaM, - const KeyCode& rCode, + const vcl::KeyCode& rCode, const OUString& rName, const OUString& rShortName, const OUString& rPrefix); @@ -65,7 +66,7 @@ namespace sw { { public: CrossRefHeadingBookmark(const SwPaM& rPaM, - const KeyCode& rCode, + const vcl::KeyCode& rCode, const OUString& rName, const OUString& rShortName); static bool IsLegalName(const OUString& rName); @@ -76,7 +77,7 @@ namespace sw { { public: CrossRefNumItemBookmark(const SwPaM& rPaM, - const KeyCode& rCode, + const vcl::KeyCode& rCode, const OUString& rName, const OUString& rShortName); static bool IsLegalName(const OUString& rName); diff --git a/sw/source/core/inc/mvsave.hxx b/sw/source/core/inc/mvsave.hxx index 3b24951e8f57..f40fc34f9bc0 100644 --- a/sw/source/core/inc/mvsave.hxx +++ b/sw/source/core/inc/mvsave.hxx @@ -60,7 +60,7 @@ namespace sw { namespace mark private: OUString m_aName; OUString m_aShortName; - KeyCode m_aCode; + vcl::KeyCode m_aCode; bool m_bSavePos; bool m_bSaveOtherPos; IDocumentMarkAccess::MarkType m_eOrigBkmType; diff --git a/sw/source/core/inc/rolbck.hxx b/sw/source/core/inc/rolbck.hxx index 2e585cb3fb0e..74ccea142575 100644 --- a/sw/source/core/inc/rolbck.hxx +++ b/sw/source/core/inc/rolbck.hxx @@ -19,8 +19,9 @@ #ifndef INCLUDED_SW_SOURCE_CORE_INC_ROLBCK_HXX #define INCLUDED_SW_SOURCE_CORE_INC_ROLBCK_HXX -#include #include +#include +#include #include #include @@ -260,7 +261,7 @@ class SwHistoryBookmark : public SwHistoryHint private: const OUString m_aName; OUString m_aShortName; - KeyCode m_aKeycode; + vcl::KeyCode m_aKeycode; const sal_uLong m_nNode; const sal_uLong m_nOtherNode; const sal_Int32 m_nCntnt; diff --git a/sw/source/filter/inc/fltshell.hxx b/sw/source/filter/inc/fltshell.hxx index 60462cbdea29..a39d363ba3ad 100644 --- a/sw/source/filter/inc/fltshell.hxx +++ b/sw/source/filter/inc/fltshell.hxx @@ -140,7 +140,7 @@ class SW_DLLPUBLIC SwFltControlStack : private ::boost::noncopyable friend class SwFltShell; sal_uLong nFieldFlags; - KeyCode aEmptyKeyCode; // fuer Bookmarks + vcl::KeyCode aEmptyKeyCode; // fuer Bookmarks private: bool bHasSdOD; diff --git a/sw/source/ui/dbui/dbinsdlg.cxx b/sw/source/ui/dbui/dbinsdlg.cxx index 14e5731a38f2..b29556d85faf 100644 --- a/sw/source/ui/dbui/dbinsdlg.cxx +++ b/sw/source/ui/dbui/dbinsdlg.cxx @@ -1350,7 +1350,7 @@ void SwInsertDBColAutoPilot::DataToDoc( const Sequence& rSelection, rSh.SwCrsrShell::MovePara( GetfnParaCurr(), GetfnParaStart() ); pMark = rSh.SetBookmark( - KeyCode(), + vcl::KeyCode(), OUString(), OUString(), IDocumentMarkAccess::UNO_BOOKMARK ); rSh.SwCrsrShell::MovePara( diff --git a/sw/source/ui/fldui/fldvar.cxx b/sw/source/ui/fldui/fldvar.cxx index 178495830f41..7205cc6ab317 100644 --- a/sw/source/ui/fldui/fldvar.cxx +++ b/sw/source/ui/fldui/fldvar.cxx @@ -1267,7 +1267,7 @@ bool SelectionListBox::PreNotify( NotifyEvent& rNEvt ) if ( rNEvt.GetType() == EVENT_KEYUP ) { const KeyEvent* pKEvt = rNEvt.GetKeyEvent(); - const KeyCode aKeyCode = pKEvt->GetKeyCode(); + const vcl::KeyCode aKeyCode = pKEvt->GetKeyCode(); const sal_uInt16 nModifier = aKeyCode.GetModifier(); if( aKeyCode.GetCode() == KEY_SPACE && !nModifier) bCallAddSelection = true; diff --git a/sw/source/ui/index/cnttab.cxx b/sw/source/ui/index/cnttab.cxx index bc00cf989977..e5c0eeb507a1 100644 --- a/sw/source/ui/index/cnttab.cxx +++ b/sw/source/ui/index/cnttab.cxx @@ -559,7 +559,7 @@ sal_IntPtr SwIndexTreeLB::GetTabPos( SvTreeListEntry* pEntry, SvLBoxTab* pTab) void SwIndexTreeLB::KeyInput( const KeyEvent& rKEvt ) { SvTreeListEntry* pEntry = FirstSelected(); - KeyCode aCode = rKEvt.GetKeyCode(); + vcl::KeyCode aCode = rKEvt.GetKeyCode(); bool bChanged = false; if(pEntry) { @@ -1506,7 +1506,7 @@ void SwTOXEdit::KeyInput( const KeyEvent& rKEvt ) !rSel.A()) || rSel.A() == nTextLen ) { bool bCall = false; - KeyCode aCode = rKEvt.GetKeyCode(); + vcl::KeyCode aCode = rKEvt.GetKeyCode(); if(aCode.GetCode() == KEY_RIGHT && rSel.A() == nTextLen) { bNextControl = true; @@ -1633,7 +1633,7 @@ public: void SwTOXButton::KeyInput( const KeyEvent& rKEvt ) { bool bCall = false; - KeyCode aCode = rKEvt.GetKeyCode(); + vcl::KeyCode aCode = rKEvt.GetKeyCode(); if(aCode.GetCode() == KEY_RIGHT) { bNextControl = true; @@ -2146,7 +2146,7 @@ bool SwTOXEntryTabPage::Notify( NotifyEvent& rNEvt ) if ( rNEvt.GetType() == EVENT_KEYINPUT ) { const KeyEvent& rKEvt = *rNEvt.GetKeyEvent(); - KeyCode aCode = rKEvt.GetKeyCode(); + vcl::KeyCode aCode = rKEvt.GetKeyCode(); if ( (aCode.GetCode() == KEY_F4) && aCode.IsShift() && !aCode.IsMod1() && !aCode.IsMod2() ) { if ( m_pTokenWIN->GetActiveControl() ) diff --git a/sw/source/ui/misc/bookmark.cxx b/sw/source/ui/misc/bookmark.cxx index 86507168f199..9add4dc7ae31 100644 --- a/sw/source/ui/misc/bookmark.cxx +++ b/sw/source/ui/misc/bookmark.cxx @@ -103,7 +103,7 @@ void SwInsertBookmarkDlg::Apply() OUString sEntry(comphelper::string::remove(m_pBookmarkBox->GetText(), m_pBookmarkBox->GetMultiSelectionSeparator())); - rSh.SetBookmark( KeyCode(), sEntry, OUString() ); + rSh.SetBookmark( vcl::KeyCode(), sEntry, OUString() ); rReq.AppendItem( SfxStringItem( FN_INSERT_BOOKMARK, sEntry ) ); rReq.Done(); } diff --git a/sw/source/ui/misc/glosbib.cxx b/sw/source/ui/misc/glosbib.cxx index a62598835cbb..0fcc14f81e31 100644 --- a/sw/source/ui/misc/glosbib.cxx +++ b/sw/source/ui/misc/glosbib.cxx @@ -387,7 +387,7 @@ bool SwGlossaryGroupDlg::IsDeleteAllowed(const OUString &rGroup) void FEdit::KeyInput( const KeyEvent& rKEvent ) { - KeyCode aCode = rKEvent.GetKeyCode(); + vcl::KeyCode aCode = rKEvent.GetKeyCode(); if( KEYGROUP_CURSOR == aCode.GetGroup() || ( KEYGROUP_MISC == aCode.GetGroup() && KEY_DELETE >= aCode.GetCode() ) || diff --git a/sw/source/uibase/cctrl/actctrl.cxx b/sw/source/uibase/cctrl/actctrl.cxx index c20a5b23a38e..05cda9e485be 100644 --- a/sw/source/uibase/cctrl/actctrl.cxx +++ b/sw/source/uibase/cctrl/actctrl.cxx @@ -33,7 +33,7 @@ bool NumEditAction::Notify( NotifyEvent& rNEvt ) if ( rNEvt.GetType() == EVENT_KEYINPUT ) { const KeyEvent* pKEvt = rNEvt.GetKeyEvent(); - const KeyCode aKeyCode = pKEvt->GetKeyCode(); + const vcl::KeyCode aKeyCode = pKEvt->GetKeyCode(); const sal_uInt16 nModifier = aKeyCode.GetModifier(); if( aKeyCode.GetCode() == KEY_RETURN && !nModifier) @@ -50,7 +50,7 @@ bool NumEditAction::Notify( NotifyEvent& rNEvt ) void ReturnActionEdit::KeyInput( const KeyEvent& rEvt) { - const KeyCode aKeyCode = rEvt.GetKeyCode(); + const vcl::KeyCode aKeyCode = rEvt.GetKeyCode(); const sal_uInt16 nModifier = aKeyCode.GetModifier(); if( aKeyCode.GetCode() == KEY_RETURN && !nModifier) diff --git a/sw/source/uibase/dochdl/swdtflvr.cxx b/sw/source/uibase/dochdl/swdtflvr.cxx index 99b7b4163d00..0d537acbde8c 100644 --- a/sw/source/uibase/dochdl/swdtflvr.cxx +++ b/sw/source/uibase/dochdl/swdtflvr.cxx @@ -3628,7 +3628,7 @@ SwTrnsfrDdeLink::SwTrnsfrDdeLink( SwTransferable& rTrans, SwWrtShell& rSh ) bool bIsModified = rSh.IsModified(); ::sw::mark::IMark* pMark = rSh.SetBookmark( - KeyCode(), + vcl::KeyCode(), OUString(), OUString(), IDocumentMarkAccess::DDE_BOOKMARK); diff --git a/sw/source/uibase/docvw/AnnotationMenuButton.cxx b/sw/source/uibase/docvw/AnnotationMenuButton.cxx index 051d7eebcd7c..a7ba9954ba3d 100644 --- a/sw/source/uibase/docvw/AnnotationMenuButton.cxx +++ b/sw/source/uibase/docvw/AnnotationMenuButton.cxx @@ -187,7 +187,7 @@ void AnnotationMenuButton::Paint( const Rectangle& /*rRect*/ ) void AnnotationMenuButton::KeyInput( const KeyEvent& rKeyEvt ) { - const KeyCode& rKeyCode = rKeyEvt.GetKeyCode(); + const vcl::KeyCode& rKeyCode = rKeyEvt.GetKeyCode(); const sal_uInt16 nKey = rKeyCode.GetCode(); if ( nKey == KEY_TAB ) { diff --git a/sw/source/uibase/docvw/SidebarTxtControl.cxx b/sw/source/uibase/docvw/SidebarTxtControl.cxx index 1915d3306024..f6cba0bb8298 100644 --- a/sw/source/uibase/docvw/SidebarTxtControl.cxx +++ b/sw/source/uibase/docvw/SidebarTxtControl.cxx @@ -187,7 +187,7 @@ void SidebarTxtControl::Paint( const Rectangle& rRect) void SidebarTxtControl::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/sw/source/uibase/docvw/edtwin.cxx b/sw/source/uibase/docvw/edtwin.cxx index b20f5082a4fe..5030a4a2c272 100644 --- a/sw/source/uibase/docvw/edtwin.cxx +++ b/sw/source/uibase/docvw/edtwin.cxx @@ -1440,12 +1440,12 @@ void SwEditWin::KeyInput(const KeyEvent &rKEvt) } aKeyEvent = KeyEvent( rKEvt.GetCharCode(), - KeyCode( nKey, rKEvt.GetKeyCode().GetModifier() ), + vcl::KeyCode( nKey, rKEvt.GetKeyCode().GetModifier() ), rKEvt.GetRepeat() ); } } - const KeyCode& rKeyCode = aKeyEvent.GetKeyCode(); + const vcl::KeyCode& rKeyCode = aKeyEvent.GetKeyCode(); sal_Unicode aCh = aKeyEvent.GetCharCode(); // enable switching to notes ankor with Ctrl - Alt - Page Up/Down diff --git a/sw/source/uibase/docvw/edtwin2.cxx b/sw/source/uibase/docvw/edtwin2.cxx index bbcaaf1a6399..0acaf594cac0 100644 --- a/sw/source/uibase/docvw/edtwin2.cxx +++ b/sw/source/uibase/docvw/edtwin2.cxx @@ -225,8 +225,8 @@ void SwEditWin::RequestHelp(const HelpEvent &rEvt) } case SwContentAtPos::SW_SMARTTAG: { - KeyCode aCode( KEY_SPACE ); - KeyCode aModifiedCode( KEY_SPACE, KEY_MOD1 ); + vcl::KeyCode aCode( KEY_SPACE ); + vcl::KeyCode aModifiedCode( KEY_SPACE, KEY_MOD1 ); OUString aModStr( aModifiedCode.GetName() ); aModStr = aModStr.replaceFirst(aCode.GetName(), OUString()); aModStr = aModStr.replaceAll("+", OUString()); diff --git a/sw/source/uibase/ribbar/inputwin.cxx b/sw/source/uibase/ribbar/inputwin.cxx index c3caec60a7fe..f3e4035fd629 100644 --- a/sw/source/uibase/ribbar/inputwin.cxx +++ b/sw/source/uibase/ribbar/inputwin.cxx @@ -504,7 +504,7 @@ void SwInputWindow::DelBoxCntnt() void InputEdit::KeyInput(const KeyEvent& rEvent) { - const KeyCode aCode = rEvent.GetKeyCode(); + const vcl::KeyCode aCode = rEvent.GetKeyCode(); if(aCode == KEY_RETURN || aCode == KEY_F2 ) ((SwInputWindow*)GetParent())->ApplyFormula(); else if(aCode == KEY_ESCAPE ) diff --git a/sw/source/uibase/shells/textsh1.cxx b/sw/source/uibase/shells/textsh1.cxx index c8995964b19a..6a9a0b05b3ae 100644 --- a/sw/source/uibase/shells/textsh1.cxx +++ b/sw/source/uibase/shells/textsh1.cxx @@ -591,7 +591,7 @@ void SwTextShell::Execute(SfxRequest &rReq) if ( pItem ) { OUString sName = ((SfxStringItem*)pItem)->GetValue(); - rWrtSh.SetBookmark( KeyCode(), sName, OUString() ); + rWrtSh.SetBookmark( vcl::KeyCode(), sName, OUString() ); } else { diff --git a/sw/source/uibase/uiview/pview.cxx b/sw/source/uibase/uiview/pview.cxx index 074868c00c80..5ab8185eebf5 100644 --- a/sw/source/uibase/uiview/pview.cxx +++ b/sw/source/uibase/uiview/pview.cxx @@ -417,7 +417,7 @@ OUString SwPagePreviewWin::GetStatusStr( sal_uInt16 nPageCnt ) const void SwPagePreviewWin::KeyInput( const KeyEvent &rKEvt ) { - const KeyCode& rKeyCode = rKEvt.GetKeyCode(); + const vcl::KeyCode& rKeyCode = rKEvt.GetKeyCode(); bool bHandled = false; if(!rKeyCode.GetModifier()) { diff --git a/sw/source/uibase/utlui/content.cxx b/sw/source/uibase/utlui/content.cxx index eb2889cc7a8c..87bf12066949 100644 --- a/sw/source/uibase/utlui/content.cxx +++ b/sw/source/uibase/utlui/content.cxx @@ -2592,7 +2592,7 @@ void SwContentTree::GetFocus() void SwContentTree::KeyInput(const KeyEvent& rEvent) { - const KeyCode aCode = rEvent.GetKeyCode(); + const vcl::KeyCode aCode = rEvent.GetKeyCode(); if(aCode.GetCode() == KEY_RETURN) { SvTreeListEntry* pEntry = FirstSelected(); @@ -2729,7 +2729,7 @@ void SwContentTree::KeyInput(const KeyEvent& rEvent) { SwEditWin& pEditWindow = pActiveShell->GetView().GetEditWin(); - KeyCode tempKeycode( KEY_ESCAPE ); + vcl::KeyCode tempKeycode( KEY_ESCAPE ); KeyEvent rKEvt( 0 , tempKeycode ); ((Window*)&pEditWindow)->KeyInput( rKEvt ); //rView.GetEditWin().GrabFocus(); diff --git a/sw/source/uibase/utlui/glbltree.cxx b/sw/source/uibase/utlui/glbltree.cxx index 276a930d96bd..b693296bbc96 100644 --- a/sw/source/uibase/utlui/glbltree.cxx +++ b/sw/source/uibase/utlui/glbltree.cxx @@ -599,7 +599,7 @@ void SwGlobalTree::GetFocus() void SwGlobalTree::KeyInput(const KeyEvent& rKEvt) { - const KeyCode aCode = rKEvt.GetKeyCode(); + const vcl::KeyCode aCode = rKEvt.GetKeyCode(); if(aCode.GetCode() == KEY_RETURN) { switch(aCode.GetModifier()) diff --git a/sw/source/uibase/utlui/initui.cxx b/sw/source/uibase/utlui/initui.cxx index 44dc6762b69a..1d6095f41536 100644 --- a/sw/source/uibase/utlui/initui.cxx +++ b/sw/source/uibase/utlui/initui.cxx @@ -218,8 +218,8 @@ ShellResource::ShellResource() { const sal_uInt16 nCount = FLD_DOCINFO_END - FLD_DOCINFO_BEGIN; - KeyCode aCode( KEY_SPACE ); - KeyCode aModifiedCode( KEY_SPACE, KEY_MOD1 ); + vcl::KeyCode aCode( KEY_SPACE ); + vcl::KeyCode aModifiedCode( KEY_SPACE, KEY_MOD1 ); OUString aModStr( aModifiedCode.GetName() ); aModStr = aModStr.replaceFirst(aCode.GetName(), OUString()); aModStr = aModStr.replaceAll("+", OUString()); diff --git a/sw/source/uibase/utlui/navipi.cxx b/sw/source/uibase/utlui/navipi.cxx index 9f01965d40dc..2c35600cc2bd 100644 --- a/sw/source/uibase/utlui/navipi.cxx +++ b/sw/source/uibase/utlui/navipi.cxx @@ -522,7 +522,7 @@ void SwNavigationPI::MakeMark() if(vNavMarkNames.size() == MAX_MARKS) pMarkAccess->deleteMark(pMarkAccess->findMark(vNavMarkNames[nAutoMarkIdx])); - rSh.SetBookmark(KeyCode(), OUString(), OUString(), IDocumentMarkAccess::NAVIGATOR_REMINDER); + rSh.SetBookmark(vcl::KeyCode(), OUString(), OUString(), IDocumentMarkAccess::NAVIGATOR_REMINDER); SwView::SetActMark( nAutoMarkIdx ); if(++nAutoMarkIdx == MAX_MARKS) diff --git a/toolkit/source/awt/vclxmenu.cxx b/toolkit/source/awt/vclxmenu.cxx index 9f82e2949d63..90c7a2668fc8 100644 --- a/toolkit/source/awt/vclxmenu.cxx +++ b/toolkit/source/awt/vclxmenu.cxx @@ -632,7 +632,7 @@ namespace /** Copied from svtools/inc/acceleratorexecute.hxx */ static css::awt::KeyEvent lcl_VCLKey2AWTKey( - const KeyCode& aVCLKey) + const vcl::KeyCode& aVCLKey) { css::awt::KeyEvent aAWTKey; aAWTKey.Modifiers = 0; @@ -650,7 +650,7 @@ namespace return aAWTKey; } - KeyCode lcl_AWTKey2VCLKey(const css::awt::KeyEvent& aAWTKey) + vcl::KeyCode lcl_AWTKey2VCLKey(const css::awt::KeyEvent& aAWTKey) { bool bShift = ((aAWTKey.Modifiers & css::awt::KeyModifier::SHIFT) == css::awt::KeyModifier::SHIFT ); bool bMod1 = ((aAWTKey.Modifiers & css::awt::KeyModifier::MOD1 ) == css::awt::KeyModifier::MOD1 ); @@ -658,7 +658,7 @@ namespace bool bMod3 = ((aAWTKey.Modifiers & css::awt::KeyModifier::MOD3 ) == css::awt::KeyModifier::MOD3 ); sal_uInt16 nKey = (sal_uInt16)aAWTKey.KeyCode; - return KeyCode(nKey, bShift, bMod1, bMod2, bMod3); + return vcl::KeyCode(nKey, bShift, bMod1, bMod2, bMod3); } } @@ -765,7 +765,7 @@ throw (css::uno::RuntimeException, std::exception) if ( mpMenu && IsPopupMenu() && MENU_ITEM_NOTFOUND != mpMenu->GetItemPos( nItemId ) ) { - KeyCode aVCLKeyCode = lcl_AWTKey2VCLKey( aKeyEvent ); + vcl::KeyCode aVCLKeyCode = lcl_AWTKey2VCLKey( aKeyEvent ); mpMenu->SetAccelKey( nItemId, aVCLKeyCode ); } } @@ -781,7 +781,7 @@ throw (css::uno::RuntimeException, std::exception) css::awt::KeyEvent aKeyEvent; if ( mpMenu && IsPopupMenu() && MENU_ITEM_NOTFOUND != mpMenu->GetItemPos( nItemId ) ) { - KeyCode nKeyCode = mpMenu->GetAccelKey( nItemId ); + vcl::KeyCode nKeyCode = mpMenu->GetAccelKey( nItemId ); aKeyEvent = lcl_VCLKey2AWTKey( nKeyCode ); } diff --git a/vcl/headless/svpframe.cxx b/vcl/headless/svpframe.cxx index 932abba105b3..d803f722096b 100644 --- a/vcl/headless/svpframe.cxx +++ b/vcl/headless/svpframe.cxx @@ -430,7 +430,7 @@ OUString SvpSalFrame::GetKeyName( sal_uInt16 ) return OUString(); } -bool SvpSalFrame::MapUnicodeToKeyCode( sal_Unicode, LanguageType, KeyCode& ) +bool SvpSalFrame::MapUnicodeToKeyCode( sal_Unicode, LanguageType, vcl::KeyCode& ) { return false; } diff --git a/vcl/inc/accel.h b/vcl/inc/accel.h index e3e92c78a8a5..b1a07b8abd47 100644 --- a/vcl/inc/accel.h +++ b/vcl/inc/accel.h @@ -27,8 +27,8 @@ class Accelerator; class ImplAccelEntry { public: - sal_uInt16 mnId; - KeyCode maKeyCode; + sal_uInt16 mnId; + vcl::KeyCode maKeyCode; Accelerator* mpAccel; Accelerator* mpAutoAccel; bool mbEnabled; diff --git a/vcl/inc/accmgr.hxx b/vcl/inc/accmgr.hxx index 4645cb27abc2..671c34715ff9 100644 --- a/vcl/inc/accmgr.hxx +++ b/vcl/inc/accmgr.hxx @@ -22,8 +22,9 @@ #include +#include + class Accelerator; -class KeyCode; typedef ::std::vector< Accelerator* > ImplAccelList; @@ -47,7 +48,7 @@ public: void EndSequence( bool bCancel = false ); void FlushAccel() { EndSequence( true ); } - bool IsAccelKey( const KeyCode& rKeyCode, sal_uInt16 nRepeat ); + bool IsAccelKey( const vcl::KeyCode& rKeyCode, sal_uInt16 nRepeat ); }; #endif // INCLUDED_VCL_INC_ACCMGR_HXX diff --git a/vcl/inc/headless/svpframe.hxx b/vcl/inc/headless/svpframe.hxx index 1aec3aafae1f..56f8c5fbf11e 100644 --- a/vcl/inc/headless/svpframe.hxx +++ b/vcl/inc/headless/svpframe.hxx @@ -112,7 +112,7 @@ public: virtual void SetInputContext( SalInputContext* pContext ) SAL_OVERRIDE; virtual void EndExtTextInput( sal_uInt16 nFlags ) SAL_OVERRIDE; virtual OUString GetKeyName( sal_uInt16 nKeyCode ) SAL_OVERRIDE; - virtual bool MapUnicodeToKeyCode( sal_Unicode aUnicode, LanguageType aLangType, KeyCode& rKeyCode ) SAL_OVERRIDE; + virtual bool MapUnicodeToKeyCode( sal_Unicode aUnicode, LanguageType aLangType, vcl::KeyCode& rKeyCode ) SAL_OVERRIDE; virtual LanguageType GetInputLanguage() SAL_OVERRIDE; virtual void UpdateSettings( AllSettings& rSettings ) SAL_OVERRIDE; virtual void Beep() SAL_OVERRIDE; diff --git a/vcl/inc/osx/salframe.h b/vcl/inc/osx/salframe.h index 24fb17f2a3db..be06137a3543 100644 --- a/vcl/inc/osx/salframe.h +++ b/vcl/inc/osx/salframe.h @@ -141,7 +141,7 @@ public: virtual void SetInputContext( SalInputContext* pContext ) SAL_OVERRIDE; virtual void EndExtTextInput( sal_uInt16 nFlags ) SAL_OVERRIDE; virtual OUString GetKeyName( sal_uInt16 nKeyCode ) SAL_OVERRIDE; - virtual bool MapUnicodeToKeyCode( sal_Unicode aUnicode, LanguageType aLangType, KeyCode& rKeyCode ) SAL_OVERRIDE; + virtual bool MapUnicodeToKeyCode( sal_Unicode aUnicode, LanguageType aLangType, vcl::KeyCode& rKeyCode ) SAL_OVERRIDE; virtual LanguageType GetInputLanguage() SAL_OVERRIDE; virtual void UpdateSettings( AllSettings& rSettings ) SAL_OVERRIDE; virtual void Beep() SAL_OVERRIDE; diff --git a/vcl/inc/osx/salmenu.h b/vcl/inc/osx/salmenu.h index 6997495c11e0..cac87f023b23 100644 --- a/vcl/inc/osx/salmenu.h +++ b/vcl/inc/osx/salmenu.h @@ -68,7 +68,7 @@ public: virtual void EnableItem( unsigned nPos, bool bEnable ) SAL_OVERRIDE; virtual void SetItemText( unsigned nPos, SalMenuItem* pSalMenuItem, const OUString& rText ) SAL_OVERRIDE; virtual void SetItemImage( unsigned nPos, SalMenuItem* pSalMenuItem, const Image& rImage) SAL_OVERRIDE; - virtual void SetAccelerator( unsigned nPos, SalMenuItem* pSalMenuItem, const KeyCode& rKeyCode, const OUString& rKeyName ) SAL_OVERRIDE; + virtual void SetAccelerator( unsigned nPos, SalMenuItem* pSalMenuItem, const vcl::KeyCode& rKeyCode, const OUString& rKeyName ) SAL_OVERRIDE; virtual void GetSystemMenuData( SystemMenuData* pData ) SAL_OVERRIDE; virtual bool ShowNativePopupMenu(FloatingWindow * pWin, const Rectangle& rRect, sal_uLong nFlags) SAL_OVERRIDE; virtual bool AddMenuBarButton( const SalMenuButtonItem& ) SAL_OVERRIDE; diff --git a/vcl/inc/salframe.hxx b/vcl/inc/salframe.hxx index 87ee9419f6eb..e4882ff5d827 100644 --- a/vcl/inc/salframe.hxx +++ b/vcl/inc/salframe.hxx @@ -173,7 +173,7 @@ public: // returns in 'rKeyCode' the single keycode that translates to the given unicode when using a keyboard layout of language 'aLangType' // returns false if no mapping exists or function not supported // this is required for advanced menu support - virtual bool MapUnicodeToKeyCode( sal_Unicode aUnicode, LanguageType aLangType, KeyCode& rKeyCode ) = 0; + virtual bool MapUnicodeToKeyCode( sal_Unicode aUnicode, LanguageType aLangType, vcl::KeyCode& rKeyCode ) = 0; // returns the input language used for the last key stroke // may be LANGUAGE_DONTKNOW if not supported by the OS diff --git a/vcl/inc/salmenu.hxx b/vcl/inc/salmenu.hxx index 5711534cfd99..ee9bdb76a6f5 100644 --- a/vcl/inc/salmenu.hxx +++ b/vcl/inc/salmenu.hxx @@ -75,7 +75,7 @@ public: virtual void EnableItem( unsigned nPos, bool bEnable ) = 0; virtual void SetItemText( unsigned nPos, SalMenuItem* pSalMenuItem, const OUString& rText )= 0; virtual void SetItemImage( unsigned nPos, SalMenuItem* pSalMenuItem, const Image& rImage ) = 0; - virtual void SetAccelerator( unsigned nPos, SalMenuItem* pSalMenuItem, const KeyCode& rKeyCode, const OUString& rKeyName ) = 0; + virtual void SetAccelerator( unsigned nPos, SalMenuItem* pSalMenuItem, const vcl::KeyCode& rKeyCode, const OUString& rKeyName ) = 0; virtual void GetSystemMenuData( SystemMenuData* pData ) = 0; virtual bool ShowNativePopupMenu(FloatingWindow * pWin, const Rectangle& rRect, sal_uLong nFlags); virtual bool AddMenuBarButton( const SalMenuButtonItem& ); // return false if not implemented or failure diff --git a/vcl/inc/svdata.hxx b/vcl/inc/svdata.hxx index b8df3e711ca8..44b229bf2727 100644 --- a/vcl/inc/svdata.hxx +++ b/vcl/inc/svdata.hxx @@ -29,12 +29,12 @@ #include "tools/fldunit.hxx" #include "tools/color.hxx" #include "tools/debug.hxx" - -#include "vcl/vclevent.hxx" -#include "vcl/bitmapex.hxx" #include "tools/solar.h" -#include "vcl/svapp.hxx" +#include "vcl/bitmapex.hxx" #include "vcl/dllapi.h" +#include "vcl/keycod.hxx" +#include "vcl/svapp.hxx" +#include "vcl/vclevent.hxx" #include "unotools/options.hxx" @@ -62,7 +62,6 @@ class ImplTBDragMgr; class ImplIdleMgr; class FloatingWindow; class AllSettings; -class KeyCode; class NotifyEvent; class Timer; class AutoTimer; @@ -353,7 +352,7 @@ void ImplWindowAutoMnemonic( Window* pWindow ); void ImplUpdateSystemProcessWindow(); Window* ImplFindWindow( const SalFrame* pFrame, Point& rSalFramePos ); -bool ImplCallHotKey( const KeyCode& rKeyCode ); +bool ImplCallHotKey( const vcl::KeyCode& rKeyCode ); void ImplFreeHotKeyData(); void ImplFreeEventHookData(); diff --git a/vcl/inc/unx/gtk/gtkframe.hxx b/vcl/inc/unx/gtk/gtkframe.hxx index becc2b3031aa..fe998348defe 100644 --- a/vcl/inc/unx/gtk/gtkframe.hxx +++ b/vcl/inc/unx/gtk/gtkframe.hxx @@ -403,7 +403,7 @@ public: virtual void EndExtTextInput( sal_uInt16 nFlags ) SAL_OVERRIDE; virtual OUString GetKeyName( sal_uInt16 nKeyCode ) SAL_OVERRIDE; - virtual bool MapUnicodeToKeyCode( sal_Unicode aUnicode, LanguageType aLangType, KeyCode& rKeyCode ) SAL_OVERRIDE; + virtual bool MapUnicodeToKeyCode( sal_Unicode aUnicode, LanguageType aLangType, vcl::KeyCode& rKeyCode ) SAL_OVERRIDE; // returns the input language used for the last key stroke // may be LANGUAGE_DONTKNOW if not supported by the OS diff --git a/vcl/inc/unx/gtk/gtksalmenu.hxx b/vcl/inc/unx/gtk/gtksalmenu.hxx index c9df33c7bb76..8a3d77e963af 100644 --- a/vcl/inc/unx/gtk/gtksalmenu.hxx +++ b/vcl/inc/unx/gtk/gtksalmenu.hxx @@ -71,7 +71,7 @@ public: virtual void ShowItem( unsigned nPos, bool bShow ) SAL_OVERRIDE; virtual void SetItemText( unsigned nPos, SalMenuItem* pSalMenuItem, const OUString& rText ) SAL_OVERRIDE; virtual void SetItemImage( unsigned nPos, SalMenuItem* pSalMenuItem, const Image& rImage) SAL_OVERRIDE; - virtual void SetAccelerator( unsigned nPos, SalMenuItem* pSalMenuItem, const KeyCode& rKeyCode, const OUString& rKeyName ) SAL_OVERRIDE; + virtual void SetAccelerator( unsigned nPos, SalMenuItem* pSalMenuItem, const vcl::KeyCode& rKeyCode, const OUString& rKeyName ) SAL_OVERRIDE; virtual void GetSystemMenuData( SystemMenuData* pData ) SAL_OVERRIDE; virtual void SetMenu( Menu* pMenu ) { mpVCLMenu = pMenu; } @@ -95,7 +95,7 @@ public: gboolean bIsSubmenu ); void NativeSetEnableItem( gchar* aCommand, gboolean bEnable ); void NativeCheckItem( unsigned nSection, unsigned nItemPos, MenuItemBits bits, gboolean bCheck ); - void NativeSetAccelerator( unsigned nSection, unsigned nItemPos, const KeyCode& rKeyCode, const OUString& rKeyName ); + void NativeSetAccelerator( unsigned nSection, unsigned nItemPos, const vcl::KeyCode& rKeyCode, const OUString& rKeyName ); void DispatchCommand( gint itemId, const gchar* aCommand ); void Activate(); diff --git a/vcl/inc/unx/salframe.h b/vcl/inc/unx/salframe.h index 0350f1659974..000ffba6826e 100644 --- a/vcl/inc/unx/salframe.h +++ b/vcl/inc/unx/salframe.h @@ -247,7 +247,7 @@ public: virtual void SetInputContext( SalInputContext* pContext ) SAL_OVERRIDE; virtual void EndExtTextInput( sal_uInt16 nFlags ) SAL_OVERRIDE; virtual OUString GetKeyName( sal_uInt16 nKeyCode ) SAL_OVERRIDE; - virtual bool MapUnicodeToKeyCode( sal_Unicode aUnicode, LanguageType aLangType, KeyCode& rKeyCode ) SAL_OVERRIDE; + virtual bool MapUnicodeToKeyCode( sal_Unicode aUnicode, LanguageType aLangType, vcl::KeyCode& rKeyCode ) SAL_OVERRIDE; virtual LanguageType GetInputLanguage() SAL_OVERRIDE; virtual void UpdateSettings( AllSettings& rSettings ) SAL_OVERRIDE; virtual void Beep() SAL_OVERRIDE; diff --git a/vcl/inc/unx/salmenu.h b/vcl/inc/unx/salmenu.h index 566c8e0f78af..a2e600e8461e 100644 --- a/vcl/inc/unx/salmenu.h +++ b/vcl/inc/unx/salmenu.h @@ -40,7 +40,7 @@ public: virtual void EnableItem( unsigned nPos, bool bEnable ) SAL_OVERRIDE; virtual void SetItemText( unsigned nPos, SalMenuItem* pSalMenuItem, const OUString& rText ) SAL_OVERRIDE; virtual void SetItemImage( unsigned nPos, SalMenuItem* pSalMenuItem, const Image& rImage) SAL_OVERRIDE; - virtual void SetAccelerator( unsigned nPos, SalMenuItem* pSalMenuItem, const KeyCode& rKeyCode, const OUString& rKeyName ) SAL_OVERRIDE; + virtual void SetAccelerator( unsigned nPos, SalMenuItem* pSalMenuItem, const vcl::KeyCode& rKeyCode, const OUString& rKeyName ) SAL_OVERRIDE; virtual void GetSystemMenuData( SystemMenuData* pData ) SAL_OVERRIDE; }; diff --git a/vcl/inc/win/salframe.h b/vcl/inc/win/salframe.h index 6a13b80dca7f..7389f67e81f5 100644 --- a/vcl/inc/win/salframe.h +++ b/vcl/inc/win/salframe.h @@ -118,7 +118,7 @@ public: virtual void SetInputContext( SalInputContext* pContext ); virtual void EndExtTextInput( sal_uInt16 nFlags ); virtual OUString GetKeyName( sal_uInt16 nKeyCode ); - virtual bool MapUnicodeToKeyCode( sal_Unicode aUnicode, LanguageType aLangType, KeyCode& rKeyCode ); + virtual bool MapUnicodeToKeyCode( sal_Unicode aUnicode, LanguageType aLangType, vcl::KeyCode& rKeyCode ); virtual LanguageType GetInputLanguage(); virtual void UpdateSettings( AllSettings& rSettings ); virtual void Beep(); diff --git a/vcl/inc/win/salmenu.h b/vcl/inc/win/salmenu.h index bd82312f06ee..4a45f911cb15 100644 --- a/vcl/inc/win/salmenu.h +++ b/vcl/inc/win/salmenu.h @@ -39,7 +39,7 @@ public: virtual void EnableItem( unsigned nPos, bool bEnable ); virtual void SetItemText( unsigned nPos, SalMenuItem* pSalMenuItem, const OUString& rText ); virtual void SetItemImage( unsigned nPos, SalMenuItem* pSalMenuItem, const Image& rImage ); - virtual void SetAccelerator( unsigned nPos, SalMenuItem* pSalMenuItem, const KeyCode& rKeyCode, const OUString& rKeyName ); + virtual void SetAccelerator( unsigned nPos, SalMenuItem* pSalMenuItem, const vcl::KeyCode& rKeyCode, const OUString& rKeyName ); virtual void GetSystemMenuData( SystemMenuData* pData ); HMENU mhMenu; // the menu handle diff --git a/vcl/osx/salframe.cxx b/vcl/osx/salframe.cxx index d2422ca69d12..96d20a9330dc 100644 --- a/vcl/osx/salframe.cxx +++ b/vcl/osx/salframe.cxx @@ -1491,7 +1491,7 @@ bool AquaSalFrame::SetPluginParent( SystemParentData* ) return false; } -bool AquaSalFrame::MapUnicodeToKeyCode( sal_Unicode , LanguageType , KeyCode& ) +bool AquaSalFrame::MapUnicodeToKeyCode( sal_Unicode , LanguageType , vcl::KeyCode& ) { // not supported yet return FALSE; diff --git a/vcl/osx/salmenu.cxx b/vcl/osx/salmenu.cxx index 4f3920ed65bf..cc5cc06cd385 100644 --- a/vcl/osx/salmenu.cxx +++ b/vcl/osx/salmenu.cxx @@ -692,7 +692,7 @@ void AquaSalMenu::SetItemText( unsigned /*i_nPos*/, SalMenuItem* i_pSalMenuItem, } } -void AquaSalMenu::SetAccelerator( unsigned /*nPos*/, SalMenuItem* pSalMenuItem, const KeyCode& rKeyCode, const OUString& /*rKeyName*/ ) +void AquaSalMenu::SetAccelerator( unsigned /*nPos*/, SalMenuItem* pSalMenuItem, const vcl::KeyCode& rKeyCode, const OUString& /*rKeyName*/ ) { sal_uInt16 nModifier; sal_Unicode nCommandKey = 0; diff --git a/vcl/source/app/svapp.cxx b/vcl/source/app/svapp.cxx index 80ca354e790c..e2dc111ae65c 100644 --- a/vcl/source/app/svapp.cxx +++ b/vcl/source/app/svapp.cxx @@ -77,11 +77,11 @@ using namespace ::com::sun::star::uno; class ImplReservedKey { public: - ImplReservedKey( KeyCode aKeyCode, sal_uInt16 nResId ) : + ImplReservedKey( vcl::KeyCode aKeyCode, sal_uInt16 nResId ) : mKeyCode(aKeyCode), mnResId( nResId) {} - KeyCode mKeyCode; + vcl::KeyCode mKeyCode; sal_uInt16 mnResId; }; @@ -94,31 +94,31 @@ namespace { static ImplReservedKey ImplReservedKeys[] = { - ImplReservedKey(KeyCode(KEY_F1,0), SV_SHORTCUT_HELP), - ImplReservedKey(KeyCode(KEY_F1,KEY_SHIFT), SV_SHORTCUT_ACTIVEHELP), - ImplReservedKey(KeyCode(KEY_F1,KEY_MOD1), SV_SHORTCUT_CONTEXTHELP), - ImplReservedKey(KeyCode(KEY_F2,KEY_SHIFT), SV_SHORTCUT_CONTEXTHELP), - ImplReservedKey(KeyCode(KEY_F4,KEY_MOD1), SV_SHORTCUT_DOCKUNDOCK), - ImplReservedKey(KeyCode(KEY_F4,KEY_MOD2), SV_SHORTCUT_DOCKUNDOCK), - ImplReservedKey(KeyCode(KEY_F4,KEY_MOD1|KEY_MOD2), SV_SHORTCUT_DOCKUNDOCK), - ImplReservedKey(KeyCode(KEY_F6,0), SV_SHORTCUT_NEXTSUBWINDOW), - ImplReservedKey(KeyCode(KEY_F6,KEY_MOD1), SV_SHORTCUT_TODOCUMENT), - ImplReservedKey(KeyCode(KEY_F6,KEY_SHIFT), SV_SHORTCUT_PREVSUBWINDOW), - ImplReservedKey(KeyCode(KEY_F6,KEY_MOD1|KEY_SHIFT), SV_SHORTCUT_SPLITTER), - ImplReservedKey(KeyCode(KEY_F10,0), SV_SHORTCUT_MENUBAR) + ImplReservedKey(vcl::KeyCode(KEY_F1,0), SV_SHORTCUT_HELP), + ImplReservedKey(vcl::KeyCode(KEY_F1,KEY_SHIFT), SV_SHORTCUT_ACTIVEHELP), + ImplReservedKey(vcl::KeyCode(KEY_F1,KEY_MOD1), SV_SHORTCUT_CONTEXTHELP), + ImplReservedKey(vcl::KeyCode(KEY_F2,KEY_SHIFT), SV_SHORTCUT_CONTEXTHELP), + ImplReservedKey(vcl::KeyCode(KEY_F4,KEY_MOD1), SV_SHORTCUT_DOCKUNDOCK), + ImplReservedKey(vcl::KeyCode(KEY_F4,KEY_MOD2), SV_SHORTCUT_DOCKUNDOCK), + ImplReservedKey(vcl::KeyCode(KEY_F4,KEY_MOD1|KEY_MOD2), SV_SHORTCUT_DOCKUNDOCK), + ImplReservedKey(vcl::KeyCode(KEY_F6,0), SV_SHORTCUT_NEXTSUBWINDOW), + ImplReservedKey(vcl::KeyCode(KEY_F6,KEY_MOD1), SV_SHORTCUT_TODOCUMENT), + ImplReservedKey(vcl::KeyCode(KEY_F6,KEY_SHIFT), SV_SHORTCUT_PREVSUBWINDOW), + ImplReservedKey(vcl::KeyCode(KEY_F6,KEY_MOD1|KEY_SHIFT), SV_SHORTCUT_SPLITTER), + ImplReservedKey(vcl::KeyCode(KEY_F10,0), SV_SHORTCUT_MENUBAR) #ifdef UNX , - ImplReservedKey(KeyCode(KEY_1,KEY_SHIFT|KEY_MOD1), 0), - ImplReservedKey(KeyCode(KEY_2,KEY_SHIFT|KEY_MOD1), 0), - ImplReservedKey(KeyCode(KEY_3,KEY_SHIFT|KEY_MOD1), 0), - ImplReservedKey(KeyCode(KEY_4,KEY_SHIFT|KEY_MOD1), 0), - ImplReservedKey(KeyCode(KEY_5,KEY_SHIFT|KEY_MOD1), 0), - ImplReservedKey(KeyCode(KEY_6,KEY_SHIFT|KEY_MOD1), 0), - ImplReservedKey(KeyCode(KEY_7,KEY_SHIFT|KEY_MOD1), 0), - ImplReservedKey(KeyCode(KEY_8,KEY_SHIFT|KEY_MOD1), 0), - ImplReservedKey(KeyCode(KEY_9,KEY_SHIFT|KEY_MOD1), 0), - ImplReservedKey(KeyCode(KEY_0,KEY_SHIFT|KEY_MOD1), 0), - ImplReservedKey(KeyCode(KEY_ADD,KEY_SHIFT|KEY_MOD1), 0) + ImplReservedKey(vcl::KeyCode(KEY_1,KEY_SHIFT|KEY_MOD1), 0), + ImplReservedKey(vcl::KeyCode(KEY_2,KEY_SHIFT|KEY_MOD1), 0), + ImplReservedKey(vcl::KeyCode(KEY_3,KEY_SHIFT|KEY_MOD1), 0), + ImplReservedKey(vcl::KeyCode(KEY_4,KEY_SHIFT|KEY_MOD1), 0), + ImplReservedKey(vcl::KeyCode(KEY_5,KEY_SHIFT|KEY_MOD1), 0), + ImplReservedKey(vcl::KeyCode(KEY_6,KEY_SHIFT|KEY_MOD1), 0), + ImplReservedKey(vcl::KeyCode(KEY_7,KEY_SHIFT|KEY_MOD1), 0), + ImplReservedKey(vcl::KeyCode(KEY_8,KEY_SHIFT|KEY_MOD1), 0), + ImplReservedKey(vcl::KeyCode(KEY_9,KEY_SHIFT|KEY_MOD1), 0), + ImplReservedKey(vcl::KeyCode(KEY_0,KEY_SHIFT|KEY_MOD1), 0), + ImplReservedKey(vcl::KeyCode(KEY_ADD,KEY_SHIFT|KEY_MOD1), 0) #endif }; static ReservedKeys aKeys @@ -142,7 +142,7 @@ struct ImplHotKey { ImplHotKey* mpNext; void* mpUserData; - KeyCode maKeyCode; + vcl::KeyCode maKeyCode; Link maLink; }; @@ -324,7 +324,7 @@ sal_uLong Application::GetReservedKeyCodeCount() return ImplReservedKeys::get()->second; } -const KeyCode* Application::GetReservedKeyCode( sal_uLong i ) +const vcl::KeyCode* Application::GetReservedKeyCode( sal_uLong i ) { if( i >= GetReservedKeyCodeCount() ) return NULL; @@ -1449,7 +1449,7 @@ void Application::SetFilterHdl( const Link& rLink ) ImplGetSVData()->maGDIData.mpGrfConverter->SetFilterHdl( rLink ); } -bool ImplCallHotKey( const KeyCode& rKeyCode ) +bool ImplCallHotKey( const vcl::KeyCode& rKeyCode ) { ImplSVData* pSVData = ImplGetSVData(); ImplHotKey* pHotKeyData = pSVData->maAppData.mpFirstHotKey; diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx index 60cff9b384b3..a43b09b45755 100644 --- a/vcl/source/control/button.cxx +++ b/vcl/source/control/button.cxx @@ -1249,7 +1249,7 @@ void PushButton::Tracking( const TrackingEvent& rTEvt ) void PushButton::KeyInput( const KeyEvent& rKEvt ) { - KeyCode aKeyCode = rKEvt.GetKeyCode(); + vcl::KeyCode aKeyCode = rKEvt.GetKeyCode(); if ( !aKeyCode.GetModifier() && ((aKeyCode.GetCode() == KEY_RETURN) || (aKeyCode.GetCode() == KEY_SPACE)) ) @@ -1275,7 +1275,7 @@ void PushButton::KeyInput( const KeyEvent& rKEvt ) void PushButton::KeyUp( const KeyEvent& rKEvt ) { - KeyCode aKeyCode = rKEvt.GetKeyCode(); + vcl::KeyCode aKeyCode = rKEvt.GetKeyCode(); if ( (ImplGetButtonState() & BUTTON_DRAW_PRESSED) && ((aKeyCode.GetCode() == KEY_RETURN) || (aKeyCode.GetCode() == KEY_SPACE)) ) @@ -2389,7 +2389,7 @@ void RadioButton::Tracking( const TrackingEvent& rTEvt ) void RadioButton::KeyInput( const KeyEvent& rKEvt ) { - KeyCode aKeyCode = rKEvt.GetKeyCode(); + vcl::KeyCode aKeyCode = rKEvt.GetKeyCode(); if ( !aKeyCode.GetModifier() && (aKeyCode.GetCode() == KEY_SPACE) ) { @@ -2410,7 +2410,7 @@ void RadioButton::KeyInput( const KeyEvent& rKEvt ) void RadioButton::KeyUp( const KeyEvent& rKEvt ) { - KeyCode aKeyCode = rKEvt.GetKeyCode(); + vcl::KeyCode aKeyCode = rKEvt.GetKeyCode(); if ( (ImplGetButtonState() & BUTTON_DRAW_PRESSED) && (aKeyCode.GetCode() == KEY_SPACE) ) { @@ -3271,7 +3271,7 @@ void CheckBox::Tracking( const TrackingEvent& rTEvt ) void CheckBox::KeyInput( const KeyEvent& rKEvt ) { - KeyCode aKeyCode = rKEvt.GetKeyCode(); + vcl::KeyCode aKeyCode = rKEvt.GetKeyCode(); if ( !aKeyCode.GetModifier() && (aKeyCode.GetCode() == KEY_SPACE) ) { @@ -3292,7 +3292,7 @@ void CheckBox::KeyInput( const KeyEvent& rKEvt ) void CheckBox::KeyUp( const KeyEvent& rKEvt ) { - KeyCode aKeyCode = rKEvt.GetKeyCode(); + vcl::KeyCode aKeyCode = rKEvt.GetKeyCode(); if ( (ImplGetButtonState() & BUTTON_DRAW_PRESSED) && (aKeyCode.GetCode() == KEY_SPACE) ) { @@ -3869,7 +3869,7 @@ void DisclosureButton::ImplDrawCheckBoxState() void DisclosureButton::KeyInput( const KeyEvent& rKEvt ) { - KeyCode aKeyCode = rKEvt.GetKeyCode(); + vcl::KeyCode aKeyCode = rKEvt.GetKeyCode(); if( !aKeyCode.GetModifier() && ( ( aKeyCode.GetCode() == KEY_ADD ) || diff --git a/vcl/source/control/edit.cxx b/vcl/source/control/edit.cxx index e886e0f6dbfc..ac5c57b7bdd2 100644 --- a/vcl/source/control/edit.cxx +++ b/vcl/source/control/edit.cxx @@ -2833,13 +2833,13 @@ PopupMenu* Edit::CreatePopupMenu() pPopup->SetMenuFlags ( MENU_FLAG_ALWAYSSHOWDISABLEDENTRIES ); if ( rStyleSettings.GetAcceleratorsInContextMenus() ) { - pPopup->SetAccelKey( SV_MENU_EDIT_UNDO, KeyCode( KEYFUNC_UNDO ) ); - pPopup->SetAccelKey( SV_MENU_EDIT_CUT, KeyCode( KEYFUNC_CUT ) ); - pPopup->SetAccelKey( SV_MENU_EDIT_COPY, KeyCode( KEYFUNC_COPY ) ); - pPopup->SetAccelKey( SV_MENU_EDIT_PASTE, KeyCode( KEYFUNC_PASTE ) ); - pPopup->SetAccelKey( SV_MENU_EDIT_DELETE, KeyCode( KEYFUNC_DELETE ) ); - pPopup->SetAccelKey( SV_MENU_EDIT_SELECTALL, KeyCode( KEY_A, false, true, false, false ) ); - pPopup->SetAccelKey( SV_MENU_EDIT_INSERTSYMBOL, KeyCode( KEY_S, true, true, false, false ) ); + pPopup->SetAccelKey( SV_MENU_EDIT_UNDO, vcl::KeyCode( KEYFUNC_UNDO ) ); + pPopup->SetAccelKey( SV_MENU_EDIT_CUT, vcl::KeyCode( KEYFUNC_CUT ) ); + pPopup->SetAccelKey( SV_MENU_EDIT_COPY, vcl::KeyCode( KEYFUNC_COPY ) ); + pPopup->SetAccelKey( SV_MENU_EDIT_PASTE, vcl::KeyCode( KEYFUNC_PASTE ) ); + pPopup->SetAccelKey( SV_MENU_EDIT_DELETE, vcl::KeyCode( KEYFUNC_DELETE ) ); + pPopup->SetAccelKey( SV_MENU_EDIT_SELECTALL, vcl::KeyCode( KEY_A, false, true, false, false ) ); + pPopup->SetAccelKey( SV_MENU_EDIT_INSERTSYMBOL, vcl::KeyCode( KEY_S, true, true, false, false ) ); } return pPopup; } diff --git a/vcl/source/control/field2.cxx b/vcl/source/control/field2.cxx index 2287164554f6..9800030d3b99 100644 --- a/vcl/source/control/field2.cxx +++ b/vcl/source/control/field2.cxx @@ -458,7 +458,7 @@ static bool ImplPatternProcessKeyInput( Edit* pEdit, const KeyEvent& rKEvt, return false; Selection aOldSel = pEdit->GetSelection(); - KeyCode aCode = rKEvt.GetKeyCode(); + vcl::KeyCode aCode = rKEvt.GetKeyCode(); sal_Unicode cChar = rKEvt.GetCharCode(); sal_uInt16 nKeyCode = aCode.GetCode(); bool bShift = aCode.IsShift(); diff --git a/vcl/source/control/ilstbox.cxx b/vcl/source/control/ilstbox.cxx index 194c7c3556ce..b1f02fca1f5a 100644 --- a/vcl/source/control/ilstbox.cxx +++ b/vcl/source/control/ilstbox.cxx @@ -1350,7 +1350,7 @@ bool ImplListBoxWindow::ProcessKeyInput( const KeyEvent& rKEvt ) sal_Int32 nSelect = LISTBOX_ENTRY_NOTFOUND; LB_EVENT_TYPE eLET = LET_KEYMOVE; - KeyCode aKeyCode = rKEvt.GetKeyCode(); + vcl::KeyCode aKeyCode = rKEvt.GetKeyCode(); bool bShift = aKeyCode.IsShift(); bool bCtrl = aKeyCode.IsMod1() || aKeyCode.IsMod3(); @@ -2522,7 +2522,7 @@ bool ImplListBox::HandleWheelAsCursorTravel( const CommandEvent& rCEvt ) if( !pData->GetModifier() && ( pData->GetMode() == COMMAND_WHEEL_SCROLL ) ) { sal_uInt16 nKey = ( pData->GetDelta() < 0 ) ? KEY_DOWN : KEY_UP; - KeyEvent aKeyEvent( 0, KeyCode( nKey ) ); + KeyEvent aKeyEvent( 0, vcl::KeyCode( nKey ) ); bDone = ProcessKeyInput( aKeyEvent ); } } diff --git a/vcl/source/control/menubtn.cxx b/vcl/source/control/menubtn.cxx index 8e11b3812169..d543c291ac95 100644 --- a/vcl/source/control/menubtn.cxx +++ b/vcl/source/control/menubtn.cxx @@ -134,7 +134,7 @@ void MenuButton::MouseButtonDown( const MouseEvent& rMEvt ) void MenuButton::KeyInput( const KeyEvent& rKEvt ) { - KeyCode aKeyCode = rKEvt.GetKeyCode(); + vcl::KeyCode aKeyCode = rKEvt.GetKeyCode(); sal_uInt16 nCode = aKeyCode.GetCode(); if ( (nCode == KEY_DOWN) && aKeyCode.IsMod2() ) ImplExecuteMenu(); diff --git a/vcl/source/control/tabctrl.cxx b/vcl/source/control/tabctrl.cxx index dd0c5c9b1fcd..223705e714c3 100644 --- a/vcl/source/control/tabctrl.cxx +++ b/vcl/source/control/tabctrl.cxx @@ -962,8 +962,8 @@ bool TabControl::ImplHandleKeyEvent( const KeyEvent& rKeyEvent ) if ( GetPageCount() > 1 ) { - KeyCode aKeyCode = rKeyEvent.GetKeyCode(); - sal_uInt16 nKeyCode = aKeyCode.GetCode(); + vcl::KeyCode aKeyCode = rKeyEvent.GetKeyCode(); + sal_uInt16 nKeyCode = aKeyCode.GetCode(); if ( aKeyCode.IsMod1() ) { @@ -1030,7 +1030,7 @@ void TabControl::KeyInput( const KeyEvent& rKEvt ) mpTabCtrlData->mpListBox->KeyInput( rKEvt ); else if ( GetPageCount() > 1 ) { - KeyCode aKeyCode = rKEvt.GetKeyCode(); + vcl::KeyCode aKeyCode = rKEvt.GetKeyCode(); sal_uInt16 nKeyCode = aKeyCode.GetCode(); if ( (nKeyCode == KEY_LEFT) || (nKeyCode == KEY_RIGHT) ) diff --git a/vcl/source/window/accel.cxx b/vcl/source/window/accel.cxx index f331d80b3068..97bacbf3bb3b 100644 --- a/vcl/source/window/accel.cxx +++ b/vcl/source/window/accel.cxx @@ -149,7 +149,7 @@ void Accelerator::ImplInit() mpDel = NULL; } -ImplAccelEntry* Accelerator::ImplGetAccelData( const KeyCode& rKeyCode ) const +ImplAccelEntry* Accelerator::ImplGetAccelData( const vcl::KeyCode& rKeyCode ) const { ImplAccelMap::iterator it = mpData->maKeyMap.find( rKeyCode.GetFullCode() ); if( it != mpData->maKeyMap.end() ) @@ -192,7 +192,7 @@ void Accelerator::ImplDeleteData() mpData->maIdList.clear(); } -void Accelerator::ImplInsertAccel( sal_uInt16 nItemId, const KeyCode& rKeyCode, +void Accelerator::ImplInsertAccel( sal_uInt16 nItemId, const vcl::KeyCode& rKeyCode, bool bEnable, Accelerator* pAutoAccel ) { DBG_ASSERT( nItemId, "Accelerator::InsertItem(): ItemId == 0" ); @@ -205,17 +205,17 @@ void Accelerator::ImplInsertAccel( sal_uInt16 nItemId, const KeyCode& rKeyCode, sal_uInt16 nCode4; ImplGetKeyCode( rKeyCode.GetFunction(), nCode1, nCode2, nCode3, nCode4 ); if ( nCode1 ) - ImplInsertAccel( nItemId, KeyCode( nCode1, nCode1 ), bEnable, pAutoAccel ); + ImplInsertAccel( nItemId, vcl::KeyCode( nCode1, nCode1 ), bEnable, pAutoAccel ); if ( nCode2 ) { if ( pAutoAccel ) pAutoAccel = new Accelerator( *pAutoAccel ); - ImplInsertAccel( nItemId, KeyCode( nCode2, nCode2 ), bEnable, pAutoAccel ); + ImplInsertAccel( nItemId, vcl::KeyCode( nCode2, nCode2 ), bEnable, pAutoAccel ); if ( nCode3 ) { if ( pAutoAccel ) pAutoAccel = new Accelerator( *pAutoAccel ); - ImplInsertAccel( nItemId, KeyCode( nCode3, nCode3 ), bEnable, pAutoAccel ); + ImplInsertAccel( nItemId, vcl::KeyCode( nCode3, nCode3 ), bEnable, pAutoAccel ); } } return; @@ -312,7 +312,7 @@ void Accelerator::Select() maSelectHdl.Call( this ); } -void Accelerator::InsertItem( sal_uInt16 nItemId, const KeyCode& rKeyCode ) +void Accelerator::InsertItem( sal_uInt16 nItemId, const vcl::KeyCode& rKeyCode ) { ImplInsertAccel( nItemId, rKeyCode, true, NULL ); } @@ -323,7 +323,7 @@ void Accelerator::InsertItem( const ResId& rResId ) sal_uLong nObjMask; sal_uInt16 nAccelKeyId; sal_uInt16 bDisable; - KeyCode aKeyCode; + vcl::KeyCode aKeyCode; Accelerator* pAutoAccel = NULL; GetRes( rResId.SetRT( RSC_ACCELITEM ) ); @@ -336,7 +336,7 @@ void Accelerator::InsertItem( const ResId& rResId ) // new context was created RSHEADER_TYPE * pKeyCodeRes = (RSHEADER_TYPE *)GetClassRes(); ResId aResId( pKeyCodeRes, *rResId.GetResMgr()); - aKeyCode = KeyCode( aResId ); + aKeyCode = vcl::KeyCode( aResId ); IncrementRes( GetObjSizeRes( (RSHEADER_TYPE *)GetClassRes() ) ); } @@ -355,14 +355,14 @@ sal_uInt16 Accelerator::GetItemCount() const return (sal_uInt16)mpData->maIdList.size(); } -KeyCode Accelerator::GetKeyCode( sal_uInt16 nItemId ) const +vcl::KeyCode Accelerator::GetKeyCode( sal_uInt16 nItemId ) const { sal_uInt16 nIndex = ImplAccelEntryGetFirstPos( &(mpData->maIdList), nItemId ); if ( nIndex != ACCELENTRY_NOTFOUND ) return mpData->maIdList[ nIndex ]->maKeyCode; else - return KeyCode(); + return vcl::KeyCode(); } sal_uInt16 Accelerator::GetItemId( sal_uInt16 nPos ) const @@ -390,7 +390,7 @@ Accelerator& Accelerator::operator=( const Accelerator& rAccel ) // assign new data maHelpStr = rAccel.maHelpStr; - maCurKeyCode = KeyCode(); + maCurKeyCode = vcl::KeyCode(); mnCurId = 0; mnCurRepeat = 0; mbIsCancel = false; diff --git a/vcl/source/window/accmgr.cxx b/vcl/source/window/accmgr.cxx index a5dfaba99e5b..3ce6099355e9 100644 --- a/vcl/source/window/accmgr.cxx +++ b/vcl/source/window/accmgr.cxx @@ -106,7 +106,7 @@ void ImplAccelManager::EndSequence( bool bCancel ) mpSequenceList = NULL; } -bool ImplAccelManager::IsAccelKey( const KeyCode& rKeyCode, sal_uInt16 nRepeat ) +bool ImplAccelManager::IsAccelKey( const vcl::KeyCode& rKeyCode, sal_uInt16 nRepeat ) { Accelerator* pAccel; @@ -165,7 +165,7 @@ bool ImplAccelManager::IsAccelKey( const KeyCode& rKeyCode, sal_uInt16 nRepeat ) // did the accelerator survive the call if ( !bDel ) { - pAccel->maCurKeyCode = KeyCode(); + pAccel->maCurKeyCode = vcl::KeyCode(); pAccel->mnCurId = 0; pAccel->mnCurRepeat = 0; pAccel->mpDel = NULL; @@ -236,7 +236,7 @@ bool ImplAccelManager::IsAccelKey( const KeyCode& rKeyCode, sal_uInt16 nRepeat ) // if the accelerator did survive the call if ( !bDel ) { - pAccel->maCurKeyCode = KeyCode(); + pAccel->maCurKeyCode = vcl::KeyCode(); pAccel->mnCurId = 0; pAccel->mnCurRepeat = 0; pAccel->mpDel = NULL; diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx index ff88496af8a7..9ef687b08df5 100644 --- a/vcl/source/window/builder.cxx +++ b/vcl/source/window/builder.cxx @@ -2481,24 +2481,24 @@ OString VclBuilder::convertMnemonicMarkup(const OString &rIn) namespace { - KeyCode makeKeyCode(const OString &rKey) + vcl::KeyCode makeKeyCode(const OString &rKey) { if (rKey == "Insert") - return KeyCode(KEY_INSERT); + return vcl::KeyCode(KEY_INSERT); else if (rKey == "Delete") - return KeyCode(KEY_DELETE); + return vcl::KeyCode(KEY_DELETE); assert (rKey.getLength() == 1); sal_Char cChar = rKey.toChar(); if (cChar >= 'a' && cChar <= 'z') - return KeyCode(KEY_A + (cChar - 'a')); + return vcl::KeyCode(KEY_A + (cChar - 'a')); else if (cChar >= 'A' && cChar <= 'Z') - return KeyCode(KEY_A + (cChar - 'A')); + return vcl::KeyCode(KEY_A + (cChar - 'A')); else if (cChar >= '0' && cChar <= '9') - return KeyCode(KEY_0 + (cChar - 'A')); + return vcl::KeyCode(KEY_0 + (cChar - 'A')); - return KeyCode(cChar); + return vcl::KeyCode(cChar); } } diff --git a/vcl/source/window/dialog.cxx b/vcl/source/window/dialog.cxx index a686c7844280..4909b9560c1a 100644 --- a/vcl/source/window/dialog.cxx +++ b/vcl/source/window/dialog.cxx @@ -565,8 +565,8 @@ bool Dialog::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_ESCAPE) && ((GetStyle() & WB_CLOSEABLE) || ImplGetCancelButton( this ) || ImplGetOKButton( this )) ) diff --git a/vcl/source/window/dlgctrl.cxx b/vcl/source/window/dlgctrl.cxx index 7b4ca2a6f5a7..a11888854bca 100644 --- a/vcl/source/window/dlgctrl.cxx +++ b/vcl/source/window/dlgctrl.cxx @@ -574,7 +574,7 @@ namespace bool Window::ImplDlgCtrl( const KeyEvent& rKEvt, bool bKeyInput ) { - KeyCode aKeyCode = rKEvt.GetKeyCode(); + vcl::KeyCode aKeyCode = rKEvt.GetKeyCode(); sal_uInt16 nKeyCode = aKeyCode.GetCode(); Window* pSWindow; Window* pTempWindow; @@ -1116,7 +1116,7 @@ KeyEvent Window::GetActivationKey() const nCode = KEY_POINT; else if( nAccel == '-' ) nCode = KEY_SUBTRACT; - KeyCode aKeyCode( nCode, false, false, true, false ); + vcl::KeyCode aKeyCode( nCode, false, false, true, false ); aKeyEvent = KeyEvent( nAccel, aKeyCode ); } return aKeyEvent; diff --git a/vcl/source/window/dockmgr.cxx b/vcl/source/window/dockmgr.cxx index dec90ea09b08..2bd4c53e80a7 100644 --- a/vcl/source/window/dockmgr.cxx +++ b/vcl/source/window/dockmgr.cxx @@ -1176,7 +1176,7 @@ void ImplDockingWindowWrapper::StartPopupMode( ToolBox *pParentToolBox, sal_uLon if( pParentToolBox->IsKeyEvent() ) { // send HOME key to subtoolbar in order to select first item - KeyEvent aEvent( 0, KeyCode( KEY_HOME ) ); + KeyEvent aEvent( 0, vcl::KeyCode( KEY_HOME ) ); mpFloatWin->GetPreferredKeyInputWindow()->KeyInput( aEvent ); } } diff --git a/vcl/source/window/dockwin.cxx b/vcl/source/window/dockwin.cxx index e1276fcb9af3..3c2a7d443dc6 100644 --- a/vcl/source/window/dockwin.cxx +++ b/vcl/source/window/dockwin.cxx @@ -593,7 +593,7 @@ bool DockingWindow::Notify( NotifyEvent& rNEvt ) } else if( rNEvt.GetType() == EVENT_KEYINPUT ) { - const KeyCode& rKey = rNEvt.GetKeyEvent()->GetKeyCode(); + const vcl::KeyCode& rKey = rNEvt.GetKeyEvent()->GetKeyCode(); if( rKey.GetCode() == KEY_F10 && rKey.GetModifier() && rKey.IsShift() && rKey.IsMod1() ) { diff --git a/vcl/source/window/event.cxx b/vcl/source/window/event.cxx index b7176cbf9af4..2333af21fe46 100644 --- a/vcl/source/window/event.cxx +++ b/vcl/source/window/event.cxx @@ -142,7 +142,7 @@ bool Window::Notify( NotifyEvent& rNEvt ) } else if( rNEvt.GetType() == EVENT_KEYINPUT ) { - const KeyCode& rKey = rNEvt.GetKeyEvent()->GetKeyCode(); + const vcl::KeyCode& rKey = rNEvt.GetKeyEvent()->GetKeyCode(); if( rKey.GetCode() == KEY_F10 && rKey.GetModifier() && rKey.IsShift() && rKey.IsMod1() ) { diff --git a/vcl/source/window/floatwin.cxx b/vcl/source/window/floatwin.cxx index a77c38f56a49..cb5cb788442d 100644 --- a/vcl/source/window/floatwin.cxx +++ b/vcl/source/window/floatwin.cxx @@ -533,8 +533,8 @@ bool FloatingWindow::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_ESCAPE) && (GetStyle() & WB_CLOSEABLE) ) { diff --git a/vcl/source/window/keycod.cxx b/vcl/source/window/keycod.cxx index 78f9b863ca10..8cb9909d6a59 100644 --- a/vcl/source/window/keycod.cxx +++ b/vcl/source/window/keycod.cxx @@ -59,14 +59,14 @@ void ImplGetKeyCode( KeyFuncType eFunc, sal_uInt16& rCode1, sal_uInt16& rCode2, rCode4 = aImplKeyFuncTab[nIndex+3]; } -KeyCode::KeyCode( KeyFuncType eFunction ) +vcl::KeyCode::KeyCode( KeyFuncType eFunction ) { sal_uInt16 nDummy; ImplGetKeyCode( eFunction, nCode, nDummy, nDummy, nDummy ); eFunc = eFunction; } -KeyCode::KeyCode( const ResId& rResId ) +vcl::KeyCode::KeyCode( const ResId& rResId ) : nCode(0) , eFunc(KEYFUNC_DONTKNOW) { @@ -92,14 +92,14 @@ KeyCode::KeyCode( const ResId& rResId ) } } -OUString KeyCode::GetName( Window* pWindow ) const +OUString vcl::KeyCode::GetName( Window* pWindow ) const { if ( !pWindow ) pWindow = ImplGetDefaultWindow(); return pWindow ? pWindow->ImplGetFrame()->GetKeyName( GetFullCode() ) : ""; } -KeyFuncType KeyCode::GetFunction() const +KeyFuncType vcl::KeyCode::GetFunction() const { if ( eFunc != KEYFUNC_DONTKNOW ) return eFunc; diff --git a/vcl/source/window/keyevent.cxx b/vcl/source/window/keyevent.cxx index ed8cd828c757..6fcae4a58830 100644 --- a/vcl/source/window/keyevent.cxx +++ b/vcl/source/window/keyevent.cxx @@ -40,18 +40,18 @@ KeyEvent KeyEvent::LogicalTextDirectionality (TextDirectionality eMode) const case TextDirectionality_RightToLeft_TopToBottom: switch (nCode) { - case KEY_LEFT: aClone.maKeyCode = KeyCode(KEY_RIGHT, nMod); break; - case KEY_RIGHT: aClone.maKeyCode = KeyCode(KEY_LEFT, nMod); break; + case KEY_LEFT: aClone.maKeyCode = vcl::KeyCode(KEY_RIGHT, nMod); break; + case KEY_RIGHT: aClone.maKeyCode = vcl::KeyCode(KEY_LEFT, nMod); break; } break; case TextDirectionality_TopToBottom_RightToLeft: switch (nCode) { - case KEY_DOWN: aClone.maKeyCode = KeyCode(KEY_RIGHT, nMod); break; - case KEY_UP: aClone.maKeyCode = KeyCode(KEY_LEFT, nMod); break; - case KEY_LEFT: aClone.maKeyCode = KeyCode(KEY_DOWN, nMod); break; - case KEY_RIGHT: aClone.maKeyCode = KeyCode(KEY_UP, nMod); break; + case KEY_DOWN: aClone.maKeyCode = vcl::KeyCode(KEY_RIGHT, nMod); break; + case KEY_UP: aClone.maKeyCode = vcl::KeyCode(KEY_LEFT, nMod); break; + case KEY_LEFT: aClone.maKeyCode = vcl::KeyCode(KEY_DOWN, nMod); break; + case KEY_RIGHT: aClone.maKeyCode = vcl::KeyCode(KEY_UP, nMod); break; } break; diff --git a/vcl/source/window/split.cxx b/vcl/source/window/split.cxx index 1fa4e6ee37e1..3442e02a30dd 100644 --- a/vcl/source/window/split.cxx +++ b/vcl/source/window/split.cxx @@ -328,7 +328,7 @@ void Splitter::Tracking( const TrackingEvent& rTEvt ) } } -void Splitter::ImplKbdTracking( KeyCode aKeyCode ) +void Splitter::ImplKbdTracking( vcl::KeyCode aKeyCode ) { sal_uInt16 nCode = aKeyCode.GetCode(); if ( nCode == KEY_ESCAPE || nCode == KEY_RETURN ) @@ -570,7 +570,7 @@ void Splitter::LoseFocus() { if( mbKbdSplitting ) { - KeyCode aReturnKey( KEY_RETURN ); + vcl::KeyCode aReturnKey( KEY_RETURN ); ImplKbdTracking( aReturnKey ); mbKbdSplitting = false; } @@ -585,7 +585,7 @@ void Splitter::KeyInput( const KeyEvent& rKEvt ) mbInKeyEvent = 1; Splitter *pSibling = ImplFindSibling(); - KeyCode aKeyCode = rKEvt.GetKeyCode(); + vcl::KeyCode aKeyCode = rKEvt.GetKeyCode(); sal_uInt16 nCode = aKeyCode.GetCode(); switch ( nCode ) { @@ -627,7 +627,7 @@ void Splitter::KeyInput( const KeyEvent& rKEvt ) { if( mbKbdSplitting ) { - KeyCode aKey( KEY_ESCAPE ); + vcl::KeyCode aKey( KEY_ESCAPE ); ImplKbdTracking( aKey ); } diff --git a/vcl/source/window/taskpanelist.cxx b/vcl/source/window/taskpanelist.cxx index c70056d7e221..29e70809bec6 100644 --- a/vcl/source/window/taskpanelist.cxx +++ b/vcl/source/window/taskpanelist.cxx @@ -164,7 +164,7 @@ bool TaskPaneList::HandleKeyEvent( KeyEvent aKeyEvent ) // and the shortcut conflicts with tab-control shortcut ), it is no more supported bool bSplitterOnly = false; bool bFocusInList = false; - KeyCode aKeyCode = aKeyEvent.GetKeyCode(); + vcl::KeyCode aKeyCode = aKeyEvent.GetKeyCode(); bool bForward = !aKeyCode.IsShift(); if( aKeyCode.GetCode() == KEY_F6 && ! aKeyCode.IsMod2() ) // F6 { diff --git a/vcl/source/window/toolbox.cxx b/vcl/source/window/toolbox.cxx index 1517c1579114..a477e304ae16 100644 --- a/vcl/source/window/toolbox.cxx +++ b/vcl/source/window/toolbox.cxx @@ -1130,8 +1130,8 @@ ImplTBDragMgr::ImplTBDragMgr() , mbResizeMode(false) , mbShowDragRect(false) { - maAccel.InsertItem( KEY_RETURN, KeyCode( KEY_RETURN ) ); - maAccel.InsertItem( KEY_ESCAPE, KeyCode( KEY_ESCAPE ) ); + maAccel.InsertItem( KEY_RETURN, vcl::KeyCode( KEY_RETURN ) ); + maAccel.InsertItem( KEY_ESCAPE, vcl::KeyCode( KEY_ESCAPE ) ); maAccel.SetSelectHdl( LINK( this, ImplTBDragMgr, SelectHdl ) ); } @@ -4267,7 +4267,7 @@ bool ToolBox::Notify( NotifyEvent& rNEvt ) if ( rNEvt.GetType() == EVENT_KEYINPUT ) { KeyEvent aKEvt = *rNEvt.GetKeyEvent(); - KeyCode aKeyCode = aKEvt.GetKeyCode(); + vcl::KeyCode aKeyCode = aKEvt.GetKeyCode(); sal_uInt16 nKeyCode = aKeyCode.GetCode(); switch( nKeyCode ) { @@ -4892,13 +4892,13 @@ void ToolBox::TriggerItem( sal_uInt16 nItemId, bool bShift, bool bCtrl ) nModifier |= KEY_SHIFT; if( bCtrl ) nModifier |= KEY_MOD1; - KeyCode aKeyCode( 0, nModifier ); + vcl::KeyCode aKeyCode( 0, nModifier ); ImplActivateItem( aKeyCode ); } // calls the button's action handler // returns true if action was called -bool ToolBox::ImplActivateItem( KeyCode aKeyCode ) +bool ToolBox::ImplActivateItem( vcl::KeyCode aKeyCode ) { bool bRet = true; if( mnHighItemId ) @@ -4978,7 +4978,7 @@ bool ImplCloseLastPopup( Window *pParent ) // opens a drop down toolbox item // returns true if item was opened -bool ToolBox::ImplOpenItem( KeyCode aKeyCode ) +bool ToolBox::ImplOpenItem( vcl::KeyCode aKeyCode ) { sal_uInt16 nCode = aKeyCode.GetCode(); bool bRet = true; @@ -5025,7 +5025,7 @@ bool ToolBox::ImplOpenItem( KeyCode aKeyCode ) void ToolBox::KeyInput( const KeyEvent& rKEvt ) { - KeyCode aKeyCode = rKEvt.GetKeyCode(); + vcl::KeyCode aKeyCode = rKEvt.GetKeyCode(); mnKeyModifier = aKeyCode.GetModifier(); sal_uInt16 nCode = aKeyCode.GetCode(); diff --git a/vcl/source/window/winproc.cxx b/vcl/source/window/winproc.cxx index 492b7a8f4b97..c4dac5371934 100644 --- a/vcl/source/window/winproc.cxx +++ b/vcl/source/window/winproc.cxx @@ -882,8 +882,8 @@ static bool ImplHandleKey( Window* pWindow, sal_uInt16 nSVEvent, sal_uInt16 nKeyCode, sal_uInt16 nCharCode, sal_uInt16 nRepeat, bool bForward ) { ImplSVData* pSVData = ImplGetSVData(); - KeyCode aKeyCode( nKeyCode, nKeyCode ); - sal_uInt16 nEvCode = aKeyCode.GetCode(); + vcl::KeyCode aKeyCode( nKeyCode, nKeyCode ); + sal_uInt16 nEvCode = aKeyCode.GetCode(); // allow application key listeners to remove the key event // but make sure we're not forwarding external KeyEvents, (ie where bForward is false) @@ -1015,7 +1015,7 @@ static bool ImplHandleKey( Window* pWindow, sal_uInt16 nSVEvent, const OutputDevice *pChildOutDev = pChild->GetOutDev(); if( (aKeyCode.GetCode() == KEY_LEFT || aKeyCode.GetCode() == KEY_RIGHT) && pChildOutDev->HasMirroredGraphics() && pChild->IsRTLEnabled() ) - aKeyCode = KeyCode( aKeyCode.GetCode() == KEY_LEFT ? KEY_RIGHT : KEY_LEFT, aKeyCode.GetModifier() ); + aKeyCode = vcl::KeyCode( aKeyCode.GetCode() == KEY_LEFT ? KEY_RIGHT : KEY_LEFT, aKeyCode.GetModifier() ); // call handler ImplDelData aDelData; diff --git a/vcl/unx/generic/app/saldisp.cxx b/vcl/unx/generic/app/saldisp.cxx index dc195371d033..5de927c52c15 100644 --- a/vcl/unx/generic/app/saldisp.cxx +++ b/vcl/unx/generic/app/saldisp.cxx @@ -691,7 +691,7 @@ OUString SalDisplay::GetKeyNameFromKeySym( KeySym nKeySym ) const // return an empty string for keysyms that are not bound to // any key code - XLIB_KeyCode aKeyCode = XKeysymToKeycode( GetDisplay(), nKeySym ); + KeyCode aKeyCode = XKeysymToKeycode( GetDisplay(), nKeySym ); if( aKeyCode != 0 && aKeyCode != NoSymbol ) { if( !nKeySym ) @@ -733,7 +733,7 @@ void SalDisplay::ModifierMapping() // on Sun and SCO servers XLookupString does not account for NumLock if( GetServerVendor() == vendor_sun ) { - XLIB_KeyCode aNumLock = XKeysymToKeycode( pDisp_, XK_Num_Lock ); + KeyCode aNumLock = XKeysymToKeycode( pDisp_, XK_Num_Lock ); if( aNumLock ) for( int i = ShiftMapIndex; i <= Mod5MapIndex; i++ ) { diff --git a/vcl/unx/generic/window/salframe.cxx b/vcl/unx/generic/window/salframe.cxx index f1ebc2ffc656..dcfae9d95a04 100644 --- a/vcl/unx/generic/window/salframe.cxx +++ b/vcl/unx/generic/window/salframe.cxx @@ -2513,7 +2513,7 @@ OUString X11SalFrame::GetKeyName( sal_uInt16 nKeyCode ) return GetDisplay()->GetKeyName( nKeyCode ); } -bool X11SalFrame::MapUnicodeToKeyCode( sal_Unicode , LanguageType , KeyCode& ) +bool X11SalFrame::MapUnicodeToKeyCode( sal_Unicode , LanguageType , vcl::KeyCode& ) { // not supported yet return false; diff --git a/vcl/unx/gtk/window/gtksalframe.cxx b/vcl/unx/gtk/window/gtksalframe.cxx index 5f4fa94131fd..004c5a8b09c7 100644 --- a/vcl/unx/gtk/window/gtksalframe.cxx +++ b/vcl/unx/gtk/window/gtksalframe.cxx @@ -2870,7 +2870,7 @@ void GtkSalFrame::EndExtTextInput( sal_uInt16 nFlags ) m_pIMHandler->endExtTextInput( nFlags ); } -bool GtkSalFrame::MapUnicodeToKeyCode( sal_Unicode , LanguageType , KeyCode& ) +bool GtkSalFrame::MapUnicodeToKeyCode( sal_Unicode , LanguageType , vcl::KeyCode& ) { // not supported yet return false; diff --git a/vcl/win/source/window/salframe.cxx b/vcl/win/source/window/salframe.cxx index e2620aafd806..3be752be87ce 100644 --- a/vcl/win/source/window/salframe.cxx +++ b/vcl/win/source/window/salframe.cxx @@ -3344,7 +3344,7 @@ LanguageType WinSalFrame::GetInputLanguage() return (LanguageType) mnInputLang; } -bool WinSalFrame::MapUnicodeToKeyCode( sal_Unicode aUnicode, LanguageType aLangType, KeyCode& rKeyCode ) +bool WinSalFrame::MapUnicodeToKeyCode( sal_Unicode aUnicode, LanguageType aLangType, vcl::KeyCode& rKeyCode ) { bool bRet = FALSE; sal_IntPtr nLangType = aLangType; @@ -3368,7 +3368,7 @@ bool WinSalFrame::MapUnicodeToKeyCode( sal_Unicode aUnicode, LanguageType aLangT // Windows menu (applies to both left/right key) // Menu key - this key is used to display context menu // AltGr key - probably it has no sense - rKeyCode = KeyCode( ImplSalGetKeyCode( vkeycode ), + rKeyCode = vcl::KeyCode( ImplSalGetKeyCode( vkeycode ), (shiftstate & 0x01) ? TRUE : FALSE, // shift (shiftstate & 0x02) ? TRUE : FALSE, // ctrl (shiftstate & 0x04) ? TRUE : FALSE, // alt diff --git a/vcl/win/source/window/salmenu.cxx b/vcl/win/source/window/salmenu.cxx index 075860413b1a..7deb54b04b76 100644 --- a/vcl/win/source/window/salmenu.cxx +++ b/vcl/win/source/window/salmenu.cxx @@ -331,7 +331,7 @@ void WinSalMenu::SetItemText( unsigned nPos, SalMenuItem* pSalMenuItem, const OU } } -void WinSalMenu::SetAccelerator( unsigned nPos, SalMenuItem* pSalMenuItem, const KeyCode&, const OUString& rKeyName ) +void WinSalMenu::SetAccelerator( unsigned nPos, SalMenuItem* pSalMenuItem, const vcl::KeyCode&, const OUString& rKeyName ) { if( pSalMenuItem ) { -- cgit v1.2.3