summaryrefslogtreecommitdiff
path: root/connectivity
diff options
context:
space:
mode:
authorNiklas Nebel <nn@openoffice.org>2010-04-26 14:26:49 +0200
committerNiklas Nebel <nn@openoffice.org>2010-04-26 14:26:49 +0200
commit24706bb307e38aea2a8c4b0344c5601d7d134db2 (patch)
treefb70249fe0ad3ff3a31c7eae9687cff17781f0c7 /connectivity
parent211863dd571a01c83c6babbe2b880ed82cf85926 (diff)
calc53: #i25840# null result in text column only for empty cells, not values
Diffstat (limited to 'connectivity')
-rw-r--r--connectivity/source/drivers/calc/CTable.cxx9
1 files changed, 5 insertions, 4 deletions
diff --git a/connectivity/source/drivers/calc/CTable.cxx b/connectivity/source/drivers/calc/CTable.cxx
index 1d19c05a46c0..d95c6263b7ed 100644
--- a/connectivity/source/drivers/calc/CTable.cxx
+++ b/connectivity/source/drivers/calc/CTable.cxx
@@ -347,14 +347,15 @@ void lcl_SetValue( ORowSetValue& rValue, const Reference<XSpreadsheet>& xSheet,
switch (nType)
{
case DataType::VARCHAR:
- if ( eCellType == CellContentType_TEXT )
+ if ( eCellType == CellContentType_EMPTY )
+ rValue.setNull();
+ else
{
+ // #i25840# still let Calc convert numbers to text
const Reference<XText> xText( xCell, UNO_QUERY );
if ( xText.is() )
rValue = xText->getString();
- } // if ( eCellType == CellContentType_TEXT )
- else
- rValue.setNull();
+ }
break;
case DataType::DECIMAL:
if ( eCellType == CellContentType_VALUE )