51 if ( _nIndex >=
size() )
53 OSL_FAIL(
"<SwSortedObjs::operator[]> - index out of range" );
67 if (eAnchor == RndStdIds::FLY_AT_CHAR)
69 if (eAnchor == RndStdIds::FLY_AS_CHAR)
88 if ((pAnchorListed->
GetAnchorId() == RndStdIds::FLY_AT_PAGE) &&
89 (pAnchorNew ->GetAnchorId() != RndStdIds::FLY_AT_PAGE))
93 else if ((pAnchorListed->
GetAnchorId() != RndStdIds::FLY_AT_PAGE) &&
94 (pAnchorNew ->GetAnchorId() == RndStdIds::FLY_AT_PAGE))
98 else if ((pAnchorListed->
GetAnchorId() == RndStdIds::FLY_AT_PAGE) &&
99 (pAnchorNew ->GetAnchorId() == RndStdIds::FLY_AT_PAGE))
106 if ((pAnchorListed->
GetAnchorId() == RndStdIds::FLY_AT_FLY) &&
107 (pAnchorNew ->GetAnchorId() != RndStdIds::FLY_AT_FLY))
111 else if ((pAnchorListed->
GetAnchorId() != RndStdIds::FLY_AT_FLY) &&
112 (pAnchorNew ->GetAnchorId() == RndStdIds::FLY_AT_FLY))
116 else if ((pAnchorListed->
GetAnchorId() == RndStdIds::FLY_AT_FLY) &&
117 (pAnchorNew ->GetAnchorId() == RndStdIds::FLY_AT_FLY))
126 if ( pContentAnchorListed && pContentAnchorNew &&
127 pContentAnchorListed->
nNode != pContentAnchorNew->
nNode )
129 return pContentAnchorListed->
nNode < pContentAnchorNew->
nNode;
136 if (pContentAnchorListed && pContentAnchorNew)
138 sal_Int32 nListedIndex = pAnchorListed->
GetAnchorId() != RndStdIds::FLY_AT_PARA ?
140 sal_Int32 nNewIndex = pAnchorNew->
GetAnchorId() != RndStdIds::FLY_AT_PARA ?
142 if (nListedIndex != nNewIndex)
144 return nListedIndex < nNewIndex;
148 int nAnchorListedWeight = GetAnchorWeight(pAnchorListed->
GetAnchorId());
149 int nAnchorNewWeight = GetAnchorWeight(pAnchorNew->
GetAnchorId());
150 if (nAnchorListedWeight != nAnchorNewWeight)
152 return nAnchorListedWeight < nAnchorNewWeight;
161 const bool bWrapThroughOrHellListed =
165 const bool bWrapThroughOrHellNew =
169 if ( bWrapThroughOrHellListed != bWrapThroughOrHellNew )
171 return !bWrapThroughOrHellListed;
173 else if ( bWrapThroughOrHellListed && bWrapThroughOrHellNew )
190 == text::WrapInfluenceOnPosition::ONCE_SUCCESSIVE;
213 OSL_FAIL(
"<SwSortedObjs::Insert()> - already contains object" );
218 std::vector< SwAnchoredObject* >::iterator aInsPosIter =
220 &_rAnchoredObj, ObjAnchorOrder() );
230 std::vector< SwAnchoredObject* >::iterator aDelPosIter =
236 OSL_FAIL(
"<SwSortedObjs::Remove()> - object not found" );
246 std::vector< SwAnchoredObject* >::const_iterator aIter =
257 OSL_FAIL(
"<SwSortedObjs::Update(..) - sorted list doesn't contain given anchored object" );
278 std::vector< SwAnchoredObject* >::const_iterator aIter =
284 std::vector< SwAnchoredObject* >::difference_type
nPos =
286 return static_cast<size_t>( nPos );
Marks a position in the document model.
void Update(SwAnchoredObject &_rAnchoredObj)
method to update the position of the given anchored object in the sorted list
wrapper class for the positioning of Writer fly frames and drawing objects
SwAnchoredObject * operator[](size_t _nIndex) const
direct access to the entries
virtual SdrLayerID GetInvisibleHellId() const =0
const SdrObject * GetDrawObj() const
void Remove(SwAnchoredObject &_rAnchoredObj)
bool Insert(SwAnchoredObject &_rAnchoredObj)
std::vector< SwAnchoredObject * > maSortedObjLst
virtual SdrLayerID GetHellId() const =0
virtual SdrLayerID GetLayer() const
virtual SwFrameFormat & GetFrameFormat()=0
sal_Int32 GetIndex() const
size_t ListPosOf(const SwAnchoredObject &_rAnchoredObj) const
Position of object <_rAnchoredObj> in sorted list.
bool Contains(const SwAnchoredObject &_rAnchoredObj) const