summaryrefslogtreecommitdiff
path: root/svx/source/dialog/ctredlin.cxx
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2015-07-20 17:33:40 +0200
committerMichael Stahl <mstahl@redhat.com>2015-07-20 22:43:27 +0200
commit1fc105cec523a081f18ca78fff43e58e3a881232 (patch)
tree6e6030e44e51668f55c6977131733c25129601a0 /svx/source/dialog/ctredlin.cxx
parent63de1888f67dc43c30d5a102651b7c2738243efb (diff)
svtools: change these SvTreeListEntry functions to unique_ptr
... parameters to make it clear that they take ownership. Change-Id: I572c5fa6268438a86d0a4fa1d2aef15382cb5607
Diffstat (limited to 'svx/source/dialog/ctredlin.cxx')
-rw-r--r--svx/source/dialog/ctredlin.cxx15
1 files changed, 10 insertions, 5 deletions
diff --git a/svx/source/dialog/ctredlin.cxx b/svx/source/dialog/ctredlin.cxx
index 1f05706d4c2e..602a7c2a76b8 100644
--- a/svx/source/dialog/ctredlin.cxx
+++ b/svx/source/dialog/ctredlin.cxx
@@ -343,18 +343,22 @@ void SvxRedlinTable::InitEntry(SvTreeListEntry* pEntry, const OUString& rStr,
{
if (nTreeFlags & SvTreeFlags::CHKBTN)
{
- pEntry->AddItem(new SvLBoxButton(pEntry, eButtonKind, 0, pCheckButtonData));
+ pEntry->AddItem(std::unique_ptr<SvLBoxButton>(
+ new SvLBoxButton(pEntry, eButtonKind, 0, pCheckButtonData)));
}
- pEntry->AddItem(new SvLBoxContextBmp(pEntry, 0, rColl, rExp, true));
+ pEntry->AddItem(std::unique_ptr<SvLBoxContextBmp>(
+ new SvLBoxContextBmp(pEntry, 0, rColl, rExp, true)));
// the type of the change
assert((rStr.isEmpty() && !!maEntryImage) || (!rStr.isEmpty() && !maEntryImage));
if (rStr.isEmpty())
- pEntry->AddItem(new SvLBoxContextBmp(pEntry, 0, maEntryImage, maEntryImage, true));
+ pEntry->AddItem(std::unique_ptr<SvLBoxContextBmp>(new SvLBoxContextBmp(
+ pEntry, 0, maEntryImage, maEntryImage, true)));
else
- pEntry->AddItem(new SvLBoxColorString(pEntry, 0, rStr, maEntryColor));
+ pEntry->AddItem(std::unique_ptr<SvLBoxColorString>(
+ new SvLBoxColorString(pEntry, 0, rStr, maEntryColor)));
// the change tracking entries
sal_Int32 nIndex = 0;
@@ -362,7 +366,8 @@ void SvxRedlinTable::InitEntry(SvTreeListEntry* pEntry, const OUString& rStr,
for (sal_uInt16 nToken = 0; nToken < nCount; nToken++)
{
const OUString aToken = GetToken(maEntryString, nIndex);
- pEntry->AddItem(new SvLBoxColorString(pEntry, 0, aToken, maEntryColor));
+ pEntry->AddItem(std::unique_ptr<SvLBoxColorString>(
+ new SvLBoxColorString(pEntry, 0, aToken, maEntryColor)));
}
}