summaryrefslogtreecommitdiff
path: root/toolkit/source/awt/vclxgraphics.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'toolkit/source/awt/vclxgraphics.cxx')
-rw-r--r--toolkit/source/awt/vclxgraphics.cxx5
1 files changed, 2 insertions, 3 deletions
diff --git a/toolkit/source/awt/vclxgraphics.cxx b/toolkit/source/awt/vclxgraphics.cxx
index 482e29c47021..4e2268f9dc73 100644
--- a/toolkit/source/awt/vclxgraphics.cxx
+++ b/toolkit/source/awt/vclxgraphics.cxx
@@ -26,7 +26,6 @@
#include <cppuhelper/typeprovider.hxx>
#include <cppuhelper/queryinterface.hxx>
#include <rtl/uuid.h>
-#include <sal/alloca.h>
#include <vcl/svapp.hxx>
#include <vcl/outdev.hxx>
@@ -497,12 +496,12 @@ void VCLXGraphics::drawTextArray( sal_Int32 x, sal_Int32 y, const OUString& rTex
if( mpOutputDevice )
{
InitOutputDevice( InitOutDevFlags::CLIPREGION|InitOutDevFlags::RASTEROP|InitOutDevFlags::COLORS|InitOutDevFlags::FONT );
- long* pDXA = static_cast<long*>(alloca(rText.getLength() * sizeof(long)));
+ std::unique_ptr<long []> pDXA(new long[rText.getLength()]);
for(int i = 0; i < rText.getLength(); i++)
{
pDXA[i] = rLongs[i];
}
- mpOutputDevice->DrawTextArray( Point( x, y ), rText, pDXA );
+ mpOutputDevice->DrawTextArray( Point( x, y ), rText, pDXA.get() );
}
}