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

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

#include <usrfld.hxx>

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

Public Member Functions

 SwUserFieldType (SwDoc *pDocPtr, const OUString &)
 
virtual OUString GetName () const override
 Only in derived classes. More...
 
virtual std::unique_ptr< SwFieldTypeCopy () const override
 
OUString Expand (sal_uInt32 nFormat, sal_uInt16 nSubType, LanguageType nLng)
 
OUString GetContent (sal_uInt32 nFormat=0) const
 
void SetContent (const OUString &rStr, sal_uInt32 nFormat=0)
 
OUString GetInputOrDateTime (sal_uInt32 nFormat) const
 
bool IsValid () const
 
double GetValue (SwCalc &rCalc)
 
double GetValue () const
 
void SetValue (const double nVal)
 
sal_uInt16 GetType () const
 
void SetType (sal_uInt16)
 
bool IsDeleted () const
 
void SetDeleted (bool b)
 
virtual void QueryValue (css::uno::Any &rVal, sal_uInt16 nMId) const override
 
virtual void PutValue (const css::uno::Any &rVal, sal_uInt16 nMId) override
 
void EnsureValid ()
 
void dumpAsXml (xmlTextWriterPtr pWriter) const override
 
- Public Member Functions inherited from SwValueFieldType
SwDocGetDoc () const
 
void SetDoc (SwDoc *pNewDoc)
 
bool UseFormat () const
 
void EnableFormat (bool bFormat=true)
 
OUString ExpandValue (const double &rVal, sal_uInt32 nFormat, LanguageType nLng) const
 return value formatted as string More...
 
OUString DoubleToString (const double &rVal, LanguageType eLng) const
 
OUString DoubleToString (const double &rVal, sal_uInt32 nFormat) const
 
OUString GetInputOrDateTime (const OUString &rInput, const double &rVal, sal_uInt32 nFormat) const
 Query input or formatted value for dialog. More...
 
- Public Member Functions inherited from SwFieldType
unotools::WeakReference< SwXFieldMaster > const & GetXObject () const
 
void SetXObject (rtl::Reference< SwXFieldMaster > const &xFieldMaster)
 
virtual OUString GetName () const
 Only in derived classes. More...
 
virtual std::unique_ptr< SwFieldTypeCopy () const =0
 
virtual void QueryValue (css::uno::Any &rVal, sal_uInt16 nWhich) const
 
virtual void PutValue (const css::uno::Any &rVal, sal_uInt16 nWhich)
 
SwFieldIds Which () const
 
void PrintHiddenPara ()
 
virtual void dumpAsXml (xmlTextWriterPtr pWriter) const
 
SwFormatFieldFindFormatForField (const SwField *) const
 
SwFormatFieldFindFormatForPostItId (sal_uInt32 nPostItId) const
 
void CollectPostIts (std::vector< SwFormatField * > &rvFormatFields, IDocumentRedlineAccess const &rIDRA, bool HideRedlines)
 
bool HasHiddenInformationNotes () const
 
void GatherNodeIndex (std::vector< SwNodeOffset > &rvNodeIndex)
 
void GatherRefFields (std::vector< SwGetRefField * > &rvRFields, const sal_uInt16 nTyp)
 
void GatherFields (std::vector< SwFormatField * > &rvFormatFields, bool bCollectOnlyInDocNodes=true) const
 
void GatherDdeTables (std::vector< SwDDETable * > &rvTables) const
 
void UpdateDocPos (const SwTwips nDocPos)
 
virtual void UpdateFields ()
 

Private Member Functions

virtual void SwClientNotify (const SwModify &, const SfxHint &) override
 

Private Attributes

bool m_bValidValue: 1
 
bool m_bDeleted: 1
 
double m_nValue
 Float value type. More...
 
OUString m_aName
 
OUString m_aContent
 String value type. More...
 
OUString m_aContentLang
 Language used by m_aContents. More...
 
sal_uInt16 m_nType
 

Additional Inherited Members

- Static Public Member Functions inherited from SwFieldType
static const OUString & GetTypeStr (SwFieldTypesEnum nTypeId)
 
- Protected Member Functions inherited from SwValueFieldType
 SwValueFieldType (SwDoc *pDocPtr, SwFieldIds nWhichId)
 
 SwValueFieldType (const SwValueFieldType &rTyp)
 
- Protected Member Functions inherited from SwFieldType
 SwFieldType (SwFieldIds nWhichId)
 Single argument ctors shall be explicit. More...
 

Detailed Description

The shared part of a user field.

Tracks the value, but conversion between the float and string representation always happens with the system locale.

Definition at line 34 of file usrfld.hxx.

Constructor & Destructor Documentation

◆ SwUserFieldType()

SwUserFieldType::SwUserFieldType ( SwDoc pDocPtr,
const OUString &  aNam 
)

Definition at line 176 of file usrfld.cxx.

References SwValueFieldType::EnableFormat(), m_aName, m_bDeleted, and m_bValidValue.

Referenced by Copy().

Member Function Documentation

◆ Copy()

std::unique_ptr< SwFieldType > SwUserFieldType::Copy ( ) const
overridevirtual

◆ dumpAsXml()

void SwUserFieldType::dumpAsXml ( xmlTextWriterPtr  pWriter) const
overridevirtual

Reimplemented from SwFieldType.

Definition at line 387 of file usrfld.cxx.

References SwFieldType::dumpAsXml(), m_aContent, m_aContentLang, and m_nValue.

◆ EnsureValid()

void SwUserFieldType::EnsureValid ( )

Definition at line 379 of file usrfld.cxx.

References SwValueFieldType::GetDoc(), GetValue(), and IsValid().

◆ Expand()

OUString SwUserFieldType::Expand ( sal_uInt32  nFormat,
sal_uInt16  nSubType,
LanguageType  nLng 
)

◆ GetContent()

OUString SwUserFieldType::GetContent ( sal_uInt32  nFormat = 0) const

◆ GetInputOrDateTime()

OUString SwUserFieldType::GetInputOrDateTime ( sal_uInt32  nFormat) const

Definition at line 278 of file usrfld.cxx.

References GetInputOrDateTime(), GetValue(), and m_aContent.

Referenced by GetInputOrDateTime(), and SwFieldVarPage::SubTypeHdl().

◆ GetName()

OUString SwUserFieldType::GetName ( ) const
overridevirtual

Only in derived classes.

Reimplemented from SwFieldType.

Definition at line 212 of file usrfld.cxx.

References m_aName.

Referenced by SwFieldVarPage::SubTypeHdl().

◆ GetType()

sal_uInt16 SwUserFieldType::GetType ( ) const
inline

Definition at line 90 of file usrfld.hxx.

References m_nType.

Referenced by SwXTextField::attach(), SwFieldVarPage::SubTypeHdl(), and SwCalc::VarLook().

◆ GetValue() [1/2]

double SwUserFieldType::GetValue ( ) const
inline

Definition at line 84 of file usrfld.hxx.

References m_nValue.

Referenced by EnsureValid(), GetContent(), and GetInputOrDateTime().

◆ GetValue() [2/2]

double SwUserFieldType::GetValue ( SwCalc rCalc)

◆ IsDeleted()

bool SwUserFieldType::IsDeleted ( ) const
inline

Definition at line 69 of file usrfld.hxx.

◆ IsValid()

bool SwUserFieldType::IsValid ( ) const
inline

Definition at line 81 of file usrfld.hxx.

References m_bValidValue.

Referenced by EnsureValid(), and SwCalc::VarLook().

◆ PutValue()

void SwUserFieldType::PutValue ( const css::uno::Any &  rVal,
sal_uInt16  nMId 
)
overridevirtual

◆ QueryValue()

void SwUserFieldType::QueryValue ( css::uno::Any &  rVal,
sal_uInt16  nMId 
) const
overridevirtual

◆ SetContent()

void SwUserFieldType::SetContent ( const OUString &  rStr,
sal_uInt32  nFormat = 0 
)

◆ SetDeleted()

void SwUserFieldType::SetDeleted ( bool  b)
inline

Definition at line 70 of file usrfld.hxx.

◆ SetType()

void SwUserFieldType::SetType ( sal_uInt16  nSub)
inline

Definition at line 93 of file usrfld.hxx.

References SwValueFieldType::EnableFormat(), nsSwGetSetExpType::GSE_STRING, and m_nType.

Referenced by IMPL_LINK().

◆ SetValue()

void SwUserFieldType::SetValue ( const double  nVal)
inline

Definition at line 87 of file usrfld.hxx.

References m_nValue.

Referenced by SetContent().

◆ SwClientNotify()

void SwUserFieldType::SwClientNotify ( const SwModify ,
const SfxHint rHint 
)
overrideprivatevirtual

Member Data Documentation

◆ m_aContent

OUString SwUserFieldType::m_aContent
private

String value type.

Definition at line 42 of file usrfld.hxx.

Referenced by Copy(), dumpAsXml(), Expand(), GetContent(), GetInputOrDateTime(), GetValue(), PutValue(), QueryValue(), and SetContent().

◆ m_aContentLang

OUString SwUserFieldType::m_aContentLang
private

Language used by m_aContents.

Definition at line 44 of file usrfld.hxx.

Referenced by Copy(), dumpAsXml(), GetValue(), PutValue(), and SetContent().

◆ m_aName

OUString SwUserFieldType::m_aName
private

Definition at line 40 of file usrfld.hxx.

Referenced by Copy(), GetName(), and SwUserFieldType().

◆ m_bDeleted

bool SwUserFieldType::m_bDeleted
private

Definition at line 37 of file usrfld.hxx.

Referenced by Copy(), and SwUserFieldType().

◆ m_bValidValue

bool SwUserFieldType::m_bValidValue
private

Definition at line 36 of file usrfld.hxx.

Referenced by Copy(), GetValue(), IsValid(), SwClientNotify(), and SwUserFieldType().

◆ m_nType

sal_uInt16 SwUserFieldType::m_nType
private

Definition at line 45 of file usrfld.hxx.

Referenced by Copy(), Expand(), GetType(), PutValue(), QueryValue(), and SetType().

◆ m_nValue

double SwUserFieldType::m_nValue
private

Float value type.

Definition at line 39 of file usrfld.hxx.

Referenced by Copy(), dumpAsXml(), Expand(), GetValue(), PutValue(), QueryValue(), and SetValue().


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