1*c4eee24dSAndrew Rist /************************************************************** 2cdf0e10cSrcweir * 3*c4eee24dSAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 4*c4eee24dSAndrew Rist * or more contributor license agreements. See the NOTICE file 5*c4eee24dSAndrew Rist * distributed with this work for additional information 6*c4eee24dSAndrew Rist * regarding copyright ownership. The ASF licenses this file 7*c4eee24dSAndrew Rist * to you under the Apache License, Version 2.0 (the 8*c4eee24dSAndrew Rist * "License"); you may not use this file except in compliance 9*c4eee24dSAndrew Rist * with the License. You may obtain a copy of the License at 10*c4eee24dSAndrew Rist * 11*c4eee24dSAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 12*c4eee24dSAndrew Rist * 13*c4eee24dSAndrew Rist * Unless required by applicable law or agreed to in writing, 14*c4eee24dSAndrew Rist * software distributed under the License is distributed on an 15*c4eee24dSAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16*c4eee24dSAndrew Rist * KIND, either express or implied. See the License for the 17*c4eee24dSAndrew Rist * specific language governing permissions and limitations 18*c4eee24dSAndrew Rist * under the License. 19*c4eee24dSAndrew Rist * 20*c4eee24dSAndrew Rist *************************************************************/ 21*c4eee24dSAndrew Rist 22*c4eee24dSAndrew Rist 23cdf0e10cSrcweir #ifndef _OFA_AUTOCDLG_HXX 24cdf0e10cSrcweir #define _OFA_AUTOCDLG_HXX 25cdf0e10cSrcweir 26cdf0e10cSrcweir #include <svtools/langtab.hxx> 27cdf0e10cSrcweir #include <sfx2/tabdlg.hxx> 28cdf0e10cSrcweir #include <tools/table.hxx> 29cdf0e10cSrcweir #include <svx/checklbx.hxx> 30cdf0e10cSrcweir #include <vcl/fixed.hxx> 31cdf0e10cSrcweir #include <vcl/field.hxx> 32cdf0e10cSrcweir #include <vcl/metric.hxx> 33cdf0e10cSrcweir #include <svx/langbox.hxx> 34cdf0e10cSrcweir 35cdf0e10cSrcweir class SvxAutoCorrect; 36cdf0e10cSrcweir class CharClass; 37cdf0e10cSrcweir class CollatorWrapper; 38cdf0e10cSrcweir class SmartTagMgr; 39cdf0e10cSrcweir 40cdf0e10cSrcweir // class OfaAutoCorrDlg -------------------------------------------------- 41cdf0e10cSrcweir 42cdf0e10cSrcweir class OfaAutoCorrDlg : public SfxTabDialog 43cdf0e10cSrcweir { 44cdf0e10cSrcweir FixedText aLanguageFT; 45cdf0e10cSrcweir SvxLanguageBox aLanguageLB; 46cdf0e10cSrcweir 47cdf0e10cSrcweir DECL_LINK(SelectLanguageHdl, ListBox*); 48cdf0e10cSrcweir public: 49cdf0e10cSrcweir 50cdf0e10cSrcweir OfaAutoCorrDlg(Window* pParent, const SfxItemSet *pSet ); 51cdf0e10cSrcweir 52cdf0e10cSrcweir void EnableLanguage(sal_Bool bEnable) 53cdf0e10cSrcweir { aLanguageFT.Enable(bEnable); 54cdf0e10cSrcweir aLanguageLB.Enable(bEnable);} 55cdf0e10cSrcweir 56cdf0e10cSrcweir }; 57cdf0e10cSrcweir 58cdf0e10cSrcweir #ifdef _OFA_AUTOCDLG_CXX 59cdf0e10cSrcweir #include <vcl/group.hxx> 60cdf0e10cSrcweir #ifndef _SV_BUTTON_HXX 61cdf0e10cSrcweir #include <vcl/button.hxx> 62cdf0e10cSrcweir #endif 63cdf0e10cSrcweir #include <vcl/lstbox.hxx> 64cdf0e10cSrcweir #include <svtools/svtabbx.hxx> 65cdf0e10cSrcweir #include <svx/simptabl.hxx> 66cdf0e10cSrcweir 67cdf0e10cSrcweir class SvStringsISortDtor; 68cdf0e10cSrcweir 69cdf0e10cSrcweir // class OfaACorrCheckListBox ------------------------------------------ 70cdf0e10cSrcweir 71cdf0e10cSrcweir class OfaACorrCheckListBox : public SvxSimpleTable 72cdf0e10cSrcweir { 73cdf0e10cSrcweir using SvxSimpleTable::SetTabs; 74cdf0e10cSrcweir using SvTreeListBox::GetCheckButtonState; 75cdf0e10cSrcweir using SvTreeListBox::SetCheckButtonState; 76cdf0e10cSrcweir 77cdf0e10cSrcweir protected: 78cdf0e10cSrcweir virtual void SetTabs(); 79cdf0e10cSrcweir virtual void HBarClick(); 80cdf0e10cSrcweir virtual void KeyInput( const KeyEvent& rKEvt ); 81cdf0e10cSrcweir 82cdf0e10cSrcweir public: 83cdf0e10cSrcweir OfaACorrCheckListBox(Window* pParent, const ResId& rResId ) : 84cdf0e10cSrcweir SvxSimpleTable( pParent, rResId ){} 85cdf0e10cSrcweir 86cdf0e10cSrcweir inline void *GetUserData(sal_uLong nPos) { return GetEntry(nPos)->GetUserData(); } 87cdf0e10cSrcweir inline void SetUserData(sal_uLong nPos, void *pData ) { GetEntry(nPos)->SetUserData(pData); } 88cdf0e10cSrcweir inline sal_uLong GetSelectEntryPos() { return GetModel()->GetAbsPos(FirstSelected()); } 89cdf0e10cSrcweir 90cdf0e10cSrcweir sal_Bool IsChecked(sal_uLong nPos, sal_uInt16 nCol = 0); 91cdf0e10cSrcweir void CheckEntryPos(sal_uLong nPos, sal_uInt16 nCol, sal_Bool bChecked); 92cdf0e10cSrcweir SvButtonState GetCheckButtonState( SvLBoxEntry*, sal_uInt16 nCol ) const; 93cdf0e10cSrcweir void SetCheckButtonState( SvLBoxEntry*, sal_uInt16 nCol, SvButtonState ); 94cdf0e10cSrcweir }; 95cdf0e10cSrcweir 96cdf0e10cSrcweir // class OfaAutocorrOptionsPage ------------------------------------------ 97cdf0e10cSrcweir 98cdf0e10cSrcweir 99cdf0e10cSrcweir class OfaAutocorrOptionsPage : public SfxTabPage 100cdf0e10cSrcweir { 101cdf0e10cSrcweir using TabPage::ActivatePage; 102cdf0e10cSrcweir 103cdf0e10cSrcweir private: 104cdf0e10cSrcweir SvxCheckListBox aCheckLB; 105cdf0e10cSrcweir 106cdf0e10cSrcweir String sInput; 107cdf0e10cSrcweir String sDoubleCaps; 108cdf0e10cSrcweir String sStartCap; 109cdf0e10cSrcweir String sBoldUnderline; 110cdf0e10cSrcweir String sURL; 111cdf0e10cSrcweir String sNoDblSpaces; 112cdf0e10cSrcweir String sDash; 113cdf0e10cSrcweir String sNonBrkSpace; 114cdf0e10cSrcweir String sFirst; 115cdf0e10cSrcweir 116cdf0e10cSrcweir public: 117cdf0e10cSrcweir OfaAutocorrOptionsPage( Window* pParent, const SfxItemSet& rSet ); 118cdf0e10cSrcweir ~OfaAutocorrOptionsPage(); 119cdf0e10cSrcweir 120cdf0e10cSrcweir static SfxTabPage* Create( Window* pParent, 121cdf0e10cSrcweir const SfxItemSet& rAttrSet); 122cdf0e10cSrcweir 123cdf0e10cSrcweir virtual sal_Bool FillItemSet( SfxItemSet& rSet ); 124cdf0e10cSrcweir virtual void Reset( const SfxItemSet& rSet ); 125cdf0e10cSrcweir virtual void ActivatePage( const SfxItemSet& ); 126cdf0e10cSrcweir 127cdf0e10cSrcweir }; 128cdf0e10cSrcweir 129cdf0e10cSrcweir // class OfaSwAutoFmtOptionsPage ---------------------------------------------------- 130cdf0e10cSrcweir 131cdf0e10cSrcweir class OfaSwAutoFmtOptionsPage : public SfxTabPage 132cdf0e10cSrcweir { 133cdf0e10cSrcweir using TabPage::ActivatePage; 134cdf0e10cSrcweir 135cdf0e10cSrcweir OfaACorrCheckListBox aCheckLB; 136cdf0e10cSrcweir PushButton aEditPB; 137cdf0e10cSrcweir FixedText aHeader1Expl; 138cdf0e10cSrcweir FixedText aHeader2Expl; 139cdf0e10cSrcweir 140cdf0e10cSrcweir String sHeader1; 141cdf0e10cSrcweir String sHeader2; 142cdf0e10cSrcweir 143cdf0e10cSrcweir String sDeleteEmptyPara; 144cdf0e10cSrcweir String sUseReplaceTbl; 145cdf0e10cSrcweir String sCptlSttWord; 146cdf0e10cSrcweir String sCptlSttSent; 147cdf0e10cSrcweir String sUserStyle; 148cdf0e10cSrcweir String sBullet; 149cdf0e10cSrcweir String sByInputBullet; 150cdf0e10cSrcweir String sBoldUnder; 151cdf0e10cSrcweir String sNoDblSpaces; 152cdf0e10cSrcweir String sDetectURL; 153cdf0e10cSrcweir String sDash; 154cdf0e10cSrcweir String sNonBrkSpace; 155cdf0e10cSrcweir String sOrdinal; 156cdf0e10cSrcweir String sRightMargin; 157cdf0e10cSrcweir String sNum; 158cdf0e10cSrcweir String sBorder; 159cdf0e10cSrcweir String sTable; 160cdf0e10cSrcweir String sReplaceTemplates; 161cdf0e10cSrcweir String sDelSpaceAtSttEnd; 162cdf0e10cSrcweir String sDelSpaceBetweenLines; 163cdf0e10cSrcweir 164cdf0e10cSrcweir String sMargin; 165cdf0e10cSrcweir String sBulletChar; 166cdf0e10cSrcweir String sByInputBulletChar; 167cdf0e10cSrcweir 168cdf0e10cSrcweir Font aBulletFont; 169cdf0e10cSrcweir Font aByInputBulletFont; 170cdf0e10cSrcweir sal_uInt16 nPercent; 171cdf0e10cSrcweir 172cdf0e10cSrcweir SvLBoxButtonData* pCheckButtonData; 173cdf0e10cSrcweir 174cdf0e10cSrcweir DECL_LINK(SelectHdl, OfaACorrCheckListBox*); 175cdf0e10cSrcweir DECL_LINK(EditHdl, PushButton*); 176cdf0e10cSrcweir SvLBoxEntry* CreateEntry(String& rTxt, sal_uInt16 nCol); 177cdf0e10cSrcweir 178cdf0e10cSrcweir 179cdf0e10cSrcweir OfaSwAutoFmtOptionsPage( Window* pParent, 180cdf0e10cSrcweir const SfxItemSet& rSet ); 181cdf0e10cSrcweir ~OfaSwAutoFmtOptionsPage(); 182cdf0e10cSrcweir 183cdf0e10cSrcweir public: 184cdf0e10cSrcweir static SfxTabPage* Create( Window* pParent, 185cdf0e10cSrcweir const SfxItemSet& rAttrSet); 186cdf0e10cSrcweir virtual sal_Bool FillItemSet( SfxItemSet& rSet ); 187cdf0e10cSrcweir virtual void Reset( const SfxItemSet& rSet ); 188cdf0e10cSrcweir virtual void ActivatePage( const SfxItemSet& ); 189cdf0e10cSrcweir }; 190cdf0e10cSrcweir 191cdf0e10cSrcweir // class AutoCorrEdit ---------------------------------------------------- 192cdf0e10cSrcweir 193cdf0e10cSrcweir class AutoCorrEdit : public Edit 194cdf0e10cSrcweir { 195cdf0e10cSrcweir Link aActionLink; 196cdf0e10cSrcweir sal_Bool bSpaces; 197cdf0e10cSrcweir 198cdf0e10cSrcweir public: 199cdf0e10cSrcweir AutoCorrEdit(Window* pParent, const ResId& rResId) : 200cdf0e10cSrcweir Edit(pParent, rResId), bSpaces(sal_False){} 201cdf0e10cSrcweir 202cdf0e10cSrcweir void SetActionHdl( const Link& rLink ) 203cdf0e10cSrcweir { aActionLink = rLink;} 204cdf0e10cSrcweir 205cdf0e10cSrcweir void SetSpaces(sal_Bool bSet) 206cdf0e10cSrcweir {bSpaces = bSet;} 207cdf0e10cSrcweir 208cdf0e10cSrcweir virtual void KeyInput( const KeyEvent& rKEvent ); 209cdf0e10cSrcweir }; 210cdf0e10cSrcweir 211cdf0e10cSrcweir // class OfaAutocorrReplacePage ------------------------------------------ 212cdf0e10cSrcweir 213cdf0e10cSrcweir class DoubleStringArray; 214cdf0e10cSrcweir typedef DoubleStringArray* DoubleStringArrayPtr; 215cdf0e10cSrcweir DECLARE_TABLE(DoubleStringTable, DoubleStringArrayPtr) 216cdf0e10cSrcweir 217cdf0e10cSrcweir class OfaAutocorrReplacePage : public SfxTabPage 218cdf0e10cSrcweir { 219cdf0e10cSrcweir using TabPage::ActivatePage; 220cdf0e10cSrcweir using TabPage::DeactivatePage; 221cdf0e10cSrcweir 222cdf0e10cSrcweir private: 223cdf0e10cSrcweir CheckBox aTextOnlyCB; 224cdf0e10cSrcweir FixedText aShortFT; 225cdf0e10cSrcweir AutoCorrEdit aShortED; 226cdf0e10cSrcweir FixedText aReplaceFT; 227cdf0e10cSrcweir AutoCorrEdit aReplaceED; 228cdf0e10cSrcweir SvTabListBox aReplaceTLB; 229cdf0e10cSrcweir PushButton aNewReplacePB; 230cdf0e10cSrcweir PushButton aDeleteReplacePB; 231cdf0e10cSrcweir 232cdf0e10cSrcweir String sModify; 233cdf0e10cSrcweir String sNew; 234cdf0e10cSrcweir 235cdf0e10cSrcweir SvStringsISortDtor* pFormatText; 236cdf0e10cSrcweir DoubleStringTable aDoubleStringTable; 237cdf0e10cSrcweir CollatorWrapper* pCompareClass; 238cdf0e10cSrcweir CollatorWrapper* pCompareCaseClass; 239cdf0e10cSrcweir CharClass* pCharClass; 240cdf0e10cSrcweir LanguageType eLang; 241cdf0e10cSrcweir 242cdf0e10cSrcweir sal_Bool bHasSelectionText; 243cdf0e10cSrcweir sal_Bool bFirstSelect:1; 244cdf0e10cSrcweir sal_Bool bReplaceEditChanged:1; 245cdf0e10cSrcweir sal_Bool bSWriter:1; 246cdf0e10cSrcweir 247cdf0e10cSrcweir DECL_LINK(SelectHdl, SvTabListBox*); 248cdf0e10cSrcweir DECL_LINK(NewDelHdl, PushButton*); 249cdf0e10cSrcweir DECL_LINK(ModifyHdl, Edit*); 250cdf0e10cSrcweir 251cdf0e10cSrcweir void RefillReplaceBox(sal_Bool bFromReset, //Box mit neuer Sprache fuellen 252cdf0e10cSrcweir LanguageType eOldLanguage, 253cdf0e10cSrcweir LanguageType eNewLanguage); 254cdf0e10cSrcweir 255cdf0e10cSrcweir public: 256cdf0e10cSrcweir OfaAutocorrReplacePage( Window* pParent, const SfxItemSet& rSet ); 257cdf0e10cSrcweir ~OfaAutocorrReplacePage(); 258cdf0e10cSrcweir 259cdf0e10cSrcweir static SfxTabPage* Create( Window* pParent, 260cdf0e10cSrcweir const SfxItemSet& rAttrSet); 261cdf0e10cSrcweir 262cdf0e10cSrcweir virtual sal_Bool FillItemSet( SfxItemSet& rSet ); 263cdf0e10cSrcweir virtual void Reset( const SfxItemSet& rSet ); 264cdf0e10cSrcweir virtual void ActivatePage( const SfxItemSet& ); 265cdf0e10cSrcweir virtual int DeactivatePage( SfxItemSet* pSet = 0 ); 266cdf0e10cSrcweir 267cdf0e10cSrcweir void SetLanguage(LanguageType eSet); 268cdf0e10cSrcweir }; 269cdf0e10cSrcweir 270cdf0e10cSrcweir // class OfaAutocorrExceptPage --------------------------------------------- 271cdf0e10cSrcweir 272cdf0e10cSrcweir struct StringsArrays; 273cdf0e10cSrcweir typedef StringsArrays* StringsArraysPtr; 274cdf0e10cSrcweir DECLARE_TABLE(StringsTable, StringsArraysPtr) 275cdf0e10cSrcweir 276cdf0e10cSrcweir class OfaAutocorrExceptPage : public SfxTabPage 277cdf0e10cSrcweir { 278cdf0e10cSrcweir using TabPage::ActivatePage; 279cdf0e10cSrcweir using TabPage::DeactivatePage; 280cdf0e10cSrcweir 281cdf0e10cSrcweir private: 282cdf0e10cSrcweir FixedLine aAbbrevFL; 283cdf0e10cSrcweir AutoCorrEdit aAbbrevED; 284cdf0e10cSrcweir ListBox aAbbrevLB; 285cdf0e10cSrcweir PushButton aNewAbbrevPB; 286cdf0e10cSrcweir PushButton aDelAbbrevPB; 287cdf0e10cSrcweir CheckBox aAutoAbbrevCB; 288cdf0e10cSrcweir 289cdf0e10cSrcweir FixedLine aDoubleCapsFL; 290cdf0e10cSrcweir AutoCorrEdit aDoubleCapsED; 291cdf0e10cSrcweir ListBox aDoubleCapsLB; 292cdf0e10cSrcweir PushButton aNewDoublePB; 293cdf0e10cSrcweir PushButton aDelDoublePB; 294cdf0e10cSrcweir CheckBox aAutoCapsCB; 295cdf0e10cSrcweir 296cdf0e10cSrcweir StringsTable aStringsTable; 297cdf0e10cSrcweir CollatorWrapper* pCompareClass; 298cdf0e10cSrcweir LanguageType eLang; 299cdf0e10cSrcweir 300cdf0e10cSrcweir DECL_LINK(NewDelHdl, PushButton*); 301cdf0e10cSrcweir DECL_LINK(SelectHdl, ListBox*); 302cdf0e10cSrcweir DECL_LINK(ModifyHdl, Edit*); 303cdf0e10cSrcweir 304cdf0e10cSrcweir void RefillReplaceBoxes(sal_Bool bFromReset, //Box mit neuer Sprache fuellen 305cdf0e10cSrcweir LanguageType eOldLanguage, 306cdf0e10cSrcweir LanguageType eNewLanguage); 307cdf0e10cSrcweir public: 308cdf0e10cSrcweir OfaAutocorrExceptPage( Window* pParent, const SfxItemSet& rSet ); 309cdf0e10cSrcweir ~OfaAutocorrExceptPage(); 310cdf0e10cSrcweir 311cdf0e10cSrcweir static SfxTabPage* Create( Window* pParent, 312cdf0e10cSrcweir const SfxItemSet& rAttrSet); 313cdf0e10cSrcweir 314cdf0e10cSrcweir virtual sal_Bool FillItemSet( SfxItemSet& rSet ); 315cdf0e10cSrcweir virtual void Reset( const SfxItemSet& rSet ); 316cdf0e10cSrcweir virtual void ActivatePage( const SfxItemSet& ); 317cdf0e10cSrcweir virtual int DeactivatePage( SfxItemSet* pSet = 0 ); 318cdf0e10cSrcweir void SetLanguage(LanguageType eSet); 319cdf0e10cSrcweir 320cdf0e10cSrcweir }; 321cdf0e10cSrcweir 322cdf0e10cSrcweir // class OfaQuoteTabPage ------------------------------------------------- 323cdf0e10cSrcweir 324cdf0e10cSrcweir class OfaQuoteTabPage : public SfxTabPage 325cdf0e10cSrcweir { 326cdf0e10cSrcweir using TabPage::ActivatePage; 327cdf0e10cSrcweir 328cdf0e10cSrcweir private: 329cdf0e10cSrcweir // For anything but writer 330cdf0e10cSrcweir SvxCheckListBox aCheckLB; 331cdf0e10cSrcweir 332cdf0e10cSrcweir // Just for writer 333cdf0e10cSrcweir OfaACorrCheckListBox aSwCheckLB; 334cdf0e10cSrcweir String sHeader1; 335cdf0e10cSrcweir String sHeader2; 336cdf0e10cSrcweir 337cdf0e10cSrcweir String sNonBrkSpace; 338cdf0e10cSrcweir String sOrdinal; 339cdf0e10cSrcweir 340cdf0e10cSrcweir SvLBoxButtonData* pCheckButtonData; 341cdf0e10cSrcweir 342cdf0e10cSrcweir FixedLine aSingleFL; 343cdf0e10cSrcweir CheckBox aSingleTypoCB; 344cdf0e10cSrcweir FixedText aSglStartQuoteFT; 345cdf0e10cSrcweir PushButton aSglStartQuotePB; 346cdf0e10cSrcweir FixedText aSglStartExFT; 347cdf0e10cSrcweir FixedText aSglEndQuoteFT; 348cdf0e10cSrcweir PushButton aSglEndQuotePB; 349cdf0e10cSrcweir FixedText aSglEndExFT; 350cdf0e10cSrcweir PushButton aSglStandardPB; 351cdf0e10cSrcweir 352cdf0e10cSrcweir FixedLine aDoubleFL; 353cdf0e10cSrcweir CheckBox aTypoCB; 354cdf0e10cSrcweir FixedText aStartQuoteFT; 355cdf0e10cSrcweir PushButton aStartQuotePB; 356cdf0e10cSrcweir FixedText aDblStartExFT; 357cdf0e10cSrcweir FixedText aEndQuoteFT; 358cdf0e10cSrcweir PushButton aEndQuotePB; 359cdf0e10cSrcweir FixedText aDblEndExFT; 360cdf0e10cSrcweir PushButton aDblStandardPB; 361cdf0e10cSrcweir 362cdf0e10cSrcweir String sStartQuoteDlg; 363cdf0e10cSrcweir String sEndQuoteDlg; 364cdf0e10cSrcweir 365cdf0e10cSrcweir String sStandard; 366cdf0e10cSrcweir 367cdf0e10cSrcweir 368cdf0e10cSrcweir sal_UCS4 cSglStartQuote; 369cdf0e10cSrcweir sal_UCS4 cSglEndQuote; 370cdf0e10cSrcweir 371cdf0e10cSrcweir sal_UCS4 cStartQuote; 372cdf0e10cSrcweir sal_UCS4 cEndQuote; 373cdf0e10cSrcweir 374cdf0e10cSrcweir DECL_LINK( QuoteHdl, PushButton* ); 375cdf0e10cSrcweir DECL_LINK( StdQuoteHdl, PushButton* ); 376cdf0e10cSrcweir 377cdf0e10cSrcweir String ChangeStringExt_Impl( sal_UCS4 ); 378cdf0e10cSrcweir 379cdf0e10cSrcweir SvLBoxEntry* CreateEntry(String& rTxt, sal_uInt16 nCol); 380cdf0e10cSrcweir 381cdf0e10cSrcweir OfaQuoteTabPage( Window* pParent, const SfxItemSet& rSet ); 382cdf0e10cSrcweir public: 383cdf0e10cSrcweir ~OfaQuoteTabPage(); 384cdf0e10cSrcweir 385cdf0e10cSrcweir static SfxTabPage* Create( Window* pParent, 386cdf0e10cSrcweir const SfxItemSet& rAttrSet); 387cdf0e10cSrcweir 388cdf0e10cSrcweir virtual sal_Bool FillItemSet( SfxItemSet& rSet ); 389cdf0e10cSrcweir virtual void Reset( const SfxItemSet& rSet ); 390cdf0e10cSrcweir virtual void ActivatePage( const SfxItemSet& ); 391cdf0e10cSrcweir }; 392cdf0e10cSrcweir 393cdf0e10cSrcweir // class OfaAutoCompleteTabPage --------------------------------------------- 394cdf0e10cSrcweir 395cdf0e10cSrcweir class OfaAutoCompleteTabPage : public SfxTabPage 396cdf0e10cSrcweir { 397cdf0e10cSrcweir using TabPage::ActivatePage; 398cdf0e10cSrcweir 399cdf0e10cSrcweir class AutoCompleteMultiListBox : public MultiListBox 400cdf0e10cSrcweir { 401cdf0e10cSrcweir OfaAutoCompleteTabPage& rPage; 402cdf0e10cSrcweir public: 403cdf0e10cSrcweir AutoCompleteMultiListBox( OfaAutoCompleteTabPage& rPg, 404cdf0e10cSrcweir const ResId& rResId ) 405cdf0e10cSrcweir : MultiListBox( &rPg, rResId ), rPage( rPg ) {} 406cdf0e10cSrcweir 407cdf0e10cSrcweir virtual long PreNotify( NotifyEvent& rNEvt ); 408cdf0e10cSrcweir }; 409cdf0e10cSrcweir 410cdf0e10cSrcweir CheckBox aCBActiv; //Enable word completion 411cdf0e10cSrcweir CheckBox aCBAppendSpace;//Append space 412cdf0e10cSrcweir CheckBox aCBAsTip; //Show as tip 413cdf0e10cSrcweir 414cdf0e10cSrcweir CheckBox aCBCollect;//Collect words 415cdf0e10cSrcweir CheckBox aCBRemoveList;//...save the list for later use... 416cdf0e10cSrcweir //--removed--CheckBox aCBEndless;// 417cdf0e10cSrcweir 418cdf0e10cSrcweir FixedText aFTExpandKey; 419cdf0e10cSrcweir ListBox aDCBExpandKey; 420cdf0e10cSrcweir FixedText aFTMinWordlen; 421cdf0e10cSrcweir NumericField aNFMinWordlen; 422cdf0e10cSrcweir FixedText aFTMaxEntries; 423cdf0e10cSrcweir NumericField aNFMaxEntries; 424cdf0e10cSrcweir AutoCompleteMultiListBox aLBEntries; 425cdf0e10cSrcweir PushButton aPBEntries; 426cdf0e10cSrcweir SvStringsISortDtor* pAutoCmpltList; 427cdf0e10cSrcweir sal_uInt16 nAutoCmpltListCnt; 428cdf0e10cSrcweir 429cdf0e10cSrcweir DECL_LINK( CheckHdl, CheckBox* ); 430cdf0e10cSrcweir 431cdf0e10cSrcweir OfaAutoCompleteTabPage( Window* pParent, 432cdf0e10cSrcweir const SfxItemSet& rSet ); 433cdf0e10cSrcweir public: 434cdf0e10cSrcweir virtual ~OfaAutoCompleteTabPage(); 435cdf0e10cSrcweir 436cdf0e10cSrcweir static SfxTabPage* Create( Window* pParent, 437cdf0e10cSrcweir const SfxItemSet& rAttrSet); 438cdf0e10cSrcweir 439cdf0e10cSrcweir virtual sal_Bool FillItemSet( SfxItemSet& rSet ); 440cdf0e10cSrcweir virtual void Reset( const SfxItemSet& rSet ); 441cdf0e10cSrcweir virtual void ActivatePage( const SfxItemSet& ); 442cdf0e10cSrcweir 443cdf0e10cSrcweir void CopyToClipboard() const; 444cdf0e10cSrcweir DECL_LINK( DeleteHdl, PushButton* ); 445cdf0e10cSrcweir }; 446cdf0e10cSrcweir 447cdf0e10cSrcweir // class OfaSmartTagOptionsTabPage --------------------------------------------- 448cdf0e10cSrcweir 449cdf0e10cSrcweir /** Smart tag options tab page 450cdf0e10cSrcweir 451cdf0e10cSrcweir This tab page is used to enable/disable smart tag types 452cdf0e10cSrcweir */ 453cdf0e10cSrcweir class OfaSmartTagOptionsTabPage : public SfxTabPage 454cdf0e10cSrcweir { 455cdf0e10cSrcweir using TabPage::ActivatePage; 456cdf0e10cSrcweir 457cdf0e10cSrcweir private: 458cdf0e10cSrcweir 459cdf0e10cSrcweir // controls 460cdf0e10cSrcweir CheckBox m_aMainCB; 461cdf0e10cSrcweir SvxCheckListBox m_aSmartTagTypesLB; 462cdf0e10cSrcweir PushButton m_aPropertiesPB; 463cdf0e10cSrcweir FixedText m_aTitleFT; 464cdf0e10cSrcweir 465cdf0e10cSrcweir // construction via Create() 466cdf0e10cSrcweir OfaSmartTagOptionsTabPage( Window* pParent, const SfxItemSet& rSet ); 467cdf0e10cSrcweir 468cdf0e10cSrcweir /** Inserts items into m_aSmartTagTypesLB 469cdf0e10cSrcweir 470cdf0e10cSrcweir Reads out the smart tag types supported by the SmartTagMgr and 471cdf0e10cSrcweir inserts the associated strings into the list box. 472cdf0e10cSrcweir */ 473cdf0e10cSrcweir void FillListBox( const SmartTagMgr& rSmartTagMgr ); 474cdf0e10cSrcweir 475cdf0e10cSrcweir /** Clears the m_aSmartTagTypesLB 476cdf0e10cSrcweir */ 477cdf0e10cSrcweir void ClearListBox(); 478cdf0e10cSrcweir 479cdf0e10cSrcweir /** Handler for the check box 480cdf0e10cSrcweir 481cdf0e10cSrcweir Enables/disables all controls in the tab page (except from the 482cdf0e10cSrcweir check box. 483cdf0e10cSrcweir */ 484cdf0e10cSrcweir DECL_LINK( CheckHdl, CheckBox* ); 485cdf0e10cSrcweir 486cdf0e10cSrcweir /** Handler for the push button 487cdf0e10cSrcweir 488cdf0e10cSrcweir Calls the displayPropertyPage function of the smart tag recognizer 489cdf0e10cSrcweir associated with the currently selected smart tag type. 490cdf0e10cSrcweir */ 491cdf0e10cSrcweir DECL_LINK( ClickHdl, PushButton* ); 492cdf0e10cSrcweir 493cdf0e10cSrcweir /** Handler for the list box 494cdf0e10cSrcweir 495cdf0e10cSrcweir Enables/disables the properties push button if selection in the 496cdf0e10cSrcweir smart tag types list box changes. 497cdf0e10cSrcweir */ 498cdf0e10cSrcweir DECL_LINK( SelectHdl, SvxCheckListBox* ); 499cdf0e10cSrcweir 500cdf0e10cSrcweir public: 501cdf0e10cSrcweir 502cdf0e10cSrcweir virtual ~OfaSmartTagOptionsTabPage(); 503cdf0e10cSrcweir 504cdf0e10cSrcweir static SfxTabPage* Create( Window* pParent, const SfxItemSet& rAttrSet); 505cdf0e10cSrcweir 506cdf0e10cSrcweir virtual sal_Bool FillItemSet( SfxItemSet& rSet ); 507cdf0e10cSrcweir virtual void Reset( const SfxItemSet& rSet ); 508cdf0e10cSrcweir virtual void ActivatePage( const SfxItemSet& ); 509cdf0e10cSrcweir }; 510cdf0e10cSrcweir 511cdf0e10cSrcweir #endif // _OFA_AUTOCDLG_CXX 512cdf0e10cSrcweir 513cdf0e10cSrcweir #endif // 514cdf0e10cSrcweir 515