[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - sc/source

Katarina Behrens (via logerrit) logerrit at kemper.freedesktop.org
Wed Apr 24 11:34:28 UTC 2019


 sc/source/core/data/document.cxx |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 26984ec23769404496e5898b2cbbaeabc6ac6a4b
Author:     Katarina Behrens <Katarina.Behrens at cib.de>
AuthorDate: Tue Apr 23 11:59:40 2019 +0200
Commit:     Thorsten Behrens <Thorsten.Behrens at CIB.de>
CommitDate: Wed Apr 24 13:33:38 2019 +0200

    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/71121
    Reviewed-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>
    Tested-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>
    (cherry picked from commit 9c8aa1c217f016fae9a57c6a4feca43551e5068e)
    Reviewed-on: https://gerrit.libreoffice.org/71146
    Tested-by: Jenkins
    Reviewed-by: Katarina Behrens <Katarina.Behrens at cib.de>

diff --git a/sc/source/core/data/document.cxx b/sc/source/core/data/document.cxx
index dae92c818b37..b54ef92a1410 100644
--- a/sc/source/core/data/document.cxx
+++ b/sc/source/core/data/document.cxx
@@ -2564,7 +2564,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();


More information about the Libreoffice-commits mailing list