[Libreoffice-commits] core.git: Branch 'libreoffice-5-4' - sfx2/source

Noel Grandin noel.grandin at collabora.co.uk
Thu Nov 23 10:36:00 UTC 2017


 sfx2/source/doc/objcont.cxx |    5 +++++
 1 file changed, 5 insertions(+)

New commits:
commit 530a587f232e2552216fae363d798901aa2bd259
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date:   Wed Nov 22 15:46:20 2017 +0200

    tdf#113935 Switching from read-only to edit mode slow
    
    Regression introduced by
    
        commit 389da66dfc96d06c407bff156c4ea21e940c5e06
        remove unused uno::Reference vars
    
    I'm guessing this variable keeps some kind of cache alive which prevents
    us from re-parsing the PDF file when we switch to edit mode - which is
    clearly what we are doing when I remove the line.
    
    Change-Id: Iea2cf9640d876028a78806e717b930d4a063dc9b
    Reviewed-on: https://gerrit.libreoffice.org/45093
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
    (cherry picked from commit 5ee141ee2fb77c3cc452ac656235d7e83e15072c)
    Reviewed-on: https://gerrit.libreoffice.org/45108
    Tested-by: Noel Grandin <noel.grandin at collabora.co.uk>
    Reviewed-by: Michael Stahl <mstahl at redhat.com>

diff --git a/sfx2/source/doc/objcont.cxx b/sfx2/source/doc/objcont.cxx
index ca419ab37d64..9acded4ba510 100644
--- a/sfx2/source/doc/objcont.cxx
+++ b/sfx2/source/doc/objcont.cxx
@@ -384,6 +384,11 @@ void SfxObjectShell::UpdateFromTemplate_Impl(  )
         // update only for documents loaded from the local file system
         return;
 
+    // tdf#113935 - do not remove this line - somehow, it makes the process
+    // of switching from viewing a read-only document to opening it in writable
+    // mode much faster.
+    uno::Reference< embed::XStorage > xDocStor = pFile->GetStorage();
+
     // only for own storage formats
     if ( !pFile->GetFilter() || !pFile->GetFilter()->IsOwnFormat() )
         return;


More information about the Libreoffice-commits mailing list