1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
19 #ifndef INCLUDED_SW_INC_DOCUFLD_HXX
20 #define INCLUDED_SW_INC_DOCUFLD_HXX
22 #include <tools/date.hxx>
23 #include <tools/datetime.hxx>
25 #include <svl/macitem.hxx>
28 #include "numrule.hxx"
30 class _SetGetExpFields
;
33 class OutlinerParaObject
;
34 class SwTextAPIObject
;
46 // Subtype of document statistics.
60 typedef sal_uInt16 SwDocInfoSubType
;
61 namespace nsSwDocInfoSubType
63 /** NB: these must denote consecutive integers!
64 NB2: these are extended by 4 DI_INFO values for backward compatibility
65 in filter/html/htmlfld.cxx, so make sure that DI_SUBTYPE_END
66 really is the end, and is at least 4 less than DI_SUB_*! */
67 const SwDocInfoSubType DI_SUBTYPE_BEGIN
= 0;
68 const SwDocInfoSubType DI_TITEL
= DI_SUBTYPE_BEGIN
;
69 const SwDocInfoSubType DI_THEMA
= 1;
70 const SwDocInfoSubType DI_KEYS
= 2;
71 const SwDocInfoSubType DI_COMMENT
= 3;
72 const SwDocInfoSubType DI_CREATE
= 4;
73 const SwDocInfoSubType DI_CHANGE
= 5;
74 const SwDocInfoSubType DI_PRINT
= 6;
75 const SwDocInfoSubType DI_DOCNO
= 7;
76 const SwDocInfoSubType DI_EDIT
= 8;
77 const SwDocInfoSubType DI_CUSTOM
= 9;
78 const SwDocInfoSubType DI_SUBTYPE_END
= 10;
80 const SwDocInfoSubType DI_SUB_AUTHOR
= 0x0100;
81 const SwDocInfoSubType DI_SUB_TIME
= 0x0200;
82 const SwDocInfoSubType DI_SUB_DATE
= 0x0300;
83 const SwDocInfoSubType DI_SUB_FIXED
= 0x1000;
84 const SwDocInfoSubType DI_SUB_MASK
= 0xff00;
87 enum RegInfoFormat
///< Only for loading of old documents!!!
102 enum SwExtUserSubType
123 enum SwJumpEditFormat
132 class SwPageNumberFieldType
: public SwFieldType
134 sal_Int16 nNumberingType
;
138 SwPageNumberFieldType();
140 OUString
Expand( sal_uInt32 nFormat
, short nOff
, sal_uInt16
const nPageNumber
,
141 sal_uInt16
const nMaxPage
, const OUString
& ) const;
142 void ChangeExpansion( SwDoc
* pDoc
,
143 bool bVirtPageNum
, const sal_Int16
* pNumFormat
= 0 );
144 virtual SwFieldType
* Copy() const SAL_OVERRIDE
;
148 class SW_DLLPUBLIC SwPageNumberField
: public SwField
153 // fdo#58074 store page number in SwField, not SwFieldType
154 sal_uInt16 m_nPageNumber
;
155 sal_uInt16 m_nMaxPage
;
158 SwPageNumberField(SwPageNumberFieldType
*, sal_uInt16 nSub
= PG_RANDOM
,
159 sal_uInt32 nFormat
= 0, short nOff
= 0,
160 sal_uInt16
const nPageNumber
= 0,
161 sal_uInt16
const nMaxPage
= 0);
163 void ChangeExpansion(sal_uInt16
const nPageNumber
,
164 sal_uInt16
const nMaxPage
);
166 virtual OUString
Expand() const SAL_OVERRIDE
;
167 virtual SwField
* Copy() const SAL_OVERRIDE
;
169 virtual OUString
GetPar2() const SAL_OVERRIDE
;
170 virtual void SetPar2(const OUString
& rStr
) SAL_OVERRIDE
;
172 virtual sal_uInt16
GetSubType() const SAL_OVERRIDE
;
173 virtual bool QueryValue( com::sun::star::uno::Any
& rVal
, sal_uInt16 nWhich
) const SAL_OVERRIDE
;
174 virtual bool PutValue( const com::sun::star::uno::Any
& rVal
, sal_uInt16 nWhich
) SAL_OVERRIDE
;
176 OUString
GetUserString() const { return sUserStr
; }
177 void SetUserString( const OUString
& rS
) { sUserStr
= rS
; }
180 class SwAuthorFieldType
: public SwFieldType
185 static OUString
Expand(sal_uLong
);
186 virtual SwFieldType
* Copy() const SAL_OVERRIDE
;
189 class SwAuthorField
: public SwField
194 SwAuthorField(SwAuthorFieldType
*, sal_uInt32 nFormat
= 0);
196 virtual OUString
Expand() const SAL_OVERRIDE
;
197 virtual SwField
* Copy() const SAL_OVERRIDE
;
199 inline void SetExpansion(const OUString
& rStr
) { aContent
= rStr
; }
200 inline OUString
GetContent() const { return aContent
; }
202 virtual bool QueryValue( com::sun::star::uno::Any
& rVal
, sal_uInt16 nWhich
) const SAL_OVERRIDE
;
203 virtual bool PutValue( const com::sun::star::uno::Any
& rVal
, sal_uInt16 nWhich
) SAL_OVERRIDE
;
206 class SwFileNameFieldType
: public SwFieldType
210 SwFileNameFieldType(SwDoc
*);
212 OUString
Expand(sal_uLong
) const;
213 virtual SwFieldType
* Copy() const SAL_OVERRIDE
;
216 class SW_DLLPUBLIC SwFileNameField
: public SwField
221 SwFileNameField(SwFileNameFieldType
*, sal_uInt32 nFormat
= 0);
223 virtual OUString
Expand() const SAL_OVERRIDE
;
224 virtual SwField
* Copy() const SAL_OVERRIDE
;
226 inline void SetExpansion(const OUString
& rStr
) { aContent
= rStr
; }
227 inline OUString
GetContent() const { return aContent
; }
229 virtual bool QueryValue( com::sun::star::uno::Any
& rVal
, sal_uInt16 nWhich
) const SAL_OVERRIDE
;
230 virtual bool PutValue( const com::sun::star::uno::Any
& rVal
, sal_uInt16 nWhich
) SAL_OVERRIDE
;
233 class SwTemplNameFieldType
: public SwFieldType
237 SwTemplNameFieldType(SwDoc
*);
239 OUString
Expand(sal_uLong
) const;
240 virtual SwFieldType
* Copy() const SAL_OVERRIDE
;
243 class SW_DLLPUBLIC SwTemplNameField
: public SwField
246 SwTemplNameField(SwTemplNameFieldType
*, sal_uInt32 nFormat
= 0);
248 virtual OUString
Expand() const SAL_OVERRIDE
;
249 virtual SwField
* Copy() const SAL_OVERRIDE
;
250 virtual bool QueryValue( com::sun::star::uno::Any
& rVal
, sal_uInt16 nWhich
) const SAL_OVERRIDE
;
251 virtual bool PutValue( const com::sun::star::uno::Any
& rVal
, sal_uInt16 nWhich
) SAL_OVERRIDE
;
254 // Document statistics
255 class SwDocStatFieldType
: public SwFieldType
258 sal_Int16 nNumberingType
; ///< com::sun::star::style::NumberingType
261 SwDocStatFieldType(SwDoc
*);
262 OUString
Expand(sal_uInt16 nSubType
, sal_uInt32 nFormat
) const;
263 virtual SwFieldType
* Copy() const SAL_OVERRIDE
;
265 inline void SetNumFormat( sal_Int16 eFormat
) { nNumberingType
= eFormat
; }
268 class SW_DLLPUBLIC SwDocStatField
: public SwField
273 SwDocStatField( SwDocStatFieldType
*,
274 sal_uInt16 nSubType
= 0, sal_uInt32 nFormat
= 0);
276 void ChangeExpansion( const SwFrm
* pFrm
);
278 virtual OUString
Expand() const SAL_OVERRIDE
;
279 virtual SwField
* Copy() const SAL_OVERRIDE
;
281 virtual sal_uInt16
GetSubType() const SAL_OVERRIDE
;
282 virtual void SetSubType(sal_uInt16 nSub
) SAL_OVERRIDE
;
283 virtual bool QueryValue( com::sun::star::uno::Any
& rVal
, sal_uInt16 nWhich
) const SAL_OVERRIDE
;
284 virtual bool PutValue( const com::sun::star::uno::Any
& rVal
, sal_uInt16 nWhich
) SAL_OVERRIDE
;
287 class SwHiddenTextFieldType
: public SwFieldType
291 SwHiddenTextFieldType(bool bSetHidden
= true);
293 virtual SwFieldType
* Copy() const SAL_OVERRIDE
;
295 void SetHiddenFlag( bool bSetHidden
= true );
296 inline bool GetHiddenFlag() const { return bHidden
; }
299 class SwHiddenTextField
: public SwField
301 OUString aTRUEText
; ///< Text if condition true.
302 OUString aFALSEText
; ///< If condition false.
303 OUString aContent
; ///< Evaluated DB-text.
305 OUString aCond
; ///< Condition.
308 bool bCanToggle
: 1; ///< Can field be toggled alone?
309 bool bIsHidden
: 1; ///< Is it not visible?
310 bool bValid
: 1; ///< Is DB-field evaluated?
312 virtual OUString
Expand() const SAL_OVERRIDE
;
313 virtual SwField
* Copy() const SAL_OVERRIDE
;
316 SwHiddenTextField( SwHiddenTextFieldType
*,
318 const OUString
& rCond
,
319 const OUString
& rText
,
320 bool bHidden
= false,
321 sal_uInt16 nSubType
= TYP_HIDDENTXTFLD
);
323 SwHiddenTextField( SwHiddenTextFieldType
*,
324 const OUString
& rCond
,
325 const OUString
& rTrue
,
326 const OUString
& rFalse
,
327 sal_uInt16 nSubType
= TYP_HIDDENTXTFLD
);
329 virtual OUString
GetFieldName() const SAL_OVERRIDE
;
331 void Evaluate(SwDoc
*);
333 inline void SetValue(bool bHidden
) { bIsHidden
= bHidden
; }
334 static OUString
GetColumnName(const OUString
& rName
);
335 static OUString
GetDBName(const OUString
& rName
, SwDoc
*pDoc
);
338 virtual void SetPar1(const OUString
& rStr
) SAL_OVERRIDE
;
339 virtual OUString
GetPar1() const SAL_OVERRIDE
;
341 /// True/False - String
342 virtual void SetPar2(const OUString
& rStr
) SAL_OVERRIDE
;
343 virtual OUString
GetPar2() const SAL_OVERRIDE
;
345 virtual sal_uInt16
GetSubType() const SAL_OVERRIDE
;
347 virtual bool QueryValue( com::sun::star::uno::Any
& rVal
, sal_uInt16 nWhich
) const SAL_OVERRIDE
;
348 virtual bool PutValue( const com::sun::star::uno::Any
& rVal
, sal_uInt16 nWhich
) SAL_OVERRIDE
;
351 // Field that expands to an empty line (without height).
352 class SwHiddenParaFieldType
: public SwFieldType
355 SwHiddenParaFieldType();
357 virtual SwFieldType
* Copy() const SAL_OVERRIDE
;
360 class SwHiddenParaField
: public SwField
365 /// Direct input, delete old value.
366 SwHiddenParaField(SwHiddenParaFieldType
*, const OUString
& rCond
);
368 virtual OUString
Expand() const SAL_OVERRIDE
;
369 virtual SwField
* Copy() const SAL_OVERRIDE
;
371 void SetHidden(bool bHidden
) { bIsHidden
= bHidden
; }
372 bool IsHidden() const { return bIsHidden
; }
374 /// Query, set condition.
375 virtual OUString
GetPar1() const SAL_OVERRIDE
;
376 virtual void SetPar1(const OUString
& rStr
) SAL_OVERRIDE
;
377 virtual bool QueryValue( com::sun::star::uno::Any
& rVal
, sal_uInt16 nWhich
) const SAL_OVERRIDE
;
378 virtual bool PutValue( const com::sun::star::uno::Any
& rVal
, sal_uInt16 nWhich
) SAL_OVERRIDE
;
381 class SwMacroFieldType
: public SwFieldType
386 SwMacroFieldType(SwDoc
*);
388 virtual SwFieldType
* Copy() const SAL_OVERRIDE
;
391 class SW_DLLPUBLIC SwMacroField
: public SwField
397 virtual OUString
Expand() const SAL_OVERRIDE
;
398 virtual SwField
* Copy() const SAL_OVERRIDE
;
401 /// Direct input, delete old value.
402 SwMacroField( SwMacroFieldType
*, const OUString
& rLibAndName
,
403 const OUString
& rText
);
405 inline OUString
GetMacro() const { return aMacro
; }
406 OUString
GetLibName() const;
407 OUString
GetMacroName() const;
408 SvxMacro
GetSvxMacro() const;
410 virtual OUString
GetFieldName() const SAL_OVERRIDE
;
412 /// Library and FileName
413 virtual OUString
GetPar1() const SAL_OVERRIDE
;
414 virtual void SetPar1(const OUString
& rStr
) SAL_OVERRIDE
;
417 virtual OUString
GetPar2() const SAL_OVERRIDE
;
418 virtual void SetPar2(const OUString
& rStr
) SAL_OVERRIDE
;
419 virtual bool QueryValue( com::sun::star::uno::Any
& rVal
, sal_uInt16 nWhich
) const SAL_OVERRIDE
;
420 virtual bool PutValue( const com::sun::star::uno::Any
& rVal
, sal_uInt16 nWhich
) SAL_OVERRIDE
;
422 static void CreateMacroString( OUString
& rMacro
,
423 const OUString
& rMacroName
,
424 const OUString
& rLibraryName
);
426 static bool isScriptURL( const OUString
& str
);
429 class SwPostItFieldType
: public SwFieldType
434 SwPostItFieldType(SwDoc
* pDoc
);
436 virtual SwFieldType
* Copy() const SAL_OVERRIDE
;
438 SwDoc
* GetDoc() const
444 class SW_DLLPUBLIC SwPostItField
: public SwField
448 OUString sInitials
; ///< Initials of the author.
449 OUString sName
; ///< Name of the comment.
451 OutlinerParaObject
* mpText
;
452 SwTextAPIObject
* m_pTextObject
;
455 SwPostItField( SwPostItFieldType
*,
456 const OUString
& rAuthor
,
457 const OUString
& rText
,
458 const OUString
& rInitials
,
459 const OUString
& rName
,
460 const DateTime
& rDate
);
461 virtual ~SwPostItField();
463 virtual OUString
Expand() const SAL_OVERRIDE
;
464 virtual SwField
* Copy() const SAL_OVERRIDE
;
466 inline const DateTime
GetDateTime() const { return aDateTime
; }
467 inline const Date
GetDate() const { return aDateTime
.GetDate(); }
468 inline const tools::Time
GetTime() const { return aDateTime
.GetTime(); }
471 virtual OUString
GetPar1() const SAL_OVERRIDE
;
472 virtual void SetPar1(const OUString
& rStr
) SAL_OVERRIDE
;
475 virtual OUString
GetPar2() const SAL_OVERRIDE
;
476 virtual void SetPar2(const OUString
& rStr
) SAL_OVERRIDE
;
477 const OUString
& GetText() const { return sText
; }
478 const OUString
& GetInitials() const { return sInitials
;}
479 void SetName(const OUString
& rStr
);
480 const OUString
& GetName() const { return sName
;}
482 const OutlinerParaObject
* GetTextObject() const { return mpText
;}
483 void SetTextObject( OutlinerParaObject
* pText
);
485 sal_Int32
GetNumberOfParagraphs() const;
487 virtual bool QueryValue( com::sun::star::uno::Any
& rVal
, sal_uInt16 nWhich
) const SAL_OVERRIDE
;
488 virtual bool PutValue( const com::sun::star::uno::Any
& rVal
, sal_uInt16 nWhich
) SAL_OVERRIDE
;
489 virtual OUString
GetDescription() const SAL_OVERRIDE
;
492 class SwDocInfoFieldType
: public SwValueFieldType
495 SwDocInfoFieldType(SwDoc
* pDc
);
497 OUString
Expand(sal_uInt16 nSubType
, sal_uInt32 nFormat
, sal_uInt16 nLang
, const OUString
& rName
) const;
498 virtual SwFieldType
* Copy() const SAL_OVERRIDE
;
501 class SW_DLLPUBLIC SwDocInfoField
: public SwValueField
507 virtual OUString
Expand() const SAL_OVERRIDE
;
508 virtual SwField
* Copy() const SAL_OVERRIDE
;
511 SwDocInfoField(SwDocInfoFieldType
*, sal_uInt16 nSub
, const OUString
& rName
, sal_uInt32 nFormat
=0);
512 SwDocInfoField(SwDocInfoFieldType
*, sal_uInt16 nSub
, const OUString
& rName
, const OUString
& rValue
, sal_uInt32 nFormat
=0);
514 virtual void SetSubType(sal_uInt16
) SAL_OVERRIDE
;
515 virtual sal_uInt16
GetSubType() const SAL_OVERRIDE
;
516 virtual void SetLanguage(sal_uInt16 nLng
) SAL_OVERRIDE
;
517 virtual OUString
GetFieldName() const SAL_OVERRIDE
;
518 OUString
GetName() const { return aName
; }
519 void SetName( const OUString
& rName
) { aName
= rName
; }
520 inline void SetExpansion(const OUString
& rStr
) { aContent
= rStr
; }
521 virtual bool QueryValue( com::sun::star::uno::Any
& rVal
, sal_uInt16 nWhich
) const SAL_OVERRIDE
;
522 virtual bool PutValue( const com::sun::star::uno::Any
& rVal
, sal_uInt16 nWhich
) SAL_OVERRIDE
;
525 // Extended User settings.
526 class SwExtUserFieldType
: public SwFieldType
530 SwExtUserFieldType();
532 inline void SetData(const OUString
& rStr
) { aData
= rStr
; }
534 static OUString
Expand(sal_uInt16 nSubType
, sal_uInt32 nFormat
);
535 virtual SwFieldType
* Copy() const SAL_OVERRIDE
;
538 class SwExtUserField
: public SwField
544 SwExtUserField(SwExtUserFieldType
*, sal_uInt16 nSub
, sal_uInt32 nFormat
=0);
546 virtual OUString
Expand() const SAL_OVERRIDE
;
547 virtual SwField
* Copy() const SAL_OVERRIDE
;
549 virtual sal_uInt16
GetSubType() const SAL_OVERRIDE
;
550 virtual void SetSubType(sal_uInt16 nSub
) SAL_OVERRIDE
;
552 inline void SetExpansion(const OUString
& rStr
) { aContent
= rStr
; }
554 virtual bool QueryValue( com::sun::star::uno::Any
& rVal
, sal_uInt16 nWhich
) const SAL_OVERRIDE
;
555 virtual bool PutValue( const com::sun::star::uno::Any
& rVal
, sal_uInt16 nWhich
) SAL_OVERRIDE
;
558 // Relative page numbers - field.
559 class SwRefPageSetFieldType
: public SwFieldType
562 SwRefPageSetFieldType();
564 virtual SwFieldType
* Copy() const SAL_OVERRIDE
;
567 /// Overlay, because there is nothing to update!
568 virtual void Modify( const SfxPoolItem
*, const SfxPoolItem
* ) SAL_OVERRIDE
;
571 // Relative page numbering.
572 class SwRefPageSetField
: public SwField
578 SwRefPageSetField( SwRefPageSetFieldType
*, short nOff
= 0,
581 virtual OUString
Expand() const SAL_OVERRIDE
;
582 virtual SwField
* Copy() const SAL_OVERRIDE
;
584 virtual OUString
GetPar2() const SAL_OVERRIDE
;
585 virtual void SetPar2(const OUString
& rStr
) SAL_OVERRIDE
;
587 bool IsOn() const { return bOn
; }
589 short GetOffset() const { return nOffset
; }
590 void SetOffset( short nOff
) { nOffset
= nOff
; }
591 virtual bool QueryValue( com::sun::star::uno::Any
& rVal
, sal_uInt16 nWhich
) const SAL_OVERRIDE
;
592 virtual bool PutValue( const com::sun::star::uno::Any
& rVal
, sal_uInt16 nWhich
) SAL_OVERRIDE
;
595 // Relative page numbers - query field.
596 class SwRefPageGetFieldType
: public SwFieldType
599 sal_Int16 nNumberingType
;
601 void UpdateField( SwTextField
* pTextField
, _SetGetExpFields
& rSetList
);
603 /// overwritten to update all RefPageGet fields
604 virtual void Modify( const SfxPoolItem
*, const SfxPoolItem
* ) SAL_OVERRIDE
;
606 SwRefPageGetFieldType( SwDoc
* pDoc
);
607 virtual SwFieldType
* Copy() const SAL_OVERRIDE
;
608 bool MakeSetList( _SetGetExpFields
& rTmpLst
);
609 SwDoc
* GetDoc() const { return pDoc
; }
612 // Query relative page numbering.
613 class SwRefPageGetField
: public SwField
617 SwRefPageGetField( SwRefPageGetFieldType
*, sal_uInt32 nFormat
);
619 virtual OUString
Expand() const SAL_OVERRIDE
;
620 virtual SwField
* Copy() const SAL_OVERRIDE
;
622 void SetText( const OUString
& rText
) { sText
= rText
; }
624 void ChangeExpansion( const SwFrm
* pFrm
, const SwTextField
* pField
);
625 virtual bool QueryValue( com::sun::star::uno::Any
& rVal
, sal_uInt16 nWhich
) const SAL_OVERRIDE
;
626 virtual bool PutValue( const com::sun::star::uno::Any
& rVal
, sal_uInt16 nWhich
) SAL_OVERRIDE
;
629 // Field to jump to and edit.
630 class SwJumpEditFieldType
: public SwFieldType
636 SwJumpEditFieldType( SwDoc
* pDoc
);
637 virtual SwFieldType
* Copy() const SAL_OVERRIDE
;
639 SwCharFormat
* GetCharFormat();
642 class SwJumpEditField
: public SwField
644 OUString sText
, sHelp
;
646 SwJumpEditField( SwJumpEditFieldType
*, sal_uInt32 nFormat
,
647 const OUString
& sText
, const OUString
& sHelp
);
649 virtual OUString
Expand() const SAL_OVERRIDE
;
650 virtual SwField
* Copy() const SAL_OVERRIDE
;
653 virtual OUString
GetPar1() const SAL_OVERRIDE
;
654 virtual void SetPar1(const OUString
& rStr
) SAL_OVERRIDE
;
657 virtual OUString
GetPar2() const SAL_OVERRIDE
;
658 virtual void SetPar2(const OUString
& rStr
) SAL_OVERRIDE
;
660 SwCharFormat
* GetCharFormat() const
661 { return static_cast<SwJumpEditFieldType
*>(GetTyp())->GetCharFormat(); }
662 virtual bool QueryValue( com::sun::star::uno::Any
& rVal
, sal_uInt16 nWhich
) const SAL_OVERRIDE
;
663 virtual bool PutValue( const com::sun::star::uno::Any
& rVal
, sal_uInt16 nWhich
) SAL_OVERRIDE
;
666 class SwScriptFieldType
: public SwFieldType
670 SwScriptFieldType( SwDoc
* pDoc
);
672 virtual SwFieldType
* Copy() const SAL_OVERRIDE
;
675 class SwScriptField
: public SwField
677 OUString sType
; ///< Type of Code (Java/VBScript/...)
678 OUString sCode
; /**< Code as text.
679 Code as JavaCode ? */
681 bool bCodeURL
; ///< Code contains URL of a script.
684 SwScriptField( SwScriptFieldType
*, const OUString
& rType
,
685 const OUString
& rCode
, bool bURL
=false );
687 virtual OUString
GetDescription() const SAL_OVERRIDE
;
689 virtual OUString
Expand() const SAL_OVERRIDE
;
690 virtual SwField
* Copy() const SAL_OVERRIDE
;
693 virtual OUString
GetPar1() const SAL_OVERRIDE
;
694 virtual void SetPar1(const OUString
& rStr
) SAL_OVERRIDE
;
696 virtual OUString
GetPar2() const SAL_OVERRIDE
;
697 virtual void SetPar2(const OUString
& rStr
) SAL_OVERRIDE
;
699 bool IsCodeURL() const { return bCodeURL
; }
700 void SetCodeURL( bool bURL
) { bCodeURL
= bURL
; }
701 virtual bool QueryValue( com::sun::star::uno::Any
& rVal
, sal_uInt16 nWhich
) const SAL_OVERRIDE
;
702 virtual bool PutValue( const com::sun::star::uno::Any
& rVal
, sal_uInt16 nWhich
) SAL_OVERRIDE
;
705 // Combined Character Fieldtype
706 class SwCombinedCharFieldType
: public SwFieldType
709 SwCombinedCharFieldType();
711 virtual SwFieldType
* Copy() const SAL_OVERRIDE
;
715 #define MAX_COMBINED_CHARACTERS 6
717 class SW_DLLPUBLIC SwCombinedCharField
: public SwField
719 OUString sCharacters
; ///< combine these characters
722 SwCombinedCharField( SwCombinedCharFieldType
*, const OUString
& rChars
);
724 virtual OUString
Expand() const SAL_OVERRIDE
;
725 virtual SwField
* Copy() const SAL_OVERRIDE
;
728 virtual OUString
GetPar1() const SAL_OVERRIDE
;
729 virtual void SetPar1(const OUString
& rStr
) SAL_OVERRIDE
;
731 virtual bool QueryValue( com::sun::star::uno::Any
& rVal
, sal_uInt16 nWhich
) const SAL_OVERRIDE
;
732 virtual bool PutValue( const com::sun::star::uno::Any
& rVal
, sal_uInt16 nWhich
) SAL_OVERRIDE
;
735 #endif // INCLUDED_SW_INC_DOCUFLD_HXX
737 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */