merge the formfield patch from ooo-build
[ooovba.git] / basctl / source / inc / docsignature.hxx
blob299513fce853297d7ea8f580e9dd64ccc1941a0a
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: docsignature.hxx,v $
10 * $Revision: 1.3 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
30 #ifndef BASCTL_DOCSIGNATURE_HXX
31 #define BASCTL_DOCSIGNATURE_HXX
33 /** === begin UNO includes === **/
34 #include <com/sun/star/frame/XModel.hpp>
35 /** === end UNO includes === **/
37 #include <memory>
39 //........................................................................
40 namespace basctl
42 //........................................................................
44 class ScriptDocument;
45 //====================================================================
46 //= DocumentSignature
47 //====================================================================
48 struct DocumentSignature_Data;
49 /// encapsulates (actions on) the signature/state of a document
50 class DocumentSignature
52 public:
53 /** creates a DocumentSignature instance for the given document
55 If the given ScriptDocument instance refers to the application, or to a document
56 which does not support being signed, the DocumentSignature instance is invalid afterwards.
58 DocumentSignature( const ScriptDocument& _rDocument );
59 ~DocumentSignature();
61 /** determines whether the instance is valid
63 An instance is valid if and only if it has been constructed with a document
64 which supports signatures.
66 bool supportsSignatures() const;
68 /** signs the scripting content inside the document
70 @precond
71 isValid returns <TRUE/>
73 void signScriptingContent() const;
75 /** retrieves the state of the signature of the scripting content inside the document
77 If the instance is not valid, then SIGNATURESTATE_NOSIGNATURES is returned.
79 sal_uInt16 getScriptingSignatureState() const;
81 private:
82 DocumentSignature(); // not implemented
84 private:
85 ::std::auto_ptr< DocumentSignature_Data > m_pData;
88 //........................................................................
89 } // namespace basctl
90 //........................................................................
92 #endif // BASCTL_DOCSIGNATURE_HXX