From 5ee141ee2fb77c3cc452ac656235d7e83e15072c Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Wed, 22 Nov 2017 15:46:20 +0200 Subject: 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 Reviewed-by: Noel Grandin --- sfx2/source/doc/objcont.cxx | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'sfx2') 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; -- cgit v1.2.3