writerfilter/source/dmapper/WrapPolygonHandler.cxx | 16 ++-------------- writerfilter/source/dmapper/WrapPolygonHandler.hxx | 3 ++- 2 files changed, 4 insertions(+), 15 deletions(-)
New commits: commit 126a33dd57de1356f6739d8e0e5bd4c4df6c765c Author: Miklos Vajna <vmik...@collabora.co.uk> Date: Thu Sep 11 10:54:35 2014 +0200 Use comphelper::SequenceAsVector Change-Id: I25b123d8086feef028ffea707d4854392964df7b diff --git a/writerfilter/source/dmapper/WrapPolygonHandler.cxx b/writerfilter/source/dmapper/WrapPolygonHandler.cxx index dfed4fb..d01190e 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 e7a470d..a855c02 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: _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits