diff options
-rw-r--r-- | include/sfx2/strings.hrc | 4 | ||||
-rw-r--r-- | xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx | 15 | ||||
-rw-r--r-- | xmlsecurity/uiconfig/ui/digitalsignaturesdialog.ui | 4 |
3 files changed, 14 insertions, 9 deletions
diff --git a/include/sfx2/strings.hrc b/include/sfx2/strings.hrc index 82b71b7294e8..2e9726d0565a 100644 --- a/include/sfx2/strings.hrc +++ b/include/sfx2/strings.hrc @@ -258,8 +258,8 @@ #define STR_READONLY_SIGN NC_("STR_READONLY_SIGN", "Sign Document") #define STR_SIGNATURE_BROKEN NC_("STR_SIGNATURE_BROKEN", "This document has an invalid signature.") #define STR_SIGNATURE_INVALID NC_("STR_SIGNATURE_INVALID", "The signature was valid, but the document has been modified") -#define STR_SIGNATURE_NOTVALIDATED NC_("STR_SIGNATURE_NOTVALIDATED", "The signature is OK, but the certificate could not be validated.") -#define STR_SIGNATURE_PARTIAL_OK NC_("STR_SIGNATURE_PARTIAL_OK", "The signature is OK, but the document is only partially signed.") +#define STR_SIGNATURE_NOTVALIDATED NC_("STR_SIGNATURE_NOTVALIDATED", "At least one signature has problems: the certificate could not be validated.") +#define STR_SIGNATURE_PARTIAL_OK NC_("STR_SIGNATURE_PARTIAL_OK", "At least one signature has problems: the document is only partially signed.") #define STR_SIGNATURE_NOTVALIDATED_PARTIAL_OK NC_("STR_SIGNATURE_NOTVALIDATED_PARTIAL_OK", "The certificate could not be validated and the document is only partially signed.") #define STR_SIGNATURE_OK NC_("STR_SIGNATURE_OK", "This document is digitally signed and the signature is valid.") #define STR_SIGNATURE_SHOW NC_("STR_SIGNATURE_SHOW", "Show Signatures") diff --git a/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx b/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx index 5be9bd0d603f..104206ab5c4f 100644 --- a/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx +++ b/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx @@ -551,6 +551,7 @@ void DigitalSignaturesDialog::ImplFillSignaturesBox() size_t nInfos = maSignatureManager.maCurrentSignatureInformations.size(); size_t nValidSigs = 0, nValidCerts = 0; bool bAllNewSignatures = true; + bool bSomePartial = false; if( nInfos ) { @@ -628,7 +629,7 @@ void DigitalSignaturesDialog::ImplFillSignaturesBox() { if (maSignatureManager.mxStore.is()) { - // XML based. + // ZIP based. bSigValid = DocumentSignatureHelper::checkIfAllFilesAreSigned( aElementsToBeVerified, rInfo, mode); } @@ -640,6 +641,10 @@ void DigitalSignaturesDialog::ImplFillSignaturesBox() if( bSigValid ) nValidSigs++; + else + { + bSomePartial = true; + } } Image aImage; @@ -693,8 +698,8 @@ void DigitalSignaturesDialog::ImplFillSignaturesBox() bool bShowInvalidState = nInfos && !bAllSigsValid; - m_pSigsInvalidImg->Show( bShowInvalidState ); - m_pSigsInvalidFI->Show( bShowInvalidState ); + m_pSigsInvalidImg->Show( bShowInvalidState && !bSomePartial); + m_pSigsInvalidFI->Show( bShowInvalidState && !bSomePartial); bool bShowNotValidatedState = nInfos && bAllSigsValid && !bAllCertsValid; @@ -703,8 +708,8 @@ void DigitalSignaturesDialog::ImplFillSignaturesBox() //bAllNewSignatures is always true if we are not in document mode bool bShowOldSignature = nInfos && bAllSigsValid && bAllCertsValid && !bAllNewSignatures; - m_pSigsOldSignatureImg->Show(bShowOldSignature); - m_pSigsOldSignatureFI->Show(bShowOldSignature); + m_pSigsOldSignatureImg->Show(bShowOldSignature || bSomePartial); + m_pSigsOldSignatureFI->Show(bShowOldSignature || bSomePartial); SignatureHighlightHdl( nullptr ); } diff --git a/xmlsecurity/uiconfig/ui/digitalsignaturesdialog.ui b/xmlsecurity/uiconfig/ui/digitalsignaturesdialog.ui index 958b8359bc80..55ee1f4e6c9b 100644 --- a/xmlsecurity/uiconfig/ui/digitalsignaturesdialog.ui +++ b/xmlsecurity/uiconfig/ui/digitalsignaturesdialog.ui @@ -297,7 +297,7 @@ <property name="can_focus">False</property> <property name="no_show_all">True</property> <property name="hexpand">True</property> - <property name="label" translatable="yes" context="digitalsignaturesdialog|oldsignatureft">Not all parts of the document are signed</property> + <property name="label" translatable="yes" context="digitalsignaturesdialog|oldsignatureft">At least one signature has problems: the document is only partially signed.</property> <property name="xalign">0</property> </object> <packing> @@ -310,7 +310,7 @@ <property name="can_focus">False</property> <property name="no_show_all">True</property> <property name="hexpand">True</property> - <property name="label" translatable="yes" context="digitalsignaturesdialog|notvalidatedft">Certificate could not be validated</property> + <property name="label" translatable="yes" context="digitalsignaturesdialog|notvalidatedft">At least one signature has problems: the certificate could not be validated.</property> <property name="xalign">0</property> </object> <packing> |