The various KeysymNameReplacement arrays all contain XK_plus and XK_minus but
in fact no existing keyboard layout has labels other than literal "+" and "-"
for these keys. Removing these means that it becomes clearer what labels
actually can be localised.
Also filed as fdo#36235 with the same patch.
ciao,
Christian
From 85d9a20ba7da1eaa93ef555875e3985d29516594 Mon Sep 17 00:00:00 2001
From: Christian Dywan <christian.dy...@lanedo.com>
Date: Thu, 14 Apr 2011 15:34:51 +0200
Subject: [PATCH] Remove unneeded minus and plus keyboard aliases
Fixes: fdo#36235
diff --git a/vcl/unx/source/app/keysymnames.cxx b/vcl/unx/source/app/keysymnames.cxx
index 023848a..254e793 100644
--- a/vcl/unx/source/app/keysymnames.cxx
+++ b/vcl/unx/source/app/keysymnames.cxx
@@ -95,8 +95,6 @@ namespace vcl_sal {
{ XK_Control_R, "Ctrl" },
{ XK_Escape, "Esc" },
{ XK_space, "Space" },
- { XK_minus, "-" },
- { XK_plus, "+" }
};
static const struct KeysymNameReplacement aImplReplacements_Turkish[] =
@@ -152,8 +150,6 @@ namespace vcl_sal {
{ SunXK_Paste, "Einsetzen" },
{ SunXK_Find, "Suchen" },
{ SunXK_Cut, "Ausschneiden" },
- { XK_minus, "-" },
- { XK_plus, "+" }
};
static const struct KeysymNameReplacement aImplReplacements_French[] =
@@ -184,8 +180,6 @@ namespace vcl_sal {
{ SunXK_Paste, "Coller" },
{ SunXK_Find, "Cher." },
{ SunXK_Cut, "Couper" },
- { XK_minus, "-" },
- { XK_plus, "+" }
};
static const struct KeysymNameReplacement aImplReplacements_Italian[] =
@@ -215,8 +209,6 @@ namespace vcl_sal {
{ SunXK_Paste, "Incolla" },
{ SunXK_Find, "Trova" },
{ SunXK_Cut, "Taglia" },
- { XK_minus, "-" },
- { XK_plus, "+" }
};
static const struct KeysymNameReplacement aImplReplacements_Dutch[] =
@@ -241,8 +233,6 @@ namespace vcl_sal {
{ SunXK_Paste, "Paste" },
{ SunXK_Find, "Find" },
{ SunXK_Cut, "Cut" },
- { XK_minus, "-" },
- { XK_plus, "+" }
};
static const struct KeysymNameReplacement aImplReplacements_Norwegian[] =
@@ -268,8 +258,6 @@ namespace vcl_sal {
{ SunXK_Paste, "Lim" },
{ SunXK_Find, "Søk" },
{ SunXK_Cut, "Klipp" },
- { XK_minus, "-" },
- { XK_plus, "+" }
};
static const struct KeysymNameReplacement aImplReplacements_Swedish[] =
@@ -296,8 +284,6 @@ namespace vcl_sal {
{ SunXK_Paste, "Klistra in" },
{ SunXK_Find, "Sök" },
{ SunXK_Cut, "Klipp ut" },
- { XK_minus, "-" },
- { XK_plus, "+" }
};
static const struct KeysymNameReplacement aImplReplacements_Portuguese[] =
@@ -322,8 +308,6 @@ namespace vcl_sal {
{ SunXK_Paste, "Paste" },
{ SunXK_Find, "Find" },
{ SunXK_Cut, "Cut" },
- { XK_minus, "-" },
- { XK_plus, "+" }
};
static const struct KeysymNameReplacement aImplReplacements_Spanish[] =
@@ -354,8 +338,6 @@ namespace vcl_sal {
{ SunXK_Paste, "Pegar" },
{ SunXK_Find, "Buscar" },
{ SunXK_Cut, "Cortar" },
- { XK_minus, "-" },
- { XK_plus, "+" }
};
static const struct KeyboardReplacements aKeyboards[] =
diff --git a/vcl/unx/source/app/saldisp.cxx b/vcl/unx/source/app/saldisp.cxx
index 6d58064..59577d9 100644
--- a/vcl/unx/source/app/saldisp.cxx
+++ b/vcl/unx/source/app/saldisp.cxx
@@ -1290,10 +1290,10 @@ XubString SalDisplay::GetKeyName( sal_uInt16 nKeyCode ) const
nKeySym = GetServerVendor() == vendor_sun ? SunXK_Cut : XK_L10;
break;
case KEY_ADD:
- nKeySym = XK_plus;
+ aCustomKeyName = '+';
break;
case KEY_SUBTRACT:
- nKeySym = XK_minus;
+ aCustomKeyName = '-';
break;
case KEY_MULTIPLY:
nKeySym = XK_asterisk;
--
1.7.1
_______________________________________________
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice