11d2dbeb0SAndrew Rist /************************************************************** 2cdf0e10cSrcweir * 31d2dbeb0SAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 41d2dbeb0SAndrew Rist * or more contributor license agreements. See the NOTICE file 51d2dbeb0SAndrew Rist * distributed with this work for additional information 61d2dbeb0SAndrew Rist * regarding copyright ownership. The ASF licenses this file 71d2dbeb0SAndrew Rist * to you under the Apache License, Version 2.0 (the 81d2dbeb0SAndrew Rist * "License"); you may not use this file except in compliance 91d2dbeb0SAndrew Rist * with the License. You may obtain a copy of the License at 10cdf0e10cSrcweir * 111d2dbeb0SAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 12cdf0e10cSrcweir * 131d2dbeb0SAndrew Rist * Unless required by applicable law or agreed to in writing, 141d2dbeb0SAndrew Rist * software distributed under the License is distributed on an 151d2dbeb0SAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 161d2dbeb0SAndrew Rist * KIND, either express or implied. See the License for the 171d2dbeb0SAndrew Rist * specific language governing permissions and limitations 181d2dbeb0SAndrew Rist * under the License. 19cdf0e10cSrcweir * 201d2dbeb0SAndrew Rist *************************************************************/ 211d2dbeb0SAndrew Rist 221d2dbeb0SAndrew 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 GetCurrentTOXType() const118cdf0e10cSrcweir CurTOXType GetCurrentTOXType() const { return eCurrentTOXType;} SetCurrentTOXType(CurTOXType eSet)119cdf0e10cSrcweir void SetCurrentTOXType(CurTOXType eSet) 120cdf0e10cSrcweir { 121cdf0e10cSrcweir eCurrentTOXType = eSet; 122cdf0e10cSrcweir } 123cdf0e10cSrcweir 124cdf0e10cSrcweir void UpdateExample(); IsTOXEditMode() const125cdf0e10cSrcweir sal_Bool IsTOXEditMode() const { return bEditTOX;} 126cdf0e10cSrcweir GetWrtShell()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; 289*ca62e2c2SSteve Yin String accessibleName; 290*ca62e2c2SSteve Yin String sAdditionalAccnameString1; 291*ca62e2c2SSteve Yin String sAdditionalAccnameString2; 292*ca62e2c2SSteve Yin String sAdditionalAccnameString3; 293cdf0e10cSrcweir 294cdf0e10cSrcweir SwTOXEntryTabPage* m_pParent; 295cdf0e10cSrcweir 296cdf0e10cSrcweir DECL_LINK(EditResize, Edit*); 297cdf0e10cSrcweir DECL_LINK(NextItemHdl, SwTOXEdit* ); 298cdf0e10cSrcweir DECL_LINK(TbxFocusHdl, SwTOXEdit* ); 299cdf0e10cSrcweir DECL_LINK(NextItemBtnHdl, SwTOXButton* ); 300cdf0e10cSrcweir DECL_LINK(TbxFocusBtnHdl, SwTOXButton* ); 301cdf0e10cSrcweir DECL_LINK(ScrollHdl, ImageButton* ); 302cdf0e10cSrcweir 303cdf0e10cSrcweir void SetActiveControl(Control* pSet); 304cdf0e10cSrcweir 305cdf0e10cSrcweir Control* InsertItem(const String& rText, const SwFormToken& aToken); 306cdf0e10cSrcweir void AdjustPositions(); 307cdf0e10cSrcweir void AdjustScrolling(); 308cdf0e10cSrcweir void MoveControls(long nOffset); 309cdf0e10cSrcweir 310cdf0e10cSrcweir public: 311cdf0e10cSrcweir SwTokenWindow(SwTOXEntryTabPage* pParent, const ResId& rResId); 312cdf0e10cSrcweir ~SwTokenWindow(); 313cdf0e10cSrcweir 314cdf0e10cSrcweir void SetForm(SwForm& rForm, sal_uInt16 nLevel); GetLastLevel() const315cdf0e10cSrcweir sal_uInt16 GetLastLevel()const {return nLevel;}; 316cdf0e10cSrcweir IsValid() const317cdf0e10cSrcweir sal_Bool IsValid() const {return bValid;} 318cdf0e10cSrcweir SetInvalid()319cdf0e10cSrcweir void SetInvalid() {bValid = sal_False;} 320cdf0e10cSrcweir 321cdf0e10cSrcweir String GetPattern() const; 322cdf0e10cSrcweir SetButtonSelectedHdl(const Link & rLink)323cdf0e10cSrcweir void SetButtonSelectedHdl(const Link& rLink) 324cdf0e10cSrcweir { aButtonSelectedHdl = rLink;} 325cdf0e10cSrcweir SetModifyHdl(const Link & rLink)326cdf0e10cSrcweir void SetModifyHdl(const Link& rLink){aModifyHdl = rLink;} 327cdf0e10cSrcweir GetActiveControl()328cdf0e10cSrcweir Control* GetActiveControl() 329cdf0e10cSrcweir { return pActiveCtrl;} 330cdf0e10cSrcweir 331cdf0e10cSrcweir void InsertAtSelection(const String& rText, const SwFormToken& aToken); 332cdf0e10cSrcweir void RemoveControl(SwTOXButton* pDel, sal_Bool bInternalCall = sal_False); 333cdf0e10cSrcweir 334cdf0e10cSrcweir sal_Bool Contains(FormTokenType) const; 335cdf0e10cSrcweir 336cdf0e10cSrcweir sal_Bool DetermineLinkStart(); 337cdf0e10cSrcweir 338cdf0e10cSrcweir //helper for pattern buttons and edits 339cdf0e10cSrcweir sal_Bool CreateQuickHelp(Control* pCtrl, 340cdf0e10cSrcweir const SwFormToken& rToken, const HelpEvent& ); 341cdf0e10cSrcweir 342cdf0e10cSrcweir virtual void Resize(); 343cdf0e10cSrcweir virtual void GetFocus(); 344*ca62e2c2SSteve Yin void SetFocus2theAllBtn(); 345*ca62e2c2SSteve Yin private: 346*ca62e2c2SSteve Yin sal_uInt32 GetControlIndex(FormTokenType eType, const Control* pCurControl) const; 347cdf0e10cSrcweir }; 348cdf0e10cSrcweir /* -----------------------------23.12.99 14:16-------------------------------- 349cdf0e10cSrcweir 350cdf0e10cSrcweir ---------------------------------------------------------------------------*/ 351cdf0e10cSrcweir class SwTOXEntryTabPage; 352cdf0e10cSrcweir class SwIdxTreeListBox : public SvTreeListBox 353cdf0e10cSrcweir { 354cdf0e10cSrcweir SwTOXEntryTabPage* pParent; 355cdf0e10cSrcweir 356cdf0e10cSrcweir virtual void RequestHelp( const HelpEvent& rHEvt ); 357cdf0e10cSrcweir public: 358cdf0e10cSrcweir SwIdxTreeListBox(SwTOXEntryTabPage* pPar, const ResId& rResId); 359cdf0e10cSrcweir }; 360cdf0e10cSrcweir 361cdf0e10cSrcweir /* -----------------16.06.99 12:49------------------- 362cdf0e10cSrcweir 363cdf0e10cSrcweir --------------------------------------------------*/ 364cdf0e10cSrcweir class SwTOXEntryTabPage : public SfxTabPage 365cdf0e10cSrcweir { 366cdf0e10cSrcweir FixedText aLevelFT; 367cdf0e10cSrcweir SwIdxTreeListBox aLevelLB; 368cdf0e10cSrcweir 369cdf0e10cSrcweir FixedLine aEntryFL; 370cdf0e10cSrcweir FixedText aTokenFT; 371cdf0e10cSrcweir SwTokenWindow aTokenWIN; 372cdf0e10cSrcweir PushButton aAllLevelsPB; 373cdf0e10cSrcweir 374cdf0e10cSrcweir PushButton aEntryNoPB; 375cdf0e10cSrcweir PushButton aEntryPB; 376cdf0e10cSrcweir PushButton aTabPB; 377cdf0e10cSrcweir PushButton aChapterInfoPB; 378cdf0e10cSrcweir PushButton aPageNoPB; 379cdf0e10cSrcweir PushButton aHyperLinkPB; 380cdf0e10cSrcweir 381cdf0e10cSrcweir ListBox aAuthFieldsLB; 382cdf0e10cSrcweir PushButton aAuthInsertPB; 383cdf0e10cSrcweir PushButton aAuthRemovePB; 384cdf0e10cSrcweir 385cdf0e10cSrcweir FixedText aCharStyleFT; 386cdf0e10cSrcweir ListBox aCharStyleLB; // character style of the current token 387cdf0e10cSrcweir PushButton aEditStylePB; 388cdf0e10cSrcweir 389cdf0e10cSrcweir FixedText aChapterEntryFT; 390cdf0e10cSrcweir ListBox aChapterEntryLB; // type of chapter info 391cdf0e10cSrcweir 392cdf0e10cSrcweir FixedText aNumberFormatFT; 393cdf0e10cSrcweir ListBox aNumberFormatLB; //!< format for numbering (E#) 394cdf0e10cSrcweir 395cdf0e10cSrcweir FixedText aEntryOutlineLevelFT; //!< Fixed text, for i53420 396cdf0e10cSrcweir NumericField aEntryOutlineLevelNF; //!< level to evaluate outline level to, for i53420 397cdf0e10cSrcweir FixedText aFillCharFT; 398cdf0e10cSrcweir ComboBox aFillCharCB; // fill char for tab stop 399cdf0e10cSrcweir FixedText aTabPosFT; 400cdf0e10cSrcweir MetricField aTabPosMF; // tab stop position 401cdf0e10cSrcweir CheckBox aAutoRightCB; 402cdf0e10cSrcweir FixedLine aFormatFL; 403cdf0e10cSrcweir 404cdf0e10cSrcweir CheckBox aRelToStyleCB; // position relative to the right margin of the para style 405cdf0e10cSrcweir FixedText aMainEntryStyleFT; 406cdf0e10cSrcweir ListBox aMainEntryStyleLB; // character style of main entries in indexes 407cdf0e10cSrcweir CheckBox aAlphaDelimCB; 408cdf0e10cSrcweir CheckBox aCommaSeparatedCB; 409cdf0e10cSrcweir 410cdf0e10cSrcweir RadioButton aSortDocPosRB; 411cdf0e10cSrcweir RadioButton aSortContentRB; 412cdf0e10cSrcweir FixedLine aSortingFL; 413cdf0e10cSrcweir 414cdf0e10cSrcweir FixedText aFirstKeyFT; 415cdf0e10cSrcweir ListBox aFirstKeyLB; 416cdf0e10cSrcweir ImageRadioButton aFirstSortUpRB; 417cdf0e10cSrcweir ImageRadioButton aFirstSortDownRB; 418cdf0e10cSrcweir 419cdf0e10cSrcweir FixedText aSecondKeyFT; 420cdf0e10cSrcweir ListBox aSecondKeyLB; 421cdf0e10cSrcweir ImageRadioButton aSecondSortUpRB; 422cdf0e10cSrcweir ImageRadioButton aSecondSortDownRB; 423cdf0e10cSrcweir 424cdf0e10cSrcweir FixedText aThirdKeyFT; 425cdf0e10cSrcweir ListBox aThirdKeyLB; 426cdf0e10cSrcweir ImageRadioButton aThirdSortUpRB; 427cdf0e10cSrcweir ImageRadioButton aThirdSortDownRB; 428cdf0e10cSrcweir 429cdf0e10cSrcweir FixedLine aSortKeyFL; 430cdf0e10cSrcweir 431cdf0e10cSrcweir String sDelimStr; 432cdf0e10cSrcweir String sLevelStr; 433cdf0e10cSrcweir String sAuthTypeStr; 434cdf0e10cSrcweir 435cdf0e10cSrcweir String sNoCharStyle; 436cdf0e10cSrcweir String sNoCharSortKey; 437cdf0e10cSrcweir Point aButtonPositions[5]; 438cdf0e10cSrcweir SwForm* m_pCurrentForm; 439cdf0e10cSrcweir 440cdf0e10cSrcweir Point aRelToStylePos; 441cdf0e10cSrcweir Point aRelToStyleIdxPos; 442cdf0e10cSrcweir Size aLevelFLSize; 443cdf0e10cSrcweir 444cdf0e10cSrcweir CurTOXType aLastTOXType; 445cdf0e10cSrcweir sal_Bool bInLevelHdl; 446cdf0e10cSrcweir 447cdf0e10cSrcweir Point aChapterEntryFTPosition; //!< holds position of ChapterEntryFT control, 448cdf0e10cSrcweir //to be used in moving the element among different tokens 449cdf0e10cSrcweir Point aEntryOutlineLevelFTPosition;//!< holds position ofrEntryOutlineLevelFT control 450cdf0e10cSrcweir sal_Int32 nBiasToEntryPoint; 451cdf0e10cSrcweir 452cdf0e10cSrcweir DECL_LINK(StyleSelectHdl, ListBox*); 453cdf0e10cSrcweir DECL_LINK(EditStyleHdl, PushButton*); 454cdf0e10cSrcweir DECL_LINK(InsertTokenHdl, PushButton*); 455cdf0e10cSrcweir DECL_LINK(LevelHdl, SvTreeListBox*); 456cdf0e10cSrcweir DECL_LINK(AutoRightHdl, CheckBox*); 457cdf0e10cSrcweir DECL_LINK(TokenSelectedHdl, SwFormToken*); 458cdf0e10cSrcweir DECL_LINK(TabPosHdl, MetricField*); 459cdf0e10cSrcweir DECL_LINK(FillCharHdl, ComboBox*); 460cdf0e10cSrcweir DECL_LINK(RemoveInsertAuthHdl, PushButton*); 461cdf0e10cSrcweir DECL_LINK(SortKeyHdl, RadioButton*); 462cdf0e10cSrcweir DECL_LINK(ChapterInfoHdl, ListBox*); 463cdf0e10cSrcweir DECL_LINK(ChapterInfoOutlineHdl, NumericField*); 464cdf0e10cSrcweir DECL_LINK(NumberFormatHdl, ListBox*); 465cdf0e10cSrcweir 466cdf0e10cSrcweir DECL_LINK(AllLevelsHdl, PushButton*); 467cdf0e10cSrcweir 468cdf0e10cSrcweir void EnableButtons(); 469cdf0e10cSrcweir void WriteBackLevel(); 470cdf0e10cSrcweir void UpdateDescriptor(); 471cdf0e10cSrcweir DECL_LINK(ModifyHdl, void*); 472cdf0e10cSrcweir 473cdf0e10cSrcweir using SfxTabPage::ActivatePage; 474cdf0e10cSrcweir using SfxTabPage::DeactivatePage; 475cdf0e10cSrcweir 476cdf0e10cSrcweir public: 477cdf0e10cSrcweir SwTOXEntryTabPage(Window* pParent, const SfxItemSet& rAttrSet); 478cdf0e10cSrcweir ~SwTOXEntryTabPage(); 479cdf0e10cSrcweir 480cdf0e10cSrcweir virtual sal_Bool FillItemSet( SfxItemSet& ); 481cdf0e10cSrcweir virtual void Reset( const SfxItemSet& ); 482cdf0e10cSrcweir virtual void ActivatePage( const SfxItemSet& ); 483cdf0e10cSrcweir virtual int DeactivatePage( SfxItemSet* pSet = 0 ); 484cdf0e10cSrcweir 485cdf0e10cSrcweir static SfxTabPage* Create( Window* pParent, 486cdf0e10cSrcweir const SfxItemSet& rAttrSet); 487cdf0e10cSrcweir void SetWrtShell(SwWrtShell& rSh); 488cdf0e10cSrcweir 489cdf0e10cSrcweir String GetLevelHelp(sal_uInt16 nLevel) const; 490cdf0e10cSrcweir 491cdf0e10cSrcweir void PreTokenButtonRemoved(const SwFormToken& rToken); 492*ca62e2c2SSteve Yin void SetFocus2theAllBtn(); 493*ca62e2c2SSteve Yin virtual long Notify( NotifyEvent& rNEvt ); 494cdf0e10cSrcweir }; 495cdf0e10cSrcweir /* -----------------05.07.99 13:00------------------- 496cdf0e10cSrcweir 497cdf0e10cSrcweir --------------------------------------------------*/ 498cdf0e10cSrcweir class SwTOXStylesTabPage : public SfxTabPage 499cdf0e10cSrcweir { 500cdf0e10cSrcweir FixedLine aFormatFL; 501cdf0e10cSrcweir FixedText aLevelFT2; 502cdf0e10cSrcweir ListBox aLevelLB; 503cdf0e10cSrcweir ImageButton aAssignBT; 504cdf0e10cSrcweir FixedText aTemplateFT; 505cdf0e10cSrcweir ListBox aParaLayLB; 506cdf0e10cSrcweir PushButton aStdBT; 507cdf0e10cSrcweir PushButton aEditStyleBT; 508cdf0e10cSrcweir 509cdf0e10cSrcweir SwForm* m_pCurrentForm; 510cdf0e10cSrcweir // void UpdatePattern(); 511cdf0e10cSrcweir 512cdf0e10cSrcweir DECL_LINK( EditStyleHdl, Button *); 513cdf0e10cSrcweir DECL_LINK( StdHdl, Button * ); 514cdf0e10cSrcweir DECL_LINK( EnableSelectHdl, ListBox * ); 515cdf0e10cSrcweir DECL_LINK( DoubleClickHdl, Button * ); 516cdf0e10cSrcweir DECL_LINK( AssignHdl, Button * ); 517cdf0e10cSrcweir DECL_LINK( ModifyHdl, void*); 518cdf0e10cSrcweir GetForm()519cdf0e10cSrcweir SwForm& GetForm() 520cdf0e10cSrcweir { 521cdf0e10cSrcweir SwMultiTOXTabDialog* pDlg = (SwMultiTOXTabDialog*)GetTabDialog(); 522cdf0e10cSrcweir return *pDlg->GetForm(pDlg->GetCurrentTOXType()); 523cdf0e10cSrcweir } 524cdf0e10cSrcweir 525cdf0e10cSrcweir using SfxTabPage::ActivatePage; 526cdf0e10cSrcweir using SfxTabPage::DeactivatePage; 527cdf0e10cSrcweir 528cdf0e10cSrcweir public: 529cdf0e10cSrcweir SwTOXStylesTabPage(Window* pParent, const SfxItemSet& rAttrSet); 530cdf0e10cSrcweir ~SwTOXStylesTabPage(); 531cdf0e10cSrcweir 532cdf0e10cSrcweir virtual sal_Bool FillItemSet( SfxItemSet& ); 533cdf0e10cSrcweir virtual void Reset( const SfxItemSet& ); 534cdf0e10cSrcweir 535cdf0e10cSrcweir virtual void ActivatePage( const SfxItemSet& ); 536cdf0e10cSrcweir virtual int DeactivatePage( SfxItemSet* pSet = 0 ); 537cdf0e10cSrcweir 538cdf0e10cSrcweir static SfxTabPage* Create( Window* pParent, 539cdf0e10cSrcweir const SfxItemSet& rAttrSet); 540cdf0e10cSrcweir 541cdf0e10cSrcweir }; 542cdf0e10cSrcweir 543cdf0e10cSrcweir #endif // _SWUI_CNTTAB_HXX 544cdf0e10cSrcweir 545