xmlsecurity OOXML export: remove signature content types when removing ...
... signatures. ExportSignatureContentTypes() was already a "remove all, and then re-add necessary entries" operation, so just make sure we still call it for zero signatures and it'll do the right thing. Change-Id: If9182b39ac6d8f2cf66f33a02d9ddcab170ba5ea
This commit is contained in:
@@ -374,11 +374,9 @@ void DocumentSignatureManager::write()
|
|||||||
{
|
{
|
||||||
// OOXML
|
// OOXML
|
||||||
size_t nSignatureCount = maCurrentSignatureInformations.size();
|
size_t nSignatureCount = maCurrentSignatureInformations.size();
|
||||||
if (nSignatureCount > 0)
|
|
||||||
{
|
|
||||||
maSignatureHelper.ExportSignatureContentTypes(mxStore, nSignatureCount);
|
maSignatureHelper.ExportSignatureContentTypes(mxStore, nSignatureCount);
|
||||||
|
if (nSignatureCount > 0)
|
||||||
maSignatureHelper.ExportSignatureRelations(aStreamHelper.xSignatureStorage, nSignatureCount);
|
maSignatureHelper.ExportSignatureRelations(aStreamHelper.xSignatureStorage, nSignatureCount);
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Removing all signatures: then need to remove the signature relation as well.
|
// Removing all signatures: then need to remove the signature relation as well.
|
||||||
|
Reference in New Issue
Block a user