LibreOffice Module svx (master) 1
Public Member Functions | Protected Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | Friends | List of all members
SdrObjList Class Reference

#include <svdpage.hxx>

Inheritance diagram for SdrObjList:
[legend]
Collaboration diagram for SdrObjList:
[legend]

Public Member Functions

virtual SdrPagegetSdrPageFromSdrObjList () const
 
virtual SdrObjectgetSdrObjectFromSdrObjList () const
 
void CopyObjects (const SdrObjList &rSrcList)
 
void ClearSdrObjList ()
 
void RecalcObjOrdNums ()
 recalculate order numbers / ZIndex More...
 
bool IsObjOrdNumsDirty () const
 
virtual void NbcInsertObject (SdrObject *pObj, size_t nPos=SAL_MAX_SIZE)
 
virtual void InsertObject (SdrObject *pObj, size_t nPos=SAL_MAX_SIZE)
 
void sort (std::vector< sal_Int32 > &sortOrder)
 
void InsertObjectThenMakeNameUnique (SdrObject *pObj)
 
void InsertObjectThenMakeNameUnique (SdrObject *pObj, std::unordered_set< rtl::OUString > &rNameSet, size_t nPos=SAL_MAX_SIZE)
 
virtual rtl::Reference< SdrObjectNbcRemoveObject (size_t nObjNum)
 remove from list without delete More...
 
virtual rtl::Reference< SdrObjectRemoveObject (size_t nObjNum)
 
virtual rtl::Reference< SdrObjectReplaceObject (SdrObject *pNewObj, size_t nObjNum)
 Replace existing object by different one. More...
 
virtual SdrObjectSetObjectOrdNum (size_t nOldObjNum, size_t nNewObjNum)
 Modify ZOrder of an SdrObject. More...
 
void SetExistingObjectOrdNum (SdrObject *pExistingObj, size_t nNewObjNum)
 Modify ZOrder of an SdrObject, object must already be in the list. More...
 
void SetSdrObjListRectsDirty ()
 
const tools::RectangleGetAllObjSnapRect () const
 
const tools::RectangleGetAllObjBoundRect () const
 
void NbcReformatAllTextObjects ()
 reformat all text objects, e.g. when changing printer More...
 
void ReformatAllTextObjects ()
 
void ReformatAllEdgeObjects ()
 #103122# reformats all edge objects that are connected to other objects More...
 
void BurnInStyleSheetAttributes ()
 convert attributes of the style to hard formatting More...
 
size_t GetObjCount () const
 
SdrObjectGetObj (size_t nNum) const
 
SdrObjectGetObjByName (std::u16string_view sName) const
 
virtual bool IsReadOnly () const
 linked page or linked group object More...
 
void FlattenGroups ()
 Makes the object list flat, i.e. More...
 
void UnGroupObj (size_t nObjNum)
 Ungroup the object at the given index. More...
 
bool HasObjectNavigationOrder () const
 Return whether there is an explicit, user defined, object navigation order. More...
 
void SetObjectNavigationPosition (SdrObject &rObject, const sal_uInt32 nNewNavigationPosition)
 Set the navigation position of the given object to the specified value. More...
 
SdrObjectGetObjectForNavigationPosition (const sal_uInt32 nNavigationPosition) const
 Return the object for the given navigation position. More...
 
void ClearObjectNavigationOrder ()
 Restore the navigation order to that defined by the z-order. More...
 
bool RecalcNavigationPositions ()
 Set the navigation position of all SdrObjects to their position in the mxNavigationOrder list. More...
 
void SetNavigationOrder (const css::uno::Reference< css::container::XIndexAccess > &rxOrder)
 Set the navigation order to the one defined by the given list of XShape objects. More...
 
virtual void dumpAsXml (xmlTextWriterPtr pWriter) const
 

Protected Member Functions

void RecalcRects ()
 
 SdrObjList ()
 
virtual ~SdrObjList ()
 

Private Member Functions

 SdrObjList (const SdrObjList &rSrcList)=delete
 
SdrObjListoperator= (const SdrObjList &rSrcList)=delete
 
void impClearSdrObjList (bool bBroadcast)
 
void InsertObjectIntoContainer (SdrObject &rObject, const sal_uInt32 nInsertPosition)
 Insert an SdrObject into maList. More...
 
void ReplaceObjectInContainer (SdrObject &rObject, const sal_uInt32 nObjectPosition)
 Replace an object in the object list. More...
 
void RemoveObjectFromContainer (const sal_uInt32 nObjectPosition)
 Remove an object from the object list. More...
 
void ImplReformatAllEdgeObjects (const SdrObjList &)
 

Static Private Member Functions

static void impChildInserted (SdrObject const &rChild)
 simple ActionChildInserted forwarder to have it on a central place More...
 

Private Attributes

tools::Rectangle maSdrObjListOutRect
 
tools::Rectangle maSdrObjListSnapRect
 
std::deque< rtl::Reference< SdrObject > > maList
 
std::optional< std::vector< unotools::WeakReference< SdrObject > > > mxNavigationOrder
 This list, if it exists, defines the navigation order. More...
 
bool mbObjOrdNumsDirty
 
bool mbRectsDirty
 
bool mbIsNavigationOrderDirty
 This flag is <TRUE> when the mpNavigation list has been changed but the indices of the referenced SdrObjects still have their old values. More...
 

Friends

class SdrObjListIter
 
class SdrEditView
 

Detailed Description

Definition at line 61 of file svdpage.hxx.

Constructor & Destructor Documentation

◆ SdrObjList() [1/2]

SdrObjList::SdrObjList ( const SdrObjList rSrcList)
privatedelete

◆ SdrObjList() [2/2]

SdrObjList::SdrObjList ( )
protected

Definition at line 67 of file svdpage.cxx.

◆ ~SdrObjList()

SdrObjList::~SdrObjList ( )
protectedvirtual

Definition at line 115 of file svdpage.cxx.

References maList.

Member Function Documentation

◆ BurnInStyleSheetAttributes()

void SdrObjList::BurnInStyleSheetAttributes ( )

convert attributes of the style to hard formatting

Definition at line 771 of file svdpage.cxx.

References a, SdrObject::BurnInStyleSheetAttributes(), GetObj(), and GetObjCount().

Referenced by SdrModel::BurnInStyleSheetAttributes().

◆ ClearObjectNavigationOrder()

void SdrObjList::ClearObjectNavigationOrder ( )

Restore the navigation order to that defined by the z-order.

Definition at line 944 of file svdpage.cxx.

References mbIsNavigationOrderDirty, and mxNavigationOrder.

Referenced by SetNavigationOrder().

◆ ClearSdrObjList()

void SdrObjList::ClearSdrObjList ( )

◆ CopyObjects()

void SdrObjList::CopyObjects ( const SdrObjList rSrcList)

◆ dumpAsXml()

void SdrObjList::dumpAsXml ( xmlTextWriterPtr  pWriter) const
virtual

Reimplemented in SdrObjGroup, and SdrPage.

Definition at line 1088 of file svdpage.cxx.

References GetObj(), GetObjCount(), i, and pObject.

Referenced by SdrObjGroup::dumpAsXml(), and SdrPage::dumpAsXml().

◆ FlattenGroups()

void SdrObjList::FlattenGroups ( )

Makes the object list flat, i.e.

the object list content are then tree leaves

This method travels recursively over all group objects in this list, extracts the content, inserts it flat to the list and removes the group object afterwards.

Definition at line 823 of file svdpage.cxx.

References GetObjCount(), i, and UnGroupObj().

Referenced by SdrGrafObj::DoConvertToPolyObj(), and UnGroupObj().

◆ GetAllObjBoundRect()

const tools::Rectangle & SdrObjList::GetAllObjBoundRect ( ) const

◆ GetAllObjSnapRect()

const tools::Rectangle & SdrObjList::GetAllObjSnapRect ( ) const

Definition at line 694 of file svdpage.cxx.

References maSdrObjListSnapRect, mbRectsDirty, and RecalcRects().

Referenced by SdrObjGroup::GetSnapRect(), and SdrExchangeView::Paste().

◆ GetObj()

SdrObject * SdrObjList::GetObj ( size_t  nNum) const

Definition at line 785 of file svdpage.cxx.

References maList.

Referenced by CloneList::AddPair(), svx::ThemeColorChanger::apply(), BurnInStyleSheetAttributes(), SdrMarkView::CheckSingleSdrObjectHit(), sdr::properties::E3dSceneProperties::ClearMergedItem(), sdr::properties::GroupProperties::ClearMergedItem(), sdr::properties::GroupProperties::ClearObjectItem(), SdrObject::ConvertToContourObj(), CopyObjects(), CreateIMapGraphic(), E3dView::CreateMarkedObjModel(), SdrEditView::DeleteLayer(), SvxShape::dispose(), SdrObjGroup::DoConvertToPolyObj(), SdrEditView::DoImportMarkedMtf(), sdr::contact::ObjectContactOfPageView::DoProcessDisplay(), dumpAsXml(), SdrMarkView::dumpGluePointsToJSON(), SdrPageView::EnterGroup(), sdr::properties::GroupProperties::ForceStyleToHardAttributes(), SvxDrawPage::getByIndex(), SvxShapeGroup::getByIndex(), Svx3DSceneObject::getByIndex(), svx::GetGeometryForCustomShape(), accessibility::AccessibleShape::getGroupPosition(), IMapWindow::GetHitSdrObj(), IMapWindow::GetImageMap(), SdrObjGroup::GetLayer(), sdr::properties::E3dSceneProperties::GetMergedItemSet(), sdr::properties::GroupProperties::GetMergedItemSet(), GetObjByName(), svx::sidebar::SelectionAnalyzer::GetObjectTypeFromGroup(), ContourWindow::GetPolyPolygon(), SdrObjGroup::GetRotateAngle(), SvxGraphCtrlAccessibleContext::getSdrObject(), SdrObjGroup::GetShearAngle(), sdr::properties::E3dSceneProperties::GetStyleSheet(), sdr::properties::GroupProperties::GetStyleSheet(), sdr::contact::ViewContactOfSdrObj::GetViewContact(), sdr::contact::ViewContactOfMasterPageDescriptor::GetViewContact(), sdr::contact::ViewContactOfPageHierarchy::GetViewContact(), SdrPaintView::GlueInvalidate(), SdrEditView::GroupMarked(), E3dScene::handlePageChange(), SdrObjGroup::handlePageChange(), Imp3DDepthRemapper::Imp3DDepthRemapper(), Imp_E3dView_InorderRun3DObjects(), E3dView::ImpCloneAll3DObjectsToDestScene(), SdrEditView::ImpDelLayerCheck(), SdrEditView::ImpDelLayerDelObjs(), SdrEdgeObj::ImpFindConnector(), ImpGetObjByName(), SdrObjListIter::ImpProcessObjectList(), svxform::NavigatorTreeModel::InsertFormComponent(), SdrMarkList::InsertPageView(), svx::FontWorkGalleryDialog::insertSelectedFontwork(), ContourWindow::IsContourChanged(), SdrPageView::IsObjMarkable(), SdrObject::isVisibleOnAnyOfTheseLayers(), SdrObject::MakeNameUnique(), SdrPage::MakePageObjectsNamesUnique(), SdrMarkView::MarkableObjectsExceed(), SdrMarkView::MarkNextObj(), SdrMarkView::MarkObj(), SdrObjGroup::Mirror(), SdrObjGroup::Move(), SdrEditView::MovMarkedToBtm(), SdrEditView::MovMarkedToTop(), SdrObjGroup::NbcMirror(), SdrObjGroup::NbcMove(), NbcReformatAllTextObjects(), SdrObjGroup::NbcResize(), SdrObjGroup::NbcRotate(), SdrObjGroup::NbcSetAnchorPos(), E3dScene::NbcSetLayer(), SdrObjGroup::NbcSetLayer(), SdrObjGroup::NbcShear(), SdrExchangeView::Paste(), E3dView::Paste(), sdr::table::SvxTableController::PasteObjModel(), E3dScene::RecalcBoundVolume(), RecalcRects(), E3dScene::RecalcSnapRect(), SvxDrawPage::remove(), SvxShapeGroup::remove(), Svx3DSceneObject::remove(), E3dScene::removeAllNonSelectedObjects(), SdrObjGroup::Resize(), SdrObjGroup::Rotate(), SdrObjListPrimitiveHit(), SdrUndoAttrObj::SdrUndoAttrObj(), SdrUndoGeoObj::SdrUndoGeoObj(), SdrObjGroup::SetAnchorPos(), E3dScene::SetBoundAndSnapRectsDirty(), sdr::properties::E3dSceneProperties::SetMergedItem(), sdr::properties::GroupProperties::SetMergedItem(), sdr::properties::E3dSceneProperties::SetMergedItemSet(), sdr::properties::GroupProperties::SetMergedItemSet(), E3dScene::SetSelected(), sdr::properties::E3dSceneProperties::SetStyleSheet(), sdr::properties::GroupProperties::SetStyleSheet(), E3dScene::SetTransformChanged(), SdrObjGroup::Shear(), SdrObjGroup::TakeObjInfo(), SdrObjGroup::TakeXorPoly(), SdrEditView::UnGroupMarked(), and UnGroupObj().

◆ GetObjByName()

SdrObject * SdrObjList::GetObjByName ( std::u16string_view  sName) const

Definition at line 793 of file svdpage.cxx.

References SdrObject::GetName(), GetObj(), GetObjCount(), i, and sName.

◆ GetObjCount()

size_t SdrObjList::GetObjCount ( ) const

Definition at line 779 of file svdpage.cxx.

References maList.

Referenced by CloneList::AddPair(), svx::ThemeColorChanger::apply(), BurnInStyleSheetAttributes(), SdrMarkView::CheckSingleSdrObjectHit(), sdr::properties::E3dSceneProperties::ClearMergedItem(), sdr::properties::GroupProperties::ClearMergedItem(), sdr::properties::GroupProperties::ClearObjectItem(), SdrObject::ConvertToContourObj(), CopyObjects(), CreateIMapGraphic(), E3dView::CreateMarkedObjModel(), SdrEditView::DeleteLayer(), SdrEditView::DeleteMarkedObj(), SvxShape::dispose(), SdrUndoSort::Do(), SdrObjGroup::DoConvertToPolyObj(), E3dView::DoDepthArrange(), ImpSdrGDIMetaFileImport::DoImport(), ImpSdrPdfImport::DoImport(), sdr::contact::ObjectContactOfPageView::DoProcessDisplay(), dumpAsXml(), SdrMarkView::dumpGluePointsToJSON(), SdrPageView::EnterGroup(), FlattenGroups(), sdr::properties::GroupProperties::ForceStyleToHardAttributes(), SvxGraphCtrlAccessibleContext::getAccessibleChildCount(), getAllHit3DObjectsSortedFrontToBack(), SvxDrawPage::getByIndex(), SvxDrawPage::getCount(), SvxShapeGroup::getCount(), Svx3DSceneObject::getCount(), SdrObjGroup::GetCurrentBoundRect(), accessibility::AccessibleShape::getGroupPosition(), IMapWindow::GetHitSdrObj(), IMapWindow::GetImageMap(), SdrObjGroup::GetLayer(), sdr::properties::E3dSceneProperties::GetMergedItemSet(), sdr::properties::GroupProperties::GetMergedItemSet(), GetObjByName(), sdr::contact::ViewContactOfSdrObj::GetObjectCount(), sdr::contact::ViewContactOfMasterPageDescriptor::GetObjectCount(), sdr::contact::ViewContactOfPageHierarchy::GetObjectCount(), svx::sidebar::SelectionAnalyzer::GetObjectTypeFromGroup(), ContourWindow::GetPolyPolygon(), SdrObjGroup::GetRotateAngle(), SvxGraphCtrlAccessibleContext::getSdrObject(), SdrObjGroup::GetShearAngle(), SdrObjGroup::GetSnapRect(), sdr::properties::E3dSceneProperties::GetStyleSheet(), sdr::properties::GroupProperties::GetStyleSheet(), SdrPaintView::GlueInvalidate(), SdrEditView::GroupMarked(), E3dScene::handlePageChange(), SdrObjGroup::handlePageChange(), SvxDrawPage::hasElements(), SvxShapeGroup::hasElements(), Svx3DSceneObject::hasElements(), Imp3DDepthRemapper::Imp3DDepthRemapper(), Imp_E3dView_InorderRun3DObjects(), SdrEditView::ImpCheckToTopBtmPossible(), SdrTextObj::ImpConvertContainedTextToSdrPathObjs(), SdrEditView::ImpDelLayerCheck(), SdrEditView::ImpDelLayerDelObjs(), SdrEdgeObj::ImpFindConnector(), ImpGetObjByName(), ImplReformatAllEdgeObjects(), SdrObjListIter::ImpProcessObjectList(), svxform::NavigatorTreeModel::InsertFormComponent(), SdrMarkList::InsertPageView(), svx::FontWorkGalleryDialog::insertSelectedFontwork(), ContourWindow::IsContourChanged(), SdrPageView::IsObjMarkable(), SdrObject::isVisibleOnAnyOfTheseLayers(), SdrPage::lateInit(), SdrPage::MakePageObjectsNamesUnique(), SdrMarkView::MarkableObjectsExceed(), SdrMarkView::MarkNextObj(), SdrMarkView::MarkObj(), SdrObjGroup::Mirror(), SdrObjGroup::Move(), SdrEditView::MovMarkedToTop(), NbcInsertObject(), SdrObjGroup::NbcMirror(), SdrObjGroup::NbcMove(), NbcReformatAllTextObjects(), NbcRemoveObject(), SdrObjGroup::NbcResize(), SdrObjGroup::NbcRotate(), SdrObjGroup::NbcSetAnchorPos(), E3dScene::NbcSetLayer(), SdrObjGroup::NbcSetLayer(), SdrObjGroup::NbcShear(), SdrExchangeView::Paste(), E3dView::Paste(), sdr::table::SvxTableController::PasteObjModel(), SdrEditView::PutMarkedInFrontOfObj(), E3dScene::RecalcBoundVolume(), RecalcRects(), E3dScene::RecalcSnapRect(), E3dScene::RemapOrdNum(), SvxDrawPage::remove(), SvxShapeGroup::remove(), Svx3DSceneObject::remove(), E3dScene::removeAllNonSelectedObjects(), RemoveObject(), SdrObjGroup::Resize(), SdrObjGroup::Rotate(), SdrObjectPrimitiveHit(), SdrObjListPrimitiveHit(), SdrUndoAttrObj::SdrUndoAttrObj(), SdrUndoGeoObj::SdrUndoGeoObj(), SdrObjGroup::SetAnchorPos(), E3dScene::SetBoundAndSnapRectsDirty(), sdr::properties::E3dSceneProperties::SetMergedItem(), sdr::properties::GroupProperties::SetMergedItem(), sdr::properties::E3dSceneProperties::SetMergedItemSet(), sdr::properties::GroupProperties::SetMergedItemSet(), E3dScene::SetSelected(), sdr::properties::E3dSceneProperties::SetStyleSheet(), sdr::properties::GroupProperties::SetStyleSheet(), E3dScene::SetTransformChanged(), SdrObjGroup::Shear(), SdrObjGroup::TakeObjInfo(), SdrObjGroup::TakeObjNamePlural(), SdrObjGroup::TakeObjNameSingul(), SdrObjGroup::TakeXorPoly(), SdrEditView::UnGroupMarked(), and UnGroupObj().

◆ GetObjectForNavigationPosition()

SdrObject * SdrObjList::GetObjectForNavigationPosition ( const sal_uInt32  nNavigationPosition) const

Return the object for the given navigation position.

When there is a user defined navigation order, i.e. mxNavigationOrder is not NULL, then that is used to look up the object. Otherwise the z-order is used by looking up the object in maList.

Parameters
nNavigationPositionValid values include 0 and are smaller than the number of objects as returned by GetObjCount().
Returns
The returned pointer is NULL for invalid positions.

Definition at line 916 of file svdpage.cxx.

References HasObjectNavigationOrder(), maList, mxNavigationOrder, and size.

Referenced by ImplReformatAllEdgeObjects(), SdrObjListIter::ImpProcessObjectList(), and SdrMarkView::MarkNextObj().

◆ getSdrObjectFromSdrObjList()

SdrObject * SdrObjList::getSdrObjectFromSdrObjList ( ) const
virtual

◆ getSdrPageFromSdrObjList()

SdrPage * SdrObjList::getSdrPageFromSdrObjList ( ) const
virtual

◆ HasObjectNavigationOrder()

bool SdrObjList::HasObjectNavigationOrder ( ) const

Return whether there is an explicit, user defined, object navigation order.

When there is one this method returns <TRUE> and the GetObjectForNavigationPosition() and SdrObject::GetNavigationPosition() methods will return values different from those returned by SdrObject::GetOrdNum() and GetObj().

Definition at line 865 of file svdpage.cxx.

References mxNavigationOrder.

Referenced by GetObjectForNavigationPosition(), InsertObjectIntoContainer(), RemoveObjectFromContainer(), ReplaceObjectInContainer(), SdrObjListIter::SdrObjListIter(), and SetExistingObjectOrdNum().

◆ impChildInserted()

void SdrObjList::impChildInserted ( SdrObject const &  rChild)
staticprivate

simple ActionChildInserted forwarder to have it on a central place

Definition at line 234 of file svdpage.cxx.

References sdr::contact::ViewContact::ActionChildInserted(), sdr::contact::ViewContact::GetParentContact(), and SdrObject::GetViewContact().

Referenced by NbcInsertObject(), and ReplaceObject().

◆ impClearSdrObjList()

void SdrObjList::impClearSdrObjList ( bool  bBroadcast)
private

◆ ImplReformatAllEdgeObjects()

void SdrObjList::ImplReformatAllEdgeObjects ( const SdrObjList rObjList)
private

◆ InsertObject()

void SdrObjList::InsertObject ( SdrObject pObj,
size_t  nPos = SAL_MAX_SIZE 
)
virtual

◆ InsertObjectIntoContainer()

void SdrObjList::InsertObjectIntoContainer ( SdrObject rObject,
const sal_uInt32  nInsertPosition 
)
private

Insert an SdrObject into maList.

Do not modify the maList member directly.

Parameters
rObjectThe object to insert into the object list.
nInsertPositionThe given object is inserted before the object at this position. Valid values include 0 (the object is inserted at the head of the list) and the number of objects in the list as returned by GetObjCount() (the object is inserted at the end of the list.)

Definition at line 1001 of file svdpage.cxx.

References HasObjectNavigationOrder(), maList, mbObjOrdNumsDirty, mxNavigationOrder, and SdrObject::SetNavigationPosition().

Referenced by NbcInsertObject(), and SetObjectOrdNum().

◆ InsertObjectThenMakeNameUnique() [1/2]

void SdrObjList::InsertObjectThenMakeNameUnique ( SdrObject pObj)

◆ InsertObjectThenMakeNameUnique() [2/2]

void SdrObjList::InsertObjectThenMakeNameUnique ( SdrObject pObj,
std::unordered_set< rtl::OUString > &  rNameSet,
size_t  nPos = SAL_MAX_SIZE 
)

References IsReadOnly().

◆ IsObjOrdNumsDirty()

bool SdrObjList::IsObjOrdNumsDirty ( ) const
inline

Definition at line 104 of file svdpage.hxx.

Referenced by SdrEditView::GroupMarked().

◆ IsReadOnly()

bool SdrObjList::IsReadOnly ( ) const
virtual

linked page or linked group object

Definition at line 805 of file svdpage.cxx.

References getSdrObjectFromSdrObjList(), SdrObject::getSdrPageFromSdrObject(), and IsReadOnly().

Referenced by IsReadOnly().

◆ NbcInsertObject()

void SdrObjList::NbcInsertObject ( SdrObject pObj,
size_t  nPos = SAL_MAX_SIZE 
)
virtual

◆ NbcReformatAllTextObjects()

void SdrObjList::NbcReformatAllTextObjects ( )

reformat all text objects, e.g. when changing printer

Definition at line 718 of file svdpage.cxx.

References GetObj(), GetObjCount(), SdrObject::NbcReformatText(), and nCount.

Referenced by SdrObjGroup::NbcReformatText(), and ReformatAllTextObjects().

◆ NbcRemoveObject()

rtl::Reference< SdrObject > SdrObjList::NbcRemoveObject ( size_t  nObjNum)
virtual

remove from list without delete

Reimplemented in E3dScene.

Definition at line 334 of file svdpage.cxx.

References DBG_ASSERT, GetObjCount(), maList, mbObjOrdNumsDirty, nCount, RemoveObjectFromContainer(), and SetSdrObjListRectsDirty().

Referenced by E3dScene::NbcRemoveObject(), SvxShapeGroup::remove(), and Svx3DSceneObject::remove().

◆ operator=()

SdrObjList & SdrObjList::operator= ( const SdrObjList rSrcList)
privatedelete

◆ RecalcNavigationPositions()

bool SdrObjList::RecalcNavigationPositions ( )

Set the navigation position of all SdrObjects to their position in the mxNavigationOrder list.

This method returns immediately when no update is necessary.

Returns
This method returns <TRUE> when the navigation positions stored in SdrObjects are up to date. It returns <FALSE> when the navigation positions are not valid, for example because no explicit navigation order has been defined, i.e. HasObjectNavigationOrder() would return <FALSE>.

Definition at line 951 of file svdpage.cxx.

References mbIsNavigationOrderDirty, mxNavigationOrder, and nIndex.

◆ RecalcObjOrdNums()

void SdrObjList::RecalcObjOrdNums ( )

recalculate order numbers / ZIndex

Definition at line 198 of file svdpage.cxx.

References maList, and mbObjOrdNumsDirty.

Referenced by SdrEditView::GroupMarked().

◆ RecalcRects()

void SdrObjList::RecalcRects ( )
protected

◆ ReformatAllEdgeObjects()

void SdrObjList::ReformatAllEdgeObjects ( )

#103122# reformats all edge objects that are connected to other objects

steps over all available objects and reformats all edge objects that are connected to other objects so that they may reposition themselves.

Definition at line 743 of file svdpage.cxx.

References ImplReformatAllEdgeObjects().

Referenced by SdrModel::ImpReformatAllEdgeObjects().

◆ ReformatAllTextObjects()

void SdrObjList::ReformatAllTextObjects ( )

Definition at line 734 of file svdpage.cxx.

References NbcReformatAllTextObjects().

Referenced by SdrModel::ImpReformatAllTextObjects().

◆ RemoveObject()

rtl::Reference< SdrObject > SdrObjList::RemoveObject ( size_t  nObjNum)
virtual

◆ RemoveObjectFromContainer()

void SdrObjList::RemoveObjectFromContainer ( const sal_uInt32  nObjectPosition)
private

Remove an object from the object list.

The object list has to contain at least one element.

Parameters
nObjectPositionThe object at this position is removed from the object list. Valid values include 0 and are smaller than the number of objects in the list.

Definition at line 1062 of file svdpage.cxx.

References HasObjectNavigationOrder(), maList, mbIsNavigationOrderDirty, mbObjOrdNumsDirty, and mxNavigationOrder.

Referenced by impClearSdrObjList(), NbcRemoveObject(), RemoveObject(), and SetObjectOrdNum().

◆ ReplaceObject()

rtl::Reference< SdrObject > SdrObjList::ReplaceObject ( SdrObject pNewObj,
size_t  nObjNum 
)
virtual

◆ ReplaceObjectInContainer()

void SdrObjList::ReplaceObjectInContainer ( SdrObject rObject,
const sal_uInt32  nObjectPosition 
)
private

Replace an object in the object list.

Parameters
rObjectThe new object that replaces the one in the list at the specified position.
nObjectPositionThe object at this position in the object list is replaced by the given object. Valid values include 0 and are smaller than the number of objects in the list.

Definition at line 1027 of file svdpage.cxx.

References get(), HasObjectNavigationOrder(), maList, mbIsNavigationOrderDirty, mbObjOrdNumsDirty, and mxNavigationOrder.

Referenced by ReplaceObject().

◆ SetExistingObjectOrdNum()

void SdrObjList::SetExistingObjectOrdNum ( SdrObject pExistingObj,
size_t  nNewObjNum 
)

◆ SetNavigationOrder()

void SdrObjList::SetNavigationOrder ( const css::uno::Reference< css::container::XIndexAccess > &  rxOrder)

Set the navigation order to the one defined by the given list of XShape objects.

Parameters
rxOrderWhen this is an empty reference then the navigation order is reset to the z-order. The preferred way to do this, however, is to call ClearObjectNavigationOrder(). Otherwise this list is expected to contain all the shapes in the called SdrObjList.

Definition at line 972 of file svdpage.cxx.

References ClearObjectNavigationOrder(), SdrObject::getSdrObjectFromXShape(), maList, mbIsNavigationOrderDirty, mxNavigationOrder, nCount, nIndex, and pObject.

◆ SetObjectNavigationPosition()

void SdrObjList::SetObjectNavigationPosition ( SdrObject rObject,
const sal_uInt32  nNewNavigationPosition 
)

Set the navigation position of the given object to the specified value.

Note that this changes the navigation position for all objects on or following the old or new position.

Definition at line 867 of file svdpage.cxx.

References SdrObject::getSdrModelFromSdrObject(), maList, mbIsNavigationOrderDirty, mxNavigationOrder, and SdrModel::SetChanged().

◆ SetObjectOrdNum()

SdrObject * SdrObjList::SetObjectOrdNum ( size_t  nOldObjNum,
size_t  nNewObjNum 
)
virtual

◆ SetSdrObjListRectsDirty()

void SdrObjList::SetSdrObjListRectsDirty ( )

◆ sort()

void SdrObjList::sort ( std::vector< sal_Int32 > &  sortOrder)

◆ UnGroupObj()

void SdrObjList::UnGroupObj ( size_t  nObjNum)

Ungroup the object at the given index.

This method ungroups the content of the group object at the given index, i.e. the content is put flat into the object list (if the object at the given index is no group, this method is a no-op). If the group itself contains group objects, the operation is performed recursively, such that the content of the given object contains no groups afterwards.

Definition at line 830 of file svdpage.cxx.

References FlattenGroups(), GetObj(), GetObjCount(), SdrObject::GetSubList(), i, InsertObject(), nCount, and RemoveObject().

Referenced by FlattenGroups().

Friends And Related Function Documentation

◆ SdrEditView

friend class SdrEditView
friend

Definition at line 64 of file svdpage.hxx.

◆ SdrObjListIter

friend class SdrObjListIter
friend

Definition at line 63 of file svdpage.hxx.

Member Data Documentation

◆ maList

std::deque<rtl::Reference<SdrObject> > SdrObjList::maList
private

◆ maSdrObjListOutRect

tools::Rectangle SdrObjList::maSdrObjListOutRect
private

Definition at line 229 of file svdpage.hxx.

Referenced by GetAllObjBoundRect(), and RecalcRects().

◆ maSdrObjListSnapRect

tools::Rectangle SdrObjList::maSdrObjListSnapRect
private

Definition at line 230 of file svdpage.hxx.

Referenced by GetAllObjSnapRect(), and RecalcRects().

◆ mbIsNavigationOrderDirty

bool SdrObjList::mbIsNavigationOrderDirty
private

This flag is <TRUE> when the mpNavigation list has been changed but the indices of the referenced SdrObjects still have their old values.

Definition at line 239 of file svdpage.hxx.

Referenced by ClearObjectNavigationOrder(), RecalcNavigationPositions(), RemoveObjectFromContainer(), ReplaceObjectInContainer(), SetExistingObjectOrdNum(), SetNavigationOrder(), and SetObjectNavigationPosition().

◆ mbObjOrdNumsDirty

bool SdrObjList::mbObjOrdNumsDirty
private

◆ mbRectsDirty

bool SdrObjList::mbRectsDirty
private

◆ mxNavigationOrder

std::optional<std::vector<unotools::WeakReference<SdrObject> > > SdrObjList::mxNavigationOrder
private

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