[Libreoffice-commits] core.git: sd/inc sd/qa sd/source sd/uiconfig
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Thu Mar 14 10:23:26 UTC 2019
sd/inc/sdabstdlg.hxx | 2 +-
sd/qa/unit/dialogs-test.cxx | 2 +-
sd/source/ui/dlg/sddlgfact.cxx | 13 ++++++++-----
sd/source/ui/dlg/sddlgfact.hxx | 13 ++++++++++---
sd/source/ui/dlg/tpaction.cxx | 17 ++++++++---------
sd/source/ui/func/fuoaprms.cxx | 2 +-
sd/source/ui/inc/tpaction.hxx | 4 ++--
sd/uiconfig/simpress/ui/interactiondialog.ui | 8 +++++++-
8 files changed, 38 insertions(+), 23 deletions(-)
New commits:
commit 8bc23968129fc38d70fb614668a411599d4e6d0e
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Wed Mar 13 14:17:22 2019 +0000
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Thu Mar 14 11:22:58 2019 +0100
weld SdActionDlg
Change-Id: I2d43c1fc65e8cfed1e252e1a16c37b907ec9f319
Reviewed-on: https://gerrit.libreoffice.org/69180
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/sd/inc/sdabstdlg.hxx b/sd/inc/sdabstdlg.hxx
index adb34590569c..5ecd310d54f8 100644
--- a/sd/inc/sdabstdlg.hxx
+++ b/sd/inc/sdabstdlg.hxx
@@ -185,7 +185,7 @@ public:
virtual VclPtr<SfxAbstractTabDialog> CreateSdPresLayoutTemplateDlg(SfxObjectShell* pDocSh, weld::Window* pParent, bool bBackgroundDlg, SfxStyleSheetBase& rStyleBase, PresentationObjects ePO, SfxStyleSheetBasePool* pSSPool) = 0;
virtual VclPtr<AbstractSdPresLayoutDlg> CreateSdPresLayoutDlg(weld::Window* pParent, ::sd::DrawDocShell* pDocShell, const SfxItemSet& rInAttrs) = 0;
virtual VclPtr<SfxAbstractTabDialog> CreateSdTabTemplateDlg(weld::Window* pParent, const SfxObjectShell* pDocShell, SfxStyleSheetBase& rStyleBase, SdrModel* pModel, SdrView* pView) = 0;
- virtual VclPtr<SfxAbstractDialog> CreatSdActionDialog(vcl::Window* pParent, const SfxItemSet* pAttr, ::sd::View* pView) = 0;
+ virtual VclPtr<SfxAbstractDialog> CreatSdActionDialog(weld::Window* pParent, const SfxItemSet* pAttr, ::sd::View* pView) = 0;
virtual VclPtr<AbstractSdVectorizeDlg> CreateSdVectorizeDlg(weld::Window* pParent, const Bitmap& rBmp, ::sd::DrawDocShell* pDocShell) = 0;
virtual VclPtr<AbstractSdPublishingDlg> CreateSdPublishingDlg( vcl::Window* pWindow, DocumentType eDocType) = 0;
diff --git a/sd/qa/unit/dialogs-test.cxx b/sd/qa/unit/dialogs-test.cxx
index 7a8ea154a8c2..1b114462584a 100644
--- a/sd/qa/unit/dialogs-test.cxx
+++ b/sd/qa/unit/dialogs-test.cxx
@@ -532,7 +532,7 @@ VclPtr<VclAbstractDialog> SdDialogsTest::createDialogByID(sal_uInt32 nID)
aSet.Put(SfxBoolItem(ATTR_ACTION_SOUNDON, false));
aSet.Put(SfxBoolItem(ATTR_ACTION_PLAYFULL, false));
pRetval = getSdAbstractDialogFactory()->CreatSdActionDialog(
- getViewShell()->GetActiveWindow(),
+ getViewShell()->GetFrameWeld(),
&aSet,
getDrawView());
break;
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);
};
/**
diff --git a/sd/uiconfig/simpress/ui/interactiondialog.ui b/sd/uiconfig/simpress/ui/interactiondialog.ui
index 8e3f0d2af5d5..a88a9010a526 100644
--- a/sd/uiconfig/simpress/ui/interactiondialog.ui
+++ b/sd/uiconfig/simpress/ui/interactiondialog.ui
@@ -1,12 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!-- Generated with glade 3.18.3 -->
+<!-- Generated with glade 3.22.1 -->
<interface domain="sd">
<requires lib="gtk+" version="3.18"/>
<object class="GtkDialog" id="InteractionDialog">
<property name="can_focus">False</property>
<property name="border_width">6</property>
<property name="title" translatable="yes" context="interactiondialog|InteractionDialog">Interaction</property>
+ <property name="modal">True</property>
+ <property name="default_width">0</property>
+ <property name="default_height">0</property>
<property name="type_hint">dialog</property>
+ <child>
+ <placeholder/>
+ </child>
<child internal-child="vbox">
<object class="GtkBox" id="dialog-vbox1">
<property name="can_focus">False</property>
More information about the Libreoffice-commits
mailing list