LCOV - code coverage report
Current view: top level - cppu/source/uno - any.cxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 34 39 87.2 %
Date: 2012-08-25 Functions: 8 8 100.0 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 7 12 58.3 %

           Branch data     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                 :            : 
      21                 :            : #include "copy.hxx"
      22                 :            : #include "destr.hxx"
      23                 :            : 
      24                 :            : using namespace cppu;
      25                 :            : 
      26                 :            : 
      27                 :            : extern "C"
      28                 :            : {
      29                 :            : //##################################################################################################
      30                 :   37548359 : CPPU_DLLPUBLIC void SAL_CALL uno_type_any_assign(
      31                 :            :     uno_Any * pDest, void * pSource,
      32                 :            :     typelib_TypeDescriptionReference * pType,
      33                 :            :     uno_AcquireFunc acquire, uno_ReleaseFunc release )
      34                 :            :     SAL_THROW_EXTERN_C()
      35                 :            : {
      36                 :   37548359 :     _destructAny( pDest, release );
      37         [ +  - ]:   37548444 :     if (pType)
      38                 :            :     {
      39                 :   37548444 :         _copyConstructAny( pDest, pSource, pType, 0, acquire, 0 );
      40                 :            :     }
      41                 :            :     else
      42                 :            :     {
      43                 :          0 :         CONSTRUCT_EMPTY_ANY( pDest );
      44                 :            :     }
      45                 :   37548438 : }
      46                 :            : //##################################################################################################
      47                 :      18153 : CPPU_DLLPUBLIC void SAL_CALL uno_any_assign(
      48                 :            :     uno_Any * pDest, void * pSource,
      49                 :            :     typelib_TypeDescription * pTypeDescr,
      50                 :            :     uno_AcquireFunc acquire, uno_ReleaseFunc release )
      51                 :            :     SAL_THROW_EXTERN_C()
      52                 :            : {
      53                 :      18153 :     _destructAny( pDest, release );
      54         [ +  - ]:      18153 :     if (pTypeDescr)
      55                 :            :     {
      56                 :      18153 :         _copyConstructAny( pDest, pSource, pTypeDescr->pWeakRef, pTypeDescr, acquire, 0 );
      57                 :            :     }
      58                 :            :     else
      59                 :            :     {
      60                 :          0 :         CONSTRUCT_EMPTY_ANY( pDest );
      61                 :            :     }
      62                 :      18153 : }
      63                 :            : //##################################################################################################
      64                 :   69474083 : CPPU_DLLPUBLIC void SAL_CALL uno_type_any_construct(
      65                 :            :     uno_Any * pDest, void * pSource,
      66                 :            :     typelib_TypeDescriptionReference * pType,
      67                 :            :     uno_AcquireFunc acquire )
      68                 :            :     SAL_THROW_EXTERN_C()
      69                 :            : {
      70         [ +  - ]:   69474083 :     if (pType)
      71                 :            :     {
      72                 :   69474083 :         _copyConstructAny( pDest, pSource, pType, 0, acquire, 0 );
      73                 :            :     }
      74                 :            :     else
      75                 :            :     {
      76                 :          0 :         CONSTRUCT_EMPTY_ANY( pDest );
      77                 :            :     }
      78                 :   69474152 : }
      79                 :            : //##################################################################################################
      80                 :   38848953 : CPPU_DLLPUBLIC void SAL_CALL uno_any_construct(
      81                 :            :     uno_Any * pDest, void * pSource,
      82                 :            :     typelib_TypeDescription * pTypeDescr,
      83                 :            :     uno_AcquireFunc acquire )
      84                 :            :     SAL_THROW_EXTERN_C()
      85                 :            : {
      86         [ +  + ]:   38848953 :     if (pTypeDescr)
      87                 :            :     {
      88                 :    1604049 :         _copyConstructAny( pDest, pSource, pTypeDescr->pWeakRef, pTypeDescr, acquire, 0 );
      89                 :            :     }
      90                 :            :     else
      91                 :            :     {
      92                 :   37244904 :         CONSTRUCT_EMPTY_ANY( pDest );
      93                 :            :     }
      94                 :   38849246 : }
      95                 :            : //##################################################################################################
      96                 :      10963 : CPPU_DLLPUBLIC void SAL_CALL uno_type_any_constructAndConvert(
      97                 :            :     uno_Any * pDest, void * pSource,
      98                 :            :     typelib_TypeDescriptionReference * pType,
      99                 :            :     uno_Mapping * mapping )
     100                 :            :     SAL_THROW_EXTERN_C()
     101                 :            : {
     102         [ +  - ]:      10963 :     if (pType)
     103                 :            :     {
     104                 :      10963 :         _copyConstructAny( pDest, pSource, pType, 0, 0, mapping );
     105                 :            :     }
     106                 :            :     else
     107                 :            :     {
     108                 :          0 :         CONSTRUCT_EMPTY_ANY( pDest );
     109                 :            :     }
     110                 :      10963 : }
     111                 :            : //##################################################################################################
     112                 :       9197 : CPPU_DLLPUBLIC void SAL_CALL uno_any_constructAndConvert(
     113                 :            :     uno_Any * pDest, void * pSource,
     114                 :            :     typelib_TypeDescription * pTypeDescr,
     115                 :            :     uno_Mapping * mapping )
     116                 :            :     SAL_THROW_EXTERN_C()
     117                 :            : {
     118         [ +  - ]:       9197 :     if (pTypeDescr)
     119                 :            :     {
     120                 :       9197 :         _copyConstructAny( pDest, pSource, pTypeDescr->pWeakRef, pTypeDescr, 0, mapping );
     121                 :            :     }
     122                 :            :     else
     123                 :            :     {
     124                 :          0 :         CONSTRUCT_EMPTY_ANY( pDest );
     125                 :            :     }
     126                 :       9197 : }
     127                 :            : //##################################################################################################
     128                 :  107680270 : CPPU_DLLPUBLIC void SAL_CALL uno_any_destruct( uno_Any * pValue, uno_ReleaseFunc release )
     129                 :            :     SAL_THROW_EXTERN_C()
     130                 :            : {
     131                 :  107680270 :     _destructAny( pValue, release );
     132                 :  107680645 : }
     133                 :            : //##################################################################################################
     134                 :      13307 : CPPU_DLLPUBLIC void SAL_CALL uno_any_clear( uno_Any * pValue, uno_ReleaseFunc release )
     135                 :            :     SAL_THROW_EXTERN_C()
     136                 :            : {
     137                 :      13307 :     _destructAny( pValue, release );
     138                 :      13307 :     CONSTRUCT_EMPTY_ANY( pValue );
     139                 :      13307 : }
     140                 :            : }
     141                 :            : 
     142                 :            : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10