Kaydet (Commit) 8bc23968 authored tarafından Caolán McNamara's avatar Caolán McNamara

weld SdActionDlg

Change-Id: I2d43c1fc65e8cfed1e252e1a16c37b907ec9f319
Reviewed-on: https://gerrit.libreoffice.org/69180
Tested-by: Jenkins
Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst 33a3d806
...@@ -185,7 +185,7 @@ public: ...@@ -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<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<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<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<AbstractSdVectorizeDlg> CreateSdVectorizeDlg(weld::Window* pParent, const Bitmap& rBmp, ::sd::DrawDocShell* pDocShell) = 0;
virtual VclPtr<AbstractSdPublishingDlg> CreateSdPublishingDlg( vcl::Window* pWindow, DocumentType eDocType) = 0; virtual VclPtr<AbstractSdPublishingDlg> CreateSdPublishingDlg( vcl::Window* pWindow, DocumentType eDocType) = 0;
......
...@@ -532,7 +532,7 @@ VclPtr<VclAbstractDialog> SdDialogsTest::createDialogByID(sal_uInt32 nID) ...@@ -532,7 +532,7 @@ VclPtr<VclAbstractDialog> SdDialogsTest::createDialogByID(sal_uInt32 nID)
aSet.Put(SfxBoolItem(ATTR_ACTION_SOUNDON, false)); aSet.Put(SfxBoolItem(ATTR_ACTION_SOUNDON, false));
aSet.Put(SfxBoolItem(ATTR_ACTION_PLAYFULL, false)); aSet.Put(SfxBoolItem(ATTR_ACTION_PLAYFULL, false));
pRetval = getSdAbstractDialogFactory()->CreatSdActionDialog( pRetval = getSdAbstractDialogFactory()->CreatSdActionDialog(
getViewShell()->GetActiveWindow(), getViewShell()->GetFrameWeld(),
&aSet, &aSet,
getDrawView()); getDrawView());
break; break;
......
...@@ -109,7 +109,10 @@ short AbstractSdPresLayoutDlg_Impl::Execute() ...@@ -109,7 +109,10 @@ short AbstractSdPresLayoutDlg_Impl::Execute()
return m_xDlg->run(); return m_xDlg->run();
} }
IMPL_ABSTDLG_BASE(SdAbstractSfxDialog_Impl); short SdAbstractSfxDialog_Impl::Execute()
{
return m_xDlg->run();
}
short AbstractSdVectorizeDlg_Impl::Execute() short AbstractSdVectorizeDlg_Impl::Execute()
{ {
...@@ -342,12 +345,12 @@ void AbstractSdPresLayoutDlg_Impl::GetAttr( SfxItemSet& rOutAttrs ) ...@@ -342,12 +345,12 @@ void AbstractSdPresLayoutDlg_Impl::GetAttr( SfxItemSet& rOutAttrs )
const SfxItemSet* SdAbstractSfxDialog_Impl::GetOutputItemSet() const const SfxItemSet* SdAbstractSfxDialog_Impl::GetOutputItemSet() const
{ {
return pDlg->GetOutputItemSet(); return m_xDlg->GetOutputItemSet();
} }
void SdAbstractSfxDialog_Impl::SetText( const OUString& rStr ) void SdAbstractSfxDialog_Impl::SetText( const OUString& rStr )
{ {
pDlg->SetText( rStr ); m_xDlg->set_title(rStr);
} }
const GDIMetaFile& AbstractSdVectorizeDlg_Impl::GetGDIMetaFile() const const GDIMetaFile& AbstractSdVectorizeDlg_Impl::GetGDIMetaFile() const
...@@ -455,9 +458,9 @@ VclPtr<SfxAbstractTabDialog> SdAbstractDialogFactory_Impl::CreateSdTabTemplateD ...@@ -455,9 +458,9 @@ VclPtr<SfxAbstractTabDialog> SdAbstractDialogFactory_Impl::CreateSdTabTemplateD
return VclPtr<SdAbstractTabController_Impl>::Create(std::make_unique<SdTabTemplateDlg>(pParent, pDocShell, rStyleBase, pModel, pView)); 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) VclPtr<AbstractSdVectorizeDlg> SdAbstractDialogFactory_Impl::CreateSdVectorizeDlg(weld::Window* pParent, const Bitmap& rBmp, ::sd::DrawDocShell* pDocShell)
......
...@@ -292,9 +292,16 @@ public: ...@@ -292,9 +292,16 @@ public:
class SdAbstractSfxDialog_Impl : public SfxAbstractDialog 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 const SfxItemSet* GetOutputItemSet() const override;
virtual void SetText( const OUString& rStr ) override; virtual void SetText( const OUString& rStr ) override;
}; };
class SdVectorizeDlg; class SdVectorizeDlg;
...@@ -348,7 +355,7 @@ public: ...@@ -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<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<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<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<AbstractSdVectorizeDlg> CreateSdVectorizeDlg(weld::Window* pParent, const Bitmap& rBmp, ::sd::DrawDocShell* pDocShell) override;
virtual VclPtr<AbstractSdPublishingDlg> CreateSdPublishingDlg(vcl::Window* pWindow, DocumentType eDocType) override; virtual VclPtr<AbstractSdPublishingDlg> CreateSdPublishingDlg(vcl::Window* pWindow, DocumentType eDocType) override;
......
...@@ -74,20 +74,19 @@ using namespace com::sun::star::lang; ...@@ -74,20 +74,19 @@ using namespace com::sun::star::lang;
/** /**
* Constructor of the Tab dialog: appends the pages to the dialog * Constructor of the Tab dialog: appends the pages to the dialog
*/ */
SdActionDlg::SdActionDlg ( SdActionDlg::SdActionDlg(weld::Window* pParent, const SfxItemSet* pAttr, ::sd::View const * pView)
vcl::Window* pParent, const SfxItemSet* pAttr, ::sd::View const * pView ) : SfxSingleTabDialogController(pParent, *pAttr, "modules/simpress/ui/interactiondialog.ui",
: SfxSingleTabDialog(pParent, *pAttr, "InteractionDialog", "InteractionDialog")
"modules/simpress/ui/interactiondialog.ui")
, rOutAttrs(*pAttr) , rOutAttrs(*pAttr)
{ {
VclPtr<SfxTabPage> pNewPage = SdTPAction::Create(get_content_area(), rOutAttrs); TabPageParent aParent(get_content_area(), this);
assert(pNewPage); //Unable to create page VclPtr<SfxTabPage> xNewPage = SdTPAction::Create(aParent, rOutAttrs);
// formerly in PageCreated // formerly in PageCreated
static_cast<SdTPAction*>( pNewPage.get() )->SetView( pView ); static_cast<SdTPAction*>( xNewPage.get() )->SetView( pView );
static_cast<SdTPAction*>( pNewPage.get() )->Construct(); static_cast<SdTPAction*>( xNewPage.get() )->Construct();
SetTabPage( pNewPage ); SetTabPage(xNewPage);
} }
/** /**
......
...@@ -446,7 +446,7 @@ void FuObjectAnimationParameters::DoExecute( SfxRequest& rReq ) ...@@ -446,7 +446,7 @@ void FuObjectAnimationParameters::DoExecute( SfxRequest& rReq )
aSet.Put(SfxBoolItem(ATTR_ACTION_PLAYFULL, false)); aSet.Put(SfxBoolItem(ATTR_ACTION_PLAYFULL, false));
SdAbstractDialogFactory* pFact = SdAbstractDialogFactory::Create(); 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(); short nResult = pDlg->Execute();
......
...@@ -37,12 +37,12 @@ class SdDrawDocument; ...@@ -37,12 +37,12 @@ class SdDrawDocument;
/** /**
* Effect-SingleTab-Dialog * Effect-SingleTab-Dialog
*/ */
class SdActionDlg : public SfxSingleTabDialog class SdActionDlg : public SfxSingleTabDialogController
{ {
private: private:
const SfxItemSet& rOutAttrs; const SfxItemSet& rOutAttrs;
public: public:
SdActionDlg(vcl::Window* pParent, const SfxItemSet* pAttr, ::sd::View const * pView); SdActionDlg(weld::Window* pParent, const SfxItemSet* pAttr, ::sd::View const * pView);
}; };
/** /**
......
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.18.3 --> <!-- Generated with glade 3.22.1 -->
<interface domain="sd"> <interface domain="sd">
<requires lib="gtk+" version="3.18"/> <requires lib="gtk+" version="3.18"/>
<object class="GtkDialog" id="InteractionDialog"> <object class="GtkDialog" id="InteractionDialog">
<property name="can_focus">False</property> <property name="can_focus">False</property>
<property name="border_width">6</property> <property name="border_width">6</property>
<property name="title" translatable="yes" context="interactiondialog|InteractionDialog">Interaction</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> <property name="type_hint">dialog</property>
<child>
<placeholder/>
</child>
<child internal-child="vbox"> <child internal-child="vbox">
<object class="GtkBox" id="dialog-vbox1"> <object class="GtkBox" id="dialog-vbox1">
<property name="can_focus">False</property> <property name="can_focus">False</property>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment