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