1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: secmacrowarnings.hxx,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef _SECMACROWARNINGS_HXX
32 #define _SECMACROWARNINGS_HXX
34 #include <vcl/dialog.hxx>
35 #include <svtools/stdctrl.hxx>
36 #include <svtools/securityoptions.hxx>
37 #include <vcl/button.hxx>
44 namespace xml
{ namespace crypto
{
45 class XSecurityEnvironment
; }}
48 #include <com/sun/star/uno/Sequence.hxx>
51 namespace css
= com::sun::star
;
52 namespace cssu
= com::sun::star::uno
;
53 namespace css
= ::com::sun::star
;
57 class MacroWarning
: public ModalDialog
61 cssu::Reference
< css::security::XCertificate
> mxCert
;
62 cssu::Reference
< css::embed::XStorage
> mxStore
;
63 ::rtl::OUString maODFVersion
;
64 const cssu::Sequence
< css::security::DocumentSignatureInformation
>* mpInfos
;
66 FixedImage maSymbolImg
;
67 FixedInfo maDocNameFI
;
68 FixedInfo maDescr1aFI
;
69 FixedInfo maDescr1bFI
;
71 PushButton maViewSignsBtn
;
73 CheckBox maAlwaysTrustCB
;
74 FixedLine maBottomSepFL
;
76 CancelButton maDisableBtn
;
79 const bool mbSignedMode
; // modus of dialog (signed / unsigned macros)
80 const bool mbShowSignatures
;
81 sal_Int32 mnActSecLevel
;
83 DECL_LINK( ViewSignsBtnHdl
, void* );
84 DECL_LINK( EnableBtnHdl
, void* );
85 DECL_LINK( DisableBtnHdl
, void* );
86 DECL_LINK( AlwaysTrustCheckHdl
, void* );
92 MacroWarning( Window
* pParent
, bool _bShowSignatures
, ResMgr
& rResMgr
);
95 virtual short Execute();
97 void SetDocumentURL( const String
& rDocURL
);
99 void SetStorage( const cssu::Reference
< css::embed::XStorage
>& rxStore
,
100 const ::rtl::OUString
& aODFVersion
,
101 const cssu::Sequence
< css::security::DocumentSignatureInformation
>& _rInfos
);
102 void SetCertificate( const cssu::Reference
< css::security::XCertificate
>& _rxCert
);