LibreOffice: com::sun::star::uno Namespace Reference

LibreOffice LibreOffice 26.8 SDK C/C++ API Reference

Loading...
Searching...
No Matches
com::sun::star::uno Namespace Reference

## Classes
class | Any
| C++ class representing an IDL any. More...
class | Array
| Helper class to specify a type pointer for idl arrays. More...
class | BaseReference
| This base class serves as a base class for all template reference classes and has been introduced due to compiler problems with templated operators ==, =! More...
class | ContextLayer
| Objects of this class are used for applying a current context until they are destructed, i.e. More...
class | Environment
| C++ wrapper for binary C uno_Environment. More...
class | Mapping
| C++ wrapper for C uno_Mapping. More...
class | Reference
| Template reference class for interface type derived from BaseReference. More...
class | Sequence
| Template C++ class representing an IDL sequence. More...
class | Sequence< bool >
class | Type
| C++ class representing an IDL meta type. More...
class | TypeDescription
| C++ wrapper for typelib_TypeDescription. More...
class | WeakReference
| The WeakReference<> holds a weak reference to an object. More...
class | WeakReferenceHelper
| The WeakReferenceHelper holds a weak reference to an object. More...

## Enumerations
enum | UnoReference_NoAcquire { UNO_REF_NO_ACQUIRE }
| Enum defining UNO_REF_NO_ACQUIRE for setting reference without acquiring a given interface. More...
enum | UnoReference_Query { UNO_QUERY }
| Enum defining UNO_QUERY for implicit interface query. More...
enum | UnoReference_QueryThrow { UNO_QUERY_THROW }
| Enum defining UNO_QUERY_THROW for implicit interface query. More...
enum | UnoReference_SetThrow { UNO_SET_THROW }
| Enum defining UNO_SET_THROW for throwing if attempts are made to assign a null interface. More...
enum | UnoType_NoAcquire { UNO_TYPE_NO_ACQUIRE }
| Enum defining UNO_TYPE_NO_ACQUIRE for type description reference transfer. More...

## Functions
Reference< XCurrentContext > | getCurrentContext ()
| Getting the current context.
bool | setCurrentContext (Reference< XCurrentContext > const &xContext)
| Setting the current context.
template<class C>
bool | mapToCpp (Reference< C > *ppRet, uno_Interface *pUnoI)
| Deprecated.
template<class C>
bool | mapToUno (uno_Interface **ppRet, const Reference< C > &x)
| Deprecated.
template<class C>
Any | makeAny (const C &value)
| Template function to generically construct an any from a C++ value.
template<>
Any | makeAny (sal_uInt16 const &value)
template<>
Any | makeAny (Any const &) SAL_DELETED_FUNCTION
template<typename T>
Any | toAny (T const &value)
| Wrap a value in an Any, if necessary.
template<>
Any | toAny (Any const &value)
template<class C>
void | operator<<= (Any &rAny, const C &value)
| Template binary <<= operator to set the value of an any.
template<>
void | operator<<= (Any &rAny, bool const &value)
template<class C>
bool | operator>>= (const Any &rAny, C &value)
| Template binary >>= operator to assign a value from an any.
template<class C>
bool | operator== (const Any &rAny, const C &value)
| Template equality operator: compares set value of left side any to right side value.
template<class C>
bool | operator!= (const Any &rAny, const C &value)
| Template inequality operator: compares set value of left side any to right side value.
template<>
bool | operator>>= (const Any &rAny, sal_Bool &value)
template<>
bool | operator== (const Any &rAny, const sal_Bool &value)
template<>
bool | operator>>= (Any const &rAny, bool &value)
template<>
bool | operator== (Any const &rAny, bool const &value)
template<>
bool | operator>>= (const Any &rAny, sal_Int8 &value)
template<>
bool | operator>>= (const Any &rAny, sal_Int16 &value)
template<>
bool | operator>>= (const Any &rAny, sal_uInt16 &value)
template<>
bool | operator>>= (const Any &rAny, sal_Int32 &value)
template<>
bool | operator>>= (const Any &rAny, sal_uInt32 &value)
template<>
bool | operator>>= (const Any &rAny, sal_Int64 &value)
template<>
bool | operator>>= (const Any &rAny, sal_uInt64 &value)
template<>
bool | operator>>= (const Any &rAny, float &value)
template<>
bool | operator>>= (const Any &rAny, double &value)
template<>
bool | operator>>= (const Any &rAny, ::rtl::OUString &value)
template<>
bool | operator== (const Any &rAny, const ::rtl::OUString &value)
template<>
bool | operator>>= (const Any &rAny, Type &value)
template<>
bool | operator== (const Any &rAny, const Type &value)
template<>
bool | operator>>= (const Any &rAny, Any &value)
template<>
bool | operator== (const Any &rAny, const BaseReference &value)
template<>
Any | makeAny (sal_uInt16 const &value)
template<>
Any | toAny (Any const &value)
template<>
void | operator<<= (Any &rAny, bool const &value)
template<>
bool | operator>>= (const ::com::sun::star::uno::Any &rAny, sal_Bool &value)
template<>
bool | operator== (const Any &rAny, const sal_Bool &value)
template<>
bool | operator>>= (Any const &rAny, bool &value)
template<>
bool | operator== (Any const &rAny, bool const &value)
template<>
bool | operator>>= (const ::com::sun::star::uno::Any &rAny, sal_Int8 &value)
template<>
bool | operator>>= (const Any &rAny, sal_Int16 &value)
template<>
bool | operator>>= (const Any &rAny, sal_uInt16 &value)
template<>
bool | operator>>= (const Any &rAny, sal_Int32 &value)
template<>
bool | operator>>= (const Any &rAny, sal_uInt32 &value)
template<>
bool | operator>>= (const Any &rAny, sal_Int64 &value)
template<>
bool | operator>>= (const Any &rAny, sal_uInt64 &value)
template<>
bool | operator>>= (const Any &rAny, float &value)
template<>
bool | operator>>= (const Any &rAny, double &value)
template<>
bool | operator>>= (const Any &rAny, ::rtl::OUString &value)
template<>
bool | operator== (const Any &rAny, const ::rtl::OUString &value)
template<>
bool | operator>>= (const Any &rAny, Type &value)
template<>
bool | operator== (const Any &rAny, const Type &value)
template<>
bool | operator>>= (const Any &rAny, Any &value)
template<>
bool | operator== (const Any &rAny, const BaseReference &value)
template<typename charT, typename traits>
std::basic_ostream< charT, traits > & | operator<< (std::basic_ostream< charT, traits > &o, Any const &any)
| Support for Any in std::ostream (and thus in CPPUNIT_ASSERT or SAL_INFO macros, for example).
void | cpp_acquire (void *pCppI)
| Function to acquire a C++ interface.
void | cpp_release (void *pCppI)
| Function to release a C++ interface.
void * | cpp_queryInterface (void *pCppI, typelib_TypeDescriptionReference *pType)
| Function to query for a C++ interface.
inline ::com::sun::star::uno::Sequence< sal_Int8 > | toUnoSequence (const ::rtl::ByteSequence &rByteSequence)
| Creates a UNO byte sequence from a SAL byte sequence.

## Variables
template<class T>
typelib_TypeDescriptionReference * | Array< T >::s_pType = NULL

## Enumeration Type Documentation

## ◆ UnoReference_NoAcquire

enum com::sun::star::uno::UnoReference_NoAcquire

Enum defining UNO_REF_NO_ACQUIRE for setting reference without acquiring a given interface.

Deprecated, please use SAL_NO_ACQUIRE.

Deprecated

Enumerator
UNO_REF_NO_ACQUIRE | This enum value can be used for creating a reference granting a given interface, i.e. transferring ownership to it.

## ◆ UnoReference_Query

enum com::sun::star::uno::UnoReference_Query

Enum defining UNO_QUERY for implicit interface query.

Enumerator
UNO_QUERY | This enum value can be used for implicit interface query.

## ◆ UnoReference_QueryThrow

enum com::sun::star::uno::UnoReference_QueryThrow

Enum defining UNO_QUERY_THROW for implicit interface query.

If the demanded interface is unavailable, then a RuntimeException is thrown.

Enumerator
UNO_QUERY_THROW | This enum value can be used for implicit interface query.

## ◆ UnoReference_SetThrow

enum com::sun::star::uno::UnoReference_SetThrow

Enum defining UNO_SET_THROW for throwing if attempts are made to assign a null interface.

Since
  UDK 3.2.8

Enumerator
UNO_SET_THROW |

## ◆ UnoType_NoAcquire

enum com::sun::star::uno::UnoType_NoAcquire

Enum defining UNO_TYPE_NO_ACQUIRE for type description reference transfer.

Enumerator
UNO_TYPE_NO_ACQUIRE | This enum value can be used for creating a Type object granting a given type description reference, i.e. transferring ownership to it.

## Function Documentation

## ◆ cpp_acquire()

void com::sun::star::uno::cpp_acquire | ( | void * | pCppI | ) |
| inline

Function to acquire a C++ interface.

Parameters

  pCppI | C++ interface pointer

## ◆ cpp_queryInterface()

void * com::sun::star::uno::cpp_queryInterface | ( | void * | pCppI,
|  | typelib_TypeDescriptionReference * | pType )
| inline

Function to query for a C++ interface.

Parameters

  pCppI | C++ interface pointer
  pType | demanded interface type

Returns
  acquired C++ interface pointer or null

## ◆ cpp_release()

void com::sun::star::uno::cpp_release | ( | void * | pCppI | ) |
| inline

Function to release a C++ interface.

Parameters

  pCppI | C++ interface pointer

## ◆ getCurrentContext()

Reference< XCurrentContext > com::sun::star::uno::getCurrentContext | ( |  | ) |
| inline

Getting the current context.

Attention
  Don't spread the returned interface around to other threads. Every thread has its own current context.

Returns
  current context or null ref, if none is set

## ◆ makeAny() [1/4]

template<>

Any com::sun::star::uno::makeAny | ( | Any const & |  | ) |

## ◆ makeAny() [2/4]

template<class C>

Any com::sun::star::uno::makeAny | ( | const C & | value | ) |
| inline

Template function to generically construct an any from a C++ value.

Deprecated
  Just use an Any constructor with an appropriately typed argument. (When the (UNO) type recorded in the Any instance shall be different from what would be deduced from the (C++) type of the argument, cast the argument to the appropriate type first.)

Template Parameters

  C | value type

Parameters

  value | a value

Returns
  an any

## ◆ makeAny() [3/4]

template<>

Any com::sun::star::uno::makeAny | ( | sal_uInt16 const & | value | ) |
| inline

## ◆ makeAny() [4/4]

template<>

Any com::sun::star::uno::makeAny | ( | sal_uInt16 const & | value | ) |
| inline

## ◆ mapToCpp()

template<class C>

bool com::sun::star::uno::mapToCpp | ( | Reference< C > * | ppRet,
|  | uno_Interface * | pUnoI )
| inline

Deprecated.

This function DOES NOT WORK with Purpose Environments (http://wiki.openoffice.org/wiki/Uno/Binary/Spec/Purpose Environments)

Maps a binary C UNO interface to be used in the currently used compiler environment.

Template Parameters

  C | interface type

Parameters

  ppRet | inout returned interface pointer
  pUnoI | binary C UNO interface

Returns
  true if successful, false otherwise

Deprecated

## ◆ mapToUno()

template<class C>

bool com::sun::star::uno::mapToUno | ( | uno_Interface ** | ppRet,
|  | const Reference< C > & | x )
| inline

Deprecated.

This function DOES NOT WORK with Purpose Environments (http://wiki.openoffice.org/wiki/Uno/Binary/Spec/Purpose Environments)

Maps a UNO interface of the currently used compiler environment to binary C UNO.

Template Parameters

  C | interface type

Parameters

  ppRet | inout returned interface pointer
  x | interface reference

Returns
  true if successful, false otherwise

Deprecated

## ◆ operator!=()

template<class C>

bool com::sun::star::uno::operator!= | ( | const Any & | rAny,
|  | const C & | value )
| inline

Template inequality operator: compares set value of left side any to right side value.

The values need not be of equal type, e.g. a short integer is compared to a long integer. This operator can be implemented as template member function, if all supported compilers can cope with template member functions.

Template Parameters

  C | value type

Parameters

  rAny | another any (left side)
  value | a value (right side)

Returns
  true if values are unequal, false otherwise

## ◆ operator<<()

template<typename charT, typename traits>

std::basic_ostream< charT, traits > & com::sun::star::uno::operator<< | ( | std::basic_ostream< charT, traits > & | o,
|  | Any const & | any )
| inline

Support for Any in std::ostream (and thus in CPPUNIT_ASSERT or SAL_INFO macros, for example).

Since
  LibreOffice 4.2

## ◆ operator<<=() [1/3]

template<>

void com::sun::star::uno::operator<<= | ( | Any & | rAny,
|  | bool const & | value )
| inline

## ◆ operator<<=() [2/3]

template<>

void com::sun::star::uno::operator<<= | ( | Any & | rAny,
|  | bool const & | value )
| inline

## ◆ operator<<=() [3/3]

template<class C>

void com::sun::star::uno::operator<<= | ( | Any & | rAny,
|  | const C & | value )
| inline

Template binary <<= operator to set the value of an any.

Template Parameters

  C | value type

Parameters

  rAny | destination any (left side)
  value | source value (right side)

## ◆ operator==() [1/11]

template<>

bool com::sun::star::uno::operator== | ( | Any const & | rAny,
|  | bool const & | value )
| inline

## ◆ operator==() [2/11]

template<>

bool com::sun::star::uno::operator== | ( | Any const & | rAny,
|  | bool const & | value )
| inline

## ◆ operator==() [3/11]

template<>

bool com::sun::star::uno::operator== | ( | const Any & | rAny,
|  | const ::rtl::OUString & | value )
| inline

## ◆ operator==() [4/11]

template<>

bool com::sun::star::uno::operator== | ( | const Any & | rAny,
|  | const ::rtl::OUString & | value )
| inline

## ◆ operator==() [5/11]

template<>

bool com::sun::star::uno::operator== | ( | const Any & | rAny,
|  | const BaseReference & | value )
| inline

## ◆ operator==() [6/11]

template<>

bool com::sun::star::uno::operator== | ( | const Any & | rAny,
|  | const BaseReference & | value )
| inline

## ◆ operator==() [7/11]

template<class C>

bool com::sun::star::uno::operator== | ( | const Any & | rAny,
|  | const C & | value )
| inline

Template equality operator: compares set value of left side any to right side value.

The values need not be of equal type, e.g. a short integer is compared to a long integer. This operator can be implemented as template member function, if all supported compilers can cope with template member functions.

Template Parameters

  C | value type

Parameters

  rAny | another any (left side)
  value | a value (right side)

Returns
  true if values are equal, false otherwise

## ◆ operator==() [8/11]

template<>

bool com::sun::star::uno::operator== | ( | const Any & | rAny,
|  | const sal_Bool & | value )
| inline

## ◆ operator==() [9/11]

template<>

bool com::sun::star::uno::operator== | ( | const Any & | rAny,
|  | const sal_Bool & | value )
| inline

## ◆ operator==() [10/11]

template<>

bool com::sun::star::uno::operator== | ( | const Any & | rAny,
|  | const Type & | value )
| inline

## ◆ operator==() [11/11]

template<>

bool com::sun::star::uno::operator== | ( | const Any & | rAny,
|  | const Type & | value )
| inline

## ◆ operator>>=() [1/29]

template<>

bool com::sun::star::uno::operator>>= | ( | Any const & | rAny,
|  | bool & | value )
| inline

## ◆ operator>>=() [2/29]

template<>

bool com::sun::star::uno::operator>>= | ( | Any const & | rAny,
|  | bool & | value )
| inline

## ◆ operator>>=() [3/29]

template<>

bool com::sun::star::uno::operator>>= | ( | const ::com::sun::star::uno::Any & | rAny,
|  | sal_Bool & | value )
| inline

## ◆ operator>>=() [4/29]

template<>

bool com::sun::star::uno::operator>>= | ( | const ::com::sun::star::uno::Any & | rAny,
|  | sal_Int8 & | value )
| inline

## ◆ operator>>=() [5/29]

template<>

bool com::sun::star::uno::operator>>= | ( | const Any & | rAny,
|  | ::rtl::OUString & | value )
| inline

## ◆ operator>>=() [6/29]

template<>

bool com::sun::star::uno::operator>>= | ( | const Any & | rAny,
|  | ::rtl::OUString & | value )
| inline

## ◆ operator>>=() [7/29]

template<>

bool com::sun::star::uno::operator>>= | ( | const Any & | rAny,
|  | Any & | value )
| inline

## ◆ operator>>=() [8/29]

template<>

bool com::sun::star::uno::operator>>= | ( | const Any & | rAny,
|  | Any & | value )
| inline

## ◆ operator>>=() [9/29]

template<class C>

bool com::sun::star::uno::operator>>= | ( | const Any & | rAny,
|  | C & | value )
| inline

Template binary >>= operator to assign a value from an any.

If the any does not contain a value that can be assigned without data loss, then this operation will fail returning false.

Template Parameters

  C | value type

Parameters

  rAny | source any (left side)
  value | destination value (right side)

Returns
  true if assignment was possible without data loss

## ◆ operator>>=() [10/29]

template<>

bool com::sun::star::uno::operator>>= | ( | const Any & | rAny,
|  | double & | value )
| inline

## ◆ operator>>=() [11/29]

template<>

bool com::sun::star::uno::operator>>= | ( | const Any & | rAny,
|  | double & | value )
| inline

## ◆ operator>>=() [12/29]

template<>

bool com::sun::star::uno::operator>>= | ( | const Any & | rAny,
|  | float & | value )
| inline

## ◆ operator>>=() [13/29]

template<>

bool com::sun::star::uno::operator>>= | ( | const Any & | rAny,
|  | float & | value )
| inline

## ◆ operator>>=() [14/29]

template<>

bool com::sun::star::uno::operator>>= | ( | const Any & | rAny,
|  | sal_Bool & | value )
| inline

## ◆ operator>>=() [15/29]

template<>

bool com::sun::star::uno::operator>>= | ( | const Any & | rAny,
|  | sal_Int16 & | value )
| inline

## ◆ operator>>=() [16/29]

template<>

bool com::sun::star::uno::operator>>= | ( | const Any & | rAny,
|  | sal_Int16 & | value )
| inline

## ◆ operator>>=() [17/29]

template<>

bool com::sun::star::uno::operator>>= | ( | const Any & | rAny,
|  | sal_Int32 & | value )
| inline

## ◆ operator>>=() [18/29]

template<>

bool com::sun::star::uno::operator>>= | ( | const Any & | rAny,
|  | sal_Int32 & | value )
| inline

## ◆ operator>>=() [19/29]

template<>

bool com::sun::star::uno::operator>>= | ( | const Any & | rAny,
|  | sal_Int64 & | value )
| inline

## ◆ operator>>=() [20/29]

template<>

bool com::sun::star::uno::operator>>= | ( | const Any & | rAny,
|  | sal_Int64 & | value )
| inline

## ◆ operator>>=() [21/29]

template<>

bool com::sun::star::uno::operator>>= | ( | const Any & | rAny,
|  | sal_Int8 & | value )
| inline

## ◆ operator>>=() [22/29]

template<>

bool com::sun::star::uno::operator>>= | ( | const Any & | rAny,
|  | sal_uInt16 & | value )
| inline

## ◆ operator>>=() [23/29]

template<>

bool com::sun::star::uno::operator>>= | ( | const Any & | rAny,
|  | sal_uInt16 & | value )
| inline

## ◆ operator>>=() [24/29]

template<>

bool com::sun::star::uno::operator>>= | ( | const Any & | rAny,
|  | sal_uInt32 & | value )
| inline

## ◆ operator>>=() [25/29]

template<>

bool com::sun::star::uno::operator>>= | ( | const Any & | rAny,
|  | sal_uInt32 & | value )
| inline

## ◆ operator>>=() [26/29]

template<>

bool com::sun::star::uno::operator>>= | ( | const Any & | rAny,
|  | sal_uInt64 & | value )
| inline

## ◆ operator>>=() [27/29]

template<>

bool com::sun::star::uno::operator>>= | ( | const Any & | rAny,
|  | sal_uInt64 & | value )
| inline

## ◆ operator>>=() [28/29]

template<>

bool com::sun::star::uno::operator>>= | ( | const Any & | rAny,
|  | Type & | value )
| inline

## ◆ operator>>=() [29/29]

template<>

bool com::sun::star::uno::operator>>= | ( | const Any & | rAny,
|  | Type & | value )
| inline

## ◆ setCurrentContext()

bool com::sun::star::uno::setCurrentContext | ( | Reference< XCurrentContext > const & | xContext | ) |
| inline

Setting the current context.

Parameters

  xContext | current context to be set

Returns
  true, if context has been successfully set

## ◆ toAny() [1/3]

template<>

Any com::sun::star::uno::toAny | ( | Any const & | value | ) |
| inline

## ◆ toAny() [2/3]

template<>

Any com::sun::star::uno::toAny | ( | Any const & | value | ) |
| inline

## ◆ toAny() [3/3]

template<typename T>

Any com::sun::star::uno::toAny | ( | T const & | value | ) |
| inline

Wrap a value in an Any, if necessary.

(A difference to the deprecated makeAny is that makeAny cannot be called on an Any, while toAny just returns the given Any.)

Since
  LibreOffice 5.0

## ◆ toUnoSequence()

com::sun::star::uno::Sequence< sal_Int8 > com::sun::star::uno::toUnoSequence | ( | const ::rtl::ByteSequence & | rByteSequence | ) |

Creates a UNO byte sequence from a SAL byte sequence.

Parameters

  rByteSequence | a byte sequence

Returns
  a UNO byte sequence

## Variable Documentation

## ◆ Array< T >::s_pType

template<class T>

typelib_TypeDescriptionReference* com::sun::star::uno::Array< T >::s_pType = NULL