summaryrefslogtreecommitdiff
path: root/svx/source/sidebar/inspector/InspectorTextPanel.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'svx/source/sidebar/inspector/InspectorTextPanel.cxx')
-rw-r--r--svx/source/sidebar/inspector/InspectorTextPanel.cxx25
1 files changed, 5 insertions, 20 deletions
diff --git a/svx/source/sidebar/inspector/InspectorTextPanel.cxx b/svx/source/sidebar/inspector/InspectorTextPanel.cxx
index 9b13a90dec87..d5ad3adedea6 100644
--- a/svx/source/sidebar/inspector/InspectorTextPanel.cxx
+++ b/svx/source/sidebar/inspector/InspectorTextPanel.cxx
@@ -32,23 +32,16 @@ using namespace css;
namespace svx::sidebar
{
-VclPtr<vcl::Window>
-InspectorTextPanel::Create(vcl::Window* pParent,
- const css::uno::Reference<css::frame::XFrame>& rxFrame)
+std::unique_ptr<PanelLayout> InspectorTextPanel::Create(weld::Widget* pParent)
{
if (pParent == nullptr)
throw lang::IllegalArgumentException("no parent Window given to InspectorTextPanel::Create",
nullptr, 0);
- if (!rxFrame.is())
- throw lang::IllegalArgumentException("no XFrame given to InspectorTextPanel::Create",
- nullptr, 1);
-
- return VclPtr<InspectorTextPanel>::Create(pParent, rxFrame);
+ return std::make_unique<InspectorTextPanel>(pParent);
}
-InspectorTextPanel::InspectorTextPanel(vcl::Window* pParent,
- const css::uno::Reference<css::frame::XFrame>& rxFrame)
- : PanelLayout(pParent, "InspectorTextPanel", "svx/ui/inspectortextpanel.ui", rxFrame)
+InspectorTextPanel::InspectorTextPanel(weld::Widget* pParent)
+ : PanelLayout(pParent, "InspectorTextPanel", "svx/ui/inspectortextpanel.ui")
, mpListBoxStyles(m_xBuilder->weld_tree_view("listbox_fonts"))
{
mpListBoxStyles->set_size_request(-1, -1);
@@ -57,7 +50,6 @@ InspectorTextPanel::InspectorTextPanel(vcl::Window* pParent,
aWidths.push_back(fWidth * 34);
aWidths.push_back(fWidth * 34);
mpListBoxStyles->set_column_fixed_widths(aWidths);
- m_pInitialFocusWidget = mpListBoxStyles.get();
}
static bool GetPropertyValues(const OUString& rPropName, const uno::Any& rAny, OUString& rString)
@@ -157,14 +149,7 @@ void InspectorTextPanel::updateEntries(const std::vector<TreeNode>& rStore)
mpListBoxStyles->collapse_row(*pEntry); // Collapse "Default Paragraph Style"
}
-InspectorTextPanel::~InspectorTextPanel() { disposeOnce(); }
-
-void InspectorTextPanel::dispose()
-{
- mpListBoxStyles.reset();
-
- PanelLayout::dispose();
-}
+InspectorTextPanel::~InspectorTextPanel() {}
} // end of namespace svx::sidebar