diff options
author | Kohei Yoshida <kohei.yoshida@gmail.com> | 2013-02-12 09:40:39 -0500 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@gmail.com> | 2013-02-12 12:32:59 -0500 |
commit | 117b3a13b82aaac0977fd17ee5b7b63204e659f4 (patch) | |
tree | 46054333d66d78c66ba8ad06c77686a572a560a4 /sc/source/filter/xml | |
parent | 36e30d9772a32de94e104424316fcd3320a21adb (diff) |
Avoid unnecessary cloning of text object when instantiating ScEditCell.
This alone cuts about 3 seconds off of the total import time with the
test document from fdo#54638.
Change-Id: I3be3229532b9e982f03565fd3fb630f70f2bce03
Diffstat (limited to 'sc/source/filter/xml')
-rw-r--r-- | sc/source/filter/xml/xmlcelli.cxx | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sc/source/filter/xml/xmlcelli.cxx b/sc/source/filter/xml/xmlcelli.cxx index 351051412596..ba9f1da86160 100644 --- a/sc/source/filter/xml/xmlcelli.cxx +++ b/sc/source/filter/xml/xmlcelli.cxx @@ -1050,8 +1050,10 @@ void ScXMLTableRowCellContext::PutTextCell( const ScAddress& rCurrentPos, mpEditEngine->QuickInsertField(SvxFieldItem(*it->mpData, EE_FEATURE_FIELD), it->maSelection); } - boost::scoped_ptr<EditTextObject> pTextObj(mpEditEngine->CreateTextObject()); - pNewCell = new ScEditCell(pTextObj.get(), pDoc, pDoc->GetEditPool()); + // This edit engine uses the SfxItemPool instance returned + // from pDoc->GetEditPool() to create the text object, which + // is a prerequisite for using this constructor of ScEditCell. + pNewCell = new ScEditCell(mpEditEngine->CreateTextObject(), pDoc); } } else if ( nCurrentCol > 0 && pOUText && !pOUText->isEmpty() ) |