[Libreoffice-commits] core.git: Branch 'feature/sidebar' - vcl/source

Armin Le Grand alg at apache.org
Fri May 10 07:22:08 PDT 2013


 vcl/source/gdi/outdev.cxx  |    8 ++++----
 vcl/source/gdi/outdev6.cxx |    2 +-
 2 files changed, 5 insertions(+), 5 deletions(-)

New commits:
commit 579a09b817eada81f1ffbfffa38b63bd5ca34165
Author: Armin Le Grand <alg at apache.org>
Date:   Tue May 7 09:34:50 2013 +0000

    Resolves: #i122241# Made Push/Pop with PUSH_MAPMODE safe...
    
    for mbMap flag and MapMode preservation
    
    (cherry picked from commit 664f4d882129c98d502463e08ce601259b85fc8c)
    
    Change-Id: Ibe062a01c495ca0e067e9c4399b55fccf65baebe

diff --git a/vcl/source/gdi/outdev.cxx b/vcl/source/gdi/outdev.cxx
index f134388..4bdec3a 100644
--- a/vcl/source/gdi/outdev.cxx
+++ b/vcl/source/gdi/outdev.cxx
@@ -104,6 +104,7 @@ struct ImplObjStack
 {
     ImplObjStack*   mpPrev;
     MapMode*        mpMapMode;
+    bool            mbMapActive;
     Region*         mpClipRegion;
     Color*          mpLineColor;
     Color*          mpFillColor;
@@ -2350,10 +2351,8 @@ void OutputDevice::Push( sal_uInt16 nFlags )
         pData->meRasterOp = GetRasterOp();
     if ( nFlags & PUSH_MAPMODE )
     {
-        if ( mbMap )
-            pData->mpMapMode = new MapMode( maMapMode );
-        else
-            pData->mpMapMode = NULL;
+        pData->mpMapMode = new MapMode( maMapMode );
+        pData->mbMapActive = mbMap;
     }
     if ( nFlags & PUSH_CLIPREGION )
     {
@@ -2449,6 +2448,7 @@ void OutputDevice::Pop()
             SetMapMode( *pData->mpMapMode );
         else
             SetMapMode();
+        mbMap = pData->mbMapActive;
     }
     if ( pData->mnFlags & PUSH_CLIPREGION )
         ImplSetClipRegion( pData->mpClipRegion );
diff --git a/vcl/source/gdi/outdev6.cxx b/vcl/source/gdi/outdev6.cxx
index 2599953..d63ce7a 100644
--- a/vcl/source/gdi/outdev6.cxx
+++ b/vcl/source/gdi/outdev6.cxx
@@ -1212,7 +1212,7 @@ void OutputDevice::DrawCheckered(const Point& rPos, const Size& rSize, sal_uInt3
     const sal_uInt32 nMaxX(rPos.X() + rSize.Width());
     const sal_uInt32 nMaxY(rPos.Y() + rSize.Height());
 
-    Push();
+    Push(PUSH_LINECOLOR|PUSH_FILLCOLOR);
     SetLineColor();
 
     for(sal_uInt32 x(0), nX(rPos.X()); nX < nMaxX; x++, nX += nLen)


More information about the Libreoffice-commits mailing list