diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-01-15 08:04:49 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-01-16 11:54:38 +0100 |
commit | 3c93d34caa79c37c41eab1d3212a7ff1cdf53d34 (patch) | |
tree | 1dc4ac28de8e9cd1718c2d694dd5798f861a9a22 /svx | |
parent | d0ded163d8e93dc5b10d7a7c9bdab1d0a6a50bac (diff) |
pass RedlinData around by unique_ptr
Change-Id: Ibe709e64b89e5e036e741203a14242f27df8c637
Reviewed-on: https://gerrit.libreoffice.org/66416
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/dialog/ctredlin.cxx | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/svx/source/dialog/ctredlin.cxx b/svx/source/dialog/ctredlin.cxx index 6a77f75efdba..188d7bc582e3 100644 --- a/svx/source/dialog/ctredlin.cxx +++ b/svx/source/dialog/ctredlin.cxx @@ -289,15 +289,15 @@ bool SvxRedlinTable::IsValidComment(const OUString &rCommentStr) } SvTreeListEntry* SvxRedlinTable::InsertEntry(const OUString& rStr, - RedlinData *pUserData, SvTreeListEntry* pParent, sal_uLong nPos) + std::unique_ptr<RedlinData> pUserData, SvTreeListEntry* pParent, sal_uLong nPos) { const Color aColor = (pUserData && pUserData->bDisabled) ? COL_GRAY : GetTextColor(); - return InsertEntry(rStr, pUserData, aColor, pParent, nPos); + return InsertEntry(rStr, std::move(pUserData), aColor, pParent, nPos); } SvTreeListEntry* SvxRedlinTable::InsertEntry(const OUString& rStr, - RedlinData *pUserData, const Color& rColor, SvTreeListEntry* pParent, sal_uLong nPos) + std::unique_ptr<RedlinData> pUserData, const Color& rColor, SvTreeListEntry* pParent, sal_uLong nPos) { maEntryColor = rColor; maEntryImage = Image(); @@ -306,17 +306,17 @@ SvTreeListEntry* SvxRedlinTable::InsertEntry(const OUString& rStr, const OUString aFirstStr(rStr.getToken(0, '\t', nIndex)); maEntryString = nIndex > 0 ? rStr.copy(nIndex) : OUString(); - return SvSimpleTable::InsertEntry(aFirstStr, pParent, false, nPos, pUserData); + return SvSimpleTable::InsertEntry(aFirstStr, pParent, false, nPos, pUserData.release()); } SvTreeListEntry* SvxRedlinTable::InsertEntry(const Image &rRedlineType, const OUString& rStr, - RedlinData *pUserData, SvTreeListEntry* pParent, sal_uLong nPos) + std::unique_ptr<RedlinData> pUserData, SvTreeListEntry* pParent, sal_uLong nPos) { maEntryColor = (pUserData && pUserData->bDisabled) ? COL_GRAY : GetTextColor(); maEntryImage = rRedlineType; maEntryString = rStr; - return SvSimpleTable::InsertEntry(OUString(), pParent, false, nPos, pUserData); + return SvSimpleTable::InsertEntry(OUString(), pParent, false, nPos, pUserData.release()); } SvTreeListEntry* SvxRedlinTable::CreateEntry() const |