summaryrefslogtreecommitdiff
path: root/sc/source/ui
diff options
context:
space:
mode:
authorTor Lillqvist <tml@collabora.com>2014-08-23 22:22:32 +0300
committerTor Lillqvist <tml@collabora.com>2014-08-23 22:33:30 +0300
commit30ae83c268125383866d47a7ee3e4a5dfcf59f71 (patch)
treeab52f8ecd7ed9517d70e13b22843b7948f20c9e9 /sc/source/ui
parent02f6c270e79879188b2be670c6db4feb56bb064e (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 'sc/source/ui')
-rw-r--r--sc/source/ui/app/inputhdl.cxx6
-rw-r--r--sc/source/ui/cctrl/checklistmenu.cxx6
-rw-r--r--sc/source/ui/dbgui/PivotLayoutTreeList.cxx2
-rw-r--r--sc/source/ui/dbgui/PivotLayoutTreeListData.cxx2
-rw-r--r--sc/source/ui/dbgui/PivotLayoutTreeListLabel.cxx2
-rw-r--r--sc/source/ui/dbgui/csvgrid.cxx2
-rw-r--r--sc/source/ui/dbgui/csvruler.cxx2
-rw-r--r--sc/source/ui/drawfunc/fudraw.cxx6
-rw-r--r--sc/source/ui/miscdlgs/anyrefdg.cxx4
-rw-r--r--sc/source/ui/miscdlgs/optsolver.cxx2
-rw-r--r--sc/source/ui/navipi/content.cxx2
-rw-r--r--sc/source/ui/navipi/navipi.cxx4
-rw-r--r--sc/source/ui/navipi/scenwnd.cxx2
-rw-r--r--sc/source/ui/view/cellsh1.cxx2
-rw-r--r--sc/source/ui/view/gridwin.cxx8
-rw-r--r--sc/source/ui/view/olinewin.cxx2
-rw-r--r--sc/source/ui/view/preview.cxx2
-rw-r--r--sc/source/ui/view/tabview3.cxx2
-rw-r--r--sc/source/ui/view/tabvwsh2.cxx2
-rw-r--r--sc/source/ui/view/tabvwsh4.cxx2
-rw-r--r--sc/source/ui/view/viewfun2.cxx2
21 files changed, 32 insertions, 32 deletions
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<OUString> 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,