summaryrefslogtreecommitdiff
path: root/editeng
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@gmail.com>2012-05-08 11:58:50 -0400
committerKohei Yoshida <kohei.yoshida@gmail.com>2012-05-08 14:23:05 -0400
commitf5122f93fe97aea479c9228173b16516d2c2f19d (patch)
treee31eafbd4c7df054c47cd3f8591e7a38b97e6629 /editeng
parent1af56c22b4b17922f43b67aaf1ceb9562b98f941 (diff)
Use scoped_ptr for this.
Change-Id: I43aba3046fb0c7adcf5362ea26273189addc12fe
Diffstat (limited to 'editeng')
-rw-r--r--editeng/source/uno/unotext.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/editeng/source/uno/unotext.cxx b/editeng/source/uno/unotext.cxx
index 56a26357cbf7..d7be1db22249 100644
--- a/editeng/source/uno/unotext.cxx
+++ b/editeng/source/uno/unotext.cxx
@@ -57,6 +57,8 @@
#include "editeng/unonames.hxx"
+#include <boost/scoped_ptr.hpp>
+
using namespace ::rtl;
using namespace ::cppu;
using namespace ::com::sun::star;
@@ -1808,7 +1810,7 @@ void SAL_CALL SvxUnoTextBase::insertTextContent( const uno::Reference< text::XTe
if (!bAbsorb)
aSel.Start = aSel.End;
- SvxFieldData* pFieldData = SvxFieldData::Create(xContent);
+ boost::scoped_ptr<SvxFieldData> pFieldData(SvxFieldData::Create(xContent));
if (!pFieldData)
throw lang::IllegalArgumentException();
@@ -1825,8 +1827,6 @@ void SAL_CALL SvxUnoTextBase::insertTextContent( const uno::Reference< text::XTe
aSel.End.PositionInParagraph += 1;
aSel.Start.PositionInParagraph = aSel.End.PositionInParagraph;
xPropSet->setPropertyValue(UNO_TR_PROP_SELECTION, uno::makeAny(aSel));
-
- delete pFieldData;
}
void SAL_CALL SvxUnoTextBase::removeTextContent( const uno::Reference< text::XTextContent >& ) throw(container::NoSuchElementException, uno::RuntimeException)