diff options
author | Noel Grandin <noel@peralex.com> | 2016-03-07 08:09:35 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2016-03-07 09:16:00 +0000 |
commit | 359e0b47a0f96ffa595a0c38a5e5318d797812fe (patch) | |
tree | 3695eb961668945dda469fc659337cbdd8c89520 /vcl | |
parent | cc84aaf70ac56092b32d1d329143eca0550dce12 (diff) |
loplugin:unuseddefaultparams
Change-Id: Ia414f7845425ef73859ed04853378e96cc738795
Reviewed-on: https://gerrit.libreoffice.org/22971
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/inc/listbox.hxx | 2 | ||||
-rw-r--r-- | vcl/inc/salgdi.hxx | 4 | ||||
-rw-r--r-- | vcl/source/control/imp_listbox.cxx | 4 | ||||
-rw-r--r-- | vcl/source/gdi/pdfwriter_impl.cxx | 6 | ||||
-rw-r--r-- | vcl/source/gdi/pdfwriter_impl.hxx | 4 | ||||
-rw-r--r-- | vcl/source/gdi/print3.cxx | 4 | ||||
-rw-r--r-- | vcl/source/gdi/salgdilayout.cxx | 15 | ||||
-rw-r--r-- | vcl/unx/generic/printer/ppdparser.cxx | 18 |
8 files changed, 21 insertions, 36 deletions
diff --git a/vcl/inc/listbox.hxx b/vcl/inc/listbox.hxx index 262586263be5..040027a29351 100644 --- a/vcl/inc/listbox.hxx +++ b/vcl/inc/listbox.hxx @@ -247,7 +247,7 @@ protected: virtual void LoseFocus() override; bool SelectEntries( sal_Int32 nSelect, LB_EVENT_TYPE eLET, bool bShift = false, bool bCtrl = false, bool bSelectPosChange = false ); - void ImplPaint(vcl::RenderContext& rRenderContext, sal_Int32 nPos, bool bErase = false); + void ImplPaint(vcl::RenderContext& rRenderContext, sal_Int32 nPos); void ImplDoPaint(vcl::RenderContext& rRenderContext, const Rectangle& rRect); void ImplCalcMetrics(); void ImplUpdateEntryMetrics( ImplEntryType& rEntry ); diff --git a/vcl/inc/salgdi.hxx b/vcl/inc/salgdi.hxx index 00a09214b703..3e98291ab39f 100644 --- a/vcl/inc/salgdi.hxx +++ b/vcl/inc/salgdi.hxx @@ -236,8 +236,8 @@ public: void mirror( Rectangle& rRect, const OutputDevice*, bool bBack = false ) const; void mirror( vcl::Region& rRgn, const OutputDevice *pOutDev ) const; void mirror( ImplControlValue&, const OutputDevice* ) const; - basegfx::B2DPoint mirror( const basegfx::B2DPoint& i_rPoint, const OutputDevice *pOutDev, bool bBack = false ) const; - basegfx::B2DPolygon mirror( const basegfx::B2DPolygon& i_rPoly, const OutputDevice *pOutDev, bool bBack = false ) const; + basegfx::B2DPoint mirror( const basegfx::B2DPoint& i_rPoint, const OutputDevice *pOutDev ) const; + basegfx::B2DPolygon mirror( const basegfx::B2DPolygon& i_rPoly, const OutputDevice *pOutDev ) const; basegfx::B2DPolyPolygon mirror( const basegfx::B2DPolyPolygon& i_rPoly, const OutputDevice *pOutDev ) const; // non virtual methods; these do possible coordinate mirroring and diff --git a/vcl/source/control/imp_listbox.cxx b/vcl/source/control/imp_listbox.cxx index b9ecd36cba21..d8fe4dd84886 100644 --- a/vcl/source/control/imp_listbox.cxx +++ b/vcl/source/control/imp_listbox.cxx @@ -1696,7 +1696,7 @@ void ImplListBoxWindow::SelectEntry( vcl::StringEntryIdentifier _entry ) } } -void ImplListBoxWindow::ImplPaint(vcl::RenderContext& rRenderContext, sal_Int32 nPos, bool bErase) +void ImplListBoxWindow::ImplPaint(vcl::RenderContext& rRenderContext, sal_Int32 nPos) { const StyleSettings& rStyleSettings = rRenderContext.GetSettings().GetStyleSettings(); @@ -1721,8 +1721,6 @@ void ImplListBoxWindow::ImplPaint(vcl::RenderContext& rRenderContext, sal_Int32 if (!IsEnabled()) rRenderContext.SetTextColor(rStyleSettings.GetDisableColor()); rRenderContext.SetTextFillColor(); - if (bErase) - rRenderContext.Erase(aRect); } if (IsUserDrawEnabled()) diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx index fef99d636d0b..7a08891ecda0 100644 --- a/vcl/source/gdi/pdfwriter_impl.cxx +++ b/vcl/source/gdi/pdfwriter_impl.cxx @@ -1382,7 +1382,7 @@ GEOMETRY lcl_convert( const MapMode& _rSource, const MapMode& _rDest, OutputDevi } } -void PDFWriterImpl::PDFPage::appendPoint( const Point& rPoint, OStringBuffer& rBuffer, bool bNeg ) const +void PDFWriterImpl::PDFPage::appendPoint( const Point& rPoint, OStringBuffer& rBuffer ) const { Point aPoint( lcl_convert( m_pWriter->m_aGraphicsStack.front().m_aMapMode, m_pWriter->m_aMapMode, @@ -1390,16 +1390,12 @@ void PDFWriterImpl::PDFPage::appendPoint( const Point& rPoint, OStringBuffer& rB rPoint ) ); sal_Int32 nValue = aPoint.X(); - if( bNeg ) - nValue = -nValue; appendFixedInt( nValue, rBuffer ); rBuffer.append( ' ' ); nValue = pointToPixel(getHeight()) - aPoint.Y(); - if( bNeg ) - nValue = -nValue; appendFixedInt( nValue, rBuffer ); } diff --git a/vcl/source/gdi/pdfwriter_impl.hxx b/vcl/source/gdi/pdfwriter_impl.hxx index 6b3b0d10dce7..12b037909867 100644 --- a/vcl/source/gdi/pdfwriter_impl.hxx +++ b/vcl/source/gdi/pdfwriter_impl.hxx @@ -135,11 +135,9 @@ public: // converts point from ref device coordinates to // page coordinates and appends the point to the buffer - // if bNeg is true, the coordinates are inverted AFTER transformation - // to page (useful for transformation matrices // if pOutPoint is set it will be updated to the emitted point // (in PDF map mode, that is 10th of point) - void appendPoint( const Point& rPoint, OStringBuffer& rBuffer, bool bNeg = false ) const; + void appendPoint( const Point& rPoint, OStringBuffer& rBuffer ) const; // appends a B2DPoint without further transformation void appendPixelPoint( const basegfx::B2DPoint& rPoint, OStringBuffer& rBuffer ) const; // appends a rectangle diff --git a/vcl/source/gdi/print3.cxx b/vcl/source/gdi/print3.cxx index e619c5dfe34f..2f35a3bbc062 100644 --- a/vcl/source/gdi/print3.cxx +++ b/vcl/source/gdi/print3.cxx @@ -1781,11 +1781,11 @@ sal_Int64 PrinterOptionsHelper::getIntValue( const OUString& i_rPropertyName, sa return (aVal >>= nRet) ? nRet : i_nDefault; } -OUString PrinterOptionsHelper::getStringValue( const OUString& i_rPropertyName, const OUString& i_rDefault ) const +OUString PrinterOptionsHelper::getStringValue( const OUString& i_rPropertyName ) const { OUString aRet; css::uno::Any aVal( getValue( i_rPropertyName ) ); - return (aVal >>= aRet) ? aRet : i_rDefault; + return (aVal >>= aRet) ? aRet : OUString(); } bool PrinterOptionsHelper::processProperties( const css::uno::Sequence< css::beans::PropertyValue >& i_rNewProp ) diff --git a/vcl/source/gdi/salgdilayout.cxx b/vcl/source/gdi/salgdilayout.cxx index b4df20fa4c1a..4ac52a1307e0 100644 --- a/vcl/source/gdi/salgdilayout.cxx +++ b/vcl/source/gdi/salgdilayout.cxx @@ -234,7 +234,7 @@ void SalGraphics::mirror( Rectangle& rRect, const OutputDevice *pOutDev, bool bB rRect.Move( x - x_org, 0 ); } -basegfx::B2DPoint SalGraphics::mirror( const basegfx::B2DPoint& i_rPoint, const OutputDevice *i_pOutDev, bool i_bBack ) const +basegfx::B2DPoint SalGraphics::mirror( const basegfx::B2DPoint& i_rPoint, const OutputDevice *i_pOutDev ) const { long w; if( i_pOutDev && i_pOutDev->GetOutDevType() == OUTDEV_VIRDEV ) @@ -252,10 +252,7 @@ basegfx::B2DPoint SalGraphics::mirror( const basegfx::B2DPoint& i_rPoint, const OutputDevice *pOutDevRef = const_cast<OutputDevice*>(i_pOutDev); // mirror this window back double devX = w-pOutDevRef->GetOutputWidthPixel()-pOutDevRef->GetOutOffXPixel(); // re-mirrored mnOutOffX - if( i_bBack ) - aRet.setX( i_rPoint.getX() - devX + pOutDevRef->GetOutOffXPixel() ); - else - aRet.setX( devX + (i_rPoint.getX() - pOutDevRef->GetOutOffXPixel()) ); + aRet.setX( devX + (i_rPoint.getX() - pOutDevRef->GetOutOffXPixel()) ); } else aRet.setX( w-1-i_rPoint.getX() ); @@ -263,7 +260,7 @@ basegfx::B2DPoint SalGraphics::mirror( const basegfx::B2DPoint& i_rPoint, const return aRet; } -basegfx::B2DPolygon SalGraphics::mirror( const basegfx::B2DPolygon& i_rPoly, const OutputDevice *i_pOutDev, bool i_bBack ) const +basegfx::B2DPolygon SalGraphics::mirror( const basegfx::B2DPolygon& i_rPoly, const OutputDevice *i_pOutDev ) const { long w; if( i_pOutDev && i_pOutDev->GetOutDevType() == OUTDEV_VIRDEV ) @@ -279,11 +276,11 @@ basegfx::B2DPolygon SalGraphics::mirror( const basegfx::B2DPolygon& i_rPoly, con sal_Int32 nPoints = i_rPoly.count(); for( sal_Int32 i = 0; i < nPoints; i++ ) { - aRet.append( mirror( i_rPoly.getB2DPoint( i ), i_pOutDev, i_bBack ) ); + aRet.append( mirror( i_rPoly.getB2DPoint( i ), i_pOutDev ) ); if( i_rPoly.isPrevControlPointUsed( i ) ) - aRet.setPrevControlPoint( i, mirror( i_rPoly.getPrevControlPoint( i ), i_pOutDev, i_bBack ) ); + aRet.setPrevControlPoint( i, mirror( i_rPoly.getPrevControlPoint( i ), i_pOutDev ) ); if( i_rPoly.isNextControlPointUsed( i ) ) - aRet.setNextControlPoint( i, mirror( i_rPoly.getNextControlPoint( i ), i_pOutDev, i_bBack ) ); + aRet.setNextControlPoint( i, mirror( i_rPoly.getNextControlPoint( i ), i_pOutDev ) ); } aRet.setClosed( i_rPoly.isClosed() ); aRet.flip(); diff --git a/vcl/unx/generic/printer/ppdparser.cxx b/vcl/unx/generic/printer/ppdparser.cxx index bb7db4a0622d..75df5943bb5d 100644 --- a/vcl/unx/generic/printer/ppdparser.cxx +++ b/vcl/unx/generic/printer/ppdparser.cxx @@ -105,21 +105,18 @@ namespace psp OUString translateValue( const OUString& i_rKey, const OUString& i_rOption, - const OUString& i_rValue, - const css::lang::Locale& i_rLocale = css::lang::Locale() + const OUString& i_rValue ) const; OUString translateOption( const OUString& i_rKey, - const OUString& i_rOption, - const css::lang::Locale& i_rLocale = css::lang::Locale() ) const + const OUString& i_rOption ) const { - return translateValue( i_rKey, i_rOption, OUString(), i_rLocale ); + return translateValue( i_rKey, i_rOption, OUString() ); } - OUString translateKey( const OUString& i_rKey, - const css::lang::Locale& i_rLocale = css::lang::Locale() ) const + OUString translateKey( const OUString& i_rKey ) const { - return translateValue( i_rKey, OUString(), OUString(), i_rLocale ); + return translateValue( i_rKey, OUString(), OUString() ); } }; @@ -192,8 +189,7 @@ namespace psp OUString PPDTranslator::translateValue( const OUString& i_rKey, const OUString& i_rOption, - const OUString& i_rValue, - const css::lang::Locale& i_rLocale + const OUString& i_rValue ) const { OUString aResult; @@ -218,7 +214,7 @@ namespace psp { const translation_map& rMap( it->second ); - css::lang::Locale aLoc( normalizeInputLocale( i_rLocale, true ) ); + css::lang::Locale aLoc( normalizeInputLocale( css::lang::Locale(), true ) ); /* FIXME-BCP47: use LanguageTag::getFallbackStrings()? */ for( int nTry = 0; nTry < 4; nTry++ ) { |