LibreOffice Module sd (master) 1
BulletAndPositionDlg.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
20#pragma once
21
22#include <vector>
23#include <memory>
24
25#include <editeng/numdef.hxx>
26#include <editeng/svxenum.hxx>
27#include <vcl/weld.hxx>
28#include "View.hxx"
30
31#define MN_GALLERY_ENTRY 100
32
33class ColorListBox;
34class SvxNumValueSet;
35class SvxNumRule;
37class SvxBrushItem;
38class SdDrawDocument;
39
40namespace sd
41{
42class View;
43}
44
47{
49
51
52 std::unique_ptr<SvxNumRule> pActNum;
53 std::unique_ptr<SvxNumRule> pSaveNum;
55
57
59 bool bModified : 1;
60 bool bInInitControl : 1; // workaround for Modify-error, is said to be corrected from 391 on
63
64 std::vector<OUString> aGrfNames;
66
68 sal_uInt16 nActNumLvl;
72
74 std::unique_ptr<weld::Widget> m_xGrid;
75 std::unique_ptr<weld::TreeView> m_xLevelLB;
76 std::unique_ptr<weld::ComboBox> m_xFmtLB;
77 std::unique_ptr<weld::Label> m_xPrefixFT;
78 std::unique_ptr<weld::Entry> m_xPrefixED;
79 std::unique_ptr<weld::Label> m_xSuffixFT;
80 std::unique_ptr<weld::Entry> m_xSuffixED;
81 std::unique_ptr<weld::Frame> m_xBeforeAfter;
82 std::unique_ptr<weld::Label> m_xBulColorFT;
83 std::unique_ptr<ColorListBox> m_xBulColLB;
84 std::unique_ptr<weld::Label> m_xBulRelSizeFT;
85 std::unique_ptr<weld::MetricSpinButton> m_xBulRelSizeMF;
86 std::unique_ptr<weld::Label> m_xStartFT;
87 std::unique_ptr<weld::SpinButton> m_xStartED;
88 std::unique_ptr<weld::Label> m_xBulletFT;
89 std::unique_ptr<weld::Button> m_xBulletPB;
90 std::unique_ptr<weld::MenuButton> m_xBitmapMB;
91 std::unique_ptr<weld::Label> m_xWidthFT;
92 std::unique_ptr<weld::MetricSpinButton> m_xWidthMF;
93 std::unique_ptr<weld::Label> m_xHeightFT;
94 std::unique_ptr<weld::MetricSpinButton> m_xHeightMF;
95 std::unique_ptr<weld::CheckButton> m_xRatioCB;
96 std::unique_ptr<weld::Menu> m_xGalleryMenu;
97 std::unique_ptr<weld::CustomWeld> m_xPreviewWIN;
98 std::unique_ptr<weld::Label> m_xDistBorderFT;
99 std::unique_ptr<weld::MetricSpinButton> m_xDistBorderMF;
100 std::unique_ptr<weld::CheckButton> m_xRelativeCB;
101 std::unique_ptr<weld::MetricSpinButton> m_xIndentMF;
102 std::unique_ptr<weld::Toggleable> m_xLeftTB;
103 std::unique_ptr<weld::Toggleable> m_xCenterTB;
104 std::unique_ptr<weld::Toggleable> m_xRightTB;
105 std::unique_ptr<weld::RadioButton> m_xSlideRB;
106 std::unique_ptr<weld::RadioButton> m_xSelectionRB;
107 std::unique_ptr<weld::Toggleable> m_xApplyToMaster;
108 std::unique_ptr<weld::Button> m_xReset;
109
110 void InitControls();
115 void SwitchNumberType(sal_uInt8 nType);
116 void CheckForStartValue_Impl(sal_uInt16 nNumberingType);
117
118 DECL_LINK(NumberTypeSelectHdl_Impl, weld::ComboBox&, void);
119 DECL_LINK(LevelHdl_Impl, weld::TreeView&, void);
120 DECL_LINK(PopupActivateHdl_Impl, weld::Toggleable&, void);
121 DECL_LINK(GraphicHdl_Impl, const OUString&, void);
122 DECL_LINK(BulletHdl_Impl, weld::Button&, void);
123 DECL_LINK(SizeHdl_Impl, weld::MetricSpinButton&, void);
124 DECL_LINK(RatioHdl_Impl, weld::Toggleable&, void);
126 DECL_LINK(SpinModifyHdl_Impl, weld::SpinButton&, void);
127 DECL_LINK(BulColorHdl_Impl, ColorListBox&, void);
128 DECL_LINK(BulRelSizeHdl_Impl, weld::MetricSpinButton&, void);
129 DECL_LINK(PreviewInvalidateHdl_Impl, Timer*, void);
130 DECL_LINK(DistanceHdl_Impl, weld::MetricSpinButton&, void);
131 DECL_LINK(RelativeHdl_Impl, weld::Toggleable&, void);
132 DECL_LINK(SelectLeftAlignmentHdl_Impl, weld::Toggleable&, void);
133 DECL_LINK(SelectCenterAlignmentHdl_Impl, weld::Toggleable&, void);
134 DECL_LINK(SelectRightAlignmentHdl_Impl, weld::Toggleable&, void);
135 DECL_LINK(ApplyToMasterHdl_Impl, weld::Toggleable&, void);
136 DECL_LINK(ResetHdl_Impl, weld::Button&, void);
137 void EditModifyHdl_Impl(const weld::Entry*);
138 void InitPosAndSpaceMode();
140
141public:
142 SvxBulletAndPositionDlg(weld::Window* pWindow, const SfxItemSet& rSet, const ::sd::View* pView);
143 virtual ~SvxBulletAndPositionDlg() override;
144
146 bool IsApplyToMaster() const;
147 bool IsSlideScope() const;
148 void Reset(const SfxItemSet* rSet);
149
150 void SetCharFmt(const OUString& rNumName) { m_sNumCharFmtName = rNumName; }
151 void SetMetric(FieldUnit eSet);
152
153 void SetModified(bool bRepaint = true);
154};
155
156/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Main class for handling the bullets, numbering format and their position.
std::unique_ptr< weld::RadioButton > m_xSlideRB
std::unique_ptr< weld::SpinButton > m_xStartED
std::unique_ptr< weld::Label > m_xBulColorFT
std::unique_ptr< weld::Label > m_xPrefixFT
std::unique_ptr< weld::MetricSpinButton > m_xDistBorderMF
std::unique_ptr< weld::MetricSpinButton > m_xWidthMF
virtual ~SvxBulletAndPositionDlg() override
std::unique_ptr< weld::Label > m_xDistBorderFT
DECL_LINK(PopupActivateHdl_Impl, weld::Toggleable &, void)
DECL_LINK(GraphicHdl_Impl, const OUString &, void)
std::unique_ptr< weld::CustomWeld > m_xPreviewWIN
std::unique_ptr< weld::Menu > m_xGalleryMenu
DECL_LINK(RatioHdl_Impl, weld::Toggleable &, void)
std::unique_ptr< weld::MetricSpinButton > m_xHeightMF
DECL_LINK(SelectLeftAlignmentHdl_Impl, weld::Toggleable &, void)
std::unique_ptr< weld::TreeView > m_xLevelLB
std::unique_ptr< weld::MetricSpinButton > m_xBulRelSizeMF
DECL_LINK(RelativeHdl_Impl, weld::Toggleable &, void)
std::unique_ptr< SvxNumRule > pSaveNum
std::unique_ptr< weld::Label > m_xSuffixFT
std::unique_ptr< weld::Entry > m_xPrefixED
std::unique_ptr< weld::Button > m_xBulletPB
void Reset(const SfxItemSet *rSet)
SvxNumberingPreview m_aPreviewWIN
DECL_LINK(SelectRightAlignmentHdl_Impl, weld::Toggleable &, void)
DECL_LINK(BulColorHdl_Impl, ColorListBox &, void)
std::unique_ptr< weld::Toggleable > m_xRightTB
std::unique_ptr< weld::Label > m_xHeightFT
std::unique_ptr< SvxNumRule > pActNum
DECL_LINK(SelectCenterAlignmentHdl_Impl, weld::Toggleable &, void)
std::unique_ptr< weld::Toggleable > m_xLeftTB
std::unique_ptr< weld::RadioButton > m_xSelectionRB
std::unique_ptr< weld::Frame > m_xBeforeAfter
std::unique_ptr< weld::Toggleable > m_xApplyToMaster
DECL_LINK(BulletHdl_Impl, weld::Button &, void)
std::vector< OUString > aGrfNames
DECL_LINK(PreviewInvalidateHdl_Impl, Timer *, void)
std::unique_ptr< weld::Entry > m_xSuffixED
std::unique_ptr< weld::Button > m_xReset
void SwitchNumberType(sal_uInt8 nType)
To switch between the numbering type 0 - Number; 1 - Bullet; 2 - Bitmap;.
void SetCharFmt(const OUString &rNumName)
void EditModifyHdl_Impl(const weld::Entry *)
DECL_LINK(NumberTypeSelectHdl_Impl, weld::ComboBox &, void)
std::unique_ptr< weld::Label > m_xStartFT
void SetModified(bool bRepaint=true)
std::unique_ptr< weld::MenuButton > m_xBitmapMB
DECL_LINK(LevelHdl_Impl, weld::TreeView &, void)
std::unique_ptr< weld::CheckButton > m_xRelativeCB
DECL_LINK(EditModifyHdl_Impl, weld::Entry &, void)
std::unique_ptr< weld::CheckButton > m_xRatioCB
std::unique_ptr< weld::Label > m_xBulletFT
DECL_LINK(DistanceHdl_Impl, weld::MetricSpinButton &, void)
std::unique_ptr< weld::Widget > m_xGrid
DECL_LINK(SizeHdl_Impl, weld::MetricSpinButton &, void)
std::unique_ptr< weld::ComboBox > m_xFmtLB
void SetMetric(FieldUnit eSet)
const SfxItemSet & rFirstStateSet
std::unique_ptr< weld::Toggleable > m_xCenterTB
std::unique_ptr< weld::Label > m_xBulRelSizeFT
DECL_LINK(ResetHdl_Impl, weld::Button &, void)
DECL_LINK(SpinModifyHdl_Impl, weld::SpinButton &, void)
TypedWhichId< SvxNumBulletItem > nNumItemId
std::unique_ptr< ColorListBox > m_xBulColLB
SvxBulletAndPositionDlg(weld::Window *pWindow, const SfxItemSet &rSet, const ::sd::View *pView)
SfxItemSet * GetOutputItemSet(SfxItemSet *rSet)
DECL_LINK(ApplyToMasterHdl_Impl, weld::Toggleable &, void)
std::unique_ptr< weld::MetricSpinButton > m_xIndentMF
std::unique_ptr< weld::Label > m_xWidthFT
DECL_LINK(BulRelSizeHdl_Impl, weld::MetricSpinButton &, void)
void CheckForStartValue_Impl(sal_uInt16 nNumberingType)
FieldUnit
MapUnit
#define SVX_MAX_NUM
SvxAdjust
unsigned char sal_uInt8