summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.com>2020-06-02 16:45:44 +0200
committerMiklos Vajna <vmiklos@collabora.com>2020-06-03 09:06:49 +0200
commit35ec66f8766bd3d8f17c9e0ea68d1e260a9fbc32 (patch)
tree89c09751345f36a612174e30e45393ecf4e3abdc /sfx2
parente05a39f75cd304bfc1bd59aa2eebe4889cae109f (diff)
tdf#130354 sfx2: make PDF signing UI work again
Regression from commit 9112c18524c9f5e67d6cbb282586a439e3020cdb (Don't create unnecessary tempfiles for opened doc, 2019-10-18), restore the temporary file creation for the PDF case, as it's needed for PDF signing to work. Change-Id: I945f04f6ab90d0e04fb14a7634ec877fb0af1a0f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95367 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins (cherry picked from commit 058caeef45f9abf12e4e243aafbbb1c2ebcbc057) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95324
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/doc/objserv.cxx4
1 files changed, 4 insertions, 0 deletions
diff --git a/sfx2/source/doc/objserv.cxx b/sfx2/source/doc/objserv.cxx
index e0b6bf5a4a39..7e367a88e53e 100644
--- a/sfx2/source/doc/objserv.cxx
+++ b/sfx2/source/doc/objserv.cxx
@@ -1568,6 +1568,10 @@ uno::Sequence< security::DocumentSignatureInformation > SfxObjectShell::GetDocum
else
{
// Not ZIP-based, e.g. PDF.
+
+ // Create temp file if needed.
+ GetMedium()->CreateTempFile(/*bReplace=*/false);
+
std::unique_ptr<SvStream> pStream(utl::UcbStreamHelper::CreateStream(GetMedium()->GetName(), StreamMode::READ));
uno::Reference<io::XStream> xStream(new utl::OStreamWrapper(*pStream));
uno::Reference<io::XInputStream> xInputStream(xStream, uno::UNO_QUERY);