diff options
author | Noel Power <noel.power@suse.com> | 2013-04-25 12:36:17 +0100 |
---|---|---|
committer | Noel Power <noel.power@suse.com> | 2013-05-09 14:11:21 +0100 |
commit | 8cfc390a42097cf1b98896a62c70e1fb27fdc89b (patch) | |
tree | 07da81b93dfc54da9c063ac5d04d874ec5970706 /sc | |
parent | 2f3359dbe86ad5b64b1c8e5c41b2fec3be9242a5 (diff) |
reset Logical format when setting a number value via Range vba api
Change-Id: I0f9a68228c9cb6425b1d139744a92c4a3d4c6012
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/ui/vba/vbarange.cxx | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/sc/source/ui/vba/vbarange.cxx b/sc/source/ui/vba/vbarange.cxx index 276cba88ccc7..110512e373c3 100644 --- a/sc/source/ui/vba/vbarange.cxx +++ b/sc/source/ui/vba/vbarange.cxx @@ -782,7 +782,16 @@ CellValueSetter::processValue( const uno::Any& aValue, const uno::Reference< tab { double nDouble = 0.0; if ( aValue >>= nDouble ) + { + uno::Reference< table::XCellRange > xRange( xCell, uno::UNO_QUERY_THROW ); + NumFormatHelper cellFormat( xRange ); + // If we are setting a number and the cell types was logical + // then we need to reset the logical format. ( see case uno::TypeClass_BOOLEAN: + // handling above ) + if ( cellFormat.isBooleanType() ) + cellFormat.setNumberFormat("General"); xCell->setValue( nDouble ); + } else isExtracted = false; break; |