From 2554efabb6d7cd2ad9f7cfdddd0712c25cdca1cd Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Thu, 19 Nov 2015 09:14:59 +0200 Subject: use comphelper::containerToSequence in chart2, we remove a local equivalent of the method Change-Id: I25129a3d1ea1dd724eb9cd38a57be37a78b3d100 --- oox/source/helper/grabbagstack.cxx | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) (limited to 'oox/source/helper/grabbagstack.cxx') diff --git a/oox/source/helper/grabbagstack.cxx b/oox/source/helper/grabbagstack.cxx index 1505bb286864..ea0df7f3cd2e 100644 --- a/oox/source/helper/grabbagstack.cxx +++ b/oox/source/helper/grabbagstack.cxx @@ -10,6 +10,7 @@ #include "oox/helper/grabbagstack.hxx" #include +#include namespace oox { @@ -37,14 +38,7 @@ PropertyValue GrabBagStack::getRootProperty() PropertyValue aProperty; aProperty.Name = mCurrentElement.maName; - - Sequence aSequence(mCurrentElement.maPropertyList.size()); - PropertyValue* pSequence = aSequence.getArray(); - std::vector::iterator i; - for (i = mCurrentElement.maPropertyList.begin(); i != mCurrentElement.maPropertyList.end(); ++i) - *pSequence++ = *i; - - aProperty.Value = makeAny(aSequence); + aProperty.Value = makeAny(comphelper::containerToSequence(mCurrentElement.maPropertyList)); return aProperty; } @@ -67,12 +61,7 @@ void GrabBagStack::push(const OUString& aKey) void GrabBagStack::pop() { OUString aName = mCurrentElement.maName; - Sequence aSequence(mCurrentElement.maPropertyList.size()); - PropertyValue* pSequence = aSequence.getArray(); - std::vector::iterator i; - for (i = mCurrentElement.maPropertyList.begin(); i != mCurrentElement.maPropertyList.end(); ++i) - *pSequence++ = *i; - + Sequence aSequence(comphelper::containerToSequence(mCurrentElement.maPropertyList)); mCurrentElement = mStack.top(); mStack.pop(); appendElement(aName, makeAny(aSequence)); -- cgit