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

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
 
OUString ExpandValue (const double &rVal, sal_uInt32 nFormat, LanguageType nLng) const
 
- Public Member Functions inherited from SwField
virtual ~SwField ()
 
 SwField (SwField const &)=default
 
 SwField (SwField &&)=default
 
SwFieldoperator= (SwField const &)=default
 
SwFieldoperator= (SwField &&)=default
 
SwFieldTypeGetTyp () const
 
OUString ExpandField (bool bCached, SwRootFrame const *pLayout) const
 expand the field. More...
 
std::unique_ptr< SwFieldCopyField () const
 
SwFieldIds Which () const
 ResId. More...
 
sal_uInt16 GetTypeId () const
 
LanguageType GetLanguage () const
 Language at field position. More...
 
sal_uInt32 GetFormat () const
 Query parameters for dialog and for BASIC. More...
 
virtual OUString GetFormula () const
 
void ChangeFormat (sal_uInt32 n)
 
virtual void SetPar1 (const OUString &rStr)
 
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...
 

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 101 of file usrfld.hxx.

Constructor & Destructor Documentation

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

Definition at line 59 of file usrfld.cxx.

Referenced by Copy().

Member Function Documentation

std::unique_ptr< SwField > SwUserField::Copy ( ) const
overrideprivatevirtual
void SwUserField::dumpAsXml ( xmlTextWriterPtr  pWriter) const
overridevirtual

Reimplemented from SwValueField.

Definition at line 173 of file usrfld.cxx.

References SwValueField::dumpAsXml(), and m_nSubType.

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

get name or content

Returns
name or content.

Reimplemented from SwField.

Definition at line 80 of file usrfld.cxx.

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

OUString SwUserField::GetPar1 ( ) const
overridevirtual

Get name.

Reimplemented from SwField.

Definition at line 98 of file usrfld.cxx.

References SwField::GetTyp().

OUString SwUserField::GetPar2 ( ) const
overridevirtual

Get content.

Reimplemented from SwField.

Definition at line 104 of file usrfld.cxx.

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

sal_uInt16 SwUserField::GetSubType ( ) const
overridevirtual

Reimplemented from SwField.

Definition at line 114 of file usrfld.cxx.

References SwField::GetTyp(), and m_nSubType.

double SwUserField::GetValue ( ) const
overridevirtual

Reimplemented from SwValueField.

Definition at line 87 of file usrfld.cxx.

References SwField::GetTyp().

bool SwUserField::PutValue ( const css::uno::Any &  rVal,
sal_uInt16  nWhichId 
)
overridevirtual
bool SwUserField::QueryValue ( css::uno::Any &  rVal,
sal_uInt16  nWhichId 
) const
overridevirtual
void SwUserField::SetPar2 ( const OUString &  rStr)
overridevirtual

Reimplemented from SwField.

Definition at line 109 of file usrfld.cxx.

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

void SwUserField::SetSubType ( sal_uInt16  nSub)
overridevirtual

Reimplemented from SwField.

Definition at line 119 of file usrfld.cxx.

References SwField::GetTyp(), and m_nSubType.

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

Reimplemented from SwValueField.

Definition at line 92 of file usrfld.cxx.

References SwField::GetTyp().

Member Data Documentation

sal_uInt16 SwUserField::m_nSubType
private

Definition at line 103 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: