merge the formfield patch from ooo-build
[ooovba.git] / uui / source / secmacrowarnings.hxx
blobbce3f96a0cc184d08ed0762a521a370de38b02ae
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 ::rtl::OUString maODFVersion;
64 const cssu::Sequence< css::security::DocumentSignatureInformation >* mpInfos;
66 FixedImage maSymbolImg;
67 FixedInfo maDocNameFI;
68 FixedInfo maDescr1aFI;
69 FixedInfo maDescr1bFI;
70 FixedInfo maSignsFI;
71 PushButton maViewSignsBtn;
72 FixedInfo maDescr2FI;
73 CheckBox maAlwaysTrustCB;
74 FixedLine maBottomSepFL;
75 OKButton maEnableBtn;
76 CancelButton maDisableBtn;
77 HelpButton maHelpBtn;
79 const bool mbSignedMode; // modus of dialog (signed / unsigned macros)
80 const bool mbShowSignatures;
81 sal_Int32 mnActSecLevel;
83 DECL_LINK( ViewSignsBtnHdl, void* );
84 DECL_LINK( EnableBtnHdl, void* );
85 DECL_LINK( DisableBtnHdl, void* );
86 DECL_LINK( AlwaysTrustCheckHdl, void* );
88 void InitControls();
89 void FitControls();
91 public:
92 MacroWarning( Window* pParent, bool _bShowSignatures, ResMgr& rResMgr );
93 ~MacroWarning();
95 virtual short Execute();
97 void SetDocumentURL( const String& rDocURL );
99 void SetStorage( const cssu::Reference < css::embed::XStorage >& rxStore,
100 const ::rtl::OUString& aODFVersion,
101 const cssu::Sequence< css::security::DocumentSignatureInformation >& _rInfos );
102 void SetCertificate( const cssu::Reference< css::security::XCertificate >& _rxCert );
105 #endif