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: num.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 ************************************************************************/
34 #include <sfx2/tabdlg.hxx>
35 #ifndef _MENUBTN_HXX //autogen
36 #include <vcl/menubtn.hxx>
38 #ifndef _FIELD_HXX //autogen
39 #include <vcl/field.hxx>
41 #ifndef _FIXED_HXX //autogen
42 #include <vcl/fixed.hxx>
44 #include <svtools/stdctrl.hxx>
45 #ifndef _BUTTON_HXX //autogen
46 #include <vcl/button.hxx>
48 #ifndef _LSTBOX_HXX //autogen
49 #include <vcl/lstbox.hxx>
51 #ifndef _EDIT_HXX //autogen
52 #include <vcl/edit.hxx>
54 #include <svx/stddlg.hxx>
55 #include <numprevw.hxx>
56 #include "numrule.hxx"
60 class SwOutlineTabDialog
;
63 /*-----------------13.02.97 14.02-------------------
65 --------------------------------------------------*/
69 SvxBrushItem
* pBrushItem
;
74 /*-----------------07.02.97 15.37-------------------
76 --------------------------------------------------*/
77 #define NUM_PAGETYPE_BULLET 0
78 #define NUM_PAGETYPE_SINGLENUM 1
79 #define NUM_PAGETYPE_NUM 2
80 #define NUM_PAGETYPE_BMP 3
81 #define PAGETYPE_USER_START 10
83 /*-----------------03.12.97 10:18-------------------
85 --------------------------------------------------*/
86 class SwNumPositionTabPage
: public SfxTabPage
88 FixedLine aPositionFL
;
90 MultiListBox aLevelLB
;
92 // --> OD 2008-02-01 #newlistlevelattrs#
93 // former set of controls shown for numbering rules containing list level
94 // attributes in SvxNumberFormat::SvxNumPositionAndSpaceMode == LABEL_WIDTH_AND_POSITION
95 FixedText aDistBorderFT
;
96 MetricField aDistBorderMF
;
99 MetricField aIndentMF
;
100 FixedText aDistNumFT
;
101 MetricField aDistNumMF
;
106 // --> OD 2008-02-01 #newlistlevelattrs#
107 // new set of controls shown for numbering rules containing list level
108 // attributes in SvxNumberFormat::SvxNumPositionAndSpaceMode == LABEL_ALIGNMENT
109 FixedText aLabelFollowedByFT
;
110 ListBox aLabelFollowedByLB
;
111 FixedText aListtabFT
;
112 MetricField aListtabMF
;
115 FixedText aAlignedAtFT
;
116 MetricField aAlignedAtMF
;
117 FixedText aIndentAtFT
;
118 MetricField aIndentAtMF
;
121 PushButton aStandardPB
;
123 NumberingPreview aPreviewWIN
;
129 SwOutlineTabDialog
* pOutlineDlg
;
134 BOOL bInInintControl
: 1; //Modify-Fehler umgehen, soll ab 391 behoben sein
135 // --> OD 2008-02-01 #newlistlevelattrs#
136 bool bLabelAlignmentPosAndSpaceModeActive
;
141 DECL_LINK( LevelHdl
, ListBox
* );
142 DECL_LINK( EditModifyHdl
, Edit
*);
143 DECL_LINK( DistanceHdl
, MetricField
* );
144 DECL_LINK( RelativeHdl
, CheckBox
* );
145 DECL_LINK( StandardHdl
, PushButton
* );
147 // --> OD 2008-02-01 #newlistlevelattrs#
148 void InitPosAndSpaceMode();
149 void ShowControlsDependingOnPosAndSpaceMode();
151 DECL_LINK( LabelFollowedByHdl_Impl
, ListBox
* );
152 DECL_LINK( ListtabPosHdl_Impl
, MetricField
* );
153 DECL_LINK( AlignAtHdl_Impl
, MetricField
* );
154 DECL_LINK( IndentAtHdl_Impl
, MetricField
* );
157 using SfxTabPage::ActivatePage
;
158 using SfxTabPage::DeactivatePage
;
162 SwNumPositionTabPage(Window
* pParent
,
163 const SfxItemSet
& rSet
);
164 ~SwNumPositionTabPage();
166 virtual void ActivatePage(const SfxItemSet
& rSet
);
167 virtual int DeactivatePage(SfxItemSet
*pSet
);
168 virtual BOOL
FillItemSet( SfxItemSet
& rSet
);
169 virtual void Reset( const SfxItemSet
& rSet
);
171 static SfxTabPage
* Create( Window
* pParent
,
172 const SfxItemSet
& rAttrSet
);
174 void SetOutlineTabDialog(SwOutlineTabDialog
* pDlg
){pOutlineDlg
= pDlg
;}
175 void SetWrtShell(SwWrtShell
* pSh
);
176 #if OSL_DEBUG_LEVEL > 1
177 void SetModified(BOOL bRepaint
= TRUE
);
179 void SetModified(BOOL bRepaint
= TRUE
)
183 aPreviewWIN
.SetLevel(nActNumLvl
);
184 aPreviewWIN
.Invalidate();
190 class SwSvxNumBulletTabDialog
: public SfxTabDialog
195 int nRetOptionsDialog
;
199 virtual void PageCreated(USHORT nPageId
, SfxTabPage
& rPage
);
200 DECL_LINK(RemoveNumberingHdl
, PushButton
*);
202 SwSvxNumBulletTabDialog(Window
* pParent
,
203 const SfxItemSet
* pSwItemSet
,
205 ~SwSvxNumBulletTabDialog();