Line data Source code
1 : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : /*
3 : * This file is part of the LibreOffice project.
4 : *
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/.
8 : *
9 : * This file incorporates work covered by the following license notice:
10 : *
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 .
18 : */
19 : #ifndef INCLUDED_XMLOFF_SOURCE_XFORMS_XFORMSAPI_HXX
20 : #define INCLUDED_XMLOFF_SOURCE_XFORMS_XFORMSAPI_HXX
21 :
22 :
23 : // this is a collection of several functions to make dealing with the XForms
24 : // API a little easier
25 :
26 :
27 : #include <com/sun/star/uno/Any.hxx>
28 :
29 : namespace com { namespace sun { namespace star {
30 : namespace beans { class XPropertySet; }
31 : namespace frame { class XModel; }
32 : namespace uno { template<class A> class Reference; }
33 : namespace xforms { class XDataTypeRepository; class XModel2; }
34 : } } }
35 : class SvXMLNamespaceMap;
36 :
37 : com::sun::star::uno::Reference<com::sun::star::xforms::XModel2> xforms_createXFormsModel();
38 :
39 : void xforms_addXFormsModel(
40 : const com::sun::star::uno::Reference<com::sun::star::frame::XModel>& xDocument,
41 : const com::sun::star::uno::Reference<com::sun::star::xforms::XModel2>& xModel );
42 :
43 : com::sun::star::uno::Reference<com::sun::star::beans::XPropertySet> xforms_findXFormsBinding( com::sun::star::uno::Reference<com::sun::star::frame::XModel>&, const OUString& );
44 :
45 : com::sun::star::uno::Reference<com::sun::star::beans::XPropertySet> xforms_findXFormsSubmission( com::sun::star::uno::Reference<com::sun::star::frame::XModel>&, const OUString& );
46 :
47 : void xforms_setValue(
48 : com::sun::star::uno::Reference<com::sun::star::beans::XPropertySet>& xPropSet,
49 : const OUString& rName,
50 : const com::sun::star::uno::Any rAny );
51 :
52 : template<typename T>
53 0 : void xforms_setValue(
54 : com::sun::star::uno::Reference<com::sun::star::beans::XPropertySet>& xPropSet,
55 : const OUString& rName,
56 : T& aValue )
57 : {
58 0 : xforms_setValue( xPropSet, rName, com::sun::star::uno::makeAny( aValue ) );
59 0 : }
60 :
61 : sal_uInt16 xforms_getTypeClass(
62 : const com::sun::star::uno::Reference<com::sun::star::xforms::XDataTypeRepository>& xRepository,
63 : const SvXMLNamespaceMap& rNamespaceMap,
64 : const OUString& rXMLName );
65 :
66 : OUString xforms_getTypeName(
67 : const com::sun::star::uno::Reference<com::sun::star::xforms::XDataTypeRepository>& xRepository,
68 : const SvXMLNamespaceMap& rNamespaceMap,
69 : const OUString& rXMLName );
70 :
71 : OUString xforms_getBasicTypeName(
72 : const com::sun::star::uno::Reference<com::sun::star::xforms::XDataTypeRepository>& xRepository,
73 : const SvXMLNamespaceMap& rNamespaceMap,
74 : const OUString& rXMLName );
75 :
76 : #endif
77 :
78 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|