[Libreoffice-commits] core.git: Branch 'libreoffice-5-4' - include/svtools svtools/source

Gabor Kelemen kelemeng at ubuntu.com
Fri Jun 9 19:56:33 UTC 2017


 include/svtools/svtools.hrc         |   15 +++++++-
 svtools/source/control/ctrltool.cxx |   32 +++++++++++++++++
 svtools/source/control/ctrltool.src |   65 ++++++++++++++++++++++++++++++++++++
 3 files changed, 110 insertions(+), 2 deletions(-)

New commits:
commit 97859ca34eeeb4918f4fab6817619e2f9bf83e8b
Author: Gabor Kelemen <kelemeng at ubuntu.com>
Date:   Wed Jun 7 00:43:06 2017 +0200

    tdf#107700 Translate some less common font style names
    
    These are used in at least on of the free fonts we bundle.
    Also translate a stray German comment :)
    
    Change-Id: I3f4d83001bcfc3a8b3d490e56d9e538a8d892f0c
    Reviewed-on: https://gerrit.libreoffice.org/38476
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Katarina Behrens <Katarina.Behrens at cib.de>
    (cherry picked from commit f5eae04d7af0ae165ee7045bf5fa101ee681aebf)
    Reviewed-on: https://gerrit.libreoffice.org/38588
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/include/svtools/svtools.hrc b/include/svtools/svtools.hrc
index 2873c5f026ad..70186f41fabb 100644
--- a/include/svtools/svtools.hrc
+++ b/include/svtools/svtools.hrc
@@ -114,7 +114,20 @@
 #define STR_SVT_STYLE_BOLD_ITALIC           (STR_SVT_STYLE_START+5)
 #define STR_SVT_STYLE_BLACK                 (STR_SVT_STYLE_START+6)
 #define STR_SVT_STYLE_BLACK_ITALIC          (STR_SVT_STYLE_START+7)
-#define STR_SVT_STYLE_END                   (STR_SVT_STYLE_BLACK_ITALIC)
+#define STR_SVT_STYLE_BOOK                  (STR_SVT_STYLE_START+8)
+#define STR_SVT_STYLE_BOLD_OBLIQUE          (STR_SVT_STYLE_START+9)
+#define STR_SVT_STYLE_CONDENSED             (STR_SVT_STYLE_START+10)
+#define STR_SVT_STYLE_CONDENSED_BOLD        (STR_SVT_STYLE_START+11)
+#define STR_SVT_STYLE_CONDENSED_BOLD_ITALIC (STR_SVT_STYLE_START+12)
+#define STR_SVT_STYLE_CONDENSED_BOLD_OBLIQUE (STR_SVT_STYLE_START+13)
+#define STR_SVT_STYLE_CONDENSED_ITALIC      (STR_SVT_STYLE_START+14)
+#define STR_SVT_STYLE_CONDENSED_OBLIQUE     (STR_SVT_STYLE_START+15)
+#define STR_SVT_STYLE_EXTRALIGHT            (STR_SVT_STYLE_START+16)
+#define STR_SVT_STYLE_EXTRALIGHT_ITALIC     (STR_SVT_STYLE_START+17)
+#define STR_SVT_STYLE_OBLIQUE               (STR_SVT_STYLE_START+18)
+#define STR_SVT_STYLE_SEMIBOLD              (STR_SVT_STYLE_START+19)
+#define STR_SVT_STYLE_SEMIBOLD_ITALIC       (STR_SVT_STYLE_START+20)
+#define STR_SVT_STYLE_END                   (STR_SVT_STYLE_SEMIBOLD_ITALIC)
 
 #define STR_SVT_FONTMAP_START               (STR_SVT_STYLE_END+1)
 #define STR_SVT_FONTMAP_BOTH                (STR_SVT_FONTMAP_START+0)
diff --git a/svtools/source/control/ctrltool.cxx b/svtools/source/control/ctrltool.cxx
index 0aeb07318966..c4ab3de8dbcf 100644
--- a/svtools/source/control/ctrltool.cxx
+++ b/svtools/source/control/ctrltool.cxx
@@ -35,7 +35,7 @@
 #include <o3tl/typed_flags_set.hxx>
 #include <comphelper/lok.hxx>
 
-// Standard Fontgroessen fuer scalierbare Fonts
+// Standard fontsizes for scalable Fonts
 const sal_IntPtr FontList::aStdSizeAry[] =
 {
      60,
@@ -463,6 +463,36 @@ OUString FontList::GetStyleName(const FontMetric& rInfo) const
             aStyleName = maBlack;
         else if (aCompareStyleName == "blackitalic")
             aStyleName = maBlackItalic;
+        /* tdf#107700 support some less common style names with localization */
+        else if (aCompareStyleName == "book")
+            aStyleName = SvtResId(STR_SVT_STYLE_BOOK);
+        else if (aCompareStyleName == "boldoblique")
+            aStyleName = SvtResId(STR_SVT_STYLE_BOLD_OBLIQUE);
+        else if (aCompareStyleName == "condensed")
+            aStyleName = SvtResId(STR_SVT_STYLE_CONDENSED);
+        else if (aCompareStyleName == "condensedbold")
+            aStyleName = SvtResId(STR_SVT_STYLE_CONDENSED_BOLD);
+        else if (aCompareStyleName == "condensedbolditalic")
+            aStyleName = SvtResId(STR_SVT_STYLE_CONDENSED_BOLD_ITALIC);
+        else if (aCompareStyleName == "condensedboldoblique")
+            aStyleName = SvtResId(STR_SVT_STYLE_CONDENSED_BOLD_OBLIQUE);
+        else if (aCompareStyleName == "condenseditalic")
+            aStyleName = SvtResId(STR_SVT_STYLE_CONDENSED_ITALIC);
+        else if (aCompareStyleName == "condensedoblique")
+            aStyleName = SvtResId(STR_SVT_STYLE_CONDENSED_OBLIQUE);
+        else if (aCompareStyleName == "extralight")
+            aStyleName = SvtResId(STR_SVT_STYLE_EXTRALIGHT);
+        else if (aCompareStyleName == "extralightitalic")
+            aStyleName = SvtResId(STR_SVT_STYLE_EXTRALIGHT_ITALIC);
+        /* Medium is synonym with Normal */
+        else if (aCompareStyleName == "mediumitalic")
+            aStyleName = maNormalItalic;
+        else if (aCompareStyleName == "oblique")
+            aStyleName = SvtResId(STR_SVT_STYLE_OBLIQUE);
+        else if (aCompareStyleName == "semibold")
+            aStyleName = SvtResId(STR_SVT_STYLE_SEMIBOLD);
+        else if (aCompareStyleName == "semibolditalic")
+            aStyleName = SvtResId(STR_SVT_STYLE_SEMIBOLD_ITALIC);
 
         // fix up StyleName, because the PS Printer driver from
         // W2000 returns wrong StyleNames (e.g. Bold instead of Bold Italic
diff --git a/svtools/source/control/ctrltool.src b/svtools/source/control/ctrltool.src
index a178aee45717..5965f40ac15c 100644
--- a/svtools/source/control/ctrltool.src
+++ b/svtools/source/control/ctrltool.src
@@ -58,6 +58,71 @@ String STR_SVT_STYLE_BLACK_ITALIC
     Text [ en-US ] = "Black Italic" ;
 };
 
+String STR_SVT_STYLE_BOOK
+{
+    Text [ en-US ] = "Book" ;
+};
+
+String STR_SVT_STYLE_BOLD_OBLIQUE
+{
+    Text [ en-US ] = "Bold Oblique" ;
+};
+
+String STR_SVT_STYLE_CONDENSED
+{
+    Text [ en-US ] = "Condensed" ;
+};
+
+String STR_SVT_STYLE_CONDENSED_BOLD
+{
+    Text [ en-US ] = "Condensed Bold" ;
+};
+
+String STR_SVT_STYLE_CONDENSED_BOLD_ITALIC
+{
+    Text [ en-US ] = "Condensed Bold Italic" ;
+};
+
+String STR_SVT_STYLE_CONDENSED_BOLD_OBLIQUE
+{
+    Text [ en-US ] = "Condensed Bold Oblique" ;
+};
+
+String STR_SVT_STYLE_CONDENSED_ITALIC
+{
+    Text [ en-US ] = "Condensed Italic" ;
+};
+
+String STR_SVT_STYLE_CONDENSED_OBLIQUE
+{
+    Text [ en-US ] = "Condensed Oblique" ;
+};
+
+String STR_SVT_STYLE_EXTRALIGHT
+{
+    Text [ en-US ] = "ExtraLight" ;
+};
+
+String STR_SVT_STYLE_EXTRALIGHT_ITALIC
+{
+    Text [ en-US ] = "ExtraLight Italic" ;
+};
+
+String STR_SVT_STYLE_OBLIQUE
+{
+    Text [ en-US ] = "Oblique" ;
+};
+
+String STR_SVT_STYLE_SEMIBOLD
+{
+    Text [ en-US ] = "Semibold" ;
+};
+
+String STR_SVT_STYLE_SEMIBOLD_ITALIC
+{
+    Text [ en-US ] = "Semibold Italic" ;
+};
+
 String STR_SVT_FONTMAP_BOTH
 {
     Text [ en-US ] = "The same font will be used on both your printer and your screen." ;


More information about the Libreoffice-commits mailing list