Kaydet (Commit) 90d84743 authored tarafından Ivan Timofeev's avatar Ivan Timofeev

SdrMarkList: fix STL conversion

regression from aa11e7ba:
Container::GetObject returned NULL if the index is out of bounds,
and callers seem to rely on that.

Change-Id: I4c9f5249514efad0d516b6ffd6f04dadb019052f
üst aabc73d0
......@@ -226,11 +226,7 @@ public:
return maList.size();
}
SdrMark* GetMark(sal_uLong nNum) const
{
return maList[nNum];
}
SdrMark* GetMark(sal_uLong nNum) const;
sal_uLong FindObject(const SdrObject* pObj) const;
void InsertEntry(const SdrMark& rMark, sal_Bool bChkSort = sal_True);
void DeleteMark(sal_uLong nNum);
......
......@@ -356,6 +356,11 @@ void SdrMarkList::operator=(const SdrMarkList& rLst)
mbSorted = rLst.mbSorted;
}
SdrMark* GetMark(sal_uLong nNum) const
{
return (nNum < maList.size()) ? maList[nNum] : NULL;
}
sal_uLong SdrMarkList::FindObject(const SdrObject* pObj) const
{
// Since relying on OrdNums is not allowed for the selection because objects in the
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment