summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sd/inc/OutlinerIterator.hxx3
-rw-r--r--sd/source/ui/view/OutlinerIterator.cxx11
2 files changed, 14 insertions, 0 deletions
diff --git a/sd/inc/OutlinerIterator.hxx b/sd/inc/OutlinerIterator.hxx
index 2fc5a6cd9647..9adac49e28d4 100644
--- a/sd/inc/OutlinerIterator.hxx
+++ b/sd/inc/OutlinerIterator.hxx
@@ -81,6 +81,7 @@ public:
implementation object.
*/
Iterator (const Iterator& rIterator);
+ Iterator (Iterator&& rIterator);
/** Create a new iterator with the implementation object being the
provided one.
@@ -97,6 +98,8 @@ public:
The iterator which to assign from.
*/
Iterator& operator= (const Iterator& rIterator);
+ Iterator& operator= (Iterator&& rIterator);
+
/** Return the current position of the iterator.
@return
Returns a reference to the current position. Therefore this
diff --git a/sd/source/ui/view/OutlinerIterator.cxx b/sd/source/ui/view/OutlinerIterator.cxx
index 4fd8df0e85ce..33a615ef35cd 100644
--- a/sd/source/ui/view/OutlinerIterator.cxx
+++ b/sd/source/ui/view/OutlinerIterator.cxx
@@ -73,6 +73,11 @@ Iterator::Iterator (const Iterator& rIterator)
{
}
+Iterator::Iterator (Iterator&& rIterator)
+ : mxIterator(std::move(rIterator.mxIterator))
+{
+}
+
Iterator::Iterator (IteratorImplBase* pObject)
: mxIterator(pObject)
{
@@ -94,6 +99,12 @@ Iterator& Iterator::operator= (const Iterator& rIterator)
return *this;
}
+Iterator& Iterator::operator= (Iterator&& rIterator)
+{
+ mxIterator = std::move(rIterator.mxIterator);
+ return *this;
+}
+
const IteratorPosition& Iterator::operator* () const
{
DBG_ASSERT (mxIterator, "::sd::outliner::Iterator::operator* : missing implementation object");