19 #ifndef INCLUDED_SW_INC_FLDBAS_HXX
20 #define INCLUDED_SW_INC_FLDBAS_HXX
27 #include <com/sun/star/beans/XPropertySet.hpp>
250 static void GetFieldName_();
258 SAL_DLLPRIVATE css::uno::WeakReference<css::beans::XPropertySet>
const&
GetXObject()
const {
259 return m_wXFieldMaster;
261 SAL_DLLPRIVATE
void SetXObject(css::uno::Reference<css::beans::XPropertySet>
const& xFieldMaster) {
262 m_wXFieldMaster = xFieldMaster;
268 virtual OUString
GetName()
const;
269 virtual std::unique_ptr<SwFieldType>
Copy()
const = 0;
270 virtual void QueryValue( css::uno::Any& rVal, sal_uInt16 nWhich )
const;
271 virtual void PutValue(
const css::uno::Any& rVal, sal_uInt16 nWhich );
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<SwNodeOffset>& rvNodeIndex);
282 void GatherRefFields(std::vector<SwGetRefField*>& rvRFields,
const sal_uInt16 nTyp);
283 void GatherFields(std::vector<SwFormatField*>& rvFormatFields,
bool bCollectOnlyInDocNodes=
true)
const;
284 void GatherDdeTables(std::vector<SwDDETable*>& rvTables)
const;
285 virtual void UpdateFields();
303 virtual OUString ExpandImpl(
SwRootFrame const* pLayout)
const = 0;
304 virtual std::unique_ptr<SwField>
Copy()
const = 0;
312 sal_uInt32 nFormat = 0,
314 bool m_bUseFieldValueCache =
true );
339 OUString ExpandField(
bool bCached,
SwRootFrame const* pLayout)
const;
342 virtual OUString GetFieldName()
const;
344 std::unique_ptr<SwField> CopyField()
const;
352 return m_pType->
Which();
358 virtual sal_uInt16 GetSubType()
const;
359 virtual void SetSubType(sal_uInt16);
367 virtual OUString GetPar1()
const;
368 virtual OUString GetPar2()
const;
370 virtual OUString GetFormula()
const;
372 void ChangeFormat(sal_uInt32 n);
373 virtual void SetPar1(
const OUString& rStr);
374 virtual void SetPar2(
const OUString& rStr);
376 virtual bool QueryValue( css::uno::Any& rVal, sal_uInt16 nWhichId )
const;
377 virtual bool PutValue(
const css::uno::Any& rVal, sal_uInt16 nWhichId );
380 bool HasClickHdl()
const;
381 bool IsFixed()
const;
384 return m_bIsAutomaticLanguage;
387 m_bIsAutomaticLanguage = bSet;
392 bool IsClickable()
const;
394 const OUString &
GetTitle()
const {
return m_aTitle; }
395 void SetTitle(
const OUString& rTitle) { m_aTitle = rTitle; }
436 m_bUseFormat = bFormat;
441 OUString
DoubleToString(
const double &rVal, sal_uInt32 nFormat)
const;
464 virtual void SetValue(
const double& rVal );
470 static sal_uInt32 GetSystemFormat(
SvNumberFormatter* pFormatter, sal_uInt32 nFormat);
485 void SetFormula(
const OUString& rStr);
487 void SetExpandedFormula(
const OUString& rStr);
488 OUString GetExpandedFormula()
const;
491 #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
void SetTitle(const OUString &rTitle)
OUString m_Cache
Cached expansion (for clipboard).
OUString m_aTitle
Used for tooltip purposes when it's not-empty.
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)
virtual OUString GetName() const override
const SwGetSetExpType GSE_EXPR
Expression.
virtual SwFieldType * ChgTyp(SwFieldType *)
Set new type (used for copying among documents).
const OUString & GetTitle() const
bool m_bUseFieldValueCache
const SwExtendedSubType SUB_CMD
Show command.
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
virtual SotClipboardFormatId GetFormat(const TransferableDataHelper &aHelper) override
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
virtual void GetDescription(OUString &rName) override
Format for numbers from system.
const SwExtendedSubType SUB_OWN_FMT
SwDBField: Don't accept formatting from database.
const SwGetSetExpType GSE_FORMULA
Formula.
struct _xmlTextWriter * xmlTextWriterPtr
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)
virtual void SetValue(tools::Long nNew) override