1 /************************************************************************* 2 * 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * Copyright 2000, 2010 Oracle and/or its affiliates. 6 * 7 * OpenOffice.org - a multi-platform office productivity suite 8 * 9 * This file is part of OpenOffice.org. 10 * 11 * OpenOffice.org is free software: you can redistribute it and/or modify 12 * it under the terms of the GNU Lesser General Public License version 3 13 * only, as published by the Free Software Foundation. 14 * 15 * OpenOffice.org is distributed in the hope that it will be useful, 16 * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 * GNU Lesser General Public License version 3 for more details 19 * (a copy is included in the LICENSE file that accompanied this code). 20 * 21 * You should have received a copy of the GNU Lesser General Public License 22 * version 3 along with OpenOffice.org. If not, see 23 * <http://www.openoffice.org/license.html> 24 * for a copy of the LGPLv3 License. 25 * 26 ************************************************************************/ 27 28 #ifndef _SECMACROWARNINGS_HXX 29 #define _SECMACROWARNINGS_HXX 30 31 #include <vcl/dialog.hxx> 32 #include <svtools/stdctrl.hxx> 33 #include <unotools/securityoptions.hxx> 34 #include <vcl/button.hxx> 35 36 namespace com { 37 namespace sun { 38 namespace star { 39 namespace security { 40 class XCertificate; } 41 namespace xml { namespace crypto { 42 class XSecurityEnvironment; }} 43 }}} 44 45 #include <com/sun/star/uno/Sequence.hxx> 46 47 48 namespace css = com::sun::star; 49 namespace cssu = com::sun::star::uno; 50 namespace css = ::com::sun::star; 51 52 class HeaderBar; 53 54 class MacroWarning : public ModalDialog 55 { 56 private: 57 58 cssu::Reference< css::security::XCertificate > mxCert; 59 cssu::Reference< css::embed::XStorage > mxStore; 60 ::rtl::OUString maODFVersion; 61 const cssu::Sequence< css::security::DocumentSignatureInformation >* mpInfos; 62 63 FixedImage maSymbolImg; 64 FixedInfo maDocNameFI; 65 FixedInfo maDescr1aFI; 66 FixedInfo maDescr1bFI; 67 FixedInfo maSignsFI; 68 PushButton maViewSignsBtn; 69 FixedInfo maDescr2FI; 70 CheckBox maAlwaysTrustCB; 71 FixedLine maBottomSepFL; 72 OKButton maEnableBtn; 73 CancelButton maDisableBtn; 74 HelpButton maHelpBtn; 75 76 const bool mbSignedMode; // modus of dialog (signed / unsigned macros) 77 const bool mbShowSignatures; 78 sal_Int32 mnActSecLevel; 79 80 DECL_LINK( ViewSignsBtnHdl, void* ); 81 DECL_LINK( EnableBtnHdl, void* ); 82 DECL_LINK( DisableBtnHdl, void* ); 83 DECL_LINK( AlwaysTrustCheckHdl, void* ); 84 85 void InitControls(); 86 void FitControls(); 87 88 public: 89 MacroWarning( Window* pParent, bool _bShowSignatures, ResMgr& rResMgr ); 90 ~MacroWarning(); 91 92 virtual short Execute(); 93 94 void SetDocumentURL( const String& rDocURL ); 95 96 void SetStorage( const cssu::Reference < css::embed::XStorage >& rxStore, 97 const ::rtl::OUString& aODFVersion, 98 const cssu::Sequence< css::security::DocumentSignatureInformation >& _rInfos ); 99 void SetCertificate( const cssu::Reference< css::security::XCertificate >& _rxCert ); 100 }; 101 102 #endif 103 104