LibreOffice Module sd (master) 1
Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
sd::ShapeList Class Referencefinal

#include <shapelist.hxx>

Inheritance diagram for sd::ShapeList:
[legend]
Collaboration diagram for sd::ShapeList:
[legend]

Public Member Functions

 ShapeList ()
 
virtual ~ShapeList ()
 
void addShape (SdrObject &rObject)
 adds the given shape to this list More...
 
void removeShape (SdrObject &rObject)
 removes the shape from this list More...
 
void clear ()
 removes all shapes from this list More...
 
bool isEmpty () const
 returns true if this list is empty More...
 
bool hasShape (SdrObject &rObject) const
 returns true if given shape is part of this list More...
 
SdrObjectgetNextShape ()
 returns the shape the internal iterator points to, or 0 if the list end is reached. More...
 
void seekShape (sal_uInt32 nIndex)
 Sets the internal iterator to the shape at given index. More...
 
bool hasMore () const
 
const std::list< SdrObject * > & getList () const
 
virtual void ObjectInDestruction (const SdrObject &rObject)=0
 

Private Types

typedef std::list< SdrObject * > ListImpl
 

Private Member Functions

virtual void ObjectInDestruction (const SdrObject &rObject) override
 

Private Attributes

ListImpl maShapeList
 
ListImpl::iterator maIter
 

Additional Inherited Members

- Protected Member Functions inherited from sdr::ObjectUser
 ~ObjectUser ()
 

Detailed Description

Definition at line 29 of file shapelist.hxx.

Member Typedef Documentation

◆ ListImpl

typedef std::list< SdrObject* > sd::ShapeList::ListImpl
private

Definition at line 65 of file shapelist.hxx.

Constructor & Destructor Documentation

◆ ShapeList()

ShapeList::ShapeList ( )

Definition at line 28 of file shapelist.cxx.

References maIter, and maShapeList.

◆ ~ShapeList()

ShapeList::~ShapeList ( )
virtual

Definition at line 33 of file shapelist.cxx.

References clear().

Member Function Documentation

◆ addShape()

void ShapeList::addShape ( SdrObject rObject)

adds the given shape to this list

Definition at line 39 of file shapelist.cxx.

References SdrObject::AddObjectUser(), and maShapeList.

Referenced by SdPage::InsertPresObj().

◆ clear()

void ShapeList::clear ( )

removes all shapes from this list

removes all shapes from this list NOTE: iterators will become invalid

Definition at line 75 of file shapelist.cxx.

References maIter, and maShapeList.

Referenced by ~ShapeList().

◆ getList()

const std::list< SdrObject * > & sd::ShapeList::getList ( ) const
inline

◆ getNextShape()

SdrObject * ShapeList::getNextShape ( )

returns the shape the internal iterator points to, or 0 if the list end is reached.

moves the internal iterator to the next shape.

Definition at line 116 of file shapelist.cxx.

References maIter, and maShapeList.

Referenced by SdPage::GetPresObj(), SdDrawDocument::NewOrLoadCompleted(), SdPage::SetAutoLayout(), and sd::DrawViewShell::SwitchPage().

◆ hasMore()

bool ShapeList::hasMore ( ) const

Definition at line 135 of file shapelist.cxx.

References maIter, and maShapeList.

◆ hasShape()

bool ShapeList::hasShape ( SdrObject rObject) const

returns true if given shape is part of this list

Returns
true if given shape is part of this list

Definition at line 93 of file shapelist.cxx.

References maShapeList.

Referenced by SdPage::GetPresObjKind(), SdPage::IsPresObj(), and SdPage::RemovePresObj().

◆ isEmpty()

bool ShapeList::isEmpty ( ) const

returns true if this list is empty

Returns
true if this list is empty

Definition at line 87 of file shapelist.cxx.

References maShapeList.

Referenced by SdDrawDocument::NewOrLoadCompleted(), and SdPage::SetAutoLayout().

◆ ObjectInDestruction()

void ShapeList::ObjectInDestruction ( const SdrObject rObject)
overrideprivatevirtual

Implements sdr::ObjectUser.

Definition at line 98 of file shapelist.cxx.

References maIter, and maShapeList.

◆ removeShape()

void ShapeList::removeShape ( SdrObject rObject)

removes the shape from this list

removes the given shape from this list

Definition at line 54 of file shapelist.cxx.

References maIter, and maShapeList.

Referenced by SdPage::RemovePresObj().

◆ seekShape()

void ShapeList::seekShape ( sal_uInt32  nIndex)

Sets the internal iterator to the shape at given index.

Definition at line 128 of file shapelist.cxx.

References maIter, maShapeList, and nIndex.

Referenced by SdPage::GetPresObj(), SdDrawDocument::NewOrLoadCompleted(), SdPage::SetAutoLayout(), and sd::DrawViewShell::SwitchPage().

Member Data Documentation

◆ maIter

ListImpl::iterator sd::ShapeList::maIter
private

◆ maShapeList

ListImpl sd::ShapeList::maShapeList
private

The documentation for this class was generated from the following files: