editeng/source/editeng/editeng.cxx | 5 +++-- sc/source/filter/oox/commentsbuffer.cxx | 3 +++ svx/source/svdraw/svdotext.cxx | 6 +----- 3 files changed, 7 insertions(+), 7 deletions(-)
New commits: commit b2a1c29d5958e0cc6d8f0e68c11121131dfa1513 Author: Noel Grandin <noel.gran...@collabora.co.uk> AuthorDate: Thu Aug 12 12:37:16 2021 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Thu Aug 12 13:52:07 2021 +0200 tdf#95549 speed up load of xls we don't need to perform layout during load, so disable a few places that do that reduces load time by 50% Change-Id: Ie746ca0b46de3b76ca1b7291e0528b525333278f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120384 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/editeng/source/editeng/editeng.cxx b/editeng/source/editeng/editeng.cxx index c9aec527b222..fff07dfdc836 100644 --- a/editeng/source/editeng/editeng.cxx +++ b/editeng/source/editeng/editeng.cxx @@ -1490,7 +1490,7 @@ void EditEngine::Clear() void EditEngine::SetText( const OUString& rText ) { pImpEditEngine->SetText( rText ); - if ( !rText.isEmpty() ) + if ( !rText.isEmpty() && pImpEditEngine->GetUpdateMode() ) pImpEditEngine->FormatAndUpdate(); } @@ -1747,7 +1747,8 @@ void EditEngine::SetText(sal_Int32 nPara, const OUString& rTxt) void EditEngine::SetParaAttribs( sal_Int32 nPara, const SfxItemSet& rSet ) { pImpEditEngine->SetParaAttribs( nPara, rSet ); - pImpEditEngine->FormatAndUpdate(); + if ( pImpEditEngine->GetUpdateMode() ) + pImpEditEngine->FormatAndUpdate(); } const SfxItemSet& EditEngine::GetParaAttribs( sal_Int32 nPara ) const diff --git a/sc/source/filter/oox/commentsbuffer.cxx b/sc/source/filter/oox/commentsbuffer.cxx index d2d1ca2ccad6..90c93f8019be 100644 --- a/sc/source/filter/oox/commentsbuffer.cxx +++ b/sc/source/filter/oox/commentsbuffer.cxx @@ -198,7 +198,10 @@ void Comment::finalizeImport() // insert text and convert text formatting maModel.mxText->finalizeImport(); Reference< XText > xAnnoText( xAnnoShape, UNO_QUERY_THROW ); + Reference< css::document::XActionLockable > xAnnoLock( xAnnoShape, UNO_QUERY_THROW ); + xAnnoLock->addActionLock(); maModel.mxText->convert( xAnnoText ); + xAnnoLock->removeActionLock(); } catch( Exception& ) { diff --git a/svx/source/svdraw/svdotext.cxx b/svx/source/svdraw/svdotext.cxx index e6d7e0f0cfef..57020917c79e 100644 --- a/svx/source/svdraw/svdotext.cxx +++ b/svx/source/svdraw/svdotext.cxx @@ -241,14 +241,10 @@ void SdrTextObj::NbcSetText(const OUString& rStr) { SdrOutliner& rOutliner=ImpGetDrawOutliner(); rOutliner.SetStyleSheet( 0, GetStyleSheet()); - rOutliner.SetUpdateMode(true); rOutliner.SetText(rStr,rOutliner.GetParagraph( 0 )); std::unique_ptr<OutlinerParaObject> pNewText=rOutliner.CreateParaObject(); - Size aSize(rOutliner.CalcTextSize()); - rOutliner.Clear(); NbcSetOutlinerParaObject(std::move(pNewText)); - maTextSize = aSize; - mbTextSizeDirty=false; + mbTextSizeDirty=true; } void SdrTextObj::SetText(const OUString& rStr)