[Libreoffice-commits] core.git: sw/source
Miklos Vajna
vmiklos at collabora.co.uk
Tue May 5 00:05:15 PDT 2015
sw/source/filter/ww8/rtfsdrexport.cxx | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
New commits:
commit b60142af8c3adce35e2c158e14815b1226a97fc2
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date: Tue May 5 09:04:26 2015 +0200
RtfSdrExport::StartShape: use std::unique_ptr<>
Change-Id: I236d7d951bae8c40d2caaa5ecd6dfd669f8ea982
diff --git a/sw/source/filter/ww8/rtfsdrexport.cxx b/sw/source/filter/ww8/rtfsdrexport.cxx
index 58b82f3..eeee50a 100644
--- a/sw/source/filter/ww8/rtfsdrexport.cxx
+++ b/sw/source/filter/ww8/rtfsdrexport.cxx
@@ -521,7 +521,7 @@ sal_Int32 RtfSdrExport::StartShape()
if (pTxtObj)
{
const OutlinerParaObject* pParaObj = 0;
- bool bOwnParaObj = false;
+ std::unique_ptr<const OutlinerParaObject> pOwnedParaObj;
/*
#i13885#
@@ -530,8 +530,8 @@ sal_Int32 RtfSdrExport::StartShape()
*/
if (pTxtObj->IsTextEditActive())
{
- pParaObj = pTxtObj->GetEditOutlinerParaObject();
- bOwnParaObj = true;
+ pOwnedParaObj.reset(pTxtObj->GetEditOutlinerParaObject());
+ pParaObj = pOwnedParaObj.get();
}
else
{
@@ -542,8 +542,6 @@ sal_Int32 RtfSdrExport::StartShape()
{
// this is reached only in case some text is attached to the shape
WriteOutliner(*pParaObj);
- if (bOwnParaObj)
- delete pParaObj;
}
}
More information about the Libreoffice-commits
mailing list