Kaydet (Commit) 9ffe57dc authored tarafından Kohei Yoshida's avatar Kohei Yoshida

fdo#39917: Use correct address convention during search and replace.

üst edf90c21
......@@ -246,9 +246,9 @@ public:
bool HasEditCells(SCROW nStartRow, SCROW nEndRow, SCROW& rFirst) const;
// TRUE = format for numbers is set
bool SetString( SCROW nRow, SCTAB nTab, const String& rString,
formula::FormulaGrammar::AddressConvention conv = formula::FormulaGrammar::CONV_OOO,
ScSetStringParam* pParam = NULL );
bool SetString(
SCROW nRow, SCTAB nTab, const String& rString, formula::FormulaGrammar::AddressConvention eConv,
ScSetStringParam* pParam = NULL );
void SetValue( SCROW nRow, const double& rVal);
void SetError( SCROW nRow, const sal_uInt16 nError);
......
......@@ -82,8 +82,7 @@ bool ScTable::SearchCell(const SvxSearchItem& rSearchItem, SCCOL nCol, SCROW nRo
case SVX_SEARCHIN_FORMULA:
{
if ( eCellType == CELLTYPE_FORMULA )
((ScFormulaCell*)pCell)->GetFormula( aString,
formula::FormulaGrammar::GRAM_NATIVE_UI);
static_cast<ScFormulaCell*>(pCell)->GetFormula(aString, pDocument->GetGrammar());
else if ( eCellType == CELLTYPE_EDIT )
bMultiLine = lcl_GetTextWithBreaks(
*(const ScEditCell*)pCell, pDocument, aString );
......@@ -239,7 +238,7 @@ bool ScTable::SearchCell(const SvxSearchItem& rSearchItem, SCCOL nCol, SCROW nRo
}
ScAddress aAdr( nCol, nRow, nTab );
ScFormulaCell* pFCell = new ScFormulaCell( pDocument, aAdr,
aString,formula::FormulaGrammar::GRAM_NATIVE_UI, cMatrixFlag );
aString, pDocument->GetGrammar(), cMatrixFlag );
SCCOL nMatCols;
SCROW nMatRows;
((ScFormulaCell*)pCell)->GetMatColsRows( nMatCols, nMatRows );
......@@ -249,7 +248,7 @@ bool ScTable::SearchCell(const SvxSearchItem& rSearchItem, SCCOL nCol, SCROW nRo
else if ( bMultiLine && aString.Search('\n') != STRING_NOTFOUND )
PutCell( nCol, nRow, new ScEditCell( aString, pDocument ) );
else
aCol[nCol].SetString(nRow, nTab, aString);
aCol[nCol].SetString(nRow, nTab, aString, pDocument->GetAddressConvention());
// pCell is invalid now (deleted)
}
}
......@@ -1043,7 +1042,7 @@ bool ScTable::SearchRangeForAllEmptyCells(
ScAddress aCellPos(nCol, nRow, nTab);
pUndoDoc->PutCell(nCol, nRow, nTab, pCell->CloneWithNote(aCellPos, *pUndoDoc, aCellPos));
}
aCol[nCol].SetString(nRow, nTab, rSearchItem.GetReplaceString());
aCol[nCol].SetString(nRow, nTab, rSearchItem.GetReplaceString(), pDocument->GetAddressConvention());
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment