summaryrefslogtreecommitdiff
path: root/sc/source/core/data/column3.cxx
diff options
context:
space:
mode:
authorLuboš Luňák <l.lunak@collabora.com>2018-06-26 17:07:45 +0200
committerLuboš Luňák <l.lunak@collabora.com>2018-06-27 09:59:10 +0200
commit4d37e0d5dd22343a3b7942649f460db544ae536c (patch)
treeea6183f480398f0ae8137d16bc620208560e82f3 /sc/source/core/data/column3.cxx
parentceabe204a7547988df8851e5d807ec83105e190c (diff)
use optional ScInterpreterContext in ScColumn::GetString()
Otherwise calc's threading asserts with fdo#37765-1. Change-Id: Ic2500f2218bf62c4d05f1c5284e62a53c0598b53 Reviewed-on: https://gerrit.libreoffice.org/56484 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
Diffstat (limited to 'sc/source/core/data/column3.cxx')
-rw-r--r--sc/source/core/data/column3.cxx7
1 files changed, 4 insertions, 3 deletions
diff --git a/sc/source/core/data/column3.cxx b/sc/source/core/data/column3.cxx
index 3b5c11fb5c8d..5ef13e7a951a 100644
--- a/sc/source/core/data/column3.cxx
+++ b/sc/source/core/data/column3.cxx
@@ -2558,7 +2558,7 @@ void ScColumn::SetValue(
BroadcastNewCell(nRow);
}
-void ScColumn::GetString( SCROW nRow, OUString& rString ) const
+void ScColumn::GetString( SCROW nRow, OUString& rString, const ScInterpreterContext* pContext ) const
{
ScRefCellValue aCell = GetCellValue(nRow);
@@ -2566,9 +2566,10 @@ void ScColumn::GetString( SCROW nRow, OUString& rString ) const
if (aCell.meType == CELLTYPE_FORMULA)
aCell.mpFormula->MaybeInterpret();
- sal_uInt32 nFormat = GetNumberFormat(GetDoc()->GetNonThreadedContext(), nRow);
+ sal_uInt32 nFormat = GetNumberFormat( pContext ? *pContext : GetDoc()->GetNonThreadedContext(), nRow);
Color* pColor = nullptr;
- ScCellFormat::GetString(aCell, nFormat, rString, &pColor, *(GetDoc()->GetFormatTable()), GetDoc());
+ ScCellFormat::GetString(aCell, nFormat, rString, &pColor,
+ pContext ? *(pContext->GetFormatTable()) : *(GetDoc()->GetFormatTable()), GetDoc());
}
double* ScColumn::GetValueCell( SCROW nRow )