sc/inc/column.hxx | 6 +++--- sc/source/core/data/table6.cxx | 9 ++++----- 2 files changed, 7 insertions(+), 8 deletions(-)
New commits: commit 9ffe57dc020dc2658e2f326dc399fe0da0641050 Author: Kohei Yoshida <kohei.yosh...@suse.com> Date: Tue Dec 13 10:51:41 2011 -0500 fdo#39917: Use correct address convention during search and replace. diff --git a/sc/inc/column.hxx b/sc/inc/column.hxx index c6346f6..f86bf9b 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 9bc4a58..55ac066 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()); } } } _______________________________________________ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits