1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 #include <sal/config.h>
11 #include <com/sun/star/lang/IllegalArgumentException.hpp>
13 #include "StylesPropertyPanel.hxx"
16 using namespace css::uno
;
18 namespace svx::sidebar
{
20 std::unique_ptr
<PanelLayout
> StylesPropertyPanel::Create (
21 weld::Widget
* pParent
,
22 const css::uno::Reference
<css::frame::XFrame
>& rxFrame
)
24 if (pParent
== nullptr)
25 throw lang::IllegalArgumentException("no parent Window given to StylesPropertyPanel::Create", nullptr, 0);
27 throw lang::IllegalArgumentException("no XFrame given to StylesPropertyPanel::Create", nullptr, 1);
29 return std::make_unique
<StylesPropertyPanel
>(pParent
, rxFrame
);
32 StylesPropertyPanel::StylesPropertyPanel(weld::Widget
* pParent
, const css::uno::Reference
<css::frame::XFrame
>& rxFrame
)
33 : PanelLayout(pParent
, "SidebarStylesPanel", "svx/ui/sidebarstylespanel.ui")
34 , m_xFontStyle(m_xBuilder
->weld_toolbar("fontstyletoolbox"))
35 , m_xFontStyleDispatch(new ToolbarUnoDispatcher(*m_xFontStyle
, *m_xBuilder
, rxFrame
))
36 , m_xStyle(m_xBuilder
->weld_toolbar("style"))
37 , m_xStyleDispatch(new ToolbarUnoDispatcher(*m_xStyle
, *m_xBuilder
, rxFrame
))
41 StylesPropertyPanel::~StylesPropertyPanel()
43 m_xStyleDispatch
.reset();
45 m_xFontStyleDispatch
.reset();
50 /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */