1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
26 #include <type_traits>
32 //#### copy construction ###########################################################################
36 // The non-dynamic prefix of sal_Sequence (aka uno_Sequence):
37 struct SequencePrefix
{
41 static_assert(sizeof (SequencePrefix
) < sizeof (uno_Sequence
));
42 static_assert(offsetof(SequencePrefix
, nRefCount
) == offsetof(uno_Sequence
, nRefCount
));
44 std::is_same_v
<decltype(SequencePrefix::nRefCount
), decltype(uno_Sequence::nRefCount
)>);
45 static_assert(offsetof(SequencePrefix
, nElements
) == offsetof(uno_Sequence
, nElements
));
47 std::is_same_v
<decltype(SequencePrefix::nElements
), decltype(uno_Sequence::nElements
)>);
51 inline uno_Sequence
* allocSeq(
52 sal_Int32 nElementSize
, sal_Int32 nElements
)
54 OSL_ASSERT( nElements
>= 0 && nElementSize
>= 0 );
55 uno_Sequence
* pSeq
= nullptr;
56 sal_uInt32 nSize
= calcSeqMemSize( nElementSize
, nElements
);
59 pSeq
= static_cast<uno_Sequence
*>(std::malloc( nSize
));
62 // header init, going via SequencePrefix to avoid UBSan insufficient-object-size
63 // warnings when `nElements == 0` and thus `nSize < sizeof (uno_Sequence)`:
64 auto const header
= reinterpret_cast<SequencePrefix
*>(pSeq
);
65 header
->nRefCount
= 1;
66 header
->nElements
= nElements
;
73 void copyConstructStruct(
74 void * pDest
, void * pSource
,
75 typelib_CompoundTypeDescription
* pTypeDescr
,
76 uno_AcquireFunc acquire
, uno_Mapping
* mapping
);
78 inline void _copyConstructStruct(
79 void * pDest
, void * pSource
,
80 typelib_CompoundTypeDescription
* pTypeDescr
,
81 uno_AcquireFunc acquire
, uno_Mapping
* mapping
)
83 if (pTypeDescr
->pBaseTypeDescription
)
86 copyConstructStruct( pDest
, pSource
, pTypeDescr
->pBaseTypeDescription
, acquire
, mapping
);
90 typelib_TypeDescriptionReference
** ppTypeRefs
= pTypeDescr
->ppTypeRefs
;
91 sal_Int32
* pMemberOffsets
= pTypeDescr
->pMemberOffsets
;
92 sal_Int32 nDescr
= pTypeDescr
->nMembers
;
98 ::uno_type_copyAndConvertData(
99 static_cast<char *>(pDest
) + pMemberOffsets
[nDescr
],
100 static_cast<char *>(pSource
) + pMemberOffsets
[nDescr
],
101 ppTypeRefs
[nDescr
], mapping
);
109 static_cast<char *>(pDest
) + pMemberOffsets
[nDescr
],
110 static_cast<char *>(pSource
) + pMemberOffsets
[nDescr
],
111 ppTypeRefs
[nDescr
], acquire
);
117 uno_Sequence
* copyConstructSequence(
118 uno_Sequence
* pSource
,
119 typelib_TypeDescriptionReference
* pElementType
,
120 uno_AcquireFunc acquire
, uno_Mapping
* mapping
);
123 inline void _copyConstructAnyFromData(
124 uno_Any
* pDestAny
, void * pSource
,
125 typelib_TypeDescriptionReference
* pType
, typelib_TypeDescription
* pTypeDescr
,
126 uno_AcquireFunc acquire
, uno_Mapping
* mapping
)
128 TYPE_ACQUIRE( pType
);
129 pDestAny
->pType
= pType
;
131 switch (pType
->eTypeClass
)
133 case typelib_TypeClass_CHAR
:
134 pDestAny
->pData
= &pDestAny
->pReserved
;
135 *static_cast<sal_Unicode
*>(pDestAny
->pData
) = *static_cast<sal_Unicode
*>(pSource
);
137 case typelib_TypeClass_BOOLEAN
:
138 pDestAny
->pData
= &pDestAny
->pReserved
;
139 *static_cast<sal_Bool
*>(pDestAny
->pData
) = bool(*static_cast<sal_Bool
*>(pSource
));
141 case typelib_TypeClass_BYTE
:
142 pDestAny
->pData
= &pDestAny
->pReserved
;
143 *static_cast<sal_Int8
*>(pDestAny
->pData
) = *static_cast<sal_Int8
*>(pSource
);
145 case typelib_TypeClass_SHORT
:
146 case typelib_TypeClass_UNSIGNED_SHORT
:
147 pDestAny
->pData
= &pDestAny
->pReserved
;
148 *static_cast<sal_Int16
*>(pDestAny
->pData
) = *static_cast<sal_Int16
*>(pSource
);
150 case typelib_TypeClass_LONG
:
151 case typelib_TypeClass_UNSIGNED_LONG
:
152 pDestAny
->pData
= &pDestAny
->pReserved
;
153 *static_cast<sal_Int32
*>(pDestAny
->pData
) = *static_cast<sal_Int32
*>(pSource
);
155 case typelib_TypeClass_HYPER
:
156 case typelib_TypeClass_UNSIGNED_HYPER
:
157 if (sizeof(void *) >= sizeof(sal_Int64
))
158 pDestAny
->pData
= &pDestAny
->pReserved
;
160 pDestAny
->pData
= std::malloc( sizeof(sal_Int64
) );
161 assert(pDestAny
->pData
);
162 *static_cast<sal_Int64
*>(pDestAny
->pData
) = *static_cast<sal_Int64
*>(pSource
);
164 case typelib_TypeClass_FLOAT
:
165 if (sizeof(void *) >= sizeof(float))
166 pDestAny
->pData
= &pDestAny
->pReserved
;
168 pDestAny
->pData
= std::malloc( sizeof(float) );
169 assert(pDestAny
->pData
);
170 *static_cast<float *>(pDestAny
->pData
) = *static_cast<float *>(pSource
);
172 case typelib_TypeClass_DOUBLE
:
173 if (sizeof(void *) >= sizeof(double))
174 pDestAny
->pData
= &pDestAny
->pReserved
;
176 pDestAny
->pData
= std::malloc( sizeof(double) );
177 assert(pDestAny
->pData
);
178 *static_cast<double *>(pDestAny
->pData
) = *static_cast<double *>(pSource
);
180 case typelib_TypeClass_STRING
:
181 ::rtl_uString_acquire( *static_cast<rtl_uString
**>(pSource
) );
182 pDestAny
->pData
= &pDestAny
->pReserved
;
183 *static_cast<rtl_uString
**>(pDestAny
->pData
) = *static_cast<rtl_uString
**>(pSource
);
185 case typelib_TypeClass_TYPE
:
186 TYPE_ACQUIRE( *static_cast<typelib_TypeDescriptionReference
**>(pSource
) );
187 pDestAny
->pData
= &pDestAny
->pReserved
;
188 *static_cast<typelib_TypeDescriptionReference
**>(pDestAny
->pData
) = *static_cast<typelib_TypeDescriptionReference
**>(pSource
);
190 case typelib_TypeClass_ANY
:
191 OSL_FAIL( "### unexpected nested any!" );
193 case typelib_TypeClass_ENUM
:
194 pDestAny
->pData
= &pDestAny
->pReserved
;
195 // enum is forced to 32bit long
196 *static_cast<sal_Int32
*>(pDestAny
->pData
) = *static_cast<sal_Int32
*>(pSource
);
198 case typelib_TypeClass_STRUCT
:
199 case typelib_TypeClass_EXCEPTION
:
202 pDestAny
->pData
= std::malloc( pTypeDescr
->nSize
);
203 _copyConstructStruct(
204 pDestAny
->pData
, pSource
,
205 reinterpret_cast<typelib_CompoundTypeDescription
*>(pTypeDescr
),
210 TYPELIB_DANGER_GET( &pTypeDescr
, pType
);
211 pDestAny
->pData
= std::malloc( pTypeDescr
->nSize
);
212 _copyConstructStruct(
213 pDestAny
->pData
, pSource
,
214 reinterpret_cast<typelib_CompoundTypeDescription
*>(pTypeDescr
),
216 TYPELIB_DANGER_RELEASE( pTypeDescr
);
219 case typelib_TypeClass_SEQUENCE
:
220 pDestAny
->pData
= &pDestAny
->pReserved
;
223 *static_cast<uno_Sequence
**>(pDestAny
->pData
) = copyConstructSequence(
224 *static_cast<uno_Sequence
**>(pSource
),
225 reinterpret_cast<typelib_IndirectTypeDescription
*>(pTypeDescr
)->pType
,
230 TYPELIB_DANGER_GET( &pTypeDescr
, pType
);
231 *static_cast<uno_Sequence
**>(pDestAny
->pData
) = copyConstructSequence(
232 *static_cast<uno_Sequence
**>(pSource
),
233 reinterpret_cast<typelib_IndirectTypeDescription
*>(pTypeDescr
)->pType
,
235 TYPELIB_DANGER_RELEASE( pTypeDescr
);
238 case typelib_TypeClass_INTERFACE
:
239 pDestAny
->pData
= &pDestAny
->pReserved
;
242 pDestAny
->pReserved
= _map( *static_cast<void **>(pSource
), pType
, pTypeDescr
, mapping
);
246 pDestAny
->pReserved
= *static_cast<void **>(pSource
);
247 _acquire( pDestAny
->pReserved
, acquire
);
256 inline void _copyConstructAny(
257 uno_Any
* pDestAny
, void * pSource
,
258 typelib_TypeDescriptionReference
* pType
, typelib_TypeDescription
* pTypeDescr
,
259 uno_AcquireFunc acquire
, uno_Mapping
* mapping
)
261 if (typelib_TypeClass_VOID
== pType
->eTypeClass
)
263 CONSTRUCT_EMPTY_ANY( pDestAny
);
267 if (typelib_TypeClass_ANY
== pType
->eTypeClass
)
271 pType
= static_cast<uno_Any
*>(pSource
)->pType
;
272 if (typelib_TypeClass_VOID
== pType
->eTypeClass
)
274 CONSTRUCT_EMPTY_ANY( pDestAny
);
277 pTypeDescr
= nullptr;
278 pSource
= static_cast<uno_Any
*>(pSource
)->pData
;
282 CONSTRUCT_EMPTY_ANY( pDestAny
);
288 _copyConstructAnyFromData( pDestAny
, pSource
, pType
, pTypeDescr
, acquire
, mapping
);
290 else // default construct
292 TYPE_ACQUIRE( pType
);
293 pDestAny
->pType
= pType
;
294 switch (pType
->eTypeClass
)
296 case typelib_TypeClass_CHAR
:
297 pDestAny
->pData
= &pDestAny
->pReserved
;
298 *static_cast<sal_Unicode
*>(pDestAny
->pData
) = '\0';
300 case typelib_TypeClass_BOOLEAN
:
301 pDestAny
->pData
= &pDestAny
->pReserved
;
302 *static_cast<sal_Bool
*>(pDestAny
->pData
) = false;
304 case typelib_TypeClass_BYTE
:
305 pDestAny
->pData
= &pDestAny
->pReserved
;
306 *static_cast<sal_Int8
*>(pDestAny
->pData
) = 0;
308 case typelib_TypeClass_SHORT
:
309 case typelib_TypeClass_UNSIGNED_SHORT
:
310 pDestAny
->pData
= &pDestAny
->pReserved
;
311 *static_cast<sal_Int16
*>(pDestAny
->pData
) = 0;
313 case typelib_TypeClass_LONG
:
314 case typelib_TypeClass_UNSIGNED_LONG
:
315 pDestAny
->pData
= &pDestAny
->pReserved
;
316 *static_cast<sal_Int32
*>(pDestAny
->pData
) = 0;
318 case typelib_TypeClass_HYPER
:
319 case typelib_TypeClass_UNSIGNED_HYPER
:
320 if (sizeof(void *) >= sizeof(sal_Int64
))
321 pDestAny
->pData
= &pDestAny
->pReserved
;
323 pDestAny
->pData
= std::malloc( sizeof(sal_Int64
) );
324 assert(pDestAny
->pData
);
325 *static_cast<sal_Int64
*>(pDestAny
->pData
) = 0;
327 case typelib_TypeClass_FLOAT
:
328 if (sizeof(void *) >= sizeof(float))
329 pDestAny
->pData
= &pDestAny
->pReserved
;
331 pDestAny
->pData
= std::malloc( sizeof(float) );
332 assert(pDestAny
->pData
);
333 *static_cast<float *>(pDestAny
->pData
) = 0.0;
335 case typelib_TypeClass_DOUBLE
:
336 if (sizeof(void *) >= sizeof(double))
337 pDestAny
->pData
= &pDestAny
->pReserved
;
339 pDestAny
->pData
= std::malloc( sizeof(double) );
340 assert(pDestAny
->pData
);
341 *static_cast<double *>(pDestAny
->pData
) = 0.0;
343 case typelib_TypeClass_STRING
:
344 pDestAny
->pData
= &pDestAny
->pReserved
;
345 *static_cast<rtl_uString
**>(pDestAny
->pData
) = nullptr;
346 ::rtl_uString_new( static_cast<rtl_uString
**>(pDestAny
->pData
) );
348 case typelib_TypeClass_TYPE
:
349 pDestAny
->pData
= &pDestAny
->pReserved
;
350 *static_cast<typelib_TypeDescriptionReference
**>(pDestAny
->pData
) = _getVoidType();
352 case typelib_TypeClass_ENUM
:
353 pDestAny
->pData
= &pDestAny
->pReserved
;
356 *static_cast<sal_Int32
*>(pDestAny
->pData
) = reinterpret_cast<typelib_EnumTypeDescription
*>(pTypeDescr
)->nDefaultEnumValue
;
360 TYPELIB_DANGER_GET( &pTypeDescr
, pType
);
361 *static_cast<sal_Int32
*>(pDestAny
->pData
) = reinterpret_cast<typelib_EnumTypeDescription
*>(pTypeDescr
)->nDefaultEnumValue
;
362 TYPELIB_DANGER_RELEASE( pTypeDescr
);
365 case typelib_TypeClass_STRUCT
:
366 case typelib_TypeClass_EXCEPTION
:
369 pDestAny
->pData
= std::malloc( pTypeDescr
->nSize
);
370 _defaultConstructStruct(
371 pDestAny
->pData
, reinterpret_cast<typelib_CompoundTypeDescription
*>(pTypeDescr
) );
375 TYPELIB_DANGER_GET( &pTypeDescr
, pType
);
376 pDestAny
->pData
= std::malloc( pTypeDescr
->nSize
);
377 _defaultConstructStruct(
378 pDestAny
->pData
, reinterpret_cast<typelib_CompoundTypeDescription
*>(pTypeDescr
) );
379 TYPELIB_DANGER_RELEASE( pTypeDescr
);
382 case typelib_TypeClass_SEQUENCE
:
383 pDestAny
->pData
= &pDestAny
->pReserved
;
384 *static_cast<uno_Sequence
**>(pDestAny
->pData
) = createEmptySequence();
386 case typelib_TypeClass_INTERFACE
:
387 pDestAny
->pData
= &pDestAny
->pReserved
;
388 pDestAny
->pReserved
= nullptr; // either cpp or c-uno interface
398 inline uno_Sequence
* icopyConstructSequence(
399 uno_Sequence
* pSource
,
400 typelib_TypeDescriptionReference
* pElementType
,
401 uno_AcquireFunc acquire
, uno_Mapping
* mapping
)
403 typelib_TypeClass eTypeClass
= pElementType
->eTypeClass
;
405 (eTypeClass
<= typelib_TypeClass_ENUM
&&
406 eTypeClass
!= typelib_TypeClass_ANY
))
408 osl_atomic_increment( &pSource
->nRefCount
);
411 else // create new sequence
413 uno_Sequence
* pDest
;
414 sal_Int32 nElements
= pSource
->nElements
;
419 case typelib_TypeClass_ANY
:
421 pDest
= allocSeq( sizeof (uno_Any
), nElements
);
422 if (pDest
!= nullptr)
424 uno_Any
* pDestElements
= reinterpret_cast<uno_Any
*>(pDest
->elements
);
425 uno_Any
* pSourceElements
= reinterpret_cast<uno_Any
*>(pSource
->elements
);
426 for ( sal_Int32 nPos
= nElements
; nPos
--; )
428 typelib_TypeDescriptionReference
* pType
=
429 pSourceElements
[nPos
].pType
;
430 if (typelib_TypeClass_VOID
== pType
->eTypeClass
)
432 CONSTRUCT_EMPTY_ANY( &pDestElements
[nPos
] );
436 _copyConstructAnyFromData(
437 &pDestElements
[nPos
],
438 pSourceElements
[nPos
].pData
,
446 case typelib_TypeClass_STRUCT
:
447 case typelib_TypeClass_EXCEPTION
:
449 typelib_TypeDescription
* pElementTypeDescr
= nullptr;
450 TYPELIB_DANGER_GET( &pElementTypeDescr
, pElementType
);
451 sal_Int32 nElementSize
= pElementTypeDescr
->nSize
;
452 char * pSourceElements
= pSource
->elements
;
453 pDest
= allocSeq( nElementSize
, nElements
);
454 if (pDest
!= nullptr)
456 char * pElements
= pDest
->elements
;
457 for ( sal_Int32 nPos
= nElements
; nPos
--; )
459 _copyConstructStruct(
460 pElements
+ (nPos
* nElementSize
),
461 pSourceElements
+ (nPos
* nElementSize
),
462 reinterpret_cast<typelib_CompoundTypeDescription
*>(
467 TYPELIB_DANGER_RELEASE( pElementTypeDescr
);
470 case typelib_TypeClass_SEQUENCE
: // sequence of sequence
472 // coverity[suspicious_sizeof] - sizeof(uno_Sequence*) is correct here
473 pDest
= allocSeq( sizeof (uno_Sequence
*), nElements
);
474 if (pDest
!= nullptr)
476 typelib_TypeDescription
* pElementTypeDescr
= nullptr;
477 TYPELIB_DANGER_GET( &pElementTypeDescr
, pElementType
);
478 typelib_TypeDescriptionReference
* pSeqElementType
=
479 reinterpret_cast<typelib_IndirectTypeDescription
*>(
480 pElementTypeDescr
)->pType
;
482 uno_Sequence
** pDestElements
=
483 reinterpret_cast<uno_Sequence
**>(pDest
->elements
);
484 uno_Sequence
** pSourceElements
=
485 reinterpret_cast<uno_Sequence
**>(pSource
->elements
);
486 for ( sal_Int32 nPos
= nElements
; nPos
--; )
488 uno_Sequence
* pNew
= copyConstructSequence(
489 pSourceElements
[nPos
],
492 OSL_ASSERT( pNew
!= nullptr );
493 // ought never be a memory allocation problem,
494 // because of reference counted sequence handles
495 pDestElements
[ nPos
] = pNew
;
498 TYPELIB_DANGER_RELEASE( pElementTypeDescr
);
502 case typelib_TypeClass_INTERFACE
:
504 pDest
= allocSeq( sizeof (void *), nElements
);
505 if (pDest
!= nullptr)
507 char * pElements
= pDest
->elements
;
508 void ** pSourceElements
= reinterpret_cast<void **>(pSource
->elements
);
509 typelib_TypeDescription
* pElementTypeDescr
= nullptr;
510 TYPELIB_DANGER_GET( &pElementTypeDescr
, pElementType
);
511 for ( sal_Int32 nPos
= nElements
; nPos
--; )
513 reinterpret_cast<void **>(pElements
)[nPos
] = nullptr;
514 if (pSourceElements
[nPos
])
516 (*mapping
->mapInterface
)(
517 mapping
, reinterpret_cast<void **>(pElements
) + nPos
,
518 pSourceElements
[nPos
],
519 reinterpret_cast<typelib_InterfaceTypeDescription
*>(
520 pElementTypeDescr
) );
523 TYPELIB_DANGER_RELEASE( pElementTypeDescr
);
528 OSL_FAIL( "### unexpected sequence element type!" );
533 else // empty sequence
535 pDest
= allocSeq( 0, 0 );
543 inline void _copyConstructData(
544 void * pDest
, void * pSource
,
545 typelib_TypeDescriptionReference
* pType
, typelib_TypeDescription
* pTypeDescr
,
546 uno_AcquireFunc acquire
, uno_Mapping
* mapping
)
548 switch (pType
->eTypeClass
)
550 case typelib_TypeClass_CHAR
:
551 *static_cast<sal_Unicode
*>(pDest
) = *static_cast<sal_Unicode
*>(pSource
);
553 case typelib_TypeClass_BOOLEAN
:
554 *static_cast<sal_Bool
*>(pDest
) = bool(*static_cast<sal_Bool
*>(pSource
));
556 case typelib_TypeClass_BYTE
:
557 *static_cast<sal_Int8
*>(pDest
) = *static_cast<sal_Int8
*>(pSource
);
559 case typelib_TypeClass_SHORT
:
560 case typelib_TypeClass_UNSIGNED_SHORT
:
561 *static_cast<sal_Int16
*>(pDest
) = *static_cast<sal_Int16
*>(pSource
);
563 case typelib_TypeClass_LONG
:
564 case typelib_TypeClass_UNSIGNED_LONG
:
565 *static_cast<sal_Int32
*>(pDest
) = *static_cast<sal_Int32
*>(pSource
);
567 case typelib_TypeClass_HYPER
:
568 case typelib_TypeClass_UNSIGNED_HYPER
:
569 *static_cast<sal_Int64
*>(pDest
) = *static_cast<sal_Int64
*>(pSource
);
571 case typelib_TypeClass_FLOAT
:
572 *static_cast<float *>(pDest
) = *static_cast<float *>(pSource
);
574 case typelib_TypeClass_DOUBLE
:
575 *static_cast<double *>(pDest
) = *static_cast<double *>(pSource
);
577 case typelib_TypeClass_STRING
:
578 ::rtl_uString_acquire( *static_cast<rtl_uString
**>(pSource
) );
579 *static_cast<rtl_uString
**>(pDest
) = *static_cast<rtl_uString
**>(pSource
);
581 case typelib_TypeClass_TYPE
:
582 TYPE_ACQUIRE( *static_cast<typelib_TypeDescriptionReference
**>(pSource
) );
583 *static_cast<typelib_TypeDescriptionReference
**>(pDest
) = *static_cast<typelib_TypeDescriptionReference
**>(pSource
);
585 case typelib_TypeClass_ANY
:
587 static_cast<uno_Any
*>(pDest
), static_cast<uno_Any
*>(pSource
)->pData
,
588 static_cast<uno_Any
*>(pSource
)->pType
, nullptr,
591 case typelib_TypeClass_ENUM
:
592 *static_cast<sal_Int32
*>(pDest
) = *static_cast<sal_Int32
*>(pSource
);
594 case typelib_TypeClass_STRUCT
:
595 case typelib_TypeClass_EXCEPTION
:
598 _copyConstructStruct(
600 reinterpret_cast<typelib_CompoundTypeDescription
*>(pTypeDescr
),
605 TYPELIB_DANGER_GET( &pTypeDescr
, pType
);
606 _copyConstructStruct(
608 reinterpret_cast<typelib_CompoundTypeDescription
*>(pTypeDescr
),
610 TYPELIB_DANGER_RELEASE( pTypeDescr
);
613 case typelib_TypeClass_SEQUENCE
:
618 *static_cast<uno_Sequence
**>(pDest
) = icopyConstructSequence(
619 *static_cast<uno_Sequence
**>(pSource
),
620 reinterpret_cast<typelib_IndirectTypeDescription
*>(pTypeDescr
)->pType
,
625 TYPELIB_DANGER_GET( &pTypeDescr
, pType
);
626 *static_cast<uno_Sequence
**>(pDest
) = icopyConstructSequence(
627 *static_cast<uno_Sequence
**>(pSource
),
628 reinterpret_cast<typelib_IndirectTypeDescription
*>(pTypeDescr
)->pType
,
630 TYPELIB_DANGER_RELEASE( pTypeDescr
);
635 osl_atomic_increment( &(*static_cast<uno_Sequence
**>(pSource
))->nRefCount
);
636 *static_cast<uno_Sequence
**>(pDest
) = *static_cast<uno_Sequence
**>(pSource
);
639 case typelib_TypeClass_INTERFACE
:
641 *static_cast<void **>(pDest
) = _map( *static_cast<void **>(pSource
), pType
, pTypeDescr
, mapping
);
644 *static_cast<void **>(pDest
) = *static_cast<void **>(pSource
);
645 _acquire( *static_cast<void **>(pDest
), acquire
);
655 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */