[Libreoffice-commits] core.git: Branch 'libreoffice-4-4' - vcl/source

Maxim Monastirsky momonasmon at gmail.com
Mon Aug 24 12:56:21 PDT 2015


 vcl/source/gdi/salgdilayout.cxx |   36 ++++++++++++++++++++++++++++++------
 1 file changed, 30 insertions(+), 6 deletions(-)

New commits:
commit df3b4a1604339eadab2f320eaf0e79ba8f4b6806
Author: Maxim Monastirsky <momonasmon at gmail.com>
Date:   Sun Aug 23 15:09:59 2015 +0300

    tdf#89381 Revert "vcl: SalGraphics::mirror() - always use GetGraphicsWidth()"
    
    This reverts commit 28effca640fff262866d1d3ada6e51a3821a6725.
    
    Change-Id: Ie21ae1ef969b2cfdce81a152c195a69ad3c27f65
    Reviewed-on: https://gerrit.libreoffice.org/17937
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>
    (cherry picked from commit d2c09305084c218facdd282c3232a9929b81e342)
    Reviewed-on: https://gerrit.libreoffice.org/17961

diff --git a/vcl/source/gdi/salgdilayout.cxx b/vcl/source/gdi/salgdilayout.cxx
index 88a0abc..6a85e59 100644
--- a/vcl/source/gdi/salgdilayout.cxx
+++ b/vcl/source/gdi/salgdilayout.cxx
@@ -99,7 +99,11 @@ bool SalGraphics::drawTransformedBitmap(
 
 void SalGraphics::mirror( long& x, const OutputDevice *pOutDev, bool bBack ) const
 {
-    long w = GetGraphicsWidth();
+    long w;
+    if( pOutDev && pOutDev->GetOutDevType() == OUTDEV_VIRDEV )
+        w = pOutDev->GetOutputWidthPixel();
+    else
+        w = GetGraphicsWidth();
 
     if( w )
     {
@@ -131,7 +135,11 @@ 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 = GetGraphicsWidth();
+    long w;
+    if( pOutDev && pOutDev->GetOutDevType() == OUTDEV_VIRDEV )
+        w = pOutDev->GetOutputWidthPixel();
+    else
+        w = GetGraphicsWidth();
 
     if( w )
     {
@@ -164,7 +172,11 @@ 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 = GetGraphicsWidth();
+    long w;
+    if( pOutDev && pOutDev->GetOutDevType() == OUTDEV_VIRDEV )
+        w = pOutDev->GetOutputWidthPixel();
+    else
+        w = GetGraphicsWidth();
 
     if( w )
     {
@@ -286,7 +298,11 @@ 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 = GetGraphicsWidth();
+    long w;
+    if( i_pOutDev && i_pOutDev->GetOutDevType() == OUTDEV_VIRDEV )
+        w = i_pOutDev->GetOutputWidthPixel();
+    else
+        w = GetGraphicsWidth();
 
     DBG_ASSERT( w, "missing graphics width" );
 
@@ -311,7 +327,11 @@ 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 = GetGraphicsWidth();
+    long w;
+    if( i_pOutDev && i_pOutDev->GetOutDevType() == OUTDEV_VIRDEV )
+        w = i_pOutDev->GetOutputWidthPixel();
+    else
+        w = GetGraphicsWidth();
 
     DBG_ASSERT( w, "missing graphics width" );
 
@@ -337,7 +357,11 @@ 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 = GetGraphicsWidth();
+    long w;
+    if( i_pOutDev && i_pOutDev->GetOutDevType() == OUTDEV_VIRDEV )
+        w = i_pOutDev->GetOutputWidthPixel();
+    else
+        w = GetGraphicsWidth();
 
     DBG_ASSERT( w, "missing graphics width" );
 


More information about the Libreoffice-commits mailing list