[Libreoffice-commits] .: vcl/source

David Tardon dtardon at kemper.freedesktop.org
Mon Oct 11 01:30:53 PDT 2010


 vcl/source/gdi/outdev3.cxx |    7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

New commits:
commit d368a35d51b9efc3e3a026c65c7a6130609c2f8f
Author: David Tardon <dtardon at redhat.com>
Date:   Mon Oct 11 10:29:56 2010 +0200

    #i114706# fix adding font aliases

diff --git a/vcl/source/gdi/outdev3.cxx b/vcl/source/gdi/outdev3.cxx
index 01357d4..90a7691 100644
--- a/vcl/source/gdi/outdev3.cxx
+++ b/vcl/source/gdi/outdev3.cxx
@@ -1503,7 +1503,8 @@ void ImplDevFontList::Add( ImplFontData* pNewData )
     pNewData->maMapNames = String();
 
     bool bKeepNewData = false;
-    for( xub_StrLen nMapNameIndex = 0; nMapNameIndex != STRING_NOTFOUND; )
+    xub_StrLen nMapNameIndex = 0;
+    while( true )
     {
         String aSearchName = pNewData->maName;
         GetEnglishSearchFontName( aSearchName );
@@ -1521,9 +1522,9 @@ void ImplDevFontList::Add( ImplFontData* pNewData )
 
         bKeepNewData = pFoundData->AddFontFace( pNewData );
 
-        // add font alias if available
+        // add (another) font alias if available
         // a font alias should never win against an original font with similar quality
-        if( aMapNames.Len() >= nMapNameIndex )
+        if( aMapNames.Len() <= nMapNameIndex )
             break;
         if( bKeepNewData ) // try to recycle obsoleted object
             pNewData = pNewData->CreateAlias();


More information about the Libreoffice-commits mailing list