bump product version to 4.1.6.2
[LibreOffice.git] / svx / source / sidebar / paragraph / ParaLineSpacingControl.hxx
blobfc540c044971a61efe26e2269f2e523467cbb26e
1 /*
2 * This file is part of the LibreOffice project.
4 * This Source Code Form is subject to the terms of the Mozilla Public
5 * License, v. 2.0. If a copy of the MPL was not distributed with this
6 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 * This file incorporates work covered by the following license notice:
10 * Licensed to the Apache Software Foundation (ASF) under one or more
11 * contributor license agreements. See the NOTICE file distributed
12 * with this work for additional information regarding copyright
13 * ownership. The ASF licenses this file to you under the Apache
14 * License, Version 2.0 (the "License"); you may not use this file
15 * except in compliance with the License. You may obtain a copy of
16 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 #ifndef _SVX_SIDEBAR_LINE_SPACING_CONTROL_HXX_
19 #define _SVX_SIDEBAR_LINE_SPACING_CONTROL_HXX_
21 #include "svx/sidebar/PopupControl.hxx"
22 #include "svx/sidebar/ValueSetWithTextControl.hxx"
23 #include <sfx2/bindings.hxx>
24 #include <svtools/ctrlbox.hxx>
25 #include <svtools/ctrltool.hxx>
26 #include "ParaPropertyPanel.hxx"
27 #include <vcl/fixed.hxx>
28 #include <svl/poolitem.hxx>
29 #include <editeng/lspcitem.hxx>
30 #include <sfx2/sidebar/EnumContext.hxx>
33 namespace svx { namespace sidebar {
35 #define LSP_POS_GLOBAL_VALUE String("Line_Spacing_Pos", 16, RTL_TEXTENCODING_ASCII_US)
36 #define LSP_LV_GLOBAL_VALUE String("Line_Spacing_Lv", 15, RTL_TEXTENCODING_ASCII_US)
37 #define BEGIN_VALUE 28
38 class ParaLineSpacingControl:public svx::sidebar::PopupControl
40 public:
41 ParaLineSpacingControl(Window* pParent, svx::sidebar::ParaPropertyPanel& rPanel);
42 ~ParaLineSpacingControl();
43 void Rearrange(SfxItemState currSPState,FieldUnit currMetricUnit,SvxLineSpacingItem* currSPItem,const ::sfx2::sidebar::EnumContext currentContext);
44 //virtual void Paint(const Rectangle& rect);
46 //add
47 short GetLastCustomState();
48 long GetLastCustomValue();
49 //add end
51 void ExecuteLineSpace();
52 void SetLineSpace( SvxLineSpacingItem& rLineSpace,
53 int eSpace, long lValue = 0 );
55 void ExecuteLineSpacing( sal_uInt16 aIsCustom, sal_uInt16 aEntry );
56 void SetAllNoSel();
57 void PopupModeEndCallback();
59 private:
60 bool mbUseLineSPCustom;
61 bool mbLineSPDisable;
62 SfxMapUnit m_eLNSpaceUnit;
63 ParaPropertyPanel& mrParaPropertyPanel;
64 SfxBindings* mpBindings;
66 long nMinFixDist;
67 Edit* pActLineDistFld;
69 ValueSetWithTextControl maLineSpacing;
71 FixedText maCustomFT;
72 FixedText maLSpacingFT;
73 ListBox aLineDist;
75 FixedText maOfFT;
76 MetricField aLineDistAtPercentBox;
77 MetricField aLineDistAtMetricBox;
79 Image maSpacing1;
80 Image maSpacing115;
81 Image maSpacing15;
82 Image maSpacing2;
84 Image maSelSpacing1;
85 Image maSelSpacing115;
86 Image maSelSpacing15;
87 Image maSelSpacing2;
88 Image maSelSelHanging;
89 Image maImgCus;
90 Image maImgCusGrey;
91 XubString maStrCus;
93 Image* mpImg;
94 Image* mpImgSel;
95 XubString* mpStr;
96 XubString* mpStrTip;
97 String maLine;
98 String maOf;
100 sal_Int64 maValue;
101 sal_uInt16 maPos;
102 private:
103 void initial();
104 DECL_LINK(LineSPDistHdl_Impl, ListBox*);
105 DECL_LINK(LineSPDistAtHdl_Impl, void*);
106 DECL_LINK(VSSelHdl, void*);
110 #endif