LibreOffice Module sw (master) 1
num.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_NUM_HXX
20#define INCLUDED_SW_SOURCE_UIBASE_INC_NUM_HXX
21
22#include <sfx2/tabdlg.hxx>
23#include "numprevw.hxx"
24#include <numrule.hxx>
25
26class SwWrtShell;
27class SvxBrushItem;
29
30class SwNumPositionTabPage final : public SfxTabPage
31{
32 std::unique_ptr<SwNumRule> m_pActNum;
35
37 sal_uInt16 m_nActNumLvl;
38
39 bool m_bModified : 1;
40 bool m_bPreset : 1;
41 bool m_bInInintControl : 1; // work around modify-error; should be resolved from 391 on
43
45
46 std::unique_ptr<weld::TreeView> m_xLevelLB;
47 std::unique_ptr<weld::Widget> m_xPositionFrame;
48
49 // former set of controls shown for numbering rules containing list level
50 // attributes in SvxNumberFormat::SvxNumPositionAndSpaceMode == LABEL_WIDTH_AND_POSITION
51 std::unique_ptr<weld::Label> m_xDistBorderFT;
52 std::unique_ptr<weld::MetricSpinButton> m_xDistBorderMF;
53 std::unique_ptr<weld::CheckButton> m_xRelativeCB;
54 std::unique_ptr<weld::Label> m_xIndentFT;
55 std::unique_ptr<weld::MetricSpinButton> m_xIndentMF;
56 std::unique_ptr<weld::Label> m_xDistNumFT;
57 std::unique_ptr<weld::MetricSpinButton> m_xDistNumMF;
58 std::unique_ptr<weld::Label> m_xAlignFT;
59 std::unique_ptr<weld::ComboBox> m_xAlignLB;
60
61 // new set of controls shown for numbering rules containing list level
62 // attributes in SvxNumberFormat::SvxNumPositionAndSpaceMode == LABEL_ALIGNMENT
63 std::unique_ptr<weld::Label> m_xLabelFollowedByFT;
64 std::unique_ptr<weld::ComboBox> m_xLabelFollowedByLB;
65 std::unique_ptr<weld::Label> m_xListtabFT;
66 std::unique_ptr<weld::MetricSpinButton> m_xListtabMF;
67 std::unique_ptr<weld::Label> m_xAlign2FT;
68 std::unique_ptr<weld::ComboBox> m_xAlign2LB;
69 std::unique_ptr<weld::Label> m_xAlignedAtFT;
70 std::unique_ptr<weld::MetricSpinButton> m_xAlignedAtMF;
71 std::unique_ptr<weld::Label> m_xIndentAtFT;
72 std::unique_ptr<weld::MetricSpinButton> m_xIndentAtMF;
73 std::unique_ptr<weld::Button> m_xStandardPB;
74 std::unique_ptr<weld::CustomWeld> m_xPreviewWIN;
75
76
77 void InitControls();
78
79 DECL_LINK(LevelHdl, weld::TreeView&, void);
80 DECL_LINK(EditModifyHdl, weld::ComboBox&, void);
81 DECL_LINK(DistanceHdl, weld::MetricSpinButton&, void);
82 DECL_LINK(RelativeHdl, weld::Toggleable&, void);
83 DECL_LINK(StandardHdl, weld::Button&, void);
84
87
88 DECL_LINK(LabelFollowedByHdl_Impl, weld::ComboBox&, void);
89 DECL_LINK(ListtabPosHdl_Impl, weld::MetricSpinButton&, void);
90 DECL_LINK(AlignAtHdl_Impl, weld::MetricSpinButton&, void);
91 DECL_LINK(IndentAtHdl_Impl, weld::MetricSpinButton&, void);
92
93public:
94
96 virtual ~SwNumPositionTabPage() override;
97
98 virtual void ActivatePage(const SfxItemSet& rSet) override;
99 virtual DeactivateRC DeactivatePage(SfxItemSet *pSet) override;
100 virtual bool FillItemSet( SfxItemSet* rSet ) override;
101 virtual void Reset( const SfxItemSet* rSet ) override;
102
103 static std::unique_ptr<SfxTabPage> Create( weld::Container* pPage, weld::DialogController* pController,
104 const SfxItemSet* rAttrSet);
105
107 void SetWrtShell(SwWrtShell* pSh);
108#ifdef DBG_UTIL
109 void SetModified();
110#else
111 void SetModified()
112 {
113 m_bModified = true;
116 }
117#endif
118};
119
121{
123
124 virtual short Ok() override;
125 virtual void PageCreated(const OUString& rPageId, SfxTabPage& rPage) override;
126 DECL_LINK(RemoveNumberingHdl, weld::Button&, void);
127
128 std::unique_ptr<weld::ComboBox> m_xDummyCombo;
129
130public:
132 const SfxItemSet* pSwItemSet,
133 SwWrtShell &);
134 virtual ~SwSvxNumBulletTabDialog() override;
135};
136#endif // INCLUDED_SW_SOURCE_UIBASE_INC_NUM_HXX
137
138/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
void SetLevel(sal_uInt16 nSet)
Definition: numprevw.hxx:62
bool m_bLabelAlignmentPosAndSpaceModeActive
Definition: num.hxx:42
virtual DeactivateRC DeactivatePage(SfxItemSet *pSet) override
Definition: num.cxx:369
SwWrtShell * m_pWrtSh
Definition: num.hxx:34
void SetOutlineTabDialog(SwOutlineTabDialog *pDlg)
Definition: num.hxx:106
virtual bool FillItemSet(SfxItemSet *rSet) override
Definition: num.cxx:378
std::unique_ptr< weld::ComboBox > m_xAlign2LB
Definition: num.hxx:68
DECL_LINK(StandardHdl, weld::Button &, void)
bool m_bInInintControl
Definition: num.hxx:41
DECL_LINK(LevelHdl, weld::TreeView &, void)
std::unique_ptr< weld::CheckButton > m_xRelativeCB
Definition: num.hxx:53
std::unique_ptr< weld::Label > m_xIndentFT
Definition: num.hxx:54
std::unique_ptr< weld::ComboBox > m_xAlignLB
Definition: num.hxx:59
std::unique_ptr< weld::ComboBox > m_xLabelFollowedByLB
Definition: num.hxx:64
std::unique_ptr< weld::Label > m_xAlignFT
Definition: num.hxx:58
DECL_LINK(EditModifyHdl, weld::ComboBox &, void)
std::unique_ptr< weld::Label > m_xDistBorderFT
Definition: num.hxx:51
void InitControls()
Definition: num.cxx:132
std::unique_ptr< weld::MetricSpinButton > m_xIndentMF
Definition: num.hxx:55
std::unique_ptr< weld::MetricSpinButton > m_xDistBorderMF
Definition: num.hxx:52
DECL_LINK(AlignAtHdl_Impl, weld::MetricSpinButton &, void)
std::unique_ptr< weld::MetricSpinButton > m_xAlignedAtMF
Definition: num.hxx:70
std::unique_ptr< weld::Label > m_xIndentAtFT
Definition: num.hxx:71
DECL_LINK(LabelFollowedByHdl_Impl, weld::ComboBox &, void)
std::unique_ptr< weld::MetricSpinButton > m_xDistNumMF
Definition: num.hxx:57
virtual void Reset(const SfxItemSet *rSet) override
Definition: num.cxx:391
SwNumPositionTabPage(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet &rSet)
Definition: num.cxx:48
void InitPosAndSpaceMode()
Definition: num.cxx:429
SwNumRule * m_pSaveNum
Definition: num.hxx:33
DECL_LINK(IndentAtHdl_Impl, weld::MetricSpinButton &, void)
std::unique_ptr< weld::Widget > m_xPositionFrame
Definition: num.hxx:47
std::unique_ptr< weld::MetricSpinButton > m_xIndentAtMF
Definition: num.hxx:72
NumberingPreview m_aPreviewWIN
Definition: num.hxx:44
std::unique_ptr< weld::Label > m_xAlignedAtFT
Definition: num.hxx:69
SwOutlineTabDialog * m_pOutlineDlg
Definition: num.hxx:36
std::unique_ptr< SwNumRule > m_pActNum
Definition: num.hxx:32
std::unique_ptr< weld::CustomWeld > m_xPreviewWIN
Definition: num.hxx:74
std::unique_ptr< weld::Label > m_xAlign2FT
Definition: num.hxx:67
void SetModified()
Definition: num.cxx:854
std::unique_ptr< weld::Label > m_xDistNumFT
Definition: num.hxx:56
virtual ~SwNumPositionTabPage() override
Definition: num.cxx:126
std::unique_ptr< weld::MetricSpinButton > m_xListtabMF
Definition: num.hxx:66
void SetWrtShell(SwWrtShell *pSh)
Definition: num.cxx:488
DECL_LINK(RelativeHdl, weld::Toggleable &, void)
std::unique_ptr< weld::Button > m_xStandardPB
Definition: num.hxx:73
sal_uInt16 m_nActNumLvl
Definition: num.hxx:37
DECL_LINK(DistanceHdl, weld::MetricSpinButton &, void)
std::unique_ptr< weld::TreeView > m_xLevelLB
Definition: num.hxx:46
void ShowControlsDependingOnPosAndSpaceMode()
Definition: num.cxx:458
virtual void ActivatePage(const SfxItemSet &rSet) override
Definition: num.cxx:330
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rAttrSet)
Definition: num.cxx:482
DECL_LINK(ListtabPosHdl_Impl, weld::MetricSpinButton &, void)
std::unique_ptr< weld::Label > m_xLabelFollowedByFT
Definition: num.hxx:63
std::unique_ptr< weld::Label > m_xListtabFT
Definition: num.hxx:65
SwWrtShell & m_rWrtSh
Definition: num.hxx:122
virtual short Ok() override
Definition: num.cxx:945
DECL_LINK(RemoveNumberingHdl, weld::Button &, void)
SwSvxNumBulletTabDialog(weld::Window *pParent, const SfxItemSet *pSwItemSet, SwWrtShell &)
Definition: num.cxx:862
std::unique_ptr< weld::ComboBox > m_xDummyCombo
Definition: num.hxx:128
virtual ~SwSvxNumBulletTabDialog() override
Definition: num.cxx:889
virtual void PageCreated(const OUString &rPageId, SfxTabPage &rPage) override
Definition: num.cxx:893
Used by the UI to modify the document model.
Definition: wrtsh.hxx:97
DeactivateRC