summaryrefslogtreecommitdiffstats
path: root/svx/source/sidebar/styles
diff options
context:
space:
mode:
Diffstat (limited to 'svx/source/sidebar/styles')
-rw-r--r--svx/source/sidebar/styles/StylesPropertyPanel.cxx53
-rw-r--r--svx/source/sidebar/styles/StylesPropertyPanel.hxx34
2 files changed, 87 insertions, 0 deletions
diff --git a/svx/source/sidebar/styles/StylesPropertyPanel.cxx b/svx/source/sidebar/styles/StylesPropertyPanel.cxx
new file mode 100644
index 000000000..a583e0603
--- /dev/null
+++ b/svx/source/sidebar/styles/StylesPropertyPanel.cxx
@@ -0,0 +1,53 @@
+#include <sal/config.h>
+
+#include <com/sun/star/lang/IllegalArgumentException.hpp>
+
+#include "StylesPropertyPanel.hxx"
+
+using namespace css;
+using namespace css::uno;
+
+namespace svx::sidebar {
+
+VclPtr<vcl::Window> StylesPropertyPanel::Create (
+ vcl::Window* pParent,
+ const css::uno::Reference<css::frame::XFrame>& rxFrame)
+{
+ if (pParent == nullptr)
+ throw lang::IllegalArgumentException("no parent Window given to StylesPropertyPanel::Create", nullptr, 0);
+ if ( ! rxFrame.is())
+ throw lang::IllegalArgumentException("no XFrame given to StylesPropertyPanel::Create", nullptr, 1);
+
+ return VclPtr<StylesPropertyPanel>::Create(pParent,rxFrame);
+}
+
+StylesPropertyPanel::StylesPropertyPanel ( vcl::Window* pParent, const css::uno::Reference<css::frame::XFrame>& rxFrame )
+ : PanelLayout(pParent, "SidebarStylesPanel", "svx/ui/sidebarstylespanel.ui", rxFrame)
+ , m_xFontStyle(m_xBuilder->weld_toolbar("fontstyletoolbox"))
+ , m_xFontStyleDispatch(new ToolbarUnoDispatcher(*m_xFontStyle, *m_xBuilder, rxFrame))
+ , m_xStyle(m_xBuilder->weld_toolbar("style"))
+ , m_xStyleDispatch(new ToolbarUnoDispatcher(*m_xStyle, *m_xBuilder, rxFrame))
+{
+}
+
+StylesPropertyPanel::~StylesPropertyPanel()
+{
+ disposeOnce();
+}
+
+void StylesPropertyPanel::dispose()
+{
+ m_xStyleDispatch.reset();
+ m_xStyle.reset();
+ m_xFontStyleDispatch.reset();
+ m_xFontStyle.reset();
+
+ PanelLayout::dispose();
+}
+
+void StylesPropertyPanel::DataChanged( const DataChangedEvent& /*rEvent*/)
+{
+
+}
+
+}
diff --git a/svx/source/sidebar/styles/StylesPropertyPanel.hxx b/svx/source/sidebar/styles/StylesPropertyPanel.hxx
new file mode 100644
index 000000000..f9dd6b174
--- /dev/null
+++ b/svx/source/sidebar/styles/StylesPropertyPanel.hxx
@@ -0,0 +1,34 @@
+#pragma once
+
+#include <sfx2/sidebar/PanelLayout.hxx>
+#include <sfx2/weldutils.hxx>
+
+namespace svx::sidebar{
+
+class StylesPropertyPanel:
+ public PanelLayout
+{
+private:
+ std::unique_ptr<weld::Toolbar> m_xFontStyle;
+ std::unique_ptr<ToolbarUnoDispatcher> m_xFontStyleDispatch;
+
+ std::unique_ptr<weld::Toolbar> m_xStyle;
+ std::unique_ptr<ToolbarUnoDispatcher> m_xStyleDispatch;
+
+public:
+ virtual ~StylesPropertyPanel() override;
+
+ static VclPtr<vcl::Window> Create (
+ vcl::Window* pParent,
+ const css::uno::Reference<css::frame::XFrame>& rxFrame);
+
+ virtual void DataChanged( const DataChangedEvent& rEvent ) override;
+
+ virtual void dispose() override;
+
+ StylesPropertyPanel(
+ vcl::Window* pParent,
+ const css::uno::Reference<css::frame::XFrame>& rxFrame);
+};
+
+} //end of namespace svx::sidebar