summaryrefslogtreecommitdiff
path: root/include/com/sun/star/uno
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2013-08-14 11:45:30 +0200
committerStephan Bergmann <sbergman@redhat.com>2013-08-14 13:29:39 +0200
commitc38592527adfc526133c3ac36b10aa77234313ee (patch)
tree0000e8f83527d769899e7b84d104eb93e47b82fd /include/com/sun/star/uno
parent86435f9e28f8e7936777cbd6e8598994e7c42428 (diff)
EXCEPTIONS_OFF is never defined
...since gb_LinkTarget_NOEXCEPTIONFLAGS became unused with e81b1f23c49e35c1cde1faa44281812e97be60f5 "remove gb_LinkTarget_add_noexception_object." Change-Id: I4a7275b5b26a9d4b6ded66efb52e6866e6e09cc3
Diffstat (limited to 'include/com/sun/star/uno')
-rw-r--r--include/com/sun/star/uno/Any.h4
-rw-r--r--include/com/sun/star/uno/Any.hxx2
-rw-r--r--include/com/sun/star/uno/Reference.h10
-rw-r--r--include/com/sun/star/uno/Reference.hxx15
-rw-r--r--include/com/sun/star/uno/Sequence.h3
-rw-r--r--include/com/sun/star/uno/Sequence.hxx16
-rw-r--r--include/com/sun/star/uno/genfunc.hxx4
7 files changed, 0 insertions, 54 deletions
diff --git a/include/com/sun/star/uno/Any.h b/include/com/sun/star/uno/Any.h
index b4ead8977596..7be6017fa264 100644
--- a/include/com/sun/star/uno/Any.h
+++ b/include/com/sun/star/uno/Any.h
@@ -157,7 +157,6 @@ public:
inline const void * SAL_CALL getValue() const SAL_THROW(())
{ return pData; }
-#if ! defined(EXCEPTIONS_OFF)
/** Provides a value of specified type, so you can easily write e.g.
<pre>
sal_Int32 myVal = myAny.get<sal_Int32>();
@@ -172,7 +171,6 @@ public:
*/
template <typename T>
inline T get() const;
-#endif // ! defined(EXCEPTIONS_OFF)
/** Sets a value. If the any already contains a value, that value will be destructed
and its memory freed.
@@ -240,10 +238,8 @@ private:
// Omitting the following private declarations leads to an internal compiler
// error on MSVC (version 1310).
// not impl: forbid use with ambiguous type (sal_Unicode, sal_uInt16)
-#if ! defined(EXCEPTIONS_OFF)
template <>
sal_uInt16 get<sal_uInt16>() const;
-#endif // ! defined(EXCEPTIONS_OFF)
template <>
bool has<sal_uInt16>() const;
#endif // defined(_MSC_VER)
diff --git a/include/com/sun/star/uno/Any.hxx b/include/com/sun/star/uno/Any.hxx
index a643a6f25867..04115a56b3c1 100644
--- a/include/com/sun/star/uno/Any.hxx
+++ b/include/com/sun/star/uno/Any.hxx
@@ -567,7 +567,6 @@ inline sal_Bool SAL_CALL operator != ( const Any & rAny, const C & value ) SAL_T
return (! operator == ( rAny, value ));
}
-#if ! defined(EXCEPTIONS_OFF)
extern "C" rtl_uString * SAL_CALL cppu_Any_extraction_failure_msg(
uno_Any const * pAny, typelib_TypeDescriptionReference * pType )
SAL_THROW_EXTERN_C();
@@ -591,7 +590,6 @@ T Any::get() const
// not impl: forbid use with ambiguous type (sal_Unicode, sal_uInt16)
template <>
sal_uInt16 Any::get<sal_uInt16>() const;
-#endif // ! defined(EXCEPTIONS_OFF)
/**
Support for Any in std::ostream (and thus in CPPUNIT_ASSERT or SAL_INFO
diff --git a/include/com/sun/star/uno/Reference.h b/include/com/sun/star/uno/Reference.h
index 27787d3ec1ef..73a860802857 100644
--- a/include/com/sun/star/uno/Reference.h
+++ b/include/com/sun/star/uno/Reference.h
@@ -66,7 +66,6 @@ protected:
*/
inline static XInterface * SAL_CALL iquery( XInterface * pInterface, const Type & rType )
SAL_THROW( (RuntimeException) );
-#ifndef EXCEPTIONS_OFF
/** Queries given interface for type rType.
Throws a RuntimeException if the demanded interface cannot be queried.
@@ -76,7 +75,6 @@ protected:
*/
inline static XInterface * SAL_CALL iquery_throw( XInterface * pInterface, const Type & rType )
SAL_THROW( (RuntimeException) );
-#endif
public:
/** Gets interface pointer. This call does not acquire the interface.
@@ -139,7 +137,6 @@ enum UnoReference_Query
*/
UNO_QUERY,
};
-#ifndef EXCEPTIONS_OFF
/** Enum defining UNO_QUERY_THROW for implicit interface query.
If the demanded interface is unavailable, then a RuntimeException is thrown.
*/
@@ -158,7 +155,6 @@ enum UnoReference_SetThrow
{
UNO_SET_THROW
};
-#endif
/// @cond INTERNAL
namespace detail {
@@ -225,7 +221,6 @@ class Reference : public BaseReference
*/
inline static XInterface * SAL_CALL iquery( XInterface * pInterface )
SAL_THROW( (RuntimeException) );
-#ifndef EXCEPTIONS_OFF
/** Queries given interface for type interface_type.
Throws a RuntimeException if the demanded interface cannot be queried.
@@ -241,7 +236,6 @@ class Reference : public BaseReference
*/
inline static interface_type * SAL_CALL iset_throw( interface_type * pInterface )
SAL_THROW( (RuntimeException) );
-#endif
/** Cast from an "interface pointer" (e.g., BaseReference::_pInterface) to a
pointer to this interface_type.
@@ -353,7 +347,6 @@ public:
@param dummy UNO_QUERY to force obvious distinction to other constructors
*/
inline Reference( const Any & rAny, UnoReference_Query dummy) SAL_THROW( (RuntimeException) );
-#ifndef EXCEPTIONS_OFF
/** Constructor: Queries given interface for reference interface type (interface_type).
Throws a RuntimeException if the demanded interface cannot be queried.
@@ -396,7 +389,6 @@ public:
@since UDK 3.2.8
*/
inline Reference( interface_type * pInterface, UnoReference_SetThrow dummy ) SAL_THROW( (RuntimeException) );
-#endif
/** Cast operator to Reference< XInterface >: Reference objects are binary compatible and
any interface must be derived from com.sun.star.uno.XInterface.
@@ -483,7 +475,6 @@ public:
*/
inline bool set( Any const & rAny, UnoReference_Query dummy );
-#ifndef EXCEPTIONS_OFF
/** Queries given interface for reference interface type (interface_type) and sets it.
An interface already set will be released.
Throws a RuntimeException if the demanded interface cannot be set.
@@ -534,7 +525,6 @@ public:
*/
inline void SAL_CALL set( const Reference< interface_type > & rRef, UnoReference_SetThrow dummy) SAL_THROW( (RuntimeException) );
-#endif
/** Assignment operator: Acquires given interface pointer and sets reference.
An interface already set will be released.
diff --git a/include/com/sun/star/uno/Reference.hxx b/include/com/sun/star/uno/Reference.hxx
index 419439ecbb9a..a358c97811d1 100644
--- a/include/com/sun/star/uno/Reference.hxx
+++ b/include/com/sun/star/uno/Reference.hxx
@@ -57,7 +57,6 @@ inline XInterface * Reference< interface_type >::iquery(
{
return BaseReference::iquery(pInterface, interface_type::static_type());
}
-#ifndef EXCEPTIONS_OFF
extern "C" rtl_uString * SAL_CALL cppu_unsatisfied_iquery_msg(
typelib_TypeDescriptionReference * pType )
SAL_THROW_EXTERN_C();
@@ -98,7 +97,6 @@ inline interface_type * Reference< interface_type >::iset_throw(
::rtl::OUString( cppu_unsatisfied_iset_msg( interface_type::static_type().getTypeLibType() ), SAL_NO_ACQUIRE ),
NULL );
}
-#endif
//__________________________________________________________________________________________________
template< class interface_type >
@@ -172,7 +170,6 @@ inline Reference< interface_type >::Reference( const Any & rAny, UnoReference_Qu
_pInterface = (typelib_TypeClass_INTERFACE == rAny.pType->eTypeClass
? iquery( static_cast< XInterface * >( rAny.pReserved ) ) : 0);
}
-#ifndef EXCEPTIONS_OFF
//__________________________________________________________________________________________________
template< class interface_type >
inline Reference< interface_type >::Reference( const BaseReference & rRef, UnoReference_QueryThrow ) SAL_THROW( (RuntimeException) )
@@ -204,7 +201,6 @@ inline Reference< interface_type >::Reference( interface_type * pInterface, UnoR
{
_pInterface = castToXInterface( iset_throw( pInterface ) );
}
-#endif
//__________________________________________________________________________________________________
template< class interface_type >
@@ -284,7 +280,6 @@ inline bool Reference< interface_type >::set(
SAL_NO_ACQUIRE );
}
-#ifndef EXCEPTIONS_OFF
//__________________________________________________________________________________________________
template< class interface_type >
inline void Reference< interface_type >::set(
@@ -326,8 +321,6 @@ inline void Reference< interface_type >::set(
set( rRef.get(), UNO_SET_THROW );
}
-#endif
-
//__________________________________________________________________________________________________
template< class interface_type >
inline Reference< interface_type > & Reference< interface_type >::operator = (
@@ -369,21 +362,17 @@ inline sal_Bool BaseReference::operator == ( XInterface * pInterface ) const SAL
{
if (_pInterface == pInterface)
return sal_True;
-#ifndef EXCEPTIONS_OFF
try
{
-#endif
// only the query to XInterface must return the same pointer if they belong to same objects
Reference< XInterface > x1( _pInterface, UNO_QUERY );
Reference< XInterface > x2( pInterface, UNO_QUERY );
return (x1._pInterface == x2._pInterface);
-#ifndef EXCEPTIONS_OFF
}
catch (RuntimeException &)
{
return sal_False;
}
-#endif
}
//______________________________________________________________________________
@@ -392,21 +381,17 @@ inline sal_Bool BaseReference::operator < (
{
if (_pInterface == rRef._pInterface)
return sal_False;
-#if ! defined EXCEPTIONS_OFF
try
{
-#endif
// only the query to XInterface must return the same pointer:
Reference< XInterface > x1( _pInterface, UNO_QUERY );
Reference< XInterface > x2( rRef, UNO_QUERY );
return (x1._pInterface < x2._pInterface);
-#if ! defined EXCEPTIONS_OFF
}
catch (RuntimeException &)
{
return sal_False;
}
-#endif
}
//__________________________________________________________________________________________________
diff --git a/include/com/sun/star/uno/Sequence.h b/include/com/sun/star/uno/Sequence.h
index ed754cf3ccf2..1e6d2b0e102b 100644
--- a/include/com/sun/star/uno/Sequence.h
+++ b/include/com/sun/star/uno/Sequence.h
@@ -24,10 +24,7 @@
#include "com/sun/star/uno/Type.h"
#include "rtl/alloc.h"
-#if ! defined EXCEPTIONS_OFF
#include <new>
-#endif
-
namespace rtl
{
diff --git a/include/com/sun/star/uno/Sequence.hxx b/include/com/sun/star/uno/Sequence.hxx
index a23fd3b48225..9ce88d35b2a4 100644
--- a/include/com/sun/star/uno/Sequence.hxx
+++ b/include/com/sun/star/uno/Sequence.hxx
@@ -76,16 +76,12 @@ template< class E >
inline Sequence< E >::Sequence( const E * pElements, sal_Int32 len )
{
const Type & rType = ::cppu::getTypeFavourUnsigned( this );
-#if ! defined EXCEPTIONS_OFF
sal_Bool success =
-#endif
::uno_type_sequence_construct(
&_pSequence, rType.getTypeLibType(),
const_cast< E * >( pElements ), len, (uno_AcquireFunc)cpp_acquire );
-#if ! defined EXCEPTIONS_OFF
if (! success)
throw ::std::bad_alloc();
-#endif
}
//______________________________________________________________________________
@@ -93,16 +89,12 @@ template< class E >
inline Sequence< E >::Sequence( sal_Int32 len )
{
const Type & rType = ::cppu::getTypeFavourUnsigned( this );
-#if ! defined EXCEPTIONS_OFF
sal_Bool success =
-#endif
::uno_type_sequence_construct(
&_pSequence, rType.getTypeLibType(),
0, len, (uno_AcquireFunc)cpp_acquire );
-#if ! defined EXCEPTIONS_OFF
if (! success)
throw ::std::bad_alloc();
-#endif
}
//______________________________________________________________________________
@@ -152,16 +144,12 @@ template< class E >
inline E * Sequence< E >::getArray()
{
const Type & rType = ::cppu::getTypeFavourUnsigned( this );
-#if ! defined EXCEPTIONS_OFF
sal_Bool success =
-#endif
::uno_type_sequence_reference2One(
&_pSequence, rType.getTypeLibType(),
(uno_AcquireFunc)cpp_acquire, (uno_ReleaseFunc)cpp_release );
-#if ! defined EXCEPTIONS_OFF
if (! success)
throw ::std::bad_alloc();
-#endif
return reinterpret_cast< E * >( _pSequence->elements );
}
@@ -187,16 +175,12 @@ template< class E >
inline void Sequence< E >::realloc( sal_Int32 nSize )
{
const Type & rType = ::cppu::getTypeFavourUnsigned( this );
-#if !defined EXCEPTIONS_OFF
sal_Bool success =
-#endif
::uno_type_sequence_realloc(
&_pSequence, rType.getTypeLibType(), nSize,
(uno_AcquireFunc)cpp_acquire, (uno_ReleaseFunc)cpp_release );
-#if !defined EXCEPTIONS_OFF
if (!success)
throw ::std::bad_alloc();
-#endif
}
//------------------------------------------------------------------------------
diff --git a/include/com/sun/star/uno/genfunc.hxx b/include/com/sun/star/uno/genfunc.hxx
index d523123733e4..179f676d1afe 100644
--- a/include/com/sun/star/uno/genfunc.hxx
+++ b/include/com/sun/star/uno/genfunc.hxx
@@ -50,10 +50,8 @@ inline void * SAL_CALL cpp_queryInterface( void * pCppI, typelib_TypeDescription
{
if (pCppI)
{
-#ifndef EXCEPTIONS_OFF
try
{
-#endif
Any aRet( reinterpret_cast< XInterface * >( pCppI )->queryInterface(
* reinterpret_cast< const Type * >( &pType ) ) );
if (typelib_TypeClass_INTERFACE == aRet.pType->eTypeClass)
@@ -62,12 +60,10 @@ inline void * SAL_CALL cpp_queryInterface( void * pCppI, typelib_TypeDescription
aRet.pReserved = 0;
return pRet;
}
-#ifndef EXCEPTIONS_OFF
}
catch (RuntimeException &)
{
}
-#endif
}
return 0;
}