diff options
author | Kohei Yoshida <kohei.yoshida@collabora.com> | 2014-02-09 11:34:11 -0500 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2014-02-09 17:18:01 +0000 |
commit | dbb89000146d118ea28f0869d03e121d01e11f04 (patch) | |
tree | b243fce5af76b843efdc2b03d836b614f0e6c1ae /sc | |
parent | 8ef53812f161758826f9a4396f7d6416b29c5f97 (diff) |
fdo#74479: Treat empty cells as if they have a value of 0.
Change-Id: I3701848016c230138e8791f683a2c8b97219198d
(cherry picked from commit 295869ce95c00a0e0b192ea6bf62753f91badaf2)
Reviewed-on: https://gerrit.libreoffice.org/7954
Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Diffstat (limited to 'sc')
-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 132923decf7e..45c8e4868094 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: ; } |