Branch data Line data Source code
1 : : #ifndef INCLUDED_COM_SUN_STAR_UTIL_XNUMBERFORMATSSUPPLIER_HPP
2 : : #define INCLUDED_COM_SUN_STAR_UTIL_XNUMBERFORMATSSUPPLIER_HPP
3 : :
4 : : #include "sal/config.h"
5 : :
6 : : #include "com/sun/star/util/XNumberFormatsSupplier.hdl"
7 : :
8 : : #include "com/sun/star/beans/XPropertySet.hpp"
9 : : #include "com/sun/star/util/XNumberFormats.hpp"
10 : : #include "com/sun/star/uno/XInterface.hpp"
11 : : #include "com/sun/star/uno/RuntimeException.hpp"
12 : : #include "com/sun/star/uno/Reference.hxx"
13 : : #include "com/sun/star/uno/Type.hxx"
14 : : #include "cppu/unotype.hxx"
15 : : #include "osl/mutex.hxx"
16 : : #include "rtl/instance.hxx"
17 : :
18 : : namespace com { namespace sun { namespace star { namespace util { namespace detail {
19 : :
20 : : struct theXNumberFormatsSupplierType : public rtl::StaticWithInit< ::com::sun::star::uno::Type *, theXNumberFormatsSupplierType >
21 : : {
22 : 17 : ::com::sun::star::uno::Type * operator()() const
23 : : {
24 [ + - ]: 17 : ::rtl::OUString sTypeName( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.util.XNumberFormatsSupplier") );
25 : :
26 : : // Start inline typedescription generation
27 : 17 : typelib_InterfaceTypeDescription * pTD = 0;
28 : :
29 : : typelib_TypeDescriptionReference * aSuperTypes[1];
30 [ + - ]: 17 : aSuperTypes[0] = ::cppu::UnoType< ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > >::get().getTypeLibType();
31 : 17 : typelib_TypeDescriptionReference * pMembers[2] = { 0,0 };
32 [ + - ]: 17 : ::rtl::OUString sMethodName0( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.util.XNumberFormatsSupplier::getNumberFormatSettings") );
33 : : typelib_typedescriptionreference_new( &pMembers[0],
34 : : (typelib_TypeClass)::com::sun::star::uno::TypeClass_INTERFACE_METHOD,
35 : 17 : sMethodName0.pData );
36 [ + - ]: 17 : ::rtl::OUString sMethodName1( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.util.XNumberFormatsSupplier::getNumberFormats") );
37 : : typelib_typedescriptionreference_new( &pMembers[1],
38 : : (typelib_TypeClass)::com::sun::star::uno::TypeClass_INTERFACE_METHOD,
39 : 17 : sMethodName1.pData );
40 : :
41 : : typelib_typedescription_newMIInterface(
42 : : &pTD,
43 : : sTypeName.pData, 0x00000000, 0x0000, 0x0000, 0x00000000, 0x00000000,
44 : : 1, aSuperTypes,
45 : : 2,
46 : 17 : pMembers );
47 : :
48 : 17 : typelib_typedescription_register( (typelib_TypeDescription**)&pTD );
49 : 17 : typelib_typedescriptionreference_release( pMembers[0] );
50 : 17 : typelib_typedescriptionreference_release( pMembers[1] );
51 : 17 : typelib_typedescription_release( (typelib_TypeDescription*)pTD );
52 : :
53 : 17 : return new ::com::sun::star::uno::Type( ::com::sun::star::uno::TypeClass_INTERFACE, sTypeName ); // leaked
54 : : }
55 : : };
56 : :
57 : : } } } } }
58 : :
59 : : namespace com { namespace sun { namespace star { namespace util {
60 : :
61 : 17 : inline ::com::sun::star::uno::Type const & cppu_detail_getUnoType(SAL_UNUSED_PARAMETER ::com::sun::star::util::XNumberFormatsSupplier const *) {
62 : 17 : const ::com::sun::star::uno::Type &rRet = *detail::theXNumberFormatsSupplierType::get();
63 : : // End inline typedescription generation
64 : : static bool bInitStarted = false;
65 [ + - ]: 17 : if (!bInitStarted)
66 : : {
67 [ + - ][ + - ]: 17 : ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
68 [ + - ]: 17 : if (!bInitStarted)
69 : : {
70 : : OSL_DOUBLE_CHECKED_LOCKING_MEMORY_BARRIER();
71 : 17 : bInitStarted = true;
72 [ + - ]: 17 : ::cppu::UnoType< ::com::sun::star::uno::RuntimeException >::get();
73 [ + - ]: 17 : ::cppu::UnoType< ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > >::get();
74 [ + - ]: 17 : ::cppu::UnoType< ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormats > >::get();
75 : :
76 : 17 : typelib_InterfaceMethodTypeDescription * pMethod = 0;
77 : : {
78 [ + - ]: 17 : ::rtl::OUString the_ExceptionName0(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.uno.RuntimeException"));
79 : 17 : rtl_uString * the_Exceptions[] = { the_ExceptionName0.pData };
80 [ + - ]: 17 : ::rtl::OUString sReturnType0( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.beans.XPropertySet") );
81 [ + - ]: 17 : ::rtl::OUString sMethodName0( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.util.XNumberFormatsSupplier::getNumberFormatSettings") );
82 : : typelib_typedescription_newInterfaceMethod( &pMethod,
83 : : 3, sal_False,
84 : : sMethodName0.pData,
85 : : (typelib_TypeClass)::com::sun::star::uno::TypeClass_INTERFACE, sReturnType0.pData,
86 : : 0, 0,
87 : 17 : 1, the_Exceptions );
88 : 17 : typelib_typedescription_register( (typelib_TypeDescription**)&pMethod );
89 : : }
90 : : {
91 [ + - ]: 17 : ::rtl::OUString the_ExceptionName0(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.uno.RuntimeException"));
92 : 17 : rtl_uString * the_Exceptions[] = { the_ExceptionName0.pData };
93 [ + - ]: 17 : ::rtl::OUString sReturnType1( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.util.XNumberFormats") );
94 [ + - ]: 17 : ::rtl::OUString sMethodName1( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.util.XNumberFormatsSupplier::getNumberFormats") );
95 : : typelib_typedescription_newInterfaceMethod( &pMethod,
96 : : 4, sal_False,
97 : : sMethodName1.pData,
98 : : (typelib_TypeClass)::com::sun::star::uno::TypeClass_INTERFACE, sReturnType1.pData,
99 : : 0, 0,
100 : 17 : 1, the_Exceptions );
101 : 17 : typelib_typedescription_register( (typelib_TypeDescription**)&pMethod );
102 : : }
103 : 17 : typelib_typedescription_release( (typelib_TypeDescription*)pMethod );
104 [ + - ]: 17 : }
105 : : }
106 : : else
107 : : {
108 : : OSL_DOUBLE_CHECKED_LOCKING_MEMORY_BARRIER();
109 : : }
110 : 17 : return rRet;
111 : : }
112 : :
113 : : } } } }
114 : :
115 : 0 : inline ::com::sun::star::uno::Type const & SAL_CALL getCppuType(SAL_UNUSED_PARAMETER ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatsSupplier > const *) SAL_THROW(()) {
116 : 0 : return ::cppu::UnoType< ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatsSupplier > >::get();
117 : : }
118 : :
119 : 0 : ::com::sun::star::uno::Type const & ::com::sun::star::util::XNumberFormatsSupplier::static_type(SAL_UNUSED_PARAMETER void *) {
120 : 0 : return ::getCppuType(static_cast< ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatsSupplier > * >(0));
121 : : }
122 : :
123 : : #endif // INCLUDED_COM_SUN_STAR_UTIL_XNUMBERFORMATSSUPPLIER_HPP
|