diff options
author | Ivan Timofeev <timofeev.i.s@gmail.com> | 2012-08-30 18:01:50 +0400 |
---|---|---|
committer | Ivan Timofeev <timofeev.i.s@gmail.com> | 2012-08-30 18:11:43 +0400 |
commit | 90d84743a0bafaea836c8602c6043f90b4e008c9 (patch) | |
tree | 57ef159f3ac3e23be8cc021e44b40d790c0cf7ca /svx | |
parent | aabc73d04a4c97272576edd4f73bde0cfa2392b2 (diff) |
SdrMarkList: fix STL conversion
regression from aa11e7bae89fe691f914abb27d1c4a03d27a7ee5:
Container::GetObject returned NULL if the index is out of bounds,
and callers seem to rely on that.
Change-Id: I4c9f5249514efad0d516b6ffd6f04dadb019052f
Diffstat (limited to 'svx')
-rw-r--r-- | svx/inc/svx/svdmark.hxx | 6 | ||||
-rw-r--r-- | svx/source/svdraw/svdmark.cxx | 5 |
2 files changed, 6 insertions, 5 deletions
diff --git a/svx/inc/svx/svdmark.hxx b/svx/inc/svx/svdmark.hxx index 81121c1ffd97..9673d7292886 100644 --- a/svx/inc/svx/svdmark.hxx +++ b/svx/inc/svx/svdmark.hxx @@ -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); diff --git a/svx/source/svdraw/svdmark.cxx b/svx/source/svdraw/svdmark.cxx index b99cff9973ef..e475dd68673c 100644 --- a/svx/source/svdraw/svdmark.cxx +++ b/svx/source/svdraw/svdmark.cxx @@ -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 |