[Libreoffice-commits] core.git: sc/source
Markus Mohrhard
markus.mohrhard at googlemail.com
Wed Aug 16 17:35:16 UTC 2017
sc/source/core/data/column4.cxx | 28 ++++++++++++++++++++++++++++
1 file changed, 28 insertions(+)
New commits:
commit 8e5271e180e1f0c6239b7b078d065d5979d86d21
Author: Markus Mohrhard <markus.mohrhard at 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 <ci at libreoffice.org>
Reviewed-by: Markus Mohrhard <markus.mohrhard at 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;
More information about the Libreoffice-commits
mailing list