(incubating) | The Free and Open Productivity Suite

Developer's Guide

API

SDK

Tips 'n' Tricks

Miscellaneous

Content for OpenOffice.org version 3.3.

Global Functions in Namespace cppu
in Sourcefile extract.hxx


any2bool
sal_Bool any2bool(
const ::com::sun::star::uno::Any & rAny )
throw( ::com::sun::star::lang::IllegalArgumentException );

virtual abstract const volatile template static inline C-linkage
NO NO NO NO NO NO YES NO

Description
* extracts a boolean either as a sal_Bool or an integer from
* an any. If there is no sal_Bool or integer inside the any
* a ::com::sun::star::lang::IllegalArgumentException is thrown
*

any2enum

template< typename E >


void any2enum(
E & eRet,
const ::com::sun::star::uno::Any & rAny )
throw( ::com::sun::star::lang::IllegalArgumentException );

virtual abstract const volatile template static inline C-linkage
NO NO NO NO YES NO YES NO

Summary
* Sets int32 from enum or int in any with additional typecheck
* <BR>
* 
Parameters
rAny
enum or int
* 
eRet
the enum value as int. If there is not enum of the given type or
*                        a ::com::sun::star::lang::IllegalArgumentException is thrown

bool2any
::com::sun::star::uno::Any bool2any(
sal_Bool bBool );

virtual abstract const volatile template static inline C-linkage
NO NO NO NO NO NO YES NO

Description
* Puts a boolean in an any.
*
* @DEPRECATED : use makeAny< sal_Bool >()
*

enum2any

template< typename E >


::com::sun::star::uno::Any enum2any(
E eEnum );

virtual abstract const volatile template static inline C-linkage
NO NO NO NO YES NO YES NO

Description
* Template function to create an uno::Any from an enum
*
* @DEPRECATED : use makeAny< E >()
*

enum2int
sal_Bool enum2int(
sal_Int32 & rnEnum,
const ::com::sun::star::uno::Any & rAny );

virtual abstract const volatile template static inline C-linkage
NO NO NO NO NO NO YES NO

Summary
* Sets int32 from enum or int in any.
*<BR>
* 
Parameters
rnEnum
int32 enum value
* 
rAny
enum or int
* 
sal_True
if enum or int value was set else sal_False.

extractInterface

template< typename T >


sal_Bool extractInterface(
::com::sun::star::uno::Reference< T > & rxOut,
const ::com::sun::star::uno::Any & rAny );

virtual abstract const volatile template static inline C-linkage
NO NO NO NO YES NO YES NO

Description
* Extracts interface from an any.  If given any does not hold the demanded interface,
* it will be queried for it.
* If no interface is available, the out ref will be cleared.
*<BR>
* 
Parameters
rxOut
demanded interface
* 
rAny
interface
* 
Return
sal_True if any reference (including the null ref) was retrieved from any else sal_False.

int2enum
::com::sun::star::uno::Any int2enum(
sal_Int32 nEnum,
const ::com::sun::star::uno::Type & rType );

virtual abstract const volatile template static inline C-linkage
NO NO NO NO NO NO YES NO

Summary
* Sets enum from int32 value.  This function does NOT check for valid enum values!
*<BR>
* 
Parameters
nEnum
int32 enum value
* 
rType
enum type
* 
Return
enum or emoty any.

Top of Page

Apache OpenOffice is an effort undergoing incubation at The Apache Software Foundation (ASF), sponsored by the Apache Incubator. Incubation is required of all newly accepted projects until a further review indicates that the infrastructure, communications, and decision making process have stabilized in a manner consistent with other successful ASF projects. While incubation status is not necessarily a reflection of the completeness or stability of the code, it does indicate that the project has yet to be fully endorsed by the ASF.

Copyright & License
Apache and the Apache feather logos are trademarks of The Apache Software Foundation. OpenOffice.org and the seagull logo are registered trademarks of The Apache Software Foundation. Other names appearing on the site may be trademarks of their respective owners.