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 | |
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')
-rw-r--r-- | vcl/source/outdev/font.cxx | 7 | ||||
-rw-r--r-- | vcl/source/outdev/text.cxx | 12 |
2 files changed, 9 insertions, 10 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; diff --git a/vcl/source/outdev/text.cxx b/vcl/source/outdev/text.cxx index 711196f6db85..33e0fdc45097 100644 --- a/vcl/source/outdev/text.cxx +++ b/vcl/source/outdev/text.cxx @@ -2827,7 +2827,7 @@ bool OutputDevice::GetTextOutlines( basegfx::B2DPolyPolygonVector& rVector, bool OutputDevice::GetTextOutlines( PolyPolyVector& rResultVector, const OUString& rStr, sal_Int32 nBase, - sal_Int32 nIndex, sal_Int32 nLen, bool bOptimize, + sal_Int32 nIndex, sal_Int32 nLen, sal_uLong nTWidth, const long* pDXArray ) const { if(nLen == 0x0FFFF) @@ -2841,7 +2841,7 @@ bool OutputDevice::GetTextOutlines( PolyPolyVector& rResultVector, // get the basegfx polypolygon vector basegfx::B2DPolyPolygonVector aB2DPolyPolyVector; if( !GetTextOutlines( aB2DPolyPolyVector, rStr, nBase, nIndex, nLen, - bOptimize, nTWidth, pDXArray ) ) + true/*bOptimize*/, nTWidth, pDXArray ) ) return false; // convert to a tool polypolygon vector @@ -2854,8 +2854,8 @@ bool OutputDevice::GetTextOutlines( PolyPolyVector& rResultVector, } bool OutputDevice::GetTextOutline( tools::PolyPolygon& rPolyPoly, const OUString& rStr, - sal_Int32 nBase, sal_Int32 nIndex, sal_Int32 nLen, - bool bOptimize, sal_uLong nTWidth, const long* pDXArray ) const + sal_Int32 nLen, + sal_uLong nTWidth, const long* pDXArray ) const { if(nLen == 0x0FFFF) { @@ -2866,8 +2866,8 @@ bool OutputDevice::GetTextOutline( tools::PolyPolygon& rPolyPoly, const OUString // get the basegfx polypolygon vector basegfx::B2DPolyPolygonVector aB2DPolyPolyVector; - if( !GetTextOutlines( aB2DPolyPolyVector, rStr, nBase, nIndex, nLen, - bOptimize, nTWidth, pDXArray ) ) + if( !GetTextOutlines( aB2DPolyPolyVector, rStr, 0/*nBase*/, 0/*nIndex*/, nLen, + true/*bOptimize*/, nTWidth, pDXArray ) ) return false; // convert and merge into a tool polypolygon |