summaryrefslogtreecommitdiff
path: root/sc/source/core/data
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2013-07-25 15:33:49 +0200
committerEike Rathke <erack@redhat.com>2013-07-25 16:11:09 +0200
commit1ecdc7aaf661e97a33cf521f553481d79cd26de2 (patch)
tree34811d2f9f17691c749622ff61a42b79f1da15d5 /sc/source/core/data
parentbb98778dbf761a0c88c96117add00a66e5cc6c95 (diff)
resolved fdo#67249 use ScFieldEditEngine to resolve field content
ScEditUtil::GetString() iterated over the paragraphs of an EditTextObject where GetText() does not resolve field content but returns the embedded field markers. To resolve field content an ScFieldEditEngine is needed. This makes it necessary to pass an ScDocument* to obtain the ScFieldEditEngine from, or for cases where there is no ScDocument in the context use a static ScFieldEditEngine which unfortunately is not capable of resolving document specific fields of course, such as DOCINFO_TITLE and TABLE. Also added unit test. Change-Id: Ife3c23b2fec2514b32303239d276c49869786eb5
Diffstat (limited to 'sc/source/core/data')
-rw-r--r--sc/source/core/data/cellvalue.cxx4
-rw-r--r--sc/source/core/data/column.cxx2
-rw-r--r--sc/source/core/data/column2.cxx26
-rw-r--r--sc/source/core/data/column3.cxx23
-rw-r--r--sc/source/core/data/conditio.cxx9
-rw-r--r--sc/source/core/data/dociter.cxx10
-rw-r--r--sc/source/core/data/document.cxx2
-rw-r--r--sc/source/core/data/global.cxx16
-rw-r--r--sc/source/core/data/table3.cxx2
-rw-r--r--sc/source/core/data/table4.cxx10
-rw-r--r--sc/source/core/data/validat.cxx2
11 files changed, 63 insertions, 43 deletions
diff --git a/sc/source/core/data/cellvalue.cxx b/sc/source/core/data/cellvalue.cxx
index 8e6283605f9a..2c4041886541 100644
--- a/sc/source/core/data/cellvalue.cxx
+++ b/sc/source/core/data/cellvalue.cxx
@@ -579,7 +579,7 @@ double ScRefCellValue::getValue()
return 0.0;
}
-OUString ScRefCellValue::getString()
+OUString ScRefCellValue::getString( const ScDocument* pDoc )
{
switch (meType)
{
@@ -589,7 +589,7 @@ OUString ScRefCellValue::getString()
return *mpString;
case CELLTYPE_EDIT:
if (mpEditText)
- return ScEditUtil::GetString(*mpEditText);
+ return ScEditUtil::GetString(*mpEditText, pDoc);
break;
case CELLTYPE_FORMULA:
return mpFormula->GetString();
diff --git a/sc/source/core/data/column.cxx b/sc/source/core/data/column.cxx
index da3cb4927613..523362918688 100644
--- a/sc/source/core/data/column.cxx
+++ b/sc/source/core/data/column.cxx
@@ -1480,7 +1480,7 @@ void ScColumn::CopyStaticToDocument(SCROW nRow1, SCROW nRow2, ScColumn& rDestCol
for (; itData != itDataEnd; ++itData)
{
const EditTextObject& rObj = **itData;
- aConverted.push_back(ScEditUtil::GetString(rObj));
+ aConverted.push_back(ScEditUtil::GetString(rObj, pDocument));
}
aDestPos.miCellPos = rDestCol.maCells.set(aDestPos.miCellPos, nCurRow, aConverted.begin(), aConverted.end());
}
diff --git a/sc/source/core/data/column2.cxx b/sc/source/core/data/column2.cxx
index 4d6c3fe65278..ab6c88a2e1a5 100644
--- a/sc/source/core/data/column2.cxx
+++ b/sc/source/core/data/column2.cxx
@@ -245,7 +245,7 @@ long ScColumn::GetNeededSize(
Color* pColor;
OUString aValStr;
ScCellFormat::GetString(
- aCell, nFormat, aValStr, &pColor, *pFormatter, true, rOptions.bFormula, ftCheck);
+ aCell, nFormat, aValStr, &pColor, *pFormatter, pDocument, true, rOptions.bFormula, ftCheck);
if (!aValStr.isEmpty())
{
@@ -407,7 +407,7 @@ long ScColumn::GetNeededSize(
Color* pColor;
OUString aString;
ScCellFormat::GetString(
- aCell, nFormat, aString, &pColor, *pFormatter, true,
+ aCell, nFormat, aString, &pColor, *pFormatter, pDocument, true,
rOptions.bFormula, ftCheck);
if (!aString.isEmpty())
@@ -546,7 +546,7 @@ class MaxStrLenFinder
Color* pColor;
OUString aValStr;
ScCellFormat::GetString(
- rCell, mnFormat, aValStr, &pColor, *mrDoc.GetFormatTable(), true, false, ftCheck);
+ rCell, mnFormat, aValStr, &pColor, *mrDoc.GetFormatTable(), &mrDoc, true, false, ftCheck);
if (aValStr.getLength() > mnMaxLen)
{
@@ -628,7 +628,7 @@ sal_uInt16 ScColumn::GetOptimalColWidth(
{
ScRefCellValue aCell = GetCellValue(pParam->mnMaxTextRow);
ScCellFormat::GetString(
- aCell, nFormat, aLongStr, &pColor, *pFormatter, true, false, ftCheck);
+ aCell, nFormat, aLongStr, &pColor, *pFormatter, pDocument, true, false, ftCheck);
}
else
{
@@ -1897,9 +1897,10 @@ class ToMatrixHandler
ScMatrix& mrMat;
SCCOL mnMatCol;
SCROW mnTopRow;
+ const ScDocument* mpDoc;
public:
- ToMatrixHandler(ScMatrix& rMat, SCCOL nMatCol, SCROW nTopRow) :
- mrMat(rMat), mnMatCol(nMatCol), mnTopRow(nTopRow) {}
+ ToMatrixHandler(ScMatrix& rMat, SCCOL nMatCol, SCROW nTopRow, const ScDocument* pDoc) :
+ mrMat(rMat), mnMatCol(nMatCol), mnTopRow(nTopRow), mpDoc(pDoc) {}
void operator() (size_t nRow, double fVal)
{
@@ -1923,7 +1924,7 @@ public:
void operator() (size_t nRow, const EditTextObject* pStr)
{
- mrMat.PutString(ScEditUtil::GetString(*pStr), mnMatCol, nRow - mnTopRow);
+ mrMat.PutString(ScEditUtil::GetString(*pStr, mpDoc), mnMatCol, nRow - mnTopRow);
}
};
@@ -1934,7 +1935,7 @@ bool ScColumn::ResolveStaticReference( ScMatrix& rMat, SCCOL nMatCol, SCROW nRow
if (nRow1 > nRow2)
return false;
- ToMatrixHandler aFunc(rMat, nMatCol, nRow1);
+ ToMatrixHandler aFunc(rMat, nMatCol, nRow1, pDocument);
sc::ParseAllNonEmpty(maCells.begin(), maCells, nRow1, nRow2, aFunc);
return true;
}
@@ -1982,10 +1983,11 @@ class FillMatrixHandler
SCCOL mnCol;
SCTAB mnTab;
+ const ScDocument* mpDoc;
public:
- FillMatrixHandler(ScMatrix& rMat, size_t nMatCol, size_t nTopRow, SCCOL nCol, SCTAB nTab) :
- mrMat(rMat), mnMatCol(nMatCol), mnTopRow(nTopRow), mnCol(nCol), mnTab(nTab) {}
+ FillMatrixHandler(ScMatrix& rMat, size_t nMatCol, size_t nTopRow, SCCOL nCol, SCTAB nTab, const ScDocument* pDoc) :
+ mrMat(rMat), mnMatCol(nMatCol), mnTopRow(nTopRow), mnCol(nCol), mnTab(nTab), mpDoc(pDoc) {}
void operator() (const sc::CellStoreType::value_type& node, size_t nOffset, size_t nDataSize)
{
@@ -2014,7 +2016,7 @@ public:
sc::edittext_block::const_iterator itEnd = it;
std::advance(itEnd, nDataSize);
for (; it != itEnd; ++it)
- aStrs.push_back(ScEditUtil::GetString(**it));
+ aStrs.push_back(ScEditUtil::GetString(**it, mpDoc));
const OUString* p = &aStrs[0];
mrMat.PutString(p, nDataSize, mnMatCol, nMatRow);
@@ -2091,7 +2093,7 @@ public:
void ScColumn::FillMatrix( ScMatrix& rMat, size_t nMatCol, SCROW nRow1, SCROW nRow2 ) const
{
- FillMatrixHandler aFunc(rMat, nMatCol, nRow1, nCol, nTab);
+ FillMatrixHandler aFunc(rMat, nMatCol, nRow1, nCol, nTab, pDocument);
sc::ParseBlock(maCells.begin(), maCells, aFunc, nRow1, nRow2);
}
diff --git a/sc/source/core/data/column3.cxx b/sc/source/core/data/column3.cxx
index 1e0ec16339e4..a787df3a383f 100644
--- a/sc/source/core/data/column3.cxx
+++ b/sc/source/core/data/column3.cxx
@@ -449,7 +449,7 @@ bool ScColumn::UpdateScriptType( sc::CellTextAttr& rAttr, SCROW nRow )
OUString aStr;
Color* pColor;
sal_uLong nFormat = pPattern->GetNumberFormat(pFormatter, pCondSet);
- ScCellFormat::GetString(aCell, nFormat, aStr, &pColor, *pFormatter);
+ ScCellFormat::GetString(aCell, nFormat, aStr, &pColor, *pFormatter, pDocument);
// Store the real script type to the array.
rAttr.mnScriptType = pDocument->GetStringScriptType(aStr);
@@ -1733,7 +1733,7 @@ class FilterEntriesHandler
SvNumberFormatter* pFormatter = mrColumn.GetDoc().GetFormatTable();
OUString aStr;
sal_uLong nFormat = mrColumn.GetNumberFormat(nRow);
- ScCellFormat::GetInputString(rCell, nFormat, aStr, *pFormatter);
+ ScCellFormat::GetInputString(rCell, nFormat, aStr, *pFormatter, &mrColumn.GetDoc());
if (rCell.hasString())
{
@@ -1834,9 +1834,10 @@ class StrCellIterator
PosType maPos;
sc::CellStoreType::const_iterator miBeg;
sc::CellStoreType::const_iterator miEnd;
+ const ScDocument* mpDoc;
public:
- StrCellIterator(const sc::CellStoreType& rCells, SCROW nStart) :
- maPos(rCells.position(nStart)), miBeg(rCells.begin()), miEnd(rCells.end()) {}
+ StrCellIterator(const sc::CellStoreType& rCells, SCROW nStart, const ScDocument* pDoc) :
+ maPos(rCells.position(nStart)), miBeg(rCells.begin()), miEnd(rCells.end()), mpDoc(pDoc) {}
bool valid() const { return (maPos.first != miEnd); }
@@ -1929,7 +1930,7 @@ public:
case sc::element_type_edittext:
{
const EditTextObject* p = sc::edittext_block::at(*maPos.first->data, maPos.second);
- return ScEditUtil::GetString(*p);
+ return ScEditUtil::GetString(*p, mpDoc);
}
default:
;
@@ -1956,8 +1957,8 @@ bool ScColumn::GetDataEntries(
// going upward and downward directions in parallel. The start position
// cell must be skipped.
- StrCellIterator aItrUp(maCells, nStartRow);
- StrCellIterator aItrDown(maCells, nStartRow+1);
+ StrCellIterator aItrUp(maCells, nStartRow, pDocument);
+ StrCellIterator aItrDown(maCells, nStartRow+1, pDocument);
bool bMoveUp = aItrUp.valid();
if (!bMoveUp)
@@ -2179,7 +2180,7 @@ void ScColumn::GetString( SCROW nRow, OUString& rString ) const
sal_uLong nFormat = GetNumberFormat(nRow);
Color* pColor = NULL;
- ScCellFormat::GetString(aCell, nFormat, rString, &pColor, *(pDocument->GetFormatTable()));
+ ScCellFormat::GetString(aCell, nFormat, rString, &pColor, *(pDocument->GetFormatTable()), pDocument);
}
const OUString* ScColumn::GetStringCell( SCROW nRow ) const
@@ -2212,7 +2213,7 @@ void ScColumn::GetInputString( SCROW nRow, OUString& rString ) const
{
ScRefCellValue aCell = GetCellValue(nRow);
sal_uLong nFormat = GetNumberFormat(nRow);
- ScCellFormat::GetInputString(aCell, nFormat, rString, *(pDocument->GetFormatTable()));
+ ScCellFormat::GetInputString(aCell, nFormat, rString, *(pDocument->GetFormatTable()), pDocument);
}
double ScColumn::GetValue( SCROW nRow ) const
@@ -2431,7 +2432,7 @@ class MaxStringLenHandler
Color* pColor;
OUString aString;
sal_uInt32 nFormat = static_cast<const SfxUInt32Item*>(mrColumn.GetAttr(nRow, ATTR_VALUE_FORMAT))->GetValue();
- ScCellFormat::GetString(rCell, nFormat, aString, &pColor, *mpFormatter);
+ ScCellFormat::GetString(rCell, nFormat, aString, &pColor, *mpFormatter, &mrColumn.GetDoc());
sal_Int32 nLen = 0;
if (mbOctetEncoding)
{
@@ -2517,7 +2518,7 @@ class MaxNumStringLenHandler
OUString aString;
sal_uInt32 nFormat = static_cast<const SfxUInt32Item*>(
mrColumn.GetAttr(nRow, ATTR_VALUE_FORMAT))->GetValue();
- ScCellFormat::GetInputString(rCell, nFormat, aString, *mpFormatter);
+ ScCellFormat::GetInputString(rCell, nFormat, aString, *mpFormatter, &mrColumn.GetDoc());
sal_Int32 nLen = aString.getLength();
if (nLen <= 0)
// Ignore empty string.
diff --git a/sc/source/core/data/conditio.cxx b/sc/source/core/data/conditio.cxx
index fe438af0a694..baef65684fdc 100644
--- a/sc/source/core/data/conditio.cxx
+++ b/sc/source/core/data/conditio.cxx
@@ -734,7 +734,8 @@ void ScConditionEntry::Interpret( const ScAddress& rPos )
bFirstRun = false;
}
-static bool lcl_GetCellContent( ScRefCellValue& rCell, bool bIsStr1, double& rArg, OUString& rArgStr )
+static bool lcl_GetCellContent( ScRefCellValue& rCell, bool bIsStr1, double& rArg, OUString& rArgStr,
+ const ScDocument* pDoc )
{
if (rCell.isEmpty())
@@ -762,7 +763,7 @@ static bool lcl_GetCellContent( ScRefCellValue& rCell, bool bIsStr1, double& rAr
if (rCell.meType == CELLTYPE_STRING)
rArgStr = *rCell.mpString;
else if (rCell.mpEditText)
- rArgStr = ScEditUtil::GetString(*rCell.mpEditText);
+ rArgStr = ScEditUtil::GetString(*rCell.mpEditText, pDoc);
break;
default:
;
@@ -806,7 +807,7 @@ void ScConditionEntry::FillCache() const
double nVal = 0.0;
OUString aStr;
- if (!lcl_GetCellContent(aCell, false, nVal, aStr))
+ if (!lcl_GetCellContent(aCell, false, nVal, aStr, mpDoc))
{
std::pair<ScConditionEntryCache::StringCacheType::iterator, bool> aResult =
mpCache->maStrings.insert(
@@ -1270,7 +1271,7 @@ bool ScConditionEntry::IsCellValid( ScRefCellValue& rCell, const ScAddress& rPos
double nArg = 0.0;
OUString aArgStr;
- bool bVal = lcl_GetCellContent( rCell, bIsStr1, nArg, aArgStr );
+ bool bVal = lcl_GetCellContent( rCell, bIsStr1, nArg, aArgStr, mpDoc );
if (bVal)
return IsValid( nArg, rPos );
else
diff --git a/sc/source/core/data/dociter.cxx b/sc/source/core/data/dociter.cxx
index 02cb39bb3bc4..a31b7aa03fad 100644
--- a/sc/source/core/data/dociter.cxx
+++ b/sc/source/core/data/dociter.cxx
@@ -454,7 +454,7 @@ bool ScDBQueryDataIterator::DataAccessInternal::getCurrent(Value& rValue)
incPos();
else
{
- rValue.maString = aCell.getString();
+ rValue.maString = aCell.getString(mpDoc);
rValue.mfValue = 0.0;
rValue.mnError = 0;
rValue.mbIsNumber = false;
@@ -933,7 +933,7 @@ CellType ScCellIterator::getType() const
OUString ScCellIterator::getString()
{
- return maCurCell.getString();
+ return maCurCell.getString(mpDoc);
}
const EditTextObject* ScCellIterator::getEditText() const
@@ -1408,7 +1408,7 @@ bool ScQueryCellIterator::BinarySearch()
OUString aCellStr;
sal_uLong nFormat = pCol->GetNumberFormat(toLogicalPos(aLoPos));
aCell.assign(aLoPos.first, aLoPos.second);
- ScCellFormat::GetInputString(aCell, nFormat, aCellStr, rFormatter);
+ ScCellFormat::GetInputString(aCell, nFormat, aCellStr, rFormatter, pDoc);
sal_Int32 nTmp = pCollator->compareString(aCellStr, rEntry.GetQueryItem().maString);
if ((rEntry.eOp == SC_LESS_EQUAL && nTmp > 0) ||
(rEntry.eOp == SC_GREATER_EQUAL && nTmp < 0) ||
@@ -1455,7 +1455,7 @@ bool ScQueryCellIterator::BinarySearch()
{
sal_uLong nFormat = pCol->GetNumberFormat(toLogicalPos(aLastInRange));
OUString aStr;
- ScCellFormat::GetInputString(aCell, nFormat, aStr, rFormatter);
+ ScCellFormat::GetInputString(aCell, nFormat, aStr, rFormatter, pDoc);
aLastInRangeString = aStr;
}
else
@@ -1558,7 +1558,7 @@ bool ScQueryCellIterator::BinarySearch()
OUString aCellStr;
sal_uLong nFormat = pCol->GetNumberFormat(i);
aCell.assign(aPos.first, aPos.second);
- ScCellFormat::GetInputString(aCell, nFormat, aCellStr, rFormatter);
+ ScCellFormat::GetInputString(aCell, nFormat, aCellStr, rFormatter, pDoc);
nRes = pCollator->compareString(aCellStr, rEntry.GetQueryItem().maString);
if (nRes < 0 && bLessEqual)
diff --git a/sc/source/core/data/document.cxx b/sc/source/core/data/document.cxx
index f32fcd5c1c36..ef73c7cf4b40 100644
--- a/sc/source/core/data/document.cxx
+++ b/sc/source/core/data/document.cxx
@@ -3241,7 +3241,7 @@ sal_uInt16 ScDocument::GetStringForFormula( const ScAddress& rPos, OUString& rSt
{
case CELLTYPE_STRING:
case CELLTYPE_EDIT:
- aStr = aCell.getString();
+ aStr = aCell.getString(this);
break;
case CELLTYPE_FORMULA:
{
diff --git a/sc/source/core/data/global.cxx b/sc/source/core/data/global.cxx
index 1ca26a7e55ab..bc3136591dd0 100644
--- a/sc/source/core/data/global.cxx
+++ b/sc/source/core/data/global.cxx
@@ -77,6 +77,7 @@
#include "scmod.hxx"
#include "appoptio.hxx"
#include "random.hxx"
+#include "editutil.hxx"
// -----------------------------------------------------------------------
@@ -117,6 +118,7 @@ ScFunctionMgr* ScGlobal::pStarCalcFunctionMgr = NULL;
ScUnitConverter* ScGlobal::pUnitConverter = NULL;
SvNumberFormatter* ScGlobal::pEnglishFormatter = NULL;
+ScFieldEditEngine* ScGlobal::pFieldEditEngine = NULL;
double ScGlobal::nScreenPPTX = 96.0;
double ScGlobal::nScreenPPTY = 96.0;
@@ -684,6 +686,7 @@ void ScGlobal::Clear()
DELETEZ(pStrClipDocName);
DELETEZ(pUnitConverter);
+ DELETEZ(pFieldEditEngine);
ScDocumentPool::DeleteVersionMaps();
@@ -1195,4 +1198,17 @@ IntlWrapper* ScGlobal::GetScIntlWrapper()
return pLocale;
}
+ScFieldEditEngine& ScGlobal::GetStaticFieldEditEngine()
+{
+ if (!pFieldEditEngine)
+ {
+ // Creating a ScFieldEditEngine with pDocument=NULL leads to document
+ // specific fields not being resolvable! See
+ // ScFieldEditEngine::CalcFieldValue(). pEnginePool=NULL lets
+ // EditEngine internally create and delete a default pool.
+ pFieldEditEngine = new ScFieldEditEngine( NULL, NULL);
+ }
+ return *pFieldEditEngine;
+}
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/data/table3.cxx b/sc/source/core/data/table3.cxx
index 99718164027f..0e30d0a8a678 100644
--- a/sc/source/core/data/table3.cxx
+++ b/sc/source/core/data/table3.cxx
@@ -1418,7 +1418,7 @@ public:
else
{
sal_uLong nFormat = mrTab.GetNumberFormat( static_cast<SCCOL>(rEntry.nField), nRow );
- ScCellFormat::GetInputString(rCell, nFormat, aCellStr, *mrDoc.GetFormatTable());
+ ScCellFormat::GetInputString(rCell, nFormat, aCellStr, *mrDoc.GetFormatTable(), &mrDoc);
}
}
else
diff --git a/sc/source/core/data/table4.cxx b/sc/source/core/data/table4.cxx
index 5df625709dbd..3797a907e8b3 100644
--- a/sc/source/core/data/table4.cxx
+++ b/sc/source/core/data/table4.cxx
@@ -400,7 +400,7 @@ void ScTable::FillAnalyse( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
CellType eType = aCell.meType;
if ( eType == CELLTYPE_STRING || eType == CELLTYPE_EDIT )
{
- aStr = aCell.getString();
+ aStr = aCell.getString(pDocument);
aString = aStr;
nFlag2 = lcl_DecompValueString( aString, nVal2, &rMinDigits );
aStr = aString;
@@ -796,7 +796,7 @@ void ScTable::FillAuto( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
if ( eCellType == CELLTYPE_STRING )
aValue = *aSrcCell.mpString;
else
- aValue = ScEditUtil::GetString(*aSrcCell.mpEditText);
+ aValue = ScEditUtil::GetString(*aSrcCell.mpEditText, pDocument);
if ( !(nScFillModeMouseModifier & KEY_MOD1) && !bHasFiltered )
{
nCellDigits = 0; // look at each source cell individually
@@ -1040,7 +1040,7 @@ String ScTable::GetAutoFillPreview( const ScRange& rSource, SCCOL nEndX, SCROW n
case CELLTYPE_STRING:
case CELLTYPE_EDIT:
{
- aValue = aCell.getString();
+ aValue = aCell.getString(pDocument);
if ( !(nScFillModeMouseModifier & KEY_MOD1) )
{
@@ -1096,7 +1096,7 @@ String ScTable::GetAutoFillPreview( const ScRange& rSource, SCCOL nEndX, SCROW n
case CELLTYPE_STRING:
case CELLTYPE_EDIT:
{
- aValue = aCell.getString();
+ aValue = aCell.getString(pDocument);
nHeadNoneTail = lcl_DecompValueString( aValue, nVal );
if ( nHeadNoneTail )
nStart = (double)nVal;
@@ -1587,7 +1587,7 @@ void ScTable::FillSeries( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
if (eCellType == CELLTYPE_STRING)
aValue = *aSrcCell.mpString;
else
- aValue = ScEditUtil::GetString(*aSrcCell.mpEditText);
+ aValue = ScEditUtil::GetString(*aSrcCell.mpEditText, pDocument);
sal_Int32 nStringValue;
sal_uInt16 nMinDigits = nArgMinDigits;
short nHeadNoneTail = lcl_DecompValueString( aValue, nStringValue, &nMinDigits );
diff --git a/sc/source/core/data/validat.cxx b/sc/source/core/data/validat.cxx
index ea65bb596b32..eaee6510f185 100644
--- a/sc/source/core/data/validat.cxx
+++ b/sc/source/core/data/validat.cxx
@@ -494,7 +494,7 @@ bool ScValidationData::IsDataValid( ScRefCellValue& rCell, const ScAddress& rPos
break;
case CELLTYPE_EDIT:
if (rCell.mpEditText)
- aString = ScEditUtil::GetString(*rCell.mpEditText);
+ aString = ScEditUtil::GetString(*rCell.mpEditText, GetDocument());
bIsVal = false;
break;
case CELLTYPE_FORMULA: