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

#include <dbfld.hxx>

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

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

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

Constructor & Destructor Documentation

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

Definition at line 172 of file dbfld.cxx.

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

Referenced by Copy().

SwDBField::~SwDBField ( )
overridevirtual

Definition at line 184 of file dbfld.cxx.

References SwField::GetTyp().

Member Function Documentation

void SwDBField::ChgBodyTextFlag ( bool  bIsInBody)
inline

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

Definition at line 117 of file dbfld.hxx.

References m_bIsInBodyText.

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

SwFieldType * SwDBField::ChgTyp ( SwFieldType pNewType)
overridevirtual

Set a new type.

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

Parameters
pNewTypeThe new type.
Returns
The old type.

Reimplemented from SwValueField.

Definition at line 259 of file dbfld.cxx.

References SwValueField::ChgTyp().

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

Definition at line 95 of file dbfld.hxx.

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

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

Implements SwField.

Definition at line 213 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 
)
static
const SwDBData& SwDBField::GetDBData ( ) const
inline

DBName.

Definition at line 105 of file dbfld.hxx.

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

Referenced by Evaluate(), and GetDBData().

OUString SwDBField::GetFieldName ( ) const
overridevirtual

get name or content

Returns
name or content.

Reimplemented from SwField.

Definition at line 234 of file dbfld.cxx.

References DB_DELIM, SwField::GetTyp(), and lcl_DBSeparatorConvert().

OUString SwDBField::GetPar1 ( ) const
overridevirtual

Get name.

get name

Reimplemented from SwField.

Definition at line 355 of file dbfld.cxx.

References SwField::GetTyp().

sal_uInt16 SwDBField::GetSubType ( ) const
overridevirtual

Reimplemented from SwField.

Definition at line 360 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 198 of file dbfld.cxx.

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

bool SwDBField::IsInitialized ( ) const
inline

Definition at line 94 of file dbfld.hxx.

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

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

Current text.

Definition at line 113 of file dbfld.hxx.

References m_aContent.

Referenced by InitContent().

void SwDBField::SetFieldCode ( const OUString &  rStr)
inline

access to the command string

Definition at line 102 of file dbfld.hxx.

Referenced by SwWW8ImplReader::Read_F_DBField().

void SwDBField::SetInitialized ( )
inline

Definition at line 96 of file dbfld.hxx.

void SwDBField::SetSubType ( sal_uInt16  nType)
overridevirtual

Reimplemented from SwField.

Definition at line 365 of file dbfld.cxx.

References m_nSubType.

Referenced by PutValue().

Member Data Documentation

OUString SwDBField::m_aContent
private
bool SwDBField::m_bInitialized
private

Definition at line 63 of file dbfld.hxx.

Referenced by Copy(), and Evaluate().

bool SwDBField::m_bIsInBodyText
private

Definition at line 61 of file dbfld.hxx.

Referenced by ChgBodyTextFlag(), and Copy().

bool SwDBField::m_bValidValue
private

Definition at line 62 of file dbfld.hxx.

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

sal_uInt16 SwDBField::m_nSubType
private

Definition at line 60 of file dbfld.hxx.

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

OUString SwDBField::m_sFieldCode
private

contains Word's field code

Definition at line 59 of file dbfld.hxx.

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


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