1*1d2dbeb0SAndrew Rist /************************************************************** 2cdf0e10cSrcweir * 3*1d2dbeb0SAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 4*1d2dbeb0SAndrew Rist * or more contributor license agreements. See the NOTICE file 5*1d2dbeb0SAndrew Rist * distributed with this work for additional information 6*1d2dbeb0SAndrew Rist * regarding copyright ownership. The ASF licenses this file 7*1d2dbeb0SAndrew Rist * to you under the Apache License, Version 2.0 (the 8*1d2dbeb0SAndrew Rist * "License"); you may not use this file except in compliance 9*1d2dbeb0SAndrew Rist * with the License. You may obtain a copy of the License at 10cdf0e10cSrcweir * 11*1d2dbeb0SAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 12cdf0e10cSrcweir * 13*1d2dbeb0SAndrew Rist * Unless required by applicable law or agreed to in writing, 14*1d2dbeb0SAndrew Rist * software distributed under the License is distributed on an 15*1d2dbeb0SAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16*1d2dbeb0SAndrew Rist * KIND, either express or implied. See the License for the 17*1d2dbeb0SAndrew Rist * specific language governing permissions and limitations 18*1d2dbeb0SAndrew Rist * under the License. 19cdf0e10cSrcweir * 20*1d2dbeb0SAndrew Rist *************************************************************/ 21*1d2dbeb0SAndrew Rist 22*1d2dbeb0SAndrew Rist 23cdf0e10cSrcweir #ifndef _SWUI_CNTTAB_HXX 24cdf0e10cSrcweir #define _SWUI_CNTTAB_HXX 25cdf0e10cSrcweir 26cdf0e10cSrcweir #include <svx/stddlg.hxx> 27cdf0e10cSrcweir 28cdf0e10cSrcweir #ifndef _BUTTON_HXX //autogen 29cdf0e10cSrcweir #include <vcl/button.hxx> 30cdf0e10cSrcweir #endif 31cdf0e10cSrcweir 32cdf0e10cSrcweir #ifndef _EDIT_HXX //autogen 33cdf0e10cSrcweir #include <vcl/edit.hxx> 34cdf0e10cSrcweir #endif 35cdf0e10cSrcweir 36cdf0e10cSrcweir #ifndef _FIXED_HXX //autogen 37cdf0e10cSrcweir #include <vcl/fixed.hxx> 38cdf0e10cSrcweir #endif 39cdf0e10cSrcweir 40cdf0e10cSrcweir #ifndef _FIELD_HXX //autogen 41cdf0e10cSrcweir #include <vcl/field.hxx> 42cdf0e10cSrcweir #endif 43cdf0e10cSrcweir #include <vcl/lstbox.hxx> 44cdf0e10cSrcweir #include <sfx2/tabdlg.hxx> 45cdf0e10cSrcweir 46cdf0e10cSrcweir #include "tox.hxx" 47cdf0e10cSrcweir #include <tools/list.hxx> 48cdf0e10cSrcweir #include <toxmgr.hxx> 49cdf0e10cSrcweir #include <svx/checklbx.hxx> 50cdf0e10cSrcweir #include <tools/resary.hxx> 51cdf0e10cSrcweir #include <svtools/svtreebx.hxx> 52cdf0e10cSrcweir #include <vcl/menubtn.hxx> 53cdf0e10cSrcweir #include <svx/langbox.hxx> 54cdf0e10cSrcweir #include <cnttab.hxx> 55cdf0e10cSrcweir class SwWrtShell; 56cdf0e10cSrcweir class SwTOXMgr; 57cdf0e10cSrcweir namespace com{namespace sun{namespace star{ 58cdf0e10cSrcweir namespace text{ 59cdf0e10cSrcweir class XTextSection; 60cdf0e10cSrcweir class XDocumentIndex; 61cdf0e10cSrcweir } 62cdf0e10cSrcweir }}} 63cdf0e10cSrcweir 64cdf0e10cSrcweir //----------------------------------------------------------------------------- 65cdf0e10cSrcweir struct SwIndexSections_Impl 66cdf0e10cSrcweir { 67cdf0e10cSrcweir com::sun::star::uno::Reference< com::sun::star::text::XTextSection > xContainerSection; 68cdf0e10cSrcweir com::sun::star::uno::Reference< com::sun::star::text::XDocumentIndex > xDocumentIndex; 69cdf0e10cSrcweir }; 70cdf0e10cSrcweir 71cdf0e10cSrcweir //----------------------------------------------------------------------------- 72cdf0e10cSrcweir class SwOneExampleFrame; 73cdf0e10cSrcweir struct SwIndexSections_Impl; 74cdf0e10cSrcweir 75cdf0e10cSrcweir class SwMultiTOXTabDialog : public SfxTabDialog 76cdf0e10cSrcweir { 77cdf0e10cSrcweir Window aExampleContainerWIN; 78cdf0e10cSrcweir Window aExampleWIN; 79cdf0e10cSrcweir CheckBox aShowExampleCB; 80cdf0e10cSrcweir SwTOXMgr* pMgr; 81cdf0e10cSrcweir SwWrtShell& rSh; 82cdf0e10cSrcweir 83cdf0e10cSrcweir SwOneExampleFrame* pExampleFrame; 84cdf0e10cSrcweir 85cdf0e10cSrcweir SwTOXDescription** pDescArr; // 86cdf0e10cSrcweir SwForm** pFormArr; // 87cdf0e10cSrcweir SwIndexSections_Impl** pxIndexSectionsArr; 88cdf0e10cSrcweir 89cdf0e10cSrcweir SwTOXBase* pParamTOXBase; 90cdf0e10cSrcweir 91cdf0e10cSrcweir CurTOXType eCurrentTOXType; 92cdf0e10cSrcweir 93cdf0e10cSrcweir String sUserDefinedIndex; 94cdf0e10cSrcweir sal_uInt16 nTypeCount; 95cdf0e10cSrcweir sal_uInt16 nInitialTOXType; 96cdf0e10cSrcweir 97cdf0e10cSrcweir sal_Bool bEditTOX; 98cdf0e10cSrcweir sal_Bool bExampleCreated; 99cdf0e10cSrcweir sal_Bool bGlobalFlag; 100cdf0e10cSrcweir 101cdf0e10cSrcweir virtual short Ok(); 102cdf0e10cSrcweir SwTOXDescription* CreateTOXDescFromTOXBase(const SwTOXBase*pCurTOX); 103cdf0e10cSrcweir 104cdf0e10cSrcweir DECL_LINK(CreateExample_Hdl, void* ); 105cdf0e10cSrcweir DECL_LINK(ShowPreviewHdl, CheckBox*); 106cdf0e10cSrcweir 107cdf0e10cSrcweir public: 108cdf0e10cSrcweir SwMultiTOXTabDialog(Window* pParent, const SfxItemSet& rSet, 109cdf0e10cSrcweir SwWrtShell &rShell, 110cdf0e10cSrcweir SwTOXBase* pCurTOX, sal_uInt16 nToxType = USHRT_MAX, 111cdf0e10cSrcweir sal_Bool bGlobal = sal_False); 112cdf0e10cSrcweir ~SwMultiTOXTabDialog(); 113cdf0e10cSrcweir 114cdf0e10cSrcweir virtual void PageCreated( sal_uInt16 nId, SfxTabPage &rPage ); 115cdf0e10cSrcweir 116cdf0e10cSrcweir SwForm* GetForm(CurTOXType eType); 117cdf0e10cSrcweir 118cdf0e10cSrcweir CurTOXType GetCurrentTOXType() const { return eCurrentTOXType;} 119cdf0e10cSrcweir void SetCurrentTOXType(CurTOXType eSet) 120cdf0e10cSrcweir { 121cdf0e10cSrcweir eCurrentTOXType = eSet; 122cdf0e10cSrcweir } 123cdf0e10cSrcweir 124cdf0e10cSrcweir void UpdateExample(); 125cdf0e10cSrcweir sal_Bool IsTOXEditMode() const { return bEditTOX;} 126cdf0e10cSrcweir 127cdf0e10cSrcweir SwWrtShell& GetWrtShell() {return rSh;} 128cdf0e10cSrcweir 129cdf0e10cSrcweir SwTOXDescription& GetTOXDescription(CurTOXType eTOXTypes); 130cdf0e10cSrcweir void CreateOrUpdateExample( 131cdf0e10cSrcweir TOXTypes nTOXIndex, sal_uInt16 nPage = 0, sal_uInt16 nCurLevel = USHRT_MAX); 132cdf0e10cSrcweir 133cdf0e10cSrcweir static sal_Bool IsNoNum(SwWrtShell& rSh, const String& rName); 134cdf0e10cSrcweir }; 135cdf0e10cSrcweir /* -----------------14.07.99 12:17------------------- 136cdf0e10cSrcweir 137cdf0e10cSrcweir --------------------------------------------------*/ 138cdf0e10cSrcweir class IndexEntryRessource; 139cdf0e10cSrcweir class IndexEntrySupplierWrapper; 140cdf0e10cSrcweir 141cdf0e10cSrcweir class SwTOXSelectTabPage : public SfxTabPage 142cdf0e10cSrcweir { 143cdf0e10cSrcweir FixedLine aTypeTitleFL; 144cdf0e10cSrcweir FixedText aTitleFT; 145cdf0e10cSrcweir Edit aTitleED; 146cdf0e10cSrcweir FixedText aTypeFT; 147cdf0e10cSrcweir ListBox aTypeLB; 148cdf0e10cSrcweir CheckBox aReadOnlyCB; 149cdf0e10cSrcweir 150cdf0e10cSrcweir FixedLine aAreaFL; 151cdf0e10cSrcweir FixedText aAreaFT; 152cdf0e10cSrcweir ListBox aAreaLB; 153cdf0e10cSrcweir FixedText aLevelFT; //content, user 154cdf0e10cSrcweir NumericField aLevelNF; //content, user 155cdf0e10cSrcweir 156cdf0e10cSrcweir //content 157cdf0e10cSrcweir FixedLine aCreateFromFL; // content, user, illustration 158cdf0e10cSrcweir CheckBox aFromHeadingsCB; 159cdf0e10cSrcweir // PushButton aChapterDlgPB; //#outline level,removed by zhaojianwei 160cdf0e10cSrcweir CheckBox aAddStylesCB; 161cdf0e10cSrcweir PushButton aAddStylesPB; 162cdf0e10cSrcweir Point aAddStylesPosDef; 163cdf0e10cSrcweir Point aAddStylesPosUser; 164cdf0e10cSrcweir //user 165cdf0e10cSrcweir CheckBox aFromTablesCB; 166cdf0e10cSrcweir CheckBox aFromFramesCB; 167cdf0e10cSrcweir CheckBox aFromGraphicsCB; 168cdf0e10cSrcweir CheckBox aFromOLECB; 169cdf0e10cSrcweir CheckBox aLevelFromChapterCB; 170cdf0e10cSrcweir 171cdf0e10cSrcweir //illustration + table 172cdf0e10cSrcweir RadioButton aFromCaptionsRB; 173cdf0e10cSrcweir RadioButton aFromObjectNamesRB; 174cdf0e10cSrcweir 175cdf0e10cSrcweir //illustration and tables 176cdf0e10cSrcweir FixedText aCaptionSequenceFT; 177cdf0e10cSrcweir ListBox aCaptionSequenceLB; 178cdf0e10cSrcweir FixedText aDisplayTypeFT; 179cdf0e10cSrcweir ListBox aDisplayTypeLB; 180cdf0e10cSrcweir 181cdf0e10cSrcweir //all but illustration and table 182cdf0e10cSrcweir CheckBox aTOXMarksCB; 183cdf0e10cSrcweir 184cdf0e10cSrcweir // 185cdf0e10cSrcweir 186cdf0e10cSrcweir //index only 187cdf0e10cSrcweir FixedLine aIdxOptionsFL; 188cdf0e10cSrcweir CheckBox aCollectSameCB; 189cdf0e10cSrcweir CheckBox aUseFFCB; 190cdf0e10cSrcweir CheckBox aUseDashCB; 191cdf0e10cSrcweir CheckBox aCaseSensitiveCB; 192cdf0e10cSrcweir CheckBox aInitialCapsCB; 193cdf0e10cSrcweir CheckBox aKeyAsEntryCB; 194cdf0e10cSrcweir CheckBox aFromFileCB; 195cdf0e10cSrcweir MenuButton aAutoMarkPB; 196cdf0e10cSrcweir 197cdf0e10cSrcweir // object only 198cdf0e10cSrcweir SwOLENames aFromNames; 199cdf0e10cSrcweir SvxCheckListBox aFromObjCLB; 200cdf0e10cSrcweir FixedLine aFromObjFL; 201cdf0e10cSrcweir 202cdf0e10cSrcweir CheckBox aSequenceCB; 203cdf0e10cSrcweir FixedText aBracketFT; 204cdf0e10cSrcweir ListBox aBracketLB; 205cdf0e10cSrcweir FixedLine aAuthorityFormatFL; 206cdf0e10cSrcweir 207cdf0e10cSrcweir //all 208cdf0e10cSrcweir FixedLine aSortOptionsFL; 209cdf0e10cSrcweir FixedText aLanguageFT; 210cdf0e10cSrcweir SvxLanguageBox aLanguageLB; 211cdf0e10cSrcweir FixedText aSortAlgorithmFT; 212cdf0e10cSrcweir ListBox aSortAlgorithmLB; 213cdf0e10cSrcweir 214cdf0e10cSrcweir IndexEntryRessource* pIndexRes; 215cdf0e10cSrcweir 216cdf0e10cSrcweir Point aCBLeftPos1; 217cdf0e10cSrcweir Point aCBLeftPos2; 218cdf0e10cSrcweir Point aCBLeftPos3; 219cdf0e10cSrcweir 220cdf0e10cSrcweir String aStyleArr[MAXLEVEL]; 221cdf0e10cSrcweir String sAutoMarkURL; 222cdf0e10cSrcweir String sAutoMarkType; 223cdf0e10cSrcweir String sAddStyleUser; 224cdf0e10cSrcweir String sAddStyleContent; 225cdf0e10cSrcweir 226cdf0e10cSrcweir const IndexEntrySupplierWrapper* pIndexEntryWrapper; 227cdf0e10cSrcweir 228cdf0e10cSrcweir sal_Bool bFirstCall; 229cdf0e10cSrcweir 230cdf0e10cSrcweir DECL_LINK(TOXTypeHdl, ListBox* ); 231cdf0e10cSrcweir DECL_LINK(TOXAreaHdl, ListBox* ); 232cdf0e10cSrcweir // DECL_LINK(ChapterHdl, PushButton* ); //#outline level,removed by zhaojianwei 233cdf0e10cSrcweir DECL_LINK(AddStylesHdl, PushButton* ); 234cdf0e10cSrcweir DECL_LINK(MenuEnableHdl, Menu*); 235cdf0e10cSrcweir DECL_LINK(MenuExecuteHdl, Menu*); 236cdf0e10cSrcweir DECL_LINK(LanguageHdl, ListBox*); 237cdf0e10cSrcweir 238cdf0e10cSrcweir DECL_LINK(CheckBoxHdl, CheckBox* ); 239cdf0e10cSrcweir DECL_LINK(RadioButtonHdl, RadioButton* ); 240cdf0e10cSrcweir DECL_LINK(ModifyHdl, void*); 241cdf0e10cSrcweir 242cdf0e10cSrcweir void ApplyTOXDescription(); 243cdf0e10cSrcweir void FillTOXDescription(); 244cdf0e10cSrcweir 245cdf0e10cSrcweir using SfxTabPage::ActivatePage; 246cdf0e10cSrcweir using SfxTabPage::DeactivatePage; 247cdf0e10cSrcweir 248cdf0e10cSrcweir public: 249cdf0e10cSrcweir SwTOXSelectTabPage(Window* pParent, const SfxItemSet& rAttrSet); 250cdf0e10cSrcweir ~SwTOXSelectTabPage(); 251cdf0e10cSrcweir 252cdf0e10cSrcweir virtual sal_Bool FillItemSet( SfxItemSet& ); 253cdf0e10cSrcweir virtual void Reset( const SfxItemSet& ); 254cdf0e10cSrcweir 255cdf0e10cSrcweir virtual void ActivatePage( const SfxItemSet& ); 256cdf0e10cSrcweir virtual int DeactivatePage( SfxItemSet* pSet = 0 ); 257cdf0e10cSrcweir 258cdf0e10cSrcweir static SfxTabPage* Create( Window* pParent, 259cdf0e10cSrcweir const SfxItemSet& rAttrSet); 260cdf0e10cSrcweir 261cdf0e10cSrcweir void SelectType(TOXTypes eSet); //preset TOXType, GlobalDoc 262cdf0e10cSrcweir void SetWrtShell(SwWrtShell& rSh); 263cdf0e10cSrcweir }; 264cdf0e10cSrcweir /* -----------------16.06.99 08:33------------------- 265cdf0e10cSrcweir 266cdf0e10cSrcweir --------------------------------------------------*/ 267cdf0e10cSrcweir 268cdf0e10cSrcweir DECLARE_LIST(TOXControlList, Control*) 269cdf0e10cSrcweir 270cdf0e10cSrcweir class SwTOXEdit; 271cdf0e10cSrcweir class SwTOXButton; 272cdf0e10cSrcweir class SwTOXEntryTabPage; 273cdf0e10cSrcweir 274cdf0e10cSrcweir class SwTokenWindow : public Window 275cdf0e10cSrcweir { 276cdf0e10cSrcweir ImageButton aLeftScrollWin; 277cdf0e10cSrcweir Window aCtrlParentWin; 278cdf0e10cSrcweir ImageButton aRightScrollWin; 279cdf0e10cSrcweir TOXControlList aControlList; 280cdf0e10cSrcweir SwForm* pForm; 281cdf0e10cSrcweir sal_uInt16 nLevel; 282cdf0e10cSrcweir sal_Bool bValid; 283cdf0e10cSrcweir String aButtonTexts[TOKEN_END]; // Text of the buttons 284cdf0e10cSrcweir String aButtonHelpTexts[TOKEN_END]; // QuickHelpText of the buttons 285cdf0e10cSrcweir String sCharStyle; 286cdf0e10cSrcweir Link aButtonSelectedHdl; 287cdf0e10cSrcweir Control* pActiveCtrl; 288cdf0e10cSrcweir Link aModifyHdl; 289cdf0e10cSrcweir 290cdf0e10cSrcweir SwTOXEntryTabPage* m_pParent; 291cdf0e10cSrcweir 292cdf0e10cSrcweir DECL_LINK(EditResize, Edit*); 293cdf0e10cSrcweir DECL_LINK(NextItemHdl, SwTOXEdit* ); 294cdf0e10cSrcweir DECL_LINK(TbxFocusHdl, SwTOXEdit* ); 295cdf0e10cSrcweir DECL_LINK(NextItemBtnHdl, SwTOXButton* ); 296cdf0e10cSrcweir DECL_LINK(TbxFocusBtnHdl, SwTOXButton* ); 297cdf0e10cSrcweir DECL_LINK(ScrollHdl, ImageButton* ); 298cdf0e10cSrcweir 299cdf0e10cSrcweir void SetActiveControl(Control* pSet); 300cdf0e10cSrcweir 301cdf0e10cSrcweir Control* InsertItem(const String& rText, const SwFormToken& aToken); 302cdf0e10cSrcweir void AdjustPositions(); 303cdf0e10cSrcweir void AdjustScrolling(); 304cdf0e10cSrcweir void MoveControls(long nOffset); 305cdf0e10cSrcweir 306cdf0e10cSrcweir public: 307cdf0e10cSrcweir SwTokenWindow(SwTOXEntryTabPage* pParent, const ResId& rResId); 308cdf0e10cSrcweir ~SwTokenWindow(); 309cdf0e10cSrcweir 310cdf0e10cSrcweir void SetForm(SwForm& rForm, sal_uInt16 nLevel); 311cdf0e10cSrcweir sal_uInt16 GetLastLevel()const {return nLevel;}; 312cdf0e10cSrcweir 313cdf0e10cSrcweir sal_Bool IsValid() const {return bValid;} 314cdf0e10cSrcweir 315cdf0e10cSrcweir void SetInvalid() {bValid = sal_False;} 316cdf0e10cSrcweir 317cdf0e10cSrcweir String GetPattern() const; 318cdf0e10cSrcweir 319cdf0e10cSrcweir void SetButtonSelectedHdl(const Link& rLink) 320cdf0e10cSrcweir { aButtonSelectedHdl = rLink;} 321cdf0e10cSrcweir 322cdf0e10cSrcweir void SetModifyHdl(const Link& rLink){aModifyHdl = rLink;} 323cdf0e10cSrcweir 324cdf0e10cSrcweir Control* GetActiveControl() 325cdf0e10cSrcweir { return pActiveCtrl;} 326cdf0e10cSrcweir 327cdf0e10cSrcweir void InsertAtSelection(const String& rText, const SwFormToken& aToken); 328cdf0e10cSrcweir void RemoveControl(SwTOXButton* pDel, sal_Bool bInternalCall = sal_False); 329cdf0e10cSrcweir 330cdf0e10cSrcweir sal_Bool Contains(FormTokenType) const; 331cdf0e10cSrcweir 332cdf0e10cSrcweir sal_Bool DetermineLinkStart(); 333cdf0e10cSrcweir 334cdf0e10cSrcweir //helper for pattern buttons and edits 335cdf0e10cSrcweir sal_Bool CreateQuickHelp(Control* pCtrl, 336cdf0e10cSrcweir const SwFormToken& rToken, const HelpEvent& ); 337cdf0e10cSrcweir 338cdf0e10cSrcweir virtual void Resize(); 339cdf0e10cSrcweir virtual void GetFocus(); 340cdf0e10cSrcweir }; 341cdf0e10cSrcweir /* -----------------------------23.12.99 14:16-------------------------------- 342cdf0e10cSrcweir 343cdf0e10cSrcweir ---------------------------------------------------------------------------*/ 344cdf0e10cSrcweir class SwTOXEntryTabPage; 345cdf0e10cSrcweir class SwIdxTreeListBox : public SvTreeListBox 346cdf0e10cSrcweir { 347cdf0e10cSrcweir SwTOXEntryTabPage* pParent; 348cdf0e10cSrcweir 349cdf0e10cSrcweir virtual void RequestHelp( const HelpEvent& rHEvt ); 350cdf0e10cSrcweir public: 351cdf0e10cSrcweir SwIdxTreeListBox(SwTOXEntryTabPage* pPar, const ResId& rResId); 352cdf0e10cSrcweir }; 353cdf0e10cSrcweir 354cdf0e10cSrcweir /* -----------------16.06.99 12:49------------------- 355cdf0e10cSrcweir 356cdf0e10cSrcweir --------------------------------------------------*/ 357cdf0e10cSrcweir class SwTOXEntryTabPage : public SfxTabPage 358cdf0e10cSrcweir { 359cdf0e10cSrcweir FixedText aLevelFT; 360cdf0e10cSrcweir SwIdxTreeListBox aLevelLB; 361cdf0e10cSrcweir 362cdf0e10cSrcweir FixedLine aEntryFL; 363cdf0e10cSrcweir FixedText aTokenFT; 364cdf0e10cSrcweir SwTokenWindow aTokenWIN; 365cdf0e10cSrcweir PushButton aAllLevelsPB; 366cdf0e10cSrcweir 367cdf0e10cSrcweir PushButton aEntryNoPB; 368cdf0e10cSrcweir PushButton aEntryPB; 369cdf0e10cSrcweir PushButton aTabPB; 370cdf0e10cSrcweir PushButton aChapterInfoPB; 371cdf0e10cSrcweir PushButton aPageNoPB; 372cdf0e10cSrcweir PushButton aHyperLinkPB; 373cdf0e10cSrcweir 374cdf0e10cSrcweir ListBox aAuthFieldsLB; 375cdf0e10cSrcweir PushButton aAuthInsertPB; 376cdf0e10cSrcweir PushButton aAuthRemovePB; 377cdf0e10cSrcweir 378cdf0e10cSrcweir FixedText aCharStyleFT; 379cdf0e10cSrcweir ListBox aCharStyleLB; // character style of the current token 380cdf0e10cSrcweir PushButton aEditStylePB; 381cdf0e10cSrcweir 382cdf0e10cSrcweir FixedText aChapterEntryFT; 383cdf0e10cSrcweir ListBox aChapterEntryLB; // type of chapter info 384cdf0e10cSrcweir 385cdf0e10cSrcweir FixedText aNumberFormatFT; 386cdf0e10cSrcweir ListBox aNumberFormatLB; //!< format for numbering (E#) 387cdf0e10cSrcweir 388cdf0e10cSrcweir FixedText aEntryOutlineLevelFT; //!< Fixed text, for i53420 389cdf0e10cSrcweir NumericField aEntryOutlineLevelNF; //!< level to evaluate outline level to, for i53420 390cdf0e10cSrcweir FixedText aFillCharFT; 391cdf0e10cSrcweir ComboBox aFillCharCB; // fill char for tab stop 392cdf0e10cSrcweir FixedText aTabPosFT; 393cdf0e10cSrcweir MetricField aTabPosMF; // tab stop position 394cdf0e10cSrcweir CheckBox aAutoRightCB; 395cdf0e10cSrcweir FixedLine aFormatFL; 396cdf0e10cSrcweir 397cdf0e10cSrcweir CheckBox aRelToStyleCB; // position relative to the right margin of the para style 398cdf0e10cSrcweir FixedText aMainEntryStyleFT; 399cdf0e10cSrcweir ListBox aMainEntryStyleLB; // character style of main entries in indexes 400cdf0e10cSrcweir CheckBox aAlphaDelimCB; 401cdf0e10cSrcweir CheckBox aCommaSeparatedCB; 402cdf0e10cSrcweir 403cdf0e10cSrcweir RadioButton aSortDocPosRB; 404cdf0e10cSrcweir RadioButton aSortContentRB; 405cdf0e10cSrcweir FixedLine aSortingFL; 406cdf0e10cSrcweir 407cdf0e10cSrcweir FixedText aFirstKeyFT; 408cdf0e10cSrcweir ListBox aFirstKeyLB; 409cdf0e10cSrcweir ImageRadioButton aFirstSortUpRB; 410cdf0e10cSrcweir ImageRadioButton aFirstSortDownRB; 411cdf0e10cSrcweir 412cdf0e10cSrcweir FixedText aSecondKeyFT; 413cdf0e10cSrcweir ListBox aSecondKeyLB; 414cdf0e10cSrcweir ImageRadioButton aSecondSortUpRB; 415cdf0e10cSrcweir ImageRadioButton aSecondSortDownRB; 416cdf0e10cSrcweir 417cdf0e10cSrcweir FixedText aThirdKeyFT; 418cdf0e10cSrcweir ListBox aThirdKeyLB; 419cdf0e10cSrcweir ImageRadioButton aThirdSortUpRB; 420cdf0e10cSrcweir ImageRadioButton aThirdSortDownRB; 421cdf0e10cSrcweir 422cdf0e10cSrcweir FixedLine aSortKeyFL; 423cdf0e10cSrcweir 424cdf0e10cSrcweir String sDelimStr; 425cdf0e10cSrcweir String sLevelStr; 426cdf0e10cSrcweir String sAuthTypeStr; 427cdf0e10cSrcweir 428cdf0e10cSrcweir String sNoCharStyle; 429cdf0e10cSrcweir String sNoCharSortKey; 430cdf0e10cSrcweir Point aButtonPositions[5]; 431cdf0e10cSrcweir SwForm* m_pCurrentForm; 432cdf0e10cSrcweir 433cdf0e10cSrcweir Point aRelToStylePos; 434cdf0e10cSrcweir Point aRelToStyleIdxPos; 435cdf0e10cSrcweir Size aLevelFLSize; 436cdf0e10cSrcweir 437cdf0e10cSrcweir CurTOXType aLastTOXType; 438cdf0e10cSrcweir sal_Bool bInLevelHdl; 439cdf0e10cSrcweir 440cdf0e10cSrcweir Point aChapterEntryFTPosition; //!< holds position of ChapterEntryFT control, 441cdf0e10cSrcweir //to be used in moving the element among different tokens 442cdf0e10cSrcweir Point aEntryOutlineLevelFTPosition;//!< holds position ofrEntryOutlineLevelFT control 443cdf0e10cSrcweir sal_Int32 nBiasToEntryPoint; 444cdf0e10cSrcweir 445cdf0e10cSrcweir DECL_LINK(StyleSelectHdl, ListBox*); 446cdf0e10cSrcweir DECL_LINK(EditStyleHdl, PushButton*); 447cdf0e10cSrcweir DECL_LINK(InsertTokenHdl, PushButton*); 448cdf0e10cSrcweir DECL_LINK(LevelHdl, SvTreeListBox*); 449cdf0e10cSrcweir DECL_LINK(AutoRightHdl, CheckBox*); 450cdf0e10cSrcweir DECL_LINK(TokenSelectedHdl, SwFormToken*); 451cdf0e10cSrcweir DECL_LINK(TabPosHdl, MetricField*); 452cdf0e10cSrcweir DECL_LINK(FillCharHdl, ComboBox*); 453cdf0e10cSrcweir DECL_LINK(RemoveInsertAuthHdl, PushButton*); 454cdf0e10cSrcweir DECL_LINK(SortKeyHdl, RadioButton*); 455cdf0e10cSrcweir DECL_LINK(ChapterInfoHdl, ListBox*); 456cdf0e10cSrcweir DECL_LINK(ChapterInfoOutlineHdl, NumericField*); 457cdf0e10cSrcweir DECL_LINK(NumberFormatHdl, ListBox*); 458cdf0e10cSrcweir 459cdf0e10cSrcweir DECL_LINK(AllLevelsHdl, PushButton*); 460cdf0e10cSrcweir 461cdf0e10cSrcweir void EnableButtons(); 462cdf0e10cSrcweir void WriteBackLevel(); 463cdf0e10cSrcweir void UpdateDescriptor(); 464cdf0e10cSrcweir DECL_LINK(ModifyHdl, void*); 465cdf0e10cSrcweir 466cdf0e10cSrcweir using SfxTabPage::ActivatePage; 467cdf0e10cSrcweir using SfxTabPage::DeactivatePage; 468cdf0e10cSrcweir 469cdf0e10cSrcweir public: 470cdf0e10cSrcweir SwTOXEntryTabPage(Window* pParent, const SfxItemSet& rAttrSet); 471cdf0e10cSrcweir ~SwTOXEntryTabPage(); 472cdf0e10cSrcweir 473cdf0e10cSrcweir virtual sal_Bool FillItemSet( SfxItemSet& ); 474cdf0e10cSrcweir virtual void Reset( const SfxItemSet& ); 475cdf0e10cSrcweir virtual void ActivatePage( const SfxItemSet& ); 476cdf0e10cSrcweir virtual int DeactivatePage( SfxItemSet* pSet = 0 ); 477cdf0e10cSrcweir 478cdf0e10cSrcweir static SfxTabPage* Create( Window* pParent, 479cdf0e10cSrcweir const SfxItemSet& rAttrSet); 480cdf0e10cSrcweir void SetWrtShell(SwWrtShell& rSh); 481cdf0e10cSrcweir 482cdf0e10cSrcweir String GetLevelHelp(sal_uInt16 nLevel) const; 483cdf0e10cSrcweir 484cdf0e10cSrcweir void PreTokenButtonRemoved(const SwFormToken& rToken); 485cdf0e10cSrcweir }; 486cdf0e10cSrcweir /* -----------------05.07.99 13:00------------------- 487cdf0e10cSrcweir 488cdf0e10cSrcweir --------------------------------------------------*/ 489cdf0e10cSrcweir class SwTOXStylesTabPage : public SfxTabPage 490cdf0e10cSrcweir { 491cdf0e10cSrcweir FixedLine aFormatFL; 492cdf0e10cSrcweir FixedText aLevelFT2; 493cdf0e10cSrcweir ListBox aLevelLB; 494cdf0e10cSrcweir ImageButton aAssignBT; 495cdf0e10cSrcweir FixedText aTemplateFT; 496cdf0e10cSrcweir ListBox aParaLayLB; 497cdf0e10cSrcweir PushButton aStdBT; 498cdf0e10cSrcweir PushButton aEditStyleBT; 499cdf0e10cSrcweir 500cdf0e10cSrcweir SwForm* m_pCurrentForm; 501cdf0e10cSrcweir // void UpdatePattern(); 502cdf0e10cSrcweir 503cdf0e10cSrcweir DECL_LINK( EditStyleHdl, Button *); 504cdf0e10cSrcweir DECL_LINK( StdHdl, Button * ); 505cdf0e10cSrcweir DECL_LINK( EnableSelectHdl, ListBox * ); 506cdf0e10cSrcweir DECL_LINK( DoubleClickHdl, Button * ); 507cdf0e10cSrcweir DECL_LINK( AssignHdl, Button * ); 508cdf0e10cSrcweir DECL_LINK( ModifyHdl, void*); 509cdf0e10cSrcweir 510cdf0e10cSrcweir SwForm& GetForm() 511cdf0e10cSrcweir { 512cdf0e10cSrcweir SwMultiTOXTabDialog* pDlg = (SwMultiTOXTabDialog*)GetTabDialog(); 513cdf0e10cSrcweir return *pDlg->GetForm(pDlg->GetCurrentTOXType()); 514cdf0e10cSrcweir } 515cdf0e10cSrcweir 516cdf0e10cSrcweir using SfxTabPage::ActivatePage; 517cdf0e10cSrcweir using SfxTabPage::DeactivatePage; 518cdf0e10cSrcweir 519cdf0e10cSrcweir public: 520cdf0e10cSrcweir SwTOXStylesTabPage(Window* pParent, const SfxItemSet& rAttrSet); 521cdf0e10cSrcweir ~SwTOXStylesTabPage(); 522cdf0e10cSrcweir 523cdf0e10cSrcweir virtual sal_Bool FillItemSet( SfxItemSet& ); 524cdf0e10cSrcweir virtual void Reset( const SfxItemSet& ); 525cdf0e10cSrcweir 526cdf0e10cSrcweir virtual void ActivatePage( const SfxItemSet& ); 527cdf0e10cSrcweir virtual int DeactivatePage( SfxItemSet* pSet = 0 ); 528cdf0e10cSrcweir 529cdf0e10cSrcweir static SfxTabPage* Create( Window* pParent, 530cdf0e10cSrcweir const SfxItemSet& rAttrSet); 531cdf0e10cSrcweir 532cdf0e10cSrcweir }; 533cdf0e10cSrcweir 534cdf0e10cSrcweir #endif // _SWUI_CNTTAB_HXX 535cdf0e10cSrcweir 536