summaryrefslogtreecommitdiff
path: root/emfio
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-01-11 16:01:44 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-01-13 07:10:55 +0100
commitd7d9edb27e0e512fac6b5618bfd369cafc6edc1e (patch)
tree3c7f348d9614a9a961fe9524fdf103468b225976 /emfio
parentdacb12d219fd060504553bf29e8536bdb747c930 (diff)
loplugin:useuniqueptr in PolyPolygon
Also - convert to o3tl::cow_wrapper - drop the second param to the constructor and just let vector use it's own resize logic - bump MAX_POLYGONS from 0x3FF0 to 0xffff so that the ios2met filter can load it's files properly. Change-Id: I9db19e4f7b4f946e801ea07c31d2d0ded7837a0e Reviewed-on: https://gerrit.libreoffice.org/47789 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'emfio')
-rw-r--r--emfio/source/reader/emfreader.cxx2
-rw-r--r--emfio/source/reader/wmfreader.cxx2
2 files changed, 2 insertions, 2 deletions
diff --git a/emfio/source/reader/emfreader.cxx b/emfio/source/reader/emfreader.cxx
index ea557ea88663..8e9b6b5d12f1 100644
--- a/emfio/source/reader/emfreader.cxx
+++ b/emfio/source/reader/emfreader.cxx
@@ -595,7 +595,7 @@ namespace emfio
if ( mpInputStream->good() && ( nGesPoints * (sizeof(T)+sizeof(T)) ) <= ( nEndPos - mpInputStream->Tell() ) )
{
// Get polygon points
- tools::PolyPolygon aPolyPoly(nPoly, nPoly);
+ tools::PolyPolygon aPolyPoly(nPoly);
for (sal_uInt32 i = 0; i < nPoly && mpInputStream->good(); ++i)
{
const sal_uInt16 nPointCount(aPoints[i]);
diff --git a/emfio/source/reader/wmfreader.cxx b/emfio/source/reader/wmfreader.cxx
index e20576c0e9af..21f0bd21bc95 100644
--- a/emfio/source/reader/wmfreader.cxx
+++ b/emfio/source/reader/wmfreader.cxx
@@ -393,7 +393,7 @@ namespace emfio
// Number of points of each polygon. Determine total number of points
std::unique_ptr<sal_uInt16[]> xPolygonPointCounts(new sal_uInt16[nPolyCount]);
sal_uInt16* pnPoints = xPolygonPointCounts.get();
- tools::PolyPolygon aPolyPoly(nPolyCount, nPolyCount);
+ tools::PolyPolygon aPolyPoly(nPolyCount);
sal_uInt16 nPoints = 0;
for (sal_uInt16 a = 0; a < nPolyCount && mpInputStream->good(); ++a)
{