[Libreoffice-commits] core.git: Branch 'libreoffice-4-0' - vcl/source

Caolán McNamara caolanm at redhat.com
Thu Aug 29 00:25:28 PDT 2013


 vcl/source/gdi/outdev3.cxx |   21 +++++++++++----------
 1 file changed, 11 insertions(+), 10 deletions(-)

New commits:
commit 6ae2a7521f5ea34d052e7eb51a63f936d1d06aae
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Wed Aug 28 20:22:26 2013 +0100

    Resolves: fdo#68192 always recode from trad symbol to apple symbol
    
    Even if the symbol font bit isn't set, the oox import route lacks the ability
    to state that the bullet font is a font of symbol encoding. If the font is not
    available on the system we go into fallback logic to state that famous symbol
    fonts are in symbol encoding. But there is a symbol font on mac so its not
    unknown and that doesn't happen. And the mac symbol font is not actually in
    symbol encoding (seeing as it's all rearranged into the correct unicode
    positions) so the recode logic is skipped in this special case to map the
    microsoft/adobe private use area chars to the modern code points where they
    were moved in the apple font.
    
    I guess one alternative possible solution is to lookup all the fonts used in a
    openxml doc using the fonttable stream where the charset info is available. But
    seeing as it should only affect one particular font lets just move the encoder
    test outside the issymbol block.
    
    (cherry picked from commit b129867306ce918f4f8fbf9ec5f7dce86e52c9d2)
    
    Conflicts:
    	vcl/source/gdi/outdev3.cxx
    
    Change-Id: Ic5bd3ec15c8d8d99e2cab0fb67cc4bc33081c756
    Reviewed-on: https://gerrit.libreoffice.org/5670
    Reviewed-by: Fridrich Strba <fridrich at documentfoundation.org>
    Tested-by: Fridrich Strba <fridrich at documentfoundation.org>

diff --git a/vcl/source/gdi/outdev3.cxx b/vcl/source/gdi/outdev3.cxx
index f7640f8..0350c83 100644
--- a/vcl/source/gdi/outdev3.cxx
+++ b/vcl/source/gdi/outdev3.cxx
@@ -2420,22 +2420,23 @@ ImplFontEntry* ImplFontCache::GetFontEntry( ImplDevFontList* pFontList,
         pEntry = pFontData->CreateFontInstance( aFontSelData );
 
         // if we found a different symbol font we need a symbol conversion table
-        if( pFontData->IsSymbolFont() )
+        if( pFontData->IsSymbolFont() || aFontSelData.IsSymbolFont() )
         {
             if( aFontSelData.maTargetName != aFontSelData.maSearchName )
                 pEntry->mpConversion = ConvertChar::GetRecodeData( aFontSelData.maTargetName, aFontSelData.maSearchName );
+        }
+
 #ifdef MACOSX
-            //It might be better to dig out the font version of the target font
-            //to see if it's a modern re-coded apple symbol font in case that
-            //font shows up on a different platform
-            if (!pEntry->mpConversion &&
-                aFontSelData.maTargetName.EqualsIgnoreCaseAscii("symbol") &&
-                aFontSelData.maSearchName.EqualsIgnoreCaseAscii("symbol"))
-            {
+        //It might be better to dig out the font version of the target font
+        //to see if it's a modern re-coded apple symbol font in case that
+        //font shows up on a different platform
+        if (!pEntry->mpConversion &&
+            aFontSelData.maTargetName.EqualsIgnoreCaseAscii("symbol") &&
+            aFontSelData.maSearchName.EqualsIgnoreCaseAscii("symbol"))
+        {
                 pEntry->mpConversion = ConvertChar::GetRecodeData( OUString("Symbol"), OUString("AppleSymbol") );
-            }
-#endif
         }
+#endif
 
         // add the new entry to the cache
         maFontInstanceList[ aFontSelData ] = pEntry;


More information about the Libreoffice-commits mailing list