LCOV - code coverage report
Current view: top level - cppu/source/cppu - cppu_opt.cxx (source / functions) Hit Total Coverage
Test: commit c8344322a7af75b84dd3ca8f78b05543a976dfd5 Lines: 16 26 61.5 %
Date: 2015-06-13 12:38:46 Functions: 2 3 66.7 %
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             : #include <sal/config.h>
      21             : 
      22             : #include <com/sun/star/uno/Any.hxx>
      23             : #include <com/sun/star/uno/Reference.hxx>
      24             : #include "typelib/typedescription.h"
      25             : #include "uno/any2.h"
      26             : #include "rtl/ustrbuf.hxx"
      27             : 
      28             : 
      29             : using namespace ::rtl;
      30             : 
      31             : 
      32       47446 : extern "C" rtl_uString * SAL_CALL cppu_unsatisfied_iquery_msg(
      33             :     typelib_TypeDescriptionReference * pType )
      34             :     SAL_THROW_EXTERN_C()
      35             : {
      36       47446 :     OUStringBuffer buf( 64 );
      37       47446 :     buf.append( "unsatisfied query for interface of type " );
      38       47446 :     buf.append( OUString::unacquired( &pType->pTypeName ) );
      39       47446 :     buf.append( '!' );
      40       94892 :     OUString ret( buf.makeStringAndClear() );
      41       47446 :     rtl_uString_acquire( ret.pData );
      42       94892 :     return ret.pData;
      43             : }
      44             : 
      45             : 
      46        3726 : extern "C" rtl_uString * SAL_CALL cppu_unsatisfied_iset_msg(
      47             :     typelib_TypeDescriptionReference * pType )
      48             :     SAL_THROW_EXTERN_C()
      49             : {
      50        3726 :     OUStringBuffer buf( 64 );
      51        3726 :     buf.append( "invalid attempt to assign an empty interface of type " );
      52        3726 :     buf.append( OUString::unacquired( &pType->pTypeName ) );
      53        3726 :     buf.append( '!' );
      54        7452 :     OUString ret( buf.makeStringAndClear() );
      55        3726 :     rtl_uString_acquire( ret.pData );
      56        7452 :     return ret.pData;
      57             : }
      58             : 
      59             : 
      60           0 : extern "C" rtl_uString * SAL_CALL cppu_Any_extraction_failure_msg(
      61             :     uno_Any const * pAny, typelib_TypeDescriptionReference * pType )
      62             :     SAL_THROW_EXTERN_C()
      63             : {
      64           0 :     OUStringBuffer buf;
      65           0 :     buf.append( "Cannot extract an Any(" );
      66           0 :     buf.append( OUString::unacquired(&pAny->pType->pTypeName) );
      67           0 :     buf.append( ") to " );
      68           0 :     buf.append( OUString::unacquired(&pType->pTypeName) );
      69           0 :     buf.append( '!' );
      70           0 :     const OUString ret( buf.makeStringAndClear() );
      71           0 :     rtl_uString_acquire( ret.pData );
      72           0 :     return ret.pData;
      73             : }
      74             : 
      75             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.11