https://bugs.freedesktop.org/show_bug.cgi?id=76663
--- Comment #5 from Winfried Donkers <[email protected]> --- Added some traces to find out where the calculation starts going wrong. The problem is in /sc/source/core/tool/scmatrix.cxx, function ScMatrix::IterateResult ScMatrixImpl::Product(bool bTextAsZero), which produces the wrong result. Traces show that the WalkElementBlocks::operator() produces a wrong intermediate result: (code snippet: class WalkElementBlocks : std::unary_function<MatrixImplType::element_block_node_type, void> [...] void operator() (const MatrixImplType::element_block_node_type& node) { switch (node.type) { case mdds::mtm::element_numeric: { typedef MatrixImplType::numeric_block_type block_type; block_type::const_iterator it = block_type::begin(*node.data); block_type::const_iterator itEnd = block_type::end(*node.data); for (; it != itEnd; ++it) { if (mbFirst) { maOp(maRes.mfFirst, *it); SAL_WARN( "76663", "WalkElementBlocks::operator() mbFirst = true, maRes.mfFirst=" << maRes.mfFirst << ", maRes.mfRest=" << maRes.mfRest << ", maRes.mnCount=" << maRes.mnCount ); mbFirst = false; } else maOp(maRes.mfRest, *it); SAL_WARN( "76663", "WalkElementBlocks::operator() maRes.mfFirst=" << maRes.mfFirst << ", maRes.mfR est=" << maRes.mfRest << ", maRes.mnCount=" << maRes.mnCount ); } maRes.mnCount += node.size; } break; ) traces: warn:76663:32404:1:sc/source/core/tool/scmatrix.cxx:1009: WalkElementBlocks::operator() mbFirst = true, maRes.mfFirst=0, maRes.mfRest=1, maRes.mnCount=0 warn:76663:32404:1:sc/source/core/tool/scmatrix.cxx:1014: WalkElementBlocks::operator() maRes.mfFirst=0, maRes.mfRest=1, maRes.mnCount=0 <<== msRes.mfRest should be 1.1 !! warn:76663:32404:1:sc/source/core/tool/scmatrix.cxx:1014: WalkElementBlocks::operator() maRes.mfFirst=0, maRes.mfRest=1.2, maRes.mnCount=0 warn:76663:32404:1:sc/source/core/tool/scmatrix.cxx:1014: WalkElementBlocks::operator() maRes.mfFirst=0, maRes.mfRest=1.56, maRes.mnCount=0 warn:76663:32404:1:sc/source/core/tool/scmatrix.cxx:1014: WalkElementBlocks::operator() maRes.mfFirst=0, maRes.mfRest=2.184, maRes.mnCount=0 warn:76663:32404:1:sc/source/core/tool/scmatrix.cxx:1661: ScMatrixImpl::Product aRes.mfFirst=0, aRes.mfRest=2.184, aRes.mnCount=4 -- You are receiving this mail because: You are the assignee for the bug.
_______________________________________________ Libreoffice-bugs mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs
