btw, in case people don't know you can export VALGRIND=memcheck make -sr and the unit tests are run under valgrind then
e.g. the sc unit test has the attached valgrind.log bug in it, I've attached a probable fix. 2f632a0b39e6ae6518131ef6d100831c69c2f68f is another bug found through valgrind on the unit tests. C.
==18095== Conditional jump or move depends on uninitialised value(s) ==18095== at 0x1080841A: ScDBQueryDataIterator::DataAccessInternal::getCurrent(ScDBQueryDataIterator::Value&) (dociter.cxx:585) ==18095== by 0x108087F6: ScDBQueryDataIterator::DataAccessInternal::getFirst(ScDBQueryDataIterator::Value&) (dociter.cxx:648) ==18095== by 0x108094B3: ScDBQueryDataIterator::GetFirst(ScDBQueryDataIterator::Value&) (dociter.cxx:925) ==18095== by 0x10A281D6: ScInterpreter::ScDBCount() (interpr1.cxx:6509) ==18095== by 0x10A5B9C6: ScInterpreter::Interpret() (interpr4.cxx:3934) ==18095== by 0x107CC9C7: ScFormulaCell::InterpretTail(ScFormulaCell::ScInterpretTailParameter) (cell.cxx:1563) ==18095== by 0x107CBABA: ScFormulaCell::Interpret() (cell.cxx:1290) ==18095== by 0x107CE500: ScFormulaCell::MaybeInterpret() (cell.cxx:2025) ==18095== by 0x107D59E1: ScFormulaCell::GetErrCode() (cell2.cxx:733) ==18095== by 0x109A9BA7: ScCellFormat::GetString(ScBaseCell*, unsigned long, String&, Color**, SvNumberFormatter&, unsigned char, unsigned char, ScForceTextFmt) (cellform.cxx:124) ==18095== by 0x1083BCDC: ScDocument::GetCellScriptType(ScBaseCell*, unsigned long) (documen6.cxx:147) ==18095== by 0x1083BE72: ScDocument::GetScriptType(short, int, short, ScBaseCell*) (documen6.cxx:182) ==18095== by 0x107E919F: ScColumn::HasEditCells(int, int, int&) const (column.cxx:2137) ==18095== by 0x107EF11B: ScColumn::GetOptimalHeight(int, int, unsigned short*, OutputDevice*, double, double, Fraction const&, Fraction const&, bool, unsigned short, int) (column2.cxx:745)
diff --git a/sc/source/core/data/dociter.cxx b/sc/source/core/data/dociter.cxx index 76a254f..bc9689b 100644 --- a/sc/source/core/data/dociter.cxx +++ b/sc/source/core/data/dociter.cxx @@ -517,7 +517,8 @@ SCSIZE ScDBQueryDataIterator::SearchColEntryIndex(ScDocument& rDoc, SCTAB nTab, ScDBQueryDataIterator::DataAccessInternal::DataAccessInternal(const ScDBQueryDataIterator* pParent, ScDBQueryParamInternal* pParam, ScDocument* pDoc) : DataAccess(pParent), mpParam(pParam), - mpDoc(pDoc) + mpDoc(pDoc), + bCalcAsShown( pDoc->GetDocOptions().IsCalcAsShown() ) { nCol = mpParam->mnField; nRow = mpParam->nRow1;
_______________________________________________ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice