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-07 09:56:27 +0100 |
commit | 7d5655392352b655dc146baae4a915f48db9eb35 (patch) | |
tree | b5ad286fb051474a00741358affee639271ba95e | |
parent | 17799461a4c4486becf98de8432ef97aab1d069d (diff) |
reset Logical format when setting a number value via Range vba api
Change-Id: I0f9a68228c9cb6425b1d139744a92c4a3d4c6012
-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; |