summaryrefslogtreecommitdiff
path: root/extensions/source/dbpilots
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2016-11-08 11:10:50 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2016-11-08 11:11:52 +0000
commit1b277a37c5ad219d2e275df1289ccfbce27183ee (patch)
tree19ed989da90eaca6e3847239a47f1095d5cc9841 /extensions/source/dbpilots
parentf2beebbfe78bfd5dd26318ea269f49aeee6bd642 (diff)
loplugin:expandablemethods in extensions
Change-Id: I93a770933de86146de1d25db9d596615916c3e28 Reviewed-on: https://gerrit.libreoffice.org/30689 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'extensions/source/dbpilots')
-rw-r--r--extensions/source/dbpilots/commonpagesdbp.cxx25
-rw-r--r--extensions/source/dbpilots/commonpagesdbp.hxx1
-rw-r--r--extensions/source/dbpilots/groupboxwiz.cxx18
-rw-r--r--extensions/source/dbpilots/groupboxwiz.hxx5
-rw-r--r--extensions/source/dbpilots/listcombowizard.cxx2
-rw-r--r--extensions/source/dbpilots/listcombowizard.hxx2
6 files changed, 17 insertions, 36 deletions
diff --git a/extensions/source/dbpilots/commonpagesdbp.cxx b/extensions/source/dbpilots/commonpagesdbp.cxx
index 0dc6b2791074..99382137faee 100644
--- a/extensions/source/dbpilots/commonpagesdbp.cxx
+++ b/extensions/source/dbpilots/commonpagesdbp.cxx
@@ -62,7 +62,16 @@ namespace dbp
get(m_pDatasourceLabel, "datasourcelabel");
get(m_pSearchDatabase, "search");
- implCollectDatasource();
+ try
+ {
+ m_xDSContext = getContext().xDatasourceContext;
+ if (m_xDSContext.is())
+ fillListBox(*m_pDatasource, m_xDSContext->getElementNames());
+ }
+ catch (const Exception&)
+ {
+ OSL_FAIL("OTableSelectionPage::OTableSelectionPage: could not collect the data source names!");
+ }
m_pDatasource->SetSelectHdl(LINK(this, OTableSelectionPage, OnListboxSelection));
m_pTable->SetSelectHdl(LINK(this, OTableSelectionPage, OnListboxSelection));
@@ -361,20 +370,6 @@ namespace dbp
}
- void OTableSelectionPage::implCollectDatasource()
- {
- try
- {
- m_xDSContext = getContext().xDatasourceContext;
- if (m_xDSContext.is())
- fillListBox(*m_pDatasource, m_xDSContext->getElementNames());
- }
- catch (const Exception&)
- {
- OSL_FAIL("OTableSelectionPage::implCollectDatasource: could not collect the data source names!");
- }
- }
-
OMaybeListSelectionPage::OMaybeListSelectionPage( OControlWizard* _pParent, const OString& _rID, const OUString& _rUIXMLDescription )
:OControlWizardPage(_pParent, _rID, _rUIXMLDescription)
,m_pYes(nullptr)
diff --git a/extensions/source/dbpilots/commonpagesdbp.hxx b/extensions/source/dbpilots/commonpagesdbp.hxx
index 345113939c5b..99d3ad09ac80 100644
--- a/extensions/source/dbpilots/commonpagesdbp.hxx
+++ b/extensions/source/dbpilots/commonpagesdbp.hxx
@@ -58,7 +58,6 @@ namespace dbp
DECL_LINK( OnListboxDoubleClicked, ListBox&, void );
DECL_LINK( OnSearchClicked, Button*, void );
- void implCollectDatasource();
void implFillTables(const css::uno::Reference< css::sdbc::XConnection >&
_rxConn = css::uno::Reference< css::sdbc::XConnection >());
diff --git a/extensions/source/dbpilots/groupboxwiz.cxx b/extensions/source/dbpilots/groupboxwiz.cxx
index ddce66693089..ddb34e420b60 100644
--- a/extensions/source/dbpilots/groupboxwiz.cxx
+++ b/extensions/source/dbpilots/groupboxwiz.cxx
@@ -153,8 +153,12 @@ namespace dbp
}
- void OGroupBoxWizard::createRadios()
+ bool OGroupBoxWizard::onFinish()
{
+ // commit the basic control settings
+ commitControlSettings(&m_aSettings);
+
+ // create the radio buttons
try
{
OOptionGroupLayouter aLayouter( getComponentContext() );
@@ -164,16 +168,6 @@ namespace dbp
{
OSL_FAIL("OGroupBoxWizard::createRadios: caught an exception while creating the radio shapes!");
}
- }
-
-
- bool OGroupBoxWizard::onFinish()
- {
- // commit the basic control settings
- commitControlSettings(&m_aSettings);
-
- // create the radio buttons
- createRadios();
return OControlWizard::onFinish();
}
@@ -480,7 +474,7 @@ namespace dbp
OUString& OOptionDBFieldPage::getDBFieldSetting()
{
- return getSettings().sDBField;
+ return static_cast<OGroupBoxWizard*>(getDialog())->getSettings().sDBField;
}
OFinalizeGBWPage::OFinalizeGBWPage( OControlWizard* _pParent )
diff --git a/extensions/source/dbpilots/groupboxwiz.hxx b/extensions/source/dbpilots/groupboxwiz.hxx
index 92ddc89cabaf..2745de988d17 100644
--- a/extensions/source/dbpilots/groupboxwiz.hxx
+++ b/extensions/source/dbpilots/groupboxwiz.hxx
@@ -60,9 +60,6 @@ namespace dbp
virtual bool onFinish() override;
virtual bool approveControl(sal_Int16 _nClassId) override;
-
- protected:
- void createRadios();
};
class OGBWPage : public OControlWizardPage
@@ -160,8 +157,6 @@ namespace dbp
explicit OOptionDBFieldPage( OControlWizard* _pParent );
protected:
- OOptionGroupSettings& getSettings() { return static_cast<OGroupBoxWizard*>(getDialog())->getSettings(); }
-
// ODBFieldPage overridables
virtual OUString& getDBFieldSetting() override;
};
diff --git a/extensions/source/dbpilots/listcombowizard.cxx b/extensions/source/dbpilots/listcombowizard.cxx
index a53288b0674e..6f9386e81efb 100644
--- a/extensions/source/dbpilots/listcombowizard.cxx
+++ b/extensions/source/dbpilots/listcombowizard.cxx
@@ -511,7 +511,7 @@ namespace dbp
OUString& OComboDBFieldPage::getDBFieldSetting()
{
- return getSettings().sLinkedFormField;
+ return static_cast<OListComboWizard*>(getDialog())->getSettings().sLinkedFormField;
}
diff --git a/extensions/source/dbpilots/listcombowizard.hxx b/extensions/source/dbpilots/listcombowizard.hxx
index 5cc6555ff120..135bc1da88aa 100644
--- a/extensions/source/dbpilots/listcombowizard.hxx
+++ b/extensions/source/dbpilots/listcombowizard.hxx
@@ -174,8 +174,6 @@ namespace dbp
explicit OComboDBFieldPage( OControlWizard* _pParent );
protected:
- OListComboSettings& getSettings() { return static_cast<OListComboWizard*>(getDialog())->getSettings(); }
-
// TabPage overridables
virtual void ActivatePage() override;