LibreOffice Module sfx2 (master) 1
mgetempl.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 * This file incorporates work covered by the following license notice:
10 *
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 */
19#ifndef INCLUDED_SFX2_MGETEMPL_HXX
20#define INCLUDED_SFX2_MGETEMPL_HXX
21
22#include <sfx2/styfitem.hxx>
23#include <sfx2/tabdlg.hxx>
24#include <memory>
25#include <optional>
26
27namespace weld { class Button; }
28namespace weld { class CheckButton; }
29namespace weld { class ComboBox; }
30namespace weld { class Entry; }
31namespace weld { class Label; }
32namespace weld { class Widget; }
33
34/* expected:
35 SID_TEMPLATE_NAME : In: StringItem, Name of Template
36 SID_TEMPLATE_FAMILY : In: Family of Template
37*/
38
40{
42 std::optional<SfxStyleFamilies> mxFamilies;
44 OUString aBuf;
46
47 // initial data for the style
48 OUString aName;
49 OUString aFollow;
50 OUString aParent;
52
53 std::unique_ptr<weld::Entry> m_xName;
54 std::unique_ptr<weld::CheckButton> m_xAutoCB;
55 std::unique_ptr<weld::Label> m_xFollowFt;
56 std::unique_ptr<weld::ComboBox> m_xFollowLb;
57 std::unique_ptr<weld::Button> m_xEditStyleBtn;
58 std::unique_ptr<weld::Label> m_xBaseFt;
59 std::unique_ptr<weld::ComboBox> m_xBaseLb;
60 std::unique_ptr<weld::Button> m_xEditLinkStyleBtn;
61 std::unique_ptr<weld::Label> m_xFilterFt;
62 std::unique_ptr<weld::ComboBox> m_xFilterLb;
63 std::unique_ptr<weld::Label> m_xDescFt;
64
66
67 DECL_LINK(GetFocusHdl, weld::Widget&, void);
68 DECL_LINK(LoseFocusHdl, weld::Widget&, void);
69 DECL_LINK(EditStyleSelectHdl_Impl, weld::ComboBox&, void);
70 DECL_LINK(EditStyleHdl_Impl, weld::Button&, void);
71 DECL_LINK(EditLinkStyleSelectHdl_Impl, weld::ComboBox&, void);
72 DECL_LINK(EditLinkStyleHdl_Impl, weld::Button&, void);
73
74 void UpdateName_Impl(weld::ComboBox*, const OUString &rNew);
76
77
78 static std::unique_ptr<SfxTabPage> Create( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* );
79
80 virtual bool FillItemSet(SfxItemSet *) override;
81 virtual void Reset(const SfxItemSet *) override;
82
83 static bool Execute_Impl( sal_uInt16 nId, const OUString& rStr, sal_uInt16 nFamily );
84 virtual void ActivatePage(const SfxItemSet &) override;
85 virtual DeactivateRC DeactivatePage(SfxItemSet *) override;
86
87public:
88 SfxManageStyleSheetPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet &rAttrSet);
89 virtual ~SfxManageStyleSheetPage() override;
90};
91
92#endif
93
94/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
const SfxStyleFamilyItem * pItem
Definition: mgetempl.hxx:43
std::unique_ptr< weld::ComboBox > m_xFollowLb
Definition: mgetempl.hxx:56
DECL_LINK(EditLinkStyleHdl_Impl, weld::Button &, void)
std::unique_ptr< weld::Button > m_xEditStyleBtn
Definition: mgetempl.hxx:57
virtual bool FillItemSet(SfxItemSet *) override
Definition: mgetempl.cxx:410
std::unique_ptr< weld::Label > m_xDescFt
Definition: mgetempl.hxx:63
virtual void Reset(const SfxItemSet *) override
Definition: mgetempl.cxx:455
std::unique_ptr< weld::Button > m_xEditLinkStyleBtn
Definition: mgetempl.hxx:60
virtual DeactivateRC DeactivatePage(SfxItemSet *) override
Definition: mgetempl.cxx:566
std::unique_ptr< weld::Label > m_xFilterFt
Definition: mgetempl.hxx:61
DECL_LINK(EditStyleHdl_Impl, weld::Button &, void)
DECL_LINK(GetFocusHdl, weld::Widget &, void)
SfxStyleSheetBase * pStyle
Definition: mgetempl.hxx:41
static bool Execute_Impl(sal_uInt16 nId, const OUString &rStr, sal_uInt16 nFamily)
Definition: mgetempl.cxx:357
std::optional< SfxStyleFamilies > mxFamilies
Definition: mgetempl.hxx:42
std::unique_ptr< weld::ComboBox > m_xBaseLb
Definition: mgetempl.hxx:59
std::unique_ptr< weld::Label > m_xFollowFt
Definition: mgetempl.hxx:55
std::unique_ptr< weld::Label > m_xBaseFt
Definition: mgetempl.hxx:58
SfxManageStyleSheetPage(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet &rAttrSet)
Definition: mgetempl.cxx:48
virtual ~SfxManageStyleSheetPage() override
Definition: mgetempl.cxx:256
DECL_LINK(LoseFocusHdl, weld::Widget &, void)
DECL_LINK(EditStyleSelectHdl_Impl, weld::ComboBox &, void)
void UpdateName_Impl(weld::ComboBox *, const OUString &rNew)
Definition: mgetempl.cxx:263
DECL_LINK(EditLinkStyleSelectHdl_Impl, weld::ComboBox &, void)
virtual void ActivatePage(const SfxItemSet &) override
Definition: mgetempl.cxx:537
SfxStyleSearchBits nFlags
Definition: mgetempl.hxx:51
std::unique_ptr< weld::ComboBox > m_xFilterLb
Definition: mgetempl.hxx:62
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *)
Definition: mgetempl.cxx:531
std::unique_ptr< weld::Entry > m_xName
Definition: mgetempl.hxx:53
std::unique_ptr< weld::CheckButton > m_xAutoCB
Definition: mgetempl.hxx:54
SfxStyleSearchBits
DeactivateRC
Definition: tabdlg.hxx:173