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 INCLUDED_UUI_SOURCE_SECMACROWARNINGS_HXX
21 #define INCLUDED_UUI_SOURCE_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 class MacroWarning
: public ModalDialog
42 css::uno::Reference
< css::security::XCertificate
> mxCert
;
43 css::uno::Reference
< css::embed::XStorage
> mxStore
;
44 OUString maODFVersion
;
45 const css::uno::Sequence
< css::security::DocumentSignatureInformation
>* mpInfos
;
47 VclPtr
<FixedImage
> mpSymbolImg
;
48 VclPtr
<FixedText
> mpDocNameFI
;
49 VclPtr
<FixedText
> mpDescr1FI
;
50 VclPtr
<FixedText
> mpDescr1aFI
;
51 VclPtr
<FixedText
> mpSignsFI
;
52 VclPtr
<PushButton
> mpViewSignsBtn
;
53 VclPtr
<FixedText
> mpDescr2FI
;
54 VclPtr
<CheckBox
> mpAlwaysTrustCB
;
55 VclPtr
<PushButton
> mpEnableBtn
;
56 VclPtr
<PushButton
> mpDisableBtn
;
58 const bool mbSignedMode
; // modus of dialog (signed / unsigned macros)
59 const bool mbShowSignatures
;
60 sal_Int32 mnActSecLevel
;
62 DECL_LINK( ViewSignsBtnHdl
, void* );
63 DECL_LINK( EnableBtnHdl
, void* );
64 DECL_LINK( DisableBtnHdl
, void* );
65 DECL_LINK( AlwaysTrustCheckHdl
, void* );
70 MacroWarning( vcl::Window
* pParent
, bool _bShowSignatures
, ResMgr
& rResMgr
);
71 virtual ~MacroWarning();
72 virtual void dispose() SAL_OVERRIDE
;
74 void SetDocumentURL( const OUString
& rDocURL
);
76 void SetStorage( const css::uno::Reference
< css::embed::XStorage
>& rxStore
,
77 const OUString
& aODFVersion
,
78 const css::uno::Sequence
< css::security::DocumentSignatureInformation
>& _rInfos
);
79 void SetCertificate( const css::uno::Reference
< css::security::XCertificate
>& _rxCert
);
84 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */