LibreOffice Module sw (master) 1
|
#include <dbfld.hxx>
Public Member Functions | |
SwDBField (SwDBFieldType *, sal_uInt32 nFormat=0) | |
virtual | ~SwDBField () override |
virtual SwFieldType * | ChgTyp (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 SwDBData & | GetDBData () 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 SwFieldType * | ChgTyp (SwFieldType *) override |
Set a new type. More... | |
virtual void | SetLanguage (LanguageType nLng) override |
set language of the format More... | |
SwDoc * | GetDoc () 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 | |
SwField & | operator= (SwField const &)=default |
SwField & | operator= (SwField &&)=default |
SwFieldType * | GetTyp () const |
virtual SwFieldType * | ChgTyp (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< SwField > | CopyField () 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< SwField > | Copy () 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) | |
SwDBField::SwDBField | ( | SwDBFieldType * | pTyp, |
sal_uInt32 | nFormat = 0 |
||
) |
Definition at line 160 of file dbfld.cxx.
References SwField::GetTyp(), and InitContent().
Referenced by Copy().
|
overridevirtual |
Definition at line 172 of file dbfld.cxx.
References SwField::GetTyp().
|
inline |
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().
|
overridevirtual |
Set a new type.
This is needed/used for copying between documents. Needs to be always of the same type.
pNewType | The new type. |
Reimplemented from SwValueField.
Definition at line 247 of file dbfld.cxx.
References SwValueField::ChgTyp().
void SwDBField::ChgValue | ( | double | d, |
bool | bVal | ||
) |
For calculations in expressions.
Definition at line 238 of file dbfld.cxx.
References d, SwValueField::ExpandValue(), SwField::GetFormat(), SwField::GetLanguage(), SwField::GetTyp(), m_aContent, m_bValidValue, and SwValueField::SetValue().
Referenced by sw::DocumentFieldsManager::UpdateField().
|
inline |
Definition at line 96 of file dbfld.hxx.
Referenced by SwDBFieldType::PutValue(), and sw::DocumentFieldsManager::UpdateField().
|
overrideprivatevirtual |
Implements SwField.
Definition at line 208 of file dbfld.cxx.
References SwField::GetFormat(), SwField::GetTyp(), SwValueField::GetValue(), m_aContent, m_bInitialized, m_bIsInBodyText, m_bValidValue, m_nSubType, m_sFieldCode, and SwDBField().
void SwDBField::Evaluate | ( | ) |
Get the evaluation via DBManager string.
get current field value and cache it
Definition at line 304 of file dbfld.cxx.
References SwValueField::ExpandValue(), FormatValue(), SwDBManager::GetColumnFormat(), SwDBManager::GetColumnType(), GetDBData(), SwDoc::GetDBManager(), SwValueField::GetDoc(), SwField::GetFormat(), SwField::GetLanguage(), SwDBManager::GetMergeColumnCnt(), SwDoc::GetNumberFormatter(), SwField::GetTyp(), SwDBManager::IsDataSourceOpen(), m_aContent, m_bInitialized, m_bValidValue, m_nSubType, nValue, SwDBData::sCommand, SwDBData::sDataSource, SwField::SetFormat(), and nsSwExtendedSubType::SUB_OWN_FMT.
Referenced by sw::DocumentFieldsManager::UpdateExpFieldsImpl().
|
overrideprivatevirtual |
Implements SwField.
Definition at line 201 of file dbfld.cxx.
References GetSubType(), lcl_DBSeparatorConvert(), m_aContent, and nsSwExtendedSubType::SUB_INVISIBLE.
|
static |
Definition at line 257 of file dbfld.cxx.
References SwSbxValue::GetDouble(), SvNumberFormatter::GetNullDate(), SbxValue::IsNumeric(), SvNumberFormatter::IsTextFormat(), SbxValue::PutString(), SAL_MAX_UINT32, and SwValueField::SetValue().
Referenced by Evaluate(), and SwDBManager::FillCalcWithMergeData().
|
inline |
DBName.
Definition at line 106 of file dbfld.hxx.
References GetDBData().
Referenced by Evaluate(), and GetDBData().
|
overridevirtual |
get 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().
|
overridevirtual |
Get name.
get name
Reimplemented from SwField.
Definition at line 343 of file dbfld.cxx.
References GetName(), and SwField::GetTyp().
|
overridevirtual |
Reimplemented from SwField.
Definition at line 348 of file dbfld.cxx.
References m_nSubType.
Referenced by SwXTextField::attach(), ExpandImpl(), PutValue(), and QueryValue().
void SwDBField::InitContent | ( | ) |
Evaluation for header and footer.
Definition at line 178 of file dbfld.cxx.
References SwField::GetTyp(), IsInitialized(), and m_aContent.
Referenced by InitContent(), SwDBFieldType::PutValue(), SwWW8ImplReader::Read_F_DBField(), SwDBField(), and sw::DocumentFieldsManager::UpdateField().
void SwDBField::InitContent | ( | const OUString & | rExpansion | ) |
Definition at line 186 of file dbfld.cxx.
References GetAppCmpStrIgnore(), SwField::GetTyp(), InitContent(), and SetExpansion().
|
inline |
Definition at line 95 of file dbfld.hxx.
Referenced by SwDoc::ConvertFieldsToText(), InitContent(), and sw::DocumentFieldsManager::UpdateField().
|
overridevirtual |
Reimplemented from SwField.
Definition at line 383 of file dbfld.cxx.
References bVisible, FIELD_PROP_BOOL1, FIELD_PROP_BOOL2, FIELD_PROP_FORMAT, FIELD_PROP_PAR1, FIELD_PROP_PAR2, GetSubType(), SwField::GetTyp(), m_aContent, m_sFieldCode, SwTextField::NotifyContentChange(), SwField::SetFormat(), SetSubType(), nsSwExtendedSubType::SUB_INVISIBLE, and nsSwExtendedSubType::SUB_OWN_FMT.
|
overridevirtual |
Reimplemented from SwField.
Definition at line 358 of file dbfld.cxx.
References FIELD_PROP_BOOL1, FIELD_PROP_BOOL2, FIELD_PROP_FORMAT, FIELD_PROP_PAR1, FIELD_PROP_PAR2, SwField::GetFormat(), GetSubType(), m_aContent, m_sFieldCode, nsSwExtendedSubType::SUB_INVISIBLE, and nsSwExtendedSubType::SUB_OWN_FMT.
|
inline |
Current text.
Definition at line 114 of file dbfld.hxx.
References m_aContent.
Referenced by InitContent().
|
inline |
access to the command string
Definition at line 103 of file dbfld.hxx.
Referenced by SwWW8ImplReader::Read_F_DBField().
|
overridevirtual |
Reimplemented from SwField.
Definition at line 353 of file dbfld.cxx.
References m_nSubType, and nType.
Referenced by PutValue().
|
private |
Definition at line 59 of file dbfld.hxx.
Referenced by ChgValue(), Copy(), Evaluate(), ExpandImpl(), InitContent(), PutValue(), QueryValue(), and SetExpansion().
|
private |
Definition at line 64 of file dbfld.hxx.
Referenced by Copy(), and Evaluate().
|
private |
Definition at line 62 of file dbfld.hxx.
Referenced by ChgBodyTextFlag(), and Copy().
|
private |
Definition at line 63 of file dbfld.hxx.
Referenced by ChgValue(), Copy(), and Evaluate().
|
private |
Definition at line 61 of file dbfld.hxx.
Referenced by Copy(), Evaluate(), GetSubType(), and SetSubType().
|
private |
contains Word's field code
Definition at line 60 of file dbfld.hxx.
Referenced by Copy(), PutValue(), and QueryValue().