1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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/.
14 #include <com/sun/star/frame/XFrame.hpp>
16 #include <sfx2/sidebar/PanelLayout.hxx>
18 #include <sfx2/sidebar/ControllerItem.hxx>
20 #include <svtools/valueset.hxx>
22 namespace sw::sidebar
{
24 class StylePresetsPanel
: public PanelLayout
,
25 public sfx2::sidebar::ControllerItem::ItemUpdateReceiverInterface
27 friend class VclPtr
<StylePresetsPanel
>;
29 static VclPtr
<vcl::Window
> Create(vcl::Window
* pParent
,
30 const css::uno::Reference
<css::frame::XFrame
>& rxFrame
);
32 virtual void NotifyItemUpdate(const sal_uInt16 nSId
,
33 const SfxItemState eState
,
34 const SfxPoolItem
* pState
) override
;
36 virtual void GetControlState(
37 const sal_uInt16
/*nSId*/,
38 boost::property_tree::ptree
& /*rState*/) override
{};
43 explicit TemplateEntry(const OUString
& rURL
)
52 StylePresetsPanel(vcl::Window
* pParent
,
53 const css::uno::Reference
<css::frame::XFrame
>& rxFrame
);
55 virtual ~StylePresetsPanel() override
;
56 virtual void dispose() override
;
58 std::unique_ptr
<ValueSet
> mxValueSet
;
59 std::unique_ptr
<weld::CustomWeld
> mxValueSetWin
;
61 std::vector
<std::unique_ptr
<TemplateEntry
>> maTemplateEntries
;
63 DECL_LINK(DoubleClickHdl
, ValueSet
*, void);
66 } // end of namespace sw::sidebar
69 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */