update dev300-m58
[ooovba.git] / uui / source / secmacrowarnings.hxx
blobce4515f9d49044e664e90d6b5b0d332b1571d485
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: secmacrowarnings.hxx,v $
10 * $Revision: 1.3 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef _SECMACROWARNINGS_HXX
32 #define _SECMACROWARNINGS_HXX
34 #include <vcl/dialog.hxx>
35 #include <svtools/stdctrl.hxx>
36 #include <svtools/securityoptions.hxx>
37 #include <vcl/button.hxx>
39 namespace com {
40 namespace sun {
41 namespace star {
42 namespace security {
43 class XCertificate; }
44 namespace xml { namespace crypto {
45 class XSecurityEnvironment; }}
46 }}}
48 #include <com/sun/star/uno/Sequence.hxx>
51 namespace css = com::sun::star;
52 namespace cssu = com::sun::star::uno;
53 namespace css = ::com::sun::star;
55 class HeaderBar;
57 class MacroWarning : public ModalDialog
59 private:
61 cssu::Reference< css::security::XCertificate > mxCert;
62 cssu::Reference< css::embed::XStorage > mxStore;
63 const cssu::Sequence< css::security::DocumentSignatureInformation >* mpInfos;
65 FixedImage maSymbolImg;
66 FixedInfo maDocNameFI;
67 FixedInfo maDescr1aFI;
68 FixedInfo maDescr1bFI;
69 FixedInfo maSignsFI;
70 PushButton maViewSignsBtn;
71 FixedInfo maDescr2FI;
72 CheckBox maAlwaysTrustCB;
73 FixedLine maBottomSepFL;
74 OKButton maEnableBtn;
75 CancelButton maDisableBtn;
76 HelpButton maHelpBtn;
78 const bool mbSignedMode; // modus of dialog (signed / unsigned macros)
79 const bool mbShowSignatures;
80 sal_Int32 mnActSecLevel;
82 DECL_LINK( ViewSignsBtnHdl, void* );
83 DECL_LINK( EnableBtnHdl, void* );
84 DECL_LINK( DisableBtnHdl, void* );
85 DECL_LINK( AlwaysTrustCheckHdl, void* );
87 void InitControls();
88 void FitControls();
90 public:
91 MacroWarning( Window* pParent, bool _bShowSignatures, ResMgr& rResMgr );
92 ~MacroWarning();
94 virtual short Execute();
96 void SetDocumentURL( const String& rDocURL );
98 void SetStorage( const cssu::Reference < css::embed::XStorage >& rxStore,
99 const cssu::Sequence< css::security::DocumentSignatureInformation >& _rInfos );
100 void SetCertificate( const cssu::Reference< css::security::XCertificate >& _rxCert );
103 #endif