diff options
author | Noel Grandin <noel@peralex.com> | 2016-03-16 08:49:35 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2016-03-16 08:42:37 +0000 |
commit | f0f973da8560e16cba85d2c9465c3a8c4c0ebbb3 (patch) | |
tree | 0b6d78c3b16acc698dee15d83422a924be71097f /vcl/source/outdev/font.cxx | |
parent | 6eb91bdf75fe0085584efa6abf955c14c7acb9fd (diff) |
loplugin:constantparams in vcl/
also some improvements to the plugin
Change-Id: I0e3a519d70756e577fcb1bd47dd66864b5b4c871
Reviewed-on: https://gerrit.libreoffice.org/23289
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'vcl/source/outdev/font.cxx')
-rw-r--r-- | vcl/source/outdev/font.cxx | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/vcl/source/outdev/font.cxx b/vcl/source/outdev/font.cxx index 7b1ed3abfb88..7d9a14dcefb2 100644 --- a/vcl/source/outdev/font.cxx +++ b/vcl/source/outdev/font.cxx @@ -725,15 +725,14 @@ sal_uInt16 OutputDevice::GetFontSubstituteCount() } bool ImplDirectFontSubstitution::FindFontSubstitute( OUString& rSubstName, - const OUString& rSearchName, AddFontSubstituteFlags nFlags ) const + const OUString& rSearchName ) const { // TODO: get rid of O(N) searches FontSubstList::const_iterator it = maFontSubstList.begin(); for(; it != maFontSubstList.end(); ++it ) { const ImplFontSubstEntry& rEntry = *it; - if( ((rEntry.mnFlags & nFlags) || nFlags == AddFontSubstituteFlags::NONE) - && (rEntry.maSearchName == rSearchName) ) + if( (rEntry.mnFlags & AddFontSubstituteFlags::ALWAYS) && rEntry.maSearchName == rSearchName ) { rSubstName = rEntry.maSearchReplaceName; return true; @@ -752,7 +751,7 @@ void ImplFontSubstitute( OUString& rFontName ) // apply user-configurable font replacement (eg, from the list in Tools->Options) const ImplDirectFontSubstitution* pSubst = ImplGetSVData()->maGDIData.mpDirectFontSubst; - if( pSubst && pSubst->FindFontSubstitute( aSubstFontName, rFontName, AddFontSubstituteFlags::ALWAYS ) ) + if( pSubst && pSubst->FindFontSubstitute( aSubstFontName, rFontName ) ) { rFontName = aSubstFontName; return; |