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: ...@@ -246,9 +246,9 @@ public:
bool HasEditCells(SCROW nStartRow, SCROW nEndRow, SCROW& rFirst) const; bool HasEditCells(SCROW nStartRow, SCROW nEndRow, SCROW& rFirst) const;
// TRUE = format for numbers is set // TRUE = format for numbers is set
bool SetString( SCROW nRow, SCTAB nTab, const String& rString, bool SetString(
formula::FormulaGrammar::AddressConvention conv = formula::FormulaGrammar::CONV_OOO, SCROW nRow, SCTAB nTab, const String& rString, formula::FormulaGrammar::AddressConvention eConv,
ScSetStringParam* pParam = NULL ); ScSetStringParam* pParam = NULL );
void SetValue( SCROW nRow, const double& rVal); void SetValue( SCROW nRow, const double& rVal);
void SetError( SCROW nRow, const sal_uInt16 nError); void SetError( SCROW nRow, const sal_uInt16 nError);
......
...@@ -82,8 +82,7 @@ bool ScTable::SearchCell(const SvxSearchItem& rSearchItem, SCCOL nCol, SCROW nRo ...@@ -82,8 +82,7 @@ bool ScTable::SearchCell(const SvxSearchItem& rSearchItem, SCCOL nCol, SCROW nRo
case SVX_SEARCHIN_FORMULA: case SVX_SEARCHIN_FORMULA:
{ {
if ( eCellType == CELLTYPE_FORMULA ) if ( eCellType == CELLTYPE_FORMULA )
((ScFormulaCell*)pCell)->GetFormula( aString, static_cast<ScFormulaCell*>(pCell)->GetFormula(aString, pDocument->GetGrammar());
formula::FormulaGrammar::GRAM_NATIVE_UI);
else if ( eCellType == CELLTYPE_EDIT ) else if ( eCellType == CELLTYPE_EDIT )
bMultiLine = lcl_GetTextWithBreaks( bMultiLine = lcl_GetTextWithBreaks(
*(const ScEditCell*)pCell, pDocument, aString ); *(const ScEditCell*)pCell, pDocument, aString );
...@@ -239,7 +238,7 @@ bool ScTable::SearchCell(const SvxSearchItem& rSearchItem, SCCOL nCol, SCROW nRo ...@@ -239,7 +238,7 @@ bool ScTable::SearchCell(const SvxSearchItem& rSearchItem, SCCOL nCol, SCROW nRo
} }
ScAddress aAdr( nCol, nRow, nTab ); ScAddress aAdr( nCol, nRow, nTab );
ScFormulaCell* pFCell = new ScFormulaCell( pDocument, aAdr, ScFormulaCell* pFCell = new ScFormulaCell( pDocument, aAdr,
aString,formula::FormulaGrammar::GRAM_NATIVE_UI, cMatrixFlag ); aString, pDocument->GetGrammar(), cMatrixFlag );
SCCOL nMatCols; SCCOL nMatCols;
SCROW nMatRows; SCROW nMatRows;
((ScFormulaCell*)pCell)->GetMatColsRows( nMatCols, nMatRows ); ((ScFormulaCell*)pCell)->GetMatColsRows( nMatCols, nMatRows );
...@@ -249,7 +248,7 @@ bool ScTable::SearchCell(const SvxSearchItem& rSearchItem, SCCOL nCol, SCROW nRo ...@@ -249,7 +248,7 @@ bool ScTable::SearchCell(const SvxSearchItem& rSearchItem, SCCOL nCol, SCROW nRo
else if ( bMultiLine && aString.Search('\n') != STRING_NOTFOUND ) else if ( bMultiLine && aString.Search('\n') != STRING_NOTFOUND )
PutCell( nCol, nRow, new ScEditCell( aString, pDocument ) ); PutCell( nCol, nRow, new ScEditCell( aString, pDocument ) );
else else
aCol[nCol].SetString(nRow, nTab, aString); aCol[nCol].SetString(nRow, nTab, aString, pDocument->GetAddressConvention());
// pCell is invalid now (deleted) // pCell is invalid now (deleted)
} }
} }
...@@ -1043,7 +1042,7 @@ bool ScTable::SearchRangeForAllEmptyCells( ...@@ -1043,7 +1042,7 @@ bool ScTable::SearchRangeForAllEmptyCells(
ScAddress aCellPos(nCol, nRow, nTab); ScAddress aCellPos(nCol, nRow, nTab);
pUndoDoc->PutCell(nCol, nRow, nTab, pCell->CloneWithNote(aCellPos, *pUndoDoc, aCellPos)); 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