19 #ifndef INCLUDED_SW_INC_FLDBAS_HXX
20 #define INCLUDED_SW_INC_FLDBAS_HXX
249 static void GetFieldName_();
257 SAL_DLLPRIVATE css::uno::WeakReference<css::beans::XPropertySet>
const&
GetXObject()
const {
258 return m_wXFieldMaster;
260 SAL_DLLPRIVATE
void SetXObject(css::uno::Reference<css::beans::XPropertySet>
const& xFieldMaster) {
261 m_wXFieldMaster = xFieldMaster;
267 virtual OUString GetName()
const;
268 virtual std::unique_ptr<SwFieldType>
Copy()
const = 0;
269 virtual void QueryValue( css::uno::Any& rVal, sal_uInt16 nWhich )
const;
270 virtual void PutValue(
const css::uno::Any& rVal, sal_uInt16 nWhich );
274 void UpdateFields()
const;
275 void PrintHiddenPara();
278 SwFormatField* FindFormatForPostItId(sal_uInt32 nPostItId)
const;
279 void CollectPostIts(std::vector<SwFormatField*>& rvFormatFields,
IDocumentRedlineAccess const& rIDRA,
bool HideRedlines);
280 bool HasHiddenInformationNotes()
const;
281 void GatherNodeIndex(std::vector<sal_uLong>& rvNodeIndex);
282 void GatherRefFields(std::vector<SwGetRefField*>& rvRFields,
const sal_uInt16 nTyp);
283 void GatherFields(std::vector<SwFormatField*>& rvFormatFields,
bool bCollectOnlyInDocNodes=
true)
const;
299 virtual OUString ExpandImpl(
SwRootFrame const* pLayout)
const = 0;
300 virtual std::unique_ptr<SwField>
Copy()
const = 0;
308 sal_uInt32 nFormat = 0,
310 bool m_bUseFieldValueCache =
true );
335 OUString ExpandField(
bool bCached,
SwRootFrame const* pLayout)
const;
338 virtual OUString GetFieldName()
const;
340 std::unique_ptr<SwField> CopyField()
const;
348 return m_pType->
Which();
354 virtual sal_uInt16 GetSubType()
const;
355 virtual void SetSubType(sal_uInt16);
362 inline sal_uInt32 GetFormat()
const;
363 virtual OUString GetPar1()
const;
364 virtual OUString GetPar2()
const;
366 virtual OUString GetFormula()
const;
368 void ChangeFormat(sal_uInt32 n);
369 virtual void SetPar1(
const OUString& rStr);
370 virtual void SetPar2(
const OUString& rStr);
372 virtual bool QueryValue( css::uno::Any& rVal, sal_uInt16 nWhichId )
const;
373 virtual bool PutValue(
const css::uno::Any& rVal, sal_uInt16 nWhichId );
376 bool HasClickHdl()
const;
377 bool IsFixed()
const;
380 return m_bIsAutomaticLanguage;
383 m_bIsAutomaticLanguage = bSet;
386 virtual OUString GetDescription()
const;
388 bool IsClickable()
const;
430 m_bUseFormat = bFormat;
435 OUString
DoubleToString(
const double &rVal, sal_uInt32 nFormat)
const;
458 virtual void SetValue(
const double& rVal );
464 static sal_uInt32 GetSystemFormat(
SvNumberFormatter* pFormatter, sal_uInt32 nFormat);
479 void SetFormula(
const OUString& rStr);
481 void SetExpandedFormula(
const OUString& rStr);
482 OUString GetExpandedFormula()
const;
485 #endif // INCLUDED_SW_INC_FLDBAS_HXX
Instances of SwFields and those derived from it occur 0 to n times.
bool m_bUseFormat
Use number formatter.
virtual void dumpAsXml(xmlTextWriterPtr pWriter) const
OUString m_Cache
Cached expansion (for clipboard).
LanguageType GetLanguage() const
Language at field position.
void EnableFormat(bool bFormat=true)
sal_uInt32 GetFormat() const
Query parameters for dialog and for BASIC.
const SwExtendedSubType SUB_INVISIBLE
Invisible.
Base class of all fields.
LanguageType GetLanguage(SfxItemSet const &aSet, sal_uInt16 nLangWhichId)
sal_uInt16 SwGetSetExpType
SwValueFieldType(SwDoc *pDocPtr, SwFieldIds nWhichId)
LanguageType m_nLang
this can be either SvxNumType or SwChapterFormat depending on the subtype
css::uno::WeakReference< css::beans::XPropertySet > m_wXFieldMaster
bool m_bIsAutomaticLanguage
control the usage of the cached field value
SAL_DLLPRIVATE css::uno::WeakReference< css::beans::XPropertySet > const & GetXObject() const
struct _xmlTextWriter * xmlTextWriterPtr
The root element of a Writer document layout.
For old documents the Field-Which IDs must be preserved !!!
static LanguageType nLang
static std::vector< OUString > * s_pFieldNames
field names
void SetAutomaticLanguage(bool const bSet)
const SwGetSetExpType GSE_EXPR
Expression.
virtual SwFieldType * ChgTyp(SwFieldType *)
Set new type (used for copying among documents).
struct _xmlTextWriter * xmlTextWriterPtr
bool m_bUseFieldValueCache
const SwExtendedSubType SUB_CMD
Show command.
class SAL_NO_VTABLE XPropertySet
sal_uInt16 SwExtendedSubType
SAL_DLLPRIVATE void SetXObject(css::uno::Reference< css::beans::XPropertySet > const &xFieldMaster)
SwFieldTypesEnum
List of FieldTypes at UI.
OUString FormatNumber(sal_uInt32 nNum, SvxNumType nFormat, LanguageType nLang=LANGUAGE_NONE)
General tools.
void SetFormat(sal_uInt32 const nSet)
bool IsAutomaticLanguage() const
SwFieldType * GetTyp() const
Fields containing values that have to be formatted via number formatter.
const SwGetSetExpType GSE_SEQ
Sequence.
virtual void SetLanguage(LanguageType nLng)
OUString ExpandValue(const double &rVal, sal_uInt32 nFormat, LanguageType nLng) const
return value formatted as string
Format for numbers from system.
const o3tl::enumarray< SvxAdjust, unsigned short > aSvxToUnoAdjust USHRT_MAX
const SwExtendedSubType SUB_OWN_FMT
SwDBField: Don't accept formatting from database.
const SwGetSetExpType GSE_FORMULA
Formula.
const SwGetSetExpType GSE_STRING
String.
OUString DoubleToString(const double &rVal, LanguageType eLng) const
void SetLanguage(SwWrtShell &rWrtSh, std::u16string_view rLangText, bool bIsForSelection, SfxItemSet &rCoreSet)
virtual OUString GetFormula() const
OUString ExpandValue(const double &rVal, sal_uInt32 nFormat, LanguageType nLng) const
Format for currency from system.
void SetDoc(SwDoc *pNewDoc)