Coverage Report

Created: 2026-04-09 11:41

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/libreoffice/cppu/source/uno/any.cxx
Line
Count
Source
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
void SAL_CALL uno_type_any_assign(
31
    uno_Any * pDest, void * pSource,
32
    typelib_TypeDescriptionReference * pType,
33
    uno_AcquireFunc acquire, uno_ReleaseFunc release ) noexcept
34
539M
{
35
539M
    _destructAny( pDest, release );
36
539M
    if (pType)
37
539M
    {
38
539M
        _copyConstructAny( pDest, pSource, pType, nullptr, acquire, nullptr );
39
539M
    }
40
14.6k
    else
41
14.6k
    {
42
14.6k
        CONSTRUCT_EMPTY_ANY( pDest );
43
14.6k
    }
44
539M
}
45
46
void SAL_CALL uno_any_assign(
47
    uno_Any * pDest, void * pSource,
48
    typelib_TypeDescription * pTypeDescr,
49
    uno_AcquireFunc acquire, uno_ReleaseFunc release ) noexcept
50
0
{
51
0
    _destructAny( pDest, release );
52
0
    if (pTypeDescr)
53
0
    {
54
0
        _copyConstructAny( pDest, pSource, pTypeDescr->pWeakRef, pTypeDescr, acquire, nullptr );
55
0
    }
56
0
    else
57
0
    {
58
0
        CONSTRUCT_EMPTY_ANY( pDest );
59
0
    }
60
0
}
61
62
void SAL_CALL uno_type_any_construct(
63
    uno_Any * pDest, void * pSource,
64
    typelib_TypeDescriptionReference * pType,
65
    uno_AcquireFunc acquire ) noexcept
66
366M
{
67
366M
    if (pType)
68
366M
    {
69
366M
        _copyConstructAny( pDest, pSource, pType, nullptr, acquire, nullptr );
70
366M
    }
71
18.4E
    else
72
18.4E
    {
73
18.4E
        CONSTRUCT_EMPTY_ANY( pDest );
74
18.4E
    }
75
366M
}
76
77
void SAL_CALL uno_any_construct(
78
    uno_Any * pDest, void * pSource,
79
    typelib_TypeDescription * pTypeDescr,
80
    uno_AcquireFunc acquire ) noexcept
81
772M
{
82
772M
    if (pTypeDescr)
83
0
    {
84
0
        _copyConstructAny( pDest, pSource, pTypeDescr->pWeakRef, pTypeDescr, acquire, nullptr );
85
0
    }
86
772M
    else
87
772M
    {
88
772M
        CONSTRUCT_EMPTY_ANY( pDest );
89
772M
    }
90
772M
}
91
92
void SAL_CALL uno_type_any_constructAndConvert(
93
    uno_Any * pDest, void * pSource,
94
    typelib_TypeDescriptionReference * pType,
95
    uno_Mapping * mapping ) noexcept
96
97.2k
{
97
97.2k
    if (pType)
98
97.2k
    {
99
97.2k
        _copyConstructAny( pDest, pSource, pType, nullptr, nullptr, mapping );
100
97.2k
    }
101
0
    else
102
0
    {
103
0
        CONSTRUCT_EMPTY_ANY( pDest );
104
0
    }
105
97.2k
}
106
107
void SAL_CALL uno_any_constructAndConvert(
108
    uno_Any * pDest, void * pSource,
109
    typelib_TypeDescription * pTypeDescr,
110
    uno_Mapping * mapping ) noexcept
111
93.5k
{
112
93.5k
    if (pTypeDescr)
113
93.5k
    {
114
93.5k
        _copyConstructAny( pDest, pSource, pTypeDescr->pWeakRef, pTypeDescr, nullptr, mapping );
115
93.5k
    }
116
0
    else
117
0
    {
118
0
        CONSTRUCT_EMPTY_ANY( pDest );
119
0
    }
120
93.5k
}
121
122
void SAL_CALL uno_any_destruct( uno_Any * pValue, uno_ReleaseFunc release ) noexcept
123
1.13G
{
124
1.13G
    _destructAny( pValue, release );
125
1.13G
}
126
127
void SAL_CALL uno_any_clear( uno_Any * pValue, uno_ReleaseFunc release ) noexcept
128
34.0k
{
129
34.0k
    _destructAny( pValue, release );
130
34.0k
    CONSTRUCT_EMPTY_ANY( pValue );
131
34.0k
}
132
}
133
134
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */