From 67785148837b4ba5ebef1b2cdf249a8f8cad8b9d Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Thu, 11 Feb 2016 09:20:24 +0100 Subject: xmlsecurity: export OOXML signature relations to persistent storage With this, _xmlsignatures/_rels/origin.sigs.rels and _xmlsignatures/origin.sigs is written to the destination file. Change-Id: I8d63a182e7cf05ed20195f88c90fba2a9a05379e --- .../source/dialogs/digitalsignaturesdialog.cxx | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) (limited to 'xmlsecurity/source/dialogs') diff --git a/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx b/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx index d3262bb5bb88..6132e845c95d 100644 --- a/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx +++ b/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx @@ -411,13 +411,20 @@ IMPL_LINK_NOARG_TYPED(DigitalSignaturesDialog, OKButtonHdl, Button*, void) XMLSignatureHelper::CloseDocumentHandler( xDocumentHandler); - // If stream was not provided, we are responsible for committing it.... - if ( !mxSignatureStream.is() ) - { - uno::Reference< embed::XTransactedObject > xTrans( - aStreamHelper.xSignatureStorage, uno::UNO_QUERY ); - xTrans->commit(); - } + } + else if (aStreamHelper.xSignatureStorage.is() && aStreamHelper.nStorageFormat == embed::StorageFormats::OFOPXML) + { + // OOXML + size_t nSignatureCount = maCurrentSignatureInformations.size(); + maSignatureHelper.ExportSignatureRelations(aStreamHelper.xSignatureStorage, nSignatureCount); + } + + // If stream was not provided, we are responsible for committing it.... + if ( !mxSignatureStream.is() ) + { + uno::Reference< embed::XTransactedObject > xTrans( + aStreamHelper.xSignatureStorage, uno::UNO_QUERY ); + xTrans->commit(); } EndDialog(RET_OK); -- cgit