summaryrefslogtreecommitdiff
path: root/vcl/source/gdi
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-03-07 08:09:35 +0200
committerNoel Grandin <noelgrandin@gmail.com>2016-03-07 09:16:00 +0000
commit359e0b47a0f96ffa595a0c38a5e5318d797812fe (patch)
tree3695eb961668945dda469fc659337cbdd8c89520 /vcl/source/gdi
parentcc84aaf70ac56092b32d1d329143eca0550dce12 (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/source/gdi')
-rw-r--r--vcl/source/gdi/pdfwriter_impl.cxx6
-rw-r--r--vcl/source/gdi/pdfwriter_impl.hxx4
-rw-r--r--vcl/source/gdi/print3.cxx4
-rw-r--r--vcl/source/gdi/salgdilayout.cxx15
4 files changed, 10 insertions, 19 deletions
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();