LibreOffice Module sd (master) 1
|
Iterator for iteration over all objects in a single view. More...
#include <OutlinerIteratorImpl.hxx>
Public Member Functions | |
ViewIteratorImpl (sal_Int32 nPageIndex, SdDrawDocument *pDocument, const std::weak_ptr< ViewShell > &rpViewShellWeak, bool bDirectionIsForward) | |
ViewIteratorImpl (sal_Int32 nPageIndex, SdDrawDocument *pDocument, const std::weak_ptr< ViewShell > &rpViewShellWeak, bool bDirectionIsForward, PageKind ePageKind, EditMode eEditMode) | |
virtual | ~ViewIteratorImpl () override |
virtual void | GotoNextText () override |
Advance to the next text of the current object or to the next object. More... | |
virtual IteratorImplBase * | Clone (IteratorImplBase *pObject=nullptr) const override |
Create an exact copy of this object. More... | |
virtual void | Reverse () override |
Reverse the direction of iteration. 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... | |
Protected Member Functions | |
void | SetPage (sal_Int32 nPageIndex) |
Set up page pointer and object list iterator for the specified page. More... | |
Private Member Functions | |
ViewIteratorImpl & | operator= (const ViewIteratorImpl &)=delete |
Private Attributes | |
bool | mbPageChangeOccurred |
Indicates whether a page changed occurred on switching to current page. More... | |
SdPage * | mpPage |
Pointer to the page associated with the current page index. May be NULL. More... | |
std::optional< SdrObjListIter > | moObjectIterator |
Iterator of all objects on the current page. More... | |
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 for iteration over all objects in a single view.
On reaching the last object on the last page (or the first object on the first page) the view is not switched. Further calls to the <member>GotoNextObject()</member> method will be ignored.
For documentation of the methods please refer to the base class <type>IteratorImplBase</type>.
Definition at line 166 of file OutlinerIteratorImpl.hxx.
sd::outliner::ViewIteratorImpl::ViewIteratorImpl | ( | sal_Int32 | nPageIndex, |
SdDrawDocument * | pDocument, | ||
const std::weak_ptr< ViewShell > & | rpViewShellWeak, | ||
bool | bDirectionIsForward | ||
) |
Definition at line 507 of file OutlinerIterator.cxx.
References mpPage, and SetPage().
Referenced by Clone().
sd::outliner::ViewIteratorImpl::ViewIteratorImpl | ( | sal_Int32 | nPageIndex, |
SdDrawDocument * | pDocument, | ||
const std::weak_ptr< ViewShell > & | rpViewShellWeak, | ||
bool | bDirectionIsForward, | ||
PageKind | ePageKind, | ||
EditMode | eEditMode | ||
) |
Definition at line 519 of file OutlinerIterator.cxx.
|
overridevirtual |
Definition at line 533 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.
Reimplemented in sd::outliner::DocumentIteratorImpl.
Definition at line 537 of file OutlinerIterator.cxx.
References sd::outliner::IteratorImplBase::Clone(), unotools::WeakReference< class interface_type >::get(), sd::outliner::IteratorImplBase::maPosition, sd::outliner::IteratorImplBase::mbDirectionIsForward, sd::outliner::IteratorPosition::mnPageIndex, moObjectIterator, sd::outliner::IteratorImplBase::mpDocument, mpPage, sd::outliner::IteratorImplBase::mpViewShellWeak, sd::outliner::IteratorPosition::mxObject, pObject, and ViewIteratorImpl().
Referenced by sd::outliner::DocumentIteratorImpl::Clone().
|
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.
Reimplemented in sd::outliner::DocumentIteratorImpl.
Definition at line 562 of file OutlinerIterator.cxx.
References DynCastSdrTextObj(), unotools::WeakReference< class interface_type >::get(), SdrTextObj::getTextCount(), sd::outliner::IteratorImplBase::maPosition, sd::outliner::IteratorImplBase::mbDirectionIsForward, sd::outliner::IteratorPosition::mnPageIndex, sd::outliner::IteratorPosition::mnText, moObjectIterator, mpPage, sd::outliner::IteratorPosition::mxObject, and SetPage().
Referenced by sd::outliner::DocumentIteratorImpl::GotoNextText().
|
privatedelete |
|
overridevirtual |
Reverse the direction of iteration.
The current object stays the same.
Reimplemented from sd::outliner::IteratorImplBase.
Definition at line 666 of file OutlinerIterator.cxx.
References unotools::WeakReference< class interface_type >::get(), sd::outliner::IteratorImplBase::maPosition, sd::outliner::IteratorImplBase::mbDirectionIsForward, moObjectIterator, mpPage, sd::outliner::IteratorPosition::mxObject, and sd::outliner::IteratorImplBase::Reverse().
|
protected |
Set up page pointer and object list iterator for the specified page.
nPageIndex | Index of the new page. It may lie outside the valid range for page indices. |
Definition at line 610 of file OutlinerIterator.cxx.
References DynCastSdrTextObj(), unotools::WeakReference< class interface_type >::get(), SdDrawDocument::GetMasterSdPage(), SdDrawDocument::GetMasterSdPageCount(), SdDrawDocument::GetSdPage(), SdDrawDocument::GetSdPageCount(), SdrTextObj::getTextCount(), sd::outliner::IteratorImplBase::maPosition, sd::outliner::IteratorImplBase::mbDirectionIsForward, mbPageChangeOccurred, sd::outliner::IteratorPosition::meEditMode, sd::outliner::IteratorPosition::mePageKind, sd::outliner::IteratorPosition::mnPageIndex, sd::outliner::IteratorPosition::mnText, moObjectIterator, sd::outliner::IteratorImplBase::mpDocument, mpPage, sd::outliner::IteratorPosition::mxObject, and Page.
Referenced by GotoNextText(), sd::outliner::DocumentIteratorImpl::GotoNextText(), and ViewIteratorImpl().
|
private |
Indicates whether a page changed occurred on switching to current page.
Definition at line 198 of file OutlinerIteratorImpl.hxx.
Referenced by SetPage().
|
private |
Iterator of all objects on the current page.
Definition at line 202 of file OutlinerIteratorImpl.hxx.
Referenced by Clone(), GotoNextText(), Reverse(), and SetPage().
|
private |
Pointer to the page associated with the current page index. May be NULL.
Definition at line 200 of file OutlinerIteratorImpl.hxx.
Referenced by Clone(), GotoNextText(), Reverse(), and SetPage().