Date: prev next · Thread: first prev next last
2011 Archives by date, by thread · List index


Hi,

Here is a couple of tiny patches under LGPLv3+/MPL.

Cheers,
-- Takeshi Abe
From ea1dcc7d3d2cd8c7cd8a3389a236bbbff84bd1a6 Mon Sep 17 00:00:00 2001
From: Takeshi Abe <tabe@fixedpoint.jp>
Date: Thu, 10 Feb 2011 03:10:31 +0900
Subject: [PATCH 1/2] remove dead code

---
 vcl/source/gdi/outdevnative.cxx |   14 --------------
 1 files changed, 0 insertions(+), 14 deletions(-)

diff --git a/vcl/source/gdi/outdevnative.cxx b/vcl/source/gdi/outdevnative.cxx
index 746e642..3818951 100644
--- a/vcl/source/gdi/outdevnative.cxx
+++ b/vcl/source/gdi/outdevnative.cxx
@@ -218,20 +218,6 @@ BOOL OutputDevice::DrawNativeControl( ControlType nType,
     if( !lcl_enableNativeWidget( *this ) )
         return FALSE;
 
-    /*
-    if( !IsInPaint() && IsPaintTransparent() )
-    {
-        // only required if called directly (ie, we're not in Paint() ):
-        // force redraw (Paint()) for transparent controls
-        // to trigger a repaint of the background
-        Region aClipRgn( GetClipRegion() );
-        if( !rControlRegion.IsEmpty() )
-            aClipRgn.Intersect( rControlRegion );
-        Invalidate( aClipRgn, INVALIDATE_UPDATE );
-        return TRUE;
-    }
-    */
-
     // make sure the current clip region is initialized correctly
     if ( !mpGraphics )
         if ( !ImplGetGraphics() )
-- 
1.7.2.3

From 144b34233f4ae91eaa197d5750fec04f2ad020bb Mon Sep 17 00:00:00 2001
From: Takeshi Abe <tabe@fixedpoint.jp>
Date: Thu, 10 Feb 2011 03:11:10 +0900
Subject: [PATCH 2/2] fix memleak

---
 vcl/source/gdi/outdev6.cxx |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/vcl/source/gdi/outdev6.cxx b/vcl/source/gdi/outdev6.cxx
index bf26e17..e1dca1b 100644
--- a/vcl/source/gdi/outdev6.cxx
+++ b/vcl/source/gdi/outdev6.cxx
@@ -711,6 +711,8 @@ void OutputDevice::DrawTransparent( const GDIMetaFile& rMtf, const Point& rPos,
                     pVDev->EnableMapMode(false);
                     const AlphaMask aAlpha(pVDev->GetBitmap(aPoint, pVDev->GetOutputSizePixel()));
 
+                    delete pVDev;
+
                     // draw masked content to target and restore MapMode
                     DrawBitmapEx(aDstRect.TopLeft(), BitmapEx(aPaint, aAlpha));
                     EnableMapMode(bOrigMapModeEnabled);
-- 
1.7.2.3


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.