diff options
-rw-r--r-- | include/tools/poly.hxx | 2 | ||||
-rw-r--r-- | tools/source/generic/poly.cxx | 6 | ||||
-rw-r--r-- | tools/source/generic/poly2.cxx | 6 |
3 files changed, 14 insertions, 0 deletions
diff --git a/include/tools/poly.hxx b/include/tools/poly.hxx index 79da3e8c7d18..3258a841d83a 100644 --- a/include/tools/poly.hxx +++ b/include/tools/poly.hxx @@ -159,6 +159,7 @@ public: Point& operator[]( sal_uInt16 nPos ); tools::Polygon& operator=( const tools::Polygon& rPoly ); + tools::Polygon& operator=( tools::Polygon&& rPoly ); bool operator==( const tools::Polygon& rPoly ) const; bool operator!=( const tools::Polygon& rPoly ) const { return !(Polygon::operator==( rPoly )); } @@ -246,6 +247,7 @@ public: tools::Polygon& operator[]( sal_uInt16 nPos ); tools::PolyPolygon& operator=( const tools::PolyPolygon& rPolyPoly ); + tools::PolyPolygon& operator=( tools::PolyPolygon&& rPolyPoly ); bool operator==( const tools::PolyPolygon& rPolyPoly ) const; bool operator!=( const tools::PolyPolygon& rPolyPoly ) const { return !(PolyPolygon::operator==( rPolyPoly )); } diff --git a/tools/source/generic/poly.cxx b/tools/source/generic/poly.cxx index 25baea04fb9f..a49d998b1354 100644 --- a/tools/source/generic/poly.cxx +++ b/tools/source/generic/poly.cxx @@ -1525,6 +1525,12 @@ tools::Polygon& Polygon::operator=( const tools::Polygon& rPoly ) return *this; } +tools::Polygon& Polygon::operator=( tools::Polygon&& rPoly ) +{ + std::swap(mpImplPolygon, rPoly.mpImplPolygon); + return *this; +} + bool Polygon::operator==( const tools::Polygon& rPoly ) const { diff --git a/tools/source/generic/poly2.cxx b/tools/source/generic/poly2.cxx index 08f1bb877f2d..df7c51545d92 100644 --- a/tools/source/generic/poly2.cxx +++ b/tools/source/generic/poly2.cxx @@ -536,6 +536,12 @@ PolyPolygon& PolyPolygon::operator=( const tools::PolyPolygon& rPolyPoly ) return *this; } +PolyPolygon& PolyPolygon::operator=( tools::PolyPolygon&& rPolyPoly ) +{ + std::swap(mpImplPolyPolygon, rPolyPoly.mpImplPolyPolygon); + return *this; +} + bool PolyPolygon::operator==( const tools::PolyPolygon& rPolyPoly ) const { if ( rPolyPoly.mpImplPolyPolygon == mpImplPolyPolygon ) |