diff options
author | Caolán McNamara <caolanm@redhat.com> | 2018-05-18 11:17:40 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2018-05-18 15:12:22 +0200 |
commit | 74c8bc3c7db2bdc5811f0c9ea535a73ddaf6f3ad (patch) | |
tree | 6203a869753c4b31312bac9297c419634235a449 /sc/source/ui/attrdlg | |
parent | 201321f648e82ecc610e7a3324a46248a19c1704 (diff) |
weld ScDataPilotSourceTypeDlg and ScDataPilotServiceDlg
Change-Id: I03ef6f1994e8e1a801e4515586a6a73d3748f13b
Reviewed-on: https://gerrit.libreoffice.org/54528
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sc/source/ui/attrdlg')
-rw-r--r-- | sc/source/ui/attrdlg/scdlgfact.cxx | 44 | ||||
-rw-r--r-- | sc/source/ui/attrdlg/scdlgfact.hxx | 22 |
2 files changed, 42 insertions, 24 deletions
diff --git a/sc/source/ui/attrdlg/scdlgfact.cxx b/sc/source/ui/attrdlg/scdlgfact.cxx index a810883911bf..b5a434272149 100644 --- a/sc/source/ui/attrdlg/scdlgfact.cxx +++ b/sc/source/ui/attrdlg/scdlgfact.cxx @@ -80,8 +80,16 @@ IMPL_ABSTDLG_BASE(AbstractScAutoFormatDlg_Impl); IMPL_ABSTDLG_BASE(AbstractScColRowLabelDlg_Impl); IMPL_ABSTDLG_BASE(AbstractScCondFormatManagerDlg_Impl); IMPL_ABSTDLG_BASE(AbstractScDataPilotDatabaseDlg_Impl); -IMPL_ABSTDLG_BASE(AbstractScDataPilotSourceTypeDlg_Impl); -IMPL_ABSTDLG_BASE(AbstractScDataPilotServiceDlg_Impl); + +short AbstractScDataPilotSourceTypeDlg_Impl::Execute() +{ + return m_xDlg->run(); +} + +short AbstractScDataPilotServiceDlg_Impl::Execute() +{ + return m_xDlg->run(); +} short AbstractScDeleteCellDlg_Impl::Execute() { @@ -235,52 +243,52 @@ void AbstractScDataPilotDatabaseDlg_Impl::GetValues( ScImportSourceDesc& rDesc ) bool AbstractScDataPilotSourceTypeDlg_Impl::IsDatabase() const { - return pDlg->IsDatabase(); + return m_xDlg->IsDatabase(); } bool AbstractScDataPilotSourceTypeDlg_Impl::IsExternal() const { - return pDlg->IsExternal(); + return m_xDlg->IsExternal(); } bool AbstractScDataPilotSourceTypeDlg_Impl::IsNamedRange() const { - return pDlg->IsNamedRange(); + return m_xDlg->IsNamedRange(); } OUString AbstractScDataPilotSourceTypeDlg_Impl::GetSelectedNamedRange() const { - return pDlg->GetSelectedNamedRange(); + return m_xDlg->GetSelectedNamedRange(); } void AbstractScDataPilotSourceTypeDlg_Impl::AppendNamedRange(const OUString& rName) { - pDlg->AppendNamedRange(rName); + m_xDlg->AppendNamedRange(rName); } OUString AbstractScDataPilotServiceDlg_Impl::GetServiceName() const { - return pDlg->GetServiceName(); + return m_xDlg->GetServiceName(); } OUString AbstractScDataPilotServiceDlg_Impl::GetParSource() const { - return pDlg->GetParSource(); + return m_xDlg->GetParSource(); } OUString AbstractScDataPilotServiceDlg_Impl::GetParName() const { - return pDlg->GetParName(); + return m_xDlg->GetParName(); } OUString AbstractScDataPilotServiceDlg_Impl::GetParUser() const { - return pDlg->GetParUser(); + return m_xDlg->GetParUser(); } OUString AbstractScDataPilotServiceDlg_Impl::GetParPass() const { - return pDlg->GetParPass(); + return m_xDlg->GetParPass(); } DelCellCmd AbstractScDeleteCellDlg_Impl::GetDelCellCmd() const @@ -704,17 +712,15 @@ VclPtr<AbstractScDataPilotDatabaseDlg> ScAbstractDialogFactory_Impl::CreateScDat } VclPtr<AbstractScDataPilotSourceTypeDlg> ScAbstractDialogFactory_Impl::CreateScDataPilotSourceTypeDlg( - vcl::Window* pParent, bool bEnableExternal) + weld::Window* pParent, bool bEnableExternal) { - VclPtr<ScDataPilotSourceTypeDlg> pDlg = VclPtr<ScDataPilotSourceTypeDlg>::Create(pParent, bEnableExternal); - return VclPtr<AbstractScDataPilotSourceTypeDlg_Impl>::Create(pDlg); + return VclPtr<AbstractScDataPilotSourceTypeDlg_Impl>::Create(new ScDataPilotSourceTypeDlg(pParent, bEnableExternal)); } -VclPtr<AbstractScDataPilotServiceDlg> ScAbstractDialogFactory_Impl::CreateScDataPilotServiceDlg( vcl::Window* pParent, - const std::vector<OUString>& rServices ) +VclPtr<AbstractScDataPilotServiceDlg> ScAbstractDialogFactory_Impl::CreateScDataPilotServiceDlg(weld::Window* pParent, + const std::vector<OUString>& rServices) { - VclPtr<ScDataPilotServiceDlg> pDlg = VclPtr<ScDataPilotServiceDlg>::Create( pParent, rServices ); - return VclPtr<AbstractScDataPilotServiceDlg_Impl>::Create( pDlg ); + return VclPtr<AbstractScDataPilotServiceDlg_Impl>::Create(new ScDataPilotServiceDlg(pParent, rServices)); } VclPtr<AbstractScDeleteCellDlg> ScAbstractDialogFactory_Impl::CreateScDeleteCellDlg(weld::Window* pParent, diff --git a/sc/source/ui/attrdlg/scdlgfact.hxx b/sc/source/ui/attrdlg/scdlgfact.hxx index 998bf0926eba..d2a1a694c6aa 100644 --- a/sc/source/ui/attrdlg/scdlgfact.hxx +++ b/sc/source/ui/attrdlg/scdlgfact.hxx @@ -142,7 +142,13 @@ class AbstractScDataPilotDatabaseDlg_Impl :public AbstractScDataPilotDatabaseDl class AbstractScDataPilotSourceTypeDlg_Impl :public AbstractScDataPilotSourceTypeDlg { - DECL_ABSTDLG_BASE(AbstractScDataPilotSourceTypeDlg_Impl, ScDataPilotSourceTypeDlg) + std::unique_ptr<ScDataPilotSourceTypeDlg> m_xDlg; +public: + explicit AbstractScDataPilotSourceTypeDlg_Impl(ScDataPilotSourceTypeDlg* p) + : m_xDlg(p) + { + } + virtual short Execute() override; virtual bool IsDatabase() const override; virtual bool IsExternal() const override; virtual bool IsNamedRange() const override; @@ -152,7 +158,13 @@ class AbstractScDataPilotSourceTypeDlg_Impl :public AbstractScDataPilotSourceTy class AbstractScDataPilotServiceDlg_Impl : public AbstractScDataPilotServiceDlg { - DECL_ABSTDLG_BASE(AbstractScDataPilotServiceDlg_Impl, ScDataPilotServiceDlg) + std::unique_ptr<ScDataPilotServiceDlg> m_xDlg; +public: + explicit AbstractScDataPilotServiceDlg_Impl(ScDataPilotServiceDlg* p) + : m_xDlg(p) + { + } + virtual short Execute() override; virtual OUString GetServiceName() const override; virtual OUString GetParSource() const override; virtual OUString GetParName() const override; @@ -490,11 +502,11 @@ public: virtual VclPtr<AbstractScDataPilotDatabaseDlg> CreateScDataPilotDatabaseDlg(vcl::Window* pParent) override; - virtual VclPtr<AbstractScDataPilotSourceTypeDlg> CreateScDataPilotSourceTypeDlg(vcl::Window* pParent, + virtual VclPtr<AbstractScDataPilotSourceTypeDlg> CreateScDataPilotSourceTypeDlg(weld::Window* pParent, bool bEnableExternal) override; - virtual VclPtr<AbstractScDataPilotServiceDlg> CreateScDataPilotServiceDlg( vcl::Window* pParent, - const std::vector<OUString>& rServices ) override; + virtual VclPtr<AbstractScDataPilotServiceDlg> CreateScDataPilotServiceDlg(weld::Window* pParent, + const std::vector<OUString>& rServices) override; virtual VclPtr<AbstractScDeleteCellDlg> CreateScDeleteCellDlg(weld::Window* pParent, bool bDisallowCellMove ) override; //for dataform |