1 /************************************************************************* 2 * 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * Copyright 2000, 2010 Oracle and/or its affiliates. 6 * 7 * OpenOffice.org - a multi-platform office productivity suite 8 * 9 * This file is part of OpenOffice.org. 10 * 11 * OpenOffice.org is free software: you can redistribute it and/or modify 12 * it under the terms of the GNU Lesser General Public License version 3 13 * only, as published by the Free Software Foundation. 14 * 15 * OpenOffice.org is distributed in the hope that it will be useful, 16 * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 * GNU Lesser General Public License version 3 for more details 19 * (a copy is included in the LICENSE file that accompanied this code). 20 * 21 * You should have received a copy of the GNU Lesser General Public License 22 * version 3 along with OpenOffice.org. If not, see 23 * <http://www.openoffice.org/license.html> 24 * for a copy of the LGPLv3 License. 25 * 26 ************************************************************************/ 27 #ifndef _OUTLINE_HXX 28 #define _OUTLINE_HXX 29 30 #include <sfx2/tabdlg.hxx> 31 32 33 #include <vcl/menu.hxx> 34 35 #ifndef _BUTTON_HXX //autogen 36 #include <vcl/button.hxx> 37 #endif 38 #include <svtools/stdctrl.hxx> 39 40 #ifndef _FIXED_HXX //autogen 41 #include <vcl/fixed.hxx> 42 #endif 43 44 #ifndef _LSTBOX_HXX //autogen 45 #include <vcl/lstbox.hxx> 46 #endif 47 48 #ifndef _EDIT_HXX //autogen 49 #include <vcl/edit.hxx> 50 #endif 51 52 #ifndef _FIELD_HXX //autogen 53 #include <vcl/field.hxx> 54 #endif 55 56 #include "swtypes.hxx" //fuer MAXLEVEL 57 #include <numprevw.hxx> 58 #include <numberingtypelistbox.hxx> 59 60 class SwWrtShell; 61 class SwNumRule; 62 class SwChapterNumRules; 63 64 /* -----------------07.07.98 13:38------------------- 65 * 66 * --------------------------------------------------*/ 67 class SwOutlineTabDialog : public SfxTabDialog 68 { 69 static sal_uInt16 nNumLevel; 70 71 String aNullStr; 72 String aCollNames[MAXLEVEL]; 73 PopupMenu aFormMenu; 74 75 SwWrtShell& rWrtSh; 76 SwNumRule* pNumRule; 77 SwChapterNumRules* pChapterNumRules; 78 79 sal_Bool bModified : 1; 80 81 protected: 82 DECL_LINK( CancelHdl, Button * ); 83 DECL_LINK( FormHdl, Button * ); 84 DECL_LINK( MenuSelectHdl, Menu * ); 85 86 virtual void PageCreated(sal_uInt16 nPageId, SfxTabPage& rPage); 87 virtual short Ok(); 88 89 public: 90 SwOutlineTabDialog(Window* pParent, 91 const SfxItemSet* pSwItemSet, 92 SwWrtShell &); 93 ~SwOutlineTabDialog(); 94 95 SwNumRule* GetNumRule() {return pNumRule;} 96 sal_uInt16 GetLevel(const String &rFmtName) const; 97 String* GetCollNames() {return aCollNames;} 98 99 static sal_uInt16 GetActNumLevel() {return nNumLevel;} 100 static void SetActNumLevel(sal_uInt16 nSet) {nNumLevel = nSet;} 101 }; 102 /* -----------------07.07.98 13:47------------------- 103 * 104 * --------------------------------------------------*/ 105 class SwOutlineSettingsTabPage : public SfxTabPage 106 { 107 FixedLine aLevelFL; 108 ListBox aLevelLB; 109 110 FixedLine aNumberFL; 111 FixedText aCollLbl; 112 ListBox aCollBox; 113 FixedText aNumberLbl; 114 SwNumberingTypeListBox aNumberBox; 115 FixedText aCharFmtFT; 116 ListBox aCharFmtLB; 117 FixedText aAllLevelFT; 118 NumericField aAllLevelNF; 119 FixedText aDelim; 120 FixedText aPrefixFT; 121 Edit aPrefixED; 122 FixedText aSuffixFT; 123 Edit aSuffixED; 124 FixedText aStartLbl; 125 NumericField aStartEdit; 126 NumberingPreview aPreviewWIN; 127 128 String aNoFmtName; 129 String aSaveCollNames[MAXLEVEL]; 130 SwWrtShell* pSh; 131 SwNumRule* pNumRule; 132 String* pCollNames; 133 sal_uInt16 nActLevel; 134 135 DECL_LINK( LevelHdl, ListBox * ); 136 DECL_LINK( ToggleComplete, NumericField * ); 137 DECL_LINK( CollSelect, ListBox * ); 138 DECL_LINK( CollSelectGetFocus, ListBox * ); 139 DECL_LINK( NumberSelect, SwNumberingTypeListBox * ); 140 DECL_LINK( DelimModify, Edit * ); 141 DECL_LINK( StartModified, NumericField * ); 142 DECL_LINK( CharFmtHdl, ListBox * ); 143 144 void Update(); 145 146 void SetModified(){aPreviewWIN.Invalidate();} 147 void CheckForStartValue_Impl(sal_uInt16 nNumberingType); 148 149 using SfxTabPage::ActivatePage; 150 using SfxTabPage::DeactivatePage; 151 152 public: 153 SwOutlineSettingsTabPage(Window* pParent, const SfxItemSet& rSet); 154 ~SwOutlineSettingsTabPage(); 155 156 void SetWrtShell(SwWrtShell* pShell); 157 158 virtual void ActivatePage(const SfxItemSet& rSet); 159 virtual int DeactivatePage(SfxItemSet *pSet); 160 161 virtual sal_Bool FillItemSet( SfxItemSet& rSet ); 162 virtual void Reset( const SfxItemSet& rSet ); 163 static SfxTabPage* Create( Window* pParent, 164 const SfxItemSet& rAttrSet); 165 }; 166 #endif 167