[Libreoffice-commits] core.git: svtools/source

Caolán McNamara caolanm at redhat.com
Tue Jun 20 10:48:05 UTC 2017


 svtools/source/misc/sampletext.cxx |   10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)

New commits:
commit ea43d65bd3785a04a6dcf073611cee03ee289cee
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue Jun 20 11:46:41 2017 +0100

    reuse IsStarSymbol
    
    Change-Id: Ia4df4925f9c0078d098880d2a4a5042bb309a72c

diff --git a/svtools/source/misc/sampletext.cxx b/svtools/source/misc/sampletext.cxx
index b3a96864e2fb..59da7c6ffd6e 100644
--- a/svtools/source/misc/sampletext.cxx
+++ b/svtools/source/misc/sampletext.cxx
@@ -103,12 +103,6 @@ static UScriptCode lcl_getHardCodedScriptNameForFont (const OutputDevice &rDevic
     return USCRIPT_INVALID_CODE;
 }
 
-bool isOpenSymbolFont(const vcl::Font &rFont)
-{
-    return rFont.GetFamilyName().equalsIgnoreAsciiCase("starsymbol") ||
-           rFont.GetFamilyName().equalsIgnoreAsciiCase("opensymbol");
-}
-
 bool isSymbolFont(const vcl::Font &rFont)
 {
     return (rFont.GetCharSet() == RTL_TEXTENCODING_SYMBOL) ||
@@ -136,7 +130,7 @@ bool isSymbolFont(const vcl::Font &rFont)
             rFont.GetFamilyName().startsWith("STIXNonUnicode") ||
             rFont.GetFamilyName().startsWith("STIXSize") ||
             rFont.GetFamilyName().startsWith("STIXVariants") ||
-            isOpenSymbolFont(rFont);
+            IsStarSymbol(rFont.GetFamilyName());
 }
 
 bool canRenderNameOfSelectedFont(OutputDevice &rDevice)
@@ -161,7 +155,7 @@ OUString makeShortRepresentativeSymbolTextForSelectedFont(OutputDevice &rDevice)
         return OUString(aImplAdobeSymbolText);
     }
 
-    const bool bOpenSymbol = isOpenSymbolFont(rDevice.GetFont());
+    const bool bOpenSymbol = IsStarSymbol(rDevice.GetFont().GetFamilyName());
 
     if (!bOpenSymbol)
     {


More information about the Libreoffice-commits mailing list