Branch data Line data Source code
1 : : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : : /*************************************************************************
3 : : *
4 : : * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 : : *
6 : : * Copyright 2000, 2010 Oracle and/or its affiliates.
7 : : *
8 : : * OpenOffice.org - a multi-platform office productivity suite
9 : : *
10 : : * This file is part of OpenOffice.org.
11 : : *
12 : : * OpenOffice.org is free software: you can redistribute it and/or modify
13 : : * it under the terms of the GNU Lesser General Public License version 3
14 : : * only, as published by the Free Software Foundation.
15 : : *
16 : : * OpenOffice.org is distributed in the hope that it will be useful,
17 : : * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 : : * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 : : * GNU Lesser General Public License version 3 for more details
20 : : * (a copy is included in the LICENSE file that accompanied this code).
21 : : *
22 : : * You should have received a copy of the GNU Lesser General Public License
23 : : * version 3 along with OpenOffice.org. If not, see
24 : : * <http://www.openoffice.org/license.html>
25 : : * for a copy of the LGPLv3 License.
26 : : *
27 : : ************************************************************************/
28 : : #ifndef _XMLOFF_XFORMSAPI_HXX
29 : : #define _XMLOFF_XFORMSAPI_HXX
30 : :
31 : : //
32 : : // this is a collection of several functions to make dealing with the XForms
33 : : // API a little easier
34 : : //
35 : :
36 : : #include <com/sun/star/uno/Any.hxx>
37 : :
38 : : namespace rtl { class OUString; }
39 : : namespace com { namespace sun { namespace star {
40 : : namespace beans { class XPropertySet; }
41 : : namespace frame { class XModel; }
42 : : namespace uno { template<class A> class Reference; }
43 : : namespace xforms { class XDataTypeRepository; }
44 : : } } }
45 : : class SvXMLNamespaceMap;
46 : :
47 : :
48 : : #define OUSTRING(msg) rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(msg))
49 : :
50 : : com::sun::star::uno::Reference<com::sun::star::beans::XPropertySet> lcl_createXFormsModel();
51 : :
52 : : void lcl_addXFormsModel(
53 : : const com::sun::star::uno::Reference<com::sun::star::frame::XModel>& xDocument,
54 : : const com::sun::star::uno::Reference<com::sun::star::beans::XPropertySet>& xModel );
55 : :
56 : : com::sun::star::uno::Reference<com::sun::star::beans::XPropertySet> lcl_findXFormsBinding( com::sun::star::uno::Reference<com::sun::star::frame::XModel>&, const rtl::OUString& );
57 : :
58 : : com::sun::star::uno::Reference<com::sun::star::beans::XPropertySet> lcl_findXFormsSubmission( com::sun::star::uno::Reference<com::sun::star::frame::XModel>&, const rtl::OUString& );
59 : :
60 : : void lcl_setValue(
61 : : com::sun::star::uno::Reference<com::sun::star::beans::XPropertySet>& xPropSet,
62 : : const rtl::OUString& rName,
63 : : const com::sun::star::uno::Any rAny );
64 : :
65 : : template<typename T>
66 : 0 : void lcl_setValue(
67 : : com::sun::star::uno::Reference<com::sun::star::beans::XPropertySet>& xPropSet,
68 : : const rtl::OUString& rName,
69 : : T& aValue )
70 : : {
71 [ # # ]: 0 : lcl_setValue( xPropSet, rName, com::sun::star::uno::makeAny( aValue ) );
72 : 0 : }
73 : :
74 : : sal_uInt16 lcl_getTypeClass(
75 : : const com::sun::star::uno::Reference<com::sun::star::xforms::XDataTypeRepository>& xRepository,
76 : : const SvXMLNamespaceMap& rNamespaceMap,
77 : : const rtl::OUString& rXMLName );
78 : :
79 : : rtl::OUString lcl_getTypeName(
80 : : const com::sun::star::uno::Reference<com::sun::star::xforms::XDataTypeRepository>& xRepository,
81 : : const SvXMLNamespaceMap& rNamespaceMap,
82 : : const rtl::OUString& rXMLName );
83 : :
84 : : rtl::OUString lcl_getBasicTypeName(
85 : : const com::sun::star::uno::Reference<com::sun::star::xforms::XDataTypeRepository>& xRepository,
86 : : const SvXMLNamespaceMap& rNamespaceMap,
87 : : const rtl::OUString& rXMLName );
88 : :
89 : : #endif
90 : :
91 : : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|