1 /************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance 9 * with the License. You may obtain a copy of the License at 10 * 11 * http://www.apache.org/licenses/LICENSE-2.0 12 * 13 * Unless required by applicable law or agreed to in writing, 14 * software distributed under the License is distributed on an 15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 * KIND, either express or implied. See the License for the 17 * specific language governing permissions and limitations 18 * under the License. 19 * 20 *************************************************************/ 21 22 23 #ifndef _NUM_HXX 24 #define _NUM_HXX 25 26 27 #include <sfx2/tabdlg.hxx> 28 #ifndef _MENUBTN_HXX //autogen 29 #include <vcl/menubtn.hxx> 30 #endif 31 #ifndef _FIELD_HXX //autogen 32 #include <vcl/field.hxx> 33 #endif 34 #ifndef _FIXED_HXX //autogen 35 #include <vcl/fixed.hxx> 36 #endif 37 #include <svtools/stdctrl.hxx> 38 #ifndef _BUTTON_HXX //autogen 39 #include <vcl/button.hxx> 40 #endif 41 #ifndef _LSTBOX_HXX //autogen 42 #include <vcl/lstbox.hxx> 43 #endif 44 #ifndef _EDIT_HXX //autogen 45 #include <vcl/edit.hxx> 46 #endif 47 #include <svx/stddlg.hxx> 48 #include <numprevw.hxx> 49 #include "numrule.hxx" 50 51 class SwWrtShell; 52 class SvxBrushItem; 53 class SwOutlineTabDialog; 54 55 56 /*-----------------13.02.97 14.02------------------- 57 58 --------------------------------------------------*/ 59 60 struct SwBmpItemInfo 61 { 62 SvxBrushItem* pBrushItem; 63 sal_uInt16 nItemId; 64 }; 65 66 67 /*-----------------07.02.97 15.37------------------- 68 69 --------------------------------------------------*/ 70 #define NUM_PAGETYPE_BULLET 0 71 #define NUM_PAGETYPE_SINGLENUM 1 72 #define NUM_PAGETYPE_NUM 2 73 #define NUM_PAGETYPE_BMP 3 74 #define PAGETYPE_USER_START 10 75 76 /*-----------------03.12.97 10:18------------------- 77 78 --------------------------------------------------*/ 79 class SwNumPositionTabPage : public SfxTabPage 80 { 81 FixedLine aLevelFL; 82 MultiListBox aLevelLB; 83 84 // --> OD 2008-02-01 #newlistlevelattrs# 85 // former set of controls shown for numbering rules containing list level 86 // attributes in SvxNumberFormat::SvxNumPositionAndSpaceMode == LABEL_WIDTH_AND_POSITION 87 FixedLine aPositionFL; 88 FixedText aDistBorderFT; 89 MetricField aDistBorderMF; 90 CheckBox aRelativeCB; 91 FixedText aIndentFT; 92 MetricField aIndentMF; 93 FixedText aDistNumFT; 94 MetricField aDistNumMF; 95 FixedText aAlignFT; 96 ListBox aAlignLB; 97 // <-- 98 99 // --> OD 2008-02-01 #newlistlevelattrs# 100 // new set of controls shown for numbering rules containing list level 101 // attributes in SvxNumberFormat::SvxNumPositionAndSpaceMode == LABEL_ALIGNMENT 102 FixedText aLabelFollowedByFT; 103 ListBox aLabelFollowedByLB; 104 FixedText aListtabFT; 105 MetricField aListtabMF; 106 FixedText aAlign2FT; 107 ListBox aAlign2LB; 108 FixedText aAlignedAtFT; 109 MetricField aAlignedAtMF; 110 FixedText aIndentAtFT; 111 MetricField aIndentAtMF; 112 // <-- 113 114 PushButton aStandardPB; 115 116 NumberingPreview aPreviewWIN; 117 118 SwNumRule* pActNum; 119 SwNumRule* pSaveNum; 120 SwWrtShell* pWrtSh; 121 122 SwOutlineTabDialog* pOutlineDlg; 123 sal_uInt16 nActNumLvl; 124 125 sal_Bool bModified : 1; 126 sal_Bool bPreset : 1; 127 sal_Bool bInInintControl : 1; //Modify-Fehler umgehen, soll ab 391 behoben sein 128 // --> OD 2008-02-01 #newlistlevelattrs# 129 bool bLabelAlignmentPosAndSpaceModeActive; 130 // <-- 131 132 void InitControls(); 133 134 DECL_LINK( LevelHdl, ListBox * ); 135 DECL_LINK( EditModifyHdl, Edit*); 136 DECL_LINK( DistanceHdl, MetricField * ); 137 DECL_LINK( RelativeHdl, CheckBox * ); 138 DECL_LINK( StandardHdl, PushButton * ); 139 140 // --> OD 2008-02-01 #newlistlevelattrs# 141 void InitPosAndSpaceMode(); 142 void ShowControlsDependingOnPosAndSpaceMode(); 143 144 DECL_LINK( LabelFollowedByHdl_Impl, ListBox* ); 145 DECL_LINK( ListtabPosHdl_Impl, MetricField* ); 146 DECL_LINK( AlignAtHdl_Impl, MetricField* ); 147 DECL_LINK( IndentAtHdl_Impl, MetricField* ); 148 // <-- 149 150 using SfxTabPage::ActivatePage; 151 using SfxTabPage::DeactivatePage; 152 153 public: 154 155 SwNumPositionTabPage(Window* pParent, 156 const SfxItemSet& rSet); 157 ~SwNumPositionTabPage(); 158 159 virtual void ActivatePage(const SfxItemSet& rSet); 160 virtual int DeactivatePage(SfxItemSet *pSet); 161 virtual sal_Bool FillItemSet( SfxItemSet& rSet ); 162 virtual void Reset( const SfxItemSet& rSet ); 163 164 static SfxTabPage* Create( Window* pParent, 165 const SfxItemSet& rAttrSet); 166 SetOutlineTabDialog(SwOutlineTabDialog * pDlg)167 void SetOutlineTabDialog(SwOutlineTabDialog* pDlg){pOutlineDlg = pDlg;} 168 void SetWrtShell(SwWrtShell* pSh); 169 #if OSL_DEBUG_LEVEL > 1 170 void SetModified(sal_Bool bRepaint = sal_True); 171 #else SetModified(sal_Bool bRepaint=sal_True)172 void SetModified(sal_Bool bRepaint = sal_True) 173 { bModified = sal_True; 174 if(bRepaint) 175 { 176 aPreviewWIN.SetLevel(nActNumLvl); 177 aPreviewWIN.Invalidate(); 178 } 179 } 180 #endif 181 }; 182 183 class SwSvxNumBulletTabDialog : public SfxTabDialog 184 { 185 SwWrtShell& rWrtSh; 186 187 String sRemoveText; 188 int nRetOptionsDialog; 189 190 protected: 191 virtual short Ok(); 192 virtual void PageCreated(sal_uInt16 nPageId, SfxTabPage& rPage); 193 DECL_LINK(RemoveNumberingHdl, PushButton*); 194 public: 195 SwSvxNumBulletTabDialog(Window* pParent, 196 const SfxItemSet* pSwItemSet, 197 SwWrtShell &); 198 ~SwSvxNumBulletTabDialog(); 199 }; 200 #endif // _NUM_CXX 201 202