summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorKohei Yoshida <kyoshida@novell.com>2010-10-04 18:04:55 -0400
committerKohei Yoshida <kyoshida@novell.com>2010-10-04 18:04:55 -0400
commit761846c14403743e53ba8599d761e10e8c6804f7 (patch)
tree4435105a8791f4e40f79d7096350b7778fd05a54 /vcl
parentda2f4f8f88429c8656a7f7945e5854b9049bda1b (diff)
Ported calc-insert-current-time-vcl.diff from ooo-build.
This is part of the feature that allows the users to insert current date and time in Calc via single key stroke.
Diffstat (limited to 'vcl')
-rw-r--r--vcl/inc/vcl/keycodes.hxx1
-rw-r--r--vcl/unx/gtk/window/gtkframe.cxx1
-rw-r--r--vcl/unx/source/app/saldisp.cxx7
-rw-r--r--vcl/win/source/app/salinst.cxx1
4 files changed, 10 insertions, 0 deletions
diff --git a/vcl/inc/vcl/keycodes.hxx b/vcl/inc/vcl/keycodes.hxx
index 8cbec63373d2..f89c8e0edc9b 100644
--- a/vcl/inc/vcl/keycodes.hxx
+++ b/vcl/inc/vcl/keycodes.hxx
@@ -157,6 +157,7 @@
#define KEY_QUOTELEFT ((USHORT)::com::sun::star::awt::Key::QUOTELEFT)
#define KEY_BRACKETLEFT ((USHORT)::com::sun::star::awt::Key::BRACKETLEFT)
#define KEY_BRACKETRIGHT ((USHORT)::com::sun::star::awt::Key::BRACKETRIGHT)
+#define KEY_SEMICOLON ((USHORT)::com::sun::star::awt::Key::SEMICOLON)
#define KEY_CAPSLOCK ((USHORT)::com::sun::star::awt::Key::CAPSLOCK)
#define KEY_NUMLOCK ((USHORT)::com::sun::star::awt::Key::NUMLOCK)
diff --git a/vcl/unx/gtk/window/gtkframe.cxx b/vcl/unx/gtk/window/gtkframe.cxx
index 1caa2c515642..f3aa34febc67 100644
--- a/vcl/unx/gtk/window/gtkframe.cxx
+++ b/vcl/unx/gtk/window/gtkframe.cxx
@@ -213,6 +213,7 @@ static USHORT GetKeyCode( guint keyval )
case GDK_quoteleft: nCode = KEY_QUOTELEFT; break;
case GDK_bracketleft: nCode = KEY_BRACKETLEFT; break;
case GDK_bracketright: nCode = KEY_BRACKETRIGHT; break;
+ case GDK_semicolon: nCode = KEY_SEMICOLON; break;
// some special cases, also see saldisp.cxx
// - - - - - - - - - - - - - Apollo - - - - - - - - - - - - - 0x1000
case 0x1000FF02: // apXK_Copy
diff --git a/vcl/unx/source/app/saldisp.cxx b/vcl/unx/source/app/saldisp.cxx
index 4e706e656d93..19417c83cb91 100644
--- a/vcl/unx/source/app/saldisp.cxx
+++ b/vcl/unx/source/app/saldisp.cxx
@@ -1336,6 +1336,9 @@ XubString SalDisplay::GetKeyName( USHORT nKeyCode ) const
case KEY_BRACKETRIGHT:
nKeySym = XK_bracketright;
break;
+ case KEY_SEMICOLON:
+ nKeySym = XK_semicolon;
+ break;
default:
nKeySym = 0;
@@ -1674,6 +1677,10 @@ USHORT SalDisplay::GetKeyCode( KeySym keysym, char*pcPrintable ) const
nKey = KEY_BRACKETRIGHT;
*pcPrintable = ']';
break;
+ case XK_semicolon:
+ nKey = KEY_SEMICOLON;
+ *pcPrintable = ';';
+ break;
// case XK_Linefeed:
// *pcPrintable = '\n';
// break;
diff --git a/vcl/win/source/app/salinst.cxx b/vcl/win/source/app/salinst.cxx
index ffe55917239b..dac82bd216a9 100644
--- a/vcl/win/source/app/salinst.cxx
+++ b/vcl/win/source/app/salinst.cxx
@@ -378,6 +378,7 @@ void SalData::initKeyCodeMap()
initKey( '`', KEY_QUOTELEFT );
initKey( '[', KEY_BRACKETLEFT );
initKey( ']', KEY_BRACKETRIGHT );
+ initKey( ';', KEY_SEMICOLON );
}
// =======================================================================