1*24acc546SAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
3*24acc546SAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4*24acc546SAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5*24acc546SAndrew Rist  * distributed with this work for additional information
6*24acc546SAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7*24acc546SAndrew Rist  * to you under the Apache License, Version 2.0 (the
8*24acc546SAndrew Rist  * "License"); you may not use this file except in compliance
9*24acc546SAndrew Rist  * with the License.  You may obtain a copy of the License at
10*24acc546SAndrew Rist  *
11*24acc546SAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12*24acc546SAndrew Rist  *
13*24acc546SAndrew Rist  * Unless required by applicable law or agreed to in writing,
14*24acc546SAndrew Rist  * software distributed under the License is distributed on an
15*24acc546SAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*24acc546SAndrew Rist  * KIND, either express or implied.  See the License for the
17*24acc546SAndrew Rist  * specific language governing permissions and limitations
18*24acc546SAndrew Rist  * under the License.
19*24acc546SAndrew Rist  *
20*24acc546SAndrew Rist  *************************************************************/
21*24acc546SAndrew Rist 
22*24acc546SAndrew Rist 
23cdf0e10cSrcweir 
24cdf0e10cSrcweir 
25cdf0e10cSrcweir // MARKER(update_precomp.py): autogen include statement, do not remove
26cdf0e10cSrcweir #include "precompiled_forms.hxx"
27cdf0e10cSrcweir 
28cdf0e10cSrcweir 
29cdf0e10cSrcweir #include "services.hxx"
30cdf0e10cSrcweir 
31cdf0e10cSrcweir #include "binding.hxx"
32cdf0e10cSrcweir #include "model.hxx"
33cdf0e10cSrcweir #include "NameContainer.hxx"
34cdf0e10cSrcweir 
35cdf0e10cSrcweir #include <com/sun/star/uno/Reference.hxx>
36cdf0e10cSrcweir #include <com/sun/star/uno/XInterface.hpp>
37cdf0e10cSrcweir #include <com/sun/star/lang/XMultiServiceFactory.hpp>
38cdf0e10cSrcweir #include <com/sun/star/uno/RuntimeException.hpp>
39cdf0e10cSrcweir #include <com/sun/star/container/XNameContainer.hpp>
40cdf0e10cSrcweir 
41cdf0e10cSrcweir using com::sun::star::uno::Reference;
42cdf0e10cSrcweir using com::sun::star::uno::XInterface;
43cdf0e10cSrcweir using com::sun::star::lang::XMultiServiceFactory;
44cdf0e10cSrcweir using com::sun::star::uno::RuntimeException;
45cdf0e10cSrcweir using com::sun::star::form::binding::XValueBinding;
46cdf0e10cSrcweir using com::sun::star::beans::XPropertySet;
47cdf0e10cSrcweir using com::sun::star::container::XNameContainer;
48cdf0e10cSrcweir using rtl::OUString;
49cdf0e10cSrcweir 
50cdf0e10cSrcweir 
51cdf0e10cSrcweir namespace frm
52cdf0e10cSrcweir {
53cdf0e10cSrcweir 
Model_CreateInstance(const Reference<XMultiServiceFactory> &)54cdf0e10cSrcweir Reference<XInterface> Model_CreateInstance(
55cdf0e10cSrcweir     const Reference<XMultiServiceFactory>& )
56cdf0e10cSrcweir     throw( RuntimeException )
57cdf0e10cSrcweir {
58cdf0e10cSrcweir     return static_cast<XPropertySet*>( new xforms::Model );
59cdf0e10cSrcweir }
60cdf0e10cSrcweir 
XForms_CreateInstance(const Reference<XMultiServiceFactory> &)61cdf0e10cSrcweir Reference<XInterface> XForms_CreateInstance(
62cdf0e10cSrcweir     const Reference<XMultiServiceFactory>& )
63cdf0e10cSrcweir     throw( RuntimeException )
64cdf0e10cSrcweir {
65cdf0e10cSrcweir     return static_cast<XNameContainer*>( new NameContainer<Reference<XPropertySet> >() );
66cdf0e10cSrcweir }
67cdf0e10cSrcweir 
68cdf0e10cSrcweir }
69