1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* This file is part of the LibreOffice project.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* This file incorporates work covered by the following license notice:
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed
* with this work for additional information regarding copyright
* ownership. The ASF licenses this file to you under the Apache
* License, Version 2.0 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#ifndef INCLUDED_SW_SOURCE_UIBASE_TABLE_TABLEPG_HXX
#define INCLUDED_SW_SOURCE_UIBASE_TABLE_TABLEPG_HXX
#include <sfx2/tabdlg.hxx>
#include <vcl/fixed.hxx>
#include <vcl/button.hxx>
#include <vcl/lstbox.hxx>
#include <actctrl.hxx>
#include "prcntfld.hxx"
#include "swtypes.hxx"
class SwWrtShell;
class SwTableRep;
struct TColumn
{
SwTwips nWidth;
bool bVisible;
};
class SwFormatTablePage : public SfxTabPage
{
VclPtr<Edit> m_pNameED;
TextFilter m_aTextFilter;
VclPtr<FixedText> m_pWidthFT;
PercentField m_aWidthMF;
VclPtr<CheckBox> m_pRelWidthCB;
VclPtr<RadioButton> m_pFullBtn;
VclPtr<RadioButton> m_pLeftBtn;
VclPtr<RadioButton> m_pFromLeftBtn;
VclPtr<RadioButton> m_pRightBtn;
VclPtr<RadioButton> m_pCenterBtn;
VclPtr<RadioButton> m_pFreeBtn;
VclPtr<FixedText> m_pLeftFT;
PercentField m_aLeftMF;
VclPtr<FixedText> m_pRightFT;
PercentField m_aRightMF;
VclPtr<FixedText> m_pTopFT;
VclPtr<MetricField> m_pTopMF;
VclPtr<FixedText> m_pBottomFT;
VclPtr<MetricField> m_pBottomMF;
VclPtr<ListBox> m_pTextDirectionLB;
SwTableRep* pTblData;
SwTwips nSaveWidth;
SwTwips nMinTableWidth;
bool bModified;
bool bFull:1;
bool bHtmlMode : 1;
void Init();
void ModifyHdl(const Edit* pEdit);
DECL_LINK( AutoClickHdl, void * );
DECL_LINK( RelWidthClickHdl, CheckBox * );
void RightModify();
DECL_LINK( UpDownLoseFocusHdl, MetricField * );
using TabPage::ActivatePage;
using TabPage::DeactivatePage;
public:
SwFormatTablePage( vcl::Window* pParent, const SfxItemSet& rSet );
virtual ~SwFormatTablePage();
virtual void dispose() SAL_OVERRIDE;
static VclPtr<SfxTabPage> Create( vcl::Window* pParent, const SfxItemSet* rAttrSet);
virtual bool FillItemSet( SfxItemSet* rSet ) SAL_OVERRIDE;
virtual void Reset( const SfxItemSet* rSet ) SAL_OVERRIDE;
virtual void ActivatePage( const SfxItemSet& rSet ) SAL_OVERRIDE;
virtual sfxpg DeactivatePage( SfxItemSet* pSet = 0 ) SAL_OVERRIDE;
};
// TabPage Format/Table/Columns
#define MET_FIELDS 6 //Number of the used MetricFields
class SwTableColumnPage : public SfxTabPage
{
VclPtr<CheckBox> m_pModifyTableCB;
VclPtr<CheckBox> m_pProportionalCB;
VclPtr<FixedText> m_pSpaceFT;
VclPtr<MetricField> m_pSpaceED;
VclPtr<PushButton> m_pUpBtn;
VclPtr<PushButton> m_pDownBtn;
SwTableRep* pTblData;
PercentField m_aFieldArr[MET_FIELDS];
VclPtr<FixedText> m_pTextArr[MET_FIELDS];
SwTwips nTableWidth;
SwTwips nMinWidth;
sal_uInt16 nNoOfCols;
sal_uInt16 nNoOfVisibleCols;
// Remember the width, when switching to autoalign
sal_uInt16 aValueTbl[MET_FIELDS];// primary assignment of the MetricFields
bool bModified:1;
bool bModifyTbl:1;
bool bPercentMode:1;
void Init(bool bWeb);
DECL_LINK( AutoClickHdl, void * );
void ModifyHdl( MetricField* pEdit );
DECL_LINK( UpHdl, MetricField * );
DECL_LINK( DownHdl, MetricField * );
DECL_LINK( LoseFocusHdl, MetricField * );
DECL_LINK( ModeHdl, CheckBox * );
void UpdateCols( sal_uInt16 nAktPos );
SwTwips GetVisibleWidth(sal_uInt16 nPos);
void SetVisibleWidth(sal_uInt16 nPos, SwTwips nNewWidth);
using TabPage::ActivatePage;
using TabPage::DeactivatePage;
public:
SwTableColumnPage( vcl::Window* pParent, const SfxItemSet& rSet );
virtual ~SwTableColumnPage();
virtual void dispose() SAL_OVERRIDE;
static VclPtr<SfxTabPage> Create( vcl::Window* pParent, const SfxItemSet* rAttrSet);
virtual bool FillItemSet( SfxItemSet* rSet ) SAL_OVERRIDE;
virtual void Reset( const SfxItemSet* rSet ) SAL_OVERRIDE;
virtual void ActivatePage( const SfxItemSet& rSet ) SAL_OVERRIDE;
virtual sfxpg DeactivatePage( SfxItemSet* pSet = 0 ) SAL_OVERRIDE;
};
class SwTextFlowPage : public SfxTabPage
{
VclPtr<CheckBox> m_pPgBrkCB;
VclPtr<RadioButton> m_pPgBrkRB;
VclPtr<RadioButton> m_pColBrkRB;
VclPtr<RadioButton> m_pPgBrkBeforeRB;
VclPtr<RadioButton> m_pPgBrkAfterRB;
VclPtr<CheckBox> m_pPageCollCB;
VclPtr<ListBox> m_pPageCollLB;
VclPtr<FixedText> m_pPageNoFT;
VclPtr<NumericField> m_pPageNoNF;
VclPtr<CheckBox> m_pSplitCB;
VclPtr<TriStateBox> m_pSplitRowCB;
VclPtr<CheckBox> m_pKeepCB;
VclPtr<CheckBox> m_pHeadLineCB;
VclPtr<NumericField> m_pRepeatHeaderNF;
VclPtr<VclContainer> m_pRepeatHeaderCombo;
VclPtr<ListBox> m_pTextDirectionLB;
VclPtr<ListBox> m_pVertOrientLB;
SwWrtShell* pShell;
bool bPageBreak;
bool bHtmlMode;
DECL_LINK(PageBreakHdl_Impl, void *);
DECL_LINK(ApplyCollClickHdl_Impl, void *);
DECL_LINK( PageBreakPosHdl_Impl, RadioButton* );
DECL_LINK( PageBreakTypeHdl_Impl, RadioButton* );
DECL_LINK( SplitHdl_Impl, CheckBox* );
DECL_STATIC_LINK( SwTextFlowPage, SplitRowHdl_Impl, TriStateBox* );
DECL_LINK( HeadLineCBClickHdl, void* p = 0 );
public:
SwTextFlowPage( vcl::Window* pParent, const SfxItemSet& rSet );
virtual ~SwTextFlowPage();
virtual void dispose() SAL_OVERRIDE;
static VclPtr<SfxTabPage> Create( vcl::Window* pParent, const SfxItemSet* rAttrSet);
virtual bool FillItemSet( SfxItemSet* rSet ) SAL_OVERRIDE;
virtual void Reset( const SfxItemSet* rSet ) SAL_OVERRIDE;
void SetShell(SwWrtShell* pSh);
void DisablePageBreak();
};
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|