Kaydet (Commit) b60142af authored tarafından Miklos Vajna's avatar Miklos Vajna

RtfSdrExport::StartShape: use std::unique_ptr<>

Change-Id: I236d7d951bae8c40d2caaa5ecd6dfd669f8ea982
üst 1aa43709
...@@ -521,7 +521,7 @@ sal_Int32 RtfSdrExport::StartShape() ...@@ -521,7 +521,7 @@ sal_Int32 RtfSdrExport::StartShape()
if (pTxtObj) if (pTxtObj)
{ {
const OutlinerParaObject* pParaObj = 0; const OutlinerParaObject* pParaObj = 0;
bool bOwnParaObj = false; std::unique_ptr<const OutlinerParaObject> pOwnedParaObj;
/* /*
#i13885# #i13885#
...@@ -530,8 +530,8 @@ sal_Int32 RtfSdrExport::StartShape() ...@@ -530,8 +530,8 @@ sal_Int32 RtfSdrExport::StartShape()
*/ */
if (pTxtObj->IsTextEditActive()) if (pTxtObj->IsTextEditActive())
{ {
pParaObj = pTxtObj->GetEditOutlinerParaObject(); pOwnedParaObj.reset(pTxtObj->GetEditOutlinerParaObject());
bOwnParaObj = true; pParaObj = pOwnedParaObj.get();
} }
else else
{ {
...@@ -542,8 +542,6 @@ sal_Int32 RtfSdrExport::StartShape() ...@@ -542,8 +542,6 @@ sal_Int32 RtfSdrExport::StartShape()
{ {
// this is reached only in case some text is attached to the shape // this is reached only in case some text is attached to the shape
WriteOutliner(*pParaObj); WriteOutliner(*pParaObj);
if (bOwnParaObj)
delete pParaObj;
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment