LibreOffice Module sd (master) 1
|
Iterator all objects that belong to the current mark list a.k.a. More...
#include <OutlinerIteratorImpl.hxx>
Public Member Functions | |
SelectionIteratorImpl (const ::std::vector< ::unotools::WeakReference< SdrObject > > &rObjectList, sal_Int32 nObjectIndex, SdDrawDocument *pDocument, const std::weak_ptr< ViewShell > &rpViewShellWeak, bool bDirectionIsForward) | |
SelectionIteratorImpl (const SelectionIteratorImpl &rObject) | |
virtual | ~SelectionIteratorImpl () override |
virtual void | GotoNextText () override |
Advance to the next text of the current object or to the next object. More... | |
virtual const IteratorPosition & | GetPosition () override |
Return an object that describes the current object. More... | |
virtual IteratorImplBase * | Clone (IteratorImplBase *pObject=nullptr) const override |
Create an exact copy of this object. More... | |
virtual bool | operator== (const IteratorImplBase &rIterator) const override |
Test the equality of the this object and the given iterator. More... | |
![]() | |
IteratorImplBase (SdDrawDocument *pDocument, const std::weak_ptr< ViewShell > &rpViewShellWeak, bool bDirectionIsForward) | |
The constructor stores the given arguments to be used by the derived classes. More... | |
IteratorImplBase (SdDrawDocument *pDocument, std::weak_ptr< ViewShell > pViewShellWeak, bool bDirectionIsForward, PageKind ePageKind, EditMode eEditMode) | |
virtual | ~IteratorImplBase () |
virtual void | GotoNextText ()=0 |
Advance to the next text of the current object or to the next object. More... | |
virtual const IteratorPosition & | GetPosition () |
Return an object that describes the current object. More... | |
virtual IteratorImplBase * | Clone (IteratorImplBase *pObject=nullptr) const |
Create an exact copy of this object. More... | |
virtual bool | operator== (const IteratorImplBase &rIterator) const |
Test the equality of the this object and the given iterator. More... | |
virtual bool | IsEqualSelection (const IteratorImplBase &rIterator) const |
This method is used by the equality operator. More... | |
virtual void | Reverse () |
Reverse the direction of iteration. More... | |
Private Member Functions | |
virtual bool | IsEqualSelection (const IteratorImplBase &rIterator) const override |
Compare the given iterator with this object. More... | |
IteratorImplBase & | operator= (const IteratorImplBase &rIterator) |
Private Attributes | |
const ::std::vector<::unotools::WeakReference< SdrObject > > & | mrObjectList |
sal_Int32 | mnObjectIndex |
Additional Inherited Members | |
![]() | |
IteratorPosition | maPosition |
The current position as returned by <member>GetPosition()</member>. More... | |
SdDrawDocument * | mpDocument |
The document on whose data the iterator operates. More... | |
std::weak_ptr< ViewShell > | mpViewShellWeak |
Necessary secondary source of information. More... | |
bool | mbDirectionIsForward |
Specifies the search direction. More... | |
Iterator all objects that belong to the current mark list a.k.a.
selection. It is assumed that all marked objects belong to the same page. It is further assumed that the mark list does not change while an iterator is alive. It is therefore the responsibility of an iterator's owner to handle the case of a changed mark list.
For documentation of the methods please refer to the base class <type>IteratorImplBase</type>.
Definition at line 124 of file OutlinerIteratorImpl.hxx.
sd::outliner::SelectionIteratorImpl::SelectionIteratorImpl | ( | const ::std::vector< ::unotools::WeakReference< SdrObject > > & | rObjectList, |
sal_Int32 | nObjectIndex, | ||
SdDrawDocument * | pDocument, | ||
const std::weak_ptr< ViewShell > & | rpViewShellWeak, | ||
bool | bDirectionIsForward | ||
) |
Definition at line 413 of file OutlinerIterator.cxx.
Referenced by Clone().
sd::outliner::SelectionIteratorImpl::SelectionIteratorImpl | ( | const SelectionIteratorImpl & | rObject | ) |
|
overridevirtual |
Definition at line 425 of file OutlinerIterator.cxx.
|
overridevirtual |
Create an exact copy of this object.
No argument should be specified when called from the outside. It then creates an object first and passes that to the inherited <member>Clone()</member> methods to fill in class specific information.
Reimplemented from sd::outliner::IteratorImplBase.
Definition at line 428 of file OutlinerIterator.cxx.
References sd::outliner::IteratorImplBase::mbDirectionIsForward, mnObjectIndex, sd::outliner::IteratorImplBase::mpDocument, sd::outliner::IteratorImplBase::mpViewShellWeak, mrObjectList, pObject, and SelectionIteratorImpl().
|
overridevirtual |
Return an object that describes the current object.
Reimplemented from sd::outliner::IteratorImplBase.
Definition at line 485 of file OutlinerIterator.cxx.
References sd::outliner::IteratorImplBase::maPosition, mnObjectIndex, mrObjectList, and sd::outliner::IteratorPosition::mxObject.
|
overridevirtual |
Advance to the next text of the current object or to the next object.
This takes the iteration direction into account. The new object pointed to can be retrieved (among other information) by calling the <member>GetPosition</member> method.
Implements sd::outliner::IteratorImplBase.
Definition at line 437 of file OutlinerIterator.cxx.
References DynCastSdrTextObj(), SdrTextObj::getTextCount(), sd::outliner::IteratorImplBase::maPosition, sd::outliner::IteratorImplBase::mbDirectionIsForward, mnObjectIndex, sd::outliner::IteratorPosition::mnText, and mrObjectList.
|
overrideprivatevirtual |
Compare the given iterator with this object.
This method handles only the case that the given iterator is an instance of this class.
rIterator | The iterator to compare to. |
Reimplemented from sd::outliner::IteratorImplBase.
Definition at line 497 of file OutlinerIterator.cxx.
References mnObjectIndex, and sd::outliner::IteratorImplBase::mpDocument.
|
private |
|
overridevirtual |
Test the equality of the this object and the given iterator.
Two iterators are taken to be equal when they point to the same object. Iteration direction is not taken into account.
rIterator | The iterator to compare to. |
Reimplemented from sd::outliner::IteratorImplBase.
Definition at line 492 of file OutlinerIterator.cxx.
References sd::outliner::IteratorImplBase::IsEqualSelection().
|
private |
Definition at line 144 of file OutlinerIteratorImpl.hxx.
Referenced by Clone(), GetPosition(), GotoNextText(), and IsEqualSelection().
|
private |
Definition at line 143 of file OutlinerIteratorImpl.hxx.
Referenced by Clone(), GetPosition(), and GotoNextText().