diff options
author | Tor Lillqvist <tml@collabora.com> | 2014-08-23 22:22:32 +0300 |
---|---|---|
committer | Tor Lillqvist <tml@collabora.com> | 2014-08-23 22:33:30 +0300 |
commit | 30ae83c268125383866d47a7ee3e4a5dfcf59f71 (patch) | |
tree | ab52f8ecd7ed9517d70e13b22843b7948f20c9e9 /sw/source/uibase | |
parent | 02f6c270e79879188b2be670c6db4feb56bb064e (diff) |
fdo#82577: Handle KeyCode
Put the VCL KeyCode class in the vcl namespace. Avoids clash with the X11
KeyCode typedef.
Change-Id: I624c9d937f7c5f5986d313b6c5f060bd8bb7e028
Diffstat (limited to 'sw/source/uibase')
-rw-r--r-- | sw/source/uibase/cctrl/actctrl.cxx | 4 | ||||
-rw-r--r-- | sw/source/uibase/dochdl/swdtflvr.cxx | 2 | ||||
-rw-r--r-- | sw/source/uibase/docvw/AnnotationMenuButton.cxx | 2 | ||||
-rw-r--r-- | sw/source/uibase/docvw/SidebarTxtControl.cxx | 2 | ||||
-rw-r--r-- | sw/source/uibase/docvw/edtwin.cxx | 4 | ||||
-rw-r--r-- | sw/source/uibase/docvw/edtwin2.cxx | 4 | ||||
-rw-r--r-- | sw/source/uibase/ribbar/inputwin.cxx | 2 | ||||
-rw-r--r-- | sw/source/uibase/shells/textsh1.cxx | 2 | ||||
-rw-r--r-- | sw/source/uibase/uiview/pview.cxx | 2 | ||||
-rw-r--r-- | sw/source/uibase/utlui/content.cxx | 4 | ||||
-rw-r--r-- | sw/source/uibase/utlui/glbltree.cxx | 2 | ||||
-rw-r--r-- | sw/source/uibase/utlui/initui.cxx | 4 | ||||
-rw-r--r-- | sw/source/uibase/utlui/navipi.cxx | 2 |
13 files changed, 18 insertions, 18 deletions
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) |