1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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>
35 #include <com/sun/star/uno/Sequence.hxx>
38 namespace cssu
= com::sun::star::uno
;
40 class MacroWarning
: public ModalDialog
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
;
54 PushButton maViewSignsBtn
;
56 CheckBox maAlwaysTrustCB
;
57 FixedLine maBottomSepFL
;
59 CancelButton maDisableBtn
;
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* );
75 MacroWarning( Window
* pParent
, bool _bShowSignatures
, ResMgr
& rResMgr
);
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
);
90 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */