diff options
author | Kurt Zenker <kz@openoffice.org> | 2008-03-06 14:58:10 +0000 |
---|---|---|
committer | Kurt Zenker <kz@openoffice.org> | 2008-03-06 14:58:10 +0000 |
commit | 5e022341d82e285a631df1b6ec5aa6c2e6a65255 (patch) | |
tree | c66d44990527d0292777f4de6eef0ac7d8a6ca0a /sc | |
parent | 24273698f2471d24969a72a2f893a84a7bff6109 (diff) |
INTEGRATION: CWS odff (1.26.118); FILE MERGED
2008/02/27 18:34:12 er 1.26.118.3: RESYNC: (1.26-1.27); FILE MERGED
2008/02/15 14:23:05 er 1.26.118.2: #i81063# grammar here, grammar there, grammar everywhere
2007/09/06 10:43:09 er 1.26.118.1: #i81063# new ScGrammar; get rid of SetCompileEnglish, SetCompileXML, GetEnglishFormula, ...
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/filter/xml/XMLChangeTrackingImportHelper.cxx | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/sc/source/filter/xml/XMLChangeTrackingImportHelper.cxx b/sc/source/filter/xml/XMLChangeTrackingImportHelper.cxx index 0b03acb4cfac..009b161158dd 100644 --- a/sc/source/filter/xml/XMLChangeTrackingImportHelper.cxx +++ b/sc/source/filter/xml/XMLChangeTrackingImportHelper.cxx @@ -4,9 +4,9 @@ * * $RCSfile: XMLChangeTrackingImportHelper.cxx,v $ * - * $Revision: 1.27 $ + * $Revision: 1.28 $ * - * last change: $Author: rt $ $Date: 2008-01-29 15:33:30 $ + * last change: $Author: kz $ $Date: 2008-03-06 15:58:10 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -79,12 +79,14 @@ ScMyCellInfo::ScMyCellInfo() fValue(0.0), nMatrixCols(0), nMatrixRows(0), + eGrammar( ScGrammar::GRAM_STORAGE_DEFAULT), nType(NUMBERFORMAT_ALL), nMatrixFlag(MM_NONE) { } -ScMyCellInfo::ScMyCellInfo(ScBaseCell* pTempCell, const rtl::OUString& rFormulaAddress, const rtl::OUString& rFormula, const rtl::OUString& rInputString, +ScMyCellInfo::ScMyCellInfo(ScBaseCell* pTempCell, const rtl::OUString& rFormulaAddress, const rtl::OUString& rFormula, + const ScGrammar::Grammar eTempGrammar, const rtl::OUString& rInputString, const double& rValue, const sal_uInt16 nTempType, const sal_uInt8 nTempMatrixFlag, const sal_Int32 nTempMatrixCols, const sal_Int32 nTempMatrixRows) : pCell(pTempCell), @@ -94,6 +96,7 @@ ScMyCellInfo::ScMyCellInfo(ScBaseCell* pTempCell, const rtl::OUString& rFormulaA fValue(rValue), nMatrixCols(nTempMatrixCols), nMatrixRows(nTempMatrixRows), + eGrammar( eTempGrammar), nType(nTempType), nMatrixFlag(nTempMatrixFlag) { @@ -114,7 +117,7 @@ ScBaseCell* ScMyCellInfo::CreateCell(ScDocument* pDoc) ScAddress aPos; sal_Int32 nOffset(0); ScRangeStringConverter::GetAddressFromString(aPos, sFormulaAddress, pDoc, nOffset); - pCell = new ScFormulaCell(pDoc, aPos, sFormula, ScAddress::CONV_OOO, nMatrixFlag); + pCell = new ScFormulaCell(pDoc, aPos, sFormula, eGrammar, nMatrixFlag); static_cast<ScFormulaCell*>(pCell)->SetMatColsRows(static_cast<SCCOL>(nMatrixCols), static_cast<SCROW>(nMatrixRows)); } @@ -810,11 +813,15 @@ void ScXMLChangeTrackingImportHelper::SetNewCell(ScMyContentAction* pAction) { sal_uInt8 nMatrixFlag = static_cast<ScFormulaCell*>(pCell)->GetMatrixFlag(); String sFormula; - static_cast<ScFormulaCell*>(pCell)->GetFormula(sFormula, ScAddress::CONV_OOO); + // With GRAM_ODFF reference detection is faster on compilation. + /* FIXME: new cell should be created with a clone + * of the token array instead. Any reason why this + * wasn't done? */ + static_cast<ScFormulaCell*>(pCell)->GetFormula(sFormula, ScGrammar::GRAM_ODFF); rtl::OUString sOUFormula(sFormula); rtl::OUString sOUFormula2(sOUFormula.copy(2, sOUFormula.getLength() - 3)); String sFormula2(sOUFormula2); - pNewCell = new ScFormulaCell(pDoc, aAddress, sFormula2, ScAddress::CONV_OOO, nMatrixFlag); + pNewCell = new ScFormulaCell(pDoc, aAddress, sFormula2, ScGrammar::GRAM_ODFF, nMatrixFlag); if (pNewCell) { if (nMatrixFlag == MM_FORMULA) |