summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@suse.com>2011-12-13 10:51:41 -0500
committerKohei Yoshida <kohei.yoshida@suse.com>2011-12-13 10:52:36 -0500
commit9ffe57dc020dc2658e2f326dc399fe0da0641050 (patch)
treee5204d3ef6c52bc62535fbe6afd654c14b613f97
parentedf90c212d8bfe6360a1e35eb4d7fbbf82ed33b4 (diff)
fdo#39917: Use correct address convention during search and replace.
-rw-r--r--sc/inc/column.hxx6
-rw-r--r--sc/source/core/data/table6.cxx9
2 files changed, 7 insertions, 8 deletions
diff --git a/sc/inc/column.hxx b/sc/inc/column.hxx
index c6346f6ad050..f86bf9baadaf 100644
--- a/sc/inc/column.hxx
+++ b/sc/inc/column.hxx
@@ -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);
diff --git a/sc/source/core/data/table6.cxx b/sc/source/core/data/table6.cxx
index 9bc4a58bc149..55ac0660c420 100644
--- a/sc/source/core/data/table6.cxx
+++ b/sc/source/core/data/table6.cxx
@@ -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());
}
}
}