summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-11-22 15:46:20 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-11-22 20:41:21 +0100
commit5ee141ee2fb77c3cc452ac656235d7e83e15072c (patch)
tree67d18ed6c87bf4eb72f0af95d8fb0c4e70ef58fe
parent72ef2b5d9802c424dbb0810e0a72fae50d92b678 (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>
-rw-r--r--sfx2/source/doc/objcont.cxx5
1 files changed, 5 insertions, 0 deletions
diff --git a/sfx2/source/doc/objcont.cxx b/sfx2/source/doc/objcont.cxx
index 4cacda2ff0a5..4a82866a5019 100644
--- a/sfx2/source/doc/objcont.cxx
+++ b/sfx2/source/doc/objcont.cxx
@@ -383,6 +383,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;