summaryrefslogtreecommitdiff
path: root/svx/source/svdraw/svdhlpln.cxx
diff options
context:
space:
mode:
authorTakeshi Abe <tabe@fixedpoint.jp>2017-09-13 18:34:58 +0900
committerMichael Stahl <mstahl@redhat.com>2017-09-13 16:13:59 +0200
commit84b8e14ad30bc3bfbd52b38fe5472a6d85e4f41a (patch)
tree2157b05e1a06f6a7349acb6b5d8c4ef9a81c35c2 /svx/source/svdraw/svdhlpln.cxx
parent1f582e38dd8f2f9c556720e5d66d0d17318b095a (diff)
svx: Simplify SdrHelpLineList with std::unique_ptr
This also kills no longer used SdrHelpLineList::GetObject(). Change-Id: I6e08e44214657c536717e96693c89104d7118cfd Reviewed-on: https://gerrit.libreoffice.org/42234 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
Diffstat (limited to 'svx/source/svdraw/svdhlpln.cxx')
-rw-r--r--svx/source/svdraw/svdhlpln.cxx8
1 files changed, 2 insertions, 6 deletions
diff --git a/svx/source/svdraw/svdhlpln.cxx b/svx/source/svdraw/svdhlpln.cxx
index 622ae221b78d..a1260d51dd95 100644
--- a/svx/source/svdraw/svdhlpln.cxx
+++ b/svx/source/svdraw/svdhlpln.cxx
@@ -75,10 +75,6 @@ tools::Rectangle SdrHelpLine::GetBoundRect(const OutputDevice& rOut) const
void SdrHelpLineList::Clear()
{
- sal_uInt16 nCount=GetCount();
- for (sal_uInt16 i=0; i<nCount; i++) {
- delete GetObject(i);
- }
aList.clear();
}
@@ -99,7 +95,7 @@ bool SdrHelpLineList::operator==(const SdrHelpLineList& rSrcList) const
if (nCount==rSrcList.GetCount()) {
bEqual = true;
for (sal_uInt16 i=0; i<nCount && bEqual; i++) {
- if (*GetObject(i)!=*rSrcList.GetObject(i)) {
+ if (*aList[i]!=*rSrcList.aList[i]) {
bEqual = false;
}
}
@@ -112,7 +108,7 @@ sal_uInt16 SdrHelpLineList::HitTest(const Point& rPnt, sal_uInt16 nTolLog, const
sal_uInt16 nCount=GetCount();
for (sal_uInt16 i=nCount; i>0;) {
i--;
- if (GetObject(i)->IsHit(rPnt,nTolLog,rOut)) return i;
+ if (aList[i]->IsHit(rPnt,nTolLog,rOut)) return i;
}
return SDRHELPLINE_NOTFOUND;
}