29 #ifndef _CPPUHELPER_QUERYINTERFACE_HXX_
30 #define _CPPUHELPER_QUERYINTERFACE_HXX_
47 template<
class Interface1 >
49 const ::com::sun::star::uno::Type & rType,
53 if (rType == Interface1::static_type())
54 return ::com::sun::star::uno::Any( &p1, rType );
56 return ::com::sun::star::uno::Any();
67 template<
class Interface1,
class Interface2 >
69 const ::com::sun::star::uno::Type & rType,
70 Interface1 * p1, Interface2 * p2 )
73 if (rType == Interface1::static_type())
74 return ::com::sun::star::uno::Any( &p1, rType );
75 else if (rType == Interface2::static_type())
76 return ::com::sun::star::uno::Any( &p2, rType );
78 return ::com::sun::star::uno::Any();
91 template<
class Interface1,
class Interface2,
class Interface3 >
93 const ::com::sun::star::uno::Type & rType,
94 Interface1 * p1, Interface2 * p2, Interface3 * p3 )
97 if (rType == Interface1::static_type())
98 return ::com::sun::star::uno::Any( &p1, rType );
99 else if (rType == Interface2::static_type())
100 return ::com::sun::star::uno::Any( &p2, rType );
101 else if (rType == Interface3::static_type())
102 return ::com::sun::star::uno::Any( &p3, rType );
104 return ::com::sun::star::uno::Any();
119 template<
class Interface1,
class Interface2,
class Interface3,
class Interface4 >
121 const ::com::sun::star::uno::Type & rType,
122 Interface1 * p1, Interface2 * p2, Interface3 * p3, Interface4 * p4 )
125 if (rType == Interface1::static_type())
126 return ::com::sun::star::uno::Any( &p1, rType );
127 else if (rType == Interface2::static_type())
128 return ::com::sun::star::uno::Any( &p2, rType );
129 else if (rType == Interface3::static_type())
130 return ::com::sun::star::uno::Any( &p3, rType );
131 else if (rType == Interface4::static_type())
132 return ::com::sun::star::uno::Any( &p4, rType );
134 return ::com::sun::star::uno::Any();
151 template<
class Interface1,
class Interface2,
class Interface3,
class Interface4,
class Interface5 >
153 const ::com::sun::star::uno::Type & rType,
154 Interface1 * p1, Interface2 * p2, Interface3 * p3, Interface4 * p4, Interface5 * p5 )
157 if (rType == Interface1::static_type())
158 return ::com::sun::star::uno::Any( &p1, rType );
159 else if (rType == Interface2::static_type())
160 return ::com::sun::star::uno::Any( &p2, rType );
161 else if (rType == Interface3::static_type())
162 return ::com::sun::star::uno::Any( &p3, rType );
163 else if (rType == Interface4::static_type())
164 return ::com::sun::star::uno::Any( &p4, rType );
165 else if (rType == Interface5::static_type())
166 return ::com::sun::star::uno::Any( &p5, rType );
168 return ::com::sun::star::uno::Any();
187 template<
class Interface1,
class Interface2,
class Interface3,
class Interface4,
class Interface5,
190 const ::com::sun::star::uno::Type & rType,
191 Interface1 * p1, Interface2 * p2, Interface3 * p3, Interface4 * p4, Interface5 * p5,
195 if (rType == Interface1::static_type())
196 return ::com::sun::star::uno::Any( &p1, rType );
197 else if (rType == Interface2::static_type())
198 return ::com::sun::star::uno::Any( &p2, rType );
199 else if (rType == Interface3::static_type())
200 return ::com::sun::star::uno::Any( &p3, rType );
201 else if (rType == Interface4::static_type())
202 return ::com::sun::star::uno::Any( &p4, rType );
203 else if (rType == Interface5::static_type())
204 return ::com::sun::star::uno::Any( &p5, rType );
205 else if (rType == Interface6::static_type())
206 return ::com::sun::star::uno::Any( &p6, rType );
208 return ::com::sun::star::uno::Any();
229 template<
class Interface1,
class Interface2,
class Interface3,
class Interface4,
class Interface5,
230 class Interface6,
class Interface7 >
232 const ::com::sun::star::uno::Type & rType,
233 Interface1 * p1, Interface2 * p2, Interface3 * p3, Interface4 * p4, Interface5 * p5,
234 Interface6 * p6, Interface7 * p7 )
237 if (rType == Interface1::static_type())
238 return ::com::sun::star::uno::Any( &p1, rType );
239 else if (rType == Interface2::static_type())
240 return ::com::sun::star::uno::Any( &p2, rType );
241 else if (rType == Interface3::static_type())
242 return ::com::sun::star::uno::Any( &p3, rType );
243 else if (rType == Interface4::static_type())
244 return ::com::sun::star::uno::Any( &p4, rType );
245 else if (rType == Interface5::static_type())
246 return ::com::sun::star::uno::Any( &p5, rType );
247 else if (rType == Interface6::static_type())
248 return ::com::sun::star::uno::Any( &p6, rType );
249 else if (rType == Interface7::static_type())
250 return ::com::sun::star::uno::Any( &p7, rType );
252 return ::com::sun::star::uno::Any();
275 template<
class Interface1,
class Interface2,
class Interface3,
class Interface4,
class Interface5,
276 class Interface6,
class Interface7,
class Interface8 >
278 const ::com::sun::star::uno::Type & rType,
279 Interface1 * p1, Interface2 * p2, Interface3 * p3, Interface4 * p4, Interface5 * p5,
280 Interface6 * p6, Interface7 * p7, Interface8 * p8 )
283 if (rType == Interface1::static_type())
284 return ::com::sun::star::uno::Any( &p1, rType );
285 else if (rType == Interface2::static_type())
286 return ::com::sun::star::uno::Any( &p2, rType );
287 else if (rType == Interface3::static_type())
288 return ::com::sun::star::uno::Any( &p3, rType );
289 else if (rType == Interface4::static_type())
290 return ::com::sun::star::uno::Any( &p4, rType );
291 else if (rType == Interface5::static_type())
292 return ::com::sun::star::uno::Any( &p5, rType );
293 else if (rType == Interface6::static_type())
294 return ::com::sun::star::uno::Any( &p6, rType );
295 else if (rType == Interface7::static_type())
296 return ::com::sun::star::uno::Any( &p7, rType );
297 else if (rType == Interface8::static_type())
298 return ::com::sun::star::uno::Any( &p8, rType );
300 return ::com::sun::star::uno::Any();
325 template<
class Interface1,
class Interface2,
class Interface3,
class Interface4,
class Interface5,
326 class Interface6,
class Interface7,
class Interface8,
class Interface9 >
328 const ::com::sun::star::uno::Type & rType,
329 Interface1 * p1, Interface2 * p2, Interface3 * p3, Interface4 * p4, Interface5 * p5,
330 Interface6 * p6, Interface7 * p7, Interface8 * p8, Interface9 * p9 )
333 if (rType == Interface1::static_type())
334 return ::com::sun::star::uno::Any( &p1, rType );
335 else if (rType == Interface2::static_type())
336 return ::com::sun::star::uno::Any( &p2, rType );
337 else if (rType == Interface3::static_type())
338 return ::com::sun::star::uno::Any( &p3, rType );
339 else if (rType == Interface4::static_type())
340 return ::com::sun::star::uno::Any( &p4, rType );
341 else if (rType == Interface5::static_type())
342 return ::com::sun::star::uno::Any( &p5, rType );
343 else if (rType == Interface6::static_type())
344 return ::com::sun::star::uno::Any( &p6, rType );
345 else if (rType == Interface7::static_type())
346 return ::com::sun::star::uno::Any( &p7, rType );
347 else if (rType == Interface8::static_type())
348 return ::com::sun::star::uno::Any( &p8, rType );
349 else if (rType == Interface9::static_type())
350 return ::com::sun::star::uno::Any( &p9, rType );
352 return ::com::sun::star::uno::Any();
379 template<
class Interface1,
class Interface2,
class Interface3,
class Interface4,
class Interface5,
380 class Interface6,
class Interface7,
class Interface8,
class Interface9,
class Interface10 >
382 const ::com::sun::star::uno::Type & rType,
383 Interface1 * p1, Interface2 * p2, Interface3 * p3, Interface4 * p4, Interface5 * p5,
384 Interface6 * p6, Interface7 * p7, Interface8 * p8, Interface9 * p9, Interface10 * p10 )
387 if (rType == Interface1::static_type())
388 return ::com::sun::star::uno::Any( &p1, rType );
389 else if (rType == Interface2::static_type())
390 return ::com::sun::star::uno::Any( &p2, rType );
391 else if (rType == Interface3::static_type())
392 return ::com::sun::star::uno::Any( &p3, rType );
393 else if (rType == Interface4::static_type())
394 return ::com::sun::star::uno::Any( &p4, rType );
395 else if (rType == Interface5::static_type())
396 return ::com::sun::star::uno::Any( &p5, rType );
397 else if (rType == Interface6::static_type())
398 return ::com::sun::star::uno::Any( &p6, rType );
399 else if (rType == Interface7::static_type())
400 return ::com::sun::star::uno::Any( &p7, rType );
401 else if (rType == Interface8::static_type())
402 return ::com::sun::star::uno::Any( &p8, rType );
403 else if (rType == Interface9::static_type())
404 return ::com::sun::star::uno::Any( &p9, rType );
405 else if (rType == Interface10::static_type())
406 return ::com::sun::star::uno::Any( &p10, rType );
408 return ::com::sun::star::uno::Any();
437 template<
class Interface1,
class Interface2,
class Interface3,
class Interface4,
class Interface5,
438 class Interface6,
class Interface7,
class Interface8,
class Interface9,
class Interface10,
441 const ::com::sun::star::uno::Type & rType,
442 Interface1 * p1, Interface2 * p2, Interface3 * p3, Interface4 * p4, Interface5 * p5,
443 Interface6 * p6, Interface7 * p7, Interface8 * p8, Interface9 * p9, Interface10 * p10,
447 if (rType == Interface1::static_type())
448 return ::com::sun::star::uno::Any( &p1, rType );
449 else if (rType == Interface2::static_type())
450 return ::com::sun::star::uno::Any( &p2, rType );
451 else if (rType == Interface3::static_type())
452 return ::com::sun::star::uno::Any( &p3, rType );
453 else if (rType == Interface4::static_type())
454 return ::com::sun::star::uno::Any( &p4, rType );
455 else if (rType == Interface5::static_type())
456 return ::com::sun::star::uno::Any( &p5, rType );
457 else if (rType == Interface6::static_type())
458 return ::com::sun::star::uno::Any( &p6, rType );
459 else if (rType == Interface7::static_type())
460 return ::com::sun::star::uno::Any( &p7, rType );
461 else if (rType == Interface8::static_type())
462 return ::com::sun::star::uno::Any( &p8, rType );
463 else if (rType == Interface9::static_type())
464 return ::com::sun::star::uno::Any( &p9, rType );
465 else if (rType == Interface10::static_type())
466 return ::com::sun::star::uno::Any( &p10, rType );
467 else if (rType == Interface11::static_type())
468 return ::com::sun::star::uno::Any( &p11, rType );
470 return ::com::sun::star::uno::Any();
501 template<
class Interface1,
class Interface2,
class Interface3,
class Interface4,
class Interface5,
502 class Interface6,
class Interface7,
class Interface8,
class Interface9,
class Interface10,
503 class Interface11,
class Interface12 >
505 const ::com::sun::star::uno::Type & rType,
506 Interface1 * p1, Interface2 * p2, Interface3 * p3, Interface4 * p4, Interface5 * p5,
507 Interface6 * p6, Interface7 * p7, Interface8 * p8, Interface9 * p9, Interface10 * p10,
508 Interface11 * p11, Interface12 * p12 )
511 if (rType == Interface1::static_type())
512 return ::com::sun::star::uno::Any( &p1, rType );
513 else if (rType == Interface2::static_type())
514 return ::com::sun::star::uno::Any( &p2, rType );
515 else if (rType == Interface3::static_type())
516 return ::com::sun::star::uno::Any( &p3, rType );
517 else if (rType == Interface4::static_type())
518 return ::com::sun::star::uno::Any( &p4, rType );
519 else if (rType == Interface5::static_type())
520 return ::com::sun::star::uno::Any( &p5, rType );
521 else if (rType == Interface6::static_type())
522 return ::com::sun::star::uno::Any( &p6, rType );
523 else if (rType == Interface7::static_type())
524 return ::com::sun::star::uno::Any( &p7, rType );
525 else if (rType == Interface8::static_type())
526 return ::com::sun::star::uno::Any( &p8, rType );
527 else if (rType == Interface9::static_type())
528 return ::com::sun::star::uno::Any( &p9, rType );
529 else if (rType == Interface10::static_type())
530 return ::com::sun::star::uno::Any( &p10, rType );
531 else if (rType == Interface11::static_type())
532 return ::com::sun::star::uno::Any( &p11, rType );
533 else if (rType == Interface12::static_type())
534 return ::com::sun::star::uno::Any( &p12, rType );
536 return ::com::sun::star::uno::Any();