[Libreoffice-commits] core.git: Branch 'libreoffice-4-2-0' - sc/source

Eike Rathke erack at redhat.com
Tue Jan 21 02:55:20 PST 2014


 sc/source/ui/StatisticsDialogs/AnalysisOfVarianceDialog.cxx       |    3 ++-
 sc/source/ui/StatisticsDialogs/DescriptiveStatisticsDialog.cxx    |    3 ++-
 sc/source/ui/StatisticsDialogs/ExponentialSmoothingDialog.cxx     |    3 ++-
 sc/source/ui/StatisticsDialogs/MatrixComparisonGenerator.cxx      |    3 ++-
 sc/source/ui/StatisticsDialogs/MovingAverageDialog.cxx            |    3 ++-
 sc/source/ui/StatisticsDialogs/TableFillingAndNavigationTools.cxx |    9 ++++++---
 sc/source/ui/inc/TableFillingAndNavigationTools.hxx               |    8 +++++---
 7 files changed, 21 insertions(+), 11 deletions(-)

New commits:
commit 7b6dc462bbacd858df6a2defebd1fd1caa4d1b64
Author: Eike Rathke <erack at redhat.com>
Date:   Mon Jan 13 18:02:21 2014 +0100

    resolved fdo#73555 compile statistics templates using English grammar
    
    The statistics templates' formula expressions are setup using English
    function names, so compile the resulting expressions using an English
    grammar merged with the current address conventions.
    
    (cherry picked from commit 9570a27d3e2f56e9046a8bfacaafe9e3c9744ac5)
    
    Conflicts:
    	sc/source/ui/StatisticsDialogs/TTestDialog.cxx
    	sc/source/ui/StatisticsDialogs/TableFillingAndNavigationTools.cxx
    
    Change-Id: I7c782a42d007daeaaf99463beb8aa580c05c7363
    Reviewed-on: https://gerrit.libreoffice.org/7413
    Reviewed-by: Kohei Yoshida <libreoffice at kohei.us>
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/sc/source/ui/StatisticsDialogs/AnalysisOfVarianceDialog.cxx b/sc/source/ui/StatisticsDialogs/AnalysisOfVarianceDialog.cxx
index cc35630..0dc9971 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 d4601ff..1687773 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 be6de68..6b20afd 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 e797b0c..a5e5001 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 9097b96..85466de 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/TableFillingAndNavigationTools.cxx b/sc/source/ui/StatisticsDialogs/TableFillingAndNavigationTools.cxx
index efd4581..c6935fe 100644
--- a/sc/source/ui/StatisticsDialogs/TableFillingAndNavigationTools.cxx
+++ b/sc/source/ui/StatisticsDialogs/TableFillingAndNavigationTools.cxx
@@ -132,15 +132,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::writeString(OUString aString)
diff --git a/sc/source/ui/inc/TableFillingAndNavigationTools.hxx b/sc/source/ui/inc/TableFillingAndNavigationTools.hxx
index 9a62b7e..ea9a309 100644
--- a/sc/source/ui/inc/TableFillingAndNavigationTools.hxx
+++ b/sc/source/ui/inc/TableFillingAndNavigationTools.hxx
@@ -65,10 +65,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 writeString(OUString aString);


More information about the Libreoffice-commits mailing list