summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2015-12-29 19:33:57 +0000
committerCaolán McNamara <caolanm@redhat.com>2015-12-29 19:46:23 +0000
commitf6a2deda724a0a23eb72820d9710b682d7f4cf44 (patch)
tree5d8ac697f26add00c70ece1d5a7fbee476adaf2b /vcl
parentbea8a7ad63e6e00c757909702f0439b2ffd3b48a (diff)
cppcheck: allocaCalled
Change-Id: I97374357f27dc26fc67412f5cec7b96ad9bce9c2
Diffstat (limited to 'vcl')
-rw-r--r--vcl/unx/gtk/a11y/atkwrapper.cxx11
1 files changed, 6 insertions, 5 deletions
diff --git a/vcl/unx/gtk/a11y/atkwrapper.cxx b/vcl/unx/gtk/a11y/atkwrapper.cxx
index 5def4feadbda..0d4618ae6c23 100644
--- a/vcl/unx/gtk/a11y/atkwrapper.cxx
+++ b/vcl/unx/gtk/a11y/atkwrapper.cxx
@@ -56,7 +56,6 @@
#include <rtl/ref.hxx>
#include <osl/diagnose.h>
-#include <sal/alloca.h>
#include <cppuhelper/factory.hxx>
#include <cppuhelper/queryinterface.hxx>
@@ -66,6 +65,7 @@
#include "atktextattributes.hxx"
#include <string.h>
+#include <vector>
using namespace ::com::sun::star;
@@ -502,18 +502,19 @@ wrapper_ref_relation_set( AtkObject *atk_obj )
{
accessibility::AccessibleRelation aRelation = xRelationSet->getRelation( n );
sal_uInt32 nTargetCount = aRelation.TargetSet.getLength();
- AtkObject **pTargets = static_cast<AtkObject **>(alloca( nTargetCount * sizeof(AtkObject *) ));
- for( sal_uInt32 i = 0; i < nTargetCount; i++ )
+ std::vector<AtkObject*> aTargets;
+
+ for (sal_uInt32 i = 0; i < nTargetCount; ++i)
{
uno::Reference< accessibility::XAccessible > xAccessible(
aRelation.TargetSet[i], uno::UNO_QUERY );
- pTargets[i] = atk_object_wrapper_ref( xAccessible );
+ aTargets.push_back(atk_object_wrapper_ref(xAccessible));
}
AtkRelation *pRel =
atk_relation_new(
- pTargets, nTargetCount,
+ aTargets.data(), nTargetCount,
mapRelationType( aRelation.RelationType )
);
atk_relation_set_add( pSet, pRel );