LibreOffice Module sw (master)  1
numpara.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_SW_SOURCE_UIBASE_INC_NUMPARA_HXX
20 #define INCLUDED_SW_SOURCE_UIBASE_INC_NUMPARA_HXX
21 
22 #include <sfx2/tabdlg.hxx>
23 #include <svl/style.hxx>
24 
25 // with this TabPage numbering settings at the paragraph / paragraph style
26 // are performed.
27 class SwParagraphNumTabPage final : public SfxTabPage
28 {
29  // #outlinelevel#
30  const OUString msOutlineNumbering;
31 
32  bool bModified : 1;
33  bool bCurNumrule : 1;
34 
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;
40 
41  std::unique_ptr<weld::CheckButton> m_xNewStartCB;
42  std::unique_ptr<weld::Widget> m_xNewStartBX;
43  std::unique_ptr<weld::CheckButton> m_xNewStartNumberCB;
44  std::unique_ptr<weld::SpinButton> m_xNewStartNF;
45 
46  std::unique_ptr<weld::Widget> m_xCountParaFram;
47  std::unique_ptr<weld::CheckButton> m_xCountParaCB;
48  std::unique_ptr<weld::CheckButton> m_xRestartParaCountCB;
49 
50  std::unique_ptr<weld::Widget> m_xRestartBX;
51  std::unique_ptr<weld::SpinButton> m_xRestartNF;
52 
53  DECL_LINK(NewStartHdl_Impl, weld::ToggleButton&, void);
54  DECL_LINK(StyleHdl_Impl, weld::ComboBox&,void);
55  DECL_LINK(LineCountHdl_Impl, weld::ToggleButton&, void);
56  DECL_LINK(EditNumStyleHdl_Impl, weld::Button&, void);
57  DECL_LINK(EditNumStyleSelectHdl_Impl, weld::ComboBox&, void);
58 
59  static const sal_uInt16 aPageRg[];
60 
61  static bool ExecuteEditNumStyle_Impl( sal_uInt16 nId, const OUString& rStr,
62  SfxStyleFamily nFamily );
63 
64 public:
65  SwParagraphNumTabPage(TabPageParent pParent, const SfxItemSet& rSet );
66  virtual ~SwParagraphNumTabPage() override;
67 
68  static VclPtr<SfxTabPage> Create( TabPageParent pParent,
69  const SfxItemSet* rSet );
70  static const sal_uInt16* GetRanges() { return aPageRg; }
71 
72  virtual bool FillItemSet( SfxItemSet* rSet ) override;
73  virtual void Reset( const SfxItemSet* rSet ) override;
74  virtual void ChangesApplied() override;
75 
76  void EnableNewStart();
77  void DisableOutline();
78  void DisableNumbering();
79 
81 };
82 
83 #endif
84 
85 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual ~SwParagraphNumTabPage() override
Definition: numpara.cxx:97
std::unique_ptr< weld::SpinButton > m_xNewStartNF
Definition: numpara.hxx:44
std::unique_ptr< weld::Button > m_xEditNumStyleBtn
Definition: numpara.hxx:39
std::unique_ptr< weld::Widget > m_xCountParaFram
Definition: numpara.hxx:46
std::unique_ptr< weld::Widget > m_xNewStartBX
Definition: numpara.hxx:42
std::unique_ptr< weld::CheckButton > m_xNewStartCB
Definition: numpara.hxx:41
std::unique_ptr< weld::Widget > m_xRestartBX
Definition: numpara.hxx:50
virtual void Reset(const SfxItemSet *rSet) override
Definition: numpara.cxx:172
std::unique_ptr< weld::CheckButton > m_xCountParaCB
Definition: numpara.hxx:47
const OUString msOutlineNumbering
Definition: numpara.hxx:30
SfxStyleFamily
virtual void ChangesApplied() override
Definition: numpara.cxx:161
static VclPtr< SfxTabPage > Create(TabPageParent pParent, const SfxItemSet *rSet)
Definition: numpara.cxx:101
std::unique_ptr< weld::Widget > m_xNumberStyleBX
Definition: numpara.hxx:37
weld::ComboBox & GetStyleBox()
Definition: numpara.hxx:80
static const sal_uInt16 * GetRanges()
Definition: numpara.hxx:70
std::unique_ptr< weld::ComboBox > m_xOutlineLvLB
Definition: numpara.hxx:36
SwParagraphNumTabPage(TabPageParent pParent, const SfxItemSet &rSet)
Definition: numpara.cxx:45
virtual bool FillItemSet(SfxItemSet *rSet) override
Definition: numpara.cxx:106
std::unique_ptr< weld::Widget > m_xOutlineStartBX
Definition: numpara.hxx:35
std::unique_ptr< weld::CheckButton > m_xNewStartNumberCB
Definition: numpara.hxx:43
DECL_LINK(NewStartHdl_Impl, weld::ToggleButton &, void)
std::unique_ptr< weld::SpinButton > m_xRestartNF
Definition: numpara.hxx:51
std::unique_ptr< weld::CheckButton > m_xRestartParaCountCB
Definition: numpara.hxx:48
static bool ExecuteEditNumStyle_Impl(sal_uInt16 nId, const OUString &rStr, SfxStyleFamily nFamily)
Definition: numpara.cxx:317
std::unique_ptr< weld::ComboBox > m_xNumberStyleLB
Definition: numpara.hxx:38
static const sal_uInt16 aPageRg[]
Definition: numpara.hxx:59