diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-11-22 15:46:20 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2017-11-23 11:35:34 +0100 |
commit | 530a587f232e2552216fae363d798901aa2bd259 (patch) | |
tree | dbe8ee4de10c63fb3c140073c5c6c4402a6df06d | |
parent | 439a6e7c7e32089810b878dca77fa64ee454a596 (diff) |
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@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
(cherry picked from commit 5ee141ee2fb77c3cc452ac656235d7e83e15072c)
Reviewed-on: https://gerrit.libreoffice.org/45108
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
-rw-r--r-- | sfx2/source/doc/objcont.cxx | 5 |
1 files changed, 5 insertions, 0 deletions
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; |