2010-10-14 08:30:07 +02:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
2012-06-13 14:17:57 +01:00
|
|
|
/*
|
|
|
|
* This file is part of the LibreOffice project.
|
|
|
|
*
|
|
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
|
*
|
|
|
|
* This file incorporates work covered by the following license notice:
|
|
|
|
*
|
|
|
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
|
|
|
* contributor license agreements. See the NOTICE file distributed
|
|
|
|
* with this work for additional information regarding copyright
|
|
|
|
* ownership. The ASF licenses this file to you under the Apache
|
|
|
|
* License, Version 2.0 (the "License"); you may not use this file
|
|
|
|
* except in compliance with the License. You may obtain a copy of
|
|
|
|
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
|
|
|
|
*/
|
2000-09-18 14:29:57 +00:00
|
|
|
|
2006-09-16 23:20:50 +00:00
|
|
|
|
2000-09-18 14:29:57 +00:00
|
|
|
#include "copy.hxx"
|
|
|
|
#include "destr.hxx"
|
|
|
|
|
|
|
|
using namespace cppu;
|
|
|
|
|
|
|
|
|
|
|
|
extern "C"
|
|
|
|
{
|
|
|
|
//##################################################################################################
|
2011-12-18 04:56:57 +01:00
|
|
|
CPPU_DLLPUBLIC void SAL_CALL uno_type_any_assign(
|
2000-12-08 11:19:45 +00:00
|
|
|
uno_Any * pDest, void * pSource,
|
|
|
|
typelib_TypeDescriptionReference * pType,
|
|
|
|
uno_AcquireFunc acquire, uno_ReleaseFunc release )
|
2001-03-09 11:10:57 +00:00
|
|
|
SAL_THROW_EXTERN_C()
|
2000-12-08 11:19:45 +00:00
|
|
|
{
|
2002-08-21 08:19:40 +00:00
|
|
|
_destructAny( pDest, release );
|
2000-12-08 11:19:45 +00:00
|
|
|
if (pType)
|
|
|
|
{
|
2002-08-21 08:19:40 +00:00
|
|
|
_copyConstructAny( pDest, pSource, pType, 0, acquire, 0 );
|
2000-12-08 11:19:45 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2002-08-21 08:19:40 +00:00
|
|
|
CONSTRUCT_EMPTY_ANY( pDest );
|
2000-12-08 11:19:45 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
//##################################################################################################
|
2011-12-18 04:56:57 +01:00
|
|
|
CPPU_DLLPUBLIC void SAL_CALL uno_any_assign(
|
2000-12-08 11:19:45 +00:00
|
|
|
uno_Any * pDest, void * pSource,
|
|
|
|
typelib_TypeDescription * pTypeDescr,
|
|
|
|
uno_AcquireFunc acquire, uno_ReleaseFunc release )
|
2001-03-09 11:10:57 +00:00
|
|
|
SAL_THROW_EXTERN_C()
|
2000-12-08 11:19:45 +00:00
|
|
|
{
|
2002-08-21 08:19:40 +00:00
|
|
|
_destructAny( pDest, release );
|
2000-12-08 11:19:45 +00:00
|
|
|
if (pTypeDescr)
|
|
|
|
{
|
2002-08-21 08:19:40 +00:00
|
|
|
_copyConstructAny( pDest, pSource, pTypeDescr->pWeakRef, pTypeDescr, acquire, 0 );
|
2000-12-08 11:19:45 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2002-08-21 08:19:40 +00:00
|
|
|
CONSTRUCT_EMPTY_ANY( pDest );
|
2000-12-08 11:19:45 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
//##################################################################################################
|
2011-12-18 04:56:57 +01:00
|
|
|
CPPU_DLLPUBLIC void SAL_CALL uno_type_any_construct(
|
2000-09-18 14:29:57 +00:00
|
|
|
uno_Any * pDest, void * pSource,
|
|
|
|
typelib_TypeDescriptionReference * pType,
|
|
|
|
uno_AcquireFunc acquire )
|
2001-03-09 11:10:57 +00:00
|
|
|
SAL_THROW_EXTERN_C()
|
2000-09-18 14:29:57 +00:00
|
|
|
{
|
|
|
|
if (pType)
|
|
|
|
{
|
2002-08-21 08:19:40 +00:00
|
|
|
_copyConstructAny( pDest, pSource, pType, 0, acquire, 0 );
|
2000-09-18 14:29:57 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2002-08-21 08:19:40 +00:00
|
|
|
CONSTRUCT_EMPTY_ANY( pDest );
|
2000-09-18 14:29:57 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
//##################################################################################################
|
2011-12-18 04:56:57 +01:00
|
|
|
CPPU_DLLPUBLIC void SAL_CALL uno_any_construct(
|
2000-09-18 14:29:57 +00:00
|
|
|
uno_Any * pDest, void * pSource,
|
|
|
|
typelib_TypeDescription * pTypeDescr,
|
|
|
|
uno_AcquireFunc acquire )
|
2001-03-09 11:10:57 +00:00
|
|
|
SAL_THROW_EXTERN_C()
|
2000-09-18 14:29:57 +00:00
|
|
|
{
|
|
|
|
if (pTypeDescr)
|
|
|
|
{
|
2002-08-21 08:19:40 +00:00
|
|
|
_copyConstructAny( pDest, pSource, pTypeDescr->pWeakRef, pTypeDescr, acquire, 0 );
|
2000-09-18 14:29:57 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2002-08-21 08:19:40 +00:00
|
|
|
CONSTRUCT_EMPTY_ANY( pDest );
|
2000-09-18 14:29:57 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
//##################################################################################################
|
2011-12-18 04:56:57 +01:00
|
|
|
CPPU_DLLPUBLIC void SAL_CALL uno_type_any_constructAndConvert(
|
2000-09-18 14:29:57 +00:00
|
|
|
uno_Any * pDest, void * pSource,
|
|
|
|
typelib_TypeDescriptionReference * pType,
|
|
|
|
uno_Mapping * mapping )
|
2001-03-09 11:10:57 +00:00
|
|
|
SAL_THROW_EXTERN_C()
|
2000-09-18 14:29:57 +00:00
|
|
|
{
|
|
|
|
if (pType)
|
|
|
|
{
|
2002-08-21 08:19:40 +00:00
|
|
|
_copyConstructAny( pDest, pSource, pType, 0, 0, mapping );
|
2000-09-18 14:29:57 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2002-08-21 08:19:40 +00:00
|
|
|
CONSTRUCT_EMPTY_ANY( pDest );
|
2000-09-18 14:29:57 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
//##################################################################################################
|
2011-12-18 04:56:57 +01:00
|
|
|
CPPU_DLLPUBLIC void SAL_CALL uno_any_constructAndConvert(
|
2000-09-18 14:29:57 +00:00
|
|
|
uno_Any * pDest, void * pSource,
|
|
|
|
typelib_TypeDescription * pTypeDescr,
|
|
|
|
uno_Mapping * mapping )
|
2001-03-09 11:10:57 +00:00
|
|
|
SAL_THROW_EXTERN_C()
|
2000-09-18 14:29:57 +00:00
|
|
|
{
|
|
|
|
if (pTypeDescr)
|
|
|
|
{
|
2002-08-21 08:19:40 +00:00
|
|
|
_copyConstructAny( pDest, pSource, pTypeDescr->pWeakRef, pTypeDescr, 0, mapping );
|
2000-09-18 14:29:57 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2002-08-21 08:19:40 +00:00
|
|
|
CONSTRUCT_EMPTY_ANY( pDest );
|
2000-09-18 14:29:57 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
//##################################################################################################
|
2011-12-18 04:56:57 +01:00
|
|
|
CPPU_DLLPUBLIC void SAL_CALL uno_any_destruct( uno_Any * pValue, uno_ReleaseFunc release )
|
2001-03-09 11:10:57 +00:00
|
|
|
SAL_THROW_EXTERN_C()
|
2000-09-18 14:29:57 +00:00
|
|
|
{
|
2002-08-21 08:19:40 +00:00
|
|
|
_destructAny( pValue, release );
|
2000-09-18 14:29:57 +00:00
|
|
|
}
|
2001-09-06 09:25:51 +00:00
|
|
|
//##################################################################################################
|
2011-12-18 04:56:57 +01:00
|
|
|
CPPU_DLLPUBLIC void SAL_CALL uno_any_clear( uno_Any * pValue, uno_ReleaseFunc release )
|
2001-09-06 09:25:51 +00:00
|
|
|
SAL_THROW_EXTERN_C()
|
|
|
|
{
|
2002-08-21 08:19:40 +00:00
|
|
|
_destructAny( pValue, release );
|
|
|
|
CONSTRUCT_EMPTY_ANY( pValue );
|
2001-09-06 09:25:51 +00:00
|
|
|
}
|
2000-09-18 14:29:57 +00:00
|
|
|
}
|
2010-10-14 08:30:07 +02:00
|
|
|
|
|
|
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|