sc/source/core/data/column2.cxx | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+)
New commits: commit a3aaf1dfe355e4fcc3e8ff2758f6dc137294dd1c Author: Kohei Yoshida <kohei.yosh...@gmail.com> Date: Wed Jul 3 15:12:32 2013 -0400 Allow fallback to cell-based calculation. when cell groups are circular dependent. Change-Id: I20b3e522d6bfe4b70e0f59fe64eac065c9509bd9 diff --git a/sc/source/core/data/column2.cxx b/sc/source/core/data/column2.cxx index 542cd92..932e613 100644 --- a/sc/source/core/data/column2.cxx +++ b/sc/source/core/data/column2.cxx @@ -62,6 +62,7 @@ #include <svl/broadcast.hxx> #include <svl/listeneriter.hxx> #include <vcl/outdev.hxx> +#include "formula/errorcodes.hxx" #include <boost/scoped_ptr.hpp> @@ -2175,7 +2176,15 @@ bool appendDouble( { ScFormulaCell& rFC = **itData; if (!rFC.GetErrorOrValue(nErr, fVal) || nErr) + { + if (nErr == ScErrorCodes::errCircularReference) + { + // This cell needs to be recalculated on next visit. + rFC.SetErrCode(0); + rFC.SetDirtyVar(); + } return false; + } rArray.push_back(fVal); } @@ -2264,7 +2273,15 @@ const double* ScColumn::FetchDoubleArray( sc::FormulaGroupContext& rCxt, SCROW n { ScFormulaCell& rCell = **it; if (!rCell.GetErrorOrValue(nErr, fVal) || nErr) + { + if (nErr == ScErrorCodes::errCircularReference) + { + // This cell needs to be recalculated on next visit. + rCell.SetErrCode(0); + rCell.SetDirtyVar(); + } return NULL; + } rArray.push_back(fVal); } @@ -2279,7 +2296,15 @@ const double* ScColumn::FetchDoubleArray( sc::FormulaGroupContext& rCxt, SCROW n { ScFormulaCell& rCell = **it; if (!rCell.GetErrorOrValue(nErr, fVal) || nErr) + { + if (nErr == ScErrorCodes::errCircularReference) + { + // This cell needs to be recalculated on next visit. + rCell.SetErrCode(0); + rCell.SetDirtyVar(); + } return NULL; + } rArray.push_back(fVal); } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits