LCOV - code coverage report
Current view: top level - usr/local/src/libreoffice/include/cppuhelper - queryinterface.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 176 180 97.8 %
Date: 2013-07-09 Functions: 198 337 58.8 %
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 _CPPUHELPER_QUERYINTERFACE_HXX_
      21             : #define _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      313193 : inline ::com::sun::star::uno::Any SAL_CALL queryInterface(
      40             :     const ::com::sun::star::uno::Type & rType,
      41             :     Interface1 * p1 )
      42             :     SAL_THROW(())
      43             : {
      44      313193 :     if (rType == Interface1::static_type())
      45       52172 :         return ::com::sun::star::uno::Any( &p1, rType );
      46             :     else
      47      261021 :         return ::com::sun::star::uno::Any();
      48             : }
      49             : /** Compares demanded type to given template argument types.
      50             : 
      51             :     @tparam Interface1 interface type
      52             :     @tparam Interface2 interface type
      53             :     @param rType demanded type
      54             :     @param p1 interface pointer
      55             :     @param p2 interface pointer
      56             :     @return acquired interface of demanded type or empty Any
      57             : */
      58             : template< class Interface1, class Interface2 >
      59     3628681 : inline ::com::sun::star::uno::Any SAL_CALL queryInterface(
      60             :     const ::com::sun::star::uno::Type & rType,
      61             :     Interface1 * p1, Interface2 * p2 )
      62             :     SAL_THROW(())
      63             : {
      64     3628681 :     if (rType == Interface1::static_type())
      65      452168 :         return ::com::sun::star::uno::Any( &p1, rType );
      66     3176515 :     else if (rType == Interface2::static_type())
      67      873658 :         return ::com::sun::star::uno::Any( &p2, rType );
      68             :     else
      69     2302857 :         return ::com::sun::star::uno::Any();
      70             : }
      71             : /** Compares demanded type to given template argument types.
      72             : 
      73             :     @tparam Interface1 interface type
      74             :     @tparam Interface2 interface type
      75             :     @tparam Interface3 interface type
      76             :     @param rType demanded type
      77             :     @param p1 interface pointer
      78             :     @param p2 interface pointer
      79             :     @param p3 interface pointer
      80             :     @return acquired interface of demanded type or empty Any
      81             : */
      82             : template< class Interface1, class Interface2, class Interface3 >
      83     1251692 : inline ::com::sun::star::uno::Any SAL_CALL queryInterface(
      84             :     const ::com::sun::star::uno::Type & rType,
      85             :     Interface1 * p1, Interface2 * p2, Interface3 * p3 )
      86             :     SAL_THROW(())
      87             : {
      88     1251692 :     if (rType == Interface1::static_type())
      89      686424 :         return ::com::sun::star::uno::Any( &p1, rType );
      90      565268 :     else if (rType == Interface2::static_type())
      91       11483 :         return ::com::sun::star::uno::Any( &p2, rType );
      92      553785 :     else if (rType == Interface3::static_type())
      93      158686 :         return ::com::sun::star::uno::Any( &p3, rType );
      94             :     else
      95      395099 :         return ::com::sun::star::uno::Any();
      96             : }
      97             : /** Compares demanded type to given template argument types.
      98             : 
      99             :     @tparam Interface1 interface type
     100             :     @tparam Interface2 interface type
     101             :     @tparam Interface3 interface type
     102             :     @tparam Interface4 interface type
     103             :     @param rType demanded type
     104             :     @param p1 interface pointer
     105             :     @param p2 interface pointer
     106             :     @param p3 interface pointer
     107             :     @param p4 interface pointer
     108             :     @return acquired interface of demanded type or empty Any
     109             : */
     110             : template< class Interface1, class Interface2, class Interface3, class Interface4 >
     111      439678 : inline ::com::sun::star::uno::Any SAL_CALL queryInterface(
     112             :     const ::com::sun::star::uno::Type & rType,
     113             :     Interface1 * p1, Interface2 * p2, Interface3 * p3, Interface4 * p4 )
     114             :     SAL_THROW(())
     115             : {
     116      439678 :     if (rType == Interface1::static_type())
     117       26298 :         return ::com::sun::star::uno::Any( &p1, rType );
     118      413380 :     else if (rType == Interface2::static_type())
     119      254162 :         return ::com::sun::star::uno::Any( &p2, rType );
     120      159218 :     else if (rType == Interface3::static_type())
     121       34372 :         return ::com::sun::star::uno::Any( &p3, rType );
     122      124846 :     else if (rType == Interface4::static_type())
     123       47434 :         return ::com::sun::star::uno::Any( &p4, rType );
     124             :     else
     125       77412 :         return ::com::sun::star::uno::Any();
     126             : }
     127             : /** Compares demanded type to given template argument types.
     128             : 
     129             :     @tparam Interface1 interface type
     130             :     @tparam Interface2 interface type
     131             :     @tparam Interface3 interface type
     132             :     @tparam Interface4 interface type
     133             :     @tparam Interface5 interface type
     134             :     @param rType demanded type
     135             :     @param p1 interface pointer
     136             :     @param p2 interface pointer
     137             :     @param p3 interface pointer
     138             :     @param p4 interface pointer
     139             :     @param p5 interface pointer
     140             :     @return acquired interface of demanded type or empty Any
     141             : */
     142             : template< class Interface1, class Interface2, class Interface3, class Interface4, class Interface5 >
     143       94165 : inline ::com::sun::star::uno::Any SAL_CALL queryInterface(
     144             :     const ::com::sun::star::uno::Type & rType,
     145             :     Interface1 * p1, Interface2 * p2, Interface3 * p3, Interface4 * p4, Interface5 * p5 )
     146             :     SAL_THROW(())
     147             : {
     148       94165 :     if (rType == Interface1::static_type())
     149        5902 :         return ::com::sun::star::uno::Any( &p1, rType );
     150       88263 :     else if (rType == Interface2::static_type())
     151       16523 :         return ::com::sun::star::uno::Any( &p2, rType );
     152       71740 :     else if (rType == Interface3::static_type())
     153        8368 :         return ::com::sun::star::uno::Any( &p3, rType );
     154       63372 :     else if (rType == Interface4::static_type())
     155       17297 :         return ::com::sun::star::uno::Any( &p4, rType );
     156       46075 :     else if (rType == Interface5::static_type())
     157       18197 :         return ::com::sun::star::uno::Any( &p5, rType );
     158             :     else
     159       27878 :         return ::com::sun::star::uno::Any();
     160             : }
     161             : /** Compares demanded type to given template argument types.
     162             : 
     163             :     @tparam Interface1 interface type
     164             :     @tparam Interface2 interface type
     165             :     @tparam Interface3 interface type
     166             :     @tparam Interface4 interface type
     167             :     @tparam Interface5 interface type
     168             :     @tparam Interface6 interface type
     169             :     @param rType demanded type
     170             :     @param p1 interface pointer
     171             :     @param p2 interface pointer
     172             :     @param p3 interface pointer
     173             :     @param p4 interface pointer
     174             :     @param p5 interface pointer
     175             :     @param p6 interface pointer
     176             :     @return acquired interface of demanded type or empty Any
     177             : */
     178             : template< class Interface1, class Interface2, class Interface3, class Interface4, class Interface5,
     179             :           class Interface6 >
     180      837441 : inline ::com::sun::star::uno::Any SAL_CALL queryInterface(
     181             :     const ::com::sun::star::uno::Type & rType,
     182             :     Interface1 * p1, Interface2 * p2, Interface3 * p3, Interface4 * p4, Interface5 * p5,
     183             :     Interface6 * p6 )
     184             :     SAL_THROW(())
     185             : {
     186      837441 :     if (rType == Interface1::static_type())
     187       80730 :         return ::com::sun::star::uno::Any( &p1, rType );
     188      756711 :     else if (rType == Interface2::static_type())
     189      267485 :         return ::com::sun::star::uno::Any( &p2, rType );
     190      489226 :     else if (rType == Interface3::static_type())
     191       99369 :         return ::com::sun::star::uno::Any( &p3, rType );
     192      389857 :     else if (rType == Interface4::static_type())
     193       46194 :         return ::com::sun::star::uno::Any( &p4, rType );
     194      343663 :     else if (rType == Interface5::static_type())
     195      136007 :         return ::com::sun::star::uno::Any( &p5, rType );
     196      207656 :     else if (rType == Interface6::static_type())
     197       38443 :         return ::com::sun::star::uno::Any( &p6, rType );
     198             :     else
     199      169213 :         return ::com::sun::star::uno::Any();
     200             : }
     201             : /** Compares demanded type to given template argument types.
     202             : 
     203             :     @tparam Interface1 interface type
     204             :     @tparam Interface2 interface type
     205             :     @tparam Interface3 interface type
     206             :     @tparam Interface4 interface type
     207             :     @tparam Interface5 interface type
     208             :     @tparam Interface6 interface type
     209             :     @tparam Interface7 interface type
     210             :     @param rType demanded type
     211             :     @param p1 interface pointer
     212             :     @param p2 interface pointer
     213             :     @param p3 interface pointer
     214             :     @param p4 interface pointer
     215             :     @param p5 interface pointer
     216             :     @param p6 interface pointer
     217             :     @param p7 interface pointer
     218             :     @return acquired interface of demanded type or empty Any
     219             : */
     220             : template< class Interface1, class Interface2, class Interface3, class Interface4, class Interface5,
     221             :           class Interface6, class Interface7 >
     222      203101 : inline ::com::sun::star::uno::Any SAL_CALL queryInterface(
     223             :     const ::com::sun::star::uno::Type & rType,
     224             :     Interface1 * p1, Interface2 * p2, Interface3 * p3, Interface4 * p4, Interface5 * p5,
     225             :     Interface6 * p6, Interface7 * p7 )
     226             :     SAL_THROW(())
     227             : {
     228      203101 :     if (rType == Interface1::static_type())
     229         432 :         return ::com::sun::star::uno::Any( &p1, rType );
     230      202669 :     else if (rType == Interface2::static_type())
     231       95286 :         return ::com::sun::star::uno::Any( &p2, rType );
     232      107383 :     else if (rType == Interface3::static_type())
     233       44334 :         return ::com::sun::star::uno::Any( &p3, rType );
     234       63049 :     else if (rType == Interface4::static_type())
     235        7633 :         return ::com::sun::star::uno::Any( &p4, rType );
     236       55416 :     else if (rType == Interface5::static_type())
     237       19755 :         return ::com::sun::star::uno::Any( &p5, rType );
     238       35661 :     else if (rType == Interface6::static_type())
     239       25358 :         return ::com::sun::star::uno::Any( &p6, rType );
     240       10303 :     else if (rType == Interface7::static_type())
     241         341 :         return ::com::sun::star::uno::Any( &p7, rType );
     242             :     else
     243        9962 :         return ::com::sun::star::uno::Any();
     244             : }
     245             : /** Compares demanded type to given template argument types.
     246             : 
     247             :     @tparam Interface1 interface type
     248             :     @tparam Interface2 interface type
     249             :     @tparam Interface3 interface type
     250             :     @tparam Interface4 interface type
     251             :     @tparam Interface5 interface type
     252             :     @tparam Interface6 interface type
     253             :     @tparam Interface7 interface type
     254             :     @tparam Interface8 interface type
     255             :     @param rType demanded type
     256             :     @param p1 interface pointer
     257             :     @param p2 interface pointer
     258             :     @param p3 interface pointer
     259             :     @param p4 interface pointer
     260             :     @param p5 interface pointer
     261             :     @param p6 interface pointer
     262             :     @param p7 interface pointer
     263             :     @param p8 interface pointer
     264             :     @return acquired interface of demanded type or empty Any
     265             : */
     266             : template< class Interface1, class Interface2, class Interface3, class Interface4, class Interface5,
     267             :           class Interface6, class Interface7, class Interface8 >
     268      142125 : inline ::com::sun::star::uno::Any SAL_CALL queryInterface(
     269             :     const ::com::sun::star::uno::Type & rType,
     270             :     Interface1 * p1, Interface2 * p2, Interface3 * p3, Interface4 * p4, Interface5 * p5,
     271             :     Interface6 * p6, Interface7 * p7, Interface8 * p8 )
     272             :     SAL_THROW(())
     273             : {
     274      142125 :     if (rType == Interface1::static_type())
     275           1 :         return ::com::sun::star::uno::Any( &p1, rType );
     276      142124 :     else if (rType == Interface2::static_type())
     277       15014 :         return ::com::sun::star::uno::Any( &p2, rType );
     278      127110 :     else if (rType == Interface3::static_type())
     279         154 :         return ::com::sun::star::uno::Any( &p3, rType );
     280      126956 :     else if (rType == Interface4::static_type())
     281        2255 :         return ::com::sun::star::uno::Any( &p4, rType );
     282      124701 :     else if (rType == Interface5::static_type())
     283       98076 :         return ::com::sun::star::uno::Any( &p5, rType );
     284       26625 :     else if (rType == Interface6::static_type())
     285        3565 :         return ::com::sun::star::uno::Any( &p6, rType );
     286       23060 :     else if (rType == Interface7::static_type())
     287         134 :         return ::com::sun::star::uno::Any( &p7, rType );
     288       22926 :     else if (rType == Interface8::static_type())
     289       15174 :         return ::com::sun::star::uno::Any( &p8, rType );
     290             :     else
     291        7752 :         return ::com::sun::star::uno::Any();
     292             : }
     293             : /** Compares demanded type to given template argument types.
     294             : 
     295             :     @tparam Interface1 interface type
     296             :     @tparam Interface2 interface type
     297             :     @tparam Interface3 interface type
     298             :     @tparam Interface4 interface type
     299             :     @tparam Interface5 interface type
     300             :     @tparam Interface6 interface type
     301             :     @tparam Interface7 interface type
     302             :     @tparam Interface8 interface type
     303             :     @tparam Interface9 interface type
     304             :     @param rType demanded type
     305             :     @param p1 interface pointer
     306             :     @param p2 interface pointer
     307             :     @param p3 interface pointer
     308             :     @param p4 interface pointer
     309             :     @param p5 interface pointer
     310             :     @param p6 interface pointer
     311             :     @param p7 interface pointer
     312             :     @param p8 interface pointer
     313             :     @param p9 interface pointer
     314             :     @return acquired interface of demanded type or empty Any
     315             : */
     316             : template< class Interface1, class Interface2, class Interface3, class Interface4, class Interface5,
     317             :           class Interface6, class Interface7, class Interface8, class Interface9 >
     318      110009 : inline ::com::sun::star::uno::Any SAL_CALL queryInterface(
     319             :     const ::com::sun::star::uno::Type & rType,
     320             :     Interface1 * p1, Interface2 * p2, Interface3 * p3, Interface4 * p4, Interface5 * p5,
     321             :     Interface6 * p6, Interface7 * p7, Interface8 * p8, Interface9 * p9 )
     322             :     SAL_THROW(())
     323             : {
     324      110009 :     if (rType == Interface1::static_type())
     325       87337 :         return ::com::sun::star::uno::Any( &p1, rType );
     326       22672 :     else if (rType == Interface2::static_type())
     327         726 :         return ::com::sun::star::uno::Any( &p2, rType );
     328       21946 :     else if (rType == Interface3::static_type())
     329        2284 :         return ::com::sun::star::uno::Any( &p3, rType );
     330       19662 :     else if (rType == Interface4::static_type())
     331        2678 :         return ::com::sun::star::uno::Any( &p4, rType );
     332       16984 :     else if (rType == Interface5::static_type())
     333         891 :         return ::com::sun::star::uno::Any( &p5, rType );
     334       16093 :     else if (rType == Interface6::static_type())
     335        7655 :         return ::com::sun::star::uno::Any( &p6, rType );
     336        8438 :     else if (rType == Interface7::static_type())
     337         727 :         return ::com::sun::star::uno::Any( &p7, rType );
     338        7711 :     else if (rType == Interface8::static_type())
     339         157 :         return ::com::sun::star::uno::Any( &p8, rType );
     340        7554 :     else if (rType == Interface9::static_type())
     341        2679 :         return ::com::sun::star::uno::Any( &p9, rType );
     342             :     else
     343        4875 :         return ::com::sun::star::uno::Any();
     344             : }
     345             : /** Compares demanded type to given template argument types.
     346             : 
     347             :     @tparam Interface1 interface type
     348             :     @tparam Interface2 interface type
     349             :     @tparam Interface3 interface type
     350             :     @tparam Interface4 interface type
     351             :     @tparam Interface5 interface type
     352             :     @tparam Interface6 interface type
     353             :     @tparam Interface7 interface type
     354             :     @tparam Interface8 interface type
     355             :     @tparam Interface9 interface type
     356             :     @tparam Interface10 interface type
     357             :     @param rType demanded type
     358             :     @param p1 interface pointer
     359             :     @param p2 interface pointer
     360             :     @param p3 interface pointer
     361             :     @param p4 interface pointer
     362             :     @param p5 interface pointer
     363             :     @param p6 interface pointer
     364             :     @param p7 interface pointer
     365             :     @param p8 interface pointer
     366             :     @param p9 interface pointer
     367             :     @param p10 interface pointer
     368             :     @return acquired interface of demanded type or empty Any
     369             : */
     370             : template< class Interface1, class Interface2, class Interface3, class Interface4, class Interface5,
     371             :           class Interface6, class Interface7, class Interface8, class Interface9, class Interface10 >
     372      127711 : inline ::com::sun::star::uno::Any SAL_CALL queryInterface(
     373             :     const ::com::sun::star::uno::Type & rType,
     374             :     Interface1 * p1, Interface2 * p2, Interface3 * p3, Interface4 * p4, Interface5 * p5,
     375             :     Interface6 * p6, Interface7 * p7, Interface8 * p8, Interface9 * p9, Interface10 * p10 )
     376             :     SAL_THROW(())
     377             : {
     378      127711 :     if (rType == Interface1::static_type())
     379           1 :         return ::com::sun::star::uno::Any( &p1, rType );
     380      127710 :     else if (rType == Interface2::static_type())
     381       14472 :         return ::com::sun::star::uno::Any( &p2, rType );
     382      113238 :     else if (rType == Interface3::static_type())
     383         256 :         return ::com::sun::star::uno::Any( &p3, rType );
     384      112982 :     else if (rType == Interface4::static_type())
     385       58073 :         return ::com::sun::star::uno::Any( &p4, rType );
     386       54909 :     else if (rType == Interface5::static_type())
     387        4724 :         return ::com::sun::star::uno::Any( &p5, rType );
     388       50185 :     else if (rType == Interface6::static_type())
     389       10956 :         return ::com::sun::star::uno::Any( &p6, rType );
     390       39229 :     else if (rType == Interface7::static_type())
     391        3688 :         return ::com::sun::star::uno::Any( &p7, rType );
     392       35541 :     else if (rType == Interface8::static_type())
     393        6824 :         return ::com::sun::star::uno::Any( &p8, rType );
     394       28717 :     else if (rType == Interface9::static_type())
     395       14911 :         return ::com::sun::star::uno::Any( &p9, rType );
     396       13806 :     else if (rType == Interface10::static_type())
     397           0 :         return ::com::sun::star::uno::Any( &p10, rType );
     398             :     else
     399       13806 :         return ::com::sun::star::uno::Any();
     400             : }
     401             : /** Compares demanded type to given template argument types.
     402             : 
     403             :     @tparam Interface1 interface type
     404             :     @tparam Interface2 interface type
     405             :     @tparam Interface3 interface type
     406             :     @tparam Interface4 interface type
     407             :     @tparam Interface5 interface type
     408             :     @tparam Interface6 interface type
     409             :     @tparam Interface7 interface type
     410             :     @tparam Interface8 interface type
     411             :     @tparam Interface9 interface type
     412             :     @tparam Interface10 interface type
     413             :     @tparam Interface11 interface type
     414             :     @param rType demanded type
     415             :     @param p1 interface pointer
     416             :     @param p2 interface pointer
     417             :     @param p3 interface pointer
     418             :     @param p4 interface pointer
     419             :     @param p5 interface pointer
     420             :     @param p6 interface pointer
     421             :     @param p7 interface pointer
     422             :     @param p8 interface pointer
     423             :     @param p9 interface pointer
     424             :     @param p10 interface pointer
     425             :     @param p11 interface pointer
     426             :     @return acquired interface of demanded type or empty Any
     427             : */
     428             : template< class Interface1, class Interface2, class Interface3, class Interface4, class Interface5,
     429             :           class Interface6, class Interface7, class Interface8, class Interface9, class Interface10,
     430             :           class Interface11 >
     431     2236920 : inline ::com::sun::star::uno::Any SAL_CALL queryInterface(
     432             :     const ::com::sun::star::uno::Type & rType,
     433             :     Interface1 * p1, Interface2 * p2, Interface3 * p3, Interface4 * p4, Interface5 * p5,
     434             :     Interface6 * p6, Interface7 * p7, Interface8 * p8, Interface9 * p9, Interface10 * p10,
     435             :     Interface11 * p11 )
     436             :     SAL_THROW(())
     437             : {
     438     2236920 :     if (rType == Interface1::static_type())
     439         377 :         return ::com::sun::star::uno::Any( &p1, rType );
     440     2236543 :     else if (rType == Interface2::static_type())
     441       19403 :         return ::com::sun::star::uno::Any( &p2, rType );
     442     2217140 :     else if (rType == Interface3::static_type())
     443       20453 :         return ::com::sun::star::uno::Any( &p3, rType );
     444     2196687 :     else if (rType == Interface4::static_type())
     445       72658 :         return ::com::sun::star::uno::Any( &p4, rType );
     446     2124029 :     else if (rType == Interface5::static_type())
     447      295444 :         return ::com::sun::star::uno::Any( &p5, rType );
     448     1828585 :     else if (rType == Interface6::static_type())
     449        6215 :         return ::com::sun::star::uno::Any( &p6, rType );
     450     1822370 :     else if (rType == Interface7::static_type())
     451       61774 :         return ::com::sun::star::uno::Any( &p7, rType );
     452     1760596 :     else if (rType == Interface8::static_type())
     453        4465 :         return ::com::sun::star::uno::Any( &p8, rType );
     454     1756131 :     else if (rType == Interface9::static_type())
     455       30538 :         return ::com::sun::star::uno::Any( &p9, rType );
     456     1725593 :     else if (rType == Interface10::static_type())
     457       35320 :         return ::com::sun::star::uno::Any( &p10, rType );
     458     1690273 :     else if (rType == Interface11::static_type())
     459      426215 :         return ::com::sun::star::uno::Any( &p11, rType );
     460             :     else
     461     1264058 :         return ::com::sun::star::uno::Any();
     462             : }
     463             : /** Compares demanded type to given template argument types.
     464             : 
     465             :     @tparam Interface1 interface type
     466             :     @tparam Interface2 interface type
     467             :     @tparam Interface3 interface type
     468             :     @tparam Interface4 interface type
     469             :     @tparam Interface5 interface type
     470             :     @tparam Interface6 interface type
     471             :     @tparam Interface7 interface type
     472             :     @tparam Interface8 interface type
     473             :     @tparam Interface9 interface type
     474             :     @tparam Interface10 interface type
     475             :     @tparam Interface11 interface type
     476             :     @tparam Interface12 interface type
     477             :     @param rType demanded type
     478             :     @param p1 interface pointer
     479             :     @param p2 interface pointer
     480             :     @param p3 interface pointer
     481             :     @param p4 interface pointer
     482             :     @param p5 interface pointer
     483             :     @param p6 interface pointer
     484             :     @param p7 interface pointer
     485             :     @param p8 interface pointer
     486             :     @param p9 interface pointer
     487             :     @param p10 interface pointer
     488             :     @param p11 interface pointer
     489             :     @param p12 interface pointer
     490             :     @return acquired interface of demanded type or empty Any
     491             : */
     492             : template< class Interface1, class Interface2, class Interface3, class Interface4, class Interface5,
     493             :           class Interface6, class Interface7, class Interface8, class Interface9, class Interface10,
     494             :           class Interface11, class Interface12 >
     495        6182 : inline ::com::sun::star::uno::Any SAL_CALL queryInterface(
     496             :     const ::com::sun::star::uno::Type & rType,
     497             :     Interface1 * p1, Interface2 * p2, Interface3 * p3, Interface4 * p4, Interface5 * p5,
     498             :     Interface6 * p6, Interface7 * p7, Interface8 * p8, Interface9 * p9, Interface10 * p10,
     499             :     Interface11 * p11, Interface12 * p12 )
     500             :     SAL_THROW(())
     501             : {
     502        6182 :     if (rType == Interface1::static_type())
     503           5 :         return ::com::sun::star::uno::Any( &p1, rType );
     504        6177 :     else if (rType == Interface2::static_type())
     505           0 :         return ::com::sun::star::uno::Any( &p2, rType );
     506        6177 :     else if (rType == Interface3::static_type())
     507           0 :         return ::com::sun::star::uno::Any( &p3, rType );
     508        6177 :     else if (rType == Interface4::static_type())
     509         754 :         return ::com::sun::star::uno::Any( &p4, rType );
     510        5423 :     else if (rType == Interface5::static_type())
     511         232 :         return ::com::sun::star::uno::Any( &p5, rType );
     512        5191 :     else if (rType == Interface6::static_type())
     513           0 :         return ::com::sun::star::uno::Any( &p6, rType );
     514        5191 :     else if (rType == Interface7::static_type())
     515           2 :         return ::com::sun::star::uno::Any( &p7, rType );
     516        5189 :     else if (rType == Interface8::static_type())
     517          10 :         return ::com::sun::star::uno::Any( &p8, rType );
     518        5179 :     else if (rType == Interface9::static_type())
     519        1375 :         return ::com::sun::star::uno::Any( &p9, rType );
     520        3804 :     else if (rType == Interface10::static_type())
     521        1059 :         return ::com::sun::star::uno::Any( &p10, rType );
     522        2745 :     else if (rType == Interface11::static_type())
     523          41 :         return ::com::sun::star::uno::Any( &p11, rType );
     524        2704 :     else if (rType == Interface12::static_type())
     525        1002 :         return ::com::sun::star::uno::Any( &p12, rType );
     526             :     else
     527        1702 :         return ::com::sun::star::uno::Any();
     528             : }
     529             : 
     530             : }
     531             : 
     532             : #endif
     533             : 
     534             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10