summaryrefslogtreecommitdiff
path: root/sd/source
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2019-03-13 14:17:22 +0000
committerCaolán McNamara <caolanm@redhat.com>2019-03-14 11:22:58 +0100
commit8bc23968129fc38d70fb614668a411599d4e6d0e (patch)
tree9044b744172c04d726c468f4f77b64d527722b89 /sd/source
parent33a3d806ff065c302283e4d7db522762eda428f8 (diff)
weld SdActionDlg
Change-Id: I2d43c1fc65e8cfed1e252e1a16c37b907ec9f319 Reviewed-on: https://gerrit.libreoffice.org/69180 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sd/source')
-rw-r--r--sd/source/ui/dlg/sddlgfact.cxx13
-rw-r--r--sd/source/ui/dlg/sddlgfact.hxx13
-rw-r--r--sd/source/ui/dlg/tpaction.cxx17
-rw-r--r--sd/source/ui/func/fuoaprms.cxx2
-rw-r--r--sd/source/ui/inc/tpaction.hxx4
5 files changed, 29 insertions, 20 deletions
diff --git a/sd/source/ui/dlg/sddlgfact.cxx b/sd/source/ui/dlg/sddlgfact.cxx
index 0818046394b1..c29066beca1f 100644
--- a/sd/source/ui/dlg/sddlgfact.cxx
+++ b/sd/source/ui/dlg/sddlgfact.cxx
@@ -109,7 +109,10 @@ short AbstractSdPresLayoutDlg_Impl::Execute()
return m_xDlg->run();
}
-IMPL_ABSTDLG_BASE(SdAbstractSfxDialog_Impl);
+short SdAbstractSfxDialog_Impl::Execute()
+{
+ return m_xDlg->run();
+}
short AbstractSdVectorizeDlg_Impl::Execute()
{
@@ -342,12 +345,12 @@ void AbstractSdPresLayoutDlg_Impl::GetAttr( SfxItemSet& rOutAttrs )
const SfxItemSet* SdAbstractSfxDialog_Impl::GetOutputItemSet() const
{
- return pDlg->GetOutputItemSet();
+ return m_xDlg->GetOutputItemSet();
}
void SdAbstractSfxDialog_Impl::SetText( const OUString& rStr )
{
- pDlg->SetText( rStr );
+ m_xDlg->set_title(rStr);
}
const GDIMetaFile& AbstractSdVectorizeDlg_Impl::GetGDIMetaFile() const
@@ -455,9 +458,9 @@ VclPtr<SfxAbstractTabDialog> SdAbstractDialogFactory_Impl::CreateSdTabTemplateD
return VclPtr<SdAbstractTabController_Impl>::Create(std::make_unique<SdTabTemplateDlg>(pParent, pDocShell, rStyleBase, pModel, pView));
}
-VclPtr<SfxAbstractDialog> SdAbstractDialogFactory_Impl::CreatSdActionDialog(vcl::Window* pParent, const SfxItemSet* pAttr, ::sd::View* pView )
+VclPtr<SfxAbstractDialog> SdAbstractDialogFactory_Impl::CreatSdActionDialog(weld::Window* pParent, const SfxItemSet* pAttr, ::sd::View* pView )
{
- return VclPtr<SdAbstractSfxDialog_Impl>::Create( VclPtr<SdActionDlg>::Create( pParent, pAttr, pView ) );
+ return VclPtr<SdAbstractSfxDialog_Impl>::Create(std::make_unique<SdActionDlg>(pParent, pAttr, pView));
}
VclPtr<AbstractSdVectorizeDlg> SdAbstractDialogFactory_Impl::CreateSdVectorizeDlg(weld::Window* pParent, const Bitmap& rBmp, ::sd::DrawDocShell* pDocShell)
diff --git a/sd/source/ui/dlg/sddlgfact.hxx b/sd/source/ui/dlg/sddlgfact.hxx
index 269795b4c690..8f419d943036 100644
--- a/sd/source/ui/dlg/sddlgfact.hxx
+++ b/sd/source/ui/dlg/sddlgfact.hxx
@@ -292,9 +292,16 @@ public:
class SdAbstractSfxDialog_Impl : public SfxAbstractDialog
{
- DECL_ABSTDLG_BASE(SdAbstractSfxDialog_Impl,SfxModalDialog)
+private:
+ std::unique_ptr<SfxSingleTabDialogController> m_xDlg;
+public:
+ SdAbstractSfxDialog_Impl(std::unique_ptr<SfxSingleTabDialogController> pDlg)
+ : m_xDlg(std::move(pDlg))
+ {
+ }
+ virtual short Execute() override;
virtual const SfxItemSet* GetOutputItemSet() const override;
- virtual void SetText( const OUString& rStr ) override;
+ virtual void SetText( const OUString& rStr ) override;
};
class SdVectorizeDlg;
@@ -348,7 +355,7 @@ public:
virtual VclPtr<SfxAbstractTabDialog> CreateSdPresLayoutTemplateDlg(SfxObjectShell* pDocSh, weld::Window* pParent, bool bBackgroundDlg, SfxStyleSheetBase& rStyleBase, PresentationObjects ePO, SfxStyleSheetBasePool* pSSPool) override;
virtual VclPtr<AbstractSdPresLayoutDlg> CreateSdPresLayoutDlg(weld::Window* pParent, ::sd::DrawDocShell* pDocShell, const SfxItemSet& rInAttrs) override;
virtual VclPtr<SfxAbstractTabDialog> CreateSdTabTemplateDlg(weld::Window* pParent, const SfxObjectShell* pDocShell, SfxStyleSheetBase& rStyleBase, SdrModel* pModel, SdrView* pView ) override;
- virtual VclPtr<SfxAbstractDialog> CreatSdActionDialog(vcl::Window* pParent, const SfxItemSet* pAttr, ::sd::View* pView) override;
+ virtual VclPtr<SfxAbstractDialog> CreatSdActionDialog(weld::Window* pParent, const SfxItemSet* pAttr, ::sd::View* pView) override;
virtual VclPtr<AbstractSdVectorizeDlg> CreateSdVectorizeDlg(weld::Window* pParent, const Bitmap& rBmp, ::sd::DrawDocShell* pDocShell) override;
virtual VclPtr<AbstractSdPublishingDlg> CreateSdPublishingDlg(vcl::Window* pWindow, DocumentType eDocType) override;
diff --git a/sd/source/ui/dlg/tpaction.cxx b/sd/source/ui/dlg/tpaction.cxx
index 031a8a64afe6..a349767a1858 100644
--- a/sd/source/ui/dlg/tpaction.cxx
+++ b/sd/source/ui/dlg/tpaction.cxx
@@ -74,20 +74,19 @@ using namespace com::sun::star::lang;
/**
* Constructor of the Tab dialog: appends the pages to the dialog
*/
-SdActionDlg::SdActionDlg (
- vcl::Window* pParent, const SfxItemSet* pAttr, ::sd::View const * pView )
- : SfxSingleTabDialog(pParent, *pAttr, "InteractionDialog",
- "modules/simpress/ui/interactiondialog.ui")
+SdActionDlg::SdActionDlg(weld::Window* pParent, const SfxItemSet* pAttr, ::sd::View const * pView)
+ : SfxSingleTabDialogController(pParent, *pAttr, "modules/simpress/ui/interactiondialog.ui",
+ "InteractionDialog")
, rOutAttrs(*pAttr)
{
- VclPtr<SfxTabPage> pNewPage = SdTPAction::Create(get_content_area(), rOutAttrs);
- assert(pNewPage); //Unable to create page
+ TabPageParent aParent(get_content_area(), this);
+ VclPtr<SfxTabPage> xNewPage = SdTPAction::Create(aParent, rOutAttrs);
// formerly in PageCreated
- static_cast<SdTPAction*>( pNewPage.get() )->SetView( pView );
- static_cast<SdTPAction*>( pNewPage.get() )->Construct();
+ static_cast<SdTPAction*>( xNewPage.get() )->SetView( pView );
+ static_cast<SdTPAction*>( xNewPage.get() )->Construct();
- SetTabPage( pNewPage );
+ SetTabPage(xNewPage);
}
/**
diff --git a/sd/source/ui/func/fuoaprms.cxx b/sd/source/ui/func/fuoaprms.cxx
index fd2503fceb9c..785006055dc0 100644
--- a/sd/source/ui/func/fuoaprms.cxx
+++ b/sd/source/ui/func/fuoaprms.cxx
@@ -446,7 +446,7 @@ void FuObjectAnimationParameters::DoExecute( SfxRequest& rReq )
aSet.Put(SfxBoolItem(ATTR_ACTION_PLAYFULL, false));
SdAbstractDialogFactory* pFact = SdAbstractDialogFactory::Create();
- ScopedVclPtr<SfxAbstractDialog> pDlg( pFact->CreatSdActionDialog(mpViewShell->GetActiveWindow(), &aSet, mpView) );
+ ScopedVclPtr<SfxAbstractDialog> pDlg( pFact->CreatSdActionDialog(mpViewShell->GetFrameWeld(), &aSet, mpView) );
short nResult = pDlg->Execute();
diff --git a/sd/source/ui/inc/tpaction.hxx b/sd/source/ui/inc/tpaction.hxx
index 1bb4b5287849..0a5ff1bb0f05 100644
--- a/sd/source/ui/inc/tpaction.hxx
+++ b/sd/source/ui/inc/tpaction.hxx
@@ -37,12 +37,12 @@ class SdDrawDocument;
/**
* Effect-SingleTab-Dialog
*/
-class SdActionDlg : public SfxSingleTabDialog
+class SdActionDlg : public SfxSingleTabDialogController
{
private:
const SfxItemSet& rOutAttrs;
public:
- SdActionDlg(vcl::Window* pParent, const SfxItemSet* pAttr, ::sd::View const * pView);
+ SdActionDlg(weld::Window* pParent, const SfxItemSet* pAttr, ::sd::View const * pView);
};
/**