summaryrefslogtreecommitdiff
path: root/chart2
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2013-12-18 20:04:34 +0100
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2014-01-29 08:09:20 +0100
commit704f749af5f57b71ff728dda1b4bf49975471c18 (patch)
treeee34e5dad1961f95a56cd22d8d27f47aecae6a45 /chart2
parent5c133f5dab332e93f44de0d257eeeb6b363abc40 (diff)
fix crash when creating bitmaps
Change-Id: I72982abcfcb0edff35a7000944146e8d924c120f
Diffstat (limited to 'chart2')
-rw-r--r--chart2/source/view/main/OpenGLRender.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/chart2/source/view/main/OpenGLRender.cxx b/chart2/source/view/main/OpenGLRender.cxx
index 7ae8fd3fd533..ffe729349748 100644
--- a/chart2/source/view/main/OpenGLRender.cxx
+++ b/chart2/source/view/main/OpenGLRender.cxx
@@ -651,10 +651,10 @@ int OpenGLRender::RenderLine2FBO(int wholeFlag)
boost::scoped_array<sal_uInt8> buf(new sal_uInt8[m_iWidth * m_iHeight * 4]);
glReadPixels(0, 0, m_iWidth, m_iHeight, GL_BGR, GL_UNSIGNED_BYTE, buf.get());
BitmapEx aBmp;
- aBmp.SetSizePixel(Size(m_iWidth, m_iHeight));
+ aBmp.Expand(m_iWidth, m_iHeight);
- Bitmap aBitmap( aBmp.GetBitmap() );
- Bitmap aAlpha( aBmp.GetAlpha().GetBitmap() );
+ Bitmap aBitmap( Size( m_iWidth, m_iHeight ), 24 );
+ Bitmap aAlpha( Size( m_iWidth, m_iHeight ), 24 );
Bitmap::ScopedWriteAccess pWriteAccess( aBitmap );
Bitmap::ScopedWriteAccess pAlphaWriteAccess( aAlpha );