Kaydet (Commit) 281e5f98 authored tarafından Caolán McNamara's avatar Caolán McNamara

new/delete mismatch

Change-Id: I910366753d1d365e0388262c98fca12d000e83e5
Reviewed-on: https://gerrit.libreoffice.org/61979
Tested-by: Jenkins
Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst 7f0b7410
......@@ -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,
......
......@@ -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
......
......@@ -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,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment