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 #ifndef DATATYPES_INCLUDED_BY_MASTER_HEADER
25 #error "not to be included directly!"
26 #endif
27
28 //--------------------------------------------------------------------
29 template< typename CONCRETE_DATA_TYPE_IMPL, typename SUPERCLASS >
ODerivedDataType(const::rtl::OUString & _rName,sal_Int16 _nTypeClass)30 ODerivedDataType< CONCRETE_DATA_TYPE_IMPL, SUPERCLASS >::ODerivedDataType( const ::rtl::OUString& _rName, sal_Int16 _nTypeClass )
31 :SUPERCLASS( _rName, _nTypeClass )
32 ,m_bPropertiesRegistered( false )
33 {
34 }
35
36 //--------------------------------------------------------------------
37 template< typename CONCRETE_DATA_TYPE_IMPL, typename SUPERCLASS >
createArrayHelper() const38 ::cppu::IPropertyArrayHelper* ODerivedDataType< CONCRETE_DATA_TYPE_IMPL, SUPERCLASS >::createArrayHelper( ) const
39 {
40 ::com::sun::star::uno::Sequence< ::com::sun::star::beans::Property > aProps;
41 ODerivedDataType< CONCRETE_DATA_TYPE_IMPL, SUPERCLASS >::describeProperties( aProps );
42 return new ::cppu::OPropertyArrayHelper( aProps );
43 }
44
45 //--------------------------------------------------------------------
46 template< typename CONCRETE_DATA_TYPE_IMPL, typename SUPERCLASS >
getPropertySetInfo()47 ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL ODerivedDataType< CONCRETE_DATA_TYPE_IMPL, SUPERCLASS >::getPropertySetInfo() throw( ::com::sun::star::uno::RuntimeException )
48 {
49 return ::cppu::OPropertySetHelper::createPropertySetInfo( getInfoHelper() );
50 }
51
52 //--------------------------------------------------------------------
53 template< typename CONCRETE_DATA_TYPE_IMPL, typename SUPERCLASS >
getInfoHelper()54 ::cppu::IPropertyArrayHelper& SAL_CALL ODerivedDataType< CONCRETE_DATA_TYPE_IMPL, SUPERCLASS >::getInfoHelper()
55 {
56 if ( !m_bPropertiesRegistered )
57 {
58 const_cast< ODerivedDataType* >( this )->registerProperties();
59 const_cast< ODerivedDataType* >( this )->m_bPropertiesRegistered = true;
60 }
61
62 return *ODerivedDataType< CONCRETE_DATA_TYPE_IMPL, SUPERCLASS >::getArrayHelper();
63 }
64
65
66 //--------------------------------------------------------------------
67 template< typename VALUE_TYPE >
OValueLimitedType(const::rtl::OUString & _rName,sal_Int16 _nTypeClass)68 OValueLimitedType< VALUE_TYPE >::OValueLimitedType( const ::rtl::OUString& _rName, sal_Int16 _nTypeClass )
69 :OValueLimitedType_Base( _rName, _nTypeClass )
70 {
71 }
72
73