[Libreoffice-commits] core.git: Branch 'libreoffice-4-2' - sc/source
Kohei Yoshida
kohei.yoshida at collabora.com
Sun Feb 9 09:18:34 PST 2014
sc/source/core/tool/scmatrix.cxx | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
New commits:
commit dbb89000146d118ea28f0869d03e121d01e11f04
Author: Kohei Yoshida <kohei.yoshida at collabora.com>
Date: Sun Feb 9 11:34:11 2014 -0500
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 at googlemail.com>
Reviewed-by: Markus Mohrhard <markus.mohrhard at googlemail.com>
diff --git a/sc/source/core/tool/scmatrix.cxx b/sc/source/core/tool/scmatrix.cxx
index 132923d..45c8e48 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:
;
}
More information about the Libreoffice-commits
mailing list