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 .
21 #include <sfx2/signaturestate.hxx>
22 #include <vcl/weld.hxx>
31 /// encapsulates (actions on) the signature/state of a document
32 class DocumentSignature
35 /** creates a DocumentSignature instance for the given document
37 If the given ScriptDocument instance refers to the application, or to a document
38 which does not support being signed, the DocumentSignature instance is invalid afterwards.
40 explicit DocumentSignature (ScriptDocument
const&);
43 /** determines whether the instance is valid
45 An instance is valid if and only if it has been constructed with a document
46 which supports signatures.
48 bool supportsSignatures() const;
50 /** signs the scripting content inside the document
53 isValid returns <TRUE/>
55 void signScriptingContent(weld::Window
* pDialogParent
) const;
57 /** retrieves the state of the signature of the scripting content inside the document
59 If the instance is not valid, then SIGNATURESTATE_NOSIGNATURES is returned.
61 SignatureState
getScriptingSignatureState() const;
64 DocumentSignature() = delete;
68 std::unique_ptr
<Impl
> m_pImpl
;
75 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */