[Libreoffice-commits] core.git: 2 commits - vcl/headless

Caolán McNamara caolanm at redhat.com
Tue Mar 10 05:02:30 PDT 2015


 vcl/headless/svpgdi.cxx |   16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)

New commits:
commit 997654c21dd3758a58743e9eb660bf0099fd6007
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue Mar 10 11:38:52 2015 +0000

    make SvpSalGraphics::getBitmap more readable
    
    Change-Id: I4eb896813d6cec49bf5f1c8ac2ee8fafc06fbf52

diff --git a/vcl/headless/svpgdi.cxx b/vcl/headless/svpgdi.cxx
index 6e04a01..a0bea2b 100644
--- a/vcl/headless/svpgdi.cxx
+++ b/vcl/headless/svpgdi.cxx
@@ -651,18 +651,21 @@ void SvpSalGraphics::drawMask( const SalTwoRect& rPosAry,
 
 SalBitmap* SvpSalGraphics::getBitmap( long nX, long nY, long nWidth, long nHeight )
 {
-    basebmp::BitmapDeviceSharedPtr aCopy;
+    SvpSalBitmap* pBitmap = new SvpSalBitmap();
+
     if (m_aDevice)
+    {
+        basebmp::BitmapDeviceSharedPtr aCopy;
         aCopy = cloneBitmapDevice(basegfx::B2IVector(nWidth, nHeight),
                                    m_aDevice);
-    basegfx::B2IBox aSrcRect( nX, nY, nX+nWidth, nY+nHeight );
-    basegfx::B2IBox aDestRect( 0, 0, nWidth, nHeight );
+        basegfx::B2IBox aSrcRect( nX, nY, nX+nWidth, nY+nHeight );
+        basegfx::B2IBox aDestRect( 0, 0, nWidth, nHeight );
 
-    if (aCopy)
         aCopy->drawBitmap( m_aOrigDevice, aSrcRect, aDestRect, basebmp::DrawMode_PAINT );
 
-    SvpSalBitmap* pBitmap = new SvpSalBitmap();
-    pBitmap->setBitmap( aCopy );
+        pBitmap->setBitmap( aCopy );
+    }
+
     return pBitmap;
 }
 
commit 662f88b0b0c3d7c10b7a8e5c8298f320e3151c94
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Mar 9 20:48:59 2015 +0000

    I don't think we should clip when using getBitmap
    
    this solves the bug of icons in the standard toolbar
    under gtk3 of getting rendered with a black background
    on first render
    
    Change-Id: I73bae4cd0b9f38c9e9caef8019d773d42b5e8f10

diff --git a/vcl/headless/svpgdi.cxx b/vcl/headless/svpgdi.cxx
index 9cd85e1..6e04a01 100644
--- a/vcl/headless/svpgdi.cxx
+++ b/vcl/headless/svpgdi.cxx
@@ -658,8 +658,7 @@ SalBitmap* SvpSalGraphics::getBitmap( long nX, long nY, long nWidth, long nHeigh
     basegfx::B2IBox aSrcRect( nX, nY, nX+nWidth, nY+nHeight );
     basegfx::B2IBox aDestRect( 0, 0, nWidth, nHeight );
 
-    SvpSalGraphics::ClipUndoHandle aUndo( this );
-    if (!isClippedSetup(aDestRect, aUndo) && aCopy)
+    if (aCopy)
         aCopy->drawBitmap( m_aOrigDevice, aSrcRect, aDestRect, basebmp::DrawMode_PAINT );
 
     SvpSalBitmap* pBitmap = new SvpSalBitmap();


More information about the Libreoffice-commits mailing list