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 SW_DOCUFLD_HXX 28*cdf0e10cSrcweir #define SW_DOCUFLD_HXX 29*cdf0e10cSrcweir 30*cdf0e10cSrcweir 31*cdf0e10cSrcweir #include <tools/date.hxx> 32*cdf0e10cSrcweir #include <tools/datetime.hxx> 33*cdf0e10cSrcweir 34*cdf0e10cSrcweir 35*cdf0e10cSrcweir #include <svl/macitem.hxx> 36*cdf0e10cSrcweir 37*cdf0e10cSrcweir #include "fldbas.hxx" 38*cdf0e10cSrcweir #include "numrule.hxx" 39*cdf0e10cSrcweir 40*cdf0e10cSrcweir class _SetGetExpFlds; 41*cdf0e10cSrcweir class SwTxtFld; 42*cdf0e10cSrcweir class SwFrm; 43*cdf0e10cSrcweir class OutlinerParaObject; 44*cdf0e10cSrcweir class SwTextAPIObject; 45*cdf0e10cSrcweir 46*cdf0e10cSrcweir enum SwAuthorFormat 47*cdf0e10cSrcweir { 48*cdf0e10cSrcweir AF_BEGIN, 49*cdf0e10cSrcweir AF_NAME = AF_BEGIN, 50*cdf0e10cSrcweir AF_SHORTCUT, 51*cdf0e10cSrcweir AF_END, 52*cdf0e10cSrcweir AF_FIXED = 0x8000 53*cdf0e10cSrcweir }; 54*cdf0e10cSrcweir 55*cdf0e10cSrcweir /*-------------------------------------------------------------------- 56*cdf0e10cSrcweir Beschreibung: Untertyp der Dokumentstatistik 57*cdf0e10cSrcweir --------------------------------------------------------------------*/ 58*cdf0e10cSrcweir 59*cdf0e10cSrcweir enum SwDocStatSubType 60*cdf0e10cSrcweir { 61*cdf0e10cSrcweir DS_BEGIN, 62*cdf0e10cSrcweir DS_PAGE = DS_BEGIN, 63*cdf0e10cSrcweir DS_PARA, 64*cdf0e10cSrcweir DS_WORD, 65*cdf0e10cSrcweir DS_CHAR, 66*cdf0e10cSrcweir DS_TBL, 67*cdf0e10cSrcweir DS_GRF, 68*cdf0e10cSrcweir DS_OLE, 69*cdf0e10cSrcweir DS_END 70*cdf0e10cSrcweir }; 71*cdf0e10cSrcweir 72*cdf0e10cSrcweir typedef sal_uInt16 SwDocInfoSubType; 73*cdf0e10cSrcweir namespace nsSwDocInfoSubType 74*cdf0e10cSrcweir { 75*cdf0e10cSrcweir // NB: these must denote consecutive integers! 76*cdf0e10cSrcweir // NB2: these are extended by 4 DI_INFO values for backward compatibility 77*cdf0e10cSrcweir // in filter/html/htmlfld.cxx, so make sure that DI_SUBTYPE_END 78*cdf0e10cSrcweir // really is the end, and is at least 4 less than DI_SUB_*! 79*cdf0e10cSrcweir const SwDocInfoSubType DI_SUBTYPE_BEGIN = 0; 80*cdf0e10cSrcweir const SwDocInfoSubType DI_TITEL = DI_SUBTYPE_BEGIN; 81*cdf0e10cSrcweir const SwDocInfoSubType DI_THEMA = 1; 82*cdf0e10cSrcweir const SwDocInfoSubType DI_KEYS = 2; 83*cdf0e10cSrcweir const SwDocInfoSubType DI_COMMENT = 3; 84*cdf0e10cSrcweir const SwDocInfoSubType DI_CREATE = 4; 85*cdf0e10cSrcweir const SwDocInfoSubType DI_CHANGE = 5; 86*cdf0e10cSrcweir const SwDocInfoSubType DI_PRINT = 6; 87*cdf0e10cSrcweir const SwDocInfoSubType DI_DOCNO = 7; 88*cdf0e10cSrcweir const SwDocInfoSubType DI_EDIT = 8; 89*cdf0e10cSrcweir const SwDocInfoSubType DI_CUSTOM = 9; 90*cdf0e10cSrcweir const SwDocInfoSubType DI_SUBTYPE_END = 10; 91*cdf0e10cSrcweir 92*cdf0e10cSrcweir 93*cdf0e10cSrcweir const SwDocInfoSubType DI_SUB_AUTHOR = 0x0100; 94*cdf0e10cSrcweir const SwDocInfoSubType DI_SUB_TIME = 0x0200; 95*cdf0e10cSrcweir const SwDocInfoSubType DI_SUB_DATE = 0x0300; 96*cdf0e10cSrcweir const SwDocInfoSubType DI_SUB_FIXED = 0x1000; 97*cdf0e10cSrcweir const SwDocInfoSubType DI_SUB_MASK = 0xff00; 98*cdf0e10cSrcweir } 99*cdf0e10cSrcweir 100*cdf0e10cSrcweir 101*cdf0e10cSrcweir enum RegInfoFormat // Nur noch zum laden alter Dokumente!!! 102*cdf0e10cSrcweir { 103*cdf0e10cSrcweir RF_AUTHOR, 104*cdf0e10cSrcweir RF_TIME, 105*cdf0e10cSrcweir RF_DATE, 106*cdf0e10cSrcweir RF_ALL 107*cdf0e10cSrcweir }; 108*cdf0e10cSrcweir 109*cdf0e10cSrcweir enum SwPageNumSubType 110*cdf0e10cSrcweir { 111*cdf0e10cSrcweir PG_RANDOM, 112*cdf0e10cSrcweir PG_NEXT, 113*cdf0e10cSrcweir PG_PREV 114*cdf0e10cSrcweir }; 115*cdf0e10cSrcweir 116*cdf0e10cSrcweir enum SwExtUserSubType 117*cdf0e10cSrcweir { 118*cdf0e10cSrcweir EU_COMPANY /*EU_FIRMA*/, 119*cdf0e10cSrcweir EU_FIRSTNAME /*EU_VORNAME*/, 120*cdf0e10cSrcweir EU_NAME /*EU_NAME*/, 121*cdf0e10cSrcweir EU_SHORTCUT /*EU_ABK*/, 122*cdf0e10cSrcweir EU_STREET /*EU_STRASSE*/, 123*cdf0e10cSrcweir EU_COUNTRY /*EU_LAND*/, 124*cdf0e10cSrcweir EU_ZIP /*EU_PLZ*/, 125*cdf0e10cSrcweir EU_CITY /*EU_ORT*/, 126*cdf0e10cSrcweir EU_TITLE /*EU_TITEL*/, 127*cdf0e10cSrcweir EU_POSITION /*EU_POS*/, 128*cdf0e10cSrcweir EU_PHONE_PRIVATE /*EU_TELPRIV*/, 129*cdf0e10cSrcweir EU_PHONE_COMPANY /*EU_TELFIRMA*/, 130*cdf0e10cSrcweir EU_FAX, 131*cdf0e10cSrcweir EU_EMAIL, 132*cdf0e10cSrcweir EU_STATE, 133*cdf0e10cSrcweir EU_FATHERSNAME, 134*cdf0e10cSrcweir EU_APARTMENT 135*cdf0e10cSrcweir }; 136*cdf0e10cSrcweir 137*cdf0e10cSrcweir enum SwJumpEditFormat 138*cdf0e10cSrcweir { 139*cdf0e10cSrcweir JE_FMT_TEXT, 140*cdf0e10cSrcweir JE_FMT_TABLE, 141*cdf0e10cSrcweir JE_FMT_FRAME, 142*cdf0e10cSrcweir JE_FMT_GRAPHIC, 143*cdf0e10cSrcweir JE_FMT_OLE 144*cdf0e10cSrcweir }; 145*cdf0e10cSrcweir 146*cdf0e10cSrcweir /*-------------------------------------------------------------------- 147*cdf0e10cSrcweir Beschreibung: Seitennummer 148*cdf0e10cSrcweir --------------------------------------------------------------------*/ 149*cdf0e10cSrcweir 150*cdf0e10cSrcweir class SwPageNumberFieldType : public SwFieldType 151*cdf0e10cSrcweir { 152*cdf0e10cSrcweir sal_Int16 nNumberingType; 153*cdf0e10cSrcweir sal_uInt16 nNum, nMax; 154*cdf0e10cSrcweir sal_Bool bVirtuell; 155*cdf0e10cSrcweir 156*cdf0e10cSrcweir public: 157*cdf0e10cSrcweir SwPageNumberFieldType(); 158*cdf0e10cSrcweir 159*cdf0e10cSrcweir String& Expand( sal_uInt32 nFmt, short nOff, const String&, String& rRet ) const; 160*cdf0e10cSrcweir void ChangeExpansion( SwDoc* pDoc, sal_uInt16 nNum, sal_uInt16 nMax, 161*cdf0e10cSrcweir sal_Bool bVirtPageNum, const sal_Int16* pNumFmt = 0 ); 162*cdf0e10cSrcweir virtual SwFieldType* Copy() const; 163*cdf0e10cSrcweir }; 164*cdf0e10cSrcweir 165*cdf0e10cSrcweir /*-------------------------------------------------------------------- 166*cdf0e10cSrcweir Beschreibung: Seitennummerierung 167*cdf0e10cSrcweir --------------------------------------------------------------------*/ 168*cdf0e10cSrcweir 169*cdf0e10cSrcweir class SW_DLLPUBLIC SwPageNumberField : public SwField 170*cdf0e10cSrcweir { 171*cdf0e10cSrcweir String sUserStr; 172*cdf0e10cSrcweir sal_uInt16 nSubType; 173*cdf0e10cSrcweir short nOffset; 174*cdf0e10cSrcweir 175*cdf0e10cSrcweir public: 176*cdf0e10cSrcweir SwPageNumberField(SwPageNumberFieldType*, sal_uInt16 nSub = PG_RANDOM, 177*cdf0e10cSrcweir sal_uInt32 nFmt = 0, short nOff = 0); 178*cdf0e10cSrcweir 179*cdf0e10cSrcweir virtual String Expand() const; 180*cdf0e10cSrcweir virtual SwField* Copy() const; 181*cdf0e10cSrcweir 182*cdf0e10cSrcweir virtual String GetPar2() const; 183*cdf0e10cSrcweir virtual void SetPar2(const String& rStr); 184*cdf0e10cSrcweir 185*cdf0e10cSrcweir virtual sal_uInt16 GetSubType() const; 186*cdf0e10cSrcweir // virtual void SetSubType(sal_uInt16 nSub); // OM: entfernt, da unbenoetigt und gefaehrlich 187*cdf0e10cSrcweir virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const; 188*cdf0e10cSrcweir virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ); 189*cdf0e10cSrcweir 190*cdf0e10cSrcweir const String& GetUserString() const { return sUserStr; } 191*cdf0e10cSrcweir void SetUserString( const String& rS ) { sUserStr = rS; } 192*cdf0e10cSrcweir }; 193*cdf0e10cSrcweir 194*cdf0e10cSrcweir /*-------------------------------------------------------------------- 195*cdf0e10cSrcweir Beschreibung: Autoren 196*cdf0e10cSrcweir --------------------------------------------------------------------*/ 197*cdf0e10cSrcweir 198*cdf0e10cSrcweir class SwAuthorFieldType : public SwFieldType 199*cdf0e10cSrcweir { 200*cdf0e10cSrcweir public: 201*cdf0e10cSrcweir SwAuthorFieldType(); 202*cdf0e10cSrcweir 203*cdf0e10cSrcweir String Expand(sal_uLong) const; 204*cdf0e10cSrcweir virtual SwFieldType* Copy() const; 205*cdf0e10cSrcweir }; 206*cdf0e10cSrcweir 207*cdf0e10cSrcweir /*-------------------------------------------------------------------- 208*cdf0e10cSrcweir Beschreibung: AutorenFeld 209*cdf0e10cSrcweir --------------------------------------------------------------------*/ 210*cdf0e10cSrcweir 211*cdf0e10cSrcweir class SwAuthorField : public SwField 212*cdf0e10cSrcweir { 213*cdf0e10cSrcweir String aContent; 214*cdf0e10cSrcweir 215*cdf0e10cSrcweir public: 216*cdf0e10cSrcweir SwAuthorField(SwAuthorFieldType*, sal_uInt32 nFmt = 0); 217*cdf0e10cSrcweir 218*cdf0e10cSrcweir virtual String Expand() const; 219*cdf0e10cSrcweir virtual SwField* Copy() const; 220*cdf0e10cSrcweir 221*cdf0e10cSrcweir inline void SetExpansion(const String& rStr) { aContent = rStr; } 222*cdf0e10cSrcweir inline const String& GetContent() const { return aContent; } 223*cdf0e10cSrcweir 224*cdf0e10cSrcweir virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const; 225*cdf0e10cSrcweir virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ); 226*cdf0e10cSrcweir }; 227*cdf0e10cSrcweir 228*cdf0e10cSrcweir /*-------------------------------------------------------------------- 229*cdf0e10cSrcweir Beschreibung: Filename 230*cdf0e10cSrcweir --------------------------------------------------------------------*/ 231*cdf0e10cSrcweir 232*cdf0e10cSrcweir class SwFileNameFieldType : public SwFieldType 233*cdf0e10cSrcweir { 234*cdf0e10cSrcweir SwDoc *pDoc; 235*cdf0e10cSrcweir public: 236*cdf0e10cSrcweir SwFileNameFieldType(SwDoc*); 237*cdf0e10cSrcweir 238*cdf0e10cSrcweir String Expand(sal_uLong) const; 239*cdf0e10cSrcweir virtual SwFieldType* Copy() const; 240*cdf0e10cSrcweir }; 241*cdf0e10cSrcweir 242*cdf0e10cSrcweir /*-------------------------------------------------------------------- 243*cdf0e10cSrcweir Beschreibung: FileName 244*cdf0e10cSrcweir --------------------------------------------------------------------*/ 245*cdf0e10cSrcweir 246*cdf0e10cSrcweir class SW_DLLPUBLIC SwFileNameField : public SwField 247*cdf0e10cSrcweir { 248*cdf0e10cSrcweir String aContent; 249*cdf0e10cSrcweir 250*cdf0e10cSrcweir public: 251*cdf0e10cSrcweir SwFileNameField(SwFileNameFieldType*, sal_uInt32 nFmt = 0); 252*cdf0e10cSrcweir 253*cdf0e10cSrcweir virtual String Expand() const; 254*cdf0e10cSrcweir virtual SwField* Copy() const; 255*cdf0e10cSrcweir 256*cdf0e10cSrcweir inline void SetExpansion(const String& rStr) { aContent = rStr; } 257*cdf0e10cSrcweir inline const String& GetContent() const { return aContent; } 258*cdf0e10cSrcweir 259*cdf0e10cSrcweir virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const; 260*cdf0e10cSrcweir virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ); 261*cdf0e10cSrcweir }; 262*cdf0e10cSrcweir 263*cdf0e10cSrcweir /*-------------------------------------------------------------------- 264*cdf0e10cSrcweir Beschreibung: TemplName 265*cdf0e10cSrcweir --------------------------------------------------------------------*/ 266*cdf0e10cSrcweir 267*cdf0e10cSrcweir class SwTemplNameFieldType : public SwFieldType 268*cdf0e10cSrcweir { 269*cdf0e10cSrcweir SwDoc *pDoc; 270*cdf0e10cSrcweir public: 271*cdf0e10cSrcweir SwTemplNameFieldType(SwDoc*); 272*cdf0e10cSrcweir 273*cdf0e10cSrcweir String Expand(sal_uLong) const; 274*cdf0e10cSrcweir virtual SwFieldType* Copy() const; 275*cdf0e10cSrcweir }; 276*cdf0e10cSrcweir 277*cdf0e10cSrcweir /*-------------------------------------------------------------------- 278*cdf0e10cSrcweir Beschreibung: TemplName 279*cdf0e10cSrcweir --------------------------------------------------------------------*/ 280*cdf0e10cSrcweir 281*cdf0e10cSrcweir class SW_DLLPUBLIC SwTemplNameField : public SwField 282*cdf0e10cSrcweir { 283*cdf0e10cSrcweir public: 284*cdf0e10cSrcweir SwTemplNameField(SwTemplNameFieldType*, sal_uInt32 nFmt = 0); 285*cdf0e10cSrcweir 286*cdf0e10cSrcweir virtual String Expand() const; 287*cdf0e10cSrcweir virtual SwField* Copy() const; 288*cdf0e10cSrcweir virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const; 289*cdf0e10cSrcweir virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ); 290*cdf0e10cSrcweir }; 291*cdf0e10cSrcweir 292*cdf0e10cSrcweir 293*cdf0e10cSrcweir /*-------------------------------------------------------------------- 294*cdf0e10cSrcweir Beschreibung: Docstatistik 295*cdf0e10cSrcweir --------------------------------------------------------------------*/ 296*cdf0e10cSrcweir 297*cdf0e10cSrcweir class SwDocStatFieldType : public SwFieldType 298*cdf0e10cSrcweir { 299*cdf0e10cSrcweir SwDoc* pDoc; 300*cdf0e10cSrcweir sal_Int16 nNumberingType;//com::sun::star::style::NumberingType 301*cdf0e10cSrcweir 302*cdf0e10cSrcweir public: 303*cdf0e10cSrcweir SwDocStatFieldType(SwDoc*); 304*cdf0e10cSrcweir String Expand(sal_uInt16 nSubType, sal_uInt32 nFmt) const; 305*cdf0e10cSrcweir virtual SwFieldType* Copy() const; 306*cdf0e10cSrcweir 307*cdf0e10cSrcweir inline void SetNumFormat( sal_Int16 eFmt ) { nNumberingType = eFmt; } 308*cdf0e10cSrcweir }; 309*cdf0e10cSrcweir 310*cdf0e10cSrcweir /*-------------------------------------------------------------------- 311*cdf0e10cSrcweir Beschreibung: Dokumentstatistik 312*cdf0e10cSrcweir --------------------------------------------------------------------*/ 313*cdf0e10cSrcweir 314*cdf0e10cSrcweir class SW_DLLPUBLIC SwDocStatField : public SwField 315*cdf0e10cSrcweir { 316*cdf0e10cSrcweir sal_uInt16 nSubType; 317*cdf0e10cSrcweir 318*cdf0e10cSrcweir public: 319*cdf0e10cSrcweir SwDocStatField( SwDocStatFieldType*, 320*cdf0e10cSrcweir sal_uInt16 nSubType = 0, sal_uInt32 nFmt = 0); 321*cdf0e10cSrcweir 322*cdf0e10cSrcweir void ChangeExpansion( const SwFrm* pFrm ); 323*cdf0e10cSrcweir 324*cdf0e10cSrcweir virtual String Expand() const; 325*cdf0e10cSrcweir virtual SwField* Copy() const; 326*cdf0e10cSrcweir 327*cdf0e10cSrcweir virtual sal_uInt16 GetSubType() const; 328*cdf0e10cSrcweir virtual void SetSubType(sal_uInt16 nSub); 329*cdf0e10cSrcweir virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const; 330*cdf0e10cSrcweir virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ); 331*cdf0e10cSrcweir }; 332*cdf0e10cSrcweir 333*cdf0e10cSrcweir /*-------------------------------------------------------------------- 334*cdf0e10cSrcweir Beschreibung: versteckter Text 335*cdf0e10cSrcweir --------------------------------------------------------------------*/ 336*cdf0e10cSrcweir 337*cdf0e10cSrcweir class SwHiddenTxtFieldType : public SwFieldType 338*cdf0e10cSrcweir { 339*cdf0e10cSrcweir sal_Bool bHidden; 340*cdf0e10cSrcweir public: 341*cdf0e10cSrcweir SwHiddenTxtFieldType(sal_Bool bSetHidden = sal_True); 342*cdf0e10cSrcweir 343*cdf0e10cSrcweir virtual SwFieldType* Copy() const; 344*cdf0e10cSrcweir 345*cdf0e10cSrcweir void SetHiddenFlag( sal_Bool bSetHidden = sal_True ); 346*cdf0e10cSrcweir inline sal_Bool GetHiddenFlag() const { return bHidden; } 347*cdf0e10cSrcweir }; 348*cdf0e10cSrcweir 349*cdf0e10cSrcweir /*-------------------------------------------------------------------- 350*cdf0e10cSrcweir Beschreibung: Versteckter Text 351*cdf0e10cSrcweir --------------------------------------------------------------------*/ 352*cdf0e10cSrcweir 353*cdf0e10cSrcweir class SwHiddenTxtField : public SwField 354*cdf0e10cSrcweir { 355*cdf0e10cSrcweir String aTRUETxt; // Text wenn Bedingung sal_True 356*cdf0e10cSrcweir String aFALSETxt; // Wenn Bedingung falsch 357*cdf0e10cSrcweir String aContent; // Ausgewerteter DB-Text 358*cdf0e10cSrcweir 359*cdf0e10cSrcweir String aCond; // Bedingung 360*cdf0e10cSrcweir sal_uInt16 nSubType; 361*cdf0e10cSrcweir 362*cdf0e10cSrcweir sal_Bool bCanToggle : 1; // kann das Feld einzeln getoggelt werden? 363*cdf0e10cSrcweir sal_Bool bIsHidden : 1; // ist es nicht sichtbar? 364*cdf0e10cSrcweir sal_Bool bValid : 1; // DB-Feld evaluiert? 365*cdf0e10cSrcweir 366*cdf0e10cSrcweir virtual String Expand() const; 367*cdf0e10cSrcweir virtual SwField* Copy() const; 368*cdf0e10cSrcweir 369*cdf0e10cSrcweir public: 370*cdf0e10cSrcweir SwHiddenTxtField( SwHiddenTxtFieldType*, 371*cdf0e10cSrcweir sal_Bool bConditional, 372*cdf0e10cSrcweir const String& rCond, 373*cdf0e10cSrcweir const String& rTxt, 374*cdf0e10cSrcweir sal_Bool bHidden = sal_False, 375*cdf0e10cSrcweir sal_uInt16 nSubType = TYP_HIDDENTXTFLD); 376*cdf0e10cSrcweir 377*cdf0e10cSrcweir SwHiddenTxtField( SwHiddenTxtFieldType*, 378*cdf0e10cSrcweir const String& rCond, 379*cdf0e10cSrcweir const String& rTrue, 380*cdf0e10cSrcweir const String& rFalse, 381*cdf0e10cSrcweir sal_uInt16 nSubType = TYP_HIDDENTXTFLD); 382*cdf0e10cSrcweir 383*cdf0e10cSrcweir virtual String GetFieldName() const; 384*cdf0e10cSrcweir 385*cdf0e10cSrcweir void Evaluate(SwDoc*); 386*cdf0e10cSrcweir 387*cdf0e10cSrcweir inline void SetValue(sal_Bool bHidden) { bIsHidden = bHidden; } 388*cdf0e10cSrcweir String GetColumnName(const String& rName); 389*cdf0e10cSrcweir String GetDBName(const String& rName, SwDoc *pDoc); 390*cdf0e10cSrcweir 391*cdf0e10cSrcweir // Condition 392*cdf0e10cSrcweir virtual void SetPar1(const String& rStr); 393*cdf0e10cSrcweir virtual const String& GetPar1() const; 394*cdf0e10cSrcweir 395*cdf0e10cSrcweir // True/False - String 396*cdf0e10cSrcweir virtual void SetPar2(const String& rStr); 397*cdf0e10cSrcweir virtual String GetPar2() const; 398*cdf0e10cSrcweir 399*cdf0e10cSrcweir 400*cdf0e10cSrcweir virtual sal_uInt16 GetSubType() const; 401*cdf0e10cSrcweir // virtual void SetSubType(sal_uInt16 nSub); // OM: entfernt, da unbenoetigt und gefaehrlich 402*cdf0e10cSrcweir virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const; 403*cdf0e10cSrcweir virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ); 404*cdf0e10cSrcweir }; 405*cdf0e10cSrcweir 406*cdf0e10cSrcweir /*-------------------------------------------------------------------- 407*cdf0e10cSrcweir Beschreibung: Feld das zu einer Leerzeile (ohne Hoehe) expandiert 408*cdf0e10cSrcweir --------------------------------------------------------------------*/ 409*cdf0e10cSrcweir 410*cdf0e10cSrcweir class SwHiddenParaFieldType : public SwFieldType 411*cdf0e10cSrcweir { 412*cdf0e10cSrcweir public: 413*cdf0e10cSrcweir SwHiddenParaFieldType(); 414*cdf0e10cSrcweir 415*cdf0e10cSrcweir virtual SwFieldType* Copy() const; 416*cdf0e10cSrcweir }; 417*cdf0e10cSrcweir 418*cdf0e10cSrcweir /*-------------------------------------------------------------------- 419*cdf0e10cSrcweir Beschreibung: Versteckter Absatz 420*cdf0e10cSrcweir --------------------------------------------------------------------*/ 421*cdf0e10cSrcweir 422*cdf0e10cSrcweir class SwHiddenParaField : public SwField 423*cdf0e10cSrcweir { 424*cdf0e10cSrcweir String aCond; 425*cdf0e10cSrcweir sal_Bool bIsHidden:1; 426*cdf0e10cSrcweir public: 427*cdf0e10cSrcweir // Direkte Eingabe alten Wert loeschen 428*cdf0e10cSrcweir SwHiddenParaField(SwHiddenParaFieldType*, const String& rCond); 429*cdf0e10cSrcweir 430*cdf0e10cSrcweir virtual String Expand() const; 431*cdf0e10cSrcweir virtual SwField* Copy() const; 432*cdf0e10cSrcweir 433*cdf0e10cSrcweir void SetHidden(sal_Bool bHidden) { bIsHidden = bHidden; } 434*cdf0e10cSrcweir sal_Bool IsHidden() const { return bIsHidden; } 435*cdf0e10cSrcweir 436*cdf0e10cSrcweir // Bedingung erfragen/setzen 437*cdf0e10cSrcweir virtual const String& GetPar1() const; 438*cdf0e10cSrcweir virtual void SetPar1(const String& rStr); 439*cdf0e10cSrcweir virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const; 440*cdf0e10cSrcweir virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ); 441*cdf0e10cSrcweir }; 442*cdf0e10cSrcweir 443*cdf0e10cSrcweir /*-------------------------------------------------------------------- 444*cdf0e10cSrcweir Beschreibung: Macro ausfuehren 445*cdf0e10cSrcweir --------------------------------------------------------------------*/ 446*cdf0e10cSrcweir 447*cdf0e10cSrcweir class SwMacroFieldType : public SwFieldType 448*cdf0e10cSrcweir { 449*cdf0e10cSrcweir SwDoc* pDoc; 450*cdf0e10cSrcweir 451*cdf0e10cSrcweir public: 452*cdf0e10cSrcweir SwMacroFieldType(SwDoc*); 453*cdf0e10cSrcweir 454*cdf0e10cSrcweir virtual SwFieldType* Copy() const; 455*cdf0e10cSrcweir }; 456*cdf0e10cSrcweir 457*cdf0e10cSrcweir /*-------------------------------------------------------------------- 458*cdf0e10cSrcweir Beschreibung: Macrofeld 459*cdf0e10cSrcweir --------------------------------------------------------------------*/ 460*cdf0e10cSrcweir 461*cdf0e10cSrcweir class SW_DLLPUBLIC SwMacroField : public SwField 462*cdf0e10cSrcweir { 463*cdf0e10cSrcweir String aMacro; 464*cdf0e10cSrcweir String aText; 465*cdf0e10cSrcweir sal_Bool bIsScriptURL; 466*cdf0e10cSrcweir 467*cdf0e10cSrcweir virtual String Expand() const; 468*cdf0e10cSrcweir virtual SwField* Copy() const; 469*cdf0e10cSrcweir 470*cdf0e10cSrcweir public: 471*cdf0e10cSrcweir // Direkte Eingabe alten Wert loeschen 472*cdf0e10cSrcweir SwMacroField( SwMacroFieldType*, const String& rLibAndName, 473*cdf0e10cSrcweir const String& rTxt); 474*cdf0e10cSrcweir 475*cdf0e10cSrcweir inline const String& GetMacro() const { return aMacro; } 476*cdf0e10cSrcweir String GetLibName() const; 477*cdf0e10cSrcweir String GetMacroName() const; 478*cdf0e10cSrcweir SvxMacro GetSvxMacro() const; 479*cdf0e10cSrcweir 480*cdf0e10cSrcweir virtual String GetFieldName() const; 481*cdf0e10cSrcweir 482*cdf0e10cSrcweir // Library und FileName 483*cdf0e10cSrcweir virtual const String& GetPar1() const; 484*cdf0e10cSrcweir virtual void SetPar1(const String& rStr); 485*cdf0e10cSrcweir 486*cdf0e10cSrcweir // Macrotext 487*cdf0e10cSrcweir virtual String GetPar2() const; 488*cdf0e10cSrcweir virtual void SetPar2(const String& rStr); 489*cdf0e10cSrcweir virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const; 490*cdf0e10cSrcweir virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ); 491*cdf0e10cSrcweir 492*cdf0e10cSrcweir static void CreateMacroString( String& rMacro, 493*cdf0e10cSrcweir const String& rMacroName, 494*cdf0e10cSrcweir const String& rLibraryName ); 495*cdf0e10cSrcweir 496*cdf0e10cSrcweir static sal_Bool isScriptURL( const String& str ); 497*cdf0e10cSrcweir }; 498*cdf0e10cSrcweir 499*cdf0e10cSrcweir 500*cdf0e10cSrcweir /*-------------------------------------------------------------------- 501*cdf0e10cSrcweir Beschreibung: PostIts 502*cdf0e10cSrcweir --------------------------------------------------------------------*/ 503*cdf0e10cSrcweir 504*cdf0e10cSrcweir class SwPostItFieldType : public SwFieldType 505*cdf0e10cSrcweir { 506*cdf0e10cSrcweir private: 507*cdf0e10cSrcweir SwDoc* mpDoc; 508*cdf0e10cSrcweir public: 509*cdf0e10cSrcweir SwPostItFieldType(SwDoc* pDoc); 510*cdf0e10cSrcweir 511*cdf0e10cSrcweir virtual SwFieldType* Copy() const; 512*cdf0e10cSrcweir SwDoc* GetDoc() {return mpDoc;}; 513*cdf0e10cSrcweir }; 514*cdf0e10cSrcweir 515*cdf0e10cSrcweir /*-------------------------------------------------------------------- 516*cdf0e10cSrcweir Beschreibung: PostIt 517*cdf0e10cSrcweir --------------------------------------------------------------------*/ 518*cdf0e10cSrcweir 519*cdf0e10cSrcweir class SW_DLLPUBLIC SwPostItField : public SwField 520*cdf0e10cSrcweir { 521*cdf0e10cSrcweir String sTxt; // die Anmerkung 522*cdf0e10cSrcweir String sAuthor; // der Author 523*cdf0e10cSrcweir DateTime aDateTime; // Datum und Zeit der Anmerkung 524*cdf0e10cSrcweir OutlinerParaObject* mpText; 525*cdf0e10cSrcweir SwTextAPIObject* m_pTextObject; 526*cdf0e10cSrcweir 527*cdf0e10cSrcweir public: 528*cdf0e10cSrcweir SwPostItField( SwPostItFieldType*, 529*cdf0e10cSrcweir const String& rAuthor, const String& rTxt, const DateTime& rDate); 530*cdf0e10cSrcweir ~SwPostItField(); 531*cdf0e10cSrcweir 532*cdf0e10cSrcweir virtual String Expand() const; 533*cdf0e10cSrcweir virtual SwField* Copy() const; 534*cdf0e10cSrcweir 535*cdf0e10cSrcweir inline const Date GetDate() const { return aDateTime.GetDate(); } 536*cdf0e10cSrcweir inline const Time GetTime() const { return aDateTime.GetTime(); } 537*cdf0e10cSrcweir 538*cdf0e10cSrcweir // Author 539*cdf0e10cSrcweir virtual const String& GetPar1() const; 540*cdf0e10cSrcweir virtual void SetPar1(const String& rStr); 541*cdf0e10cSrcweir 542*cdf0e10cSrcweir // Text 543*cdf0e10cSrcweir virtual String GetPar2() const; 544*cdf0e10cSrcweir virtual void SetPar2(const String& rStr); 545*cdf0e10cSrcweir const String& GetTxt() const { return sTxt; } 546*cdf0e10cSrcweir 547*cdf0e10cSrcweir const OutlinerParaObject* GetTextObject() const; 548*cdf0e10cSrcweir void SetTextObject( OutlinerParaObject* pText ); 549*cdf0e10cSrcweir 550*cdf0e10cSrcweir sal_uInt32 GetNumberOfParagraphs() const; 551*cdf0e10cSrcweir 552*cdf0e10cSrcweir virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const; 553*cdf0e10cSrcweir virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ); 554*cdf0e10cSrcweir virtual String GetDescription() const; 555*cdf0e10cSrcweir }; 556*cdf0e10cSrcweir 557*cdf0e10cSrcweir /*-------------------------------------------------------------------- 558*cdf0e10cSrcweir Beschreibung: DokumentInfo 559*cdf0e10cSrcweir --------------------------------------------------------------------*/ 560*cdf0e10cSrcweir 561*cdf0e10cSrcweir class SwDocInfoFieldType : public SwValueFieldType 562*cdf0e10cSrcweir { 563*cdf0e10cSrcweir public: 564*cdf0e10cSrcweir SwDocInfoFieldType(SwDoc* pDc); 565*cdf0e10cSrcweir 566*cdf0e10cSrcweir String Expand(sal_uInt16 nSubType, sal_uInt32 nFormat, sal_uInt16 nLang, const String& rName) const; 567*cdf0e10cSrcweir virtual SwFieldType* Copy() const; 568*cdf0e10cSrcweir }; 569*cdf0e10cSrcweir 570*cdf0e10cSrcweir class SW_DLLPUBLIC SwDocInfoField : public SwValueField 571*cdf0e10cSrcweir { 572*cdf0e10cSrcweir sal_uInt16 nSubType; 573*cdf0e10cSrcweir String aContent; 574*cdf0e10cSrcweir String aName; 575*cdf0e10cSrcweir 576*cdf0e10cSrcweir virtual String Expand() const; 577*cdf0e10cSrcweir virtual SwField* Copy() const; 578*cdf0e10cSrcweir 579*cdf0e10cSrcweir public: 580*cdf0e10cSrcweir SwDocInfoField(SwDocInfoFieldType*, sal_uInt16 nSub, const String& rName, sal_uInt32 nFmt=0); 581*cdf0e10cSrcweir SwDocInfoField(SwDocInfoFieldType*, sal_uInt16 nSub, const String& rName, const String& rValue, sal_uInt32 nFmt=0); 582*cdf0e10cSrcweir 583*cdf0e10cSrcweir virtual void SetSubType(sal_uInt16); 584*cdf0e10cSrcweir virtual sal_uInt16 GetSubType() const; 585*cdf0e10cSrcweir virtual void SetLanguage(sal_uInt16 nLng); 586*cdf0e10cSrcweir virtual String GetFieldName() const; 587*cdf0e10cSrcweir String GetName() const { return aName; } 588*cdf0e10cSrcweir void SetName( const String& rName ) { aName = rName; } 589*cdf0e10cSrcweir inline void SetExpansion(const String& rStr) { aContent = rStr; } 590*cdf0e10cSrcweir virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const; 591*cdf0e10cSrcweir virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ); 592*cdf0e10cSrcweir }; 593*cdf0e10cSrcweir 594*cdf0e10cSrcweir /*-------------------------------------------------------------------- 595*cdf0e10cSrcweir Beschreibung: erweiterte Benutzereinstellung 596*cdf0e10cSrcweir --------------------------------------------------------------------*/ 597*cdf0e10cSrcweir 598*cdf0e10cSrcweir 599*cdf0e10cSrcweir class SwExtUserFieldType : public SwFieldType 600*cdf0e10cSrcweir { 601*cdf0e10cSrcweir String aData; 602*cdf0e10cSrcweir public: 603*cdf0e10cSrcweir SwExtUserFieldType(); 604*cdf0e10cSrcweir 605*cdf0e10cSrcweir inline void SetData(const String& rStr) { aData = rStr; } 606*cdf0e10cSrcweir 607*cdf0e10cSrcweir String Expand(sal_uInt16 nSubType, sal_uInt32 nFormat) const; 608*cdf0e10cSrcweir virtual SwFieldType* Copy() const; 609*cdf0e10cSrcweir }; 610*cdf0e10cSrcweir 611*cdf0e10cSrcweir class SwExtUserField : public SwField 612*cdf0e10cSrcweir { 613*cdf0e10cSrcweir String aContent; 614*cdf0e10cSrcweir sal_uInt16 nType; 615*cdf0e10cSrcweir 616*cdf0e10cSrcweir public: 617*cdf0e10cSrcweir SwExtUserField(SwExtUserFieldType*, sal_uInt16 nSub, sal_uInt32 nFmt=0); 618*cdf0e10cSrcweir 619*cdf0e10cSrcweir virtual String Expand() const; 620*cdf0e10cSrcweir virtual SwField* Copy() const; 621*cdf0e10cSrcweir 622*cdf0e10cSrcweir virtual sal_uInt16 GetSubType() const; 623*cdf0e10cSrcweir virtual void SetSubType(sal_uInt16 nSub); 624*cdf0e10cSrcweir 625*cdf0e10cSrcweir inline void SetExpansion(const String& rStr) { aContent = rStr; } 626*cdf0e10cSrcweir 627*cdf0e10cSrcweir virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const; 628*cdf0e10cSrcweir virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ); 629*cdf0e10cSrcweir }; 630*cdf0e10cSrcweir 631*cdf0e10cSrcweir 632*cdf0e10cSrcweir /*-------------------------------------------------------------------- 633*cdf0e10cSrcweir Beschreibung: Relatives Seitennummern - Feld 634*cdf0e10cSrcweir --------------------------------------------------------------------*/ 635*cdf0e10cSrcweir 636*cdf0e10cSrcweir class SwRefPageSetFieldType : public SwFieldType 637*cdf0e10cSrcweir { 638*cdf0e10cSrcweir public: 639*cdf0e10cSrcweir SwRefPageSetFieldType(); 640*cdf0e10cSrcweir 641*cdf0e10cSrcweir virtual SwFieldType* Copy() const; 642*cdf0e10cSrcweir 643*cdf0e10cSrcweir protected: 644*cdf0e10cSrcweir // ueberlagert, weil es nichts zum Updaten gibt! 645*cdf0e10cSrcweir virtual void Modify( const SfxPoolItem*, const SfxPoolItem * ); 646*cdf0e10cSrcweir }; 647*cdf0e10cSrcweir 648*cdf0e10cSrcweir /*-------------------------------------------------------------------- 649*cdf0e10cSrcweir Beschreibung: Relative Seitennummerierung 650*cdf0e10cSrcweir --------------------------------------------------------------------*/ 651*cdf0e10cSrcweir 652*cdf0e10cSrcweir class SwRefPageSetField : public SwField 653*cdf0e10cSrcweir { 654*cdf0e10cSrcweir short nOffset; 655*cdf0e10cSrcweir sal_Bool bOn; 656*cdf0e10cSrcweir 657*cdf0e10cSrcweir public: 658*cdf0e10cSrcweir SwRefPageSetField( SwRefPageSetFieldType*, short nOff = 0, 659*cdf0e10cSrcweir sal_Bool bOn = sal_True ); 660*cdf0e10cSrcweir 661*cdf0e10cSrcweir virtual String Expand() const; 662*cdf0e10cSrcweir virtual SwField* Copy() const; 663*cdf0e10cSrcweir 664*cdf0e10cSrcweir virtual String GetPar2() const; 665*cdf0e10cSrcweir virtual void SetPar2(const String& rStr); 666*cdf0e10cSrcweir 667*cdf0e10cSrcweir sal_Bool IsOn() const { return bOn; } 668*cdf0e10cSrcweir 669*cdf0e10cSrcweir short GetOffset() const { return nOffset; } 670*cdf0e10cSrcweir void SetOffset( short nOff ) { nOffset = nOff; } 671*cdf0e10cSrcweir virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const; 672*cdf0e10cSrcweir virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ); 673*cdf0e10cSrcweir }; 674*cdf0e10cSrcweir 675*cdf0e10cSrcweir /*-------------------------------------------------------------------- 676*cdf0e10cSrcweir Beschreibung: relatives Seitennummern - Abfrage Feld 677*cdf0e10cSrcweir --------------------------------------------------------------------*/ 678*cdf0e10cSrcweir 679*cdf0e10cSrcweir class SwRefPageGetFieldType : public SwFieldType 680*cdf0e10cSrcweir { 681*cdf0e10cSrcweir SwDoc* pDoc; 682*cdf0e10cSrcweir sal_Int16 nNumberingType; 683*cdf0e10cSrcweir 684*cdf0e10cSrcweir void UpdateField( SwTxtFld* pTxtFld, _SetGetExpFlds& rSetList ); 685*cdf0e10cSrcweir protected: 686*cdf0e10cSrcweir // ueberlagert, um alle RefPageGet-Felder zu updaten 687*cdf0e10cSrcweir virtual void Modify( const SfxPoolItem*, const SfxPoolItem * ); 688*cdf0e10cSrcweir public: 689*cdf0e10cSrcweir SwRefPageGetFieldType( SwDoc* pDoc ); 690*cdf0e10cSrcweir virtual SwFieldType* Copy() const; 691*cdf0e10cSrcweir sal_uInt16 MakeSetList( _SetGetExpFlds& rTmpLst ); 692*cdf0e10cSrcweir SwDoc* GetDoc() const { return pDoc; } 693*cdf0e10cSrcweir }; 694*cdf0e10cSrcweir 695*cdf0e10cSrcweir /*-------------------------------------------------------------------- 696*cdf0e10cSrcweir Beschreibung: Relative Seitennummerierung Abfragen 697*cdf0e10cSrcweir --------------------------------------------------------------------*/ 698*cdf0e10cSrcweir 699*cdf0e10cSrcweir class SwRefPageGetField : public SwField 700*cdf0e10cSrcweir { 701*cdf0e10cSrcweir String sTxt; 702*cdf0e10cSrcweir public: 703*cdf0e10cSrcweir SwRefPageGetField( SwRefPageGetFieldType*, sal_uInt32 nFmt ); 704*cdf0e10cSrcweir 705*cdf0e10cSrcweir virtual String Expand() const; 706*cdf0e10cSrcweir virtual SwField* Copy() const; 707*cdf0e10cSrcweir 708*cdf0e10cSrcweir void SetText( const String& rTxt ) { sTxt = rTxt; } 709*cdf0e10cSrcweir 710*cdf0e10cSrcweir void ChangeExpansion( const SwFrm* pFrm, const SwTxtFld* pFld ); 711*cdf0e10cSrcweir virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const; 712*cdf0e10cSrcweir virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ); 713*cdf0e10cSrcweir }; 714*cdf0e10cSrcweir 715*cdf0e10cSrcweir /*-------------------------------------------------------------------- 716*cdf0e10cSrcweir Beschreibung: Feld zum Anspringen und Editieren 717*cdf0e10cSrcweir --------------------------------------------------------------------*/ 718*cdf0e10cSrcweir 719*cdf0e10cSrcweir class SwJumpEditFieldType : public SwFieldType 720*cdf0e10cSrcweir { 721*cdf0e10cSrcweir SwDoc* pDoc; 722*cdf0e10cSrcweir SwDepend aDep; 723*cdf0e10cSrcweir 724*cdf0e10cSrcweir public: 725*cdf0e10cSrcweir SwJumpEditFieldType( SwDoc* pDoc ); 726*cdf0e10cSrcweir virtual SwFieldType* Copy() const; 727*cdf0e10cSrcweir 728*cdf0e10cSrcweir SwCharFmt* GetCharFmt(); 729*cdf0e10cSrcweir }; 730*cdf0e10cSrcweir 731*cdf0e10cSrcweir class SwJumpEditField : public SwField 732*cdf0e10cSrcweir { 733*cdf0e10cSrcweir String sTxt, sHelp; 734*cdf0e10cSrcweir public: 735*cdf0e10cSrcweir SwJumpEditField( SwJumpEditFieldType*, sal_uInt32 nFormat, 736*cdf0e10cSrcweir const String& sText, const String& sHelp ); 737*cdf0e10cSrcweir 738*cdf0e10cSrcweir virtual String Expand() const; 739*cdf0e10cSrcweir virtual SwField* Copy() const; 740*cdf0e10cSrcweir 741*cdf0e10cSrcweir // Platzhalter-Text 742*cdf0e10cSrcweir virtual const String& GetPar1() const; 743*cdf0e10cSrcweir virtual void SetPar1(const String& rStr); 744*cdf0e10cSrcweir 745*cdf0e10cSrcweir // HinweisText 746*cdf0e10cSrcweir virtual String GetPar2() const; 747*cdf0e10cSrcweir virtual void SetPar2(const String& rStr); 748*cdf0e10cSrcweir 749*cdf0e10cSrcweir SwCharFmt* GetCharFmt() const 750*cdf0e10cSrcweir { return ((SwJumpEditFieldType*)GetTyp())->GetCharFmt(); } 751*cdf0e10cSrcweir virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const; 752*cdf0e10cSrcweir virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ); 753*cdf0e10cSrcweir }; 754*cdf0e10cSrcweir 755*cdf0e10cSrcweir /*-------------------------------------------------------------------- 756*cdf0e10cSrcweir Beschreibung: Script Fieldtype 757*cdf0e10cSrcweir --------------------------------------------------------------------*/ 758*cdf0e10cSrcweir 759*cdf0e10cSrcweir class SwScriptFieldType : public SwFieldType 760*cdf0e10cSrcweir { 761*cdf0e10cSrcweir SwDoc* pDoc; 762*cdf0e10cSrcweir public: 763*cdf0e10cSrcweir SwScriptFieldType( SwDoc* pDoc ); 764*cdf0e10cSrcweir 765*cdf0e10cSrcweir virtual SwFieldType* Copy() const; 766*cdf0e10cSrcweir }; 767*cdf0e10cSrcweir 768*cdf0e10cSrcweir /*-------------------------------------------------------------------- 769*cdf0e10cSrcweir Beschreibung: Script Field 770*cdf0e10cSrcweir --------------------------------------------------------------------*/ 771*cdf0e10cSrcweir 772*cdf0e10cSrcweir class SwScriptField : public SwField 773*cdf0e10cSrcweir { 774*cdf0e10cSrcweir String sType; // Type von Code (Java/VBScript/...) 775*cdf0e10cSrcweir String sCode; // der Code als Text 776*cdf0e10cSrcweir // der Code als JavaCode ? 777*cdf0e10cSrcweir 778*cdf0e10cSrcweir sal_Bool bCodeURL; // Code enthaelt URL eines Scripts 779*cdf0e10cSrcweir 780*cdf0e10cSrcweir public: 781*cdf0e10cSrcweir SwScriptField( SwScriptFieldType*, const String& rType, 782*cdf0e10cSrcweir const String& rCode, sal_Bool bURL=sal_False ); 783*cdf0e10cSrcweir 784*cdf0e10cSrcweir virtual String GetDescription() const; 785*cdf0e10cSrcweir 786*cdf0e10cSrcweir virtual String Expand() const; 787*cdf0e10cSrcweir virtual SwField* Copy() const; 788*cdf0e10cSrcweir 789*cdf0e10cSrcweir // Type 790*cdf0e10cSrcweir virtual const String& GetPar1() const; 791*cdf0e10cSrcweir virtual void SetPar1(const String& rStr); 792*cdf0e10cSrcweir // Text 793*cdf0e10cSrcweir virtual String GetPar2() const; 794*cdf0e10cSrcweir virtual void SetPar2(const String& rStr); 795*cdf0e10cSrcweir 796*cdf0e10cSrcweir sal_Bool IsCodeURL() const { return bCodeURL; } 797*cdf0e10cSrcweir void SetCodeURL( sal_Bool bURL ) { bCodeURL = bURL; } 798*cdf0e10cSrcweir virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const; 799*cdf0e10cSrcweir virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ); 800*cdf0e10cSrcweir }; 801*cdf0e10cSrcweir 802*cdf0e10cSrcweir /*-------------------------------------------------------------------- 803*cdf0e10cSrcweir Beschreibung: Combined Character Fieldtype 804*cdf0e10cSrcweir --------------------------------------------------------------------*/ 805*cdf0e10cSrcweir 806*cdf0e10cSrcweir class SwCombinedCharFieldType : public SwFieldType 807*cdf0e10cSrcweir { 808*cdf0e10cSrcweir public: 809*cdf0e10cSrcweir SwCombinedCharFieldType(); 810*cdf0e10cSrcweir 811*cdf0e10cSrcweir virtual SwFieldType* Copy() const; 812*cdf0e10cSrcweir }; 813*cdf0e10cSrcweir 814*cdf0e10cSrcweir /*-------------------------------------------------------------------- 815*cdf0e10cSrcweir Beschreibung: Script Field 816*cdf0e10cSrcweir --------------------------------------------------------------------*/ 817*cdf0e10cSrcweir 818*cdf0e10cSrcweir #define MAX_COMBINED_CHARACTERS 6 819*cdf0e10cSrcweir 820*cdf0e10cSrcweir class SW_DLLPUBLIC SwCombinedCharField : public SwField 821*cdf0e10cSrcweir { 822*cdf0e10cSrcweir String sCharacters; // combine these characters 823*cdf0e10cSrcweir 824*cdf0e10cSrcweir public: 825*cdf0e10cSrcweir SwCombinedCharField( SwCombinedCharFieldType*, const String& rChars ); 826*cdf0e10cSrcweir 827*cdf0e10cSrcweir virtual String Expand() const; 828*cdf0e10cSrcweir virtual SwField* Copy() const; 829*cdf0e10cSrcweir 830*cdf0e10cSrcweir // Characters 831*cdf0e10cSrcweir virtual const String& GetPar1() const; 832*cdf0e10cSrcweir virtual void SetPar1(const String& rStr); 833*cdf0e10cSrcweir 834*cdf0e10cSrcweir virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const; 835*cdf0e10cSrcweir virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ); 836*cdf0e10cSrcweir }; 837*cdf0e10cSrcweir 838*cdf0e10cSrcweir 839*cdf0e10cSrcweir #endif // SW_DOCUFLD_HXX 840