[Libreoffice-commits] core.git: chart2/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Sat Oct 27 20:16:53 UTC 2018


 chart2/source/controller/dialogs/dlg_InsertTitle.cxx |    2 
 chart2/source/controller/dialogs/res_Titles.cxx      |   72 -------------------
 chart2/source/controller/inc/dlg_InsertTitle.hxx     |    2 
 chart2/source/controller/inc/res_Titles.hxx          |   28 -------
 4 files changed, 2 insertions(+), 102 deletions(-)

New commits:
commit 13869d040f868a6da32fe3f3b3a6703410610658
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Sat Oct 27 19:22:08 2018 +0100
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Sat Oct 27 22:16:32 2018 +0200

    merge SchTitleResources/TitleResources back together
    
    Change-Id: I4c7ff790b2b6d76a96a5d54f1537fa051beac7d1
    Reviewed-on: https://gerrit.libreoffice.org/62439
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/chart2/source/controller/dialogs/dlg_InsertTitle.cxx b/chart2/source/controller/dialogs/dlg_InsertTitle.cxx
index c0d44e5cba9f..f228e037d32a 100644
--- a/chart2/source/controller/dialogs/dlg_InsertTitle.cxx
+++ b/chart2/source/controller/dialogs/dlg_InsertTitle.cxx
@@ -26,7 +26,7 @@ namespace chart
 
 SchTitleDlg::SchTitleDlg(weld::Window* pWindow, const TitleDialogData& rInput)
     : GenericDialogController(pWindow, "modules/schart/ui/inserttitledlg.ui", "InsertTitleDialog")
-    , m_xTitleResources(new SchTitleResources(*m_xBuilder, true))
+    , m_xTitleResources(new TitleResources(*m_xBuilder, true))
 {
     m_xDialog->set_title(ObjectNameProvider::getName(OBJECTTYPE_TITLE, true));
     m_xTitleResources->writeToResources( rInput );
diff --git a/chart2/source/controller/dialogs/res_Titles.cxx b/chart2/source/controller/dialogs/res_Titles.cxx
index 4269d1d45195..b10cd19aa95d 100644
--- a/chart2/source/controller/dialogs/res_Titles.cxx
+++ b/chart2/source/controller/dialogs/res_Titles.cxx
@@ -130,78 +130,6 @@ void TitleResources::readFromResources( TitleDialogData& rOutput )
     rOutput.aTextList[6] = m_xEd_SecondaryYAxis->get_text();
 }
 
-SchTitleResources::SchTitleResources(weld::Builder& rBuilder, bool bShowSecondaryAxesTitle)
-    : m_xFT_Main(rBuilder.weld_label("labelMainTitle"))
-    , m_xFT_Sub(rBuilder.weld_label("labelSubTitle"))
-    , m_xEd_Main(rBuilder.weld_entry("maintitle"))
-    , m_xEd_Sub(rBuilder.weld_entry("subtitle"))
-    , m_xFT_XAxis(rBuilder.weld_label("labelPrimaryXaxis"))
-    , m_xFT_YAxis(rBuilder.weld_label("labelPrimaryYaxis"))
-    , m_xFT_ZAxis(rBuilder.weld_label("labelPrimaryZaxis"))
-    , m_xEd_XAxis(rBuilder.weld_entry("primaryXaxis"))
-    , m_xEd_YAxis(rBuilder.weld_entry("primaryYaxis"))
-    , m_xEd_ZAxis(rBuilder.weld_entry("primaryZaxis"))
-    , m_xFT_SecondaryXAxis(rBuilder.weld_label("labelSecondaryXAxis"))
-    , m_xFT_SecondaryYAxis(rBuilder.weld_label("labelSecondaryYAxis"))
-    , m_xEd_SecondaryXAxis(rBuilder.weld_entry("secondaryXaxis"))
-    , m_xEd_SecondaryYAxis(rBuilder.weld_entry("secondaryYaxis"))
-{
-    m_xFT_SecondaryXAxis->show(bShowSecondaryAxesTitle);
-    m_xFT_SecondaryYAxis->show(bShowSecondaryAxesTitle);
-    m_xEd_SecondaryXAxis->show(bShowSecondaryAxesTitle);
-    m_xEd_SecondaryYAxis->show(bShowSecondaryAxesTitle);
-}
-
-SchTitleResources::~SchTitleResources()
-{
-}
-
-void SchTitleResources::writeToResources( const TitleDialogData& rInput )
-{
-    m_xFT_Main->set_sensitive( rInput.aPossibilityList[0] );
-    m_xFT_Sub->set_sensitive( rInput.aPossibilityList[1] );
-    m_xFT_XAxis->set_sensitive( rInput.aPossibilityList[2] );
-    m_xFT_YAxis->set_sensitive( rInput.aPossibilityList[3] );
-    m_xFT_ZAxis->set_sensitive( rInput.aPossibilityList[4] );
-    m_xFT_SecondaryXAxis->set_sensitive( rInput.aPossibilityList[5] );
-    m_xFT_SecondaryYAxis->set_sensitive( rInput.aPossibilityList[6] );
-
-    m_xEd_Main->set_sensitive( rInput.aPossibilityList[0] );
-    m_xEd_Sub->set_sensitive( rInput.aPossibilityList[1] );
-    m_xEd_XAxis->set_sensitive( rInput.aPossibilityList[2] );
-    m_xEd_YAxis->set_sensitive( rInput.aPossibilityList[3] );
-    m_xEd_ZAxis->set_sensitive( rInput.aPossibilityList[4] );
-    m_xEd_SecondaryXAxis->set_sensitive( rInput.aPossibilityList[5] );
-    m_xEd_SecondaryYAxis->set_sensitive( rInput.aPossibilityList[6] );
-
-    m_xEd_Main->set_text(rInput.aTextList[0]);
-    m_xEd_Sub->set_text(rInput.aTextList[1]);
-    m_xEd_XAxis->set_text(rInput.aTextList[2]);
-    m_xEd_YAxis->set_text(rInput.aTextList[3]);
-    m_xEd_ZAxis->set_text(rInput.aTextList[4]);
-    m_xEd_SecondaryXAxis->set_text(rInput.aTextList[5]);
-    m_xEd_SecondaryYAxis->set_text(rInput.aTextList[6]);
-}
-
-void SchTitleResources::readFromResources( TitleDialogData& rOutput )
-{
-    rOutput.aExistenceList[0] = !m_xEd_Main->get_text().isEmpty();
-    rOutput.aExistenceList[1] = !m_xEd_Sub->get_text().isEmpty();
-    rOutput.aExistenceList[2] = !m_xEd_XAxis->get_text().isEmpty();
-    rOutput.aExistenceList[3] = !m_xEd_YAxis->get_text().isEmpty();
-    rOutput.aExistenceList[4] = !m_xEd_ZAxis->get_text().isEmpty();
-    rOutput.aExistenceList[5] = !m_xEd_SecondaryXAxis->get_text().isEmpty();
-    rOutput.aExistenceList[6] = !m_xEd_SecondaryYAxis->get_text().isEmpty();
-
-    rOutput.aTextList[0] = m_xEd_Main->get_text();
-    rOutput.aTextList[1] = m_xEd_Sub->get_text();
-    rOutput.aTextList[2] = m_xEd_XAxis->get_text();
-    rOutput.aTextList[3] = m_xEd_YAxis->get_text();
-    rOutput.aTextList[4] = m_xEd_ZAxis->get_text();
-    rOutput.aTextList[5] = m_xEd_SecondaryXAxis->get_text();
-    rOutput.aTextList[6] = m_xEd_SecondaryYAxis->get_text();
-}
-
 } //namespace chart
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/controller/inc/dlg_InsertTitle.hxx b/chart2/source/controller/inc/dlg_InsertTitle.hxx
index f9786fec244f..c09c1becf709 100644
--- a/chart2/source/controller/inc/dlg_InsertTitle.hxx
+++ b/chart2/source/controller/inc/dlg_InsertTitle.hxx
@@ -28,7 +28,7 @@ namespace chart
 class SchTitleDlg : public weld::GenericDialogController
 {
 private:
-    std::unique_ptr<SchTitleResources>  m_xTitleResources;
+    std::unique_ptr<TitleResources>  m_xTitleResources;
 
 public:
     SchTitleDlg(weld::Window* pParent, const TitleDialogData& rInput);
diff --git a/chart2/source/controller/inc/res_Titles.hxx b/chart2/source/controller/inc/res_Titles.hxx
index 7f0580d4025e..ce9d950c5568 100644
--- a/chart2/source/controller/inc/res_Titles.hxx
+++ b/chart2/source/controller/inc/res_Titles.hxx
@@ -57,34 +57,6 @@ private:
     std::unique_ptr<weld::Entry> m_xEd_SecondaryYAxis;
 };
 
-class SchTitleResources final
-{
-public:
-    SchTitleResources(weld::Builder& rBuilder, bool bShowSecondaryAxesTitle);
-    ~SchTitleResources();
-
-    void writeToResources( const TitleDialogData& rInput );
-    void readFromResources( TitleDialogData& rOutput );
-
-private:
-    std::unique_ptr<weld::Label> m_xFT_Main;
-    std::unique_ptr<weld::Label> m_xFT_Sub;
-    std::unique_ptr<weld::Entry> m_xEd_Main;
-    std::unique_ptr<weld::Entry> m_xEd_Sub;
-
-    std::unique_ptr<weld::Label> m_xFT_XAxis;
-    std::unique_ptr<weld::Label> m_xFT_YAxis;
-    std::unique_ptr<weld::Label> m_xFT_ZAxis;
-    std::unique_ptr<weld::Entry> m_xEd_XAxis;
-    std::unique_ptr<weld::Entry> m_xEd_YAxis;
-    std::unique_ptr<weld::Entry> m_xEd_ZAxis;
-
-    std::unique_ptr<weld::Label> m_xFT_SecondaryXAxis;
-    std::unique_ptr<weld::Label> m_xFT_SecondaryYAxis;
-    std::unique_ptr<weld::Entry> m_xEd_SecondaryXAxis;
-    std::unique_ptr<weld::Entry> m_xEd_SecondaryYAxis;
-};
-
 } //namespace chart
 
 #endif


More information about the Libreoffice-commits mailing list