1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: any.cxx,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 // MARKER(update_precomp.py): autogen include statement, do not remove
32 #include "precompiled_cppu.hxx"
42 //##################################################################################################
43 void SAL_CALL
uno_type_any_assign(
44 uno_Any
* pDest
, void * pSource
,
45 typelib_TypeDescriptionReference
* pType
,
46 uno_AcquireFunc acquire
, uno_ReleaseFunc release
)
49 _destructAny( pDest
, release
);
52 _copyConstructAny( pDest
, pSource
, pType
, 0, acquire
, 0 );
56 CONSTRUCT_EMPTY_ANY( pDest
);
59 //##################################################################################################
60 void SAL_CALL
uno_any_assign(
61 uno_Any
* pDest
, void * pSource
,
62 typelib_TypeDescription
* pTypeDescr
,
63 uno_AcquireFunc acquire
, uno_ReleaseFunc release
)
66 _destructAny( pDest
, release
);
69 _copyConstructAny( pDest
, pSource
, pTypeDescr
->pWeakRef
, pTypeDescr
, acquire
, 0 );
73 CONSTRUCT_EMPTY_ANY( pDest
);
76 //##################################################################################################
77 void SAL_CALL
uno_type_any_construct(
78 uno_Any
* pDest
, void * pSource
,
79 typelib_TypeDescriptionReference
* pType
,
80 uno_AcquireFunc acquire
)
85 _copyConstructAny( pDest
, pSource
, pType
, 0, acquire
, 0 );
89 CONSTRUCT_EMPTY_ANY( pDest
);
92 //##################################################################################################
93 void SAL_CALL
uno_any_construct(
94 uno_Any
* pDest
, void * pSource
,
95 typelib_TypeDescription
* pTypeDescr
,
96 uno_AcquireFunc acquire
)
101 _copyConstructAny( pDest
, pSource
, pTypeDescr
->pWeakRef
, pTypeDescr
, acquire
, 0 );
105 CONSTRUCT_EMPTY_ANY( pDest
);
108 //##################################################################################################
109 void SAL_CALL
uno_type_any_constructAndConvert(
110 uno_Any
* pDest
, void * pSource
,
111 typelib_TypeDescriptionReference
* pType
,
112 uno_Mapping
* mapping
)
117 _copyConstructAny( pDest
, pSource
, pType
, 0, 0, mapping
);
121 CONSTRUCT_EMPTY_ANY( pDest
);
124 //##################################################################################################
125 void SAL_CALL
uno_any_constructAndConvert(
126 uno_Any
* pDest
, void * pSource
,
127 typelib_TypeDescription
* pTypeDescr
,
128 uno_Mapping
* mapping
)
133 _copyConstructAny( pDest
, pSource
, pTypeDescr
->pWeakRef
, pTypeDescr
, 0, mapping
);
137 CONSTRUCT_EMPTY_ANY( pDest
);
140 //##################################################################################################
141 void SAL_CALL
uno_any_destruct( uno_Any
* pValue
, uno_ReleaseFunc release
)
144 _destructAny( pValue
, release
);
146 //##################################################################################################
147 void SAL_CALL
uno_any_clear( uno_Any
* pValue
, uno_ReleaseFunc release
)
150 _destructAny( pValue
, release
);
151 CONSTRUCT_EMPTY_ANY( pValue
);