summaryrefslogtreecommitdiff
path: root/oox/source/helper/grabbagstack.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-11-19 09:14:59 +0200
committerNoel Grandin <noel@peralex.com>2015-11-19 09:33:29 +0200
commit2554efabb6d7cd2ad9f7cfdddd0712c25cdca1cd (patch)
tree1b8fd3940910ffcd328e16a53e208c099f67ab21 /oox/source/helper/grabbagstack.cxx
parentf7b5f477bfd942e0a1d8880c372635000d724dd7 (diff)
use comphelper::containerToSequence
in chart2, we remove a local equivalent of the method Change-Id: I25129a3d1ea1dd724eb9cd38a57be37a78b3d100
Diffstat (limited to 'oox/source/helper/grabbagstack.cxx')
-rw-r--r--oox/source/helper/grabbagstack.cxx17
1 files changed, 3 insertions, 14 deletions
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 <com/sun/star/uno/Sequence.hxx>
+#include <comphelper/sequence.hxx>
namespace oox
{
@@ -37,14 +38,7 @@ PropertyValue GrabBagStack::getRootProperty()
PropertyValue aProperty;
aProperty.Name = mCurrentElement.maName;
-
- Sequence<PropertyValue> aSequence(mCurrentElement.maPropertyList.size());
- PropertyValue* pSequence = aSequence.getArray();
- std::vector<PropertyValue>::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<PropertyValue> aSequence(mCurrentElement.maPropertyList.size());
- PropertyValue* pSequence = aSequence.getArray();
- std::vector<PropertyValue>::iterator i;
- for (i = mCurrentElement.maPropertyList.begin(); i != mCurrentElement.maPropertyList.end(); ++i)
- *pSequence++ = *i;
-
+ Sequence<PropertyValue> aSequence(comphelper::containerToSequence(mCurrentElement.maPropertyList));
mCurrentElement = mStack.top();
mStack.pop();
appendElement(aName, makeAny(aSequence));