summaryrefslogtreecommitdiffstats
path: root/sw/source/uibase/sidebar/PageFooterPanel.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/uibase/sidebar/PageFooterPanel.cxx')
-rw-r--r--sw/source/uibase/sidebar/PageFooterPanel.cxx22
1 files changed, 5 insertions, 17 deletions
diff --git a/sw/source/uibase/sidebar/PageFooterPanel.cxx b/sw/source/uibase/sidebar/PageFooterPanel.cxx
index 0cc1037a829f..c85969e29168 100644
--- a/sw/source/uibase/sidebar/PageFooterPanel.cxx
+++ b/sw/source/uibase/sidebar/PageFooterPanel.cxx
@@ -33,17 +33,13 @@
namespace sw::sidebar{
-VclPtr<PanelLayout> PageFooterPanel::Create(
- vcl::Window* pParent,
- const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rxFrame,
+std::unique_ptr<PanelLayout> PageFooterPanel::Create(
+ weld::Widget* pParent,
SfxBindings* pBindings)
{
if( pParent == nullptr )
throw ::com::sun::star::lang::IllegalArgumentException("no parent window given to PageFooterPanel::Create", nullptr, 0);
- if( !rxFrame.is() )
- throw ::com::sun::star::lang::IllegalArgumentException("no XFrame given to PageFooterPanel::Create", nullptr, 0);
-
- return VclPtr<PageFooterPanel>::Create(pParent, rxFrame, pBindings);
+ return std::make_unique<PageFooterPanel>(pParent, pBindings);
}
void PageFooterPanel::SetMarginsAndSpacingFieldUnit()
@@ -53,10 +49,9 @@ void PageFooterPanel::SetMarginsAndSpacingFieldUnit()
}
PageFooterPanel::PageFooterPanel(
- vcl::Window* pParent,
- const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rxFrame,
+ weld::Widget* pParent,
SfxBindings* pBindings) :
- PanelLayout(pParent, "PageFooterPanel", "modules/swriter/ui/pagefooterpanel.ui", rxFrame),
+ PanelLayout(pParent, "PageFooterPanel", "modules/swriter/ui/pagefooterpanel.ui"),
mpBindings( pBindings ),
maHFToggleController(SID_ATTR_PAGE_FOOTER, *pBindings, *this),
maMetricController(SID_ATTR_METRIC, *pBindings,*this),
@@ -80,19 +75,12 @@ PageFooterPanel::PageFooterPanel(
PageFooterPanel::~PageFooterPanel()
{
- disposeOnce();
-}
-
-void PageFooterPanel::dispose()
-{
mxFooterToggle.reset();
maMetricController.dispose();
mxFooterSpacingLB.reset();
mxFooterLayoutLB.reset();
mxFooterMarginPresetLB.reset();
mxCustomEntry.reset();
-
- PanelLayout::dispose();
}
FieldUnit PageFooterPanel::GetCurrentUnit(SfxItemState eState, const SfxPoolItem* pState)