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

Caolán McNamara caolanm at redhat.com
Thu Jul 11 12:05:35 PDT 2013


 vcl/generic/fontmanager/fontcache.cxx   |    8 ++++----
 vcl/generic/fontmanager/fontmanager.cxx |    1 +
 2 files changed, 5 insertions(+), 4 deletions(-)

New commits:
commit bfc060597078ff19fffbcbe21fb1dd41655a9e4c
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Jul 11 17:16:39 2013 +0100

    Related: fdo#66524 don't invalidate font cache every time
    
    The afm dirs are misdetected as having had something in it in the past and
    having nothing in it now.
    
    AFAICS it seems that this particular code has always been like this, so keeping
    this fix separate for master only.
    
    Change-Id: I8960d0b0d22ee24d5691eecdce262011dc141ea6

diff --git a/vcl/generic/fontmanager/fontmanager.cxx b/vcl/generic/fontmanager/fontmanager.cxx
index 7f2332c..2ab8e6c 100644
--- a/vcl/generic/fontmanager/fontmanager.cxx
+++ b/vcl/generic/fontmanager/fontmanager.cxx
@@ -1831,6 +1831,7 @@ void PrintFontManager::initialize()
                                 m_aFontFileToFontID[ aFileName ].insert( m_nNextFontID );
                                 m_aFonts[ m_nNextFontID++ ] = *it;
                                 m_pFontCache->updateFontCacheEntry( *it, false );
+                                ++nDirFonts;
 #if OSL_DEBUG_LEVEL > 2
                                 nBuiltinFonts++;
 #endif
commit 019a8f3f74ec778d5fead4d2b4d47e75cf750bf7
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Jul 11 19:32:57 2013 +0100

    Resolves: fdo#66524 string conversion gone wrong
    
    Change-Id: Ie885514cdfaecc14ac57bb53a2da7c51274d54b0

diff --git a/vcl/generic/fontmanager/fontcache.cxx b/vcl/generic/fontmanager/fontcache.cxx
index 0d14d48..0f6c677 100644
--- a/vcl/generic/fontmanager/fontcache.cxx
+++ b/vcl/generic/fontmanager/fontcache.cxx
@@ -264,10 +264,10 @@ void FontCache::read()
     do
     {
         aStream.ReadLine( aLine );
-        if( aLine == "FontCacheDirectory:" ||
-            aLine == "EmptyFontCacheDirectory:" )
+        if( aLine.startsWith("FontCacheDirectory:") ||
+            aLine.startsWith("EmptyFontCacheDirectory:") )
         {
-            bool bEmpty = (aLine == "Empty" );
+            bool bEmpty = aLine.startsWith("Empty");
             sal_Int32 nSearchIndex = bEmpty ? 24 : 19;
 
             OString aDir;
@@ -309,7 +309,7 @@ void FontCache::read()
                 m_aCache[ nDir ].m_bUserOverrideOnly = bKeepOnlyUserOverridden;
             }
         }
-        else if( pDir && aLine == "File:")
+        else if( pDir && aLine.startsWith("File:") )
         {
             OString aFile( aLine.copy( 5 ) );
             aStream.ReadLine( aLine );


More information about the Libreoffice-commits mailing list