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/.
9 * This file incorporates work covered by the following license notice:
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 .
19 #ifndef INCLUDED_SFX2_MGETEMPL_HXX
20 #define INCLUDED_SFX2_MGETEMPL_HXX
22 #include <sfx2/styfitem.hxx>
23 #include <sfx2/tabdlg.hxx>
27 namespace weld
{ class Button
; }
28 namespace weld
{ class CheckButton
; }
29 namespace weld
{ class ComboBox
; }
30 namespace weld
{ class Entry
; }
31 namespace weld
{ class Label
; }
32 namespace weld
{ class Widget
; }
35 SID_TEMPLATE_NAME : In: StringItem, Name of Template
36 SID_TEMPLATE_FAMILY : In: Family of Template
39 class SfxManageStyleSheetPage final
: public SfxTabPage
41 SfxStyleSheetBase
*pStyle
;
42 std::optional
<SfxStyleFamilies
> mxFamilies
;
43 const SfxStyleFamilyItem
*pItem
;
47 // initial data for the style
51 SfxStyleSearchBits nFlags
;
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 std::unique_ptr
<weld::Label
> m_xNameFt
;
66 friend class SfxStyleDialogController
;
68 DECL_LINK(GetFocusHdl
, weld::Widget
&, void);
69 DECL_LINK(LoseFocusHdl
, weld::Widget
&, void);
70 DECL_LINK(EditStyleSelectHdl_Impl
, weld::ComboBox
&, void);
71 DECL_LINK(EditStyleHdl_Impl
, weld::Button
&, void);
72 DECL_LINK(EditLinkStyleSelectHdl_Impl
, weld::ComboBox
&, void);
73 DECL_LINK(EditLinkStyleHdl_Impl
, weld::Button
&, void);
75 void UpdateName_Impl(weld::ComboBox
*, const OUString
&rNew
);
76 void SetDescriptionText_Impl();
79 static std::unique_ptr
<SfxTabPage
> Create( weld::Container
* pPage
, weld::DialogController
* pController
, const SfxItemSet
* );
81 virtual bool FillItemSet(SfxItemSet
*) override
;
82 virtual void Reset(const SfxItemSet
*) override
;
84 static bool Execute_Impl( sal_uInt16 nId
, const OUString
& rStr
, sal_uInt16 nFamily
);
85 virtual void ActivatePage(const SfxItemSet
&) override
;
86 virtual DeactivateRC
DeactivatePage(SfxItemSet
*) override
;
89 SfxManageStyleSheetPage(weld::Container
* pPage
, weld::DialogController
* pController
, const SfxItemSet
&rAttrSet
);
90 virtual ~SfxManageStyleSheetPage() override
;
95 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */