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