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 .
19 #ifndef BASCTL_DOCSIGNATURE_HXX
20 #define BASCTL_DOCSIGNATURE_HXX
22 #include <com/sun/star/frame/XModel.hpp>
24 #include <boost/scoped_ptr.hpp>
26 //........................................................................
29 //........................................................................
32 //====================================================================
34 //====================================================================
35 /// encapsulates (actions on) the signature/state of a document
36 class DocumentSignature
39 /** creates a DocumentSignature instance for the given document
41 If the given ScriptDocument instance refers to the application, or to a document
42 which does not support being signed, the DocumentSignature instance is invalid afterwards.
44 explicit DocumentSignature (ScriptDocument
const&);
47 /** determines whether the instance is valid
49 An instance is valid if and only if it has been constructed with a document
50 which supports signatures.
52 bool supportsSignatures() const;
54 /** signs the scripting content inside the document
57 isValid returns <TRUE/>
59 void signScriptingContent() const;
61 /** retrieves the state of the signature of the scripting content inside the document
63 If the instance is not valid, then SIGNATURESTATE_NOSIGNATURES is returned.
65 sal_uInt16
getScriptingSignatureState() const;
68 DocumentSignature(); // not implemented
72 boost::scoped_ptr
<Impl
> m_pImpl
;
75 //........................................................................
77 //........................................................................
79 #endif // BASCTL_DOCSIGNATURE_HXX
81 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */