[Libreoffice-commits] core.git: 2 commits - sc/source

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Thu Apr 11 07:57:55 UTC 2019


 sc/source/ui/StatisticsDialogs/CorrelationDialog.cxx         |    2 
 sc/source/ui/StatisticsDialogs/CovarianceDialog.cxx          |    2 
 sc/source/ui/StatisticsDialogs/MatrixComparisonGenerator.cxx |   76 -----------
 sc/source/ui/inc/CorrelationDialog.hxx                       |    2 
 sc/source/ui/inc/CovarianceDialog.hxx                        |    2 
 sc/source/ui/inc/MatrixComparisonGenerator.hxx               |   22 ---
 6 files changed, 9 insertions(+), 97 deletions(-)

New commits:
commit 725a5bc4729a8122f1c36ae49ad8d34b83983526
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Wed Apr 10 12:34:42 2019 +0100
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Thu Apr 11 09:57:47 2019 +0200

    rename ScMatrixComparisonGeneratorController back...
    
    to... ScMatrixComparisonGenerator
    
    Change-Id: Ib81e922455cebe7c57422aab10bc1b1d6cb325ef
    Reviewed-on: https://gerrit.libreoffice.org/70545
    Tested-by: Jenkins
    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/CorrelationDialog.cxx b/sc/source/ui/StatisticsDialogs/CorrelationDialog.cxx
index d1463f608b3d..6ac135d33b43 100644
--- a/sc/source/ui/StatisticsDialogs/CorrelationDialog.cxx
+++ b/sc/source/ui/StatisticsDialogs/CorrelationDialog.cxx
@@ -16,7 +16,7 @@
 ScCorrelationDialog::ScCorrelationDialog(
                         SfxBindings* pSfxBindings, SfxChildWindow* pChildWindow,
                         weld::Window* pParent, ScViewData* pViewData ) :
-    ScMatrixComparisonGeneratorController(
+    ScMatrixComparisonGenerator(
             pSfxBindings, pChildWindow, pParent, pViewData,
             "modules/scalc/ui/correlationdialog.ui", "CorrelationDialog")
 {}
diff --git a/sc/source/ui/StatisticsDialogs/CovarianceDialog.cxx b/sc/source/ui/StatisticsDialogs/CovarianceDialog.cxx
index 522297cc731d..f447b89d0c93 100644
--- a/sc/source/ui/StatisticsDialogs/CovarianceDialog.cxx
+++ b/sc/source/ui/StatisticsDialogs/CovarianceDialog.cxx
@@ -16,7 +16,7 @@
 ScCovarianceDialog::ScCovarianceDialog(
                         SfxBindings* pSfxBindings, SfxChildWindow* pChildWindow,
                         weld::Window* pParent, ScViewData* pViewData ) :
-    ScMatrixComparisonGeneratorController(
+    ScMatrixComparisonGenerator(
             pSfxBindings, pChildWindow, pParent, pViewData,
             "modules/scalc/ui/covariancedialog.ui", "CovarianceDialog")
 {}
diff --git a/sc/source/ui/StatisticsDialogs/MatrixComparisonGenerator.cxx b/sc/source/ui/StatisticsDialogs/MatrixComparisonGenerator.cxx
index 11146e438224..4ae4ef0e392d 100644
--- a/sc/source/ui/StatisticsDialogs/MatrixComparisonGenerator.cxx
+++ b/sc/source/ui/StatisticsDialogs/MatrixComparisonGenerator.cxx
@@ -39,7 +39,7 @@ namespace
     }
 }
 
-ScMatrixComparisonGeneratorController::ScMatrixComparisonGeneratorController(
+ScMatrixComparisonGenerator::ScMatrixComparisonGenerator(
                                     SfxBindings* pSfxBindings, SfxChildWindow* pChildWindow,
                                     weld::Window* pParent, ScViewData* pViewData,
                                     const OUString& rUiXmlDescription,
@@ -47,15 +47,15 @@ ScMatrixComparisonGeneratorController::ScMatrixComparisonGeneratorController(
     : ScStatisticsInputOutputDialogController(pSfxBindings, pChildWindow, pParent, pViewData, rUiXmlDescription, rID)
 {}
 
-ScMatrixComparisonGeneratorController::~ScMatrixComparisonGeneratorController()
+ScMatrixComparisonGenerator::~ScMatrixComparisonGenerator()
 {}
 
-const char* ScMatrixComparisonGeneratorController::GetUndoNameId()
+const char* ScMatrixComparisonGenerator::GetUndoNameId()
 {
     return STR_CORRELATION_UNDO_NAME;
 }
 
-ScRange ScMatrixComparisonGeneratorController::ApplyOutput(ScDocShell* pDocShell)
+ScRange ScMatrixComparisonGenerator::ApplyOutput(ScDocShell* pDocShell)
 {
     AddressWalkerWriter output(mOutputAddress, pDocShell, mDocument,
             formula::FormulaGrammar::mergeToGrammar( formula::FormulaGrammar::GRAM_ENGLISH, mAddressDetails.eConv));
diff --git a/sc/source/ui/inc/CorrelationDialog.hxx b/sc/source/ui/inc/CorrelationDialog.hxx
index 2a98da43881f..12db6f39df5b 100644
--- a/sc/source/ui/inc/CorrelationDialog.hxx
+++ b/sc/source/ui/inc/CorrelationDialog.hxx
@@ -13,7 +13,7 @@
 
 #include "MatrixComparisonGenerator.hxx"
 
-class ScCorrelationDialog : public ScMatrixComparisonGeneratorController
+class ScCorrelationDialog : public ScMatrixComparisonGenerator
 {
 public:
     ScCorrelationDialog(
diff --git a/sc/source/ui/inc/CovarianceDialog.hxx b/sc/source/ui/inc/CovarianceDialog.hxx
index 99052c51b644..21acb96e4b75 100644
--- a/sc/source/ui/inc/CovarianceDialog.hxx
+++ b/sc/source/ui/inc/CovarianceDialog.hxx
@@ -13,7 +13,7 @@
 
 #include "MatrixComparisonGenerator.hxx"
 
-class ScCovarianceDialog : public ScMatrixComparisonGeneratorController
+class ScCovarianceDialog : public ScMatrixComparisonGenerator
 {
 public:
     ScCovarianceDialog(
diff --git a/sc/source/ui/inc/MatrixComparisonGenerator.hxx b/sc/source/ui/inc/MatrixComparisonGenerator.hxx
index 6f0187d83ff1..955eb776a1e8 100644
--- a/sc/source/ui/inc/MatrixComparisonGenerator.hxx
+++ b/sc/source/ui/inc/MatrixComparisonGenerator.hxx
@@ -16,15 +16,15 @@
 
 #include "StatisticsInputOutputDialog.hxx"
 
-class ScMatrixComparisonGeneratorController : public ScStatisticsInputOutputDialogController
+class ScMatrixComparisonGenerator : public ScStatisticsInputOutputDialogController
 {
 public:
-    ScMatrixComparisonGeneratorController(
+    ScMatrixComparisonGenerator(
         SfxBindings* pSfxBindings, SfxChildWindow* pChildWindow,
         weld::Window* pParent, ScViewData* pViewData,
         const OUString& rUiXmlDescription, const OString& rID);
 
-    virtual ~ScMatrixComparisonGeneratorController() override;
+    virtual ~ScMatrixComparisonGenerator() override;
 
 protected:
     virtual const char* GetUndoNameId() override;
commit 5cc8252879cd46829008e21de246e520fff7d1ad
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Wed Apr 10 12:33:31 2019 +0100
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Thu Apr 11 09:57:35 2019 +0200

    drop unused ScMatrixComparisonGenerator
    
    Change-Id: I8b0da3dab82bc6a112ac6380b2359861f23905ce
    Reviewed-on: https://gerrit.libreoffice.org/70544
    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/MatrixComparisonGenerator.cxx b/sc/source/ui/StatisticsDialogs/MatrixComparisonGenerator.cxx
index 487602fe8a1a..11146e438224 100644
--- a/sc/source/ui/StatisticsDialogs/MatrixComparisonGenerator.cxx
+++ b/sc/source/ui/StatisticsDialogs/MatrixComparisonGenerator.cxx
@@ -39,76 +39,6 @@ namespace
     }
 }
 
-ScMatrixComparisonGenerator::ScMatrixComparisonGenerator(
-                                    SfxBindings* pSfxBindings, SfxChildWindow* pChildWindow,
-                                    vcl::Window* pParent, ScViewData* pViewData, const OUString& rID,
-                                    const OUString& rUiXmlDescription) :
-    ScStatisticsInputOutputDialog(pSfxBindings, pChildWindow, pParent, pViewData, rID, rUiXmlDescription)
-{}
-
-ScMatrixComparisonGenerator::~ScMatrixComparisonGenerator()
-{}
-
-const char* ScMatrixComparisonGenerator::GetUndoNameId()
-{
-    return STR_CORRELATION_UNDO_NAME;
-}
-
-ScRange ScMatrixComparisonGenerator::ApplyOutput(ScDocShell* pDocShell)
-{
-    AddressWalkerWriter output(mOutputAddress, pDocShell, mDocument,
-            formula::FormulaGrammar::mergeToGrammar( formula::FormulaGrammar::GRAM_ENGLISH, mAddressDetails.eConv));
-    FormulaTemplate aTemplate(mDocument);
-
-    SCTAB inTab = mInputRange.aStart.Tab();
-
-    ScRangeList aRangeList = (mGroupedBy == BY_COLUMN) ?
-        MakeColumnRangeList(inTab, mInputRange.aStart, mInputRange.aEnd) :
-        MakeRowRangeList(inTab, mInputRange.aStart, mInputRange.aEnd);
-
-    // labels
-    output.writeString(getLabel());
-    output.nextColumn();
-
-    const OUString strWildcardNumber("%NUMBER%");
-
-    // write labels to columns
-    for (size_t i = 0; i < aRangeList.size(); i++)
-    {
-        if (mGroupedBy == BY_COLUMN)
-            aTemplate.setTemplate(ScResId(STR_COLUMN_LABEL_TEMPLATE));
-        else
-            aTemplate.setTemplate(ScResId(STR_ROW_LABEL_TEMPLATE));
-
-        aTemplate.applyNumber(strWildcardNumber, i + 1);
-        output.writeString(aTemplate.getTemplate());
-        output.nextColumn();
-    }
-
-    // write labels to rows
-    output.resetColumn();
-    output.nextRow();
-    for (size_t i = 0; i < aRangeList.size(); i++)
-    {
-        if (mGroupedBy == BY_COLUMN)
-            aTemplate.setTemplate(ScResId(STR_COLUMN_LABEL_TEMPLATE));
-        else
-            aTemplate.setTemplate(ScResId(STR_ROW_LABEL_TEMPLATE));
-
-        aTemplate.applyNumber(strWildcardNumber, i + 1);
-        output.writeString(aTemplate.getTemplate());
-        output.nextRow();
-    }
-
-    // write correlation formulas
-    output.reset();
-    output.push(1, 1);
-
-    lclWriteCorrelationFormulas(output, aTemplate, aRangeList, getTemplate());
-
-    return ScRange(output.mMinimumAddress, output.mMaximumAddress);
-}
-
 ScMatrixComparisonGeneratorController::ScMatrixComparisonGeneratorController(
                                     SfxBindings* pSfxBindings, SfxChildWindow* pChildWindow,
                                     weld::Window* pParent, ScViewData* pViewData,
diff --git a/sc/source/ui/inc/MatrixComparisonGenerator.hxx b/sc/source/ui/inc/MatrixComparisonGenerator.hxx
index 0923042120e6..6f0187d83ff1 100644
--- a/sc/source/ui/inc/MatrixComparisonGenerator.hxx
+++ b/sc/source/ui/inc/MatrixComparisonGenerator.hxx
@@ -16,24 +16,6 @@
 
 #include "StatisticsInputOutputDialog.hxx"
 
-class ScMatrixComparisonGenerator : public ScStatisticsInputOutputDialog
-{
-public:
-    ScMatrixComparisonGenerator(
-        SfxBindings* pSfxBindings, SfxChildWindow* pChildWindow,
-        vcl::Window* pParent, ScViewData* pViewData,
-        const OUString& rID, const OUString& rUiXmlDescription );
-
-    virtual ~ScMatrixComparisonGenerator() override;
-
-protected:
-    virtual const char* GetUndoNameId() override;
-    virtual ScRange ApplyOutput(ScDocShell* pDocShell) override;
-
-    virtual const OUString getLabel() = 0;
-    virtual const OUString getTemplate() = 0;
-};
-
 class ScMatrixComparisonGeneratorController : public ScStatisticsInputOutputDialogController
 {
 public:


More information about the Libreoffice-commits mailing list