Line data Source code
1 : #ifndef INCLUDED_COM_SUN_STAR_SHEET_XADDIN_HPP
2 : #define INCLUDED_COM_SUN_STAR_SHEET_XADDIN_HPP
3 :
4 : #include "sal/config.h"
5 :
6 : #include "com/sun/star/sheet/XAddIn.hdl"
7 :
8 : #include "com/sun/star/lang/XLocalizable.hpp"
9 : #include "com/sun/star/uno/RuntimeException.hpp"
10 : #include "com/sun/star/uno/Reference.hxx"
11 : #include "com/sun/star/uno/Type.hxx"
12 : #include "cppu/unotype.hxx"
13 : #include "osl/mutex.hxx"
14 : #include "rtl/ustring.hxx"
15 : #include "rtl/instance.hxx"
16 : #include "sal/types.h"
17 :
18 : namespace com { namespace sun { namespace star { namespace sheet { namespace detail {
19 :
20 : struct theXAddInType : public rtl::StaticWithInit< ::com::sun::star::uno::Type *, theXAddInType >
21 : {
22 22 : ::com::sun::star::uno::Type * operator()() const
23 : {
24 22 : ::rtl::OUString sTypeName( "com.sun.star.sheet.XAddIn" );
25 :
26 : // Start inline typedescription generation
27 22 : typelib_InterfaceTypeDescription * pTD = 0;
28 :
29 : typelib_TypeDescriptionReference * aSuperTypes[1];
30 22 : aSuperTypes[0] = ::cppu::UnoType< ::com::sun::star::uno::Reference< css::lang::XLocalizable > >::get().getTypeLibType();
31 22 : typelib_TypeDescriptionReference * pMembers[7] = { 0,0,0,0,0,0,0 };
32 44 : ::rtl::OUString sMethodName0( "com.sun.star.sheet.XAddIn::getProgrammaticFuntionName" );
33 : typelib_typedescriptionreference_new( &pMembers[0],
34 : (typelib_TypeClass)::com::sun::star::uno::TypeClass_INTERFACE_METHOD,
35 22 : sMethodName0.pData );
36 44 : ::rtl::OUString sMethodName1( "com.sun.star.sheet.XAddIn::getDisplayFunctionName" );
37 : typelib_typedescriptionreference_new( &pMembers[1],
38 : (typelib_TypeClass)::com::sun::star::uno::TypeClass_INTERFACE_METHOD,
39 22 : sMethodName1.pData );
40 44 : ::rtl::OUString sMethodName2( "com.sun.star.sheet.XAddIn::getFunctionDescription" );
41 : typelib_typedescriptionreference_new( &pMembers[2],
42 : (typelib_TypeClass)::com::sun::star::uno::TypeClass_INTERFACE_METHOD,
43 22 : sMethodName2.pData );
44 44 : ::rtl::OUString sMethodName3( "com.sun.star.sheet.XAddIn::getDisplayArgumentName" );
45 : typelib_typedescriptionreference_new( &pMembers[3],
46 : (typelib_TypeClass)::com::sun::star::uno::TypeClass_INTERFACE_METHOD,
47 22 : sMethodName3.pData );
48 44 : ::rtl::OUString sMethodName4( "com.sun.star.sheet.XAddIn::getArgumentDescription" );
49 : typelib_typedescriptionreference_new( &pMembers[4],
50 : (typelib_TypeClass)::com::sun::star::uno::TypeClass_INTERFACE_METHOD,
51 22 : sMethodName4.pData );
52 44 : ::rtl::OUString sMethodName5( "com.sun.star.sheet.XAddIn::getProgrammaticCategoryName" );
53 : typelib_typedescriptionreference_new( &pMembers[5],
54 : (typelib_TypeClass)::com::sun::star::uno::TypeClass_INTERFACE_METHOD,
55 22 : sMethodName5.pData );
56 44 : ::rtl::OUString sMethodName6( "com.sun.star.sheet.XAddIn::getDisplayCategoryName" );
57 : typelib_typedescriptionreference_new( &pMembers[6],
58 : (typelib_TypeClass)::com::sun::star::uno::TypeClass_INTERFACE_METHOD,
59 22 : sMethodName6.pData );
60 :
61 : typelib_typedescription_newMIInterface(
62 : &pTD,
63 : sTypeName.pData, 0x00000000, 0x0000, 0x0000, 0x00000000, 0x00000000,
64 : 1, aSuperTypes,
65 : 7,
66 22 : pMembers );
67 :
68 22 : typelib_typedescription_register( (typelib_TypeDescription**)&pTD );
69 22 : typelib_typedescriptionreference_release( pMembers[0] );
70 22 : typelib_typedescriptionreference_release( pMembers[1] );
71 22 : typelib_typedescriptionreference_release( pMembers[2] );
72 22 : typelib_typedescriptionreference_release( pMembers[3] );
73 22 : typelib_typedescriptionreference_release( pMembers[4] );
74 22 : typelib_typedescriptionreference_release( pMembers[5] );
75 22 : typelib_typedescriptionreference_release( pMembers[6] );
76 22 : typelib_typedescription_release( (typelib_TypeDescription*)pTD );
77 :
78 44 : return new ::com::sun::star::uno::Type( ::com::sun::star::uno::TypeClass_INTERFACE, sTypeName ); // leaked
79 : }
80 : };
81 :
82 : } } } } }
83 :
84 : namespace com { namespace sun { namespace star { namespace sheet {
85 :
86 22 : inline ::com::sun::star::uno::Type const & cppu_detail_getUnoType(SAL_UNUSED_PARAMETER css::sheet::XAddIn const *) {
87 22 : const ::com::sun::star::uno::Type &rRet = *detail::theXAddInType::get();
88 : // End inline typedescription generation
89 : static bool bInitStarted = false;
90 22 : if (!bInitStarted)
91 : {
92 22 : ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
93 22 : if (!bInitStarted)
94 : {
95 : OSL_DOUBLE_CHECKED_LOCKING_MEMORY_BARRIER();
96 22 : bInitStarted = true;
97 22 : ::cppu::UnoType< css::uno::RuntimeException >::get();
98 :
99 22 : typelib_InterfaceMethodTypeDescription * pMethod = 0;
100 : {
101 : typelib_Parameter_Init aParameters[1];
102 22 : ::rtl::OUString sParamName0( "aDisplayName" );
103 44 : ::rtl::OUString sParamType0( "string" );
104 22 : aParameters[0].pParamName = sParamName0.pData;
105 22 : aParameters[0].eTypeClass = (typelib_TypeClass)::com::sun::star::uno::TypeClass_STRING;
106 22 : aParameters[0].pTypeName = sParamType0.pData;
107 22 : aParameters[0].bIn = sal_True;
108 22 : aParameters[0].bOut = sal_False;
109 44 : ::rtl::OUString the_ExceptionName0( "com.sun.star.uno.RuntimeException" );
110 22 : rtl_uString * the_Exceptions[] = { the_ExceptionName0.pData };
111 44 : ::rtl::OUString sReturnType0( "string" );
112 44 : ::rtl::OUString sMethodName0( "com.sun.star.sheet.XAddIn::getProgrammaticFuntionName" );
113 : typelib_typedescription_newInterfaceMethod( &pMethod,
114 : 5, sal_False,
115 : sMethodName0.pData,
116 : (typelib_TypeClass)::com::sun::star::uno::TypeClass_STRING, sReturnType0.pData,
117 : 1, aParameters,
118 22 : 1, the_Exceptions );
119 44 : typelib_typedescription_register( (typelib_TypeDescription**)&pMethod );
120 : }
121 : {
122 : typelib_Parameter_Init aParameters[1];
123 22 : ::rtl::OUString sParamName0( "aProgrammaticName" );
124 44 : ::rtl::OUString sParamType0( "string" );
125 22 : aParameters[0].pParamName = sParamName0.pData;
126 22 : aParameters[0].eTypeClass = (typelib_TypeClass)::com::sun::star::uno::TypeClass_STRING;
127 22 : aParameters[0].pTypeName = sParamType0.pData;
128 22 : aParameters[0].bIn = sal_True;
129 22 : aParameters[0].bOut = sal_False;
130 44 : ::rtl::OUString the_ExceptionName0( "com.sun.star.uno.RuntimeException" );
131 22 : rtl_uString * the_Exceptions[] = { the_ExceptionName0.pData };
132 44 : ::rtl::OUString sReturnType1( "string" );
133 44 : ::rtl::OUString sMethodName1( "com.sun.star.sheet.XAddIn::getDisplayFunctionName" );
134 : typelib_typedescription_newInterfaceMethod( &pMethod,
135 : 6, sal_False,
136 : sMethodName1.pData,
137 : (typelib_TypeClass)::com::sun::star::uno::TypeClass_STRING, sReturnType1.pData,
138 : 1, aParameters,
139 22 : 1, the_Exceptions );
140 44 : typelib_typedescription_register( (typelib_TypeDescription**)&pMethod );
141 : }
142 : {
143 : typelib_Parameter_Init aParameters[1];
144 22 : ::rtl::OUString sParamName0( "aProgrammaticName" );
145 44 : ::rtl::OUString sParamType0( "string" );
146 22 : aParameters[0].pParamName = sParamName0.pData;
147 22 : aParameters[0].eTypeClass = (typelib_TypeClass)::com::sun::star::uno::TypeClass_STRING;
148 22 : aParameters[0].pTypeName = sParamType0.pData;
149 22 : aParameters[0].bIn = sal_True;
150 22 : aParameters[0].bOut = sal_False;
151 44 : ::rtl::OUString the_ExceptionName0( "com.sun.star.uno.RuntimeException" );
152 22 : rtl_uString * the_Exceptions[] = { the_ExceptionName0.pData };
153 44 : ::rtl::OUString sReturnType2( "string" );
154 44 : ::rtl::OUString sMethodName2( "com.sun.star.sheet.XAddIn::getFunctionDescription" );
155 : typelib_typedescription_newInterfaceMethod( &pMethod,
156 : 7, sal_False,
157 : sMethodName2.pData,
158 : (typelib_TypeClass)::com::sun::star::uno::TypeClass_STRING, sReturnType2.pData,
159 : 1, aParameters,
160 22 : 1, the_Exceptions );
161 44 : typelib_typedescription_register( (typelib_TypeDescription**)&pMethod );
162 : }
163 : {
164 : typelib_Parameter_Init aParameters[2];
165 22 : ::rtl::OUString sParamName0( "aProgrammaticFunctionName" );
166 44 : ::rtl::OUString sParamType0( "string" );
167 22 : aParameters[0].pParamName = sParamName0.pData;
168 22 : aParameters[0].eTypeClass = (typelib_TypeClass)::com::sun::star::uno::TypeClass_STRING;
169 22 : aParameters[0].pTypeName = sParamType0.pData;
170 22 : aParameters[0].bIn = sal_True;
171 22 : aParameters[0].bOut = sal_False;
172 44 : ::rtl::OUString sParamName1( "nArgument" );
173 44 : ::rtl::OUString sParamType1( "long" );
174 22 : aParameters[1].pParamName = sParamName1.pData;
175 22 : aParameters[1].eTypeClass = (typelib_TypeClass)::com::sun::star::uno::TypeClass_LONG;
176 22 : aParameters[1].pTypeName = sParamType1.pData;
177 22 : aParameters[1].bIn = sal_True;
178 22 : aParameters[1].bOut = sal_False;
179 44 : ::rtl::OUString the_ExceptionName0( "com.sun.star.uno.RuntimeException" );
180 22 : rtl_uString * the_Exceptions[] = { the_ExceptionName0.pData };
181 44 : ::rtl::OUString sReturnType3( "string" );
182 44 : ::rtl::OUString sMethodName3( "com.sun.star.sheet.XAddIn::getDisplayArgumentName" );
183 : typelib_typedescription_newInterfaceMethod( &pMethod,
184 : 8, sal_False,
185 : sMethodName3.pData,
186 : (typelib_TypeClass)::com::sun::star::uno::TypeClass_STRING, sReturnType3.pData,
187 : 2, aParameters,
188 22 : 1, the_Exceptions );
189 44 : typelib_typedescription_register( (typelib_TypeDescription**)&pMethod );
190 : }
191 : {
192 : typelib_Parameter_Init aParameters[2];
193 22 : ::rtl::OUString sParamName0( "aProgrammaticFunctionName" );
194 44 : ::rtl::OUString sParamType0( "string" );
195 22 : aParameters[0].pParamName = sParamName0.pData;
196 22 : aParameters[0].eTypeClass = (typelib_TypeClass)::com::sun::star::uno::TypeClass_STRING;
197 22 : aParameters[0].pTypeName = sParamType0.pData;
198 22 : aParameters[0].bIn = sal_True;
199 22 : aParameters[0].bOut = sal_False;
200 44 : ::rtl::OUString sParamName1( "nArgument" );
201 44 : ::rtl::OUString sParamType1( "long" );
202 22 : aParameters[1].pParamName = sParamName1.pData;
203 22 : aParameters[1].eTypeClass = (typelib_TypeClass)::com::sun::star::uno::TypeClass_LONG;
204 22 : aParameters[1].pTypeName = sParamType1.pData;
205 22 : aParameters[1].bIn = sal_True;
206 22 : aParameters[1].bOut = sal_False;
207 44 : ::rtl::OUString the_ExceptionName0( "com.sun.star.uno.RuntimeException" );
208 22 : rtl_uString * the_Exceptions[] = { the_ExceptionName0.pData };
209 44 : ::rtl::OUString sReturnType4( "string" );
210 44 : ::rtl::OUString sMethodName4( "com.sun.star.sheet.XAddIn::getArgumentDescription" );
211 : typelib_typedescription_newInterfaceMethod( &pMethod,
212 : 9, sal_False,
213 : sMethodName4.pData,
214 : (typelib_TypeClass)::com::sun::star::uno::TypeClass_STRING, sReturnType4.pData,
215 : 2, aParameters,
216 22 : 1, the_Exceptions );
217 44 : typelib_typedescription_register( (typelib_TypeDescription**)&pMethod );
218 : }
219 : {
220 : typelib_Parameter_Init aParameters[1];
221 22 : ::rtl::OUString sParamName0( "aProgrammaticFunctionName" );
222 44 : ::rtl::OUString sParamType0( "string" );
223 22 : aParameters[0].pParamName = sParamName0.pData;
224 22 : aParameters[0].eTypeClass = (typelib_TypeClass)::com::sun::star::uno::TypeClass_STRING;
225 22 : aParameters[0].pTypeName = sParamType0.pData;
226 22 : aParameters[0].bIn = sal_True;
227 22 : aParameters[0].bOut = sal_False;
228 44 : ::rtl::OUString the_ExceptionName0( "com.sun.star.uno.RuntimeException" );
229 22 : rtl_uString * the_Exceptions[] = { the_ExceptionName0.pData };
230 44 : ::rtl::OUString sReturnType5( "string" );
231 44 : ::rtl::OUString sMethodName5( "com.sun.star.sheet.XAddIn::getProgrammaticCategoryName" );
232 : typelib_typedescription_newInterfaceMethod( &pMethod,
233 : 10, sal_False,
234 : sMethodName5.pData,
235 : (typelib_TypeClass)::com::sun::star::uno::TypeClass_STRING, sReturnType5.pData,
236 : 1, aParameters,
237 22 : 1, the_Exceptions );
238 44 : typelib_typedescription_register( (typelib_TypeDescription**)&pMethod );
239 : }
240 : {
241 : typelib_Parameter_Init aParameters[1];
242 22 : ::rtl::OUString sParamName0( "aProgrammaticFunctionName" );
243 44 : ::rtl::OUString sParamType0( "string" );
244 22 : aParameters[0].pParamName = sParamName0.pData;
245 22 : aParameters[0].eTypeClass = (typelib_TypeClass)::com::sun::star::uno::TypeClass_STRING;
246 22 : aParameters[0].pTypeName = sParamType0.pData;
247 22 : aParameters[0].bIn = sal_True;
248 22 : aParameters[0].bOut = sal_False;
249 44 : ::rtl::OUString the_ExceptionName0( "com.sun.star.uno.RuntimeException" );
250 22 : rtl_uString * the_Exceptions[] = { the_ExceptionName0.pData };
251 44 : ::rtl::OUString sReturnType6( "string" );
252 44 : ::rtl::OUString sMethodName6( "com.sun.star.sheet.XAddIn::getDisplayCategoryName" );
253 : typelib_typedescription_newInterfaceMethod( &pMethod,
254 : 11, sal_False,
255 : sMethodName6.pData,
256 : (typelib_TypeClass)::com::sun::star::uno::TypeClass_STRING, sReturnType6.pData,
257 : 1, aParameters,
258 22 : 1, the_Exceptions );
259 44 : typelib_typedescription_register( (typelib_TypeDescription**)&pMethod );
260 : }
261 22 : typelib_typedescription_release( (typelib_TypeDescription*)pMethod );
262 22 : }
263 : }
264 : else
265 : {
266 : OSL_DOUBLE_CHECKED_LOCKING_MEMORY_BARRIER();
267 : }
268 22 : return rRet;
269 : }
270 :
271 : } } } }
272 :
273 22 : inline ::com::sun::star::uno::Type const & SAL_CALL getCppuType(SAL_UNUSED_PARAMETER ::com::sun::star::uno::Reference< css::sheet::XAddIn > const *) SAL_THROW(()) {
274 22 : return ::cppu::UnoType< ::com::sun::star::uno::Reference< css::sheet::XAddIn > >::get();
275 : }
276 :
277 22 : ::com::sun::star::uno::Type const & css::sheet::XAddIn::static_type(SAL_UNUSED_PARAMETER void *) {
278 22 : return ::getCppuType(static_cast< ::com::sun::star::uno::Reference< css::sheet::XAddIn > * >(0));
279 : }
280 :
281 : #endif // INCLUDED_COM_SUN_STAR_SHEET_XADDIN_HPP
|