diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2015-05-05 09:04:26 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2015-05-05 09:04:48 +0200 |
commit | b60142af8c3adce35e2c158e14815b1226a97fc2 (patch) | |
tree | ef06302beaeb75634f4191ede10c71a9d7242018 /sw/source/filter/ww8/rtfsdrexport.cxx | |
parent | 1aa43709f1eafe76bb5b2c658bf88c16bb73ea4f (diff) |
RtfSdrExport::StartShape: use std::unique_ptr<>
Change-Id: I236d7d951bae8c40d2caaa5ecd6dfd669f8ea982
Diffstat (limited to 'sw/source/filter/ww8/rtfsdrexport.cxx')
-rw-r--r-- | sw/source/filter/ww8/rtfsdrexport.cxx | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/sw/source/filter/ww8/rtfsdrexport.cxx b/sw/source/filter/ww8/rtfsdrexport.cxx index 58b82f3b73c0..eeee50a409df 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; } } |