summaryrefslogtreecommitdiff
path: root/toolkit/source
diff options
context:
space:
mode:
authorFrank Schönheit <fs@openoffice.org>2002-10-08 11:32:43 +0000
committerFrank Schönheit <fs@openoffice.org>2002-10-08 11:32:43 +0000
commit6d689829747f7374907fc3681a8c02f294ed9bae (patch)
treeac1459ae29d352d2b473e59a519ab49938ef43b4 /toolkit/source
parent65dbc28d99be53c324a46c1d7d2e024b1b16b86b (diff)
#96136# when setting values for properties of type double, be somewhat more tolerant
Diffstat (limited to 'toolkit/source')
-rw-r--r--toolkit/source/controls/unocontrolmodel.cxx18
1 files changed, 16 insertions, 2 deletions
diff --git a/toolkit/source/controls/unocontrolmodel.cxx b/toolkit/source/controls/unocontrolmodel.cxx
index efd5f777e28f..15cbc7cc98be 100644
--- a/toolkit/source/controls/unocontrolmodel.cxx
+++ b/toolkit/source/controls/unocontrolmodel.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: unocontrolmodel.cxx,v $
*
- * $Revision: 1.29 $
+ * $Revision: 1.30 $
*
- * last change: $Author: fs $ $Date: 2002-07-29 12:20:48 $
+ * last change: $Author: fs $ $Date: 2002-10-08 12:32:43 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -1158,6 +1158,20 @@ sal_Bool UnoControlModel::convertFastPropertyValue( Any & rConvertedValue, Any &
switch (pDestType->getTypeClass())
{
+ case TypeClass_DOUBLE:
+ {
+ // try as double
+ double nAsDouble = 0;
+ if ( bConverted = ( rValue >>= nAsDouble ) )
+ rConvertedValue <<= nAsDouble;
+ else
+ { // try as integer - 96136 - 2002-10-08 - fs@openoffice.org
+ sal_Int32 nAsInteger = 0;
+ if ( bConverted = ( rValue >>= nAsInteger ) )
+ rConvertedValue <<= (double)nAsInteger;
+ }
+ }
+ break;
case TypeClass_SHORT:
{
sal_Int16 n;