1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: xformsapi.hxx,v $
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 _XMLOFF_XFORMSAPI_HXX
31 #define _XMLOFF_XFORMSAPI_HXX
34 // this is a collection of several functions to make dealing with the XForms
35 // API a little easier
38 #include <com/sun/star/uno/Any.hxx>
40 namespace rtl
{ class OUString
; }
41 namespace com
{ namespace sun
{ namespace star
{
42 namespace beans
{ class XPropertySet
; }
43 namespace frame
{ class XModel
; }
44 namespace uno
{ template<class A
> class Reference
; }
45 namespace xforms
{ class XDataTypeRepository
; }
47 class SvXMLNamespaceMap
;
50 #define OUSTRING(msg) rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(msg))
52 com::sun::star::uno::Reference
<com::sun::star::beans::XPropertySet
> lcl_createXFormsModel();
54 com::sun::star::uno::Reference
<com::sun::star::beans::XPropertySet
> lcl_createXFormsBinding();
56 void lcl_addXFormsModel(
57 const com::sun::star::uno::Reference
<com::sun::star::frame::XModel
>& xDocument
,
58 const com::sun::star::uno::Reference
<com::sun::star::beans::XPropertySet
>& xModel
);
60 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
& );
62 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
& );
65 com::sun::star::uno::Reference
<com::sun::star::beans::XPropertySet
>& xPropSet
,
66 const rtl::OUString
& rName
,
67 const com::sun::star::uno::Any rAny
);
71 com::sun::star::uno::Reference
<com::sun::star::beans::XPropertySet
>& xPropSet
,
72 const rtl::OUString
& rName
,
75 lcl_setValue( xPropSet
, rName
, com::sun::star::uno::makeAny( aValue
) );
79 com::sun::star::uno::Reference
<com::sun::star::beans::XPropertySet
> lcl_getXFormsModel( const com::sun::star::uno::Reference
<com::sun::star::frame::XModel
>& );
81 sal_uInt16
lcl_getTypeClass(
82 const com::sun::star::uno::Reference
<com::sun::star::xforms::XDataTypeRepository
>& xRepository
,
83 const SvXMLNamespaceMap
& rNamespaceMap
,
84 const rtl::OUString
& rXMLName
);
86 rtl::OUString
lcl_getTypeName(
87 const com::sun::star::uno::Reference
<com::sun::star::xforms::XDataTypeRepository
>& xRepository
,
88 const SvXMLNamespaceMap
& rNamespaceMap
,
89 const rtl::OUString
& rXMLName
);
91 rtl::OUString
lcl_getBasicTypeName(
92 const com::sun::star::uno::Reference
<com::sun::star::xforms::XDataTypeRepository
>& xRepository
,
93 const SvXMLNamespaceMap
& rNamespaceMap
,
94 const rtl::OUString
& rXMLName
);