diff options
author | Kohei Yoshida <kohei.yoshida@gmail.com> | 2013-02-11 23:49:47 -0500 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@gmail.com> | 2013-02-11 23:50:56 -0500 |
commit | 61867bd74995c0fc35d607427958013998839506 (patch) | |
tree | 69f7364704be42f13b7428111642db10fe6c1afc | |
parent | 664e65f9c291589d9a0cd639fec06bc0575ba6da (diff) |
Fix the memory leak. ScEditCell clones the EditTextObject in its ctor.
Change-Id: I8f0f29a504a363ac4359dd4e6ec962976746fecd
-rw-r--r-- | sc/source/filter/xml/xmlcelli.cxx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sc/source/filter/xml/xmlcelli.cxx b/sc/source/filter/xml/xmlcelli.cxx index 701e784fd8dd..351051412596 100644 --- a/sc/source/filter/xml/xmlcelli.cxx +++ b/sc/source/filter/xml/xmlcelli.cxx @@ -1050,7 +1050,8 @@ void ScXMLTableRowCellContext::PutTextCell( const ScAddress& rCurrentPos, mpEditEngine->QuickInsertField(SvxFieldItem(*it->mpData, EE_FEATURE_FIELD), it->maSelection); } - pNewCell = new ScEditCell(mpEditEngine->CreateTextObject(), pDoc, pDoc->GetEditPool()); + boost::scoped_ptr<EditTextObject> pTextObj(mpEditEngine->CreateTextObject()); + pNewCell = new ScEditCell(pTextObj.get(), pDoc, pDoc->GetEditPool()); } } else if ( nCurrentCol > 0 && pOUText && !pOUText->isEmpty() ) |