LibreOffice Module sw (master)  1
StylePresetsPanel.hxx
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3  * This file is part of the LibreOffice project.
4  *
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/.
8  *
9  */
10 
11 #pragma once
12 
13 #include <memory>
14 #include <com/sun/star/frame/XFrame.hpp>
15 
17 
19 
20 #include <svtools/valueset.hxx>
21 
22 namespace sw::sidebar {
23 
26 {
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);
31 
32  virtual void NotifyItemUpdate(const sal_uInt16 nSId,
33  const SfxItemState eState,
34  const SfxPoolItem* pState) override;
35 
36  virtual void GetControlState(
37  const sal_uInt16 /*nSId*/,
38  boost::property_tree::ptree& /*rState*/) override {};
39 
40 private:
42  {
43  explicit TemplateEntry(const OUString& rURL)
44  : maURL(rURL)
45  {}
46 
47  OUString maURL;
48  };
49 
50  void RefreshList();
51 
53  const css::uno::Reference<css::frame::XFrame>& rxFrame);
54 
55  virtual ~StylePresetsPanel() override;
56  virtual void dispose() override;
57 
58  std::unique_ptr<ValueSet> mxValueSet;
59  std::unique_ptr<weld::CustomWeld> mxValueSetWin;
60 
61  std::vector<std::unique_ptr<TemplateEntry>> maTemplateEntries;
62 
63  DECL_LINK(DoubleClickHdl, ValueSet*, void);
64 };
65 
66 } // end of namespace sw::sidebar
67 
68 
69 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
std::vector< std::unique_ptr< TemplateEntry > > maTemplateEntries
virtual void GetControlState(const sal_uInt16, boost::property_tree::ptree &) override
std::unique_ptr< ValueSet > mxValueSet
DECL_LINK(DoubleClickHdl, ValueSet *, void)
virtual void dispose() override
virtual void NotifyItemUpdate(const sal_uInt16 nSId, const SfxItemState eState, const SfxPoolItem *pState) override
SfxItemState
static VclPtr< vcl::Window > Create(vcl::Window *pParent, const css::uno::Reference< css::frame::XFrame > &rxFrame)
StylePresetsPanel(vcl::Window *pParent, const css::uno::Reference< css::frame::XFrame > &rxFrame)
std::unique_ptr< weld::CustomWeld > mxValueSetWin