vcl/source/gdi/salgdilayout.cxx | 36 ++++++------------------------------ 1 file changed, 6 insertions(+), 30 deletions(-)
New commits: commit 28effca640fff262866d1d3ada6e51a3821a6725 Author: Chris Sherlock <chris.sherloc...@gmail.com> Date: Sat Nov 15 17:05:11 2014 +1100 vcl: SalGraphics::mirror() - always use GetGraphicsWidth() There's never a case where we need to get the width from VirtualDevice, we really should only get it from the SalGraphics instance. This vastly simplifies matters. Change-Id: I8bae9c163fcb0ce5d064d802c2783437124ebcb2 Reviewed-on: https://gerrit.libreoffice.org/12473 Reviewed-by: Chris Sherlock <chris.sherloc...@gmail.com> Tested-by: Chris Sherlock <chris.sherloc...@gmail.com> diff --git a/vcl/source/gdi/salgdilayout.cxx b/vcl/source/gdi/salgdilayout.cxx index 599500b..e9bed70 100644 --- a/vcl/source/gdi/salgdilayout.cxx +++ b/vcl/source/gdi/salgdilayout.cxx @@ -88,11 +88,7 @@ bool SalGraphics::drawTransformedBitmap( void SalGraphics::mirror( long& x, const OutputDevice *pOutDev, bool bBack ) const { - long w; - if( pOutDev && pOutDev->GetOutDevType() == OUTDEV_VIRDEV ) - w = pOutDev->GetOutputWidthPixel(); - else - w = GetGraphicsWidth(); + long w = GetGraphicsWidth(); if( w ) { @@ -124,11 +120,7 @@ void SalGraphics::mirror( long& x, const OutputDevice *pOutDev, bool bBack ) con void SalGraphics::mirror( long& x, long& nWidth, const OutputDevice *pOutDev, bool bBack ) const { - long w; - if( pOutDev && pOutDev->GetOutDevType() == OUTDEV_VIRDEV ) - w = pOutDev->GetOutputWidthPixel(); - else - w = GetGraphicsWidth(); + long w = GetGraphicsWidth(); if( w ) { @@ -161,11 +153,7 @@ void SalGraphics::mirror( long& x, long& nWidth, const OutputDevice *pOutDev, bo bool SalGraphics::mirror( sal_uInt32 nPoints, const SalPoint *pPtAry, SalPoint *pPtAry2, const OutputDevice *pOutDev, bool bBack ) const { - long w; - if( pOutDev && pOutDev->GetOutDevType() == OUTDEV_VIRDEV ) - w = pOutDev->GetOutputWidthPixel(); - else - w = GetGraphicsWidth(); + long w = GetGraphicsWidth(); if( w ) { @@ -287,11 +275,7 @@ void SalGraphics::mirror( Rectangle& rRect, const OutputDevice *pOutDev, bool bB basegfx::B2DPoint SalGraphics::mirror( const basegfx::B2DPoint& i_rPoint, const OutputDevice *i_pOutDev, bool i_bBack ) const { - long w; - if( i_pOutDev && i_pOutDev->GetOutDevType() == OUTDEV_VIRDEV ) - w = i_pOutDev->GetOutputWidthPixel(); - else - w = GetGraphicsWidth(); + long w = GetGraphicsWidth(); DBG_ASSERT( w, "missing graphics width" ); @@ -316,11 +300,7 @@ basegfx::B2DPoint SalGraphics::mirror( const basegfx::B2DPoint& i_rPoint, const basegfx::B2DPolygon SalGraphics::mirror( const basegfx::B2DPolygon& i_rPoly, const OutputDevice *i_pOutDev, bool i_bBack ) const { - long w; - if( i_pOutDev && i_pOutDev->GetOutDevType() == OUTDEV_VIRDEV ) - w = i_pOutDev->GetOutputWidthPixel(); - else - w = GetGraphicsWidth(); + long w = GetGraphicsWidth(); DBG_ASSERT( w, "missing graphics width" ); @@ -346,11 +326,7 @@ basegfx::B2DPolygon SalGraphics::mirror( const basegfx::B2DPolygon& i_rPoly, con basegfx::B2DPolyPolygon SalGraphics::mirror( const basegfx::B2DPolyPolygon& i_rPoly, const OutputDevice *i_pOutDev, bool i_bBack ) const { - long w; - if( i_pOutDev && i_pOutDev->GetOutDevType() == OUTDEV_VIRDEV ) - w = i_pOutDev->GetOutputWidthPixel(); - else - w = GetGraphicsWidth(); + long w = GetGraphicsWidth(); DBG_ASSERT( w, "missing graphics width" ); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits