diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2021-08-21 18:21:48 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-08-22 18:54:08 +0200 |
commit | 4c5e264df432f4e6836535cbac7231ab579af424 (patch) | |
tree | 2c56b71dbaf5f3c587b34b75f4d85d06014d76e6 /sw/inc | |
parent | 008f28c9e01114e731f785e9e238236a1ed069d2 (diff) |
no need to use unique_ptr for PolyPolygon
it is already a COW type
Change-Id: If28f67bff3f8df7763bf4b574b1125d568f0ee27
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120821
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/inc')
-rw-r--r-- | sw/inc/ndnotxt.hxx | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/sw/inc/ndnotxt.hxx b/sw/inc/ndnotxt.hxx index ac2611966953..2782ab66c840 100644 --- a/sw/inc/ndnotxt.hxx +++ b/sw/inc/ndnotxt.hxx @@ -19,11 +19,11 @@ #ifndef INCLUDED_SW_INC_NDNOTXT_HXX #define INCLUDED_SW_INC_NDNOTXT_HXX -#include <memory> +#include <optional> +#include <tools/poly.hxx> #include "node.hxx" class Size; -namespace tools { class PolyPolygon; } // SwNoTextNode @@ -32,12 +32,12 @@ class SW_DLLPUBLIC SwNoTextNode : public SwContentNode friend class SwNodes; friend class SwNoTextFrame; - std::unique_ptr<tools::PolyPolygon> m_pContour; + mutable std::optional<tools::PolyPolygon> m_pContour; bool m_bAutomaticContour : 1; // automatic contour polygon, not manipulated - bool m_bContourMapModeValid : 1; // contour map mode is not the graphics's + mutable bool m_bContourMapModeValid : 1; // contour map mode is not the graphics's // preferred map mode, but either // MM100 or pixel - bool m_bPixelContour : 1; // contour map mode is invalid and pixel. + mutable bool m_bPixelContour : 1; // contour map mode is invalid and pixel. // Creates for all derivations an AttrSet with ranges for frame- and // graphics-attributes (only called by SwContentNode). @@ -70,7 +70,7 @@ public: void SetContour( const tools::PolyPolygon *pPoly, bool bAutomatic = false ); const tools::PolyPolygon *HasContour() const; - bool HasContour_() const { return m_pContour!=nullptr; }; + bool HasContour_() const { return bool(m_pContour); }; void GetContour( tools::PolyPolygon &rPoly ) const; void CreateContour(); |