summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKatarina Behrens <Katarina.Behrens@cib.de>2019-04-23 11:59:40 +0200
committerThorsten Behrens <Thorsten.Behrens@CIB.de>2019-04-23 23:46:29 +0200
commit489cb0662ce4c58ee4467942a117c9f54bc3eca7 (patch)
tree4a8ebeedeabd6d13ef94a87411b0aca4287e8de5
parentlibxslt: add patch for CVE-2019-11068 (diff)
downloadcore-feature/cib_contract935b.tar.gz
core-feature/cib_contract935b.zip
Skip clipboard queries while the document is still loading feature/cib_contract935b
Use-case here is .ods document with 16k tracked changes. For every tracked change, Calc generates a formula cell. For every formula cell, clipboard content is queried (via ScDocument::IsClipboardSource, ScModule::GetClipDoc respectively). This is dog-slow on Windows Therefore don't query clipboard content while the document is in the process of being loaded. Instead return from ScDocument:: IsClipboardSource early and return 'false' because at this point of time it can't be reliably determined whether this doc is a clipboard source anyway Change-Id: If5aa62cbfb62fb326a3c73b4d9be839127d3c03b Reviewed-on: https://gerrit.libreoffice.org/71121 Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> (cherry picked from commit 9c8aa1c217f016fae9a57c6a4feca43551e5068e)
-rw-r--r--sc/source/core/data/document.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/sc/source/core/data/document.cxx b/sc/source/core/data/document.cxx
index 06a1a532e628..5d6fc10c3202 100644
--- a/sc/source/core/data/document.cxx
+++ b/sc/source/core/data/document.cxx
@@ -2567,7 +2567,8 @@ void ScDocument::SetClipParam(const ScClipParam& rParam)
bool ScDocument::IsClipboardSource() const
{
- if (bIsClip || mpShell == nullptr)
+ if (bIsClip || mpShell == nullptr ||
+ (mpShell && mpShell->IsLoading()))
return false;
ScDocument* pClipDoc = static_cast<ScDocShell*>(mpShell)->GetClipDoc();