Version 4.0.0.1, tag libreoffice-4.0.0.1
[LibreOffice.git] / uui / source / secmacrowarnings.hxx
blobb10a2bfb24b45787e94f24d3c71ee8c29e04d9e6
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #ifndef _SECMACROWARNINGS_HXX
21 #define _SECMACROWARNINGS_HXX
23 #include <vcl/dialog.hxx>
24 #include <svtools/stdctrl.hxx>
25 #include <unotools/securityoptions.hxx>
26 #include <vcl/button.hxx>
28 namespace com {
29 namespace sun {
30 namespace star {
31 namespace security {
32 class XCertificate; }
33 }}}
35 #include <com/sun/star/uno/Sequence.hxx>
38 namespace cssu = com::sun::star::uno;
40 class MacroWarning : public ModalDialog
42 private:
44 cssu::Reference< css::security::XCertificate > mxCert;
45 cssu::Reference< css::embed::XStorage > mxStore;
46 ::rtl::OUString maODFVersion;
47 const cssu::Sequence< css::security::DocumentSignatureInformation >* mpInfos;
49 FixedImage maSymbolImg;
50 FixedInfo maDocNameFI;
51 FixedInfo maDescr1aFI;
52 FixedInfo maDescr1bFI;
53 FixedInfo maSignsFI;
54 PushButton maViewSignsBtn;
55 FixedInfo maDescr2FI;
56 CheckBox maAlwaysTrustCB;
57 FixedLine maBottomSepFL;
58 OKButton maEnableBtn;
59 CancelButton maDisableBtn;
60 HelpButton maHelpBtn;
62 const bool mbSignedMode; // modus of dialog (signed / unsigned macros)
63 const bool mbShowSignatures;
64 sal_Int32 mnActSecLevel;
66 DECL_LINK( ViewSignsBtnHdl, void* );
67 DECL_LINK( EnableBtnHdl, void* );
68 DECL_LINK( DisableBtnHdl, void* );
69 DECL_LINK( AlwaysTrustCheckHdl, void* );
71 void InitControls();
72 void FitControls();
74 public:
75 MacroWarning( Window* pParent, bool _bShowSignatures, ResMgr& rResMgr );
76 ~MacroWarning();
78 virtual short Execute();
80 void SetDocumentURL( const String& rDocURL );
82 void SetStorage( const cssu::Reference < css::embed::XStorage >& rxStore,
83 const ::rtl::OUString& aODFVersion,
84 const cssu::Sequence< css::security::DocumentSignatureInformation >& _rInfos );
85 void SetCertificate( const cssu::Reference< css::security::XCertificate >& _rxCert );
88 #endif
90 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */