diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-07-28 09:01:19 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-07-28 16:52:06 +0200 |
commit | e8493f9349d18cbcb323930a9bf200c542a72d62 (patch) | |
tree | a682aeb0343b0379a2a9d2d9ea39a7f096115050 /unotools | |
parent | ff41cf1b8dbeb36b8824257acb5c5ba272415108 (diff) |
loplugin:collapseif
Change-Id: I69bfafa97c66ef944cc6ae35c7e2f66d0430d6a4
Reviewed-on: https://gerrit.libreoffice.org/76496
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'unotools')
-rw-r--r-- | unotools/source/misc/fontdefs.cxx | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/unotools/source/misc/fontdefs.cxx b/unotools/source/misc/fontdefs.cxx index f988b5f17759..c8c05c94fe59 100644 --- a/unotools/source/misc/fontdefs.cxx +++ b/unotools/source/misc/fontdefs.cxx @@ -527,19 +527,16 @@ OUString GetSubsFontName( const OUString& rName, SubsFontFlags nFlags ) return aName; const utl::FontNameAttr* pAttr = utl::FontSubstConfiguration::get().getSubstInfo( aOrgName ); - if ( pAttr ) + if ( pAttr && (nFlags & SubsFontFlags::MS) ) { - if( nFlags & SubsFontFlags::MS ) + for( const auto& rSubstitution : pAttr->MSSubstitutions ) + if( ! ImplIsFontToken( rName, rSubstitution ) ) { - for( const auto& rSubstitution : pAttr->MSSubstitutions ) - if( ! ImplIsFontToken( rName, rSubstitution ) ) - { - ImplAppendFontToken( aName, rSubstitution ); - if( nFlags & SubsFontFlags::ONLYONE ) - { - break; - } - } + ImplAppendFontToken( aName, rSubstitution ); + if( nFlags & SubsFontFlags::ONLYONE ) + { + break; + } } } |