diff options
author | Kohei Yoshida <kohei.yoshida@collabora.com> | 2014-02-09 11:34:11 -0500 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@collabora.com> | 2014-02-09 11:35:50 -0500 |
commit | 295869ce95c00a0e0b192ea6bf62753f91badaf2 (patch) | |
tree | 5c365416ca9328a4d909245b87c6aad06ad5d7a2 | |
parent | 71fe47cfe652829ff7dc09ae49b1c6c22d9b6a6d (diff) |
fdo#74479: Treat empty cells as if they have a value of 0.
Change-Id: I3701848016c230138e8791f683a2c8b97219198d
-rw-r--r-- | sc/source/core/tool/scmatrix.cxx | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/sc/source/core/tool/scmatrix.cxx b/sc/source/core/tool/scmatrix.cxx index 74f7fa3d9528..090cada23e71 100644 --- a/sc/source/core/tool/scmatrix.cxx +++ b/sc/source/core/tool/scmatrix.cxx @@ -1612,7 +1612,16 @@ public: } break; case mdds::mtm::element_empty: - std::advance(miPos, node.size); + { + // Empty element is equivalent of having a numeric value of 0.0. + for (size_t i = 0; i < node.size; ++i, ++miPos) + { + if (rtl::math::isNan(*miPos)) + continue; + + *miPos = op(*miPos, 0.0); + } + } default: ; } |