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 // no include protection. This is included from within geometrycontrolmodel.hxx only 25 26 //==================================================================== 27 //= OGeometryControlModel 28 //==================================================================== 29 //-------------------------------------------------------------------- 30 template <class CONTROLMODEL> OGeometryControlModel(const::com::sun::star::uno::Reference<::com::sun::star::lang::XMultiServiceFactory> & i_factory)31OGeometryControlModel<CONTROLMODEL>::OGeometryControlModel( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory ) 32 :OGeometryControlModel_Base(new CONTROLMODEL( i_factory ) ) 33 { 34 } 35 36 //template <class CONTROLMODEL> 37 //OGeometryControlModel<CONTROLMODEL>::OGeometryControlModel(::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > const & i_xCompContext) 38 // :OGeometryControlModel_Base(new CONTROLMODEL(i_xCompContext)) 39 //{ 40 //} 41 // 42 //-------------------------------------------------------------------- 43 template <class CONTROLMODEL> OGeometryControlModel(::com::sun::star::uno::Reference<::com::sun::star::util::XCloneable> & _rxAggregateInstance)44OGeometryControlModel<CONTROLMODEL>::OGeometryControlModel(::com::sun::star::uno::Reference< ::com::sun::star::util::XCloneable >& _rxAggregateInstance) 45 :OGeometryControlModel_Base(_rxAggregateInstance) 46 { 47 } 48 49 //-------------------------------------------------------------------- 50 template <class CONTROLMODEL> getInfoHelper()51::cppu::IPropertyArrayHelper& SAL_CALL OGeometryControlModel<CONTROLMODEL>::getInfoHelper() 52 { 53 return *this->getArrayHelper(); 54 } 55 56 //-------------------------------------------------------------------- 57 template <class CONTROLMODEL> fillProperties(::com::sun::star::uno::Sequence<::com::sun::star::beans::Property> & _rProps,::com::sun::star::uno::Sequence<::com::sun::star::beans::Property> & _rAggregateProps) const58void OGeometryControlModel<CONTROLMODEL>::fillProperties(::com::sun::star::uno::Sequence< ::com::sun::star::beans::Property >& _rProps, ::com::sun::star::uno::Sequence< ::com::sun::star::beans::Property >& _rAggregateProps) const 59 { 60 // our own properties 61 OPropertyContainer::describeProperties(_rProps); 62 // the aggregate properties 63 if (m_xAggregateSet.is()) 64 _rAggregateProps = m_xAggregateSet->getPropertySetInfo()->getProperties(); 65 } 66 67 //-------------------------------------------------------------------- 68 template <class CONTROLMODEL> getImplementationId()69::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL OGeometryControlModel<CONTROLMODEL>::getImplementationId( ) throw (::com::sun::star::uno::RuntimeException) 70 { 71 static ::cppu::OImplementationId * pId = NULL; 72 if ( !pId ) 73 { 74 ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() ); 75 if ( !pId ) 76 { 77 static ::cppu::OImplementationId s_aId; 78 pId = &s_aId; 79 } 80 } 81 return pId->getImplementationId(); 82 } 83 84 //-------------------------------------------------------------------- 85 template <class CONTROLMODEL> createClone_Impl(::com::sun::star::uno::Reference<::com::sun::star::util::XCloneable> & _rxAggregateInstance)86OGeometryControlModel_Base* OGeometryControlModel<CONTROLMODEL>::createClone_Impl( 87 ::com::sun::star::uno::Reference< ::com::sun::star::util::XCloneable >& _rxAggregateInstance) 88 { 89 return new OGeometryControlModel<CONTROLMODEL>(_rxAggregateInstance); 90 } 91 92 93