LCOV - code coverage report
Current view: top level - include/cppuhelper - queryinterface.hxx (source / functions) Hit Total Coverage
Test: commit c8344322a7af75b84dd3ca8f78b05543a976dfd5 Lines: 167 180 92.8 %
Date: 2015-06-13 12:38:46 Functions: 161 257 62.6 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
       2             : /*
       3             :  * This file is part of the LibreOffice project.
       4             :  *
       5             :  * This Source Code Form is subject to the terms of the Mozilla Public
       6             :  * License, v. 2.0. If a copy of the MPL was not distributed with this
       7             :  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
       8             :  *
       9             :  * This file incorporates work covered by the following license notice:
      10             :  *
      11             :  *   Licensed to the Apache Software Foundation (ASF) under one or more
      12             :  *   contributor license agreements. See the NOTICE file distributed
      13             :  *   with this work for additional information regarding copyright
      14             :  *   ownership. The ASF licenses this file to you under the Apache
      15             :  *   License, Version 2.0 (the "License"); you may not use this file
      16             :  *   except in compliance with the License. You may obtain a copy of
      17             :  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
      18             :  */
      19             : 
      20             : #ifndef INCLUDED_CPPUHELPER_QUERYINTERFACE_HXX
      21             : #define INCLUDED_CPPUHELPER_QUERYINTERFACE_HXX
      22             : 
      23             : #include <sal/config.h>
      24             : #include <com/sun/star/uno/Any.hxx>
      25             : #include <com/sun/star/uno/Type.hxx>
      26             : #include <sal/types.h>
      27             : 
      28             : namespace cppu
      29             : {
      30             : 
      31             : /** Compares demanded type to given template argument types.
      32             : 
      33             :     @tparam Interface1 interface type
      34             :     @param rType demanded type
      35             :     @param p1 interface pointer
      36             :     @return acquired interface of demanded type or empty Any
      37             : */
      38             : template< class Interface1 >
      39    57482505 : inline ::com::sun::star::uno::Any SAL_CALL queryInterface(
      40             :     const ::com::sun::star::uno::Type & rType,
      41             :     Interface1 * p1 )
      42             : {
      43    57482505 :     if (rType == Interface1::static_type())
      44    26913958 :         return ::com::sun::star::uno::Any( &p1, rType );
      45             :     else
      46    30568547 :         return ::com::sun::star::uno::Any();
      47             : }
      48             : /** Compares demanded type to given template argument types.
      49             : 
      50             :     @tparam Interface1 interface type
      51             :     @tparam Interface2 interface type
      52             :     @param rType demanded type
      53             :     @param p1 interface pointer
      54             :     @param p2 interface pointer
      55             :     @return acquired interface of demanded type or empty Any
      56             : */
      57             : template< class Interface1, class Interface2 >
      58   151323132 : inline ::com::sun::star::uno::Any SAL_CALL queryInterface(
      59             :     const ::com::sun::star::uno::Type & rType,
      60             :     Interface1 * p1, Interface2 * p2 )
      61             : {
      62   151323132 :     if (rType == Interface1::static_type())
      63     6177489 :         return ::com::sun::star::uno::Any( &p1, rType );
      64   145145642 :     else if (rType == Interface2::static_type())
      65     4172660 :         return ::com::sun::star::uno::Any( &p2, rType );
      66             :     else
      67   140972981 :         return ::com::sun::star::uno::Any();
      68             : }
      69             : /** Compares demanded type to given template argument types.
      70             : 
      71             :     @tparam Interface1 interface type
      72             :     @tparam Interface2 interface type
      73             :     @tparam Interface3 interface type
      74             :     @param rType demanded type
      75             :     @param p1 interface pointer
      76             :     @param p2 interface pointer
      77             :     @param p3 interface pointer
      78             :     @return acquired interface of demanded type or empty Any
      79             : */
      80             : template< class Interface1, class Interface2, class Interface3 >
      81     2949297 : inline ::com::sun::star::uno::Any SAL_CALL queryInterface(
      82             :     const ::com::sun::star::uno::Type & rType,
      83             :     Interface1 * p1, Interface2 * p2, Interface3 * p3 )
      84             : {
      85     2949297 :     if (rType == Interface1::static_type())
      86     1589350 :         return ::com::sun::star::uno::Any( &p1, rType );
      87     1359947 :     else if (rType == Interface2::static_type())
      88       25572 :         return ::com::sun::star::uno::Any( &p2, rType );
      89     1334375 :     else if (rType == Interface3::static_type())
      90      507666 :         return ::com::sun::star::uno::Any( &p3, rType );
      91             :     else
      92      826709 :         return ::com::sun::star::uno::Any();
      93             : }
      94             : /** Compares demanded type to given template argument types.
      95             : 
      96             :     @tparam Interface1 interface type
      97             :     @tparam Interface2 interface type
      98             :     @tparam Interface3 interface type
      99             :     @tparam Interface4 interface type
     100             :     @param rType demanded type
     101             :     @param p1 interface pointer
     102             :     @param p2 interface pointer
     103             :     @param p3 interface pointer
     104             :     @param p4 interface pointer
     105             :     @return acquired interface of demanded type or empty Any
     106             : */
     107             : template< class Interface1, class Interface2, class Interface3, class Interface4 >
     108      982302 : inline ::com::sun::star::uno::Any SAL_CALL queryInterface(
     109             :     const ::com::sun::star::uno::Type & rType,
     110             :     Interface1 * p1, Interface2 * p2, Interface3 * p3, Interface4 * p4 )
     111             : {
     112      982302 :     if (rType == Interface1::static_type())
     113       67794 :         return ::com::sun::star::uno::Any( &p1, rType );
     114      914508 :     else if (rType == Interface2::static_type())
     115      700739 :         return ::com::sun::star::uno::Any( &p2, rType );
     116      213769 :     else if (rType == Interface3::static_type())
     117        2691 :         return ::com::sun::star::uno::Any( &p3, rType );
     118      211078 :     else if (rType == Interface4::static_type())
     119       32975 :         return ::com::sun::star::uno::Any( &p4, rType );
     120             :     else
     121      178103 :         return ::com::sun::star::uno::Any();
     122             : }
     123             : /** Compares demanded type to given template argument types.
     124             : 
     125             :     @tparam Interface1 interface type
     126             :     @tparam Interface2 interface type
     127             :     @tparam Interface3 interface type
     128             :     @tparam Interface4 interface type
     129             :     @tparam Interface5 interface type
     130             :     @param rType demanded type
     131             :     @param p1 interface pointer
     132             :     @param p2 interface pointer
     133             :     @param p3 interface pointer
     134             :     @param p4 interface pointer
     135             :     @param p5 interface pointer
     136             :     @return acquired interface of demanded type or empty Any
     137             : */
     138             : template< class Interface1, class Interface2, class Interface3, class Interface4, class Interface5 >
     139     2272724 : inline ::com::sun::star::uno::Any SAL_CALL queryInterface(
     140             :     const ::com::sun::star::uno::Type & rType,
     141             :     Interface1 * p1, Interface2 * p2, Interface3 * p3, Interface4 * p4, Interface5 * p5 )
     142             : {
     143     2272724 :     if (rType == Interface1::static_type())
     144       50700 :         return ::com::sun::star::uno::Any( &p1, rType );
     145     2222024 :     else if (rType == Interface2::static_type())
     146       77677 :         return ::com::sun::star::uno::Any( &p2, rType );
     147     2144347 :     else if (rType == Interface3::static_type())
     148       34869 :         return ::com::sun::star::uno::Any( &p3, rType );
     149     2109478 :     else if (rType == Interface4::static_type())
     150        4182 :         return ::com::sun::star::uno::Any( &p4, rType );
     151     2105296 :     else if (rType == Interface5::static_type())
     152       55749 :         return ::com::sun::star::uno::Any( &p5, rType );
     153             :     else
     154     2049547 :         return ::com::sun::star::uno::Any();
     155             : }
     156             : /** Compares demanded type to given template argument types.
     157             : 
     158             :     @tparam Interface1 interface type
     159             :     @tparam Interface2 interface type
     160             :     @tparam Interface3 interface type
     161             :     @tparam Interface4 interface type
     162             :     @tparam Interface5 interface type
     163             :     @tparam Interface6 interface type
     164             :     @param rType demanded type
     165             :     @param p1 interface pointer
     166             :     @param p2 interface pointer
     167             :     @param p3 interface pointer
     168             :     @param p4 interface pointer
     169             :     @param p5 interface pointer
     170             :     @param p6 interface pointer
     171             :     @return acquired interface of demanded type or empty Any
     172             : */
     173             : template< class Interface1, class Interface2, class Interface3, class Interface4, class Interface5,
     174             :           class Interface6 >
     175    27618628 : inline ::com::sun::star::uno::Any SAL_CALL queryInterface(
     176             :     const ::com::sun::star::uno::Type & rType,
     177             :     Interface1 * p1, Interface2 * p2, Interface3 * p3, Interface4 * p4, Interface5 * p5,
     178             :     Interface6 * p6 )
     179             : {
     180    27618628 :     if (rType == Interface1::static_type())
     181       57121 :         return ::com::sun::star::uno::Any( &p1, rType );
     182    27561507 :     else if (rType == Interface2::static_type())
     183      338953 :         return ::com::sun::star::uno::Any( &p2, rType );
     184    27222554 :     else if (rType == Interface3::static_type())
     185      201198 :         return ::com::sun::star::uno::Any( &p3, rType );
     186    27021356 :     else if (rType == Interface4::static_type())
     187         394 :         return ::com::sun::star::uno::Any( &p4, rType );
     188    27020962 :     else if (rType == Interface5::static_type())
     189       71679 :         return ::com::sun::star::uno::Any( &p5, rType );
     190    26949283 :     else if (rType == Interface6::static_type())
     191          38 :         return ::com::sun::star::uno::Any( &p6, rType );
     192             :     else
     193    26949245 :         return ::com::sun::star::uno::Any();
     194             : }
     195             : /** Compares demanded type to given template argument types.
     196             : 
     197             :     @tparam Interface1 interface type
     198             :     @tparam Interface2 interface type
     199             :     @tparam Interface3 interface type
     200             :     @tparam Interface4 interface type
     201             :     @tparam Interface5 interface type
     202             :     @tparam Interface6 interface type
     203             :     @tparam Interface7 interface type
     204             :     @param rType demanded type
     205             :     @param p1 interface pointer
     206             :     @param p2 interface pointer
     207             :     @param p3 interface pointer
     208             :     @param p4 interface pointer
     209             :     @param p5 interface pointer
     210             :     @param p6 interface pointer
     211             :     @param p7 interface pointer
     212             :     @return acquired interface of demanded type or empty Any
     213             : */
     214             : template< class Interface1, class Interface2, class Interface3, class Interface4, class Interface5,
     215             :           class Interface6, class Interface7 >
     216     1424469 : inline ::com::sun::star::uno::Any SAL_CALL queryInterface(
     217             :     const ::com::sun::star::uno::Type & rType,
     218             :     Interface1 * p1, Interface2 * p2, Interface3 * p3, Interface4 * p4, Interface5 * p5,
     219             :     Interface6 * p6, Interface7 * p7 )
     220             : {
     221     1424469 :     if (rType == Interface1::static_type())
     222          11 :         return ::com::sun::star::uno::Any( &p1, rType );
     223     1424458 :     else if (rType == Interface2::static_type())
     224      877397 :         return ::com::sun::star::uno::Any( &p2, rType );
     225      547061 :     else if (rType == Interface3::static_type())
     226       36222 :         return ::com::sun::star::uno::Any( &p3, rType );
     227      510839 :     else if (rType == Interface4::static_type())
     228      117669 :         return ::com::sun::star::uno::Any( &p4, rType );
     229      393170 :     else if (rType == Interface5::static_type())
     230      377832 :         return ::com::sun::star::uno::Any( &p5, rType );
     231       15338 :     else if (rType == Interface6::static_type())
     232          27 :         return ::com::sun::star::uno::Any( &p6, rType );
     233       15311 :     else if (rType == Interface7::static_type())
     234         369 :         return ::com::sun::star::uno::Any( &p7, rType );
     235             :     else
     236       14942 :         return ::com::sun::star::uno::Any();
     237             : }
     238             : /** Compares demanded type to given template argument types.
     239             : 
     240             :     @tparam Interface1 interface type
     241             :     @tparam Interface2 interface type
     242             :     @tparam Interface3 interface type
     243             :     @tparam Interface4 interface type
     244             :     @tparam Interface5 interface type
     245             :     @tparam Interface6 interface type
     246             :     @tparam Interface7 interface type
     247             :     @tparam Interface8 interface type
     248             :     @param rType demanded type
     249             :     @param p1 interface pointer
     250             :     @param p2 interface pointer
     251             :     @param p3 interface pointer
     252             :     @param p4 interface pointer
     253             :     @param p5 interface pointer
     254             :     @param p6 interface pointer
     255             :     @param p7 interface pointer
     256             :     @param p8 interface pointer
     257             :     @return acquired interface of demanded type or empty Any
     258             : */
     259             : template< class Interface1, class Interface2, class Interface3, class Interface4, class Interface5,
     260             :           class Interface6, class Interface7, class Interface8 >
     261         230 : inline ::com::sun::star::uno::Any SAL_CALL queryInterface(
     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 )
     265             : {
     266         230 :     if (rType == Interface1::static_type())
     267         214 :         return ::com::sun::star::uno::Any( &p1, rType );
     268          16 :     else if (rType == Interface2::static_type())
     269           1 :         return ::com::sun::star::uno::Any( &p2, rType );
     270          15 :     else if (rType == Interface3::static_type())
     271           9 :         return ::com::sun::star::uno::Any( &p3, rType );
     272           6 :     else if (rType == Interface4::static_type())
     273           0 :         return ::com::sun::star::uno::Any( &p4, rType );
     274           6 :     else if (rType == Interface5::static_type())
     275           0 :         return ::com::sun::star::uno::Any( &p5, rType );
     276           6 :     else if (rType == Interface6::static_type())
     277           0 :         return ::com::sun::star::uno::Any( &p6, rType );
     278           6 :     else if (rType == Interface7::static_type())
     279           0 :         return ::com::sun::star::uno::Any( &p7, rType );
     280           6 :     else if (rType == Interface8::static_type())
     281           0 :         return ::com::sun::star::uno::Any( &p8, rType );
     282             :     else
     283           6 :         return ::com::sun::star::uno::Any();
     284             : }
     285             : /** Compares demanded type to given template argument types.
     286             : 
     287             :     @tparam Interface1 interface type
     288             :     @tparam Interface2 interface type
     289             :     @tparam Interface3 interface type
     290             :     @tparam Interface4 interface type
     291             :     @tparam Interface5 interface type
     292             :     @tparam Interface6 interface type
     293             :     @tparam Interface7 interface type
     294             :     @tparam Interface8 interface type
     295             :     @tparam Interface9 interface type
     296             :     @param rType demanded type
     297             :     @param p1 interface pointer
     298             :     @param p2 interface pointer
     299             :     @param p3 interface pointer
     300             :     @param p4 interface pointer
     301             :     @param p5 interface pointer
     302             :     @param p6 interface pointer
     303             :     @param p7 interface pointer
     304             :     @param p8 interface pointer
     305             :     @param p9 interface pointer
     306             :     @return acquired interface of demanded type or empty Any
     307             : */
     308             : template< class Interface1, class Interface2, class Interface3, class Interface4, class Interface5,
     309             :           class Interface6, class Interface7, class Interface8, class Interface9 >
     310      400231 : inline ::com::sun::star::uno::Any SAL_CALL queryInterface(
     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 )
     314             : {
     315      400231 :     if (rType == Interface1::static_type())
     316      295889 :         return ::com::sun::star::uno::Any( &p1, rType );
     317      104342 :     else if (rType == Interface2::static_type())
     318         986 :         return ::com::sun::star::uno::Any( &p2, rType );
     319      103356 :     else if (rType == Interface3::static_type())
     320       14755 :         return ::com::sun::star::uno::Any( &p3, rType );
     321       88601 :     else if (rType == Interface4::static_type())
     322       14779 :         return ::com::sun::star::uno::Any( &p4, rType );
     323       73822 :     else if (rType == Interface5::static_type())
     324        1630 :         return ::com::sun::star::uno::Any( &p5, rType );
     325       72192 :     else if (rType == Interface6::static_type())
     326       20291 :         return ::com::sun::star::uno::Any( &p6, rType );
     327       51901 :     else if (rType == Interface7::static_type())
     328        1014 :         return ::com::sun::star::uno::Any( &p7, rType );
     329       50887 :     else if (rType == Interface8::static_type())
     330         299 :         return ::com::sun::star::uno::Any( &p8, rType );
     331       50588 :     else if (rType == Interface9::static_type())
     332       20040 :         return ::com::sun::star::uno::Any( &p9, rType );
     333             :     else
     334       30548 :         return ::com::sun::star::uno::Any();
     335             : }
     336             : /** Compares demanded type to given template argument types.
     337             : 
     338             :     @tparam Interface1 interface type
     339             :     @tparam Interface2 interface type
     340             :     @tparam Interface3 interface type
     341             :     @tparam Interface4 interface type
     342             :     @tparam Interface5 interface type
     343             :     @tparam Interface6 interface type
     344             :     @tparam Interface7 interface type
     345             :     @tparam Interface8 interface type
     346             :     @tparam Interface9 interface type
     347             :     @tparam Interface10 interface type
     348             :     @param rType demanded type
     349             :     @param p1 interface pointer
     350             :     @param p2 interface pointer
     351             :     @param p3 interface pointer
     352             :     @param p4 interface pointer
     353             :     @param p5 interface pointer
     354             :     @param p6 interface pointer
     355             :     @param p7 interface pointer
     356             :     @param p8 interface pointer
     357             :     @param p9 interface pointer
     358             :     @param p10 interface pointer
     359             :     @return acquired interface of demanded type or empty Any
     360             : */
     361             : template< class Interface1, class Interface2, class Interface3, class Interface4, class Interface5,
     362             :           class Interface6, class Interface7, class Interface8, class Interface9, class Interface10 >
     363      165727 : inline ::com::sun::star::uno::Any SAL_CALL queryInterface(
     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 )
     367             : {
     368      165727 :     if (rType == Interface1::static_type())
     369           0 :         return ::com::sun::star::uno::Any( &p1, rType );
     370      165727 :     else if (rType == Interface2::static_type())
     371           0 :         return ::com::sun::star::uno::Any( &p2, rType );
     372      165727 :     else if (rType == Interface3::static_type())
     373           0 :         return ::com::sun::star::uno::Any( &p3, rType );
     374      165727 :     else if (rType == Interface4::static_type())
     375      108114 :         return ::com::sun::star::uno::Any( &p4, rType );
     376       57613 :     else if (rType == Interface5::static_type())
     377        6519 :         return ::com::sun::star::uno::Any( &p5, rType );
     378       51094 :     else if (rType == Interface6::static_type())
     379       19669 :         return ::com::sun::star::uno::Any( &p6, rType );
     380       31425 :     else if (rType == Interface7::static_type())
     381           0 :         return ::com::sun::star::uno::Any( &p7, rType );
     382       31425 :     else if (rType == Interface8::static_type())
     383           0 :         return ::com::sun::star::uno::Any( &p8, rType );
     384       31425 :     else if (rType == Interface9::static_type())
     385           0 :         return ::com::sun::star::uno::Any( &p9, rType );
     386       31425 :     else if (rType == Interface10::static_type())
     387           4 :         return ::com::sun::star::uno::Any( &p10, rType );
     388             :     else
     389       31421 :         return ::com::sun::star::uno::Any();
     390             : }
     391             : /** Compares demanded type to given template argument types.
     392             : 
     393             :     @tparam Interface1 interface type
     394             :     @tparam Interface2 interface type
     395             :     @tparam Interface3 interface type
     396             :     @tparam Interface4 interface type
     397             :     @tparam Interface5 interface type
     398             :     @tparam Interface6 interface type
     399             :     @tparam Interface7 interface type
     400             :     @tparam Interface8 interface type
     401             :     @tparam Interface9 interface type
     402             :     @tparam Interface10 interface type
     403             :     @tparam Interface11 interface type
     404             :     @param rType demanded type
     405             :     @param p1 interface pointer
     406             :     @param p2 interface pointer
     407             :     @param p3 interface pointer
     408             :     @param p4 interface pointer
     409             :     @param p5 interface pointer
     410             :     @param p6 interface pointer
     411             :     @param p7 interface pointer
     412             :     @param p8 interface pointer
     413             :     @param p9 interface pointer
     414             :     @param p10 interface pointer
     415             :     @param p11 interface pointer
     416             :     @return acquired interface of demanded type or empty Any
     417             : */
     418             : template< class Interface1, class Interface2, class Interface3, class Interface4, class Interface5,
     419             :           class Interface6, class Interface7, class Interface8, class Interface9, class Interface10,
     420             :           class Interface11 >
     421   113247263 : inline ::com::sun::star::uno::Any SAL_CALL queryInterface(
     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,
     425             :     Interface11 * p11 )
     426             : {
     427   113247263 :     if (rType == Interface1::static_type())
     428         331 :         return ::com::sun::star::uno::Any( &p1, rType );
     429   113246932 :     else if (rType == Interface2::static_type())
     430      103927 :         return ::com::sun::star::uno::Any( &p2, rType );
     431   113143005 :     else if (rType == Interface3::static_type())
     432       47140 :         return ::com::sun::star::uno::Any( &p3, rType );
     433   113095865 :     else if (rType == Interface4::static_type())
     434      158968 :         return ::com::sun::star::uno::Any( &p4, rType );
     435   112936897 :     else if (rType == Interface5::static_type())
     436      799263 :         return ::com::sun::star::uno::Any( &p5, rType );
     437   112137634 :     else if (rType == Interface6::static_type())
     438       17695 :         return ::com::sun::star::uno::Any( &p6, rType );
     439   112119939 :     else if (rType == Interface7::static_type())
     440      142196 :         return ::com::sun::star::uno::Any( &p7, rType );
     441   111977743 :     else if (rType == Interface8::static_type())
     442       12992 :         return ::com::sun::star::uno::Any( &p8, rType );
     443   111964751 :     else if (rType == Interface9::static_type())
     444       71395 :         return ::com::sun::star::uno::Any( &p9, rType );
     445   111893356 :     else if (rType == Interface10::static_type())
     446       45268 :         return ::com::sun::star::uno::Any( &p10, rType );
     447   111848088 :     else if (rType == Interface11::static_type())
     448    81010475 :         return ::com::sun::star::uno::Any( &p11, rType );
     449             :     else
     450    30837613 :         return ::com::sun::star::uno::Any();
     451             : }
     452             : /** Compares demanded type to given template argument types.
     453             : 
     454             :     @tparam Interface1 interface type
     455             :     @tparam Interface2 interface type
     456             :     @tparam Interface3 interface type
     457             :     @tparam Interface4 interface type
     458             :     @tparam Interface5 interface type
     459             :     @tparam Interface6 interface type
     460             :     @tparam Interface7 interface type
     461             :     @tparam Interface8 interface type
     462             :     @tparam Interface9 interface type
     463             :     @tparam Interface10 interface type
     464             :     @tparam Interface11 interface type
     465             :     @tparam Interface12 interface type
     466             :     @param rType demanded type
     467             :     @param p1 interface pointer
     468             :     @param p2 interface pointer
     469             :     @param p3 interface pointer
     470             :     @param p4 interface pointer
     471             :     @param p5 interface pointer
     472             :     @param p6 interface pointer
     473             :     @param p7 interface pointer
     474             :     @param p8 interface pointer
     475             :     @param p9 interface pointer
     476             :     @param p10 interface pointer
     477             :     @param p11 interface pointer
     478             :     @param p12 interface pointer
     479             :     @return acquired interface of demanded type or empty Any
     480             : */
     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 >
     484       15319 : inline ::com::sun::star::uno::Any SAL_CALL queryInterface(
     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 )
     489             : {
     490       15319 :     if (rType == Interface1::static_type())
     491           2 :         return ::com::sun::star::uno::Any( &p1, rType );
     492       15317 :     else if (rType == Interface2::static_type())
     493           0 :         return ::com::sun::star::uno::Any( &p2, rType );
     494       15317 :     else if (rType == Interface3::static_type())
     495           0 :         return ::com::sun::star::uno::Any( &p3, rType );
     496       15317 :     else if (rType == Interface4::static_type())
     497        1946 :         return ::com::sun::star::uno::Any( &p4, rType );
     498       13371 :     else if (rType == Interface5::static_type())
     499        1462 :         return ::com::sun::star::uno::Any( &p5, rType );
     500       11909 :     else if (rType == Interface6::static_type())
     501           3 :         return ::com::sun::star::uno::Any( &p6, rType );
     502       11906 :     else if (rType == Interface7::static_type())
     503          40 :         return ::com::sun::star::uno::Any( &p7, rType );
     504       11866 :     else if (rType == Interface8::static_type())
     505         335 :         return ::com::sun::star::uno::Any( &p8, rType );
     506       11531 :     else if (rType == Interface9::static_type())
     507        3187 :         return ::com::sun::star::uno::Any( &p9, rType );
     508        8344 :     else if (rType == Interface10::static_type())
     509        2857 :         return ::com::sun::star::uno::Any( &p10, rType );
     510        5487 :     else if (rType == Interface11::static_type())
     511         331 :         return ::com::sun::star::uno::Any( &p11, rType );
     512        5156 :     else if (rType == Interface12::static_type())
     513        2275 :         return ::com::sun::star::uno::Any( &p12, rType );
     514             :     else
     515        2881 :         return ::com::sun::star::uno::Any();
     516             : }
     517             : 
     518             : }
     519             : 
     520             : #endif
     521             : 
     522             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.11