20 #ifndef INCLUDED_CPPUHELPER_QUERYINTERFACE_HXX
21 #define INCLUDED_CPPUHELPER_QUERYINTERFACE_HXX
38 template<
class Interface1 >
40 const ::com::sun::star::uno::Type & rType,
43 if (rType == Interface1::static_type())
44 return ::com::sun::star::uno::Any( &p1, rType );
46 return ::com::sun::star::uno::Any();
57 template<
class Interface1,
class Interface2 >
59 const ::com::sun::star::uno::Type & rType,
60 Interface1 * p1, Interface2 * p2 )
62 if (rType == Interface1::static_type())
63 return ::com::sun::star::uno::Any( &p1, rType );
64 else if (rType == Interface2::static_type())
65 return ::com::sun::star::uno::Any( &p2, rType );
67 return ::com::sun::star::uno::Any();
80 template<
class Interface1,
class Interface2,
class Interface3 >
82 const ::com::sun::star::uno::Type & rType,
83 Interface1 * p1, Interface2 * p2, Interface3 * p3 )
85 if (rType == Interface1::static_type())
86 return ::com::sun::star::uno::Any( &p1, rType );
87 else if (rType == Interface2::static_type())
88 return ::com::sun::star::uno::Any( &p2, rType );
89 else if (rType == Interface3::static_type())
90 return ::com::sun::star::uno::Any( &p3, rType );
92 return ::com::sun::star::uno::Any();
107 template<
class Interface1,
class Interface2,
class Interface3,
class Interface4 >
109 const ::com::sun::star::uno::Type & rType,
110 Interface1 * p1, Interface2 * p2, Interface3 * p3, Interface4 * p4 )
112 if (rType == Interface1::static_type())
113 return ::com::sun::star::uno::Any( &p1, rType );
114 else if (rType == Interface2::static_type())
115 return ::com::sun::star::uno::Any( &p2, rType );
116 else if (rType == Interface3::static_type())
117 return ::com::sun::star::uno::Any( &p3, rType );
118 else if (rType == Interface4::static_type())
119 return ::com::sun::star::uno::Any( &p4, rType );
121 return ::com::sun::star::uno::Any();
138 template<
class Interface1,
class Interface2,
class Interface3,
class Interface4,
class Interface5 >
140 const ::com::sun::star::uno::Type & rType,
141 Interface1 * p1, Interface2 * p2, Interface3 * p3, Interface4 * p4, Interface5 * p5 )
143 if (rType == Interface1::static_type())
144 return ::com::sun::star::uno::Any( &p1, rType );
145 else if (rType == Interface2::static_type())
146 return ::com::sun::star::uno::Any( &p2, rType );
147 else if (rType == Interface3::static_type())
148 return ::com::sun::star::uno::Any( &p3, rType );
149 else if (rType == Interface4::static_type())
150 return ::com::sun::star::uno::Any( &p4, rType );
151 else if (rType == Interface5::static_type())
152 return ::com::sun::star::uno::Any( &p5, rType );
154 return ::com::sun::star::uno::Any();
173 template<
class Interface1,
class Interface2,
class Interface3,
class Interface4,
class Interface5,
176 const ::com::sun::star::uno::Type & rType,
177 Interface1 * p1, Interface2 * p2, Interface3 * p3, Interface4 * p4, Interface5 * p5,
180 if (rType == Interface1::static_type())
181 return ::com::sun::star::uno::Any( &p1, rType );
182 else if (rType == Interface2::static_type())
183 return ::com::sun::star::uno::Any( &p2, rType );
184 else if (rType == Interface3::static_type())
185 return ::com::sun::star::uno::Any( &p3, rType );
186 else if (rType == Interface4::static_type())
187 return ::com::sun::star::uno::Any( &p4, rType );
188 else if (rType == Interface5::static_type())
189 return ::com::sun::star::uno::Any( &p5, rType );
190 else if (rType == Interface6::static_type())
191 return ::com::sun::star::uno::Any( &p6, rType );
193 return ::com::sun::star::uno::Any();
214 template<
class Interface1,
class Interface2,
class Interface3,
class Interface4,
class Interface5,
215 class Interface6,
class Interface7 >
217 const ::com::sun::star::uno::Type & rType,
218 Interface1 * p1, Interface2 * p2, Interface3 * p3, Interface4 * p4, Interface5 * p5,
219 Interface6 * p6, Interface7 * p7 )
221 if (rType == Interface1::static_type())
222 return ::com::sun::star::uno::Any( &p1, rType );
223 else if (rType == Interface2::static_type())
224 return ::com::sun::star::uno::Any( &p2, rType );
225 else if (rType == Interface3::static_type())
226 return ::com::sun::star::uno::Any( &p3, rType );
227 else if (rType == Interface4::static_type())
228 return ::com::sun::star::uno::Any( &p4, rType );
229 else if (rType == Interface5::static_type())
230 return ::com::sun::star::uno::Any( &p5, rType );
231 else if (rType == Interface6::static_type())
232 return ::com::sun::star::uno::Any( &p6, rType );
233 else if (rType == Interface7::static_type())
234 return ::com::sun::star::uno::Any( &p7, rType );
236 return ::com::sun::star::uno::Any();
259 template<
class Interface1,
class Interface2,
class Interface3,
class Interface4,
class Interface5,
260 class Interface6,
class Interface7,
class Interface8 >
262 const ::com::sun::star::uno::Type & rType,
263 Interface1 * p1, Interface2 * p2, Interface3 * p3, Interface4 * p4, Interface5 * p5,
264 Interface6 * p6, Interface7 * p7, Interface8 * p8 )
266 if (rType == Interface1::static_type())
267 return ::com::sun::star::uno::Any( &p1, rType );
268 else if (rType == Interface2::static_type())
269 return ::com::sun::star::uno::Any( &p2, rType );
270 else if (rType == Interface3::static_type())
271 return ::com::sun::star::uno::Any( &p3, rType );
272 else if (rType == Interface4::static_type())
273 return ::com::sun::star::uno::Any( &p4, rType );
274 else if (rType == Interface5::static_type())
275 return ::com::sun::star::uno::Any( &p5, rType );
276 else if (rType == Interface6::static_type())
277 return ::com::sun::star::uno::Any( &p6, rType );
278 else if (rType == Interface7::static_type())
279 return ::com::sun::star::uno::Any( &p7, rType );
280 else if (rType == Interface8::static_type())
281 return ::com::sun::star::uno::Any( &p8, rType );
283 return ::com::sun::star::uno::Any();
308 template<
class Interface1,
class Interface2,
class Interface3,
class Interface4,
class Interface5,
309 class Interface6,
class Interface7,
class Interface8,
class Interface9 >
311 const ::com::sun::star::uno::Type & rType,
312 Interface1 * p1, Interface2 * p2, Interface3 * p3, Interface4 * p4, Interface5 * p5,
313 Interface6 * p6, Interface7 * p7, Interface8 * p8, Interface9 * p9 )
315 if (rType == Interface1::static_type())
316 return ::com::sun::star::uno::Any( &p1, rType );
317 else if (rType == Interface2::static_type())
318 return ::com::sun::star::uno::Any( &p2, rType );
319 else if (rType == Interface3::static_type())
320 return ::com::sun::star::uno::Any( &p3, rType );
321 else if (rType == Interface4::static_type())
322 return ::com::sun::star::uno::Any( &p4, rType );
323 else if (rType == Interface5::static_type())
324 return ::com::sun::star::uno::Any( &p5, rType );
325 else if (rType == Interface6::static_type())
326 return ::com::sun::star::uno::Any( &p6, rType );
327 else if (rType == Interface7::static_type())
328 return ::com::sun::star::uno::Any( &p7, rType );
329 else if (rType == Interface8::static_type())
330 return ::com::sun::star::uno::Any( &p8, rType );
331 else if (rType == Interface9::static_type())
332 return ::com::sun::star::uno::Any( &p9, rType );
334 return ::com::sun::star::uno::Any();
361 template<
class Interface1,
class Interface2,
class Interface3,
class Interface4,
class Interface5,
362 class Interface6,
class Interface7,
class Interface8,
class Interface9,
class Interface10 >
364 const ::com::sun::star::uno::Type & rType,
365 Interface1 * p1, Interface2 * p2, Interface3 * p3, Interface4 * p4, Interface5 * p5,
366 Interface6 * p6, Interface7 * p7, Interface8 * p8, Interface9 * p9, Interface10 * p10 )
368 if (rType == Interface1::static_type())
369 return ::com::sun::star::uno::Any( &p1, rType );
370 else if (rType == Interface2::static_type())
371 return ::com::sun::star::uno::Any( &p2, rType );
372 else if (rType == Interface3::static_type())
373 return ::com::sun::star::uno::Any( &p3, rType );
374 else if (rType == Interface4::static_type())
375 return ::com::sun::star::uno::Any( &p4, rType );
376 else if (rType == Interface5::static_type())
377 return ::com::sun::star::uno::Any( &p5, rType );
378 else if (rType == Interface6::static_type())
379 return ::com::sun::star::uno::Any( &p6, rType );
380 else if (rType == Interface7::static_type())
381 return ::com::sun::star::uno::Any( &p7, rType );
382 else if (rType == Interface8::static_type())
383 return ::com::sun::star::uno::Any( &p8, rType );
384 else if (rType == Interface9::static_type())
385 return ::com::sun::star::uno::Any( &p9, rType );
386 else if (rType == Interface10::static_type())
387 return ::com::sun::star::uno::Any( &p10, rType );
389 return ::com::sun::star::uno::Any();
418 template<
class Interface1,
class Interface2,
class Interface3,
class Interface4,
class Interface5,
419 class Interface6,
class Interface7,
class Interface8,
class Interface9,
class Interface10,
422 const ::com::sun::star::uno::Type & rType,
423 Interface1 * p1, Interface2 * p2, Interface3 * p3, Interface4 * p4, Interface5 * p5,
424 Interface6 * p6, Interface7 * p7, Interface8 * p8, Interface9 * p9, Interface10 * p10,
427 if (rType == Interface1::static_type())
428 return ::com::sun::star::uno::Any( &p1, rType );
429 else if (rType == Interface2::static_type())
430 return ::com::sun::star::uno::Any( &p2, rType );
431 else if (rType == Interface3::static_type())
432 return ::com::sun::star::uno::Any( &p3, rType );
433 else if (rType == Interface4::static_type())
434 return ::com::sun::star::uno::Any( &p4, rType );
435 else if (rType == Interface5::static_type())
436 return ::com::sun::star::uno::Any( &p5, rType );
437 else if (rType == Interface6::static_type())
438 return ::com::sun::star::uno::Any( &p6, rType );
439 else if (rType == Interface7::static_type())
440 return ::com::sun::star::uno::Any( &p7, rType );
441 else if (rType == Interface8::static_type())
442 return ::com::sun::star::uno::Any( &p8, rType );
443 else if (rType == Interface9::static_type())
444 return ::com::sun::star::uno::Any( &p9, rType );
445 else if (rType == Interface10::static_type())
446 return ::com::sun::star::uno::Any( &p10, rType );
447 else if (rType == Interface11::static_type())
448 return ::com::sun::star::uno::Any( &p11, rType );
450 return ::com::sun::star::uno::Any();
481 template<
class Interface1,
class Interface2,
class Interface3,
class Interface4,
class Interface5,
482 class Interface6,
class Interface7,
class Interface8,
class Interface9,
class Interface10,
483 class Interface11,
class Interface12 >
485 const ::com::sun::star::uno::Type & rType,
486 Interface1 * p1, Interface2 * p2, Interface3 * p3, Interface4 * p4, Interface5 * p5,
487 Interface6 * p6, Interface7 * p7, Interface8 * p8, Interface9 * p9, Interface10 * p10,
488 Interface11 * p11, Interface12 * p12 )
490 if (rType == Interface1::static_type())
491 return ::com::sun::star::uno::Any( &p1, rType );
492 else if (rType == Interface2::static_type())
493 return ::com::sun::star::uno::Any( &p2, rType );
494 else if (rType == Interface3::static_type())
495 return ::com::sun::star::uno::Any( &p3, rType );
496 else if (rType == Interface4::static_type())
497 return ::com::sun::star::uno::Any( &p4, rType );
498 else if (rType == Interface5::static_type())
499 return ::com::sun::star::uno::Any( &p5, rType );
500 else if (rType == Interface6::static_type())
501 return ::com::sun::star::uno::Any( &p6, rType );
502 else if (rType == Interface7::static_type())
503 return ::com::sun::star::uno::Any( &p7, rType );
504 else if (rType == Interface8::static_type())
505 return ::com::sun::star::uno::Any( &p8, rType );
506 else if (rType == Interface9::static_type())
507 return ::com::sun::star::uno::Any( &p9, rType );
508 else if (rType == Interface10::static_type())
509 return ::com::sun::star::uno::Any( &p10, rType );
510 else if (rType == Interface11::static_type())
511 return ::com::sun::star::uno::Any( &p11, rType );
512 else if (rType == Interface12::static_type())
513 return ::com::sun::star::uno::Any( &p12, rType );
515 return ::com::sun::star::uno::Any();