[Libreoffice-commits] core.git: 2 commits - vcl/generic vcl/source

Thomas Arnhold thomas at arnhold.org
Sun May 19 09:09:10 PDT 2013


 vcl/generic/fontmanager/fontsubst.cxx |    8 ++++----
 vcl/source/gdi/outdev3.cxx            |    8 ++++----
 2 files changed, 8 insertions(+), 8 deletions(-)

New commits:
commit 43c234b0481fe63b8c4823affad066c6362f5068
Author: Thomas Arnhold <thomas at arnhold.org>
Date:   Sun May 19 18:00:39 2013 +0200

    fix OUString conversion
    
    Both were CompareIgnoreCaseToAscii( "starsymbol", 10) which is
    startsWithIgnoreCaseAscii.
    
    Fixes 7d1f4cdec307bb1e761bb5dd3d8231bba5833e10
    
    Change-Id: I21e2eb8c578b65d5f0e4181ed64af02ec480463e

diff --git a/vcl/generic/fontmanager/fontsubst.cxx b/vcl/generic/fontmanager/fontsubst.cxx
index 36c683d..900125b 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(rFontSelData.maSearchName.startsWith( "starsymbol" )
-    || rFontSelData.maSearchName.startsWith( "opensymbol" ) )
+    if(rFontSelData.maSearchName.startsWithIgnoreAsciiCase( "starsymbol" )
+    || rFontSelData.maSearchName.startsWithIgnoreAsciiCase( "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(rFontSelData.maSearchName.startsWith( "starsymbol" )
-    || rFontSelData.maSearchName.startsWith( "opensymbol" ) )
+    if(rFontSelData.maSearchName.startsWithIgnoreAsciiCase( "starsymbol" )
+    || rFontSelData.maSearchName.startsWithIgnoreAsciiCase( "opensymbol" ) )
         return false;
 
     const FontSelectPattern aOut = GetFcSubstitute( rFontSelData, rMissingCodes );
diff --git a/vcl/source/gdi/outdev3.cxx b/vcl/source/gdi/outdev3.cxx
index 6744597..87dfec7 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( GetFamilyName().startsWith( "starsymbol")
-        ||  GetFamilyName().startsWith( "opensymbol") )
+        if( GetFamilyName().startsWithIgnoreAsciiCase( "starsymbol" )
+        ||  GetFamilyName().startsWithIgnoreAsciiCase( "opensymbol" ) )
             SetSymbolFlag( true );
 }
 
commit 79e5615fa103a52ce41ed682b624c13fd9a9d1eb
Author: Thomas Arnhold <thomas at arnhold.org>
Date:   Sun May 19 17:49:37 2013 +0200

    fix OUString conversion
    
    Both were EqualsIgnoreCaseAscii before.
    
    Fixes 7d1f4cdec307bb1e761bb5dd3d8231bba5833e10 and
    754fee5d1b6adcc04b58a834c84568585afd728a.
    
    Thanks to Julien pointing this out :)
    
    Change-Id: I1a1983b642ca5b49a76f4e238a9eeb78e8234e9e

diff --git a/vcl/source/gdi/outdev3.cxx b/vcl/source/gdi/outdev3.cxx
index 6a0bbc2..6744597 100644
--- a/vcl/source/gdi/outdev3.cxx
+++ b/vcl/source/gdi/outdev3.cxx
@@ -755,11 +755,11 @@ bool PhysicalFontFace::IsBetterMatch( const FontSelectPattern& rFSD, FontMatchSt
     int nMatch = 0;
 
     const OUString& rFontName = rFSD.maTargetName;
-    if( rFontName == GetFamilyName() )
+    if( rFontName == GetFamilyName() || rFontName.equalsIgnoreAsciiCase( GetFamilyName() ) )
         nMatch += 240000;
 
     if( rStatus.mpTargetStyleName
-    &&  GetStyleName() == rStatus.mpTargetStyleName )
+    &&  GetStyleName().equalsIgnoreAsciiCase( rStatus.mpTargetStyleName ) )
         nMatch += 120000;
 
     if( (rFSD.GetPitch() != PITCH_DONTKNOW) && (rFSD.GetPitch() == GetPitch()) )


More information about the Libreoffice-commits mailing list