summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2014-11-06 10:19:44 +0200
committerNoel Grandin <noel@peralex.com>2014-11-06 10:20:37 +0200
commitd519c312fabef58e4655837ea9069f2ebd92d762 (patch)
tree2184e69925d7dfb58cda484e5b5c6d0f5ac1adeb
parentfdo#83395 - improve PDF export dialog labels and tooltips (diff)
downloadcore-d519c312fabef58e4655837ea9069f2ebd92d762.tar.gz
core-d519c312fabef58e4655837ea9069f2ebd92d762.zip
rename KEY_MODTYPE to KEY_MODIFIERS_MASK
Change-Id: I7948988e4fd89bf94a98afee15298cd33e2a4d06
-rw-r--r--framework/source/uielement/comboboxtoolbarcontroller.cxx2
-rw-r--r--framework/source/uielement/dropdownboxtoolbarcontroller.cxx2
-rw-r--r--include/rsc/rsc-vcl-shared-types.hxx12
-rw-r--r--include/vcl/keycod.hxx4
-rw-r--r--vcl/osx/salframe.cxx2
-rw-r--r--vcl/source/window/debugevent.cxx6
6 files changed, 14 insertions, 14 deletions
diff --git a/framework/source/uielement/comboboxtoolbarcontroller.cxx b/framework/source/uielement/comboboxtoolbarcontroller.cxx
index d80fa5e63fd3..6a685cfb71a7 100644
--- a/framework/source/uielement/comboboxtoolbarcontroller.cxx
+++ b/framework/source/uielement/comboboxtoolbarcontroller.cxx
@@ -190,7 +190,7 @@ void ComboboxToolbarController::Select()
{
vcl::Window::PointerState aState = m_pComboBox->GetPointerState();
- sal_uInt16 nKeyModifier = sal_uInt16( aState.mnState & KEY_MODTYPE );
+ sal_uInt16 nKeyModifier = sal_uInt16( aState.mnState & KEY_MODIFIERS_MASK );
execute( nKeyModifier );
}
}
diff --git a/framework/source/uielement/dropdownboxtoolbarcontroller.cxx b/framework/source/uielement/dropdownboxtoolbarcontroller.cxx
index 87bc1d53eb56..5eb339284cb9 100644
--- a/framework/source/uielement/dropdownboxtoolbarcontroller.cxx
+++ b/framework/source/uielement/dropdownboxtoolbarcontroller.cxx
@@ -174,7 +174,7 @@ void DropdownToolbarController::Select()
{
vcl::Window::PointerState aState = m_pListBoxControl->GetPointerState();
- sal_uInt16 nKeyModifier = sal_uInt16( aState.mnState & KEY_MODTYPE );
+ sal_uInt16 nKeyModifier = sal_uInt16( aState.mnState & KEY_MODIFIERS_MASK );
execute( nKeyModifier );
}
}
diff --git a/include/rsc/rsc-vcl-shared-types.hxx b/include/rsc/rsc-vcl-shared-types.hxx
index eab2e0419a82..016ff2fca176 100644
--- a/include/rsc/rsc-vcl-shared-types.hxx
+++ b/include/rsc/rsc-vcl-shared-types.hxx
@@ -134,14 +134,14 @@ namespace o3tl
template<> struct typed_flags<WindowBorderStyle> : is_typed_flags<WindowBorderStyle, 0x3033> {};
}
-#define KEY_CODE ((sal_uInt16)0x0FFF)
+#define KEY_CODE_MASK ((sal_uInt16)0x0FFF)
// Modifier-Tasten
-#define KEY_SHIFT ((sal_uInt16)0x1000)
-#define KEY_MOD1 ((sal_uInt16)0x2000)
-#define KEY_MOD2 ((sal_uInt16)0x4000)
-#define KEY_MOD3 ((sal_uInt16)0x8000)
-#define KEY_MODTYPE ((sal_uInt16)0xF000)
+#define KEY_SHIFT ((sal_uInt16)0x1000)
+#define KEY_MOD1 ((sal_uInt16)0x2000)
+#define KEY_MOD2 ((sal_uInt16)0x4000)
+#define KEY_MOD3 ((sal_uInt16)0x8000)
+#define KEY_MODIFIERS_MASK ((sal_uInt16)0xF000)
#endif
diff --git a/include/vcl/keycod.hxx b/include/vcl/keycod.hxx
index a1da5d90d20d..f33daf7fe853 100644
--- a/include/vcl/keycod.hxx
+++ b/include/vcl/keycod.hxx
@@ -48,10 +48,10 @@ public:
KeyFuncType GetFullFunction() const { return eFunc; }
sal_uInt16 GetCode() const
- { return (nKeyCodeAndModifiers & KEY_CODE); }
+ { return (nKeyCodeAndModifiers & KEY_CODE_MASK); }
sal_uInt16 GetModifier() const
- { return (nKeyCodeAndModifiers & KEY_MODTYPE); }
+ { return (nKeyCodeAndModifiers & KEY_MODIFIERS_MASK); }
bool IsShift() const
{ return ((nKeyCodeAndModifiers & KEY_SHIFT) != 0); }
bool IsMod1() const
diff --git a/vcl/osx/salframe.cxx b/vcl/osx/salframe.cxx
index f205caf2add7..0f266dbc26ad 100644
--- a/vcl/osx/salframe.cxx
+++ b/vcl/osx/salframe.cxx
@@ -1007,7 +1007,7 @@ OUString AquaSalFrame::GetKeyName( sal_uInt16 nKeyCode )
OUStringBuffer aResult( 16 );
- sal_uInt16 nUnmodifiedCode = (nKeyCode & KEY_CODE);
+ sal_uInt16 nUnmodifiedCode = (nKeyCode & KEY_CODE_MASK);
std::map< sal_uInt16, OUString >::const_iterator it = aKeyMap.find( nUnmodifiedCode );
if( it != aKeyMap.end() )
{
diff --git a/vcl/source/window/debugevent.cxx b/vcl/source/window/debugevent.cxx
index 65a117223f21..4581015201a6 100644
--- a/vcl/source/window/debugevent.cxx
+++ b/vcl/source/window/debugevent.cxx
@@ -140,7 +140,7 @@ void DebugEventInjector::InjectTextEvent()
if (getRandom() < 0.10) // Occasionally a truly random event
{
- aKeyEvent.mnCode = getRandom() * KEY_CODE;
+ aKeyEvent.mnCode = getRandom() * KEY_CODE_MASK;
aKeyEvent.mnCharCode = getRandom() * 0xffff;
}
else
@@ -162,7 +162,7 @@ void DebugEventInjector::InjectTextEvent()
}
if( getRandom() < 0.05 ) // modifier
- aKeyEvent.mnCode |= (sal_uInt16)( getRandom() * KEY_MODTYPE ) & KEY_MODTYPE;
+ aKeyEvent.mnCode |= (sal_uInt16)( getRandom() * KEY_MODIFIERS_MASK ) & KEY_MODIFIERS_MASK;
bool bHandled = ImplWindowFrameProc( pWindow, NULL, SALEVENT_KEYINPUT, &aKeyEvent);
@@ -244,7 +244,7 @@ void DebugEventInjector::InjectKeyNavEdit()
aKeyEvent.mnCode = nKey;
if (getRandom() < 0.15) // modifier
- aKeyEvent.mnCode |= (sal_uInt16)(getRandom() * KEY_MODTYPE) & KEY_MODTYPE;
+ aKeyEvent.mnCode |= (sal_uInt16)(getRandom() * KEY_MODIFIERS_MASK) & KEY_MODIFIERS_MASK;
aKeyEvent.mnCharCode = 0x0; // hopefully unused.