LibreOffice Module sd (master) 1
|
This class wraps the <type>SdOutliner</type> class and represents it as a container of <type>SdrObject</type> objects. More...
#include <OutlinerIterator.hxx>
Public Member Functions | |
OutlinerContainer (SdOutliner *pOutliner) | |
Create a new wrapper object for the given outliner. More... | |
Iterator | begin () |
Return an iterator that points to the first object of one of the sets described above. More... | |
Iterator | end () |
Return an iterator that marks the end of the iteration. More... | |
Iterator | current () |
Return an iterator that points to the current object of one of the sets described above. More... | |
Private Member Functions | |
Iterator | CreateIterator (IteratorLocation aLocation) |
Create an iterator. More... | |
OutlinerContainer (const OutlinerContainer &)=delete | |
OutlinerContainer & | operator= (const OutlinerContainer &)=delete |
Static Private Member Functions | |
static Iterator | CreateSelectionIterator (const ::std::vector<::unotools::WeakReference< SdrObject > > &rObjectList, SdDrawDocument *pDocument, const std::shared_ptr< ViewShell > &rpViewShell, bool bDirectionIsForward, IteratorLocation aLocation) |
Create an iterator that iterates over all currently selected <type>SdrObjects</type> objects of the <member>mpOutliner</member> outliner. More... | |
static Iterator | CreateDocumentIterator (SdDrawDocument *pDocument, const std::shared_ptr< ViewShell > &rpViewShell, bool bDirectionIsForward, IteratorLocation aLocation) |
Create an iterator that iterates over all <type>SdrObjects</type> objects of the <member>mpOutliner</member> outliner. More... | |
static sal_Int32 | GetPageIndex (SdDrawDocument const *pDocument, const std::shared_ptr< ViewShell > &rpViewShell, PageKind ePageKind, EditMode eEditMode, bool bDirectionIsForward, IteratorLocation aLocation) |
Return the index of a page that contains an object that a new iterator shall point to. More... | |
Private Attributes | |
SdOutliner * | mpOutliner |
The wrapped outliner that is represented as object container. More... | |
This class wraps the <type>SdOutliner</type> class and represents it as a container of <type>SdrObject</type> objects.
Its main purpose is to provide iterators for certain sub-sets of those objects. These sub-sets are a) the set of the currently selected objects, b) all objects in the current view, and c) all objects in all views.
The direction of the returned iterators depends on the underlying <type>SdOutliner</type> object and is usually set in the search dialog.
Definition at line 153 of file OutlinerIterator.hxx.
sd::outliner::OutlinerContainer::OutlinerContainer | ( | SdOutliner * | pOutliner | ) |
Create a new wrapper object for the given outliner.
pOutliner | The outliner that is represented by the new object as <type>SdrObject</type> container. |
Definition at line 130 of file OutlinerIterator.cxx.
|
privatedelete |
Iterator sd::outliner::OutlinerContainer::begin | ( | ) |
Return an iterator that points to the first object of one of the sets described above.
This takes also into account the direction of iteration.
Definition at line 135 of file OutlinerIterator.cxx.
References sd::outliner::BEGIN, and CreateIterator().
Referenced by SdOutliner::EndOfSearch(), SdOutliner::Initialize(), and SdOutliner::SearchAndReplaceAll().
|
staticprivate |
Create an iterator that iterates over all <type>SdrObjects</type> objects of the <member>mpOutliner</member> outliner.
pDocument | The document to which the objects belong. |
pViewShell | The view shell which displays the objects. |
bDirectionIsForward | The direction of iteration. It defaults to forward. |
aLocation | This specifies at which object the iterator points initially. |
Definition at line 211 of file OutlinerIterator.cxx.
References sd::outliner::BEGIN, sd::outliner::CURRENT, sd::outliner::END, GetPageIndex(), Handout, MasterPage, Page, and Standard.
Referenced by CreateIterator().
|
private |
Create an iterator.
The object pointed to depends on the search direction retrieved from the outliner object <member>mpOutliner</member> and the given location.
aLocation | This specifies whether the returned iterator points to the first, (one past the) last, or current object. |
Definition at line 150 of file OutlinerIterator.cxx.
References CreateDocumentIterator(), CreateSelectionIterator(), SdOutliner::maMarkListCopy, SdOutliner::mbDirectionIsForward, SdOutliner::mbRestrictSearchToSelection, SdOutliner::mpDrawDocument, mpOutliner, and SdOutliner::mpWeakViewShell.
|
staticprivate |
Create an iterator that iterates over all currently selected <type>SdrObjects</type> objects of the <member>mpOutliner</member> outliner.
rObjectList | List of currently selected objects. This list is necessary so that the selection can be changed without affecting the iterator. |
pDocument | The document to which the objects belong. |
pViewShell | The view shell which displays the objects. |
bDirectionIsForward | The direction of iteration. It defaults to forward. |
aLocation | This specifies at which object the iterator points initially. |
Definition at line 171 of file OutlinerIterator.cxx.
References sd::outliner::BEGIN, sd::outliner::CURRENT, and sd::outliner::END.
Referenced by CreateIterator().
Iterator sd::outliner::OutlinerContainer::current | ( | ) |
Return an iterator that points to the current object of one of the sets described above.
This takes also into account the direction of iteration.
Definition at line 145 of file OutlinerIterator.cxx.
References CreateIterator(), and sd::outliner::CURRENT.
Referenced by SdOutliner::DetectChange(), SdOutliner::Initialize(), and SdOutliner::SearchAndReplaceOnce().
Iterator sd::outliner::OutlinerContainer::end | ( | ) |
Return an iterator that marks the end of the iteration.
This takes also into account the direction of iteration. The object pointed to is not valid.
Definition at line 140 of file OutlinerIterator.cxx.
References CreateIterator(), and sd::outliner::END.
|
staticprivate |
Return the index of a page that contains an object that a new iterator shall point to.
This page index depends primarily on the location, iteration direction, as well as on edit mode and page kind.
pDocument | The document to which the page belongs. |
pViewShell | The view shell which displays the page. |
ePageKind | Specifies the view the page belongs to. |
eEditMode | Specifies whether the page is a master page. |
bDirectionIsForward | The direction of iteration. |
aLocation | This specifies at which object the iterator points initially. |
Definition at line 275 of file OutlinerIterator.cxx.
References sd::outliner::BEGIN, sd::outliner::CURRENT, sd::outliner::END, SdDrawDocument::GetMasterSdPageCount(), SdrPage::GetPageNum(), SdDrawDocument::GetSdPageCount(), MasterPage, and Page.
Referenced by CreateDocumentIterator().
|
privatedelete |
|
private |
The wrapped outliner that is represented as object container.
Definition at line 195 of file OutlinerIterator.hxx.
Referenced by CreateIterator().