[Libreoffice-commits] core.git: 2 commits - drawinglayer/source dtrans/source

Herbert Dürr hdu at apache.org
Tue Jul 16 12:40:36 PDT 2013


 drawinglayer/source/processor2d/vclprocessor2d.cxx |    3 ++-
 dtrans/source/win32/dtobj/FetcList.cxx             |    7 ++++---
 2 files changed, 6 insertions(+), 4 deletions(-)

New commits:
commit 199ddc1e5da21a7b012d6a75258b13182b600dd6
Author: Herbert Dürr <hdu at apache.org>
Date:   Tue Jul 16 13:30:18 2013 +0000

    #i122752# check iterator in each iteration of CFormatEtcContainer::nextFormatEtc()'s loop
    
    Don't trust nextFormatEtc()'s aNum argument not to mislead the iterator beyond
    the container bounds. The comparable loop in CFormatEtcContainer::skipFormatEtc()
    already checks the iterator against the container end in each iteration.
    
    (cherry picked from commit a609daa146c5588c6a35c2c145e9573c625ec123)

diff --git a/dtrans/source/win32/dtobj/FetcList.cxx b/dtrans/source/win32/dtobj/FetcList.cxx
index b728850..561f894 100644
--- a/dtrans/source/win32/dtobj/FetcList.cxx
+++ b/dtrans/source/win32/dtobj/FetcList.cxx
@@ -131,10 +131,11 @@ sal_uInt32 SAL_CALL CFormatEtcContainer::nextFormatEtc( LPFORMATETC lpFetc,
 
     sal_uInt32 nFetched = 0;
 
-    if ( m_EnumIterator != m_FormatMap.end( ) )
+    for ( sal_uInt32 i = 0; i < aNum; i++, nFetched++, lpFetc++, ++m_EnumIterator )
     {
-        for ( sal_uInt32 i = 0; i < aNum; i++, nFetched++, lpFetc++, ++m_EnumIterator )
-            CopyFormatEtc( lpFetc, *m_EnumIterator );
+        if ( m_EnumIterator == m_FormatMap.end() )
+            break;
+        CopyFormatEtc( lpFetc, *m_EnumIterator );
     }
 
     return nFetched;
commit 7f5faa7f64338b11eda4b033ed9d4cba9833573b
Author: Armin Le Grand <alg at apache.org>
Date:   Tue Jul 16 12:51:14 2013 +0000

    Resolves: #i122758# Initialize Mask with non-transparent
    
    (cherry picked from commit db4affff17f202e69447fd22c246843a6cda3e52)
    
    Change-Id: I4851c544b23d2857a0f13cff3ede987ebb813cef

diff --git a/drawinglayer/source/processor2d/vclprocessor2d.cxx b/drawinglayer/source/processor2d/vclprocessor2d.cxx
index 86c51b2..5027cb1 100644
--- a/drawinglayer/source/processor2d/vclprocessor2d.cxx
+++ b/drawinglayer/source/processor2d/vclprocessor2d.cxx
@@ -451,7 +451,8 @@ namespace drawinglayer
 #if defined(MACOSX)
                 const AlphaMask aMaskBmp( aContent.GetSizePixel());
 #else
-                const Bitmap aMaskBmp( aContent.GetSizePixel(), 1);
+                Bitmap aMaskBmp( aContent.GetSizePixel(), 1);
+                aMaskBmp.Erase(Color(COL_BLACK)); // #122758# Initialize to non-transparent
 #endif
                 aBitmapEx = BitmapEx(aContent, aMaskBmp);
             }


More information about the Libreoffice-commits mailing list