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 .
22 #include <com/sun/star/embed/XStorage.hpp>
23 #include <com/sun/star/security/DocumentSignatureInformation.hpp>
24 #include <com/sun/star/uno/Sequence.hxx>
25 #include <vcl/weld.hxx>
27 namespace com::sun::star::security
{ class XCertificate
; }
30 class MacroWarning
: public weld::MessageDialogController
33 std::unique_ptr
<weld::Widget
> mxGrid
;
34 std::unique_ptr
<weld::Label
> mxSignsFI
;
35 std::unique_ptr
<weld::Button
> mxViewSignsBtn
;
36 std::unique_ptr
<weld::CheckButton
> mxAlwaysTrustCB
;
37 std::unique_ptr
<weld::Button
> mxEnableBtn
;
38 std::unique_ptr
<weld::Button
> mxDisableBtn
;
40 css::uno::Reference
< css::security::XCertificate
> mxCert
;
41 css::uno::Reference
< css::embed::XStorage
> mxStore
;
42 OUString maODFVersion
;
43 const css::uno::Sequence
< css::security::DocumentSignatureInformation
>* mpInfos
;
45 const bool mbShowSignatures
;
46 sal_Int32 mnActSecLevel
;
48 DECL_LINK(ViewSignsBtnHdl
, weld::Button
&, void);
49 DECL_LINK(EnableBtnHdl
, weld::Button
&, void);
50 DECL_LINK(DisableBtnHdl
, weld::Button
&, void);
51 DECL_LINK(AlwaysTrustCheckHdl
, weld::Toggleable
&, void);
52 DECL_STATIC_LINK(MacroWarning
, InstallLOKNotifierHdl
, void*, vcl::ILibreOfficeKitNotifier
*);
57 MacroWarning(weld::Window
* pParent
, bool _bShowSignatures
);
59 void SetDocumentURL( const OUString
& rDocURL
);
61 void SetStorage( const css::uno::Reference
< css::embed::XStorage
>& rxStore
,
62 const OUString
& aODFVersion
,
63 const css::uno::Sequence
< css::security::DocumentSignatureInformation
>& _rInfos
);
64 void SetCertificate( const css::uno::Reference
< css::security::XCertificate
>& _rxCert
);
67 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */