[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - sfx2/source

Miklos Vajna (via logerrit) logerrit at kemper.freedesktop.org
Wed Jun 3 07:07:20 UTC 2020


 sfx2/source/doc/objserv.cxx |    4 ++++
 1 file changed, 4 insertions(+)

New commits:
commit 35ec66f8766bd3d8f17c9e0ea68d1e260a9fbc32
Author:     Miklos Vajna <vmiklos at collabora.com>
AuthorDate: Tue Jun 2 16:45:44 2020 +0200
Commit:     Miklos Vajna <vmiklos at collabora.com>
CommitDate: Wed Jun 3 09:06:49 2020 +0200

    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 at collabora.com>
    Tested-by: Jenkins
    (cherry picked from commit 058caeef45f9abf12e4e243aafbbb1c2ebcbc057)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95324

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);


More information about the Libreoffice-commits mailing list