diff --git a/xmlsecurity/inc/documentsignaturemanager.hxx b/xmlsecurity/inc/documentsignaturemanager.hxx index 06dd200de365..ab89e5b96674 100644 --- a/xmlsecurity/inc/documentsignaturemanager.hxx +++ b/xmlsecurity/inc/documentsignaturemanager.hxx @@ -28,6 +28,7 @@ #include "documentsignaturehelper.hxx" #include +#include namespace com::sun::star { @@ -67,7 +68,7 @@ private: css::uno::Sequence> m_manifest; css::uno::Reference mxSignatureStream; css::uno::Reference mxModel; - css::uno::Reference mxTempSignatureStream; + rtl::Reference mxTempSignatureStream; /// Storage containing all OOXML signatures, unused for ODF. css::uno::Reference mxTempSignatureStorage; css::uno::Reference mxSEInitializer; diff --git a/xmlsecurity/source/helper/documentsignaturemanager.cxx b/xmlsecurity/source/helper/documentsignaturemanager.cxx index 83606dc963e6..619d8186fec6 100644 --- a/xmlsecurity/source/helper/documentsignaturemanager.cxx +++ b/xmlsecurity/source/helper/documentsignaturemanager.cxx @@ -237,7 +237,7 @@ SignatureStreamHelper DocumentSignatureManager::ImplOpenSignatureStream(sal_Int3 if (nStreamOpenMode & embed::ElementModes::TRUNCATE) { //We write always into a new temporary stream. - mxTempSignatureStream.set(io::TempFile::create(mxContext), uno::UNO_QUERY_THROW); + mxTempSignatureStream = new utl::TempFileFastService; if (aHelper.nStorageFormat != embed::StorageFormats::OFOPXML) aHelper.xSignatureStream = mxTempSignatureStream; else