summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2014-07-09 19:16:19 +0200
committerKohei Yoshida <libreoffice@kohei.us>2014-07-09 18:09:48 +0000
commit068a7035bf679ba1b9650777cae327a18d3ee519 (patch)
tree07dd83e78317e116ec2634b1b29abe076c1b39f7
parentfix crash loading ooo100546-1.xls (diff)
downloadcore-068a7035bf679ba1b9650777cae327a18d3ee519.tar.gz
core-068a7035bf679ba1b9650777cae327a18d3ee519.zip
resolved fdo#62250 absent value cell values are not NaN, set to 0.0
Change-Id: I41459d72adbaa8f6c0c7c22447f6eba5eb8be3e1 (cherry picked from commit fea6f83df8d2183b108695217bc4ff7a93e942c9) Reviewed-on: https://gerrit.libreoffice.org/10175 Reviewed-by: Kohei Yoshida <libreoffice@kohei.us> Tested-by: Kohei Yoshida <libreoffice@kohei.us>
-rw-r--r--sc/source/filter/xml/xmlcelli.cxx6
1 files changed, 6 insertions, 0 deletions
diff --git a/sc/source/filter/xml/xmlcelli.cxx b/sc/source/filter/xml/xmlcelli.cxx
index 4e4c5526b092..d8d409aec362 100644
--- a/sc/source/filter/xml/xmlcelli.cxx
+++ b/sc/source/filter/xml/xmlcelli.cxx
@@ -1157,6 +1157,12 @@ void ScXMLTableRowCellContext::PutValueCell( const ScAddress& rCurrentPos )
}
else //regular value cell
{
+ // fdo#62250 absent values are not NaN, set to 0.0
+ // PutValueCell() is called only for a known cell value type,
+ // bIsEmpty==false in all these cases, no sense to check it here.
+ if (::rtl::math::isNan( fValue))
+ fValue = 0.0;
+
// #i62435# Initialize the value cell's script type if the default
// style's number format is latin-only. If the cell uses a different
// format, the script type will be reset when the style is applied.