summaryrefslogtreecommitdiff
path: root/toolkit/source
diff options
context:
space:
mode:
authorFrank Schönheit <fs@openoffice.org>2002-07-29 11:20:48 +0000
committerFrank Schönheit <fs@openoffice.org>2002-07-29 11:20:48 +0000
commitcd7c761c960123774e231a2f81febdbd954c48b5 (patch)
tree494d428ec99d9d029a7b2be30fbdcc7227e7e4de /toolkit/source
parentdeea2cfb720a1c750c38e6781ab79977a13bdd69 (diff)
#101722# convertPropertyValue: convert XInterface derivees, too
Diffstat (limited to 'toolkit/source')
-rw-r--r--toolkit/source/controls/unocontrolmodel.cxx21
1 files changed, 19 insertions, 2 deletions
diff --git a/toolkit/source/controls/unocontrolmodel.cxx b/toolkit/source/controls/unocontrolmodel.cxx
index 6b01678dca62..efd5f777e28f 100644
--- a/toolkit/source/controls/unocontrolmodel.cxx
+++ b/toolkit/source/controls/unocontrolmodel.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: unocontrolmodel.cxx,v $
*
- * $Revision: 1.28 $
+ * $Revision: 1.29 $
*
- * last change: $Author: fs $ $Date: 2002-07-15 12:11:50 $
+ * last change: $Author: fs $ $Date: 2002-07-29 12:20:48 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -147,6 +147,10 @@
#include <vcl/svapp.hxx>
#endif
+#ifndef _UNO_DATA_H_
+#include <uno/data.h>
+#endif
+
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::lang;
@@ -1182,6 +1186,19 @@ sal_Bool UnoControlModel::convertFastPropertyValue( Any & rConvertedValue, Any &
rConvertedValue <<= n;
}
break;
+ case TypeClass_INTERFACE:
+ {
+ if ( rValue.getValueType().getTypeClass() == TypeClass_INTERFACE )
+ {
+ Reference< XInterface > xPure;
+ if ( ( rValue >>= xPure ) && xPure.is() )
+ {
+ rConvertedValue = xPure->queryInterface( *pDestType );
+ bConverted = rConvertedValue.hasValue();
+ }
+ }
+ }
+ break;
// TODO: perhaps we should allow us some more tolerance for enum types, too ....
}