nss: upgrade to release 3.73
[LibreOffice.git] / sw / source / uibase / sidebar / StylePresetsPanel.hxx
blob36b272a0875460d443f4fc63867857613db4a647
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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 */
11 #pragma once
13 #include <memory>
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>;
28 public:
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 {};
40 private:
41 struct TemplateEntry
43 explicit TemplateEntry(const OUString& rURL)
44 : maURL(rURL)
47 OUString maURL;
50 void RefreshList();
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: */