diff options
-rw-r--r-- | filter/source/msfilter/msdffimp.cxx | 4 | ||||
-rw-r--r-- | include/filter/msfilter/msdffimp.hxx | 7 | ||||
-rw-r--r-- | sw/source/filter/ww8/ww8par.cxx | 2 |
3 files changed, 6 insertions, 7 deletions
diff --git a/filter/source/msfilter/msdffimp.cxx b/filter/source/msfilter/msdffimp.cxx index e24b342f6f3e..dade5bcd999e 100644 --- a/filter/source/msfilter/msdffimp.cxx +++ b/filter/source/msfilter/msdffimp.cxx @@ -5525,7 +5525,7 @@ SdrObject* SvxMSDffManager::ProcessObj(SvStream& rSt, bool bOk = nElemSizeVert && (rSt.remainingSize() / nElemSizeVert >= nNumElemVert); if (bOk) { - pTextImpRec->pWrapPolygon.reset(new tools::Polygon(nNumElemVert)); + pTextImpRec->pWrapPolygon = tools::Polygon(nNumElemVert); for (sal_uInt16 i = 0; i < nNumElemVert; ++i) { sal_Int32 nX(0), nY(0); @@ -7501,7 +7501,7 @@ SvxMSDffImportRec::SvxMSDffImportRec(const SvxMSDffImportRec& rCopy) pClientDataBuffer = nullptr; if (rCopy.pWrapPolygon) - pWrapPolygon.reset( new tools::Polygon(*rCopy.pWrapPolygon) ); + pWrapPolygon = rCopy.pWrapPolygon; } SvxMSDffImportRec::~SvxMSDffImportRec() diff --git a/include/filter/msfilter/msdffimp.hxx b/include/filter/msfilter/msdffimp.hxx index d3c6657c7b90..e1437faf6c90 100644 --- a/include/filter/msfilter/msdffimp.hxx +++ b/include/filter/msfilter/msdffimp.hxx @@ -23,6 +23,7 @@ #include <cstring> #include <map> #include <memory> +#include <optional> #include <set> #include <utility> #include <vector> @@ -44,6 +45,7 @@ #include <tools/gen.hxx> #include <tools/ref.hxx> #include <tools/solar.h> +#include <tools/poly.hxx> #include <vcl/graph.hxx> class Color; @@ -52,9 +54,6 @@ class SotStorage; class SvStream; class SdrObject; class SdrOle2Obj; -namespace tools { - class Polygon; -} class SdrModel; class SwFlyFrameFormat; @@ -218,7 +217,7 @@ struct MSFILTER_DLLPUBLIC SvxMSDffImportRec static const int RELTO_DEFAULT = 2; SdrObject* pObj; - std::unique_ptr<tools::Polygon> + std::optional<tools::Polygon> pWrapPolygon; std::unique_ptr<char[]> pClientAnchorBuffer; diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx index a6559a681a8c..146de94a0230 100644 --- a/sw/source/filter/ww8/ww8par.cxx +++ b/sw/source/filter/ww8/ww8par.cxx @@ -1031,7 +1031,7 @@ SdrObject* SwMSDffManager::ProcessObj(SvStream& rSt, } if (bOk) { - pImpRec->pWrapPolygon.reset( new tools::Polygon(nNumElemVert) ); + pImpRec->pWrapPolygon = tools::Polygon(nNumElemVert); for (sal_uInt16 i = 0; i < nNumElemVert; ++i) { sal_Int32 nX(0), nY(0); |