Coverage Report

Created: 2026-02-14 09:37

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/libreoffice/include/ucbhelper/macros.hxx
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
#ifndef INCLUDED_UCBHELPER_MACROS_HXX
21
#define INCLUDED_UCBHELPER_MACROS_HXX
22
23
#include <sal/types.h>
24
#include <cppuhelper/factory.hxx>
25
#include <cppuhelper/supportsservice.hxx>
26
#include <cppuhelper/typeprovider.hxx>
27
28
0
#define CPPU_TYPE( T )      cppu::UnoType<T>::get()
29
0
#define CPPU_TYPE_REF( T )  CPPU_TYPE( T )
30
31
// XTypeProvider impl. internals
32
33
34
#define XTYPEPROVIDER_COMMON_IMPL( Class )                                  \
35
css::uno::Sequence< sal_Int8 > SAL_CALL                          \
36
0
Class::getImplementationId()          \
37
0
{                                                                           \
38
0
      return css::uno::Sequence<sal_Int8>();                                \
39
0
}
Unexecuted instantiation: resultset.cxx:ucbhelper_impl::(anonymous namespace)::PropertySetInfo::getImplementationId()
Unexecuted instantiation: package_ucp::ContentProvider::getImplementationId()
Unexecuted instantiation: package_ucp::Content::getImplementationId()
Unexecuted instantiation: hierarchydatasource.cxx:hcp_impl::(anonymous namespace)::HierarchyDataAccess::getImplementationId()
Unexecuted instantiation: hierarchy_ucp::HierarchyContent::getImplementationId()
Unexecuted instantiation: tdoc_ucp::Content::getImplementationId()
Unexecuted instantiation: ucbhelper::ContentImplHelper::getImplementationId()
40
41
#define GETTYPES_IMPL_START( Class )                                        \
42
css::uno::Sequence< css::uno::Type > SAL_CALL         \
43
0
Class::getTypes()          \
44
0
{                                                                           \
45
0
    static cppu::OTypeCollection collection(
46
47
48
#define GETTYPES_IMPL_END                                                   \
49
0
                );                                                          \
50
0
                                                                            \
51
0
    return collection.getTypes();                                           \
52
0
}
53
54
55
// XTypeProvider impl.
56
57
58
// 2 interfaces supported
59
#define XTYPEPROVIDER_IMPL_2( Class, I1,I2 )                                \
60
0
XTYPEPROVIDER_COMMON_IMPL( Class )                                          \
61
0
GETTYPES_IMPL_START( Class )                                                \
62
0
    CPPU_TYPE_REF( I1 ),                                                    \
63
0
    CPPU_TYPE_REF( I2 )                                                     \
64
0
GETTYPES_IMPL_END
65
66
// 3 interfaces supported
67
#define XTYPEPROVIDER_IMPL_3( Class, I1,I2,I3 )                             \
68
0
XTYPEPROVIDER_COMMON_IMPL( Class )                                          \
69
0
GETTYPES_IMPL_START( Class )                                                \
70
0
    CPPU_TYPE_REF( I1 ),                                                    \
71
0
    CPPU_TYPE_REF( I2 ),                                                    \
72
0
    CPPU_TYPE_REF( I3 )                                                     \
73
0
GETTYPES_IMPL_END
74
75
// 4 interfaces supported
76
#define XTYPEPROVIDER_IMPL_4( Class, I1,I2,I3,I4 )                          \
77
XTYPEPROVIDER_COMMON_IMPL( Class )                                          \
78
GETTYPES_IMPL_START( Class )                                                \
79
    CPPU_TYPE_REF( I1 ),                                                    \
80
    CPPU_TYPE_REF( I2 ),                                                    \
81
    CPPU_TYPE_REF( I3 ),                                                    \
82
    CPPU_TYPE_REF( I4 )                                                     \
83
GETTYPES_IMPL_END
84
85
// 5 interfaces supported
86
#define XTYPEPROVIDER_IMPL_5( Class, I1,I2,I3,I4,I5 )                       \
87
XTYPEPROVIDER_COMMON_IMPL( Class )                                          \
88
GETTYPES_IMPL_START( Class )                                                \
89
    CPPU_TYPE_REF( I1 ),                                                    \
90
    CPPU_TYPE_REF( I2 ),                                                    \
91
    CPPU_TYPE_REF( I3 ),                                                    \
92
    CPPU_TYPE_REF( I4 ),                                                    \
93
    CPPU_TYPE_REF( I5 )                                                     \
94
GETTYPES_IMPL_END
95
96
// 9 interfaces supported
97
#define XTYPEPROVIDER_IMPL_9( Class, I1,I2,I3,I4,I5,I6,I7,I8,I9 )           \
98
XTYPEPROVIDER_COMMON_IMPL( Class )                                          \
99
GETTYPES_IMPL_START( Class )                                                \
100
    CPPU_TYPE_REF( I1 ),                                                    \
101
    CPPU_TYPE_REF( I2 ),                                                    \
102
    CPPU_TYPE_REF( I3 ),                                                    \
103
    CPPU_TYPE_REF( I4 ),                                                    \
104
    CPPU_TYPE_REF( I5 ),                                                    \
105
    CPPU_TYPE_REF( I6 ),                                                    \
106
    CPPU_TYPE_REF( I7 ),                                                    \
107
    CPPU_TYPE_REF( I8 ),                                                    \
108
    CPPU_TYPE_REF( I9 )                                                     \
109
GETTYPES_IMPL_END
110
111
// 10 interfaces supported
112
#define XTYPEPROVIDER_IMPL_10( Class, I1,I2,I3,I4,I5,I6,I7,I8,I9,I10 )      \
113
0
XTYPEPROVIDER_COMMON_IMPL( Class )                                          \
114
0
GETTYPES_IMPL_START( Class )                                                \
115
0
    CPPU_TYPE_REF( I1 ),                                                    \
116
0
    CPPU_TYPE_REF( I2 ),                                                    \
117
0
    CPPU_TYPE_REF( I3 ),                                                    \
118
0
    CPPU_TYPE_REF( I4 ),                                                    \
119
0
    CPPU_TYPE_REF( I5 ),                                                    \
120
0
    CPPU_TYPE_REF( I6 ),                                                    \
121
0
    CPPU_TYPE_REF( I7 ),                                                    \
122
0
    CPPU_TYPE_REF( I8 ),                                                    \
123
0
    CPPU_TYPE_REF( I9 ),                                                    \
124
0
    CPPU_TYPE_REF( I10 )                                                    \
125
0
GETTYPES_IMPL_END
126
127
// 11 interfaces supported
128
#define XTYPEPROVIDER_IMPL_11( Class, I1,I2,I3,I4,I5,I6,I7,I8,I9,I10,I11 )  \
129
XTYPEPROVIDER_COMMON_IMPL( Class )                                          \
130
GETTYPES_IMPL_START( Class )                                                \
131
    CPPU_TYPE_REF( I1 ),                                                    \
132
    CPPU_TYPE_REF( I2 ),                                                    \
133
    CPPU_TYPE_REF( I3 ),                                                    \
134
    CPPU_TYPE_REF( I4 ),                                                    \
135
    CPPU_TYPE_REF( I5 ),                                                    \
136
    CPPU_TYPE_REF( I6 ),                                                    \
137
    CPPU_TYPE_REF( I7 ),                                                    \
138
    CPPU_TYPE_REF( I8 ),                                                    \
139
    CPPU_TYPE_REF( I9 ),                                                    \
140
    CPPU_TYPE_REF( I10 ),                                                   \
141
    CPPU_TYPE_REF( I11 )                                                    \
142
GETTYPES_IMPL_END
143
144
#endif /* ! INCLUDED_UCBHELPER_MACROS_HXX */
145
146
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */