Kaydet (Commit) 9c8aa1c2 authored tarafından Katarina Behrens's avatar Katarina Behrens Kaydeden (comit) Thorsten Behrens

Skip clipboard queries while the document is still loading

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/71121Reviewed-by: 's avatarThorsten Behrens <Thorsten.Behrens@CIB.de>
Tested-by: 's avatarThorsten Behrens <Thorsten.Behrens@CIB.de>
üst 74a58038
......@@ -2570,7 +2570,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 = ScModule::GetClipDoc();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment