summaryrefslogtreecommitdiff
path: root/xmlsecurity/inc
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2019-02-13 12:51:28 +0000
committerCaolán McNamara <caolanm@redhat.com>2019-02-14 14:21:40 +0100
commitbb9481a489cc21b0695c9a7c3e9d4ffe1446f8a9 (patch)
tree7f0e19b0a38cba49ceae3d8d42ae066f5ce1c497 /xmlsecurity/inc
parent3157a3a8332ad342fb2b44659123217fa3450168 (diff)
weld DigitalSignaturesDialog
Change-Id: I197f4805558b07aeb9e66734d0fb5c250c41ad3e Reviewed-on: https://gerrit.libreoffice.org/67796 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'xmlsecurity/inc')
-rw-r--r--xmlsecurity/inc/bitmaps.hlst4
-rw-r--r--xmlsecurity/inc/digitalsignaturesdialog.hxx73
2 files changed, 37 insertions, 40 deletions
diff --git a/xmlsecurity/inc/bitmaps.hlst b/xmlsecurity/inc/bitmaps.hlst
index 1af4ff3c6234..52a9df754e48 100644
--- a/xmlsecurity/inc/bitmaps.hlst
+++ b/xmlsecurity/inc/bitmaps.hlst
@@ -15,6 +15,10 @@
#define BMP_CERT_OK "xmlsecurity/res/certificate_16.png"
#define BMP_CERT_NOT_OK "xmlsecurity/res/notcertificate_16.png"
+#define BMP_SIG_VALID "xmlsecurity/res/signet_11x16.png"
+#define BMP_SIG_INVALID "svx/res/caution_11x16.png"
+#define BMP_SIG_NOT_VALIDATED "xmlsecurity/res/notcertificate_16.png"
+
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
diff --git a/xmlsecurity/inc/digitalsignaturesdialog.hxx b/xmlsecurity/inc/digitalsignaturesdialog.hxx
index 41cc458a7380..6fd74ad70964 100644
--- a/xmlsecurity/inc/digitalsignaturesdialog.hxx
+++ b/xmlsecurity/inc/digitalsignaturesdialog.hxx
@@ -20,10 +20,7 @@
#ifndef INCLUDED_XMLSECURITY_INC_DIGITALSIGNATURESDIALOG_HXX
#define INCLUDED_XMLSECURITY_INC_DIGITALSIGNATURESDIALOG_HXX
-#include <vcl/dialog.hxx>
-#include <vcl/fixed.hxx>
-#include <vcl/button.hxx>
-#include <svtools/simptabl.hxx>
+#include <vcl/weld.hxx>
#include <com/sun/star/beans/PropertyValue.hpp>
#include "documentsignaturehelper.hxx"
@@ -48,7 +45,7 @@ namespace xml { namespace dom {
class HeaderBar;
-class DigitalSignaturesDialog : public ModalDialog
+class DigitalSignaturesDialog : public weld::GenericDialogController
{
private:
css::uno::Reference< css::uno::XComponentContext >& mxCtx;
@@ -57,28 +54,6 @@ private:
bool mbVerifySignatures;
bool mbSignaturesChanged;
- VclPtr<FixedText> m_pHintDocFT;
- VclPtr<FixedText> m_pHintBasicFT;
- VclPtr<FixedText> m_pHintPackageFT;
- VclPtr<SvSimpleTable> m_pSignaturesLB;
- VclPtr<FixedImage> m_pSigsValidImg;
- VclPtr<FixedText> m_pSigsValidFI;
- VclPtr<FixedImage> m_pSigsInvalidImg;
- VclPtr<FixedText> m_pSigsInvalidFI;
- VclPtr<FixedImage> m_pSigsNotvalidatedImg;
- VclPtr<FixedText> m_pSigsNotvalidatedFI;
- VclPtr<FixedImage> m_pSigsOldSignatureImg;
- VclPtr<FixedText> m_pSigsOldSignatureFI;
-
- VclPtr<CheckBox> m_pAdESCompliantCB;
-
- VclPtr<PushButton> m_pViewBtn;
- VclPtr<PushButton> m_pAddBtn;
- VclPtr<PushButton> m_pRemoveBtn;
- VclPtr<PushButton> m_pStartCertMgrBtn;
-
- VclPtr<CloseButton> m_pCloseBtn;
-
OUString const m_sODFVersion;
//Signals if the document contains already a document signature. This is only
//important when we are signing macros and if the value is true.
@@ -87,15 +62,34 @@ private:
bool m_bAdESCompliant;
- DECL_LINK(AdESCompliantCheckBoxHdl, CheckBox&, void);
- DECL_LINK(ViewButtonHdl, Button*, void);
- DECL_LINK(AddButtonHdl, Button*, void);
- DECL_LINK(RemoveButtonHdl, Button*, void);
- DECL_LINK(SignatureHighlightHdl, SvTreeListBox*, void );
- DECL_LINK(SignatureSelectHdl, SvTreeListBox*, bool );
- DECL_LINK(StartVerifySignatureHdl, LinkParamNone*, bool );
- DECL_LINK(OKButtonHdl, Button*, void );
- DECL_STATIC_LINK(DigitalSignaturesDialog, CertMgrButtonHdl, Button*, void );
+ std::unique_ptr<weld::Label> m_xHintDocFT;
+ std::unique_ptr<weld::Label> m_xHintBasicFT;
+ std::unique_ptr<weld::Label> m_xHintPackageFT;
+ std::unique_ptr<weld::TreeView> m_xSignaturesLB;
+ std::unique_ptr<weld::Image> m_xSigsValidImg;
+ std::unique_ptr<weld::Label> m_xSigsValidFI;
+ std::unique_ptr<weld::Image> m_xSigsInvalidImg;
+ std::unique_ptr<weld::Label> m_xSigsInvalidFI;
+ std::unique_ptr<weld::Image> m_xSigsNotvalidatedImg;
+ std::unique_ptr<weld::Label> m_xSigsNotvalidatedFI;
+ std::unique_ptr<weld::Image> m_xSigsOldSignatureImg;
+ std::unique_ptr<weld::Label> m_xSigsOldSignatureFI;
+ std::unique_ptr<weld::CheckButton> m_xAdESCompliantCB;
+ std::unique_ptr<weld::Button> m_xViewBtn;
+ std::unique_ptr<weld::Button> m_xAddBtn;
+ std::unique_ptr<weld::Button> m_xRemoveBtn;
+ std::unique_ptr<weld::Button> m_xStartCertMgrBtn;
+ std::unique_ptr<weld::Button> m_xCloseBtn;
+
+ DECL_LINK(AdESCompliantCheckBoxHdl, weld::ToggleButton&, void);
+ DECL_LINK(ViewButtonHdl, weld::Button&, void);
+ DECL_LINK(AddButtonHdl, weld::Button&, void);
+ DECL_LINK(RemoveButtonHdl, weld::Button&, void);
+ DECL_LINK(SignatureHighlightHdl, weld::TreeView&, void);
+ DECL_LINK(SignatureSelectHdl, weld::TreeView&, void);
+ DECL_LINK(StartVerifySignatureHdl, LinkParamNone*, bool);
+ DECL_LINK(OKButtonHdl, weld::Button&, void);
+ DECL_LINK(CertMgrButtonHdl, weld::Button&, void);
void ImplGetSignatureInformations(bool bUseTempStream, bool bCacheLastSignature);
void ImplFillSignaturesBox();
@@ -114,11 +108,10 @@ private:
bool canAddRemove();
public:
- DigitalSignaturesDialog( vcl::Window* pParent, css::uno::Reference<
+ DigitalSignaturesDialog(weld::Window* pParent, css::uno::Reference<
css::uno::XComponentContext >& rxCtx, DocumentSignatureMode eMode,
bool bReadOnly, const OUString& sODFVersion, bool bHasDocumentSignature);
virtual ~DigitalSignaturesDialog() override;
- virtual void dispose() override;
// Initialize the dialog and the security environment, returns TRUE on success
bool Init();
@@ -127,8 +120,8 @@ public:
void SetStorage( const css::uno::Reference < css::embed::XStorage >& rxStore );
void SetSignatureStream( const css::uno::Reference < css::io::XStream >& rxStream );
- // Execute the dialog...
- short Execute() override;
+ // Execute the dialog...
+ short run() override;
// Did signatures change?
bool SignaturesChanged() const { return mbSignaturesChanged; }