22#include <com/sun/star/awt/FontUnderline.hpp>
23#include <com/sun/star/awt/FontStrikeout.hpp>
24#include <com/sun/star/awt/FontDescriptor.hpp>
26#include <osl/diagnose.h>
27#include <typelib/typedescription.hxx>
38 sal_Int64 nReturn = 0;
39 if (!(_rAny >>= nReturn))
40 SAL_WARN(
"comphelper",
"conversion from Any to sal_Int64 failed");
46 sal_Int32 nReturn = 0;
47 if (!(_rAny >>= nReturn))
48 SAL_WARN(
"comphelper",
"conversion from Any to sal_Int32 failed");
54 sal_Int16 nReturn = 0;
55 if (!(_rAny >>= nReturn))
56 SAL_WARN(
"comphelper",
"conversion from Any to sal_Int16 failed");
63 if (!(_rAny >>= nReturn))
64 SAL_WARN(
"comphelper",
"conversion from Any to double failed");
71 if (!(_rAny >>= nReturn))
72 SAL_WARN(
"comphelper",
"conversion from Any to float failed");
79 if (!(_rAny >>= nReturn))
80 SAL_WARN(
"comphelper",
"conversion from Any to OUString failed");
90 OSL_FAIL(
"comphelper::getBOOL : invalid argument !");
96 sal_Int32 nReturn = 0;
98 throw IllegalArgumentException(
"enum2int failed",
99 css::uno::Reference<css::uno::XInterface>(), -1);
105 FontDescriptor aReturn;
106 aReturn.Slant = FontSlant_DONTKNOW;
107 aReturn.Underline = FontUnderline::DONTKNOW;
108 aReturn.Strikeout = com::sun::star::awt::FontStrikeout::DONTKNOW;
116 _rAssignable.getDescription(&pAssignable);
119 _rFrom.getDescription(&pFrom);
127 OSL_ENSURE(_rSequenceType.getTypeClass() == TypeClass_SEQUENCE,
128 "getSequenceElementType: must be called with a sequence type!");
130 if (_rSequenceType.getTypeClass() != TypeClass_SEQUENCE)
133 TypeDescription aTD(_rSequenceType);
134 typelib_IndirectTypeDescription* pSequenceTD
135 =
reinterpret_cast<typelib_IndirectTypeDescription*
>(aTD.get());
137 OSL_ASSERT(pSequenceTD && pSequenceTD->pType);
138 if (pSequenceTD && pSequenceTD->pType)
139 return Type(pSequenceTD->pType);
#define SAL_WARN(area, stream)
struct _typelib_TypeDescription typelib_TypeDescription
sal_Int32 getEnumAsINT32(const Any &_rAny)
bool getBOOL(const Any &_rAny)
sal_Int64 getINT64(const Any &_rAny)
Type getSequenceElementType(const Type &_rSequenceType)
FontDescriptor getDefaultFont()
get a css::awt::FontDescriptor that is fully initialized with the XXX_DONTKNOW enum values (which isn...
sal_Int16 getINT16(const Any &_rAny)
double getDouble(const Any &_rAny)
sal_Int32 getINT32(const Any &_rAny)
bool isAssignableFrom(const Type &_rAssignable, const Type &_rFrom)
float getFloat(const Any &_rAny)
OUString getString(const Any &_rAny)
bool enum2int(sal_Int32 &rnEnum, const css::uno::Any &rAny)
Sets int32 from enum or int in any.
detail::Optional< bool >::type tryAccess< bool >(css::uno::Any const &any)
sal_Bool SAL_CALL typelib_typedescription_isAssignableFrom(typelib_TypeDescription *pAssignable, typelib_TypeDescription *pFrom) SAL_THROW_EXTERN_C()