LibreOffice Module xmloff (master)  1
xformsapi.hxx
Go to the documentation of this file.
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::sun::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 css::uno::Reference<css::xforms::XModel2> xforms_createXFormsModel();
38 
40  const css::uno::Reference<css::frame::XModel>& xDocument,
41  const css::uno::Reference<css::xforms::XModel2>& xModel );
42 
43 css::uno::Reference<css::beans::XPropertySet> xforms_findXFormsBinding( css::uno::Reference<css::frame::XModel> const &, const OUString& );
44 
45 css::uno::Reference<css::beans::XPropertySet> xforms_findXFormsSubmission( css::uno::Reference<css::frame::XModel> const &, const OUString& );
46 
47 void xforms_setValue(
48  css::uno::Reference<css::beans::XPropertySet> const & xPropSet,
49  const OUString& rName,
50  const css::uno::Any& rAny );
51 
52 template<typename T>
54  css::uno::Reference<css::beans::XPropertySet>& xPropSet,
55  const OUString& rName,
56  T& aValue )
57 {
58  xforms_setValue( xPropSet, rName, css::uno::makeAny( aValue ) );
59 }
60 
61 sal_uInt16 xforms_getTypeClass(
62  const css::uno::Reference<css::xforms::XDataTypeRepository>& xRepository,
63  const SvXMLNamespaceMap& rNamespaceMap,
64  const OUString& rXMLName );
65 
66 OUString xforms_getTypeName(
67  const css::uno::Reference<css::xforms::XDataTypeRepository>& xRepository,
68  const SvXMLNamespaceMap& rNamespaceMap,
69  const OUString& rXMLName );
70 
72  const css::uno::Reference<css::xforms::XDataTypeRepository>& xRepository,
73  const SvXMLNamespaceMap& rNamespaceMap,
74  const OUString& rXMLName );
75 
76 #endif
77 
78 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
css::uno::Reference< css::beans::XPropertySet > xforms_findXFormsBinding(css::uno::Reference< css::frame::XModel > const &, const OUString &)
OUString xforms_getTypeName(const css::uno::Reference< css::xforms::XDataTypeRepository > &xRepository, const SvXMLNamespaceMap &rNamespaceMap, const OUString &rXMLName)
Reference
exports com.sun.star. frame
class SAL_NO_VTABLE XPropertySet
sal_uInt16 xforms_getTypeClass(const css::uno::Reference< css::xforms::XDataTypeRepository > &xRepository, const SvXMLNamespaceMap &rNamespaceMap, const OUString &rXMLName)
exports com.sun.star. beans
css::uno::Reference< css::beans::XPropertySet > xforms_findXFormsSubmission(css::uno::Reference< css::frame::XModel > const &, const OUString &)
void xforms_setValue(css::uno::Reference< css::beans::XPropertySet > const &xPropSet, const OUString &rName, const css::uno::Any &rAny)
void xforms_addXFormsModel(const css::uno::Reference< css::frame::XModel > &xDocument, const css::uno::Reference< css::xforms::XModel2 > &xModel)
OUString xforms_getBasicTypeName(const css::uno::Reference< css::xforms::XDataTypeRepository > &xRepository, const SvXMLNamespaceMap &rNamespaceMap, const OUString &rXMLName)
css::uno::Reference< css::xforms::XModel2 > xforms_createXFormsModel()
Definition: xformsapi.cxx:61