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: outline.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 ************************************************************************/
33 #include <sfx2/tabdlg.hxx>
36 #include <vcl/menu.hxx>
38 #ifndef _BUTTON_HXX //autogen
39 #include <vcl/button.hxx>
41 #include <svtools/stdctrl.hxx>
43 #ifndef _FIXED_HXX //autogen
44 #include <vcl/fixed.hxx>
47 #ifndef _LSTBOX_HXX //autogen
48 #include <vcl/lstbox.hxx>
51 #ifndef _EDIT_HXX //autogen
52 #include <vcl/edit.hxx>
55 #ifndef _FIELD_HXX //autogen
56 #include <vcl/field.hxx>
59 #include "swtypes.hxx" //fuer MAXLEVEL
60 #include <numprevw.hxx>
61 #include <numberingtypelistbox.hxx>
65 class SwChapterNumRules
;
67 /* -----------------07.07.98 13:38-------------------
69 * --------------------------------------------------*/
70 class SwOutlineTabDialog
: public SfxTabDialog
72 static USHORT nNumLevel
;
75 String aCollNames
[MAXLEVEL
];
80 SwChapterNumRules
* pChapterNumRules
;
85 DECL_LINK( CancelHdl
, Button
* );
86 DECL_LINK( FormHdl
, Button
* );
87 DECL_LINK( MenuSelectHdl
, Menu
* );
89 virtual void PageCreated(USHORT nPageId
, SfxTabPage
& rPage
);
93 SwOutlineTabDialog(Window
* pParent
,
94 const SfxItemSet
* pSwItemSet
,
96 ~SwOutlineTabDialog();
98 SwNumRule
* GetNumRule() {return pNumRule
;}
99 USHORT
GetLevel(const String
&rFmtName
) const;
100 String
* GetCollNames() {return aCollNames
;}
102 static USHORT
GetActNumLevel() {return nNumLevel
;}
103 static void SetActNumLevel(USHORT nSet
) {nNumLevel
= nSet
;}
105 /* -----------------07.07.98 13:47-------------------
107 * --------------------------------------------------*/
108 class SwOutlineSettingsTabPage
: public SfxTabPage
115 FixedText aNumberLbl
;
116 SwNumberingTypeListBox aNumberBox
;
117 FixedText aCharFmtFT
;
119 FixedText aAllLevelFT
;
120 NumericField aAllLevelNF
;
127 NumericField aStartEdit
;
129 NumberingPreview aPreviewWIN
;
132 String aSaveCollNames
[MAXLEVEL
];
138 DECL_LINK( LevelHdl
, ListBox
* );
139 DECL_LINK( ToggleComplete
, NumericField
* );
140 DECL_LINK( CollSelect
, ListBox
* );
141 DECL_LINK( CollSelectGetFocus
, ListBox
* );
142 DECL_LINK( NumberSelect
, SwNumberingTypeListBox
* );
143 DECL_LINK( DelimModify
, Edit
* );
144 DECL_LINK( StartModified
, NumericField
* );
145 DECL_LINK( CharFmtHdl
, ListBox
* );
149 void SetModified(){aPreviewWIN
.Invalidate();}
150 void CheckForStartValue_Impl(sal_uInt16 nNumberingType
);
152 using SfxTabPage::ActivatePage
;
153 using SfxTabPage::DeactivatePage
;
156 SwOutlineSettingsTabPage(Window
* pParent
, const SfxItemSet
& rSet
);
157 ~SwOutlineSettingsTabPage();
159 void SetWrtShell(SwWrtShell
* pShell
);
161 virtual void ActivatePage(const SfxItemSet
& rSet
);
162 virtual int DeactivatePage(SfxItemSet
*pSet
);
164 virtual BOOL
FillItemSet( SfxItemSet
& rSet
);
165 virtual void Reset( const SfxItemSet
& rSet
);
166 static SfxTabPage
* Create( Window
* pParent
,
167 const SfxItemSet
& rAttrSet
);