[Libreoffice-commits] core.git: vcl/unx

Stephan Bergmann sbergman at redhat.com
Wed May 30 12:43:58 UTC 2018


 vcl/unx/generic/fontmanager/fontmanager.cxx |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

New commits:
commit 3f398fe61131adf72a0c9bd707337f0129dc7e6b
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Wed May 30 11:44:46 2018 +0200

    Log error code
    
    Change-Id: I6550af7949e4838d9f23310fe5ab49fb6b466eaf
    Reviewed-on: https://gerrit.libreoffice.org/55053
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Stephan Bergmann <sbergman at redhat.com>

diff --git a/vcl/unx/generic/fontmanager/fontmanager.cxx b/vcl/unx/generic/fontmanager/fontmanager.cxx
index 460a07c3c145..faf4ba614f8b 100644
--- a/vcl/unx/generic/fontmanager/fontmanager.cxx
+++ b/vcl/unx/generic/fontmanager/fontmanager.cxx
@@ -562,7 +562,8 @@ bool PrintFontManager::analyzeSfntFile( PrintFont* pFont ) const
     OString aFile = getFontFile( pFont );
     TrueTypeFont* pTTFont = nullptr;
 
-    if( OpenTTFontFile( aFile.getStr(), pFont->m_nCollectionEntry, &pTTFont ) == SFErrCodes::Ok )
+    auto const e = OpenTTFontFile( aFile.getStr(), pFont->m_nCollectionEntry, &pTTFont );
+    if( e == SFErrCodes::Ok )
     {
         TTGlobalFontInfo aInfo;
         GetTTGlobalFontInfo( pTTFont, & aInfo );
@@ -691,7 +692,7 @@ bool PrintFontManager::analyzeSfntFile( PrintFont* pFont ) const
         bSuccess = true;
     }
     else
-        SAL_WARN("vcl.fonts", "Could not OpenTTFont \"" << aFile << "\"");
+        SAL_WARN("vcl.fonts", "Could not OpenTTFont \"" << aFile << "\": " << int(e));
 
     return bSuccess;
 }


More information about the Libreoffice-commits mailing list