Version 3.6.0.4, tag libreoffice-3.6.0.4
[LibreOffice.git] / uui / source / secmacrowarnings.hxx
blob65d3f0d23c48dd7d6fefe9c235ad7bcca946282b
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*************************************************************************
4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
6 * Copyright 2000, 2010 Oracle and/or its affiliates.
8 * OpenOffice.org - a multi-platform office productivity suite
10 * This file is part of OpenOffice.org.
12 * OpenOffice.org is free software: you can redistribute it and/or modify
13 * it under the terms of the GNU Lesser General Public License version 3
14 * only, as published by the Free Software Foundation.
16 * OpenOffice.org is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU Lesser General Public License version 3 for more details
20 * (a copy is included in the LICENSE file that accompanied this code).
22 * You should have received a copy of the GNU Lesser General Public License
23 * version 3 along with OpenOffice.org. If not, see
24 * <http://www.openoffice.org/license.html>
25 * for a copy of the LGPLv3 License.
27 ************************************************************************/
29 #ifndef _SECMACROWARNINGS_HXX
30 #define _SECMACROWARNINGS_HXX
32 #include <vcl/dialog.hxx>
33 #include <svtools/stdctrl.hxx>
34 #include <unotools/securityoptions.hxx>
35 #include <vcl/button.hxx>
37 namespace com {
38 namespace sun {
39 namespace star {
40 namespace security {
41 class XCertificate; }
42 namespace xml { namespace crypto {
43 class XSecurityEnvironment; }}
44 }}}
46 #include <com/sun/star/uno/Sequence.hxx>
49 namespace css = com::sun::star;
50 namespace cssu = com::sun::star::uno;
51 namespace css = ::com::sun::star;
53 class HeaderBar;
55 class MacroWarning : public ModalDialog
57 private:
59 cssu::Reference< css::security::XCertificate > mxCert;
60 cssu::Reference< css::embed::XStorage > mxStore;
61 ::rtl::OUString maODFVersion;
62 const cssu::Sequence< css::security::DocumentSignatureInformation >* mpInfos;
64 FixedImage maSymbolImg;
65 FixedInfo maDocNameFI;
66 FixedInfo maDescr1aFI;
67 FixedInfo maDescr1bFI;
68 FixedInfo maSignsFI;
69 PushButton maViewSignsBtn;
70 FixedInfo maDescr2FI;
71 CheckBox maAlwaysTrustCB;
72 FixedLine maBottomSepFL;
73 OKButton maEnableBtn;
74 CancelButton maDisableBtn;
75 HelpButton maHelpBtn;
77 const bool mbSignedMode; // modus of dialog (signed / unsigned macros)
78 const bool mbShowSignatures;
79 sal_Int32 mnActSecLevel;
81 DECL_LINK( ViewSignsBtnHdl, void* );
82 DECL_LINK( EnableBtnHdl, void* );
83 DECL_LINK( DisableBtnHdl, void* );
84 DECL_LINK( AlwaysTrustCheckHdl, void* );
86 void InitControls();
87 void FitControls();
89 public:
90 MacroWarning( Window* pParent, bool _bShowSignatures, ResMgr& rResMgr );
91 ~MacroWarning();
93 virtual short Execute();
95 void SetDocumentURL( const String& rDocURL );
97 void SetStorage( const cssu::Reference < css::embed::XStorage >& rxStore,
98 const ::rtl::OUString& aODFVersion,
99 const cssu::Sequence< css::security::DocumentSignatureInformation >& _rInfos );
100 void SetCertificate( const cssu::Reference< css::security::XCertificate >& _rxCert );
103 #endif
105 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */