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