sc/source/core/data/column4.cxx | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+)
New commits: commit 8e5271e180e1f0c6239b7b078d065d5979d86d21 Author: Markus Mohrhard <markus.mohrh...@googlemail.com> Date: Wed Aug 16 16:20:38 2017 +0200 also import formula cells again from the cache Change-Id: I116337f32151db4d897d88879acb0380fcedc161 Reviewed-on: https://gerrit.libreoffice.org/41221 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrh...@googlemail.com> diff --git a/sc/source/core/data/column4.cxx b/sc/source/core/data/column4.cxx index 8ded9168246d..3b4caab6e6c1 100644 --- a/sc/source/core/data/column4.cxx +++ b/sc/source/core/data/column4.cxx @@ -1788,6 +1788,34 @@ void ScColumn::RestoreFromCache(SvStream& rStrm) } break; + case 3: + { + std::vector<ScFormulaCell*> aFormulaCells(nDataSize); + + ScAddress aAddr(nCol, nStartRow, nTab); + const formula::FormulaGrammar::Grammar eGrammar = formula::FormulaGrammar::GRAM_ENGLISH_XL_R1C1; + for (SCROW nRow = 0; nRow < static_cast<SCROW>(nDataSize);) + { + sal_uInt64 nFormulaGroupSize = 0; + rStrm.ReadUInt64(nFormulaGroupSize); + sal_Int32 nStrLength = 0; + rStrm.ReadInt32(nStrLength); + std::unique_ptr<char[]> pStr(new char[nStrLength]); + rStrm.ReadBytes(pStr.get(), nStrLength); + OString aOStr(pStr.get(), nStrLength); + OUString aStr = OStringToOUString(aOStr, RTL_TEXTENCODING_UTF8); + for (sal_uInt64 i = 0; i < nFormulaGroupSize; ++i) + { + aFormulaCells[nRow + i] = new ScFormulaCell(pDocument, aAddr, aStr, eGrammar); + aAddr.IncRow(); + } + + nRow += nFormulaGroupSize; + } + + maCells.set(nStartRow, aFormulaCells.begin(), aFormulaCells.end()); + } + break; } nReadRow += nDataSize; _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits