From d4992bb36efb15da91a70e86e68a80f13b97e947 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Tue, 29 May 2018 12:00:11 +0200 Subject: Change SFErrCodes to scoped enum Change-Id: Ib2f267397e419e8164bb2d732f7cbcca7acad1a6 Reviewed-on: https://gerrit.libreoffice.org/54996 Tested-by: Jenkins Reviewed-by: Stephan Bergmann --- vcl/quartz/salgdi.cxx | 4 ++-- vcl/quartz/salgdicommon.cxx | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'vcl/quartz') diff --git a/vcl/quartz/salgdi.cxx b/vcl/quartz/salgdi.cxx index b0f074b61303..3189ddcb271e 100644 --- a/vcl/quartz/salgdi.cxx +++ b/vcl/quartz/salgdi.cxx @@ -775,8 +775,8 @@ void AquaSalGraphics::GetGlyphWidths( const PhysicalFontFace* pFontData, bool bV // use the font subsetter to get the widths TrueTypeFont* pSftFont = nullptr; - int nRC = ::OpenTTFontBuffer( static_cast(&aBuffer[0]), aBuffer.size(), 0, &pSftFont); - if( nRC != SF_OK ) + SFErrCodes nRC = ::OpenTTFontBuffer( static_cast(&aBuffer[0]), aBuffer.size(), 0, &pSftFont); + if( nRC != SFErrCodes::Ok ) return; const int nGlyphCount = ::GetTTGlyphCount( pSftFont ); diff --git a/vcl/quartz/salgdicommon.cxx b/vcl/quartz/salgdicommon.cxx index 2c4fd043fe5e..e0dfdd721f5f 100644 --- a/vcl/quartz/salgdicommon.cxx +++ b/vcl/quartz/salgdicommon.cxx @@ -225,8 +225,8 @@ bool AquaSalGraphics::CreateFontSubset( const OUString& rToFile, // prepare data for psprint's font subsetter TrueTypeFont* pSftFont = nullptr; - int nRC = ::OpenTTFontBuffer( static_cast(&aBuffer[0]), aBuffer.size(), 0, &pSftFont); - if( nRC != SF_OK ) + SFErrCodes nRC = ::OpenTTFontBuffer( static_cast(&aBuffer[0]), aBuffer.size(), 0, &pSftFont); + if( nRC != SFErrCodes::Ok ) { return false; } @@ -320,7 +320,7 @@ bool AquaSalGraphics::CreateFontSubset( const OUString& rToFile, nRC = ::CreateTTFromTTGlyphs( pSftFont, aToFile.getStr(), aShortIDs, aTempEncs, nGlyphCount ); ::CloseTTFont(pSftFont); - return (nRC == SF_OK); + return (nRC == SFErrCodes::Ok); } static inline void alignLinePoint( const SalPoint* i_pIn, float& o_fX, float& o_fY ) -- cgit