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 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
OUString ExpandField (bool bCached, SwRootFrame const *pLayout) const
 expand the field. More...
std::unique_ptr< SwFieldCopyField () const
SwFieldIds Which () const
 ResId. More...
SwFieldTypesEnum GetTypeId () const
LanguageType GetLanguage () const
 Language at field position. More...
sal_uInt32 GetFormat () const
 Query parameters for dialog and for BASIC. More...
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)
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...
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 ( SwDBFieldType pTyp,
sal_uInt32  nFormat = 0 

Definition at line 159 of file dbfld.cxx.

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

Referenced by Copy().

SwDBField::~SwDBField ( )

Definition at line 171 of file dbfld.cxx.

References SwField::GetTyp().

Member Function Documentation

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().

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 246 of file dbfld.cxx.

References SwValueField::ChgTyp().

void SwDBField::ChgValue ( double  d,
bool  bVal 
void SwDBField::ClearInitialized ( )

Definition at line 96 of file dbfld.hxx.

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

std::unique_ptr< SwField > SwDBField::Copy ( ) const
void SwDBField::Evaluate ( )
OUString SwDBField::ExpandImpl ( SwRootFrame const *  pLayout) const

Implements SwField.

Definition at line 200 of file dbfld.cxx.

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

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


Definition at line 106 of file dbfld.hxx.

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

Referenced by Evaluate(), and GetDBData().

OUString SwDBField::GetFieldName ( ) const

get name or content

name or content.

Reimplemented from SwField.

Definition at line 221 of file dbfld.cxx.

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

OUString SwDBField::GetPar1 ( ) const

Get name.

get name

Reimplemented from SwField.

Definition at line 342 of file dbfld.cxx.

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

sal_uInt16 SwDBField::GetSubType ( ) const

Reimplemented from SwField.

Definition at line 347 of file dbfld.cxx.

References m_nSubType.

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

void SwDBField::InitContent ( )
void SwDBField::InitContent ( const OUString &  rExpansion)

Definition at line 185 of file dbfld.cxx.

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

bool SwDBField::IsInitialized ( ) const

Definition at line 95 of file dbfld.hxx.

Referenced by InitContent(), and sw::DocumentFieldsManager::UpdateField().

bool SwDBField::PutValue ( const css::uno::Any &  rVal,
sal_uInt16  nWhich 
bool SwDBField::QueryValue ( css::uno::Any &  rVal,
sal_uInt16  nWhich 
) const
void SwDBField::SetExpansion ( const OUString &  rStr)

Current text.

Definition at line 114 of file dbfld.hxx.

References m_aContent.

Referenced by InitContent().

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().

void SwDBField::SetInitialized ( )

Definition at line 97 of file dbfld.hxx.

void SwDBField::SetSubType ( sal_uInt16  nType)

Reimplemented from SwField.

Definition at line 352 of file dbfld.cxx.

References m_nSubType.

Referenced by PutValue().

Member Data Documentation

OUString SwDBField::m_aContent
bool SwDBField::m_bInitialized

Definition at line 64 of file dbfld.hxx.

Referenced by Copy(), and Evaluate().

bool SwDBField::m_bIsInBodyText

Definition at line 62 of file dbfld.hxx.

Referenced by ChgBodyTextFlag(), and Copy().

bool SwDBField::m_bValidValue

Definition at line 63 of file dbfld.hxx.

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

sal_uInt16 SwDBField::m_nSubType

Definition at line 61 of file dbfld.hxx.

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

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: