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 .
19 #ifndef INCLUDED_COM_SUN_STAR_UNO_ANY_HXX
20 #define INCLUDED_COM_SUN_STAR_UNO_ANY_HXX
22 #include <sal/config.h>
28 #include <com/sun/star/uno/Any.h>
30 #include <uno/sequence2.h>
31 #include <com/sun/star/uno/Type.hxx>
32 #include <com/sun/star/uno/XInterface.hpp>
33 #include <com/sun/star/uno/genfunc.hxx>
34 #include <cppu/unotype.hxx>
45 //__________________________________________________________________________________________________
46 inline Any::Any() SAL_THROW(())
48 ::uno_any_construct( this, 0, 0, (uno_AcquireFunc
)cpp_acquire
);
51 //______________________________________________________________________________
53 inline Any::Any( T
const & value
)
55 ::uno_type_any_construct(
56 this, const_cast<T
*>(&value
),
57 ::cppu::getTypeFavourUnsigned(&value
).getTypeLibType(),
58 (uno_AcquireFunc
) cpp_acquire
);
60 //______________________________________________________________________________
61 inline Any::Any( bool value
)
64 ::uno_type_any_construct(
65 this, &b
, ::getCppuBooleanType().getTypeLibType(),
66 (uno_AcquireFunc
) cpp_acquire
);
69 //__________________________________________________________________________________________________
70 inline Any::Any( const Any
& rAny
) SAL_THROW(())
72 ::uno_type_any_construct( this, rAny
.pData
, rAny
.pType
, (uno_AcquireFunc
)cpp_acquire
);
74 //__________________________________________________________________________________________________
75 inline Any::Any( const void * pData_
, const Type
& rType
) SAL_THROW(())
77 ::uno_type_any_construct(
78 this, const_cast< void * >( pData_
), rType
.getTypeLibType(),
79 (uno_AcquireFunc
)cpp_acquire
);
81 //__________________________________________________________________________________________________
82 inline Any::Any( const void * pData_
, typelib_TypeDescription
* pTypeDescr
) SAL_THROW(())
85 this, const_cast< void * >( pData_
), pTypeDescr
, (uno_AcquireFunc
)cpp_acquire
);
87 //__________________________________________________________________________________________________
88 inline Any::Any( const void * pData_
, typelib_TypeDescriptionReference
* pType_
) SAL_THROW(())
90 ::uno_type_any_construct(
91 this, const_cast< void * >( pData_
), pType_
, (uno_AcquireFunc
)cpp_acquire
);
93 //__________________________________________________________________________________________________
94 inline Any::~Any() SAL_THROW(())
97 this, (uno_ReleaseFunc
)cpp_release
);
99 //__________________________________________________________________________________________________
100 inline Any
& Any::operator = ( const Any
& rAny
) SAL_THROW(())
104 ::uno_type_any_assign(
105 this, rAny
.pData
, rAny
.pType
,
106 (uno_AcquireFunc
)cpp_acquire
, (uno_ReleaseFunc
)cpp_release
);
110 //__________________________________________________________________________________________________
111 inline ::rtl::OUString
Any::getValueTypeName() const SAL_THROW(())
113 return ::rtl::OUString( pType
->pTypeName
);
115 //__________________________________________________________________________________________________
116 inline void Any::setValue( const void * pData_
, const Type
& rType
) SAL_THROW(())
118 ::uno_type_any_assign(
119 this, const_cast< void * >( pData_
), rType
.getTypeLibType(),
120 (uno_AcquireFunc
)cpp_acquire
, (uno_ReleaseFunc
)cpp_release
);
122 //__________________________________________________________________________________________________
123 inline void Any::setValue( const void * pData_
, typelib_TypeDescriptionReference
* pType_
) SAL_THROW(())
125 ::uno_type_any_assign(
126 this, const_cast< void * >( pData_
), pType_
,
127 (uno_AcquireFunc
)cpp_acquire
, (uno_ReleaseFunc
)cpp_release
);
129 //__________________________________________________________________________________________________
130 inline void Any::setValue( const void * pData_
, typelib_TypeDescription
* pTypeDescr
) SAL_THROW(())
133 this, const_cast< void * >( pData_
), pTypeDescr
,
134 (uno_AcquireFunc
)cpp_acquire
, (uno_ReleaseFunc
)cpp_release
);
136 //__________________________________________________________________________________________________
137 inline void Any::clear() SAL_THROW(())
140 this, (uno_ReleaseFunc
)cpp_release
);
142 //__________________________________________________________________________________________________
143 inline sal_Bool
Any::isExtractableTo( const Type
& rType
) const SAL_THROW(())
145 return ::uno_type_isAssignableFromData(
146 rType
.getTypeLibType(), pData
, pType
,
147 (uno_QueryInterfaceFunc
)cpp_queryInterface
, (uno_ReleaseFunc
)cpp_release
);
150 //______________________________________________________________________________
151 template <typename T
>
152 inline bool Any::has() const
154 Type
const & rType
= ::cppu::getTypeFavourUnsigned(static_cast< T
* >(0));
155 return ::uno_type_isAssignableFromData(
156 rType
.getTypeLibType(), pData
, pType
,
157 (uno_QueryInterfaceFunc
) cpp_queryInterface
,
158 (uno_ReleaseFunc
) cpp_release
);
160 #if ! defined(__SUNPRO_CC)
161 // not impl: forbid use with ambiguous type (sal_Unicode, sal_uInt16)
163 bool Any::has
<sal_uInt16
>() const;
164 #endif // ! defined(__SUNPRO_CC)
166 //__________________________________________________________________________________________________
167 inline sal_Bool
Any::operator == ( const Any
& rAny
) const SAL_THROW(())
169 return ::uno_type_equalData(
170 pData
, pType
, rAny
.pData
, rAny
.pType
,
171 (uno_QueryInterfaceFunc
)cpp_queryInterface
, (uno_ReleaseFunc
)cpp_release
);
173 //__________________________________________________________________________________________________
174 inline sal_Bool
Any::operator != ( const Any
& rAny
) const SAL_THROW(())
176 return (! ::uno_type_equalData(
177 pData
, pType
, rAny
.pData
, rAny
.pType
,
178 (uno_QueryInterfaceFunc
)cpp_queryInterface
, (uno_ReleaseFunc
)cpp_release
));
181 //__________________________________________________________________________________________________
183 inline Any SAL_CALL
makeAny( const C
& value
) SAL_THROW(())
185 return Any( &value
, ::cppu::getTypeFavourUnsigned(&value
) );
188 // additionally specialized for C++ bool
189 //______________________________________________________________________________
191 inline Any SAL_CALL
makeAny( bool const & value
) SAL_THROW(())
193 const sal_Bool b
= value
;
194 return Any( &b
, ::getCppuBooleanType() );
197 //__________________________________________________________________________________________________
198 #ifdef RTL_FAST_STRING
199 template< class C1
, class C2
>
200 inline Any SAL_CALL
makeAny( const rtl::OUStringConcat
< C1
, C2
>& value
) SAL_THROW(())
202 const rtl::OUString
str( value
);
203 return Any( &str
, ::cppu::getTypeFavourUnsigned(&str
) );
206 //__________________________________________________________________________________________________
208 inline void SAL_CALL
operator <<= ( Any
& rAny
, const C
& value
) SAL_THROW(())
210 const Type
& rType
= ::cppu::getTypeFavourUnsigned(&value
);
211 ::uno_type_any_assign(
212 &rAny
, const_cast< C
* >( &value
), rType
.getTypeLibType(),
213 (uno_AcquireFunc
)cpp_acquire
, (uno_ReleaseFunc
)cpp_release
);
216 // additionally for C++ bool:
217 //______________________________________________________________________________
218 inline void SAL_CALL
operator <<= ( Any
& rAny
, bool const & value
)
222 ::uno_type_any_assign(
223 &rAny
, &b
, ::getCppuBooleanType().getTypeLibType(),
224 (uno_AcquireFunc
) cpp_acquire
, (uno_ReleaseFunc
) cpp_release
);
227 //______________________________________________________________________________
228 #ifdef RTL_FAST_STRING
229 template< class C1
, class C2
>
230 inline void SAL_CALL
operator <<= ( Any
& rAny
, const rtl::OUStringConcat
< C1
, C2
>& value
)
233 const rtl::OUString
str( value
);
234 const Type
& rType
= ::cppu::getTypeFavourUnsigned(&str
);
235 ::uno_type_any_assign(
236 &rAny
, const_cast< rtl::OUString
* >( &str
), rType
.getTypeLibType(),
237 (uno_AcquireFunc
)cpp_acquire
, (uno_ReleaseFunc
)cpp_release
);
240 //__________________________________________________________________________________________________
242 inline sal_Bool SAL_CALL
operator >>= ( const Any
& rAny
, C
& value
) SAL_THROW(())
244 const Type
& rType
= ::cppu::getTypeFavourUnsigned(&value
);
245 return ::uno_type_assignData(
246 &value
, rType
.getTypeLibType(),
247 rAny
.pData
, rAny
.pType
,
248 (uno_QueryInterfaceFunc
)cpp_queryInterface
,
249 (uno_AcquireFunc
)cpp_acquire
, (uno_ReleaseFunc
)cpp_release
);
253 //__________________________________________________________________________________________________
254 inline sal_Bool SAL_CALL
operator >>= ( const ::com::sun::star::uno::Any
& rAny
, sal_Bool
& value
) SAL_THROW(())
256 if (typelib_TypeClass_BOOLEAN
== rAny
.pType
->eTypeClass
)
258 value
= (* reinterpret_cast< const sal_Bool
* >( rAny
.pData
) != sal_False
);
263 //__________________________________________________________________________________________________
264 inline sal_Bool SAL_CALL
operator == ( const Any
& rAny
, const sal_Bool
& value
) SAL_THROW(())
266 return (typelib_TypeClass_BOOLEAN
== rAny
.pType
->eTypeClass
&&
267 (value
!= sal_False
) == (* reinterpret_cast< const sal_Bool
* >( rAny
.pData
) != sal_False
));
270 //______________________________________________________________________________
272 inline sal_Bool SAL_CALL
operator >>= ( Any
const & rAny
, bool & value
)
275 if (rAny
.pType
->eTypeClass
== typelib_TypeClass_BOOLEAN
)
277 value
= *reinterpret_cast< sal_Bool
const * >(
278 rAny
.pData
) != sal_False
;
284 //______________________________________________________________________________
286 inline sal_Bool SAL_CALL
operator == ( Any
const & rAny
, bool const & value
)
289 return (rAny
.pType
->eTypeClass
== typelib_TypeClass_BOOLEAN
&&
291 (*reinterpret_cast< sal_Bool
const * >( rAny
.pData
)
296 //__________________________________________________________________________________________________
297 inline sal_Bool SAL_CALL
operator >>= ( const ::com::sun::star::uno::Any
& rAny
, sal_Int8
& value
) SAL_THROW(())
299 if (typelib_TypeClass_BYTE
== rAny
.pType
->eTypeClass
)
301 value
= * reinterpret_cast< const sal_Int8
* >( rAny
.pData
);
307 //__________________________________________________________________________________________________
308 inline sal_Bool SAL_CALL
operator >>= ( const Any
& rAny
, sal_Int16
& value
) SAL_THROW(())
310 switch (rAny
.pType
->eTypeClass
)
312 case typelib_TypeClass_BYTE
:
313 value
= * reinterpret_cast< const sal_Int8
* >( rAny
.pData
);
315 case typelib_TypeClass_SHORT
:
316 case typelib_TypeClass_UNSIGNED_SHORT
:
317 value
= * reinterpret_cast< const sal_Int16
* >( rAny
.pData
);
323 //__________________________________________________________________________________________________
324 inline sal_Bool SAL_CALL
operator >>= ( const Any
& rAny
, sal_uInt16
& value
) SAL_THROW(())
326 switch (rAny
.pType
->eTypeClass
)
328 case typelib_TypeClass_BYTE
:
329 value
= (sal_uInt16
)( * reinterpret_cast< const sal_Int8
* >( rAny
.pData
) );
331 case typelib_TypeClass_SHORT
:
332 case typelib_TypeClass_UNSIGNED_SHORT
:
333 value
= * reinterpret_cast< const sal_uInt16
* >( rAny
.pData
);
340 //__________________________________________________________________________________________________
341 inline sal_Bool SAL_CALL
operator >>= ( const Any
& rAny
, sal_Int32
& value
) SAL_THROW(())
343 switch (rAny
.pType
->eTypeClass
)
345 case typelib_TypeClass_BYTE
:
346 value
= * reinterpret_cast< const sal_Int8
* >( rAny
.pData
);
348 case typelib_TypeClass_SHORT
:
349 value
= * reinterpret_cast< const sal_Int16
* >( rAny
.pData
);
351 case typelib_TypeClass_UNSIGNED_SHORT
:
352 value
= * reinterpret_cast< const sal_uInt16
* >( rAny
.pData
);
354 case typelib_TypeClass_LONG
:
355 case typelib_TypeClass_UNSIGNED_LONG
:
356 value
= * reinterpret_cast< const sal_Int32
* >( rAny
.pData
);
362 //__________________________________________________________________________________________________
363 inline sal_Bool SAL_CALL
operator >>= ( const Any
& rAny
, sal_uInt32
& value
) SAL_THROW(())
365 switch (rAny
.pType
->eTypeClass
)
367 case typelib_TypeClass_BYTE
:
368 value
= (sal_uInt32
)( * reinterpret_cast< const sal_Int8
* >( rAny
.pData
) );
370 case typelib_TypeClass_SHORT
:
371 value
= (sal_uInt32
)( * reinterpret_cast< const sal_Int16
* >( rAny
.pData
) );
373 case typelib_TypeClass_UNSIGNED_SHORT
:
374 value
= * reinterpret_cast< const sal_uInt16
* >( rAny
.pData
);
376 case typelib_TypeClass_LONG
:
377 case typelib_TypeClass_UNSIGNED_LONG
:
378 value
= * reinterpret_cast< const sal_uInt32
* >( rAny
.pData
);
385 //__________________________________________________________________________________________________
386 inline sal_Bool SAL_CALL
operator >>= ( const Any
& rAny
, sal_Int64
& value
) SAL_THROW(())
388 switch (rAny
.pType
->eTypeClass
)
390 case typelib_TypeClass_BYTE
:
391 value
= * reinterpret_cast< const sal_Int8
* >( rAny
.pData
);
393 case typelib_TypeClass_SHORT
:
394 value
= * reinterpret_cast< const sal_Int16
* >( rAny
.pData
);
396 case typelib_TypeClass_UNSIGNED_SHORT
:
397 value
= * reinterpret_cast< const sal_uInt16
* >( rAny
.pData
);
399 case typelib_TypeClass_LONG
:
400 value
= * reinterpret_cast< const sal_Int32
* >( rAny
.pData
);
402 case typelib_TypeClass_UNSIGNED_LONG
:
403 value
= * reinterpret_cast< const sal_uInt32
* >( rAny
.pData
);
405 case typelib_TypeClass_HYPER
:
406 case typelib_TypeClass_UNSIGNED_HYPER
:
407 value
= * reinterpret_cast< const sal_Int64
* >( rAny
.pData
);
413 //__________________________________________________________________________________________________
414 inline sal_Bool SAL_CALL
operator >>= ( const Any
& rAny
, sal_uInt64
& value
) SAL_THROW(())
416 switch (rAny
.pType
->eTypeClass
)
418 case typelib_TypeClass_BYTE
:
419 value
= (sal_uInt64
)( * reinterpret_cast< const sal_Int8
* >( rAny
.pData
) );
421 case typelib_TypeClass_SHORT
:
422 value
= (sal_uInt64
)( * reinterpret_cast< const sal_Int16
* >( rAny
.pData
) );
424 case typelib_TypeClass_UNSIGNED_SHORT
:
425 value
= * reinterpret_cast< const sal_uInt16
* >( rAny
.pData
);
427 case typelib_TypeClass_LONG
:
428 value
= (sal_uInt64
)( * reinterpret_cast< const sal_Int32
* >( rAny
.pData
) );
430 case typelib_TypeClass_UNSIGNED_LONG
:
431 value
= * reinterpret_cast< const sal_uInt32
* >( rAny
.pData
);
433 case typelib_TypeClass_HYPER
:
434 case typelib_TypeClass_UNSIGNED_HYPER
:
435 value
= * reinterpret_cast< const sal_uInt64
* >( rAny
.pData
);
442 //__________________________________________________________________________________________________
443 inline sal_Bool SAL_CALL
operator >>= ( const Any
& rAny
, float & value
) SAL_THROW(())
445 switch (rAny
.pType
->eTypeClass
)
447 case typelib_TypeClass_BYTE
:
448 value
= * reinterpret_cast< const sal_Int8
* >( rAny
.pData
);
450 case typelib_TypeClass_SHORT
:
451 value
= * reinterpret_cast< const sal_Int16
* >( rAny
.pData
);
453 case typelib_TypeClass_UNSIGNED_SHORT
:
454 value
= * reinterpret_cast< const sal_uInt16
* >( rAny
.pData
);
456 case typelib_TypeClass_FLOAT
:
457 value
= * reinterpret_cast< const float * >( rAny
.pData
);
464 //__________________________________________________________________________________________________
465 inline sal_Bool SAL_CALL
operator >>= ( const Any
& rAny
, double & value
) SAL_THROW(())
467 switch (rAny
.pType
->eTypeClass
)
469 case typelib_TypeClass_BYTE
:
470 value
= * reinterpret_cast< const sal_Int8
* >( rAny
.pData
);
472 case typelib_TypeClass_SHORT
:
473 value
= * reinterpret_cast< const sal_Int16
* >( rAny
.pData
);
475 case typelib_TypeClass_UNSIGNED_SHORT
:
476 value
= * reinterpret_cast< const sal_uInt16
* >( rAny
.pData
);
478 case typelib_TypeClass_LONG
:
479 value
= * reinterpret_cast< const sal_Int32
* >( rAny
.pData
);
481 case typelib_TypeClass_UNSIGNED_LONG
:
482 value
= * reinterpret_cast< const sal_uInt32
* >( rAny
.pData
);
484 case typelib_TypeClass_FLOAT
:
485 value
= * reinterpret_cast< const float * >( rAny
.pData
);
487 case typelib_TypeClass_DOUBLE
:
488 value
= * reinterpret_cast< const double * >( rAny
.pData
);
495 //__________________________________________________________________________________________________
496 inline sal_Bool SAL_CALL
operator >>= ( const Any
& rAny
, ::rtl::OUString
& value
) SAL_THROW(())
498 if (typelib_TypeClass_STRING
== rAny
.pType
->eTypeClass
)
500 value
= * reinterpret_cast< const ::rtl::OUString
* >( rAny
.pData
);
505 //__________________________________________________________________________________________________
506 inline sal_Bool SAL_CALL
operator == ( const Any
& rAny
, const ::rtl::OUString
& value
) SAL_THROW(())
508 return (typelib_TypeClass_STRING
== rAny
.pType
->eTypeClass
&&
509 value
.equals( * reinterpret_cast< const ::rtl::OUString
* >( rAny
.pData
) ));
512 //__________________________________________________________________________________________________
513 inline sal_Bool SAL_CALL
operator >>= ( const Any
& rAny
, Type
& value
) SAL_THROW(())
515 if (typelib_TypeClass_TYPE
== rAny
.pType
->eTypeClass
)
517 value
= * reinterpret_cast< const Type
* >( rAny
.pData
);
522 //__________________________________________________________________________________________________
523 inline sal_Bool SAL_CALL
operator == ( const Any
& rAny
, const Type
& value
) SAL_THROW(())
525 return (typelib_TypeClass_TYPE
== rAny
.pType
->eTypeClass
&&
526 value
.equals( * reinterpret_cast< const Type
* >( rAny
.pData
) ));
529 //__________________________________________________________________________________________________
530 inline sal_Bool SAL_CALL
operator >>= ( const Any
& rAny
, Any
& value
) SAL_THROW(())
534 ::uno_type_any_assign(
535 &value
, rAny
.pData
, rAny
.pType
,
536 (uno_AcquireFunc
)cpp_acquire
, (uno_ReleaseFunc
)cpp_release
);
541 //__________________________________________________________________________________________________
542 inline sal_Bool SAL_CALL
operator == ( const Any
& rAny
, const BaseReference
& value
) SAL_THROW(())
544 if (typelib_TypeClass_INTERFACE
== rAny
.pType
->eTypeClass
)
546 return reinterpret_cast< const BaseReference
* >( rAny
.pData
)->operator == ( value
);
551 // operator to compare to an any.
552 //__________________________________________________________________________________________________
554 inline sal_Bool SAL_CALL
operator == ( const Any
& rAny
, const C
& value
) SAL_THROW(())
556 const Type
& rType
= ::cppu::getTypeFavourUnsigned(&value
);
557 return ::uno_type_equalData(
558 rAny
.pData
, rAny
.pType
,
559 const_cast< C
* >( &value
), rType
.getTypeLibType(),
560 (uno_QueryInterfaceFunc
)cpp_queryInterface
, (uno_ReleaseFunc
)cpp_release
);
562 // operator to compare to an any. may use specialized operators ==.
563 //__________________________________________________________________________________________________
565 inline sal_Bool SAL_CALL
operator != ( const Any
& rAny
, const C
& value
) SAL_THROW(())
567 return (! operator == ( rAny
, value
));
570 extern "C" rtl_uString
* SAL_CALL
cppu_Any_extraction_failure_msg(
571 uno_Any
const * pAny
, typelib_TypeDescriptionReference
* pType
)
572 SAL_THROW_EXTERN_C();
574 //______________________________________________________________________________
575 template <typename T
>
579 if (! (*this >>= value
)) {
580 throw RuntimeException(
582 cppu_Any_extraction_failure_msg(
584 ::cppu::getTypeFavourUnsigned(&value
).getTypeLibType() ),
586 Reference
<XInterface
>() );
590 // not impl: forbid use with ambiguous type (sal_Unicode, sal_uInt16)
592 sal_uInt16
Any::get
<sal_uInt16
>() const;
595 Support for Any in std::ostream (and thus in CPPUNIT_ASSERT or SAL_INFO
596 macros, for example).
598 @since LibreOffice 4.2
600 template<typename charT
, typename traits
>
601 inline std::basic_ostream
<charT
, traits
> &operator<<(std::basic_ostream
<charT
, traits
> &o
, Any
&any
) {
602 o
<< "<Any: (" << any
.getValueTypeName() << ')';
603 switch(any
.pType
->eTypeClass
) {
604 case typelib_TypeClass_VOID
:
606 case typelib_TypeClass_BOOLEAN
:
607 o
<< ' ' << any
.get
<bool>();
609 case typelib_TypeClass_BYTE
:
610 case typelib_TypeClass_SHORT
:
611 case typelib_TypeClass_LONG
:
612 case typelib_TypeClass_HYPER
:
613 o
<< ' ' << any
.get
<sal_Int64
>();
615 case typelib_TypeClass_UNSIGNED_SHORT
:
616 case typelib_TypeClass_UNSIGNED_LONG
:
617 case typelib_TypeClass_UNSIGNED_HYPER
:
618 o
<< ' ' << any
.get
<sal_uInt64
>();
620 case typelib_TypeClass_FLOAT
:
621 case typelib_TypeClass_DOUBLE
:
622 o
<< ' ' << any
.get
<double>();
624 case typelib_TypeClass_CHAR
: {
625 std::ios_base::fmtflags flgs
= o
.setf(
626 std::ios_base::hex
, std::ios_base::basefield
);
627 charT fill
= o
.fill('0');
628 o
<< " U+" << std::setw(4)
629 << *static_cast<sal_Unicode
const *>(any
.getValue());
634 case typelib_TypeClass_STRING
:
635 o
<< ' ' << any
.get
<rtl::OUString
>();
637 case typelib_TypeClass_TYPE
:
638 o
<< ' ' << any
.get
<css::uno::Type
>().getTypeName();
640 case typelib_TypeClass_SEQUENCE
:
642 << ((*static_cast<uno_Sequence
* const *>(any
.getValue()))->
645 case typelib_TypeClass_ENUM
:
646 o
<< ' ' << *static_cast<sal_Int32
const *>(any
.getValue());
648 case typelib_TypeClass_STRUCT
:
649 case typelib_TypeClass_EXCEPTION
:
650 o
<< ' ' << any
.getValue();
652 case typelib_TypeClass_INTERFACE
:
653 o
<< ' ' << *static_cast<void * const *>(any
.getValue());
656 assert(false); // this cannot happen
670 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */