summaryrefslogtreecommitdiff
path: root/stoc/source
diff options
context:
space:
mode:
Diffstat (limited to 'stoc/source')
-rw-r--r--stoc/source/corereflection/crarray.cxx8
-rw-r--r--stoc/source/corereflection/crefl.cxx2
-rw-r--r--stoc/source/typeconv/convert.cxx33
3 files changed, 22 insertions, 21 deletions
diff --git a/stoc/source/corereflection/crarray.cxx b/stoc/source/corereflection/crarray.cxx
index 4bc0eb53acba..e329f63470d9 100644
--- a/stoc/source/corereflection/crarray.cxx
+++ b/stoc/source/corereflection/crarray.cxx
@@ -87,7 +87,7 @@ void ArrayIdlClassImpl::realloc( Any & rArray, sal_Int32 nLen )
throw(::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException)
{
TypeClass eTC = rArray.getValueTypeClass();
- if (eTC != TypeClass_SEQUENCE && eTC != TypeClass_ARRAY)
+ if (eTC != TypeClass_SEQUENCE)
{
throw IllegalArgumentException(
OUString("no sequence given!"),
@@ -112,7 +112,7 @@ sal_Int32 ArrayIdlClassImpl::getLen( const Any & rArray )
throw(::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException)
{
TypeClass eTC = rArray.getValueTypeClass();
- if (eTC != TypeClass_SEQUENCE && eTC != TypeClass_ARRAY)
+ if (eTC != TypeClass_SEQUENCE)
{
throw IllegalArgumentException(
OUString("no sequence given!"),
@@ -126,7 +126,7 @@ Any ArrayIdlClassImpl::get( const Any & rArray, sal_Int32 nIndex )
throw(::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::ArrayIndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException)
{
TypeClass eTC = rArray.getValueTypeClass();
- if (eTC != TypeClass_SEQUENCE && eTC != TypeClass_ARRAY)
+ if (eTC != TypeClass_SEQUENCE)
{
throw IllegalArgumentException(
OUString("no sequence given!"),
@@ -157,7 +157,7 @@ void ArrayIdlClassImpl::set( Any & rArray, sal_Int32 nIndex, const Any & rNewVal
throw(::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::ArrayIndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException)
{
TypeClass eTC = rArray.getValueTypeClass();
- if (eTC != TypeClass_SEQUENCE && eTC != TypeClass_ARRAY)
+ if (eTC != TypeClass_SEQUENCE)
{
throw IllegalArgumentException(
OUString("no sequence given!"),
diff --git a/stoc/source/corereflection/crefl.cxx b/stoc/source/corereflection/crefl.cxx
index cc437d08920b..1ba2ed44fb2d 100644
--- a/stoc/source/corereflection/crefl.cxx
+++ b/stoc/source/corereflection/crefl.cxx
@@ -208,11 +208,9 @@ inline Reference< XIdlClass > IdlReflectionServiceImpl::constructClass(
return new EnumIdlClassImpl( this, pTypeDescr->pTypeName, pTypeDescr->eTypeClass, pTypeDescr );
case typelib_TypeClass_STRUCT:
- case typelib_TypeClass_UNION:
case typelib_TypeClass_EXCEPTION:
return new CompoundIdlClassImpl( this, pTypeDescr->pTypeName, pTypeDescr->eTypeClass, pTypeDescr );
- case typelib_TypeClass_ARRAY:
case typelib_TypeClass_SEQUENCE:
return new ArrayIdlClassImpl( this, pTypeDescr->pTypeName, pTypeDescr->eTypeClass, pTypeDescr );
diff --git a/stoc/source/typeconv/convert.cxx b/stoc/source/typeconv/convert.cxx
index b0c01c34e35d..19d235337797 100644
--- a/stoc/source/typeconv/convert.cxx
+++ b/stoc/source/typeconv/convert.cxx
@@ -521,9 +521,8 @@ Any SAL_CALL TypeConverter_Impl::convertTo( const Any& rVal, const Type& aDestTy
case TypeClass_ANY:
return rVal;
- // --- to STRUCT, UNION, EXCEPTION ----------------------------------------------------------
+ // --- to STRUCT, EXCEPTION ----------------------------------------------------------
case TypeClass_STRUCT:
-// case TypeClass_UNION: // xxx todo
case TypeClass_EXCEPTION:
{
// same types or destination type is derived source type?
@@ -700,22 +699,26 @@ Any TypeConverter_Impl::convertToSimpleType( const Any& rVal, TypeClass aDestina
switch (aDestinationClass)
{
// only simple Conversion of _simple_ types
- case TypeClass_INTERFACE:
- case TypeClass_SERVICE:
- case TypeClass_STRUCT:
- case TypeClass_TYPEDEF:
- case TypeClass_UNION:
- case TypeClass_EXCEPTION:
- case TypeClass_ARRAY:
- case TypeClass_SEQUENCE:
- case TypeClass_ENUM:
- case TypeClass_UNKNOWN:
- case TypeClass_MODULE:
+ case TypeClass_VOID:
+ case TypeClass_BOOLEAN:
+ case TypeClass_BYTE:
+ case TypeClass_SHORT:
+ case TypeClass_UNSIGNED_SHORT:
+ case TypeClass_LONG:
+ case TypeClass_UNSIGNED_LONG:
+ case TypeClass_HYPER:
+ case TypeClass_UNSIGNED_HYPER:
+ case TypeClass_FLOAT:
+ case TypeClass_DOUBLE:
+ case TypeClass_CHAR:
+ case TypeClass_STRING:
+ case TypeClass_ANY:
+ break;
+
+ default:
throw IllegalArgumentException(
OUString("destination type is not simple!"),
Reference< XInterface >(), (sal_Int16) 1 );
- default:
- break;
}
Type aSourceType = rVal.getValueType();