diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-08-12 12:37:16 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-08-12 13:52:07 +0200 |
commit | b2a1c29d5958e0cc6d8f0e68c11121131dfa1513 (patch) | |
tree | 5e8c131ee8162e177897847bb6f7cb7f5cd957a9 /editeng | |
parent | d6c287cbd8cc81ccdff3a70e09022eb21af063e5 (diff) |
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.grandin@collabora.co.uk>
Diffstat (limited to 'editeng')
-rw-r--r-- | editeng/source/editeng/editeng.cxx | 5 |
1 files changed, 3 insertions, 2 deletions
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 |