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_SW_SOURCE_UIBASE_INC_NUMPARA_HXX
20 #define INCLUDED_SW_SOURCE_UIBASE_INC_NUMPARA_HXX
22 #include <sfx2/tabdlg.hxx>
23 #include <svl/style.hxx>
25 // with this TabPage numbering settings at the paragraph / paragraph style
27 class SwParagraphNumTabPage final
: public SfxTabPage
30 const OUString msOutlineNumbering
;
33 bool m_bCurNumrule
: 1;
35 std::unique_ptr
<weld::Widget
> m_xOutlineStartBX
;
36 std::unique_ptr
<weld::ComboBox
> m_xOutlineLvLB
;
37 std::unique_ptr
<weld::Widget
> m_xNumberStyleBX
;
38 std::unique_ptr
<weld::ComboBox
> m_xNumberStyleLB
;
39 std::unique_ptr
<weld::Button
> m_xEditNumStyleBtn
;
41 std::unique_ptr
<weld::Widget
> m_xListLvBX
;
42 std::unique_ptr
<weld::ComboBox
> m_xListLvLB
;
44 std::unique_ptr
<weld::CheckButton
> m_xNewStartCB
;
45 std::unique_ptr
<weld::Widget
> m_xNewStartBX
;
46 std::unique_ptr
<weld::CheckButton
> m_xNewStartNumberCB
;
47 std::unique_ptr
<weld::SpinButton
> m_xNewStartNF
;
49 std::unique_ptr
<weld::Widget
> m_xCountParaFram
;
50 std::unique_ptr
<weld::CheckButton
> m_xCountParaCB
;
51 std::unique_ptr
<weld::CheckButton
> m_xRestartParaCountCB
;
53 std::unique_ptr
<weld::Widget
> m_xRestartBX
;
54 std::unique_ptr
<weld::SpinButton
> m_xRestartNF
;
56 DECL_LINK(NewStartHdl_Impl
, weld::Toggleable
&, void);
57 DECL_LINK(StyleHdl_Impl
, weld::ComboBox
&,void);
58 DECL_LINK(LineCountHdl_Impl
, weld::Toggleable
&, void);
59 DECL_LINK(EditNumStyleHdl_Impl
, weld::Button
&, void);
60 DECL_LINK(EditNumStyleSelectHdl_Impl
, weld::ComboBox
&, void);
62 static const WhichRangesContainer s_aPageRg
;
64 void ExecuteEditNumStyle_Impl(sal_uInt16 nId
, const OUString
& rStr
,
65 SfxStyleFamily nFamily
);
68 SwParagraphNumTabPage(weld::Container
* pPage
, weld::DialogController
* pController
, const SfxItemSet
& rSet
);
69 virtual ~SwParagraphNumTabPage() override
;
71 static std::unique_ptr
<SfxTabPage
> Create( weld::Container
* pPage
, weld::DialogController
* pController
,
72 const SfxItemSet
* rSet
);
73 static const WhichRangesContainer
& GetRanges() { return s_aPageRg
; }
75 virtual bool FillItemSet( SfxItemSet
* rSet
) override
;
76 virtual void Reset( const SfxItemSet
* rSet
) override
;
77 virtual void ChangesApplied() override
;
79 void EnableNewStart();
80 void DisableOutline();
81 void DisableNumbering();
83 weld::ComboBox
& GetStyleBox() {return *m_xNumberStyleLB
;};
88 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */