LibreOffice Module sw (master) 1
Public Types | Public Member Functions | Private Attributes | List of all members
SwSortedObjs Class Reference

class for collecting anchored objects More...

#include <sortedobjs.hxx>

Public Types

typedef std::vector< SwAnchoredObject * >::const_iterator const_iterator
 

Public Member Functions

 SwSortedObjs ()
 
 ~SwSortedObjs ()
 
size_t size () const
 
SwAnchoredObjectoperator[] (size_t _nIndex) const
 direct access to the entries More...
 
const_iterator begin () const
 
const_iterator end () const
 
bool Insert (SwAnchoredObject &_rAnchoredObj)
 
void Remove (SwAnchoredObject &_rAnchoredObj)
 
bool Contains (const SwAnchoredObject &_rAnchoredObj) const
 
void Update (SwAnchoredObject &_rAnchoredObj)
 method to update the position of the given anchored object in the sorted list More...
 
void UpdateAll ()
 
size_t ListPosOf (const SwAnchoredObject &_rAnchoredObj) const
 Position of object <_rAnchoredObj> in sorted list. More...
 
bool is_sorted () const
 

Private Attributes

std::vector< SwAnchoredObject * > maSortedObjLst
 

Detailed Description

class for collecting anchored objects

for #i28701# Anchored objects can be inserted and deleted. The entries can be directly accessed via index. An anchored object is inserted sorted. The sort criteria are:

Definition at line 48 of file sortedobjs.hxx.

Member Typedef Documentation

◆ const_iterator

typedef std::vector<SwAnchoredObject*>::const_iterator SwSortedObjs::const_iterator

Definition at line 54 of file sortedobjs.hxx.

Constructor & Destructor Documentation

◆ SwSortedObjs()

SwSortedObjs::SwSortedObjs ( )

Definition at line 35 of file sortedobjs.cxx.

◆ ~SwSortedObjs()

SwSortedObjs::~SwSortedObjs ( )

Definition at line 39 of file sortedobjs.cxx.

Member Function Documentation

◆ begin()

const_iterator SwSortedObjs::begin ( ) const
inline

Definition at line 66 of file sortedobjs.hxx.

Referenced by SwAnchoredObject::UpdateObjInSortedList().

◆ Contains()

bool SwSortedObjs::Contains ( const SwAnchoredObject _rAnchoredObj) const

Definition at line 245 of file sortedobjs.cxx.

References maSortedObjLst.

Referenced by SwRootFrame::CalcFrameRects(), Insert(), and Update().

◆ end()

const_iterator SwSortedObjs::end ( ) const
inline

Definition at line 68 of file sortedobjs.hxx.

Referenced by SwAnchoredObject::UpdateObjInSortedList().

◆ Insert()

bool SwSortedObjs::Insert ( SwAnchoredObject _rAnchoredObj)

Definition at line 208 of file sortedobjs.cxx.

References Contains(), and maSortedObjLst.

Referenced by SwRootFrame::CalcFrameRects(), SwPageFrame::MoveFly(), and Update().

◆ is_sorted()

bool SwSortedObjs::is_sorted ( ) const

Definition at line 203 of file sortedobjs.cxx.

References maSortedObjLst.

◆ ListPosOf()

size_t SwSortedObjs::ListPosOf ( const SwAnchoredObject _rAnchoredObj) const

Position of object <_rAnchoredObj> in sorted list.

Returns the number of the list position of object <_rAnchoredObj>. Returns <size()>, if object isn't contained in list.

Returns
size_t Number of the list position of object <_rAnchoredObj>

Definition at line 277 of file sortedobjs.cxx.

References maSortedObjLst, nPos, and size().

Referenced by SwObjectFormatterLayFrame::AdditionalFormatObjsOnPage(), SwObjectFormatter::FormatObjsAtFrame_(), SwObjectFormatterTextFrame::InvalidateFollowObjs(), SwObjectFormatterTextFrame::InvalidatePrevObjs(), and SwAnchoredObject::UpdateObjInSortedList().

◆ operator[]()

SwAnchoredObject * SwSortedObjs::operator[] ( size_t  _nIndex) const

direct access to the entries

Parameters
_nIndexinput parameter - index of entry, valid value range [0..size()-1]

Definition at line 48 of file sortedobjs.cxx.

References maSortedObjLst, and size().

◆ Remove()

void SwSortedObjs::Remove ( SwAnchoredObject _rAnchoredObj)

Definition at line 229 of file sortedobjs.cxx.

References maSortedObjLst.

Referenced by SwFlyFreeFrame::DestroyImpl(), SwLayoutFrame::DestroyImpl(), and Update().

◆ size()

size_t SwSortedObjs::size ( ) const

◆ Update()

void SwSortedObjs::Update ( SwAnchoredObject _rAnchoredObj)

method to update the position of the given anchored object in the sorted list

Returns
boolean, indicating success of the update.

Definition at line 253 of file sortedobjs.cxx.

References Contains(), Insert(), Remove(), and size().

Referenced by SwAnchoredObject::UpdateObjInSortedList().

◆ UpdateAll()

void SwSortedObjs::UpdateAll ( )

Definition at line 272 of file sortedobjs.cxx.

References maSortedObjLst.

Referenced by SwTextNode::Update().

Member Data Documentation

◆ maSortedObjLst

std::vector< SwAnchoredObject* > SwSortedObjs::maSortedObjLst
private

Definition at line 51 of file sortedobjs.hxx.

Referenced by Contains(), Insert(), is_sorted(), ListPosOf(), operator[](), Remove(), size(), and UpdateAll().


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