diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2014-09-11 10:54:35 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2014-09-11 11:00:39 +0200 |
commit | 126a33dd57de1356f6739d8e0e5bd4c4df6c765c (patch) | |
tree | e2840696a727c234db34a1c4c28555024bb91e82 | |
parent | 5979ab84e8a0038a1225020e19e4b884423247fc (diff) |
Use comphelper::SequenceAsVector
Change-Id: I25b123d8086feef028ffea707d4854392964df7b
-rw-r--r-- | writerfilter/source/dmapper/WrapPolygonHandler.cxx | 16 | ||||
-rw-r--r-- | writerfilter/source/dmapper/WrapPolygonHandler.hxx | 3 |
2 files changed, 4 insertions, 15 deletions
diff --git a/writerfilter/source/dmapper/WrapPolygonHandler.cxx b/writerfilter/source/dmapper/WrapPolygonHandler.cxx index dfed4fb35c10..d01190e31e05 100644 --- a/writerfilter/source/dmapper/WrapPolygonHandler.cxx +++ b/writerfilter/source/dmapper/WrapPolygonHandler.cxx @@ -130,20 +130,8 @@ WrapPolygon::Pointer_t WrapPolygon::correctWordWrapPolygon(const awt::Size & rSr drawing::PointSequenceSequence WrapPolygon::getPointSequenceSequence() const { drawing::PointSequenceSequence aPolyPolygon(1L); - drawing::PointSequence * pPolygon = aPolyPolygon.getArray(); - pPolygon->realloc(size()); - - sal_uInt32 n = 0; - Points_t::const_iterator aIt = begin(); - Points_t::const_iterator aItEnd = end(); - - while (aIt != aItEnd) - { - (*pPolygon)[n] = *aIt; - ++n; - ++aIt; - } - + drawing::PointSequence aPolygon = mPoints.getAsConstList(); + aPolyPolygon[0] = aPolygon; return aPolyPolygon; } diff --git a/writerfilter/source/dmapper/WrapPolygonHandler.hxx b/writerfilter/source/dmapper/WrapPolygonHandler.hxx index e7a470d193bd..a855c0224ced 100644 --- a/writerfilter/source/dmapper/WrapPolygonHandler.hxx +++ b/writerfilter/source/dmapper/WrapPolygonHandler.hxx @@ -24,6 +24,7 @@ #include <com/sun/star/drawing/PointSequenceSequence.hpp> #include <resourcemodel/LoggedResources.hxx> #include <tools/fract.hxx> +#include <comphelper/sequenceasvector.hxx> namespace writerfilter { namespace dmapper { @@ -31,7 +32,7 @@ namespace dmapper { class WrapPolygon { public: - typedef ::std::deque<css::awt::Point> Points_t; + typedef comphelper::SequenceAsVector<css::awt::Point> Points_t; typedef ::boost::shared_ptr<WrapPolygon> Pointer_t; private: |