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 /vcl/source | |
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 'vcl/source')
-rw-r--r-- | vcl/source/filter/wmf/wmfwr.cxx | 6 | ||||
-rw-r--r-- | vcl/source/gdi/metaact.cxx | 6 | ||||
-rw-r--r-- | vcl/source/gdi/outdev3.cxx | 3 |
3 files changed, 4 insertions, 11 deletions
diff --git a/vcl/source/filter/wmf/wmfwr.cxx b/vcl/source/filter/wmf/wmfwr.cxx index 1b862bab8005..385c3fd58a14 100644 --- a/vcl/source/filter/wmf/wmfwr.cxx +++ b/vcl/source/filter/wmf/wmfwr.cxx @@ -394,12 +394,6 @@ void WMFWriter::WMFRecord_Ellipse(const Rectangle & rRect) WriteRectangle(rRect); } -bool IsStarSymbol(const String &rStr) -{ - return rStr.EqualsIgnoreCaseAscii("starsymbol") || - rStr.EqualsIgnoreCaseAscii("opensymbol"); -} - void WMFWriter::WMFRecord_Escape( sal_uInt32 nEsc, sal_uInt32 nLen, const sal_Int8* pData ) { #ifdef OSL_BIGENDIAN diff --git a/vcl/source/gdi/metaact.cxx b/vcl/source/gdi/metaact.cxx index ef702cc969cd..417c9d65dd2c 100644 --- a/vcl/source/gdi/metaact.cxx +++ b/vcl/source/gdi/metaact.cxx @@ -26,6 +26,7 @@ #include <vcl/metaact.hxx> #include <vcl/graphictools.hxx> #include <basegfx/matrix/b2dhommatrixtools.hxx> +#include <unotools/fontdefs.hxx> // ======================================================================== @@ -3437,9 +3438,8 @@ MetaFontAction::MetaFontAction( const Font& rFont ) : // we change the textencoding to RTL_TEXTENCODING_UNICODE here, which seems // to be the right way; changing the textencoding at other sources // is too dangerous at the moment - if( ( ( maFont.GetName().SearchAscii( "StarSymbol" ) != STRING_NOTFOUND ) - || ( maFont.GetName().SearchAscii( "OpenSymbol" ) != STRING_NOTFOUND ) ) - && ( maFont.GetCharSet() != RTL_TEXTENCODING_UNICODE ) ) + if ( IsStarSymbol( maFont.GetName() ) + && ( maFont.GetCharSet() != RTL_TEXTENCODING_UNICODE ) ) { maFont.SetCharSet( RTL_TEXTENCODING_UNICODE ); } diff --git a/vcl/source/gdi/outdev3.cxx b/vcl/source/gdi/outdev3.cxx index 3281557b2ef0..359b82c2b5df 100644 --- a/vcl/source/gdi/outdev3.cxx +++ b/vcl/source/gdi/outdev3.cxx @@ -695,8 +695,7 @@ PhysicalFontFace::PhysicalFontFace( const ImplDevFontAttributes& rDFA, int nMagi { // StarSymbol is a unicode font, but it still deserves the symbol flag if( !IsSymbolFont() ) - if( GetFamilyName().startsWithIgnoreAsciiCase( "starsymbol" ) - || GetFamilyName().startsWithIgnoreAsciiCase( "opensymbol" ) ) + if ( IsStarSymbol( GetFamilyName() ) ) SetSymbolFlag( true ); } |