android: Update app-specific/MIME type icons
[LibreOffice.git] / basctl / source / inc / docsignature.hxx
blob1681807d390e1d9307a5521c8875e10f9a3a516c
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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 .
19 #pragma once
21 #include <sfx2/signaturestate.hxx>
22 #include <vcl/weld.hxx>
24 class SfxObjectShell;
26 namespace basctl
30 class ScriptDocument;
32 /// encapsulates (actions on) the signature/state of a document
33 class DocumentSignature
35 public:
36 /** creates a DocumentSignature instance for the given document
38 If the given ScriptDocument instance refers to the application, or to a document
39 which does not support being signed, the DocumentSignature instance is invalid afterwards.
41 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
52 @precond
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;
63 private:
64 DocumentSignature() = delete;
66 private:
67 SfxObjectShell* m_pShell;
71 } // namespace basctl
74 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */