diff options
author | Thomas Arnhold <thomas@arnhold.org> | 2013-05-28 10:53:03 +0200 |
---|---|---|
committer | Luboš Luňák <l.lunak@suse.cz> | 2013-05-30 15:54:47 +0000 |
commit | 8079f40743f86c4f7e6c9af8393ff699378a0797 (patch) | |
tree | 603420522e53a4af25237a09940f04aa70b419bf /unotools | |
parent | 07e756f5b9fa5d499de8f3e3ad61ee66d336a349 (diff) |
Make use of IsStarSymbol()
Change-Id: I7a2e3a6f11bbaaaff50e8163e4ce3e2583b1d03c
Reviewed-on: https://gerrit.libreoffice.org/4077
Reviewed-by: Luboš Luňák <l.lunak@suse.cz>
Tested-by: Luboš Luňák <l.lunak@suse.cz>
Diffstat (limited to 'unotools')
-rw-r--r-- | unotools/source/misc/fontcvt.cxx | 2 | ||||
-rw-r--r-- | unotools/source/misc/fontdefs.cxx | 8 |
2 files changed, 9 insertions, 1 deletions
diff --git a/unotools/source/misc/fontcvt.cxx b/unotools/source/misc/fontcvt.cxx index 93d7f9917780..2b44624c39a2 100644 --- a/unotools/source/misc/fontcvt.cxx +++ b/unotools/source/misc/fontcvt.cxx @@ -1354,7 +1354,7 @@ sal_Unicode ConvertChar::RecodeChar( sal_Unicode cChar ) const if (!cRetVal && mpSubsFontName) { - if (!strcmp(mpSubsFontName, "OpenSymbol") || (!strcmp(mpSubsFontName, "StarSymbol"))) + if ( IsStarSymbol( OUString::createFromAscii(mpSubsFontName) ) ) { cRetVal = 0xE12C; SAL_WARN( "unotools.misc", "Forcing a bullet substition from 0x" << diff --git a/unotools/source/misc/fontdefs.cxx b/unotools/source/misc/fontdefs.cxx index 0932c172c300..b81a5b38c012 100644 --- a/unotools/source/misc/fontdefs.cxx +++ b/unotools/source/misc/fontdefs.cxx @@ -597,4 +597,12 @@ int FontNameHash::operator()( const String& rStr ) const return nHash; } +bool IsStarSymbol(const OUString &rFontName) +{ + sal_Int32 nIndex = 0; + OUString sFamilyNm(GetNextFontToken(rFontName, nIndex)); + return (sFamilyNm.equalsIgnoreAsciiCase("starsymbol") || + sFamilyNm.equalsIgnoreAsciiCase("opensymbol")); +} + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |