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#pragma once
20
21
22// this is a collection of several functions to make dealing with the XForms
23// API a little easier
24
25
26#include <com/sun/star/uno/Any.hxx>
27
28namespace com::sun::star {
29 namespace beans { class XPropertySet; }
30 namespace frame { class XModel; }
31 namespace uno { template<class A> class Reference; }
32 namespace xforms { class XDataTypeRepository; class XModel2; }
33}
35
36css::uno::Reference<css::xforms::XModel2> xforms_createXFormsModel();
37
39 const css::uno::Reference<css::frame::XModel>& xDocument,
40 const css::uno::Reference<css::xforms::XModel2>& xModel );
41
42css::uno::Reference<css::beans::XPropertySet> xforms_findXFormsBinding( css::uno::Reference<css::frame::XModel> const &, const OUString& );
43
44css::uno::Reference<css::beans::XPropertySet> xforms_findXFormsSubmission( css::uno::Reference<css::frame::XModel> const &, const OUString& );
45
47 css::uno::Reference<css::beans::XPropertySet> const & xPropSet,
48 const OUString& rName,
49 const css::uno::Any& rAny );
50
51template<typename T>
52inline void xforms_setValue(
53 const css::uno::Reference<css::beans::XPropertySet>& xPropSet,
54 const OUString& rName,
55 const T& aValue )
56{
57 xforms_setValueAny( xPropSet, rName, css::uno::Any( aValue ) );
58}
59template<>
60inline void xforms_setValue(
61 const css::uno::Reference<css::beans::XPropertySet>& xPropSet,
62 const OUString& rName,
63 const css::uno::Any& aValue )
64{
65 xforms_setValueAny( xPropSet, rName, aValue );
66}
67
69 const css::uno::Reference<css::xforms::XDataTypeRepository>& xRepository,
70 const SvXMLNamespaceMap& rNamespaceMap,
71 const OUString& rXMLName );
72
74 const css::uno::Reference<css::xforms::XDataTypeRepository>& xRepository,
75 const SvXMLNamespaceMap& rNamespaceMap,
76 const OUString& rXMLName );
77
79 const css::uno::Reference<css::xforms::XDataTypeRepository>& xRepository,
80 const SvXMLNamespaceMap& rNamespaceMap,
81 const OUString& rXMLName );
82
83/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
class SAL_NO_VTABLE XPropertySet
Reference
void xforms_setValue(const css::uno::Reference< css::beans::XPropertySet > &xPropSet, const OUString &rName, const T &aValue)
Definition: xformsapi.hxx:52
void xforms_addXFormsModel(const css::uno::Reference< css::frame::XModel > &xDocument, const css::uno::Reference< css::xforms::XModel2 > &xModel)
css::uno::Reference< css::beans::XPropertySet > xforms_findXFormsBinding(css::uno::Reference< css::frame::XModel > const &, const OUString &)
OUString xforms_getBasicTypeName(const css::uno::Reference< css::xforms::XDataTypeRepository > &xRepository, const SvXMLNamespaceMap &rNamespaceMap, const OUString &rXMLName)
OUString xforms_getTypeName(const css::uno::Reference< css::xforms::XDataTypeRepository > &xRepository, const SvXMLNamespaceMap &rNamespaceMap, const OUString &rXMLName)
void xforms_setValueAny(css::uno::Reference< css::beans::XPropertySet > const &xPropSet, const OUString &rName, const css::uno::Any &rAny)
css::uno::Reference< css::xforms::XModel2 > xforms_createXFormsModel()
Definition: xformsapi.cxx:60
css::uno::Reference< css::beans::XPropertySet > xforms_findXFormsSubmission(css::uno::Reference< css::frame::XModel > const &, const OUString &)
sal_uInt16 xforms_getTypeClass(const css::uno::Reference< css::xforms::XDataTypeRepository > &xRepository, const SvXMLNamespaceMap &rNamespaceMap, const OUString &rXMLName)