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

#include <dbfld.hxx>

Inheritance diagram for SwDBField:
Collaboration diagram for SwDBField:

Public Member Functions

 SwDBField (SwDBFieldType *, sal_uInt32 nFormat=0)
virtual ~SwDBField () override
virtual SwFieldTypeChgTyp (SwFieldType *) override
 Set a new type. More...
void SetExpansion (const OUString &rStr)
 Current text. More...
virtual sal_uInt16 GetSubType () const override
virtual void SetSubType (sal_uInt16 nType) override
virtual OUString GetFieldName () const override
 get name or content More...
void ChgValue (double d, bool bVal)
 For calculations in expressions. More...
void Evaluate ()
 Get the evaluation via DBManager string. More...
void InitContent ()
 Evaluation for header and footer. More...
void InitContent (const OUString &rExpansion)
void ChgBodyTextFlag (bool bIsInBody)
 set from UpdateExpFields (the Node-Position is known there) More...
bool IsInitialized () const
void ClearInitialized ()
void SetInitialized ()
virtual OUString GetPar1 () const override
 Get name. More...
void SetFieldCode (const OUString &rStr)
 access to the command string More...
const SwDBDataGetDBData () const
 DBName. More...
virtual bool QueryValue (css::uno::Any &rVal, sal_uInt16 nWhich) const override
virtual bool PutValue (const css::uno::Any &rVal, sal_uInt16 nWhich) 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)

Static Public Member Functions

static bool FormatValue (SvNumberFormatter const *pDocFormatter, OUString const &aString, sal_uInt32 nFormat, double &aNumber, sal_Int32 nColumnType, SwDBField *pField=nullptr)
- 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

OUString m_aContent
OUString m_sFieldCode
 contains Word's field code More...
sal_uInt16 m_nSubType
bool m_bIsInBodyText: 1
bool m_bValidValue: 1
bool m_bInitialized: 1

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 57 of file dbfld.hxx.

Constructor & Destructor Documentation

◆ SwDBField()

SwDBField::SwDBField ( SwDBFieldType pTyp,
sal_uInt32  nFormat = 0 

Definition at line 160 of file dbfld.cxx.

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

Referenced by Copy().

◆ ~SwDBField()

SwDBField::~SwDBField ( )

Definition at line 172 of file dbfld.cxx.

References SwField::GetTyp().

Member Function Documentation

◆ ChgBodyTextFlag()

void SwDBField::ChgBodyTextFlag ( bool  bIsInBody)

set from UpdateExpFields (the Node-Position is known there)

Definition at line 118 of file dbfld.hxx.

References m_bIsInBodyText.

Referenced by SwDocUpdateField::GetBodyNode(), and SwTextFormatter::NewFieldPortion().

◆ ChgTyp()

SwFieldType * SwDBField::ChgTyp ( SwFieldType pNewType)

Set a new type.

This is needed/used for copying between documents. Needs to be always of the same type.

pNewTypeThe new type.
The old type.

Reimplemented from SwValueField.

Definition at line 247 of file dbfld.cxx.

References SwValueField::ChgTyp().

◆ ChgValue()

void SwDBField::ChgValue ( double  d,
bool  bVal 

◆ ClearInitialized()

void SwDBField::ClearInitialized ( )

Definition at line 96 of file dbfld.hxx.

Referenced by SwDBFieldType::PutValue(), and sw::DocumentFieldsManager::UpdateField().

◆ Copy()

std::unique_ptr< SwField > SwDBField::Copy ( ) const

◆ Evaluate()

void SwDBField::Evaluate ( )

◆ ExpandImpl()

OUString SwDBField::ExpandImpl ( SwRootFrame const *  pLayout) const

Implements SwField.

Definition at line 201 of file dbfld.cxx.

References GetSubType(), lcl_DBSeparatorConvert(), m_aContent, and nsSwExtendedSubType::SUB_INVISIBLE.

◆ FormatValue()

bool SwDBField::FormatValue ( SvNumberFormatter const *  pDocFormatter,
OUString const &  aString,
sal_uInt32  nFormat,
double &  aNumber,
sal_Int32  nColumnType,
SwDBField pField = nullptr 

◆ GetDBData()

const SwDBData & SwDBField::GetDBData ( ) const


Definition at line 106 of file dbfld.hxx.

References GetDBData().

Referenced by Evaluate(), and GetDBData().

◆ GetFieldName()

OUString SwDBField::GetFieldName ( ) const

get name or content

name or content.

Reimplemented from SwField.

Definition at line 222 of file dbfld.cxx.

References DB_DELIM, GetName(), o3tl::getToken(), SwField::GetTyp(), and lcl_DBSeparatorConvert().

◆ GetPar1()

OUString SwDBField::GetPar1 ( ) const

Get name.

get name

Reimplemented from SwField.

Definition at line 343 of file dbfld.cxx.

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

◆ GetSubType()

sal_uInt16 SwDBField::GetSubType ( ) const

Reimplemented from SwField.

Definition at line 348 of file dbfld.cxx.

References m_nSubType.

Referenced by SwXTextField::attach(), ExpandImpl(), PutValue(), and QueryValue().

◆ InitContent() [1/2]

void SwDBField::InitContent ( )

◆ InitContent() [2/2]

void SwDBField::InitContent ( const OUString &  rExpansion)

Definition at line 186 of file dbfld.cxx.

References GetAppCmpStrIgnore(), SwField::GetTyp(), InitContent(), and SetExpansion().

◆ IsInitialized()

bool SwDBField::IsInitialized ( ) const

◆ PutValue()

bool SwDBField::PutValue ( const css::uno::Any &  rVal,
sal_uInt16  nWhich 

◆ QueryValue()

bool SwDBField::QueryValue ( css::uno::Any &  rVal,
sal_uInt16  nWhich 
) const

◆ SetExpansion()

void SwDBField::SetExpansion ( const OUString &  rStr)

Current text.

Definition at line 114 of file dbfld.hxx.

References m_aContent.

Referenced by InitContent().

◆ SetFieldCode()

void SwDBField::SetFieldCode ( const OUString &  rStr)

access to the command string

Definition at line 103 of file dbfld.hxx.

Referenced by SwWW8ImplReader::Read_F_DBField().

◆ SetInitialized()

void SwDBField::SetInitialized ( )

Definition at line 97 of file dbfld.hxx.

◆ SetSubType()

void SwDBField::SetSubType ( sal_uInt16  nType)

Reimplemented from SwField.

Definition at line 353 of file dbfld.cxx.

References m_nSubType, and nType.

Referenced by PutValue().

Member Data Documentation

◆ m_aContent

OUString SwDBField::m_aContent

◆ m_bInitialized

bool SwDBField::m_bInitialized

Definition at line 64 of file dbfld.hxx.

Referenced by Copy(), and Evaluate().

◆ m_bIsInBodyText

bool SwDBField::m_bIsInBodyText

Definition at line 62 of file dbfld.hxx.

Referenced by ChgBodyTextFlag(), and Copy().

◆ m_bValidValue

bool SwDBField::m_bValidValue

Definition at line 63 of file dbfld.hxx.

Referenced by ChgValue(), Copy(), and Evaluate().

◆ m_nSubType

sal_uInt16 SwDBField::m_nSubType

Definition at line 61 of file dbfld.hxx.

Referenced by Copy(), Evaluate(), GetSubType(), and SetSubType().

◆ m_sFieldCode

OUString SwDBField::m_sFieldCode

contains Word's field code

Definition at line 60 of file dbfld.hxx.

Referenced by Copy(), PutValue(), and QueryValue().

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