diff options
Diffstat (limited to 'vcl/unx/generic/fontmanager/fontmanager.cxx')
-rw-r--r-- | vcl/unx/generic/fontmanager/fontmanager.cxx | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/vcl/unx/generic/fontmanager/fontmanager.cxx b/vcl/unx/generic/fontmanager/fontmanager.cxx index 5cc202c4f2c7..895cbfd91dcb 100644 --- a/vcl/unx/generic/fontmanager/fontmanager.cxx +++ b/vcl/unx/generic/fontmanager/fontmanager.cxx @@ -663,14 +663,14 @@ PrintFontManager::PrintFontManager() , m_nNextDirAtom( 1 ) , m_pFontCache( nullptr ) { - for( unsigned int i = 0; i < SAL_N_ELEMENTS( aAdobeCodes ); i++ ) + for(const AdobeEncEntry& rEntry : aAdobeCodes) { - m_aUnicodeToAdobename.insert( std::unordered_multimap< sal_Unicode, OString >::value_type( aAdobeCodes[i].aUnicode, aAdobeCodes[i].pAdobename ) ); - m_aAdobenameToUnicode.insert( std::unordered_multimap< OString, sal_Unicode, OStringHash >::value_type( aAdobeCodes[i].pAdobename, aAdobeCodes[i].aUnicode ) ); - if( aAdobeCodes[i].aAdobeStandardCode ) + m_aUnicodeToAdobename.insert( std::unordered_multimap< sal_Unicode, OString >::value_type( rEntry.aUnicode, rEntry.pAdobename ) ); + m_aAdobenameToUnicode.insert( std::unordered_multimap< OString, sal_Unicode, OStringHash >::value_type( rEntry.pAdobename, rEntry.aUnicode ) ); + if( rEntry.aAdobeStandardCode ) { - m_aUnicodeToAdobecode.insert( std::unordered_multimap< sal_Unicode, sal_uInt8 >::value_type( aAdobeCodes[i].aUnicode, aAdobeCodes[i].aAdobeStandardCode ) ); - m_aAdobecodeToUnicode.insert( std::unordered_multimap< sal_uInt8, sal_Unicode >::value_type( aAdobeCodes[i].aAdobeStandardCode, aAdobeCodes[i].aUnicode ) ); + m_aUnicodeToAdobecode.insert( std::unordered_multimap< sal_Unicode, sal_uInt8 >::value_type( rEntry.aUnicode, rEntry.aAdobeStandardCode ) ); + m_aAdobecodeToUnicode.insert( std::unordered_multimap< sal_uInt8, sal_Unicode >::value_type( rEntry.aAdobeStandardCode, rEntry.aUnicode ) ); } } @@ -789,11 +789,11 @@ bool PrintFontManager::analyzeFontFile( int nDirID, const OString& rFontFile, :: // first look for an adjacent file static const char* pSuffix[] = { ".afm", ".AFM" }; - for( unsigned int i = 0; i < SAL_N_ELEMENTS(pSuffix); i++ ) + for(const char* i : pSuffix) { OString aName = OStringBuffer( rFontFile.copy(0, rFontFile.getLength() - 4)). - append(pSuffix[i]).makeStringAndClear(); + append(i).makeStringAndClear(); OStringBuffer aFilePath(aDir); aFilePath.append('/').append(aName); |