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