diff options
author | Takeshi Abe <tabe@fixedpoint.jp> | 2014-06-30 11:33:26 +0900 |
---|---|---|
committer | Takeshi Abe <tabe@fixedpoint.jp> | 2014-06-30 11:44:16 +0900 |
commit | b20e6acea2cb2013f450bb4b97b51142dbb4f161 (patch) | |
tree | e441dfb4fdca68c9c0cd2f76cbf955d93b0a74d8 /svx/source/table/tablertfimporter.cxx | |
parent | d4feafb064560f27fce8ed3e760325545e7ba539 (diff) |
Avoid possible memory leaks in case of exceptions
Change-Id: I9a92edd7886db484f1333585545f6f63a233a6dd
Diffstat (limited to 'svx/source/table/tablertfimporter.cxx')
-rw-r--r-- | svx/source/table/tablertfimporter.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/svx/source/table/tablertfimporter.cxx b/svx/source/table/tablertfimporter.cxx index 2e93278b70d1..fa7b635d7133 100644 --- a/svx/source/table/tablertfimporter.cxx +++ b/svx/source/table/tablertfimporter.cxx @@ -19,6 +19,7 @@ #include <vector> +#include <boost/scoped_ptr.hpp> #include <boost/shared_ptr.hpp> #include <com/sun/star/table/XTable.hpp> @@ -272,14 +273,13 @@ void SdrTableRTFParser::FillTable() if( xCellInfo->maItemSet.GetItemState(SDRATTR_TABLE_BORDER,false,&pPoolItem)==SFX_ITEM_SET) xCell->SetMergedItem( *pPoolItem ); - OutlinerParaObject* pTextObject = mpOutliner->CreateParaObject( xCellInfo->mnStartPara, xCellInfo->mnParaCount ); + boost::scoped_ptr<OutlinerParaObject> pTextObject(mpOutliner->CreateParaObject( xCellInfo->mnStartPara, xCellInfo->mnParaCount )); if( pTextObject ) { SdrOutliner& rOutliner=mrTableObj.ImpGetDrawOutliner(); rOutliner.SetUpdateMode(true); rOutliner.SetText( *pTextObject ); mrTableObj.NbcSetOutlinerParaObjectForText( rOutliner.CreateParaObject(), xCell.get() ); - delete pTextObject; } } } |