diff options
author | Kohei Yoshida <kohei.yoshida@collabora.com> | 2014-04-25 23:21:22 -0400 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2014-04-30 14:56:56 +0200 |
commit | 6312bc27880b0d6f80c8b87b0c810db3170d8327 (patch) | |
tree | 5436a4f8ea6012d4ed9fdcde6ed2825a7c346712 /sc/source/filter | |
parent | af3211470e92a26e5715792c861a9186626790bb (diff) |
fdo#76611: Wrap reference addresses at max boundaries.
When importing shared formula tokens.
Change-Id: I7e1a05a78c3a93330476516e0459cffb668e3f66
(cherry picked from commit c6c286f14468d341f5fd88edc39a37175a1b6caa)
Reviewed-on: https://gerrit.libreoffice.org/9167
Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Diffstat (limited to 'sc/source/filter')
-rw-r--r-- | sc/source/filter/excel/excform.cxx | 4 | ||||
-rw-r--r-- | sc/source/filter/excel/impop.cxx | 1 |
2 files changed, 4 insertions, 1 deletions
diff --git a/sc/source/filter/excel/excform.cxx b/sc/source/filter/excel/excform.cxx index 1f1336e34036..b609e28cf191 100644 --- a/sc/source/filter/excel/excform.cxx +++ b/sc/source/filter/excel/excform.cxx @@ -128,7 +128,8 @@ void ImportExcel::Formula( const ScTokenArray* pSharedCode = pFormConv->GetSharedFormula(aRefPos); if (pSharedCode) { - ScFormulaCell* pCell = new ScFormulaCell(pD, aScPos, *pSharedCode); + ScFormulaCell* pCell = new ScFormulaCell(pD, aScPos, pSharedCode->Clone()); + pCell->GetCode()->WrapReference(aScPos, EXC_MAXCOL8, EXC_MAXROW8); rDoc.getDoc().EnsureTable(aScPos.Tab()); rDoc.setFormulaCell(aScPos, pCell); pCell->SetNeedNumberFormat(false); @@ -156,6 +157,7 @@ void ImportExcel::Formula( if (pResult) { pCell = new ScFormulaCell(&rDoc.getDoc(), aScPos, *pResult); + pCell->GetCode()->WrapReference(aScPos, EXC_MAXCOL8, EXC_MAXROW8); rDoc.getDoc().EnsureTable(aScPos.Tab()); rDoc.setFormulaCell(aScPos, pCell); SetLastFormula(aScPos.Col(), aScPos.Row(), fCurVal, nXF, pCell); diff --git a/sc/source/filter/excel/impop.cxx b/sc/source/filter/excel/impop.cxx index 913d1ba7bdfc..312da250e910 100644 --- a/sc/source/filter/excel/impop.cxx +++ b/sc/source/filter/excel/impop.cxx @@ -882,6 +882,7 @@ void ImportExcel::Shrfmla( void ) ScDocumentImport& rDoc = GetDocImport(); ScFormulaCell* pCell = new ScFormulaCell(pD, aPos, *pErgebnis); + pCell->GetCode()->WrapReference(aPos, EXC_MAXCOL8, EXC_MAXROW8); rDoc.getDoc().EnsureTable(aPos.Tab()); rDoc.setFormulaCell(aPos, pCell); pCell->SetNeedNumberFormat(false); |