LCOV - code coverage report
Current view: top level - solver/unxlngi6.pro/inc/cppuhelper - queryinterface.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 174 180 96.7 %
Date: 2012-08-25 Functions: 193 340 56.8 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 208 312 66.7 %

           Branch data     Line data    Source code
       1                 :            : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
       2                 :            : /*************************************************************************
       3                 :            :  *
       4                 :            :  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
       5                 :            :  *
       6                 :            :  * Copyright 2000, 2010 Oracle and/or its affiliates.
       7                 :            :  *
       8                 :            :  * OpenOffice.org - a multi-platform office productivity suite
       9                 :            :  *
      10                 :            :  * This file is part of OpenOffice.org.
      11                 :            :  *
      12                 :            :  * OpenOffice.org is free software: you can redistribute it and/or modify
      13                 :            :  * it under the terms of the GNU Lesser General Public License version 3
      14                 :            :  * only, as published by the Free Software Foundation.
      15                 :            :  *
      16                 :            :  * OpenOffice.org is distributed in the hope that it will be useful,
      17                 :            :  * but WITHOUT ANY WARRANTY; without even the implied warranty of
      18                 :            :  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
      19                 :            :  * GNU Lesser General Public License version 3 for more details
      20                 :            :  * (a copy is included in the LICENSE file that accompanied this code).
      21                 :            :  *
      22                 :            :  * You should have received a copy of the GNU Lesser General Public License
      23                 :            :  * version 3 along with OpenOffice.org.  If not, see
      24                 :            :  * <http://www.openoffice.org/license.html>
      25                 :            :  * for a copy of the LGPLv3 License.
      26                 :            :  *
      27                 :            :  ************************************************************************/
      28                 :            : 
      29                 :            : #ifndef _CPPUHELPER_QUERYINTERFACE_HXX_
      30                 :            : #define _CPPUHELPER_QUERYINTERFACE_HXX_
      31                 :            : 
      32                 :            : #include "sal/config.h"
      33                 :            : #include "com/sun/star/uno/Any.hxx"
      34                 :            : #include "com/sun/star/uno/Type.hxx"
      35                 :            : #include "sal/types.h"
      36                 :            : 
      37                 :            : namespace cppu
      38                 :            : {
      39                 :            : 
      40                 :            : /** Compares demanded type to given template argument types.
      41                 :            : 
      42                 :            :     @tparam Interface1 interface type
      43                 :            :     @param rType demanded type
      44                 :            :     @param p1 interface pointer
      45                 :            :     @return acquired interface of demanded type or empty Any
      46                 :            : */
      47                 :            : template< class Interface1 >
      48                 :     544476 : inline ::com::sun::star::uno::Any SAL_CALL queryInterface(
      49                 :            :     const ::com::sun::star::uno::Type & rType,
      50                 :            :     Interface1 * p1 )
      51                 :            :     SAL_THROW(())
      52                 :            : {
      53 [ +  + ][ +  + ]:     544476 :     if (rType == Interface1::static_type())
         [ #  # ][ +  + ]
         [ +  + ][ +  + ]
         [ +  + ][ +  + ]
         [ -  + ][ +  + ]
         [ #  # ][ +  + ]
      54                 :      83031 :         return ::com::sun::star::uno::Any( &p1, rType );
      55                 :            :     else
      56                 :     544476 :         return ::com::sun::star::uno::Any();
      57                 :            : }
      58                 :            : /** Compares demanded type to given template argument types.
      59                 :            : 
      60                 :            :     @tparam Interface1 interface type
      61                 :            :     @tparam Interface2 interface type
      62                 :            :     @param rType demanded type
      63                 :            :     @param p1 interface pointer
      64                 :            :     @param p2 interface pointer
      65                 :            :     @return acquired interface of demanded type or empty Any
      66                 :            : */
      67                 :            : template< class Interface1, class Interface2 >
      68                 :    7006174 : inline ::com::sun::star::uno::Any SAL_CALL queryInterface(
      69                 :            :     const ::com::sun::star::uno::Type & rType,
      70                 :            :     Interface1 * p1, Interface2 * p2 )
      71                 :            :     SAL_THROW(())
      72                 :            : {
      73 [ +  + ][ +  + ]:    7006174 :     if (rType == Interface1::static_type())
         [ +  + ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ +  - ][ +  - ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ +  - ][ +  - ]
         [ #  # ][ +  + ]
                 [ +  - ]
      74                 :    1193492 :         return ::com::sun::star::uno::Any( &p1, rType );
      75 [ +  + ][ +  + ]:    5812682 :     else if (rType == Interface2::static_type())
         [ -  + ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ -  + ]
                 [ #  # ]
      76                 :    1781178 :         return ::com::sun::star::uno::Any( &p2, rType );
      77                 :            :     else
      78                 :    7006174 :         return ::com::sun::star::uno::Any();
      79                 :            : }
      80                 :            : /** Compares demanded type to given template argument types.
      81                 :            : 
      82                 :            :     @tparam Interface1 interface type
      83                 :            :     @tparam Interface2 interface type
      84                 :            :     @tparam Interface3 interface type
      85                 :            :     @param rType demanded type
      86                 :            :     @param p1 interface pointer
      87                 :            :     @param p2 interface pointer
      88                 :            :     @param p3 interface pointer
      89                 :            :     @return acquired interface of demanded type or empty Any
      90                 :            : */
      91                 :            : template< class Interface1, class Interface2, class Interface3 >
      92                 :    1877395 : inline ::com::sun::star::uno::Any SAL_CALL queryInterface(
      93                 :            :     const ::com::sun::star::uno::Type & rType,
      94                 :            :     Interface1 * p1, Interface2 * p2, Interface3 * p3 )
      95                 :            :     SAL_THROW(())
      96                 :            : {
      97 [ +  + ][ -  + ]:    1877395 :     if (rType == Interface1::static_type())
         [ #  # ][ #  # ]
         [ -  + ][ -  + ]
      98                 :     454971 :         return ::com::sun::star::uno::Any( &p1, rType );
      99 [ +  + ][ -  + ]:    1422424 :     else if (rType == Interface2::static_type())
         [ #  # ][ #  # ]
         [ -  + ][ -  + ]
     100                 :      31417 :         return ::com::sun::star::uno::Any( &p2, rType );
     101 [ +  + ][ -  + ]:    1391007 :     else if (rType == Interface3::static_type())
         [ #  # ][ #  # ]
         [ -  + ][ +  + ]
     102                 :     360414 :         return ::com::sun::star::uno::Any( &p3, rType );
     103                 :            :     else
     104                 :    1877395 :         return ::com::sun::star::uno::Any();
     105                 :            : }
     106                 :            : /** Compares demanded type to given template argument types.
     107                 :            : 
     108                 :            :     @tparam Interface1 interface type
     109                 :            :     @tparam Interface2 interface type
     110                 :            :     @tparam Interface3 interface type
     111                 :            :     @tparam Interface4 interface type
     112                 :            :     @param rType demanded type
     113                 :            :     @param p1 interface pointer
     114                 :            :     @param p2 interface pointer
     115                 :            :     @param p3 interface pointer
     116                 :            :     @param p4 interface pointer
     117                 :            :     @return acquired interface of demanded type or empty Any
     118                 :            : */
     119                 :            : template< class Interface1, class Interface2, class Interface3, class Interface4 >
     120                 :     753547 : inline ::com::sun::star::uno::Any SAL_CALL queryInterface(
     121                 :            :     const ::com::sun::star::uno::Type & rType,
     122                 :            :     Interface1 * p1, Interface2 * p2, Interface3 * p3, Interface4 * p4 )
     123                 :            :     SAL_THROW(())
     124                 :            : {
     125 [ +  + ][ -  + ]:     753547 :     if (rType == Interface1::static_type())
     126                 :      51634 :         return ::com::sun::star::uno::Any( &p1, rType );
     127 [ +  + ][ -  + ]:     701913 :     else if (rType == Interface2::static_type())
     128                 :     411974 :         return ::com::sun::star::uno::Any( &p2, rType );
     129 [ +  + ][ +  + ]:     289939 :     else if (rType == Interface3::static_type())
     130                 :      61016 :         return ::com::sun::star::uno::Any( &p3, rType );
     131 [ +  + ][ +  + ]:     228923 :     else if (rType == Interface4::static_type())
     132                 :      91775 :         return ::com::sun::star::uno::Any( &p4, rType );
     133                 :            :     else
     134                 :     753547 :         return ::com::sun::star::uno::Any();
     135                 :            : }
     136                 :            : /** Compares demanded type to given template argument types.
     137                 :            : 
     138                 :            :     @tparam Interface1 interface type
     139                 :            :     @tparam Interface2 interface type
     140                 :            :     @tparam Interface3 interface type
     141                 :            :     @tparam Interface4 interface type
     142                 :            :     @tparam Interface5 interface type
     143                 :            :     @param rType demanded type
     144                 :            :     @param p1 interface pointer
     145                 :            :     @param p2 interface pointer
     146                 :            :     @param p3 interface pointer
     147                 :            :     @param p4 interface pointer
     148                 :            :     @param p5 interface pointer
     149                 :            :     @return acquired interface of demanded type or empty Any
     150                 :            : */
     151                 :            : template< class Interface1, class Interface2, class Interface3, class Interface4, class Interface5 >
     152                 :      97910 : inline ::com::sun::star::uno::Any SAL_CALL queryInterface(
     153                 :            :     const ::com::sun::star::uno::Type & rType,
     154                 :            :     Interface1 * p1, Interface2 * p2, Interface3 * p3, Interface4 * p4, Interface5 * p5 )
     155                 :            :     SAL_THROW(())
     156                 :            : {
     157         [ +  + ]:      97910 :     if (rType == Interface1::static_type())
     158                 :       7780 :         return ::com::sun::star::uno::Any( &p1, rType );
     159         [ +  + ]:      90130 :     else if (rType == Interface2::static_type())
     160                 :      10326 :         return ::com::sun::star::uno::Any( &p2, rType );
     161         [ +  + ]:      79804 :     else if (rType == Interface3::static_type())
     162                 :      13898 :         return ::com::sun::star::uno::Any( &p3, rType );
     163         [ +  + ]:      65906 :     else if (rType == Interface4::static_type())
     164                 :      21463 :         return ::com::sun::star::uno::Any( &p4, rType );
     165         [ +  + ]:      44443 :     else if (rType == Interface5::static_type())
     166                 :      11833 :         return ::com::sun::star::uno::Any( &p5, rType );
     167                 :            :     else
     168                 :      97910 :         return ::com::sun::star::uno::Any();
     169                 :            : }
     170                 :            : /** Compares demanded type to given template argument types.
     171                 :            : 
     172                 :            :     @tparam Interface1 interface type
     173                 :            :     @tparam Interface2 interface type
     174                 :            :     @tparam Interface3 interface type
     175                 :            :     @tparam Interface4 interface type
     176                 :            :     @tparam Interface5 interface type
     177                 :            :     @tparam Interface6 interface type
     178                 :            :     @param rType demanded type
     179                 :            :     @param p1 interface pointer
     180                 :            :     @param p2 interface pointer
     181                 :            :     @param p3 interface pointer
     182                 :            :     @param p4 interface pointer
     183                 :            :     @param p5 interface pointer
     184                 :            :     @param p6 interface pointer
     185                 :            :     @return acquired interface of demanded type or empty Any
     186                 :            : */
     187                 :            : template< class Interface1, class Interface2, class Interface3, class Interface4, class Interface5,
     188                 :            :           class Interface6 >
     189                 :    1641355 : inline ::com::sun::star::uno::Any SAL_CALL queryInterface(
     190                 :            :     const ::com::sun::star::uno::Type & rType,
     191                 :            :     Interface1 * p1, Interface2 * p2, Interface3 * p3, Interface4 * p4, Interface5 * p5,
     192                 :            :     Interface6 * p6 )
     193                 :            :     SAL_THROW(())
     194                 :            : {
     195         [ +  + ]:    1641355 :     if (rType == Interface1::static_type())
     196                 :     169118 :         return ::com::sun::star::uno::Any( &p1, rType );
     197         [ +  + ]:    1472237 :     else if (rType == Interface2::static_type())
     198                 :     506520 :         return ::com::sun::star::uno::Any( &p2, rType );
     199         [ +  + ]:     965717 :     else if (rType == Interface3::static_type())
     200                 :     180624 :         return ::com::sun::star::uno::Any( &p3, rType );
     201         [ +  + ]:     785093 :     else if (rType == Interface4::static_type())
     202                 :      95103 :         return ::com::sun::star::uno::Any( &p4, rType );
     203         [ +  + ]:     689990 :     else if (rType == Interface5::static_type())
     204                 :     292878 :         return ::com::sun::star::uno::Any( &p5, rType );
     205         [ +  + ]:     397112 :     else if (rType == Interface6::static_type())
     206                 :      81959 :         return ::com::sun::star::uno::Any( &p6, rType );
     207                 :            :     else
     208                 :    1641355 :         return ::com::sun::star::uno::Any();
     209                 :            : }
     210                 :            : /** Compares demanded type to given template argument types.
     211                 :            : 
     212                 :            :     @tparam Interface1 interface type
     213                 :            :     @tparam Interface2 interface type
     214                 :            :     @tparam Interface3 interface type
     215                 :            :     @tparam Interface4 interface type
     216                 :            :     @tparam Interface5 interface type
     217                 :            :     @tparam Interface6 interface type
     218                 :            :     @tparam Interface7 interface type
     219                 :            :     @param rType demanded type
     220                 :            :     @param p1 interface pointer
     221                 :            :     @param p2 interface pointer
     222                 :            :     @param p3 interface pointer
     223                 :            :     @param p4 interface pointer
     224                 :            :     @param p5 interface pointer
     225                 :            :     @param p6 interface pointer
     226                 :            :     @param p7 interface pointer
     227                 :            :     @return acquired interface of demanded type or empty Any
     228                 :            : */
     229                 :            : template< class Interface1, class Interface2, class Interface3, class Interface4, class Interface5,
     230                 :            :           class Interface6, class Interface7 >
     231                 :     616463 : inline ::com::sun::star::uno::Any SAL_CALL queryInterface(
     232                 :            :     const ::com::sun::star::uno::Type & rType,
     233                 :            :     Interface1 * p1, Interface2 * p2, Interface3 * p3, Interface4 * p4, Interface5 * p5,
     234                 :            :     Interface6 * p6, Interface7 * p7 )
     235                 :            :     SAL_THROW(())
     236                 :            : {
     237         [ +  + ]:     616463 :     if (rType == Interface1::static_type())
     238                 :       1058 :         return ::com::sun::star::uno::Any( &p1, rType );
     239         [ +  + ]:     615405 :     else if (rType == Interface2::static_type())
     240                 :     190253 :         return ::com::sun::star::uno::Any( &p2, rType );
     241         [ +  + ]:     425152 :     else if (rType == Interface3::static_type())
     242                 :      95100 :         return ::com::sun::star::uno::Any( &p3, rType );
     243         [ +  + ]:     330052 :     else if (rType == Interface4::static_type())
     244                 :      51457 :         return ::com::sun::star::uno::Any( &p4, rType );
     245         [ +  + ]:     278595 :     else if (rType == Interface5::static_type())
     246                 :      96845 :         return ::com::sun::star::uno::Any( &p5, rType );
     247         [ +  + ]:     181750 :     else if (rType == Interface6::static_type())
     248                 :      28208 :         return ::com::sun::star::uno::Any( &p6, rType );
     249         [ +  + ]:     153542 :     else if (rType == Interface7::static_type())
     250                 :     122548 :         return ::com::sun::star::uno::Any( &p7, rType );
     251                 :            :     else
     252                 :     616463 :         return ::com::sun::star::uno::Any();
     253                 :            : }
     254                 :            : /** Compares demanded type to given template argument types.
     255                 :            : 
     256                 :            :     @tparam Interface1 interface type
     257                 :            :     @tparam Interface2 interface type
     258                 :            :     @tparam Interface3 interface type
     259                 :            :     @tparam Interface4 interface type
     260                 :            :     @tparam Interface5 interface type
     261                 :            :     @tparam Interface6 interface type
     262                 :            :     @tparam Interface7 interface type
     263                 :            :     @tparam Interface8 interface type
     264                 :            :     @param rType demanded type
     265                 :            :     @param p1 interface pointer
     266                 :            :     @param p2 interface pointer
     267                 :            :     @param p3 interface pointer
     268                 :            :     @param p4 interface pointer
     269                 :            :     @param p5 interface pointer
     270                 :            :     @param p6 interface pointer
     271                 :            :     @param p7 interface pointer
     272                 :            :     @param p8 interface pointer
     273                 :            :     @return acquired interface of demanded type or empty Any
     274                 :            : */
     275                 :            : template< class Interface1, class Interface2, class Interface3, class Interface4, class Interface5,
     276                 :            :           class Interface6, class Interface7, class Interface8 >
     277                 :      70849 : inline ::com::sun::star::uno::Any SAL_CALL queryInterface(
     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 )
     281                 :            :     SAL_THROW(())
     282                 :            : {
     283 [ -  + ][ -  + ]:      70849 :     if (rType == Interface1::static_type())
     284                 :          0 :         return ::com::sun::star::uno::Any( &p1, rType );
     285 [ +  + ][ +  + ]:      70849 :     else if (rType == Interface2::static_type())
     286                 :      35704 :         return ::com::sun::star::uno::Any( &p2, rType );
     287 [ +  + ][ -  + ]:      35145 :     else if (rType == Interface3::static_type())
     288                 :        300 :         return ::com::sun::star::uno::Any( &p3, rType );
     289 [ +  + ][ +  + ]:      34845 :     else if (rType == Interface4::static_type())
     290                 :        411 :         return ::com::sun::star::uno::Any( &p4, rType );
     291 [ +  + ][ -  + ]:      34434 :     else if (rType == Interface5::static_type())
     292                 :       4662 :         return ::com::sun::star::uno::Any( &p5, rType );
     293 [ +  + ][ -  + ]:      29772 :     else if (rType == Interface6::static_type())
     294                 :       4831 :         return ::com::sun::star::uno::Any( &p6, rType );
     295 [ +  + ][ -  + ]:      24941 :     else if (rType == Interface7::static_type())
     296                 :       1132 :         return ::com::sun::star::uno::Any( &p7, rType );
     297 [ +  + ][ +  - ]:      23809 :     else if (rType == Interface8::static_type())
     298                 :      21011 :         return ::com::sun::star::uno::Any( &p8, rType );
     299                 :            :     else
     300                 :      70849 :         return ::com::sun::star::uno::Any();
     301                 :            : }
     302                 :            : /** Compares demanded type to given template argument types.
     303                 :            : 
     304                 :            :     @tparam Interface1 interface type
     305                 :            :     @tparam Interface2 interface type
     306                 :            :     @tparam Interface3 interface type
     307                 :            :     @tparam Interface4 interface type
     308                 :            :     @tparam Interface5 interface type
     309                 :            :     @tparam Interface6 interface type
     310                 :            :     @tparam Interface7 interface type
     311                 :            :     @tparam Interface8 interface type
     312                 :            :     @tparam Interface9 interface type
     313                 :            :     @param rType demanded type
     314                 :            :     @param p1 interface pointer
     315                 :            :     @param p2 interface pointer
     316                 :            :     @param p3 interface pointer
     317                 :            :     @param p4 interface pointer
     318                 :            :     @param p5 interface pointer
     319                 :            :     @param p6 interface pointer
     320                 :            :     @param p7 interface pointer
     321                 :            :     @param p8 interface pointer
     322                 :            :     @param p9 interface pointer
     323                 :            :     @return acquired interface of demanded type or empty Any
     324                 :            : */
     325                 :            : template< class Interface1, class Interface2, class Interface3, class Interface4, class Interface5,
     326                 :            :           class Interface6, class Interface7, class Interface8, class Interface9 >
     327                 :      30837 : inline ::com::sun::star::uno::Any SAL_CALL queryInterface(
     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 )
     331                 :            :     SAL_THROW(())
     332                 :            : {
     333         [ -  + ]:      30837 :     if (rType == Interface1::static_type())
     334                 :          0 :         return ::com::sun::star::uno::Any( &p1, rType );
     335         [ +  + ]:      30837 :     else if (rType == Interface2::static_type())
     336                 :       1207 :         return ::com::sun::star::uno::Any( &p2, rType );
     337         [ +  + ]:      29630 :     else if (rType == Interface3::static_type())
     338                 :       3512 :         return ::com::sun::star::uno::Any( &p3, rType );
     339         [ +  + ]:      26118 :     else if (rType == Interface4::static_type())
     340                 :       4615 :         return ::com::sun::star::uno::Any( &p4, rType );
     341         [ +  + ]:      21503 :     else if (rType == Interface5::static_type())
     342                 :        498 :         return ::com::sun::star::uno::Any( &p5, rType );
     343         [ +  + ]:      21005 :     else if (rType == Interface6::static_type())
     344                 :      11706 :         return ::com::sun::star::uno::Any( &p6, rType );
     345         [ +  + ]:       9299 :     else if (rType == Interface7::static_type())
     346                 :        262 :         return ::com::sun::star::uno::Any( &p7, rType );
     347         [ +  + ]:       9037 :     else if (rType == Interface8::static_type())
     348                 :          8 :         return ::com::sun::star::uno::Any( &p8, rType );
     349         [ +  + ]:       9029 :     else if (rType == Interface9::static_type())
     350                 :       3895 :         return ::com::sun::star::uno::Any( &p9, rType );
     351                 :            :     else
     352                 :      30837 :         return ::com::sun::star::uno::Any();
     353                 :            : }
     354                 :            : /** Compares demanded type to given template argument types.
     355                 :            : 
     356                 :            :     @tparam Interface1 interface type
     357                 :            :     @tparam Interface2 interface type
     358                 :            :     @tparam Interface3 interface type
     359                 :            :     @tparam Interface4 interface type
     360                 :            :     @tparam Interface5 interface type
     361                 :            :     @tparam Interface6 interface type
     362                 :            :     @tparam Interface7 interface type
     363                 :            :     @tparam Interface8 interface type
     364                 :            :     @tparam Interface9 interface type
     365                 :            :     @tparam Interface10 interface type
     366                 :            :     @param rType demanded type
     367                 :            :     @param p1 interface pointer
     368                 :            :     @param p2 interface pointer
     369                 :            :     @param p3 interface pointer
     370                 :            :     @param p4 interface pointer
     371                 :            :     @param p5 interface pointer
     372                 :            :     @param p6 interface pointer
     373                 :            :     @param p7 interface pointer
     374                 :            :     @param p8 interface pointer
     375                 :            :     @param p9 interface pointer
     376                 :            :     @param p10 interface pointer
     377                 :            :     @return acquired interface of demanded type or empty Any
     378                 :            : */
     379                 :            : template< class Interface1, class Interface2, class Interface3, class Interface4, class Interface5,
     380                 :            :           class Interface6, class Interface7, class Interface8, class Interface9, class Interface10 >
     381                 :    1158924 : inline ::com::sun::star::uno::Any SAL_CALL queryInterface(
     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 )
     385                 :            :     SAL_THROW(())
     386                 :            : {
     387         [ +  + ]:    1158924 :     if (rType == Interface1::static_type())
     388                 :      10247 :         return ::com::sun::star::uno::Any( &p1, rType );
     389         [ +  + ]:    1148677 :     else if (rType == Interface2::static_type())
     390                 :      34184 :         return ::com::sun::star::uno::Any( &p2, rType );
     391         [ +  + ]:    1114493 :     else if (rType == Interface3::static_type())
     392                 :      10753 :         return ::com::sun::star::uno::Any( &p3, rType );
     393         [ +  + ]:    1103740 :     else if (rType == Interface4::static_type())
     394                 :     112269 :         return ::com::sun::star::uno::Any( &p4, rType );
     395         [ +  + ]:     991471 :     else if (rType == Interface5::static_type())
     396                 :       2957 :         return ::com::sun::star::uno::Any( &p5, rType );
     397         [ +  + ]:     988514 :     else if (rType == Interface6::static_type())
     398                 :      17951 :         return ::com::sun::star::uno::Any( &p6, rType );
     399         [ +  + ]:     970563 :     else if (rType == Interface7::static_type())
     400                 :       9375 :         return ::com::sun::star::uno::Any( &p7, rType );
     401         [ +  + ]:     961188 :     else if (rType == Interface8::static_type())
     402                 :      10438 :         return ::com::sun::star::uno::Any( &p8, rType );
     403         [ +  + ]:     950750 :     else if (rType == Interface9::static_type())
     404                 :      28290 :         return ::com::sun::star::uno::Any( &p9, rType );
     405         [ +  + ]:     922460 :     else if (rType == Interface10::static_type())
     406                 :       1745 :         return ::com::sun::star::uno::Any( &p10, rType );
     407                 :            :     else
     408                 :    1158924 :         return ::com::sun::star::uno::Any();
     409                 :            : }
     410                 :            : /** Compares demanded type to given template argument types.
     411                 :            : 
     412                 :            :     @tparam Interface1 interface type
     413                 :            :     @tparam Interface2 interface type
     414                 :            :     @tparam Interface3 interface type
     415                 :            :     @tparam Interface4 interface type
     416                 :            :     @tparam Interface5 interface type
     417                 :            :     @tparam Interface6 interface type
     418                 :            :     @tparam Interface7 interface type
     419                 :            :     @tparam Interface8 interface type
     420                 :            :     @tparam Interface9 interface type
     421                 :            :     @tparam Interface10 interface type
     422                 :            :     @tparam Interface11 interface type
     423                 :            :     @param rType demanded type
     424                 :            :     @param p1 interface pointer
     425                 :            :     @param p2 interface pointer
     426                 :            :     @param p3 interface pointer
     427                 :            :     @param p4 interface pointer
     428                 :            :     @param p5 interface pointer
     429                 :            :     @param p6 interface pointer
     430                 :            :     @param p7 interface pointer
     431                 :            :     @param p8 interface pointer
     432                 :            :     @param p9 interface pointer
     433                 :            :     @param p10 interface pointer
     434                 :            :     @param p11 interface pointer
     435                 :            :     @return acquired interface of demanded type or empty Any
     436                 :            : */
     437                 :            : template< class Interface1, class Interface2, class Interface3, class Interface4, class Interface5,
     438                 :            :           class Interface6, class Interface7, class Interface8, class Interface9, class Interface10,
     439                 :            :           class Interface11 >
     440                 :    2926247 : inline ::com::sun::star::uno::Any SAL_CALL queryInterface(
     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,
     444                 :            :     Interface11 * p11 )
     445                 :            :     SAL_THROW(())
     446                 :            : {
     447         [ +  + ]:    2926247 :     if (rType == Interface1::static_type())
     448                 :        483 :         return ::com::sun::star::uno::Any( &p1, rType );
     449         [ +  + ]:    2925764 :     else if (rType == Interface2::static_type())
     450                 :      17233 :         return ::com::sun::star::uno::Any( &p2, rType );
     451         [ +  + ]:    2908531 :     else if (rType == Interface3::static_type())
     452                 :      30911 :         return ::com::sun::star::uno::Any( &p3, rType );
     453         [ +  + ]:    2877620 :     else if (rType == Interface4::static_type())
     454                 :     592420 :         return ::com::sun::star::uno::Any( &p4, rType );
     455         [ +  + ]:    2285200 :     else if (rType == Interface5::static_type())
     456                 :       4954 :         return ::com::sun::star::uno::Any( &p5, rType );
     457         [ +  + ]:    2280246 :     else if (rType == Interface6::static_type())
     458                 :       8806 :         return ::com::sun::star::uno::Any( &p6, rType );
     459         [ +  + ]:    2271440 :     else if (rType == Interface7::static_type())
     460                 :     112110 :         return ::com::sun::star::uno::Any( &p7, rType );
     461         [ +  + ]:    2159330 :     else if (rType == Interface8::static_type())
     462                 :      20321 :         return ::com::sun::star::uno::Any( &p8, rType );
     463         [ +  + ]:    2139009 :     else if (rType == Interface9::static_type())
     464                 :      77587 :         return ::com::sun::star::uno::Any( &p9, rType );
     465         [ +  + ]:    2061422 :     else if (rType == Interface10::static_type())
     466                 :      74322 :         return ::com::sun::star::uno::Any( &p10, rType );
     467         [ +  + ]:    1987100 :     else if (rType == Interface11::static_type())
     468                 :     714057 :         return ::com::sun::star::uno::Any( &p11, rType );
     469                 :            :     else
     470                 :    2926247 :         return ::com::sun::star::uno::Any();
     471                 :            : }
     472                 :            : /** Compares demanded type to given template argument types.
     473                 :            : 
     474                 :            :     @tparam Interface1 interface type
     475                 :            :     @tparam Interface2 interface type
     476                 :            :     @tparam Interface3 interface type
     477                 :            :     @tparam Interface4 interface type
     478                 :            :     @tparam Interface5 interface type
     479                 :            :     @tparam Interface6 interface type
     480                 :            :     @tparam Interface7 interface type
     481                 :            :     @tparam Interface8 interface type
     482                 :            :     @tparam Interface9 interface type
     483                 :            :     @tparam Interface10 interface type
     484                 :            :     @tparam Interface11 interface type
     485                 :            :     @tparam Interface12 interface type
     486                 :            :     @param rType demanded type
     487                 :            :     @param p1 interface pointer
     488                 :            :     @param p2 interface pointer
     489                 :            :     @param p3 interface pointer
     490                 :            :     @param p4 interface pointer
     491                 :            :     @param p5 interface pointer
     492                 :            :     @param p6 interface pointer
     493                 :            :     @param p7 interface pointer
     494                 :            :     @param p8 interface pointer
     495                 :            :     @param p9 interface pointer
     496                 :            :     @param p10 interface pointer
     497                 :            :     @param p11 interface pointer
     498                 :            :     @param p12 interface pointer
     499                 :            :     @return acquired interface of demanded type or empty Any
     500                 :            : */
     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 >
     504                 :      11156 : inline ::com::sun::star::uno::Any SAL_CALL queryInterface(
     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 )
     509                 :            :     SAL_THROW(())
     510                 :            : {
     511         [ +  + ]:      11156 :     if (rType == Interface1::static_type())
     512                 :          6 :         return ::com::sun::star::uno::Any( &p1, rType );
     513         [ -  + ]:      11150 :     else if (rType == Interface2::static_type())
     514                 :          0 :         return ::com::sun::star::uno::Any( &p2, rType );
     515         [ -  + ]:      11150 :     else if (rType == Interface3::static_type())
     516                 :          0 :         return ::com::sun::star::uno::Any( &p3, rType );
     517         [ +  + ]:      11150 :     else if (rType == Interface4::static_type())
     518                 :       1757 :         return ::com::sun::star::uno::Any( &p4, rType );
     519         [ +  + ]:       9393 :     else if (rType == Interface5::static_type())
     520                 :        452 :         return ::com::sun::star::uno::Any( &p5, rType );
     521         [ -  + ]:       8941 :     else if (rType == Interface6::static_type())
     522                 :          0 :         return ::com::sun::star::uno::Any( &p6, rType );
     523         [ -  + ]:       8941 :     else if (rType == Interface7::static_type())
     524                 :          0 :         return ::com::sun::star::uno::Any( &p7, rType );
     525         [ +  + ]:       8941 :     else if (rType == Interface8::static_type())
     526                 :         10 :         return ::com::sun::star::uno::Any( &p8, rType );
     527         [ +  + ]:       8931 :     else if (rType == Interface9::static_type())
     528                 :       2844 :         return ::com::sun::star::uno::Any( &p9, rType );
     529         [ +  + ]:       6087 :     else if (rType == Interface10::static_type())
     530                 :       2632 :         return ::com::sun::star::uno::Any( &p10, rType );
     531         [ +  + ]:       3455 :     else if (rType == Interface11::static_type())
     532                 :          2 :         return ::com::sun::star::uno::Any( &p11, rType );
     533         [ +  + ]:       3453 :     else if (rType == Interface12::static_type())
     534                 :       2143 :         return ::com::sun::star::uno::Any( &p12, rType );
     535                 :            :     else
     536                 :      11156 :         return ::com::sun::star::uno::Any();
     537                 :            : }
     538                 :            : 
     539                 :            : }
     540                 :            : 
     541                 :            : #endif
     542                 :            : 
     543                 :            : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10