19#ifndef INCLUDED_SW_INC_DOCUFLD_HXX
20#define INCLUDED_SW_INC_DOCUFLD_HXX
29#include <tools/datetime.hxx>
139 OUString
Expand(
SvxNumType nFormat,
short nOff, sal_uInt16
const nPageNumber,
140 sal_uInt16
const nMaxPage,
const OUString&,
LanguageType = LANGUAGE_NONE )
const;
141 void ChangeExpansion(
SwDoc* pDoc,
142 bool bVirtPageNum,
const SvxNumType* pNumFormat );
143 virtual std::unique_ptr<SwFieldType>
Copy()
const override;
158 sal_uInt32 nFormat,
short nOff = 0,
159 sal_uInt16
const nPageNumber = 0,
160 sal_uInt16
const nMaxPage = 0);
162 void ChangeExpansion(sal_uInt16
const nPageNumber,
163 sal_uInt16
const nMaxPage);
166 virtual std::unique_ptr<SwField>
Copy()
const override;
168 virtual OUString
GetPar2()
const override;
169 virtual void SetPar2(
const OUString& rStr)
override;
171 virtual sal_uInt16
GetSubType()
const override;
172 virtual bool QueryValue( css::uno::Any& rVal, sal_uInt16 nWhich )
const override;
173 virtual bool PutValue(
const css::uno::Any& rVal, sal_uInt16 nWhich )
override;
185 virtual std::unique_ptr<SwFieldType>
Copy()
const override;
196 virtual std::unique_ptr<SwField>
Copy()
const override;
200 virtual bool QueryValue( css::uno::Any& rVal, sal_uInt16 nWhich )
const override;
201 virtual bool PutValue(
const css::uno::Any& rVal, sal_uInt16 nWhich )
override;
211 virtual std::unique_ptr<SwFieldType>
Copy()
const override;
222 virtual std::unique_ptr<SwField>
Copy()
const override;
226 virtual bool QueryValue( css::uno::Any& rVal, sal_uInt16 nWhich )
const override;
227 virtual bool PutValue(
const css::uno::Any& rVal, sal_uInt16 nWhich )
override;
237 virtual std::unique_ptr<SwFieldType>
Copy()
const override;
246 virtual std::unique_ptr<SwField>
Copy()
const override;
247 virtual bool QueryValue( css::uno::Any& rVal, sal_uInt16 nWhich )
const override;
248 virtual bool PutValue(
const css::uno::Any& rVal, sal_uInt16 nWhich )
override;
260 virtual std::unique_ptr<SwFieldType>
Copy()
const override;
271 sal_uInt16 nSubType, sal_uInt32 nFormat);
273 void ChangeExpansion(
const SwFrame* pFrame );
276 virtual std::unique_ptr<SwField>
Copy()
const override;
278 virtual sal_uInt16
GetSubType()
const override;
279 virtual void SetSubType(sal_uInt16 nSub)
override;
280 virtual bool QueryValue( css::uno::Any& rVal, sal_uInt16 nWhich )
const override;
281 virtual bool PutValue(
const css::uno::Any& rVal, sal_uInt16 nWhich )
override;
290 virtual std::unique_ptr<SwFieldType>
Copy()
const override;
293 void SetHiddenFlag(
bool bSetHidden );
311 virtual std::unique_ptr<SwField>
Copy()
const override;
317 const OUString& rText,
329 void Evaluate(
SwDoc& rDoc);
331 void SetValue(
bool bHidden) { m_bIsHidden = bHidden; }
332 static OUString GetColumnName(
const OUString& rName);
333 static OUString GetDBName(std::u16string_view rName,
SwDoc& rDoc);
336 virtual void SetPar1(
const OUString& rStr)
override;
337 virtual OUString
GetPar1()
const override;
340 virtual void SetPar2(
const OUString& rStr)
override;
341 virtual OUString
GetPar2()
const override;
343 virtual sal_uInt16
GetSubType()
const override;
345 virtual bool QueryValue( css::uno::Any& rVal, sal_uInt16 nWhich )
const override;
346 virtual bool PutValue(
const css::uno::Any& rVal, sal_uInt16 nWhich )
override;
348 static void ParseIfFieldDefinition(std::u16string_view aFieldDefinition,
349 OUString& rCondition,
360 virtual std::unique_ptr<SwFieldType>
Copy()
const override;
373 virtual std::unique_ptr<SwField>
Copy()
const override;
379 virtual OUString
GetPar1()
const override;
380 virtual void SetPar1(
const OUString& rStr)
override;
381 virtual bool QueryValue( css::uno::Any& rVal, sal_uInt16 nWhich )
const override;
382 virtual bool PutValue(
const css::uno::Any& rVal, sal_uInt16 nWhich )
override;
392 virtual std::unique_ptr<SwFieldType>
Copy()
const override;
402 virtual std::unique_ptr<SwField>
Copy()
const override;
409 const OUString&
GetMacro()
const {
return m_aMacro; }
410 OUString GetLibName()
const;
411 OUString GetMacroName()
const;
417 virtual OUString
GetPar1()
const override;
418 virtual void SetPar1(
const OUString& rStr)
override;
421 virtual OUString
GetPar2()
const override;
422 virtual void SetPar2(
const OUString& rStr)
override;
423 virtual bool QueryValue( css::uno::Any& rVal, sal_uInt16 nWhich )
const override;
424 virtual bool PutValue(
const css::uno::Any& rVal, sal_uInt16 nWhich )
override;
426 static void CreateMacroString( OUString& rMacro,
427 std::u16string_view rMacroName,
428 const OUString& rLibraryName );
430 static bool isScriptURL(
const OUString& str );
440 virtual std::unique_ptr<SwFieldType>
Copy()
const override;
471 const bool bResolved =
false,
472 const sal_uInt32 nPostItId = 0,
473 const sal_uInt32 nParentId = 0,
474 const sal_uInt32 nParaId = 0);
482 virtual std::unique_ptr<SwField>
Copy()
const override;
488 void SetPostItId(
const sal_uInt32 nPostItId = 0);
490 void SetParentId(
const sal_uInt32 nParentId);
492 void SetParaId(
const sal_uInt32 nParaId);
495 virtual OUString
GetPar1()
const override;
496 virtual void SetPar1(
const OUString& rStr)
override;
499 virtual OUString
GetPar2()
const override;
500 virtual void SetPar2(
const OUString& rStr)
override;
501 const OUString&
GetText()
const {
return m_sText; }
503 void SetName(
const OUString& rStr);
509 void SetResolved(
bool bNewState);
510 void ToggleResolved();
511 bool GetResolved()
const;
513 sal_Int32 GetNumberOfParagraphs()
const;
514 void ChangeStyleSheetName(std::u16string_view rOldName,
const SfxStyleSheetBase* pStyleSheet);
516 virtual bool QueryValue( css::uno::Any& rVal, sal_uInt16 nWhich )
const override;
517 virtual bool PutValue(
const css::uno::Any& rVal, sal_uInt16 nWhich )
override;
528 virtual std::unique_ptr<SwFieldType>
Copy()
const override;
538 virtual std::unique_ptr<SwField>
Copy()
const override;
545 virtual sal_uInt16
GetSubType()
const override;
551 virtual bool QueryValue( css::uno::Any& rVal, sal_uInt16 nWhich )
const override;
552 virtual bool PutValue(
const css::uno::Any& rVal, sal_uInt16 nWhich )
override;
561 static OUString
Expand(sal_uInt16 nSubType);
562 virtual std::unique_ptr<SwFieldType>
Copy()
const override;
574 virtual std::unique_ptr<SwField>
Copy()
const override;
576 virtual sal_uInt16
GetSubType()
const override;
577 virtual void SetSubType(sal_uInt16 nSub)
override;
581 virtual bool QueryValue( css::uno::Any& rVal, sal_uInt16 nWhich )
const override;
582 virtual bool PutValue(
const css::uno::Any& rVal, sal_uInt16 nWhich )
override;
591 virtual std::unique_ptr<SwFieldType>
Copy()
const override;
608 virtual OUString ExpandImpl(
SwRootFrame const* pLayout)
const override;
609 virtual std::unique_ptr<SwField>
Copy()
const override;
611 virtual OUString GetPar2()
const override;
612 virtual void SetPar2(
const OUString& rStr)
override;
614 bool IsOn()
const {
return m_bOn; }
618 virtual bool QueryValue( css::uno::Any& rVal, sal_uInt16 nWhich )
const override;
619 virtual bool PutValue(
const css::uno::Any& rVal, sal_uInt16 nWhich )
override;
635 virtual std::unique_ptr<SwFieldType>
Copy()
const override;
650 virtual std::unique_ptr<SwField>
Copy()
const override;
655 virtual bool QueryValue( css::uno::Any& rVal, sal_uInt16 nWhich )
const override;
656 virtual bool PutValue(
const css::uno::Any& rVal, sal_uInt16 nWhich )
override;
667 virtual std::unique_ptr<SwFieldType>
Copy()
const override;
679 OUString sText, OUString sHelp );
682 virtual std::unique_ptr<SwField>
Copy()
const override;
685 virtual OUString
GetPar1()
const override;
686 virtual void SetPar1(
const OUString& rStr)
override;
689 virtual OUString
GetPar2()
const override;
690 virtual void SetPar2(
const OUString& rStr)
override;
694 virtual bool QueryValue( css::uno::Any& rVal, sal_uInt16 nWhich )
const override;
695 virtual bool PutValue(
const css::uno::Any& rVal, sal_uInt16 nWhich )
override;
704 virtual std::unique_ptr<SwFieldType>
Copy()
const override;
717 OUString aCode,
bool bURL );
722 virtual std::unique_ptr<SwField>
Copy()
const override;
725 virtual OUString
GetPar1()
const override;
726 virtual void SetPar1(
const OUString& rStr)
override;
728 virtual OUString
GetPar2()
const override;
729 virtual void SetPar2(
const OUString& rStr)
override;
733 virtual bool QueryValue( css::uno::Any& rVal, sal_uInt16 nWhich )
const override;
734 virtual bool PutValue(
const css::uno::Any& rVal, sal_uInt16 nWhich )
override;
743 virtual std::unique_ptr<SwFieldType>
Copy()
const override;
747#define MAX_COMBINED_CHARACTERS 6
757 virtual std::unique_ptr<SwField>
Copy()
const override;
760 virtual OUString
GetPar1()
const override;
761 virtual void SetPar1(
const OUString& rStr)
override;
763 virtual bool QueryValue( css::uno::Any& rVal, sal_uInt16 nWhich )
const override;
764 virtual bool PutValue(
const css::uno::Any& rVal, sal_uInt16 nWhich )
override;
sal_Int32 GetDate() const
static OUString Expand(sal_uLong)
virtual std::unique_ptr< SwFieldType > Copy() const override
virtual OUString ExpandImpl(SwRootFrame const *pLayout) const override
void SetExpansion(const OUString &rStr)
virtual std::unique_ptr< SwField > Copy() const override
virtual bool QueryValue(css::uno::Any &rVal, sal_uInt16 nWhich) const override
virtual bool PutValue(const css::uno::Any &rVal, sal_uInt16 nWhich) override
SwAuthorField(SwAuthorFieldType *, sal_uInt32 nFormat)
OUString m_sCharacters
combine these characters
void SetExpansion(const OUString &rStr)
void SetName(const OUString &rName)
const OUString & GetName() const
void SetNumFormat(SvxNumType eFormat)
SvxNumType m_nNumberingType
static OUString Expand(sal_uInt16 nSubType)
virtual std::unique_ptr< SwFieldType > Copy() const override
virtual sal_uInt16 GetSubType() const override
virtual OUString ExpandImpl(SwRootFrame const *pLayout) const override
virtual std::unique_ptr< SwField > Copy() const override
SwExtUserField(SwExtUserFieldType *, sal_uInt16 nSub, sal_uInt32 nFormat)
virtual bool PutValue(const css::uno::Any &rVal, sal_uInt16 nWhich) override
virtual bool QueryValue(css::uno::Any &rVal, sal_uInt16 nWhich) const override
void SetExpansion(const OUString &rStr)
virtual void SetSubType(sal_uInt16 nSub) override
Instances of SwFields and those derived from it occur 0 to n times.
virtual void QueryValue(css::uno::Any &rVal, sal_uInt16 nWhich) const
virtual void PutValue(const css::uno::Any &rVal, sal_uInt16 nWhich)
virtual std::unique_ptr< SwFieldType > Copy() const =0
Base class of all fields.
virtual void SetLanguage(LanguageType nLng)
virtual void dumpAsXml(xmlTextWriterPtr pWriter) const
virtual OUString GetPar1() const
virtual void SetPar1(const OUString &rStr)
virtual void SetPar2(const OUString &rStr)
virtual OUString ExpandImpl(SwRootFrame const *pLayout) const =0
virtual sal_uInt16 GetSubType() const
virtual bool QueryValue(css::uno::Any &rVal, sal_uInt16 nWhichId) const
virtual OUString GetFieldName() const
get name or content
virtual bool PutValue(const css::uno::Any &rVal, sal_uInt16 nWhichId)
virtual OUString GetDescription() const
SwFieldType * GetTyp() const
virtual std::unique_ptr< SwField > Copy() const =0
virtual OUString GetPar2() const
virtual void SetSubType(sal_uInt16)
void SetExpansion(const OUString &rStr)
Base class of the Writer layout elements.
virtual std::unique_ptr< SwFieldType > Copy() const override
virtual void UpdateFields() override
virtual std::unique_ptr< SwField > Copy() const override
SwHiddenParaField(SwHiddenParaFieldType *, OUString aCond)
Direct input, delete old value.
virtual void SetPar1(const OUString &rStr) override
set condition
virtual bool QueryValue(css::uno::Any &rVal, sal_uInt16 nWhich) const override
void SetHidden(bool bHidden)
virtual OUString GetPar1() const override
Query, set condition.
virtual OUString ExpandImpl(SwRootFrame const *pLayout) const override
virtual bool PutValue(const css::uno::Any &rVal, sal_uInt16 nWhich) override
virtual void UpdateFields() override
bool GetHiddenFlag() const
OUString m_aContent
Evaluated DB-text.
bool m_bValid
Is DB-field evaluated?
OUString m_aTRUEText
Text if condition true.
OUString m_aFALSEText
If condition false.
SwFieldTypesEnum m_nSubType
bool m_bIsHidden
Is it not visible?
bool m_bCanToggle
Can field be toggled alone?
OUString m_aCond
Condition.
void SetValue(bool bHidden)
virtual void UpdateFields() override
SwCharFormat * GetCharFormat()
sw::WriterMultiListener m_aDep
SwJumpEditFieldType(SwDoc &rDoc)
virtual std::unique_ptr< SwFieldType > Copy() const override
virtual void SetPar2(const OUString &rStr) override
set hint text
virtual std::unique_ptr< SwField > Copy() const override
virtual OUString GetPar1() const override
Placeholder-Text.
virtual OUString ExpandImpl(SwRootFrame const *pLayout) const override
SwJumpEditField(SwJumpEditFieldType *, sal_uInt32 nFormat, OUString sText, OUString sHelp)
virtual void SetPar1(const OUString &rStr) override
set place holder text
virtual bool PutValue(const css::uno::Any &rVal, sal_uInt16 nWhich) override
virtual OUString GetPar2() const override
Hint-Text.
virtual bool QueryValue(css::uno::Any &rVal, sal_uInt16 nWhich) const override
SwCharFormat * GetCharFormat() const
const OUString & GetMacro() const
SvxNumType m_nNumberingType
void SetUserString(const OUString &rS)
const OUString & GetUserString() const
sal_uInt32 GetPostItId() const
const OUString & GetInitials() const
const OUString & GetText() const
sal_uInt32 GetParaId() const
const OUString & GetName() const
rtl::Reference< SwTextAPIObject > m_xTextObject
const DateTime & GetDateTime() const
OUString m_sInitials
Initials of the author.
sal_uInt32 GetParentId() const
const OutlinerParaObject * GetTextObject() const
SwPostItField(const SwPostItField &)=delete
static sal_uInt32 s_nLastPostItId
SwPostItField * operator=(const SwPostItField &)=delete
tools::Time GetTime() const
std::optional< OutlinerParaObject > mpText
OUString m_sName
Name of the comment.
virtual std::unique_ptr< SwFieldType > Copy() const override
virtual void SwClientNotify(const SwModify &, const SfxHint &) override
overwritten to update all RefPageGet fields
sal_Int16 m_nNumberingType
SwRefPageGetFieldType(SwDoc &rDoc)
bool MakeSetList(SetGetExpFields &rTmpLst, SwRootFrame const *pLayout)
void UpdateField(SwTextField const *pTextField, SetGetExpFields const &rSetList, SwRootFrame const *pLayout)
virtual bool QueryValue(css::uno::Any &rVal, sal_uInt16 nWhich) const override
void ChangeExpansion(const SwFrame &rFrame, const SwTextField *pField)
virtual bool PutValue(const css::uno::Any &rVal, sal_uInt16 nWhich) override
virtual std::unique_ptr< SwField > Copy() const override
virtual OUString ExpandImpl(SwRootFrame const *pLayout) const override
void SetText(const OUString &rText, SwRootFrame const *pLayout)
OUString m_sTextRLHidden
hidden redlines
SwRefPageGetField(SwRefPageGetFieldType *, sal_uInt32 nFormat)
virtual void UpdateFields() override
virtual void SwClientNotify(const SwModify &, const SfxHint &) override
noop, there is nothing to update!
virtual std::unique_ptr< SwFieldType > Copy() const override
void SetOffset(short nOff)
The root element of a Writer document layout.
virtual std::unique_ptr< SwFieldType > Copy() const override
SwScriptFieldType(SwDoc &rDoc)
bool m_bCodeURL
Code contains URL of a script.
void SetCodeURL(bool bURL)
OUString m_sCode
Code as text.
OUString m_sType
Type of Code (Java/VBScript/...)
Fields containing values that have to be formatted via number formatter.
struct _xmlTextWriter * xmlTextWriterPtr
sal_uInt16 SwDocInfoSubType
SwFieldTypesEnum
List of FieldTypes at UI.
const SwDocInfoSubType DI_SUB_MASK
const SwDocInfoSubType DI_DOCNO
const SwDocInfoSubType DI_SUB_AUTHOR
const SwDocInfoSubType DI_CUSTOM
const SwDocInfoSubType DI_CHANGE
const SwDocInfoSubType DI_COMMENT
const SwDocInfoSubType DI_SUBTYPE_BEGIN
NB: these must denote consecutive integers! NB2: these are extended by 4 DI_INFO values for backward ...
const SwDocInfoSubType DI_SUBTYPE_END
const SwDocInfoSubType DI_SUB_FIXED
const SwDocInfoSubType DI_PRINT
const SwDocInfoSubType DI_SUB_DATE
const SwDocInfoSubType DI_KEYS
const SwDocInfoSubType DI_EDIT
const SwDocInfoSubType DI_SUBJECT
const SwDocInfoSubType DI_TITLE
const SwDocInfoSubType DI_SUB_TIME
const SwDocInfoSubType DI_CREATE
static LanguageType nLang
::ucbhelper::Content m_aContent