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>
42 namespace xml
{ namespace crypto
{
43 class XSecurityEnvironment
; }}
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
;
55 class MacroWarning
: public ModalDialog
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
;
69 PushButton maViewSignsBtn
;
71 CheckBox maAlwaysTrustCB
;
72 FixedLine maBottomSepFL
;
74 CancelButton maDisableBtn
;
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* );
90 MacroWarning( Window
* pParent
, bool _bShowSignatures
, ResMgr
& rResMgr
);
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
);
105 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */