diff options
8 files changed, 24 insertions, 13 deletions
diff --git a/sc/source/ui/StatisticsDialogs/AnalysisOfVarianceDialog.cxx b/sc/source/ui/StatisticsDialogs/AnalysisOfVarianceDialog.cxx index cc35630391eb..0dc997113eb7 100644 --- a/sc/source/ui/StatisticsDialogs/AnalysisOfVarianceDialog.cxx +++ b/sc/source/ui/StatisticsDialogs/AnalysisOfVarianceDialog.cxx @@ -104,7 +104,8 @@ sal_Int16 ScAnalysisOfVarianceDialog::GetUndoNameId() ScRange ScAnalysisOfVarianceDialog::ApplyOutput(ScDocShell* pDocShell) { - AddressWalkerWriter output(mOutputAddress, pDocShell, mDocument); + AddressWalkerWriter output(mOutputAddress, pDocShell, mDocument, + formula::FormulaGrammar::mergeToGrammar( formula::FormulaGrammar::GRAM_ENGLISH, mAddressDetails.eConv)); FormulaTemplate aTemplate(mDocument, mAddressDetails); output.writeBoldString(SC_STRLOAD(RID_STATISTICS_DLGS, STR_ANOVA_SINGLE_FACTOR_LABEL)); diff --git a/sc/source/ui/StatisticsDialogs/DescriptiveStatisticsDialog.cxx b/sc/source/ui/StatisticsDialogs/DescriptiveStatisticsDialog.cxx index d4601ff5a4d7..168777346c72 100644 --- a/sc/source/ui/StatisticsDialogs/DescriptiveStatisticsDialog.cxx +++ b/sc/source/ui/StatisticsDialogs/DescriptiveStatisticsDialog.cxx @@ -83,7 +83,8 @@ sal_Int16 ScDescriptiveStatisticsDialog::GetUndoNameId() ScRange ScDescriptiveStatisticsDialog::ApplyOutput(ScDocShell* pDocShell) { - AddressWalkerWriter aOutput(mOutputAddress, pDocShell, mDocument); + AddressWalkerWriter aOutput(mOutputAddress, pDocShell, mDocument, + formula::FormulaGrammar::mergeToGrammar( formula::FormulaGrammar::GRAM_ENGLISH, mAddressDetails.eConv)); FormulaTemplate aTemplate(mDocument, mAddressDetails); boost::scoped_ptr<DataRangeIterator> pIterator; diff --git a/sc/source/ui/StatisticsDialogs/ExponentialSmoothingDialog.cxx b/sc/source/ui/StatisticsDialogs/ExponentialSmoothingDialog.cxx index be6de68dcd21..6b20afd2ccc5 100644 --- a/sc/source/ui/StatisticsDialogs/ExponentialSmoothingDialog.cxx +++ b/sc/source/ui/StatisticsDialogs/ExponentialSmoothingDialog.cxx @@ -52,7 +52,8 @@ sal_Int16 ScExponentialSmoothingDialog::GetUndoNameId() ScRange ScExponentialSmoothingDialog::ApplyOutput(ScDocShell* pDocShell) { - AddressWalkerWriter output(mOutputAddress, pDocShell, mDocument); + AddressWalkerWriter output(mOutputAddress, pDocShell, mDocument, + formula::FormulaGrammar::mergeToGrammar( formula::FormulaGrammar::GRAM_ENGLISH, mAddressDetails.eConv)); FormulaTemplate aTemplate(mDocument, mAddressDetails); // Smoothing factor diff --git a/sc/source/ui/StatisticsDialogs/MatrixComparisonGenerator.cxx b/sc/source/ui/StatisticsDialogs/MatrixComparisonGenerator.cxx index e797b0c92fe2..a5e5001e645b 100644 --- a/sc/source/ui/StatisticsDialogs/MatrixComparisonGenerator.cxx +++ b/sc/source/ui/StatisticsDialogs/MatrixComparisonGenerator.cxx @@ -74,7 +74,8 @@ sal_Int16 ScMatrixComparisonGenerator::GetUndoNameId() ScRange ScMatrixComparisonGenerator::ApplyOutput(ScDocShell* pDocShell) { - AddressWalkerWriter output(mOutputAddress, pDocShell, mDocument); + AddressWalkerWriter output(mOutputAddress, pDocShell, mDocument, + formula::FormulaGrammar::mergeToGrammar( formula::FormulaGrammar::GRAM_ENGLISH, mAddressDetails.eConv)); FormulaTemplate aTemplate(mDocument, mAddressDetails); SCTAB inTab = mInputRange.aStart.Tab(); diff --git a/sc/source/ui/StatisticsDialogs/MovingAverageDialog.cxx b/sc/source/ui/StatisticsDialogs/MovingAverageDialog.cxx index 9097b969707d..85466deb5d84 100644 --- a/sc/source/ui/StatisticsDialogs/MovingAverageDialog.cxx +++ b/sc/source/ui/StatisticsDialogs/MovingAverageDialog.cxx @@ -52,7 +52,8 @@ sal_Int16 ScMovingAverageDialog::GetUndoNameId() ScRange ScMovingAverageDialog::ApplyOutput(ScDocShell* pDocShell) { - AddressWalkerWriter output(mOutputAddress, pDocShell, mDocument); + AddressWalkerWriter output(mOutputAddress, pDocShell, mDocument, + formula::FormulaGrammar::mergeToGrammar( formula::FormulaGrammar::GRAM_ENGLISH, mAddressDetails.eConv)); FormulaTemplate aTemplate(mDocument, mAddressDetails); boost::scoped_ptr<DataRangeIterator> pIterator; diff --git a/sc/source/ui/StatisticsDialogs/TTestDialog.cxx b/sc/source/ui/StatisticsDialogs/TTestDialog.cxx index 4c576e9457ac..59c249ca03c9 100644 --- a/sc/source/ui/StatisticsDialogs/TTestDialog.cxx +++ b/sc/source/ui/StatisticsDialogs/TTestDialog.cxx @@ -60,7 +60,8 @@ sal_Int16 ScTTestDialog::GetUndoNameId() ScRange ScTTestDialog::ApplyOutput(ScDocShell* pDocShell) { - AddressWalkerWriter aOutput(mOutputAddress, pDocShell, mDocument); + AddressWalkerWriter aOutput(mOutputAddress, pDocShell, mDocument, + formula::FormulaGrammar::mergeToGrammar( formula::FormulaGrammar::GRAM_ENGLISH, mAddressDetails.eConv)); FormulaTemplate aTemplate(mDocument, mAddressDetails); boost::scoped_ptr<DataRangeIterator> pVariable1Iterator; diff --git a/sc/source/ui/StatisticsDialogs/TableFillingAndNavigationTools.cxx b/sc/source/ui/StatisticsDialogs/TableFillingAndNavigationTools.cxx index f708b3ba93c9..53e01bfc8dbb 100644 --- a/sc/source/ui/StatisticsDialogs/TableFillingAndNavigationTools.cxx +++ b/sc/source/ui/StatisticsDialogs/TableFillingAndNavigationTools.cxx @@ -152,15 +152,18 @@ void AddressWalker::pop() mAddressStack.pop_back(); } -AddressWalkerWriter::AddressWalkerWriter(ScAddress aInitialAddress, ScDocShell* pDocShell, ScDocument* pDocument) : +AddressWalkerWriter::AddressWalkerWriter(ScAddress aInitialAddress, ScDocShell* pDocShell, ScDocument* pDocument, + formula::FormulaGrammar::Grammar eGrammar ) : AddressWalker(aInitialAddress, true), mpDocShell(pDocShell), - mpDocument(pDocument) + mpDocument(pDocument), + meGrammar(eGrammar) {} void AddressWalkerWriter::writeFormula(OUString aFormula) { - mpDocShell->GetDocFunc().SetFormulaCell(mCurrentAddress, new ScFormulaCell(mpDocument, mCurrentAddress, aFormula), true); + mpDocShell->GetDocFunc().SetFormulaCell(mCurrentAddress, + new ScFormulaCell(mpDocument, mCurrentAddress, aFormula, meGrammar), true); } void AddressWalkerWriter::writeMatrixFormula(OUString aFormula) @@ -168,7 +171,7 @@ void AddressWalkerWriter::writeMatrixFormula(OUString aFormula) ScRange aRange; aRange.aStart = mCurrentAddress; aRange.aEnd = mCurrentAddress; - mpDocShell->GetDocFunc().EnterMatrix(aRange, NULL, NULL, aFormula, false, false, OUString(), formula::FormulaGrammar::GRAM_DEFAULT ); + mpDocShell->GetDocFunc().EnterMatrix(aRange, NULL, NULL, aFormula, false, false, OUString(), meGrammar ); } void AddressWalkerWriter::writeString(OUString aString) diff --git a/sc/source/ui/inc/TableFillingAndNavigationTools.hxx b/sc/source/ui/inc/TableFillingAndNavigationTools.hxx index f616e5bbb174..88f7c3f58a07 100644 --- a/sc/source/ui/inc/TableFillingAndNavigationTools.hxx +++ b/sc/source/ui/inc/TableFillingAndNavigationTools.hxx @@ -76,10 +76,12 @@ public: class AddressWalkerWriter : public AddressWalker { public: - ScDocShell* mpDocShell; - ScDocument* mpDocument; + ScDocShell* mpDocShell; + ScDocument* mpDocument; + formula::FormulaGrammar::Grammar meGrammar; - AddressWalkerWriter(ScAddress aInitialAddress, ScDocShell* pDocShell, ScDocument* pDocument); + AddressWalkerWriter(ScAddress aInitialAddress, ScDocShell* pDocShell, ScDocument* pDocument, + formula::FormulaGrammar::Grammar eGrammar ); void writeFormula(OUString aFormula); void writeMatrixFormula(OUString aFormula); |