LibreOffice Module sw (master) 1
Public Member Functions | Private Member Functions | Private Attributes | List of all members
SwUserField Class Referencefinal

The non-shared part of a user field. More...

#include <usrfld.hxx>

Inheritance diagram for SwUserField:
[legend]
Collaboration diagram for SwUserField:
[legend]

Public Member Functions

 SwUserField (SwUserFieldType *, sal_uInt16 nSub, sal_uInt32 nFormat)
 
virtual sal_uInt16 GetSubType () const override
 
virtual void SetSubType (sal_uInt16 nSub) override
 
virtual double GetValue () const override
 
virtual void SetValue (const double &rVal) override
 
virtual OUString GetFieldName () const override
 get name or content More...
 
virtual OUString GetPar1 () const override
 Get name. More...
 
virtual OUString GetPar2 () const override
 Get content. More...
 
virtual void SetPar2 (const OUString &rStr) override
 
virtual bool QueryValue (css::uno::Any &rVal, sal_uInt16 nWhichId) const override
 
virtual bool PutValue (const css::uno::Any &rVal, sal_uInt16 nWhichId) override
 
void dumpAsXml (xmlTextWriterPtr pWriter) const override
 
- Public Member Functions inherited from SwValueField
virtual ~SwValueField () override
 
virtual SwFieldTypeChgTyp (SwFieldType *) override
 Set a new type. More...
 
virtual void SetLanguage (LanguageType nLng) override
 set language of the format More...
 
SwDocGetDoc () const
 
virtual double GetValue () const
 
virtual void SetValue (const double &rVal)
 
OUString ExpandValue (const double &rVal, sal_uInt32 nFormat, LanguageType nLng) const
 
void dumpAsXml (xmlTextWriterPtr pWriter) const override
 
- Public Member Functions inherited from SwField
virtual ~SwField ()
 
 SwField (SwField const &)=default
 
 SwField (SwField &&)=default
 
SwFieldoperator= (SwField const &)=default
 
SwFieldoperator= (SwField &&)=default
 
SwFieldTypeGetTyp () const
 
virtual SwFieldTypeChgTyp (SwFieldType *)
 Set new type (used for copying among documents). More...
 
OUString ExpandField (bool bCached, SwRootFrame const *pLayout) const
 expand the field. More...
 
virtual OUString GetFieldName () const
 get name or content More...
 
std::unique_ptr< SwFieldCopyField () const
 
SwFieldIds Which () const
 ResId. More...
 
SwFieldTypesEnum GetTypeId () const
 
virtual sal_uInt16 GetSubType () const
 
virtual void SetSubType (sal_uInt16)
 
LanguageType GetLanguage () const
 Language at field position. More...
 
virtual void SetLanguage (LanguageType nLng)
 
sal_uInt32 GetFormat () const
 Query parameters for dialog and for BASIC. More...
 
virtual OUString GetPar1 () const
 
virtual OUString GetPar2 () const
 
virtual OUString GetFormula () const
 
void ChangeFormat (sal_uInt32 n)
 
virtual void SetPar1 (const OUString &rStr)
 
virtual void SetPar2 (const OUString &rStr)
 
virtual bool QueryValue (css::uno::Any &rVal, sal_uInt16 nWhichId) const
 
virtual bool PutValue (const css::uno::Any &rVal, sal_uInt16 nWhichId)
 
bool HasClickHdl () const
 Does the field possess an action on its ClickHandler? (e.g. INetFields, ...). More...
 
bool IsFixed () const
 
bool IsAutomaticLanguage () const
 
void SetAutomaticLanguage (bool const bSet)
 
virtual OUString GetDescription () const
 
bool IsClickable () const
 Is this field clickable? More...
 
virtual void dumpAsXml (xmlTextWriterPtr pWriter) const
 
const OUString & GetTitle () const
 
void SetTitle (const OUString &rTitle)
 

Private Member Functions

virtual OUString ExpandImpl (SwRootFrame const *pLayout) const override
 
virtual std::unique_ptr< SwFieldCopy () const override
 

Private Attributes

sal_uInt16 m_nSubType
 

Additional Inherited Members

- Static Public Member Functions inherited from SwValueField
static sal_uInt32 GetSystemFormat (SvNumberFormatter *pFormatter, sal_uInt32 nFormat)
 get format in office language More...
 
- Protected Member Functions inherited from SwValueField
 SwValueField (SwValueFieldType *pFieldType, sal_uInt32 nFormat, LanguageType nLang=LANGUAGE_SYSTEM, const double fVal=0.0)
 
 SwValueField (const SwValueField &rField)
 
- Protected Member Functions inherited from SwField
void SetFormat (sal_uInt32 const nSet)
 
 SwField (SwFieldType *pTyp, sal_uInt32 nFormat=0, LanguageType nLang=LANGUAGE_SYSTEM, bool m_bUseFieldValueCache=true)
 

Detailed Description

The non-shared part of a user field.

Tracks the number format and the language, conversion between the float and string representation is independent from the system locale.

Definition at line 105 of file usrfld.hxx.

Constructor & Destructor Documentation

◆ SwUserField()

SwUserField::SwUserField ( SwUserFieldType pTyp,
sal_uInt16  nSub,
sal_uInt32  nFormat 
)

Definition at line 53 of file usrfld.cxx.

Referenced by Copy().

Member Function Documentation

◆ Copy()

std::unique_ptr< SwField > SwUserField::Copy ( ) const
overrideprivatevirtual

◆ dumpAsXml()

void SwUserField::dumpAsXml ( xmlTextWriterPtr  pWriter) const
overridevirtual

Reimplemented from SwValueField.

Definition at line 168 of file usrfld.cxx.

References SwValueField::dumpAsXml(), and m_nSubType.

◆ ExpandImpl()

OUString SwUserField::ExpandImpl ( SwRootFrame const *  pLayout) const
overrideprivatevirtual

◆ GetFieldName()

OUString SwUserField::GetFieldName ( ) const
overridevirtual

get name or content

Returns
name or content.

Reimplemented from SwField.

Definition at line 75 of file usrfld.cxx.

References SwFieldType::GetName(), SwField::GetTyp(), SwFieldType::GetTypeStr(), and User.

◆ GetPar1()

OUString SwUserField::GetPar1 ( ) const
overridevirtual

Get name.

Reimplemented from SwField.

Definition at line 93 of file usrfld.cxx.

References GetName(), and SwField::GetTyp().

◆ GetPar2()

OUString SwUserField::GetPar2 ( ) const
overridevirtual

Get content.

Reimplemented from SwField.

Definition at line 99 of file usrfld.cxx.

References SwField::GetFormat(), and SwField::GetTyp().

◆ GetSubType()

sal_uInt16 SwUserField::GetSubType ( ) const
overridevirtual

Reimplemented from SwField.

Definition at line 109 of file usrfld.cxx.

References SwField::GetTyp(), and m_nSubType.

◆ GetValue()

double SwUserField::GetValue ( ) const
overridevirtual

Reimplemented from SwValueField.

Definition at line 82 of file usrfld.cxx.

References SwField::GetTyp(), and GetValue().

Referenced by GetValue().

◆ PutValue()

bool SwUserField::PutValue ( const css::uno::Any &  rVal,
sal_uInt16  nWhichId 
)
overridevirtual

◆ QueryValue()

bool SwUserField::QueryValue ( css::uno::Any &  rVal,
sal_uInt16  nWhichId 
) const
overridevirtual

◆ SetPar2()

void SwUserField::SetPar2 ( const OUString &  rStr)
overridevirtual

Reimplemented from SwField.

Definition at line 104 of file usrfld.cxx.

References SwField::GetFormat(), and SwField::GetTyp().

◆ SetSubType()

void SwUserField::SetSubType ( sal_uInt16  nSub)
overridevirtual

Reimplemented from SwField.

Definition at line 114 of file usrfld.cxx.

References SwField::GetTyp(), and m_nSubType.

◆ SetValue()

void SwUserField::SetValue ( const double &  rVal)
overridevirtual

Reimplemented from SwValueField.

Definition at line 87 of file usrfld.cxx.

References SwField::GetTyp(), and SetValue().

Referenced by SetValue().

Member Data Documentation

◆ m_nSubType

sal_uInt16 SwUserField::m_nSubType
private

Definition at line 107 of file usrfld.hxx.

Referenced by Copy(), dumpAsXml(), ExpandImpl(), GetSubType(), PutValue(), QueryValue(), and SetSubType().


The documentation for this class was generated from the following files: