summaryrefslogtreecommitdiffstats
path: root/sw/source/uibase/sidebar/ThemePanel.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/uibase/sidebar/ThemePanel.cxx')
-rw-r--r--sw/source/uibase/sidebar/ThemePanel.cxx21
1 files changed, 4 insertions, 17 deletions
diff --git a/sw/source/uibase/sidebar/ThemePanel.cxx b/sw/source/uibase/sidebar/ThemePanel.cxx
index 93ee7b557a84..3ff74fcdb016 100644
--- a/sw/source/uibase/sidebar/ThemePanel.cxx
+++ b/sw/source/uibase/sidebar/ThemePanel.cxx
@@ -397,20 +397,16 @@ BitmapEx GenerateColorPreview(const svx::ColorSet& rColorSet)
namespace sw::sidebar {
-VclPtr<PanelLayout> ThemePanel::Create (vcl::Window* pParent,
- const css::uno::Reference<css::frame::XFrame>& rxFrame)
+std::unique_ptr<PanelLayout> ThemePanel::Create(weld::Widget* pParent)
{
if (pParent == nullptr)
throw css::lang::IllegalArgumentException("no parent Window given to PagePropertyPanel::Create", nullptr, 0);
- if (!rxFrame.is())
- throw css::lang::IllegalArgumentException("no XFrame given to PagePropertyPanel::Create", nullptr, 1);
- return VclPtr<ThemePanel>::Create(pParent, rxFrame);
+ return std::make_unique<ThemePanel>(pParent);
}
-ThemePanel::ThemePanel(vcl::Window* pParent,
- const css::uno::Reference<css::frame::XFrame>& rxFrame)
- : PanelLayout(pParent, "ThemePanel", "modules/swriter/ui/sidebartheme.ui", rxFrame)
+ThemePanel::ThemePanel(weld::Widget* pParent)
+ : PanelLayout(pParent, "ThemePanel", "modules/swriter/ui/sidebartheme.ui")
, mxListBoxFonts(m_xBuilder->weld_tree_view("listbox_fonts"))
, mxValueSetColors(new ValueSet(nullptr))
, mxValueSetColorsWin(new weld::CustomWeld(*m_xBuilder, "valueset_colors", *mxValueSetColors))
@@ -447,23 +443,14 @@ ThemePanel::ThemePanel(vcl::Window* pParent,
if (!aColorSets.empty())
mxValueSetColors->SelectItem(1); // ItemId 1, position 0
-
- m_pInitialFocusWidget = mxListBoxFonts.get();
}
ThemePanel::~ThemePanel()
{
- disposeOnce();
-}
-
-void ThemePanel::dispose()
-{
mxListBoxFonts.reset();
mxValueSetColorsWin.reset();
mxValueSetColors.reset();
mxApplyButton.reset();
-
- PanelLayout::dispose();
}
IMPL_LINK_NOARG(ThemePanel, ClickHdl, weld::Button&, void)