vcl/generic/fontmanager/fontsubst.cxx | 8 ++++---- vcl/source/gdi/outdev3.cxx | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-)
New commits: commit 3384f229a4a3812f57bd8864e9c916e6443a4899 Author: ricardobotto <andarilho.bo...@gmail.com> Date: Sat May 18 16:24:19 2013 -0300 Changed compareTo to startsWith Change-Id: Ia72e220f29c26bdf789bd3f1102b850aafcf525d Reviewed-on: https://gerrit.libreoffice.org/3956 Reviewed-by: Thomas Arnhold <tho...@arnhold.org> Tested-by: Thomas Arnhold <tho...@arnhold.org> diff --git a/vcl/generic/fontmanager/fontsubst.cxx b/vcl/generic/fontmanager/fontsubst.cxx index 94dcda1..36c683d 100644 --- a/vcl/generic/fontmanager/fontsubst.cxx +++ b/vcl/generic/fontmanager/fontsubst.cxx @@ -160,8 +160,8 @@ bool FcPreMatchSubstititution::FindFontSubstitute( FontSelectPattern &rFontSelDa if( rFontSelData.IsSymbolFont() ) return false; // StarSymbol is a unicode font, but it still deserves the symbol flag - if( 0 == rFontSelData.maSearchName.compareTo( "starsymbol", 10) - || 0 == rFontSelData.maSearchName.compareTo( "opensymbol", 10) ) + if(rFontSelData.maSearchName.startsWith( "starsymbol" ) + || rFontSelData.maSearchName.startsWith( "opensymbol" ) ) return false; //see fdo#41556 and fdo#47636 @@ -229,8 +229,8 @@ bool FcGlyphFallbackSubstititution::FindFontSubstitute( FontSelectPattern& rFont if( rFontSelData.IsSymbolFont() ) return false; // StarSymbol is a unicode font, but it still deserves the symbol flag - if( 0 == rFontSelData.maSearchName.compareTo( "starsymbol", 10) - || 0 == rFontSelData.maSearchName.compareTo( "opensymbol", 10) ) + if(rFontSelData.maSearchName.startsWith( "starsymbol" ) + || rFontSelData.maSearchName.startsWith( "opensymbol" ) ) return false; const FontSelectPattern aOut = GetFcSubstitute( rFontSelData, rMissingCodes ); diff --git a/vcl/source/gdi/outdev3.cxx b/vcl/source/gdi/outdev3.cxx index 573b472..5274634 100644 --- a/vcl/source/gdi/outdev3.cxx +++ b/vcl/source/gdi/outdev3.cxx @@ -695,8 +695,8 @@ PhysicalFontFace::PhysicalFontFace( const ImplDevFontAttributes& rDFA, int nMagi { // StarSymbol is a unicode font, but it still deserves the symbol flag if( !IsSymbolFont() ) - if( 0 == GetFamilyName().compareTo( "starsymbol", 10) - || 0 == GetFamilyName().compareTo( "opensymbol", 10) ) + if( GetFamilyName().startsWith( "starsymbol") + || GetFamilyName().startsWith( "opensymbol") ) SetSymbolFlag( true ); } @@ -755,11 +755,11 @@ bool PhysicalFontFace::IsBetterMatch( const FontSelectPattern& rFSD, FontMatchSt int nMatch = 0; const OUString& rFontName = rFSD.maTargetName; - if( (rFontName == GetFamilyName()) || rFontName.compareTo( GetFamilyName() ) ) + if( (rFontName == GetFamilyName()) || rFontName == GetFamilyName() ) nMatch += 240000; if( rStatus.mpTargetStyleName - && GetStyleName().compareTo( rStatus.mpTargetStyleName ) ) + && GetStyleName() == rStatus.mpTargetStyleName ) nMatch += 120000; if( (rFSD.GetPitch() != PITCH_DONTKNOW) && (rFSD.GetPitch() == GetPitch()) ) _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits