1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: tablepg.hxx,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
30 #ifndef _SWTABLEPG_HXX
31 #define _SWTABLEPG_HXX
32 #include <sfx2/tabdlg.hxx>
33 #ifndef _FIXED_HXX //autogen
34 #include <vcl/fixed.hxx>
36 #ifndef _IMAGEBTN_HXX //autogen
37 #include <vcl/imagebtn.hxx>
39 #ifndef _LSTBOX_HXX //autogen
40 #include <vcl/lstbox.hxx>
42 #include <actctrl.hxx>
43 #include "prcntfld.hxx"
44 #include "swtypes.hxx"
45 #include "textcontrolcombo.hxx"
56 class SwFormatTablePage
: public SfxTabPage
60 TableNameEdit aNameED
;
62 PercentField aWidthMF
;
68 RadioButton aFromLeftBtn
;
69 RadioButton aRightBtn
;
70 RadioButton aCenterBtn
;
77 PercentField aRightMF
;
81 MetricField aBottomMF
;
83 FixedLine aPropertiesFL
;
84 FixedText aTextDirectionFT
;
85 ListBox aTextDirectionLB
;
89 SwTwips nMinTableWidth
;
96 void ModifyHdl( Edit
* pEdit
);
98 DECL_LINK( AutoClickHdl
, CheckBox
* );
99 DECL_LINK( RelWidthClickHdl
, CheckBox
* );
100 DECL_LINK( RightModifyHdl
, MetricField
* );
101 DECL_LINK( UpDownLoseFocusHdl
, MetricField
* );
103 using TabPage::ActivatePage
;
104 using TabPage::DeactivatePage
;
107 SwFormatTablePage( Window
* pParent
, const SfxItemSet
& rSet
);
109 static SfxTabPage
* Create( Window
* pParent
, const SfxItemSet
& rAttrSet
);
110 virtual BOOL
FillItemSet( SfxItemSet
& rSet
);
111 virtual void Reset( const SfxItemSet
& rSet
);
112 virtual void ActivatePage( const SfxItemSet
& rSet
);
113 virtual int DeactivatePage( SfxItemSet
* pSet
= 0 );
116 /*-------------------------------------------------------
117 TabPage Format/Tabelle/Spalten
118 --------------------------------------------------------- */
119 #define MET_FIELDS 6 //Anzahl der verwendeten MetricFields
121 class SwTableColumnPage
: public SfxTabPage
123 CheckBox aModifyTableCB
;
124 CheckBox aProportionalCB
;
126 MetricField aSpaceED
;
141 ImageButton aDownBtn
;
144 SwTableRep
* pTblData
;
145 PercentField
* pFieldArr
[MET_FIELDS
];
146 FixedText
* pTextArr
[MET_FIELDS
];
150 USHORT nNoOfVisibleCols
;
151 //Breite merken, wenn auf autom. Ausrichtung gestellt wird
152 USHORT aValueTbl
[MET_FIELDS
];//primaere Zuordnung der MetricFields
157 void Init(BOOL bWeb
);
158 DECL_LINK( AutoClickHdl
, CheckBox
* );
159 void ModifyHdl( PercentField
* pEdit
);
160 DECL_LINK( UpHdl
, PercentField
* );
161 DECL_LINK( DownHdl
, PercentField
* );
162 DECL_LINK( LoseFocusHdl
, PercentField
* );
163 DECL_LINK( ModeHdl
, CheckBox
* );
164 void UpdateCols( USHORT nAktPos
);
165 SwTwips
GetVisibleWidth(USHORT nPos
);
166 void SetVisibleWidth(USHORT nPos
, SwTwips nNewWidth
);
168 using TabPage::ActivatePage
;
169 using TabPage::DeactivatePage
;
172 SwTableColumnPage( Window
* pParent
, const SfxItemSet
& rSet
);
173 ~SwTableColumnPage();
175 static SfxTabPage
* Create( Window
* pParent
, const SfxItemSet
& rAttrSet
);
176 virtual BOOL
FillItemSet( SfxItemSet
& rSet
);
177 virtual void Reset( const SfxItemSet
& rSet
);
178 virtual void ActivatePage( const SfxItemSet
& rSet
);
179 virtual int DeactivatePage( SfxItemSet
* pSet
= 0 );
183 /*-----------------12.12.96 11.48-------------------
185 --------------------------------------------------*/
186 class SwTextFlowPage
: public SfxTabPage
190 RadioButton aPgBrkRB
;
191 RadioButton aColBrkRB
;
192 RadioButton aPgBrkBeforeRB
;
193 RadioButton aPgBrkAfterRB
;
194 CheckBox aPageCollCB
;
197 NumericField aPageNoNF
;
199 TriStateBox aSplitRowCB
;
201 CheckBox aHeadLineCB
;
202 FixedText aRepeatHeaderFT
; // "dummy" to build before and after FT
203 FixedText aRepeatHeaderBeforeFT
;
204 NumericField aRepeatHeaderNF
;
205 FixedText aRepeatHeaderAfterFT
;
206 TextControlCombo aRepeatHeaderCombo
;
207 FixedText aTextDirectionFT
;
208 ListBox aTextDirectionLB
;
210 FixedLine aVertOrientFL
;
211 FixedText aVertOrientFT
;
212 ListBox aVertOrientLB
;
220 DECL_LINK( PageBreakHdl_Impl
, CheckBox
* );
221 DECL_LINK( ApplyCollClickHdl_Impl
, CheckBox
* );
222 DECL_LINK( PageBreakPosHdl_Impl
, RadioButton
* );
223 DECL_LINK( PageBreakTypeHdl_Impl
, RadioButton
* );
224 DECL_LINK( SplitHdl_Impl
, CheckBox
* );
225 DECL_LINK( SplitRowHdl_Impl
, TriStateBox
* );
226 DECL_LINK( HeadLineCBClickHdl
, void* p
= 0 );
229 SwTextFlowPage( Window
* pParent
, const SfxItemSet
& rSet
);
233 static SfxTabPage
* Create( Window
* pParent
, const SfxItemSet
& rAttrSet
);
234 virtual BOOL
FillItemSet( SfxItemSet
& rSet
);
235 virtual void Reset( const SfxItemSet
& rSet
);
237 void SetShell(SwWrtShell
* pSh
);
239 void DisablePageBreak();