19#ifndef INCLUDED_SW_INC_EXPFLD_HXX
20#define INCLUDED_SW_INC_EXPFLD_HXX
30#include <com/sun/star/uno/Sequence.hxx>
31#include <com/sun/star/beans/PropertyValue.hpp>
48OUString
ReplacePoint(
const OUString& sTmpName,
bool bWithCommandType =
false);
77 virtual std::unique_ptr<SwFieldType>
Copy()
const override;
96 virtual OUString ExpandImpl(
SwRootFrame const* pLayout)
const override;
97 virtual std::unique_ptr<SwField>
Copy()
const override;
99 virtual void SetValue(
const double& rVal)
override;
110 void ChgExpStr(
const OUString& rExpand,
SwRootFrame const* pLayout);
113 inline bool IsInBodyText()
const;
116 inline void ChgBodyTextFlag(
bool bIsInBody );
122 virtual OUString GetFieldName()
const override;
125 virtual OUString GetPar2()
const override;
126 virtual void SetPar2(
const OUString& rStr)
override;
128 virtual sal_uInt16 GetSubType()
const override;
129 virtual void SetSubType(sal_uInt16 nType)
override;
130 virtual bool QueryValue( css::uno::Any& rVal, sal_uInt16 nWhich )
const override;
131 virtual bool PutValue(
const css::uno::Any& rVal, sal_uInt16 nWhich )
override;
133 static sal_Int32 GetReferenceTextPos(
const SwFormatField& rFormat,
SwDoc& rDoc, sal_Int32 nHint = 0);
161 virtual std::unique_ptr<SwFieldType>
Copy()
const override;
162 virtual OUString
GetName()
const override;
164 inline void SetType(sal_uInt16 nTyp);
165 inline sal_uInt16 GetType()
const;
174 inline const OUString& GetSetRefName()
const;
187 virtual void QueryValue( css::uno::Any& rVal, sal_uInt16 nWhich )
const override;
188 virtual void PutValue(
const css::uno::Any& rVal, sal_uInt16 nWhich )
override;
215 virtual OUString ExpandImpl(
SwRootFrame const* pLayout)
const override;
216 virtual std::unique_ptr<SwField>
Copy()
const override;
218 virtual void SetValue(
const double& rVal)
override;
229 const OUString& GetExpStr(
SwRootFrame const* pLayout)
const;
231 void ChgExpStr(
const OUString& rExpand,
SwRootFrame const* pLayout);
233 inline void SetPromptText(
const OUString& rStr);
234 inline const OUString& GetPromptText()
const;
236 inline void SetInputFlag(
bool bInp);
237 inline bool GetInputFlag()
const;
239 virtual OUString GetFieldName()
const override;
241 virtual sal_uInt16 GetSubType()
const override;
242 virtual void SetSubType(sal_uInt16 nType)
override;
244 inline bool IsSequenceField()
const;
251 virtual OUString GetPar1()
const override;
254 virtual OUString GetPar2()
const override;
255 virtual void SetPar2(
const OUString& rStr)
override;
256 virtual bool QueryValue( css::uno::Any& rVal, sal_uInt16 nWhich )
const override;
257 virtual bool PutValue(
const css::uno::Any& rVal, sal_uInt16 nWhich )
override;
281 virtual std::unique_ptr<SwFieldType>
Copy()
const override;
294 css::uno::Sequence<css::beans::PropertyValue>
maGrabBag;
298 virtual OUString ExpandImpl(
SwRootFrame const* pLayout)
const override;
299 virtual std::unique_ptr<SwField>
Copy()
const override;
312 bool bIsFormField =
true );
320 void applyFieldContent(
const OUString& rNewFieldContent );
322 bool isFormField()
const;
323 const css::uno::Sequence<css::beans::PropertyValue> &
getGrabBagParams()
const {
return maGrabBag; }
325 virtual OUString GetFieldName()
const override;
328 virtual OUString GetPar1()
const override;
329 virtual void SetPar1(
const OUString& rStr)
override;
332 virtual OUString GetPar2()
const override;
333 virtual void SetPar2(
const OUString& rStr)
override;
335 const OUString& GetHelp()
const;
336 void SetHelp(
const OUString & rStr);
338 const OUString& GetToolTip()
const;
339 void SetToolTip(
const OUString & rStr);
341 virtual sal_uInt16 GetSubType()
const override;
342 virtual void SetSubType(sal_uInt16 nSub)
override;
343 virtual bool QueryValue( css::uno::Any& rVal, sal_uInt16 nWhich )
const override;
344 virtual bool PutValue(
const css::uno::Any& rVal, sal_uInt16 nWhich )
override;
354 size_t Count()
const;
377 virtual std::unique_ptr<SwFieldType>
Copy()
const override;
387 virtual std::unique_ptr<SwField>
Copy()
const override;
398 virtual void SetValue(
const double& rVal )
override;
399 virtual sal_uInt16
GetSubType()
const override;
400 virtual void SetSubType(sal_uInt16 nType)
override;
409 virtual OUString
GetPar2()
const override;
410 virtual void SetPar2(
const OUString& rStr)
override;
411 virtual bool QueryValue( css::uno::Any& rVal, sal_uInt16 nWhich )
const override;
412 virtual bool PutValue(
const css::uno::Any& rVal, sal_uInt16 nWhich )
override;
void InsertSort(std::vector< sal_uInt16 > &rArr, sal_uInt16 nIdx)
Instances of SwFields and those derived from it occur 0 to n times.
virtual std::unique_ptr< SwFieldType > Copy() const =0
Base class of all fields.
SwFieldType * GetTyp() const
Base class of the Writer layout elements.
virtual void UpdateFields() override
OUString m_sExpandRLHidden
hidden redlines
void SetLateInitialization()
bool m_bLateInitialization
double m_fValueRLHidden
SwValueField; hidden redlines.
bool IsInBodyText() const
Called by formatting.
void ChgBodyTextFlag(bool bIsInBody)
Set by UpdateExpFields where node position is known.
Base class of the Writer document model elements.
The root element of a Writer document layout.
std::vector< SeqFieldLstElem > maData
SeqFieldLstElem & operator[](size_t nIndex)
const SeqFieldLstElem & operator[](size_t nIndex) const
const OUString & GetDelimiter() const
Number sequence fields chapterwise if required.
sal_uInt16 GetType() const
void SetType(sal_uInt16 nTyp)
void SetOutlineLvl(sal_uInt8 n)
const OUString & GetSetRefName() const
Overlay, because set-field takes care for its being updated by itself.
virtual void UpdateFields() override
void SetDelimiter(const OUString &s)
sal_uInt8 GetOutlineLvl() const
OUString msExpandRLHidden
hidden redlines
SwFormatField * mpFormatField
const OUString & GetPromptText() const
void SetInputFlag(bool bInp)
sal_uInt16 GetSeqNumber() const
SwFormatField * GetFormatField()
bool IsSequenceField() const
double m_fValueRLHidden
SwValueField; hidden redlines.
void SetPromptText(const OUString &rStr)
void SetSeqNumber(sal_uInt16 n)
Logical number, sequence fields.
bool GetInputFlag() const
Implementation in tblcalc.cxx.
virtual void UpdateFields() override
virtual std::unique_ptr< SwFieldType > Copy() const override
SwTableFieldType(SwDoc *pDocPtr)
void CalcField(SwTableCalcPara &rCalcPara)
virtual std::unique_ptr< SwField > Copy() const override
void ChgExpStr(const OUString &rStr)
virtual void SetSubType(sal_uInt16 nType) override
virtual const SwNode * GetNodeOfFormula() const override
Search TextNode containing the field.
virtual OUString GetFieldName() const override
get name or content
SwTableField(SwTableFieldType *, const OUString &rFormel, sal_uInt16 nSubType, sal_uLong nFormat)
virtual bool PutValue(const css::uno::Any &rVal, sal_uInt16 nWhich) override
virtual void SetPar2(const OUString &rStr) override
virtual void SetValue(const double &rVal) override
virtual OUString ExpandImpl(SwRootFrame const *pLayout) const override
virtual bool QueryValue(css::uno::Any &rVal, sal_uInt16 nWhich) const override
virtual OUString GetPar2() const override
The formula.
virtual sal_uInt16 GetSubType() const override
SwTextNode is a paragraph in the document model.
Fields containing values that have to be formatted via number formatter.
void EnableFormat(bool bFormat=true)
virtual double GetValue() const
virtual OUString GetName() const override
virtual void SetValue(tools::Long nNew) override
OUString ReplacePoint(const OUString &sTmpName, bool bWithCommandType=false)
const SwTextNode * GetBodyTextNode(const SwDoc &pDoc, SwPosition &rPos, const SwFrame &rFrame)
Forward declaration: get "BodyTextNode" for exp.fld in Fly's headers/footers/footnotes.
std::vector< sal_Int8, boost::noinit_adaptor< std::allocator< sal_Int8 > > > maData
void SetLanguage(SwWrtShell &rWrtSh, std::u16string_view rLangText, bool bIsForSelection, SfxItemSet &rCoreSet)
const SwGetSetExpType GSE_SEQ
Sequence.
const SwGetSetExpType GSE_EXPR
Expression.
const SwGetSetExpType GSE_STRING
String.
SeqFieldLstElem(OUString aStr, sal_uInt16 nNo)
Marks a position in the document model.