1*b16fc349SAndrew Rist /************************************************************** 2cdf0e10cSrcweir * 3*b16fc349SAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 4*b16fc349SAndrew Rist * or more contributor license agreements. See the NOTICE file 5*b16fc349SAndrew Rist * distributed with this work for additional information 6*b16fc349SAndrew Rist * regarding copyright ownership. The ASF licenses this file 7*b16fc349SAndrew Rist * to you under the Apache License, Version 2.0 (the 8*b16fc349SAndrew Rist * "License"); you may not use this file except in compliance 9*b16fc349SAndrew Rist * with the License. You may obtain a copy of the License at 10*b16fc349SAndrew Rist * 11*b16fc349SAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 12*b16fc349SAndrew Rist * 13*b16fc349SAndrew Rist * Unless required by applicable law or agreed to in writing, 14*b16fc349SAndrew Rist * software distributed under the License is distributed on an 15*b16fc349SAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16*b16fc349SAndrew Rist * KIND, either express or implied. See the License for the 17*b16fc349SAndrew Rist * specific language governing permissions and limitations 18*b16fc349SAndrew Rist * under the License. 19*b16fc349SAndrew Rist * 20*b16fc349SAndrew Rist *************************************************************/ 21*b16fc349SAndrew Rist 22*b16fc349SAndrew Rist 23cdf0e10cSrcweir 24cdf0e10cSrcweir #ifndef _SECMACROWARNINGS_HXX 25cdf0e10cSrcweir #define _SECMACROWARNINGS_HXX 26cdf0e10cSrcweir 27cdf0e10cSrcweir #include <vcl/dialog.hxx> 28cdf0e10cSrcweir #include <svtools/stdctrl.hxx> 29cdf0e10cSrcweir #include <unotools/securityoptions.hxx> 30cdf0e10cSrcweir #include <vcl/button.hxx> 31cdf0e10cSrcweir 32cdf0e10cSrcweir namespace com { 33cdf0e10cSrcweir namespace sun { 34cdf0e10cSrcweir namespace star { 35cdf0e10cSrcweir namespace security { 36cdf0e10cSrcweir class XCertificate; } 37cdf0e10cSrcweir namespace xml { namespace crypto { 38cdf0e10cSrcweir class XSecurityEnvironment; }} 39cdf0e10cSrcweir }}} 40cdf0e10cSrcweir 41cdf0e10cSrcweir #include <com/sun/star/uno/Sequence.hxx> 42cdf0e10cSrcweir 43cdf0e10cSrcweir 44cdf0e10cSrcweir namespace css = com::sun::star; 45cdf0e10cSrcweir namespace cssu = com::sun::star::uno; 46cdf0e10cSrcweir namespace css = ::com::sun::star; 47cdf0e10cSrcweir 48cdf0e10cSrcweir class HeaderBar; 49cdf0e10cSrcweir 50cdf0e10cSrcweir class MacroWarning : public ModalDialog 51cdf0e10cSrcweir { 52cdf0e10cSrcweir private: 53cdf0e10cSrcweir 54cdf0e10cSrcweir cssu::Reference< css::security::XCertificate > mxCert; 55cdf0e10cSrcweir cssu::Reference< css::embed::XStorage > mxStore; 56cdf0e10cSrcweir ::rtl::OUString maODFVersion; 57cdf0e10cSrcweir const cssu::Sequence< css::security::DocumentSignatureInformation >* mpInfos; 58cdf0e10cSrcweir 59cdf0e10cSrcweir FixedImage maSymbolImg; 60cdf0e10cSrcweir FixedInfo maDocNameFI; 61cdf0e10cSrcweir FixedInfo maDescr1aFI; 62cdf0e10cSrcweir FixedInfo maDescr1bFI; 63cdf0e10cSrcweir FixedInfo maSignsFI; 64cdf0e10cSrcweir PushButton maViewSignsBtn; 65cdf0e10cSrcweir FixedInfo maDescr2FI; 66cdf0e10cSrcweir CheckBox maAlwaysTrustCB; 67cdf0e10cSrcweir FixedLine maBottomSepFL; 68cdf0e10cSrcweir OKButton maEnableBtn; 69cdf0e10cSrcweir CancelButton maDisableBtn; 70cdf0e10cSrcweir HelpButton maHelpBtn; 71cdf0e10cSrcweir 72cdf0e10cSrcweir const bool mbSignedMode; // modus of dialog (signed / unsigned macros) 73cdf0e10cSrcweir const bool mbShowSignatures; 74cdf0e10cSrcweir sal_Int32 mnActSecLevel; 75cdf0e10cSrcweir 76cdf0e10cSrcweir DECL_LINK( ViewSignsBtnHdl, void* ); 77cdf0e10cSrcweir DECL_LINK( EnableBtnHdl, void* ); 78cdf0e10cSrcweir DECL_LINK( DisableBtnHdl, void* ); 79cdf0e10cSrcweir DECL_LINK( AlwaysTrustCheckHdl, void* ); 80cdf0e10cSrcweir 81cdf0e10cSrcweir void InitControls(); 82cdf0e10cSrcweir void FitControls(); 83cdf0e10cSrcweir 84cdf0e10cSrcweir public: 85cdf0e10cSrcweir MacroWarning( Window* pParent, bool _bShowSignatures, ResMgr& rResMgr ); 86cdf0e10cSrcweir ~MacroWarning(); 87cdf0e10cSrcweir 88cdf0e10cSrcweir virtual short Execute(); 89cdf0e10cSrcweir 90cdf0e10cSrcweir void SetDocumentURL( const String& rDocURL ); 91cdf0e10cSrcweir 92cdf0e10cSrcweir void SetStorage( const cssu::Reference < css::embed::XStorage >& rxStore, 93cdf0e10cSrcweir const ::rtl::OUString& aODFVersion, 94cdf0e10cSrcweir const cssu::Sequence< css::security::DocumentSignatureInformation >& _rInfos ); 95cdf0e10cSrcweir void SetCertificate( const cssu::Reference< css::security::XCertificate >& _rxCert ); 96cdf0e10cSrcweir }; 97cdf0e10cSrcweir 98cdf0e10cSrcweir #endif 99cdf0e10cSrcweir 100