xref: /AOO41X/main/sw/inc/docufld.hxx (revision 1d2dbeb0b7301723c6d13094e87a8714ef81a328)
1*1d2dbeb0SAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
3*1d2dbeb0SAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4*1d2dbeb0SAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5*1d2dbeb0SAndrew Rist  * distributed with this work for additional information
6*1d2dbeb0SAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7*1d2dbeb0SAndrew Rist  * to you under the Apache License, Version 2.0 (the
8*1d2dbeb0SAndrew Rist  * "License"); you may not use this file except in compliance
9*1d2dbeb0SAndrew Rist  * with the License.  You may obtain a copy of the License at
10cdf0e10cSrcweir  *
11*1d2dbeb0SAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12cdf0e10cSrcweir  *
13*1d2dbeb0SAndrew Rist  * Unless required by applicable law or agreed to in writing,
14*1d2dbeb0SAndrew Rist  * software distributed under the License is distributed on an
15*1d2dbeb0SAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*1d2dbeb0SAndrew Rist  * KIND, either express or implied.  See the License for the
17*1d2dbeb0SAndrew Rist  * specific language governing permissions and limitations
18*1d2dbeb0SAndrew Rist  * under the License.
19cdf0e10cSrcweir  *
20*1d2dbeb0SAndrew Rist  *************************************************************/
21*1d2dbeb0SAndrew Rist 
22*1d2dbeb0SAndrew 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 
186cdf0e10cSrcweir 	const String& GetUserString() const			{ return sUserStr; }
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 
217cdf0e10cSrcweir 	inline void 		SetExpansion(const String& rStr) { aContent = rStr; }
218cdf0e10cSrcweir 	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 
252cdf0e10cSrcweir 	inline void 		SetExpansion(const String& rStr) { aContent = rStr; }
253cdf0e10cSrcweir 	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 
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 );
342cdf0e10cSrcweir 	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 
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 
429cdf0e10cSrcweir 	void				SetHidden(sal_Bool bHidden)		{ bIsHidden = bHidden; }
430cdf0e10cSrcweir 	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 
471cdf0e10cSrcweir 	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;
508cdf0e10cSrcweir 	SwDoc* GetDoc()			{return mpDoc;};
509cdf0e10cSrcweir };
510cdf0e10cSrcweir 
511cdf0e10cSrcweir /*--------------------------------------------------------------------
512cdf0e10cSrcweir 	Beschreibung: PostIt
513cdf0e10cSrcweir  --------------------------------------------------------------------*/
514cdf0e10cSrcweir 
515cdf0e10cSrcweir class SW_DLLPUBLIC SwPostItField : public SwField
516cdf0e10cSrcweir {
517cdf0e10cSrcweir 	String 		sTxt;		// die Anmerkung
518cdf0e10cSrcweir 	String 		sAuthor;	// der Author
519cdf0e10cSrcweir 	DateTime	aDateTime;	// Datum und Zeit der Anmerkung
520cdf0e10cSrcweir 	OutlinerParaObject*	mpText;
521cdf0e10cSrcweir 	SwTextAPIObject* m_pTextObject;
522cdf0e10cSrcweir 
523cdf0e10cSrcweir public:
524cdf0e10cSrcweir 	SwPostItField( SwPostItFieldType*,
525cdf0e10cSrcweir 				   const String& rAuthor, const String& rTxt, const DateTime& rDate);
526cdf0e10cSrcweir 	~SwPostItField();
527cdf0e10cSrcweir 
528cdf0e10cSrcweir 	virtual String			Expand() const;
529cdf0e10cSrcweir 	virtual SwField*		Copy() const;
530cdf0e10cSrcweir 
531cdf0e10cSrcweir 	inline const Date 		GetDate() const					{ return aDateTime.GetDate(); }
532cdf0e10cSrcweir 	inline const Time 		GetTime() const					{ return aDateTime.GetTime(); }
533cdf0e10cSrcweir 
534cdf0e10cSrcweir 	// Author
535cdf0e10cSrcweir 	virtual const String& 	GetPar1() const;
536cdf0e10cSrcweir 	virtual void			SetPar1(const String& rStr);
537cdf0e10cSrcweir 
538cdf0e10cSrcweir 	// Text
539cdf0e10cSrcweir 	virtual String			GetPar2() const;
540cdf0e10cSrcweir 	virtual void			SetPar2(const String& rStr);
541cdf0e10cSrcweir 	const String&			GetTxt() const { return sTxt; }
542cdf0e10cSrcweir 
543cdf0e10cSrcweir 	const OutlinerParaObject*	GetTextObject() const;
544cdf0e10cSrcweir 	void SetTextObject( OutlinerParaObject* pText );
545cdf0e10cSrcweir 
546cdf0e10cSrcweir     sal_uInt32 GetNumberOfParagraphs() const;
547cdf0e10cSrcweir 
548cdf0e10cSrcweir     virtual sal_Bool        QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const;
549cdf0e10cSrcweir     virtual sal_Bool        PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich );
550cdf0e10cSrcweir     virtual String      GetDescription() const;
551cdf0e10cSrcweir };
552cdf0e10cSrcweir 
553cdf0e10cSrcweir /*--------------------------------------------------------------------
554cdf0e10cSrcweir 	Beschreibung: DokumentInfo
555cdf0e10cSrcweir  --------------------------------------------------------------------*/
556cdf0e10cSrcweir 
557cdf0e10cSrcweir class SwDocInfoFieldType : public SwValueFieldType
558cdf0e10cSrcweir {
559cdf0e10cSrcweir public:
560cdf0e10cSrcweir 	SwDocInfoFieldType(SwDoc* pDc);
561cdf0e10cSrcweir 
562cdf0e10cSrcweir 	String					Expand(sal_uInt16 nSubType, sal_uInt32 nFormat, sal_uInt16 nLang, const String& rName) const;
563cdf0e10cSrcweir 	virtual SwFieldType*    Copy() const;
564cdf0e10cSrcweir };
565cdf0e10cSrcweir 
566cdf0e10cSrcweir class SW_DLLPUBLIC SwDocInfoField : public SwValueField
567cdf0e10cSrcweir {
568cdf0e10cSrcweir 	sal_uInt16 	nSubType;
569cdf0e10cSrcweir 	String  aContent;
570cdf0e10cSrcweir 	String  aName;
571cdf0e10cSrcweir 
572cdf0e10cSrcweir     virtual String          Expand() const;
573cdf0e10cSrcweir     virtual SwField*        Copy() const;
574cdf0e10cSrcweir 
575cdf0e10cSrcweir public:
576cdf0e10cSrcweir     SwDocInfoField(SwDocInfoFieldType*, sal_uInt16 nSub, const String& rName, sal_uInt32 nFmt=0);
577cdf0e10cSrcweir 	SwDocInfoField(SwDocInfoFieldType*, sal_uInt16 nSub, const String& rName, const String& rValue, sal_uInt32 nFmt=0);
578cdf0e10cSrcweir 
579cdf0e10cSrcweir 	virtual void        	SetSubType(sal_uInt16);
580cdf0e10cSrcweir 	virtual sal_uInt16	 		GetSubType() const;
581cdf0e10cSrcweir 	virtual void			SetLanguage(sal_uInt16 nLng);
582cdf0e10cSrcweir     virtual String          GetFieldName() const;
583cdf0e10cSrcweir 	String					GetName() const { return aName; }
584cdf0e10cSrcweir 	void                    SetName( const String& rName ) { aName = rName; }
585cdf0e10cSrcweir 	inline void 			SetExpansion(const String& rStr) { aContent = rStr; }
586cdf0e10cSrcweir     virtual sal_Bool        QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const;
587cdf0e10cSrcweir     virtual sal_Bool        PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich );
588cdf0e10cSrcweir };
589cdf0e10cSrcweir 
590cdf0e10cSrcweir /*--------------------------------------------------------------------
591cdf0e10cSrcweir 	Beschreibung: erweiterte Benutzereinstellung
592cdf0e10cSrcweir  --------------------------------------------------------------------*/
593cdf0e10cSrcweir 
594cdf0e10cSrcweir 
595cdf0e10cSrcweir class SwExtUserFieldType : public SwFieldType
596cdf0e10cSrcweir {
597cdf0e10cSrcweir 	String aData;
598cdf0e10cSrcweir public:
599cdf0e10cSrcweir 	SwExtUserFieldType();
600cdf0e10cSrcweir 
601cdf0e10cSrcweir     inline void             SetData(const String& rStr)     { aData = rStr; }
602cdf0e10cSrcweir 
603cdf0e10cSrcweir 	String					Expand(sal_uInt16 nSubType, sal_uInt32 nFormat) const;
604cdf0e10cSrcweir 	virtual SwFieldType*    Copy() const;
605cdf0e10cSrcweir };
606cdf0e10cSrcweir 
607cdf0e10cSrcweir class SwExtUserField : public SwField
608cdf0e10cSrcweir {
609cdf0e10cSrcweir 	String	aContent;
610cdf0e10cSrcweir 	sal_uInt16 	nType;
611cdf0e10cSrcweir 
612cdf0e10cSrcweir public:
613cdf0e10cSrcweir 	SwExtUserField(SwExtUserFieldType*, sal_uInt16 nSub, sal_uInt32 nFmt=0);
614cdf0e10cSrcweir 
615cdf0e10cSrcweir 	virtual String		Expand() const;
616cdf0e10cSrcweir 	virtual SwField*	Copy() const;
617cdf0e10cSrcweir 
618cdf0e10cSrcweir 	virtual sal_uInt16		GetSubType() const;
619cdf0e10cSrcweir 	virtual void		SetSubType(sal_uInt16 nSub);
620cdf0e10cSrcweir 
621cdf0e10cSrcweir 	inline void 		SetExpansion(const String& rStr) { aContent = rStr; }
622cdf0e10cSrcweir 
623cdf0e10cSrcweir     virtual sal_Bool        QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const;
624cdf0e10cSrcweir     virtual sal_Bool        PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich );
625cdf0e10cSrcweir };
626cdf0e10cSrcweir 
627cdf0e10cSrcweir 
628cdf0e10cSrcweir /*--------------------------------------------------------------------
629cdf0e10cSrcweir 	Beschreibung: Relatives Seitennummern - Feld
630cdf0e10cSrcweir  --------------------------------------------------------------------*/
631cdf0e10cSrcweir 
632cdf0e10cSrcweir class SwRefPageSetFieldType : public SwFieldType
633cdf0e10cSrcweir {
634cdf0e10cSrcweir public:
635cdf0e10cSrcweir 	SwRefPageSetFieldType();
636cdf0e10cSrcweir 
637cdf0e10cSrcweir 	virtual SwFieldType*	Copy() const;
638cdf0e10cSrcweir 
639cdf0e10cSrcweir protected:
640cdf0e10cSrcweir 	// ueberlagert, weil es nichts zum Updaten gibt!
641cdf0e10cSrcweir    virtual void Modify( const SfxPoolItem*, const SfxPoolItem * );
642cdf0e10cSrcweir };
643cdf0e10cSrcweir 
644cdf0e10cSrcweir /*--------------------------------------------------------------------
645cdf0e10cSrcweir 	Beschreibung: Relative Seitennummerierung
646cdf0e10cSrcweir  --------------------------------------------------------------------*/
647cdf0e10cSrcweir 
648cdf0e10cSrcweir class SwRefPageSetField : public SwField
649cdf0e10cSrcweir {
650cdf0e10cSrcweir 	short 	nOffset;
651cdf0e10cSrcweir 	sal_Bool 	bOn;
652cdf0e10cSrcweir 
653cdf0e10cSrcweir public:
654cdf0e10cSrcweir 	SwRefPageSetField( SwRefPageSetFieldType*, short nOff = 0,
655cdf0e10cSrcweir 						sal_Bool bOn = sal_True );
656cdf0e10cSrcweir 
657cdf0e10cSrcweir 	virtual String		Expand() const;
658cdf0e10cSrcweir 	virtual SwField*	Copy() const;
659cdf0e10cSrcweir 
660cdf0e10cSrcweir 	virtual String	GetPar2() const;
661cdf0e10cSrcweir 	virtual void	SetPar2(const String& rStr);
662cdf0e10cSrcweir 
663cdf0e10cSrcweir 	sal_Bool IsOn() const				{ return bOn; }
664cdf0e10cSrcweir 
665cdf0e10cSrcweir 	short GetOffset() const 		{ return nOffset; }
666cdf0e10cSrcweir 	void SetOffset( short nOff )	{ nOffset = nOff; }
667cdf0e10cSrcweir     virtual sal_Bool        QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const;
668cdf0e10cSrcweir     virtual sal_Bool        PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich );
669cdf0e10cSrcweir };
670cdf0e10cSrcweir 
671cdf0e10cSrcweir /*--------------------------------------------------------------------
672cdf0e10cSrcweir 	Beschreibung: relatives Seitennummern - Abfrage Feld
673cdf0e10cSrcweir  --------------------------------------------------------------------*/
674cdf0e10cSrcweir 
675cdf0e10cSrcweir class SwRefPageGetFieldType : public SwFieldType
676cdf0e10cSrcweir {
677cdf0e10cSrcweir 	SwDoc* 			pDoc;
678cdf0e10cSrcweir 	sal_Int16		nNumberingType;
679cdf0e10cSrcweir 
680cdf0e10cSrcweir 	void UpdateField( SwTxtFld* pTxtFld, _SetGetExpFlds& rSetList );
681cdf0e10cSrcweir protected:
682cdf0e10cSrcweir 	// ueberlagert, um alle RefPageGet-Felder zu updaten
683cdf0e10cSrcweir    virtual void Modify( const SfxPoolItem*, const SfxPoolItem * );
684cdf0e10cSrcweir public:
685cdf0e10cSrcweir 	SwRefPageGetFieldType( SwDoc* pDoc );
686cdf0e10cSrcweir 	virtual SwFieldType*    Copy() const;
687cdf0e10cSrcweir 	sal_uInt16 MakeSetList( _SetGetExpFlds& rTmpLst );
688cdf0e10cSrcweir     SwDoc*  GetDoc() const                  { return pDoc; }
689cdf0e10cSrcweir };
690cdf0e10cSrcweir 
691cdf0e10cSrcweir /*--------------------------------------------------------------------
692cdf0e10cSrcweir 	Beschreibung: Relative Seitennummerierung Abfragen
693cdf0e10cSrcweir  --------------------------------------------------------------------*/
694cdf0e10cSrcweir 
695cdf0e10cSrcweir class SwRefPageGetField : public SwField
696cdf0e10cSrcweir {
697cdf0e10cSrcweir 	String sTxt;
698cdf0e10cSrcweir public:
699cdf0e10cSrcweir 	SwRefPageGetField( SwRefPageGetFieldType*, sal_uInt32 nFmt );
700cdf0e10cSrcweir 
701cdf0e10cSrcweir 	virtual String		Expand() const;
702cdf0e10cSrcweir 	virtual SwField*	Copy() const;
703cdf0e10cSrcweir 
704cdf0e10cSrcweir 	void SetText( const String& rTxt )		{ sTxt = rTxt; }
705cdf0e10cSrcweir 
706cdf0e10cSrcweir 	void ChangeExpansion( const SwFrm* pFrm, const SwTxtFld* pFld );
707cdf0e10cSrcweir     virtual sal_Bool        QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const;
708cdf0e10cSrcweir     virtual sal_Bool        PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich );
709cdf0e10cSrcweir };
710cdf0e10cSrcweir 
711cdf0e10cSrcweir /*--------------------------------------------------------------------
712cdf0e10cSrcweir 	Beschreibung: Feld zum Anspringen und Editieren
713cdf0e10cSrcweir  --------------------------------------------------------------------*/
714cdf0e10cSrcweir 
715cdf0e10cSrcweir class SwJumpEditFieldType : public SwFieldType
716cdf0e10cSrcweir {
717cdf0e10cSrcweir 	SwDoc* pDoc;
718cdf0e10cSrcweir 	SwDepend aDep;
719cdf0e10cSrcweir 
720cdf0e10cSrcweir public:
721cdf0e10cSrcweir 	SwJumpEditFieldType( SwDoc* pDoc );
722cdf0e10cSrcweir 	virtual SwFieldType*    Copy() const;
723cdf0e10cSrcweir 
724cdf0e10cSrcweir     SwCharFmt* GetCharFmt();
725cdf0e10cSrcweir };
726cdf0e10cSrcweir 
727cdf0e10cSrcweir class SwJumpEditField : public SwField
728cdf0e10cSrcweir {
729cdf0e10cSrcweir 	String sTxt, sHelp;
730cdf0e10cSrcweir public:
731cdf0e10cSrcweir 	SwJumpEditField( SwJumpEditFieldType*, sal_uInt32 nFormat,
732cdf0e10cSrcweir 					const String& sText, const String& sHelp );
733cdf0e10cSrcweir 
734cdf0e10cSrcweir 	virtual String		Expand() const;
735cdf0e10cSrcweir 	virtual SwField*	Copy() const;
736cdf0e10cSrcweir 
737cdf0e10cSrcweir 	// Platzhalter-Text
738cdf0e10cSrcweir 	virtual const String& GetPar1() const;
739cdf0e10cSrcweir 	virtual void	SetPar1(const String& rStr);
740cdf0e10cSrcweir 
741cdf0e10cSrcweir 	// HinweisText
742cdf0e10cSrcweir 	virtual String	GetPar2() const;
743cdf0e10cSrcweir 	virtual void	SetPar2(const String& rStr);
744cdf0e10cSrcweir 
745cdf0e10cSrcweir 	SwCharFmt* GetCharFmt() const
746cdf0e10cSrcweir 		{ return ((SwJumpEditFieldType*)GetTyp())->GetCharFmt(); }
747cdf0e10cSrcweir     virtual sal_Bool        QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const;
748cdf0e10cSrcweir     virtual sal_Bool        PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich );
749cdf0e10cSrcweir };
750cdf0e10cSrcweir 
751cdf0e10cSrcweir /*--------------------------------------------------------------------
752cdf0e10cSrcweir 	Beschreibung: Script Fieldtype
753cdf0e10cSrcweir  --------------------------------------------------------------------*/
754cdf0e10cSrcweir 
755cdf0e10cSrcweir class SwScriptFieldType : public SwFieldType
756cdf0e10cSrcweir {
757cdf0e10cSrcweir 	SwDoc* pDoc;
758cdf0e10cSrcweir public:
759cdf0e10cSrcweir 	SwScriptFieldType( SwDoc* pDoc );
760cdf0e10cSrcweir 
761cdf0e10cSrcweir 	virtual SwFieldType*    Copy() const;
762cdf0e10cSrcweir };
763cdf0e10cSrcweir 
764cdf0e10cSrcweir /*--------------------------------------------------------------------
765cdf0e10cSrcweir 	Beschreibung: Script Field
766cdf0e10cSrcweir  --------------------------------------------------------------------*/
767cdf0e10cSrcweir 
768cdf0e10cSrcweir class SwScriptField : public SwField
769cdf0e10cSrcweir {
770cdf0e10cSrcweir 	String	sType;		// Type von Code (Java/VBScript/...)
771cdf0e10cSrcweir 	String 	sCode;		// der Code als Text
772cdf0e10cSrcweir 						// der Code als JavaCode ?
773cdf0e10cSrcweir 
774cdf0e10cSrcweir 	sal_Bool	bCodeURL;	// Code enthaelt URL eines Scripts
775cdf0e10cSrcweir 
776cdf0e10cSrcweir public:
777cdf0e10cSrcweir 	SwScriptField( SwScriptFieldType*, const String& rType,
778cdf0e10cSrcweir 				   const String& rCode, sal_Bool bURL=sal_False );
779cdf0e10cSrcweir 
780cdf0e10cSrcweir     virtual String          GetDescription() const;
781cdf0e10cSrcweir 
782cdf0e10cSrcweir 	virtual String			Expand() const;
783cdf0e10cSrcweir 	virtual SwField*		Copy() const;
784cdf0e10cSrcweir 
785cdf0e10cSrcweir 	// Type
786cdf0e10cSrcweir 	virtual const String& 	GetPar1() const;
787cdf0e10cSrcweir 	virtual void			SetPar1(const String& rStr);
788cdf0e10cSrcweir 	// Text
789cdf0e10cSrcweir 	virtual String 			GetPar2() const;
790cdf0e10cSrcweir 	virtual void			SetPar2(const String& rStr);
791cdf0e10cSrcweir 
792cdf0e10cSrcweir 	sal_Bool 					IsCodeURL() const { return bCodeURL; }
793cdf0e10cSrcweir 	void					SetCodeURL( sal_Bool bURL ) { bCodeURL = bURL; }
794cdf0e10cSrcweir     virtual sal_Bool        QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const;
795cdf0e10cSrcweir     virtual sal_Bool        PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich );
796cdf0e10cSrcweir };
797cdf0e10cSrcweir 
798cdf0e10cSrcweir /*--------------------------------------------------------------------
799cdf0e10cSrcweir 	Beschreibung: Combined Character Fieldtype
800cdf0e10cSrcweir  --------------------------------------------------------------------*/
801cdf0e10cSrcweir 
802cdf0e10cSrcweir class SwCombinedCharFieldType : public SwFieldType
803cdf0e10cSrcweir {
804cdf0e10cSrcweir public:
805cdf0e10cSrcweir 	SwCombinedCharFieldType();
806cdf0e10cSrcweir 
807cdf0e10cSrcweir 	virtual SwFieldType*    Copy() const;
808cdf0e10cSrcweir };
809cdf0e10cSrcweir 
810cdf0e10cSrcweir /*--------------------------------------------------------------------
811cdf0e10cSrcweir 	Beschreibung: Script Field
812cdf0e10cSrcweir  --------------------------------------------------------------------*/
813cdf0e10cSrcweir 
814cdf0e10cSrcweir #define MAX_COMBINED_CHARACTERS		6
815cdf0e10cSrcweir 
816cdf0e10cSrcweir class SW_DLLPUBLIC SwCombinedCharField : public SwField
817cdf0e10cSrcweir {
818cdf0e10cSrcweir 	String	sCharacters;	// combine these characters
819cdf0e10cSrcweir 
820cdf0e10cSrcweir public:
821cdf0e10cSrcweir 	SwCombinedCharField( SwCombinedCharFieldType*, const String& rChars );
822cdf0e10cSrcweir 
823cdf0e10cSrcweir 	virtual String			Expand() const;
824cdf0e10cSrcweir 	virtual SwField*		Copy() const;
825cdf0e10cSrcweir 
826cdf0e10cSrcweir 	// Characters
827cdf0e10cSrcweir 	virtual const String& 	GetPar1() const;
828cdf0e10cSrcweir 	virtual void			SetPar1(const String& rStr);
829cdf0e10cSrcweir 
830cdf0e10cSrcweir     virtual sal_Bool        QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const;
831cdf0e10cSrcweir     virtual sal_Bool        PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich );
832cdf0e10cSrcweir };
833cdf0e10cSrcweir 
834cdf0e10cSrcweir 
835cdf0e10cSrcweir #endif // SW_DOCUFLD_HXX
836