summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2018-09-09 17:17:44 +0100
committerCaolán McNamara <caolanm@redhat.com>2018-09-09 22:27:55 +0200
commit9ae23dfae84fa6d1e8fd6bfb4fe16ff1d47a1e97 (patch)
tree9f08d635cef46fef4979c7c54a2f8e79c40fa56b
parentc8610e24baaa0788f74acadcf6db1a00856f0d3a (diff)
weld SvxAreaTabDialog
Change-Id: Ia6ec954c6d0117fddc17432301ddeda3b26bbc8e Reviewed-on: https://gerrit.libreoffice.org/60222 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r--chart2/source/controller/main/ShapeController.cxx4
-rw-r--r--cui/source/factory/dlgfact.cxx28
-rw-r--r--cui/source/factory/dlgfact.hxx31
-rw-r--r--cui/source/inc/cuitabarea.hxx12
-rw-r--r--cui/source/tabpages/tabarea.cxx65
-rw-r--r--cui/source/tabpages/tpshadow.cxx3
-rw-r--r--cui/uiconfig/ui/areadialog.ui107
-rw-r--r--cui/uiconfig/ui/shadowtabpage.ui4
-rw-r--r--cui/uiconfig/ui/transparencytabpage.ui2
-rw-r--r--include/svx/svxdlg.hxx8
-rw-r--r--reportdesign/source/ui/misc/UITools.cxx4
-rw-r--r--sc/source/ui/drawfunc/drawsh.cxx3
-rw-r--r--sd/source/ui/func/fuarea.cxx4
-rw-r--r--sw/source/uibase/shells/drawdlg.cxx2
14 files changed, 183 insertions, 94 deletions
diff --git a/chart2/source/controller/main/ShapeController.cxx b/chart2/source/controller/main/ShapeController.cxx
index 875ba6bcf947..f6e7c0db1106 100644
--- a/chart2/source/controller/main/ShapeController.cxx
+++ b/chart2/source/controller/main/ShapeController.cxx
@@ -292,7 +292,7 @@ void ShapeController::executeDispatch_FormatArea()
}
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
ScopedVclPtr< AbstractSvxAreaTabDialog > pDlg(
- pFact->CreateSvxAreaTabDialog( pChartWindow, &aAttr, &pDrawModelWrapper->getSdrModel(), true ) );
+ pFact->CreateSvxAreaTabDialog(pChartWindow->GetFrameWeld(), &aAttr, &pDrawModelWrapper->getSdrModel(), true));
if ( pDlg->Execute() == RET_OK )
{
const SfxItemSet* pOutAttr = pDlg->GetOutputItemSet();
@@ -326,7 +326,7 @@ void ShapeController::executeDispatch_TextAttributes()
}
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
ScopedVclPtr< SfxAbstractTabDialog > pDlg(
- pFact->CreateTextTabDialog( pChartWindow ? pChartWindow->GetFrameWeld() : nullptr, &aAttr, pDrawViewWrapper ) );
+ pFact->CreateTextTabDialog(pChartWindow->GetFrameWeld(), &aAttr, pDrawViewWrapper));
if ( pDlg->Execute() == RET_OK )
{
const SfxItemSet* pOutAttr = pDlg->GetOutputItemSet();
diff --git a/cui/source/factory/dlgfact.cxx b/cui/source/factory/dlgfact.cxx
index 973a5ed3b26c..acd14fa0dd6d 100644
--- a/cui/source/factory/dlgfact.cxx
+++ b/cui/source/factory/dlgfact.cxx
@@ -180,7 +180,16 @@ short AbstractSvxPathSelectDialog_Impl::Execute()
IMPL_ABSTDLG_BASE(AbstractSvxHpLinkDlg_Impl);
IMPL_ABSTDLG_BASE(AbstractFmSearchDialog_Impl);
IMPL_ABSTDLG_BASE(AbstractGraphicFilterDialog_Impl);
-IMPL_ABSTDLG_BASE(AbstractSvxAreaTabDialog_Impl);
+
+short AbstractSvxAreaTabDialog_Impl::Execute()
+{
+ return m_xDlg->execute();
+}
+
+bool AbstractSvxAreaTabDialog_Impl::StartExecuteAsync(AsyncContext &rCtx)
+{
+ return SfxTabDialogController::runAsync(m_xDlg, rCtx.maEndDialogFn);
+}
short AbstractPasteDialog_Impl::Execute()
{
@@ -798,27 +807,27 @@ Graphic AbstractGraphicFilterDialog_Impl::GetFilteredGraphic( const Graphic& rGr
// AbstractSvxAreaTabDialog implementations just forwards everything to the dialog
void AbstractSvxAreaTabDialog_Impl::SetCurPageId( const OString& rName )
{
- pDlg->SetCurPageId( rName );
+ m_xDlg->SetCurPageId( rName );
}
const SfxItemSet* AbstractSvxAreaTabDialog_Impl::GetOutputItemSet() const
{
- return pDlg->GetOutputItemSet();
+ return m_xDlg->GetOutputItemSet();
}
const sal_uInt16* AbstractSvxAreaTabDialog_Impl::GetInputRanges(const SfxItemPool& pItem )
{
- return pDlg->GetInputRanges( pItem );
+ return m_xDlg->GetInputRanges( pItem );
}
void AbstractSvxAreaTabDialog_Impl::SetInputSet( const SfxItemSet* pInSet )
{
- pDlg->SetInputSet( pInSet );
+ m_xDlg->SetInputSet( pInSet );
}
-//From class Window.
+
void AbstractSvxAreaTabDialog_Impl::SetText( const OUString& rStr )
{
- pDlg->SetText( rStr );
+ m_xDlg->set_title(rStr);
}
void AbstractSvxPostItDialog_Impl::SetText( const OUString& rStr )
@@ -1293,13 +1302,12 @@ VclPtr<AbstractGraphicFilterDialog> AbstractDialogFactory_Impl::CreateGraphicFil
return VclPtr<AbstractGraphicFilterDialog_Impl>::Create( pDlg );
}
-VclPtr<AbstractSvxAreaTabDialog> AbstractDialogFactory_Impl::CreateSvxAreaTabDialog( vcl::Window* pParent,
+VclPtr<AbstractSvxAreaTabDialog> AbstractDialogFactory_Impl::CreateSvxAreaTabDialog(weld::Window* pParent,
const SfxItemSet* pAttr,
SdrModel* pModel,
bool bShadow)
{
- VclPtrInstance<SvxAreaTabDialog> pDlg( pParent, pAttr, pModel, bShadow );
- return VclPtr<AbstractSvxAreaTabDialog_Impl>::Create( pDlg );
+ return VclPtr<AbstractSvxAreaTabDialog_Impl>::Create(o3tl::make_unique<SvxAreaTabDialog>(pParent, pAttr, pModel, bShadow));
}
VclPtr<SfxAbstractTabDialog> AbstractDialogFactory_Impl::CreateSvxLineTabDialog( vcl::Window* pParent, const SfxItemSet* pAttr, //add forSvxLineTabDialog
diff --git a/cui/source/factory/dlgfact.hxx b/cui/source/factory/dlgfact.hxx
index bfe749ba4142..c7595fdf0566 100644
--- a/cui/source/factory/dlgfact.hxx
+++ b/cui/source/factory/dlgfact.hxx
@@ -468,15 +468,22 @@ class AbstractGraphicFilterDialog_Impl :public AbstractGraphicFilterDialog
};
class SvxAreaTabDialog;
-class AbstractSvxAreaTabDialog_Impl :public AbstractSvxAreaTabDialog
+class AbstractSvxAreaTabDialog_Impl : public AbstractSvxAreaTabDialog
{
- DECL_ABSTDLG_BASE(AbstractSvxAreaTabDialog_Impl,SvxAreaTabDialog)
- virtual void SetCurPageId( const OString& rName ) override;
- virtual const SfxItemSet* GetOutputItemSet() const override;
- virtual const sal_uInt16* GetInputRanges( const SfxItemPool& pItem ) override;
- virtual void SetInputSet( const SfxItemSet* pInSet ) override;
- // From class Window.
- virtual void SetText( const OUString& rStr ) override;
+protected:
+ std::shared_ptr<SvxAreaTabDialog> m_xDlg;
+public:
+ explicit AbstractSvxAreaTabDialog_Impl(std::unique_ptr<SvxAreaTabDialog> p)
+ : m_xDlg(std::move(p))
+ {
+ }
+ virtual short Execute() override;
+ virtual bool StartExecuteAsync(AsyncContext &rCtx) override;
+ virtual void SetCurPageId(const OString& rName) override;
+ virtual const SfxItemSet* GetOutputItemSet() const override;
+ virtual const sal_uInt16* GetInputRanges(const SfxItemPool& pItem) override;
+ virtual void SetInputSet(const SfxItemSet* pInSet) override;
+ virtual void SetText(const OUString& rStr) override;
};
class AbstractInsertObjectDialog_Impl : public SfxAbstractInsertObjectDialog
@@ -737,10 +744,10 @@ public:
const Graphic& rGraphic) override;
virtual VclPtr<AbstractGraphicFilterDialog> CreateGraphicFilterMosaic (vcl::Window* pParent,
const Graphic& rGraphic) override;
- virtual VclPtr<AbstractSvxAreaTabDialog> CreateSvxAreaTabDialog( vcl::Window* pParent,
- const SfxItemSet* pAttr,
- SdrModel* pModel,
- bool bShadow ) override;
+ virtual VclPtr<AbstractSvxAreaTabDialog> CreateSvxAreaTabDialog(weld::Window* pParent,
+ const SfxItemSet* pAttr,
+ SdrModel* pModel,
+ bool bShadow) override;
virtual VclPtr<SfxAbstractTabDialog> CreateSvxLineTabDialog( vcl::Window* pParent, const SfxItemSet* pAttr,
SdrModel* pModel,
const SdrObject* pObj,
diff --git a/cui/source/inc/cuitabarea.hxx b/cui/source/inc/cuitabarea.hxx
index 64fbb0316230..4681de332251 100644
--- a/cui/source/inc/cuitabarea.hxx
+++ b/cui/source/inc/cuitabarea.hxx
@@ -95,12 +95,8 @@ enum class PageType
Transparence,
};
-class SvxAreaTabDialog final : public SfxTabDialog
+class SvxAreaTabDialog final : public SfxTabDialogController
{
- sal_uInt16 m_nAreaTabPage;
- sal_uInt16 m_nShadowTabPage;
- sal_uInt16 m_nTransparenceTabPage;
-
SdrModel* mpDrawModel;
XColorListRef mpColorList;
@@ -120,14 +116,14 @@ class SvxAreaTabDialog final : public SfxTabDialog
ChangeType mnGradientListState;
ChangeType mnHatchingListState;
- virtual void PageCreated( sal_uInt16 nId, SfxTabPage &rPage ) override;
+ virtual void PageCreated(const OString& rId, SfxTabPage &rPage) override;
virtual short Ok() override;
- DECL_LINK( CancelHdlImpl, Button*, void );
+ DECL_LINK(CancelHdlImpl, weld::Button&, void);
void SavePalettes();
public:
- SvxAreaTabDialog( vcl::Window* pParent, const SfxItemSet* pAttr, SdrModel* pModel, bool bShadow );
+ SvxAreaTabDialog(weld::Window* pParent, const SfxItemSet* pAttr, SdrModel* pModel, bool bShadow);
void SetNewColorList( XColorListRef const & pColorList )
{ mpNewColorList = pColorList; }
diff --git a/cui/source/tabpages/tabarea.cxx b/cui/source/tabpages/tabarea.cxx
index 6d6bbb8ded65..ea4dac6518c6 100644
--- a/cui/source/tabpages/tabarea.cxx
+++ b/cui/source/tabpages/tabarea.cxx
@@ -34,18 +34,12 @@
SvxAreaTabDialog::SvxAreaTabDialog
(
- vcl::Window* pParent,
+ weld::Window* pParent,
const SfxItemSet* pAttr,
SdrModel* pModel,
bool bShadow
)
- : SfxTabDialog( pParent,
- "AreaDialog",
- "cui/ui/areadialog.ui",
- pAttr )
- , m_nAreaTabPage(0)
- , m_nShadowTabPage(0)
- , m_nTransparenceTabPage(0)
+ : SfxTabDialogController(pParent, "cui/ui/areadialog.ui", "AreaDialog", pAttr)
, mpDrawModel ( pModel ),
mpColorList ( pModel->GetColorList() ),
mpNewColorList ( pModel->GetColorList() ),
@@ -64,21 +58,21 @@ SvxAreaTabDialog::SvxAreaTabDialog
mnGradientListState ( ChangeType::NONE ),
mnHatchingListState ( ChangeType::NONE )
{
- m_nAreaTabPage = AddTabPage( "RID_SVXPAGE_AREA", SvxAreaTabPage::Create, nullptr );
+ AddTabPage("RID_SVXPAGE_AREA", SvxAreaTabPage::Create, nullptr);
- if(bShadow)
+ if (bShadow)
{
- m_nShadowTabPage = AddTabPage( "RID_SVXPAGE_SHADOW", SvxShadowTabPage::Create, nullptr );
+ AddTabPage("RID_SVXPAGE_SHADOW", SvxShadowTabPage::Create, nullptr);
}
else
{
RemoveTabPage( "RID_SVXPAGE_SHADOW" );
}
- m_nTransparenceTabPage = AddTabPage( "RID_SVXPAGE_TRANSPARENCE", SvxTransparenceTabPage::Create, nullptr);
+ AddTabPage( "RID_SVXPAGE_TRANSPARENCE", SvxTransparenceTabPage::Create, nullptr);
- CancelButton& rBtnCancel = GetCancelButton();
- rBtnCancel.SetClickHdl( LINK( this, SvxAreaTabDialog, CancelHdlImpl ) );
+ weld::Button& rBtnCancel = GetCancelButton();
+ rBtnCancel.connect_clicked(LINK(this, SvxAreaTabDialog, CancelHdlImpl));
}
void SvxAreaTabDialog::SavePalettes()
@@ -221,40 +215,39 @@ short SvxAreaTabDialog::Ok()
// RET_OK is returned, if at least one
// TabPage returns sal_True in FillItemSet().
// This happens by default at the moment.
- return SfxTabDialog::Ok();
+ return SfxTabDialogController::Ok();
}
-
-IMPL_LINK_NOARG(SvxAreaTabDialog, CancelHdlImpl, Button*, void)
+IMPL_LINK_NOARG(SvxAreaTabDialog, CancelHdlImpl, weld::Button&, void)
{
SavePalettes();
- EndDialog();
+ m_xDialog->response(RET_CANCEL);
}
-void SvxAreaTabDialog::PageCreated( sal_uInt16 nId, SfxTabPage &rPage )
+void SvxAreaTabDialog::PageCreated(const OString& rId, SfxTabPage &rPage)
{
- if (nId == m_nAreaTabPage )
+ if (rId == "RID_SVXPAGE_AREA")
{
- static_cast<SvxAreaTabPage&>(rPage).SetColorList( mpColorList );
- static_cast<SvxAreaTabPage&>(rPage).SetGradientList( mpGradientList );
- static_cast<SvxAreaTabPage&>(rPage).SetHatchingList( mpHatchingList );
- static_cast<SvxAreaTabPage&>(rPage).SetBitmapList( mpBitmapList );
- static_cast<SvxAreaTabPage&>(rPage).SetPatternList( mpPatternList );
- static_cast<SvxAreaTabPage&>(rPage).SetGrdChgd( &mnGradientListState );
- static_cast<SvxAreaTabPage&>(rPage).SetHtchChgd( &mnHatchingListState );
- static_cast<SvxAreaTabPage&>(rPage).SetBmpChgd( &mnBitmapListState );
- static_cast<SvxAreaTabPage&>(rPage).SetPtrnChgd( &mnPatternListState );
- static_cast<SvxAreaTabPage&>(rPage).SetColorChgd( &mnColorListState );
+ static_cast<SvxAreaTabPage&>(rPage).SetColorList( mpColorList );
+ static_cast<SvxAreaTabPage&>(rPage).SetGradientList( mpGradientList );
+ static_cast<SvxAreaTabPage&>(rPage).SetHatchingList( mpHatchingList );
+ static_cast<SvxAreaTabPage&>(rPage).SetBitmapList( mpBitmapList );
+ static_cast<SvxAreaTabPage&>(rPage).SetPatternList( mpPatternList );
+ static_cast<SvxAreaTabPage&>(rPage).SetGrdChgd( &mnGradientListState );
+ static_cast<SvxAreaTabPage&>(rPage).SetHtchChgd( &mnHatchingListState );
+ static_cast<SvxAreaTabPage&>(rPage).SetBmpChgd( &mnBitmapListState );
+ static_cast<SvxAreaTabPage&>(rPage).SetPtrnChgd( &mnPatternListState );
+ static_cast<SvxAreaTabPage&>(rPage).SetColorChgd( &mnColorListState );
}
- else if (nId == m_nShadowTabPage)
+ else if (rId == "RID_SVXPAGE_SHADOW")
{
- static_cast<SvxShadowTabPage&>(rPage).SetColorList( mpColorList );
- static_cast<SvxShadowTabPage&>(rPage).SetColorChgd( &mnColorListState );
+ static_cast<SvxShadowTabPage&>(rPage).SetColorList( mpColorList );
+ static_cast<SvxShadowTabPage&>(rPage).SetColorChgd( &mnColorListState );
}
- else if (nId == m_nTransparenceTabPage)
+ else if (rId == "RID_SVXPAGE_TRANSPARENCE")
{
- static_cast<SvxTransparenceTabPage&>(rPage).SetPageType( PageType::Area );
- static_cast<SvxTransparenceTabPage&>(rPage).SetDlgType( 0 );
+ static_cast<SvxTransparenceTabPage&>(rPage).SetPageType( PageType::Area );
+ static_cast<SvxTransparenceTabPage&>(rPage).SetDlgType( 0 );
}
}
diff --git a/cui/source/tabpages/tpshadow.cxx b/cui/source/tabpages/tpshadow.cxx
index 3b2ac0b04b64..ee81f915c2a8 100644
--- a/cui/source/tabpages/tpshadow.cxx
+++ b/cui/source/tabpages/tpshadow.cxx
@@ -416,7 +416,6 @@ void SvxShadowTabPage::Reset( const SfxItemSet* rAttrs )
ModifyShadowHdl_Impl(*m_xMtrTransparent);
}
-
VclPtr<SfxTabPage> SvxShadowTabPage::Create( TabPageParent pParent,
const SfxItemSet* rAttrs )
{
@@ -428,10 +427,12 @@ IMPL_LINK_NOARG(SvxShadowTabPage, ClickShadowHdl_Impl, weld::ToggleButton&, void
if (m_xTsbShowShadow->get_state() == TRISTATE_FALSE)
{
m_xGridShadow->set_sensitive(false);
+ m_xCtlPosition->set_sensitive(false);
}
else
{
m_xGridShadow->set_sensitive(true);
+ m_xCtlPosition->set_sensitive(true);
}
m_aCtlPosition.Invalidate();
ModifyShadowHdl_Impl(*m_xMtrTransparent);
diff --git a/cui/uiconfig/ui/areadialog.ui b/cui/uiconfig/ui/areadialog.ui
index a65b644e8efb..e768dd40ed62 100644
--- a/cui/uiconfig/ui/areadialog.ui
+++ b/cui/uiconfig/ui/areadialog.ui
@@ -1,13 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!-- Generated with glade 3.20.0 -->
+<!-- Generated with glade 3.22.1 -->
<interface domain="cui">
<requires lib="gtk+" version="3.18"/>
<object class="GtkDialog" id="AreaDialog">
<property name="can_focus">False</property>
<property name="border_width">6</property>
<property name="title" translatable="yes" context="areadialog|AreaDialog">Area</property>
- <property name="resizable">False</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>
@@ -18,12 +23,10 @@
<property name="can_focus">False</property>
<property name="layout_style">end</property>
<child>
- <object class="GtkButton" id="ok">
- <property name="label">gtk-ok</property>
+ <object class="GtkButton" id="reset">
+ <property name="label">gtk-revert-to-saved</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="can_default">True</property>
- <property name="has_default">True</property>
<property name="receives_default">True</property>
<property name="use_stock">True</property>
</object>
@@ -34,10 +37,12 @@
</packing>
</child>
<child>
- <object class="GtkButton" id="cancel">
- <property name="label">gtk-cancel</property>
+ <object class="GtkButton" id="ok">
+ <property name="label">gtk-ok</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
+ <property name="can_default">True</property>
+ <property name="has_default">True</property>
<property name="receives_default">True</property>
<property name="use_stock">True</property>
</object>
@@ -48,8 +53,8 @@
</packing>
</child>
<child>
- <object class="GtkButton" id="help">
- <property name="label">gtk-help</property>
+ <object class="GtkButton" id="cancel">
+ <property name="label">gtk-cancel</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
@@ -59,12 +64,11 @@
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">2</property>
- <property name="secondary">True</property>
</packing>
</child>
<child>
- <object class="GtkButton" id="reset">
- <property name="label">gtk-revert-to-saved</property>
+ <object class="GtkButton" id="help">
+ <property name="label">gtk-help</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
@@ -74,6 +78,7 @@
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">3</property>
+ <property name="secondary">True</property>
</packing>
</child>
</object>
@@ -87,7 +92,7 @@
<child>
<object class="GtkNotebook" id="tabcontrol">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can_focus">True</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
<child>
@@ -97,6 +102,30 @@
<child>
<placeholder/>
</child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
</object>
</child>
<child type="tab">
@@ -116,6 +145,30 @@
<child>
<placeholder/>
</child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
</object>
<packing>
<property name="position">1</property>
@@ -139,6 +192,30 @@
<child>
<placeholder/>
</child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
</object>
<packing>
<property name="position">2</property>
@@ -165,10 +242,10 @@
</object>
</child>
<action-widgets>
+ <action-widget response="0">reset</action-widget>
<action-widget response="-5">ok</action-widget>
<action-widget response="-6">cancel</action-widget>
<action-widget response="-11">help</action-widget>
- <action-widget response="0">reset</action-widget>
</action-widgets>
</object>
</interface>
diff --git a/cui/uiconfig/ui/shadowtabpage.ui b/cui/uiconfig/ui/shadowtabpage.ui
index 0cab81237044..1be868085bd6 100644
--- a/cui/uiconfig/ui/shadowtabpage.ui
+++ b/cui/uiconfig/ui/shadowtabpage.ui
@@ -2,7 +2,6 @@
<!-- Generated with glade 3.22.1 -->
<interface domain="cui">
<requires lib="gtk+" version="3.18"/>
- <requires lib="LibreOffice" version="1.0"/>
<object class="GtkAdjustment" id="adjustmentDistance">
<property name="upper">999</property>
<property name="step_increment">1</property>
@@ -16,6 +15,9 @@
<object class="GtkFrame" id="ShadowTabPage">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="valign">start</property>
+ <property name="hexpand">True</property>
+ <property name="vexpand">True</property>
<property name="border_width">6</property>
<property name="label_xalign">0</property>
<property name="shadow_type">none</property>
diff --git a/cui/uiconfig/ui/transparencytabpage.ui b/cui/uiconfig/ui/transparencytabpage.ui
index 4961059ec762..491b2f9ac965 100644
--- a/cui/uiconfig/ui/transparencytabpage.ui
+++ b/cui/uiconfig/ui/transparencytabpage.ui
@@ -40,7 +40,9 @@
<object class="GtkFrame" id="TransparencyTabPage">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="valign">start</property>
<property name="hexpand">True</property>
+ <property name="vexpand">True</property>
<property name="border_width">6</property>
<property name="label_xalign">0</property>
<property name="shadow_type">none</property>
diff --git a/include/svx/svxdlg.hxx b/include/svx/svxdlg.hxx
index c41d83e7a696..a5f62832db28 100644
--- a/include/svx/svxdlg.hxx
+++ b/include/svx/svxdlg.hxx
@@ -426,10 +426,10 @@ public:
const Graphic& rGraphic)=0;
virtual VclPtr<AbstractGraphicFilterDialog> CreateGraphicFilterMosaic (vcl::Window* pParent,
const Graphic& rGraphic)=0;
- virtual VclPtr<AbstractSvxAreaTabDialog> CreateSvxAreaTabDialog( vcl::Window* pParent,
- const SfxItemSet* pAttr,
- SdrModel* pModel,
- bool bShadow) = 0 ;
+ virtual VclPtr<AbstractSvxAreaTabDialog> CreateSvxAreaTabDialog(weld::Window* pParent,
+ const SfxItemSet* pAttr,
+ SdrModel* pModel,
+ bool bShadow) = 0 ;
virtual VclPtr<SfxAbstractTabDialog> CreateSvxLineTabDialog( vcl::Window* pParent, const SfxItemSet* pAttr, //add forSvxLineTabDialog
SdrModel* pModel,
const SdrObject* pObj,
diff --git a/reportdesign/source/ui/misc/UITools.cxx b/reportdesign/source/ui/misc/UITools.cxx
index f2ac0ebaf328..ee453e217c60 100644
--- a/reportdesign/source/ui/misc/UITools.cxx
+++ b/reportdesign/source/ui/misc/UITools.cxx
@@ -743,7 +743,7 @@ bool openAreaDialog( const uno::Reference<report::XShape >& _xShape,const uno::R
std::shared_ptr<rptui::OReportModel> pModel = ::reportdesign::OReportDefinition::getSdrModel(_xShape->getSection()->getReportDefinition());
- VclPtr<vcl::Window> pParent = VCLUnoHelper::GetWindow( _rxParentWindow );
+ weld::Window* pParent = Application::GetFrameWeld(_rxParentWindow);
bool bSuccess = false;
try
@@ -754,7 +754,7 @@ bool openAreaDialog( const uno::Reference<report::XShape >& _xShape,const uno::R
{ // want the dialog to be destroyed before our set
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
- ScopedVclPtr<AbstractSvxAreaTabDialog> pDialog(pFact->CreateSvxAreaTabDialog( pParent,pDescriptor.get(),pModel.get(), true ));
+ ScopedVclPtr<AbstractSvxAreaTabDialog> pDialog(pFact->CreateSvxAreaTabDialog(pParent, pDescriptor.get(), pModel.get(), true));
if ( RET_OK == pDialog->Execute() )
{
bSuccess = true;
diff --git a/sc/source/ui/drawfunc/drawsh.cxx b/sc/source/ui/drawfunc/drawsh.cxx
index 5a301f2efe7c..4e0a84375818 100644
--- a/sc/source/ui/drawfunc/drawsh.cxx
+++ b/sc/source/ui/drawfunc/drawsh.cxx
@@ -415,8 +415,9 @@ void ScDrawShell::ExecuteAreaDlg( SfxRequest& rReq )
pView->MergeAttrFromMarked( aNewAttr, false );
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
+ vcl::Window* pWin = pViewData->GetDialogParent();
ScopedVclPtr<AbstractSvxAreaTabDialog> pDlg(pFact->CreateSvxAreaTabDialog(
- pViewData->GetDialogParent(), &aNewAttr,
+ pWin ? pWin->GetFrameWeld() : nullptr, &aNewAttr,
pViewData->GetDocument()->GetDrawLayer(), true));
if ( pDlg->Execute() == RET_OK )
diff --git a/sd/source/ui/func/fuarea.cxx b/sd/source/ui/func/fuarea.cxx
index cb62202ea650..85eaef244991 100644
--- a/sd/source/ui/func/fuarea.cxx
+++ b/sd/source/ui/func/fuarea.cxx
@@ -61,7 +61,7 @@ void FuArea::DoExecute( SfxRequest& rReq )
mpView->GetAttributes( aNewAttr );
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
- VclPtr<AbstractSvxAreaTabDialog> pDlg( pFact->CreateSvxAreaTabDialog(mpViewShell->GetActiveWindow(), &aNewAttr, mpDoc, true) );
+ VclPtr<AbstractSvxAreaTabDialog> pDlg(pFact->CreateSvxAreaTabDialog(mpViewShell->GetFrameWeld(), &aNewAttr, mpDoc, true));
pDlg->StartExecuteAsync([=](sal_Int32 nResult){
if (nResult == RET_OK)
@@ -84,6 +84,8 @@ void FuArea::DoExecute( SfxRequest& rReq )
// deferred until the dialog ends
mpViewShell->Cancel();
+
+ pDlg->disposeOnce();
});
}
diff --git a/sw/source/uibase/shells/drawdlg.cxx b/sw/source/uibase/shells/drawdlg.cxx
index dc36accdc4b6..132568fc874e 100644
--- a/sw/source/uibase/shells/drawdlg.cxx
+++ b/sw/source/uibase/shells/drawdlg.cxx
@@ -92,7 +92,7 @@ void SwDrawShell::ExecDrawDlg(SfxRequest& rReq)
bool bHasMarked = pView->AreObjectsMarked();
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
- ScopedVclPtr<AbstractSvxAreaTabDialog> pDlg(pFact->CreateSvxAreaTabDialog( nullptr,
+ ScopedVclPtr<AbstractSvxAreaTabDialog> pDlg(pFact->CreateSvxAreaTabDialog(rReq.GetFrameWeld(),
&aNewAttr,
pDoc,
true));