[Libreoffice-commits] core.git: canvas/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Sat Oct 20 11:50:00 UTC 2018


 canvas/source/directx/dx_impltools.cxx |    2 +-
 canvas/source/directx/dx_vcltools.cxx  |    6 +++---
 canvas/source/directx/dx_vcltools.hxx  |    2 +-
 3 files changed, 5 insertions(+), 5 deletions(-)

New commits:
commit 281e5f982008741bb6f7f03c578e47e342f4543e
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Fri Oct 19 10:14:47 2018 +0100
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Sat Oct 20 13:49:41 2018 +0200

    new/delete mismatch
    
    Change-Id: I910366753d1d365e0388262c98fca12d000e83e5
    Reviewed-on: https://gerrit.libreoffice.org/61979
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/canvas/source/directx/dx_impltools.cxx b/canvas/source/directx/dx_impltools.cxx
index ea235cfe08de..27fc270f94c7 100644
--- a/canvas/source/directx/dx_impltools.cxx
+++ b/canvas/source/directx/dx_impltools.cxx
@@ -504,7 +504,7 @@ namespace dxcanvas
             aBmpData.Height      = rRawRGBAData.mnHeight;
             aBmpData.Stride      = 4*aBmpData.Width; // bottom-up format
             aBmpData.PixelFormat = PixelFormat32bppARGB;
-            aBmpData.Scan0       = rRawRGBAData.mpBitmapData.get();
+            aBmpData.Scan0       = const_cast<sal_uInt8*>(rRawRGBAData.maBitmapData.data());
 
             const Gdiplus::Rect aRect( 0,0,aBmpData.Width,aBmpData.Height );
             if( Gdiplus::Ok != pBitmap->LockBits( &aRect,
diff --git a/canvas/source/directx/dx_vcltools.cxx b/canvas/source/directx/dx_vcltools.cxx
index b8e511a09260..07a71b330ae9 100644
--- a/canvas/source/directx/dx_vcltools.cxx
+++ b/canvas/source/directx/dx_vcltools.cxx
@@ -155,7 +155,7 @@ namespace dxcanvas
                 RawRGBABitmap aBmpData;
                 aBmpData.mnWidth     = aBmpSize.Width();
                 aBmpData.mnHeight    = aBmpSize.Height();
-                aBmpData.mpBitmapData.reset( new sal_uInt8[ 4*aBmpData.mnWidth*aBmpData.mnHeight ] );
+                aBmpData.maBitmapData.resize(4*aBmpData.mnWidth*aBmpData.mnHeight);
 
                 Bitmap aBitmap( rBmpEx.GetBitmap() );
 
@@ -200,7 +200,7 @@ namespace dxcanvas
                                       "Unsupported alpha scanline format" );
 
                     BitmapColor     aCol;
-                    sal_uInt8*      pCurrOutput( aBmpData.mpBitmapData.get() );
+                    sal_uInt8*      pCurrOutput(aBmpData.maBitmapData.data());
                     int             x, y;
 
                     for( y=0; y<nHeight; ++y )
@@ -340,7 +340,7 @@ namespace dxcanvas
                     int             nCurrBit;
                     const int       nMask( 1 );
                     const int       nInitialBit(7);
-                    sal_uInt8*      pCurrOutput( aBmpData.mpBitmapData.get() );
+                    sal_uInt8*      pCurrOutput(aBmpData.maBitmapData.data());
                     int             x, y;
 
                     // mapping table, to get from mask index color to
diff --git a/canvas/source/directx/dx_vcltools.hxx b/canvas/source/directx/dx_vcltools.hxx
index e3fb62269cac..8eb5ea90b2a4 100644
--- a/canvas/source/directx/dx_vcltools.hxx
+++ b/canvas/source/directx/dx_vcltools.hxx
@@ -37,7 +37,7 @@ namespace dxcanvas
         {
             sal_Int32                           mnWidth;
             sal_Int32                           mnHeight;
-            std::shared_ptr< sal_uInt8 >    mpBitmapData;
+            std::vector<sal_uInt8>              maBitmapData;
         };
 
         bool drawVCLBitmapFromXBitmap( const std::shared_ptr< Gdiplus::Graphics >& rGraphics,


More information about the Libreoffice-commits mailing list