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

#include <flddat.hxx>

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

Public Member Functions

 SwDateTimeField (SwDateTimeFieldType *pType, sal_uInt16 nSubType=DATEFLD, sal_uLong nFormat=0, LanguageType nLng=LANGUAGE_SYSTEM)
 
virtual sal_uInt16 GetSubType () const override
 
virtual void SetSubType (sal_uInt16 nSub) override
 
virtual double GetValue () const override
 
virtual void SetPar2 (const OUString &rStr) override
 
virtual OUString GetPar2 () const override
 
void SetOffset (long nMinutes)
 
long GetOffset () const
 
Date GetDate () const
 
tools::Time GetTime () const
 
void SetDateTime (const DateTime &rDT)
 
virtual bool QueryValue (css::uno::Any &rVal, sal_uInt16 nMId) const override
 
virtual bool PutValue (const css::uno::Any &rVal, sal_uInt16 nMId) 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 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
 
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...
 
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 GetPar1 () const
 
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...
 

Static Public Member Functions

static double GetDateTime (SwDoc *pDoc, const DateTime &rDT)
 
- Static Public Member Functions inherited from SwValueField
static sal_uInt32 GetSystemFormat (SvNumberFormatter *pFormatter, sal_uInt32 nFormat)
 get format in office language 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
 
long m_nOffset
 

Additional Inherited Members

- 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

Definition at line 43 of file flddat.hxx.

Constructor & Destructor Documentation

SwDateTimeField::SwDateTimeField ( SwDateTimeFieldType pType,
sal_uInt16  nSubType = DATEFLD,
sal_uLong  nFormat = 0,
LanguageType  nLng = LANGUAGE_SYSTEM 
)

Member Function Documentation

std::unique_ptr< SwField > SwDateTimeField::Copy ( ) const
overrideprivatevirtual
OUString SwDateTimeField::ExpandImpl ( SwRootFrame const *  pLayout) const
overrideprivatevirtual
Date SwDateTimeField::GetDate ( ) const
double SwDateTimeField::GetDateTime ( SwDoc pDoc,
const DateTime rDT 
)
static
long SwDateTimeField::GetOffset ( ) const
inline

Definition at line 64 of file flddat.hxx.

OUString SwDateTimeField::GetPar2 ( ) const
overridevirtual

Reimplemented from SwField.

Definition at line 109 of file flddat.cxx.

References m_nOffset.

sal_uInt16 SwDateTimeField::GetSubType ( ) const
overridevirtual

Reimplemented from SwField.

Definition at line 94 of file flddat.cxx.

References m_nSubType.

tools::Time SwDateTimeField::GetTime ( ) const

Definition at line 151 of file flddat.cxx.

References DateTime::AddTime(), DateTime::EMPTY, GetValue(), and o3tl::temporary().

Referenced by QueryValue().

double SwDateTimeField::GetValue ( ) const
overridevirtual

Reimplemented from SwValueField.

Definition at line 131 of file flddat.cxx.

References GetDateTime(), SwValueField::GetDoc(), SwValueField::GetValue(), SwField::IsFixed(), and DateTime::SYSTEM.

Referenced by Copy(), ExpandImpl(), GetDate(), and GetTime().

bool SwDateTimeField::PutValue ( const css::uno::Any &  rVal,
sal_uInt16  nMId 
)
overridevirtual
bool SwDateTimeField::QueryValue ( css::uno::Any &  rVal,
sal_uInt16  nMId 
) const
overridevirtual
void SwDateTimeField::SetDateTime ( const DateTime rDT)

Definition at line 116 of file flddat.cxx.

References GetDateTime(), SwValueField::GetDoc(), and SwValueField::SetValue().

Referenced by PutValue(), and SwDateTimeField().

void SwDateTimeField::SetOffset ( long  nMinutes)
inline

Definition at line 63 of file flddat.hxx.

Referenced by SwXTextField::attach().

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

Reimplemented from SwField.

Definition at line 104 of file flddat.cxx.

References m_nOffset.

void SwDateTimeField::SetSubType ( sal_uInt16  nSub)
overridevirtual

Reimplemented from SwField.

Definition at line 99 of file flddat.cxx.

References m_nSubType.

Member Data Documentation

long SwDateTimeField::m_nOffset
private

Definition at line 46 of file flddat.hxx.

Referenced by Copy(), ExpandImpl(), GetPar2(), PutValue(), QueryValue(), and SetPar2().

sal_uInt16 SwDateTimeField::m_nSubType
private

Definition at line 45 of file flddat.hxx.

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


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