LibreOffice Module sw (master) 1
|
#include <docufld.hxx>
Public Member Functions | |
SwHiddenTextField (SwHiddenTextFieldType *, bool bConditional, OUString aCond, const OUString &rText, bool bHidden, SwFieldTypesEnum nSubType=SwFieldTypesEnum::HiddenText) | |
SwHiddenTextField (SwHiddenTextFieldType *, OUString aCond, OUString aTrue, OUString aFalse, SwFieldTypesEnum nSubType=SwFieldTypesEnum::HiddenText) | |
virtual OUString | GetFieldName () const override |
get name or content More... | |
void | Evaluate (SwDoc &rDoc) |
get current field value and cache it More... | |
void | SetValue (bool bHidden) |
virtual void | SetPar1 (const OUString &rStr) override |
Condition. More... | |
virtual OUString | GetPar1 () const override |
virtual void | SetPar2 (const OUString &rStr) override |
True/False - String. More... | |
virtual OUString | GetPar2 () const override |
get True/False text More... | |
virtual sal_uInt16 | GetSubType () const override |
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 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 OUString | GetColumnName (const OUString &rName) |
static OUString | GetDBName (std::u16string_view rName, SwDoc &rDoc) |
static void | ParseIfFieldDefinition (std::u16string_view aFieldDefinition, OUString &rCondition, OUString &rTrue, OUString &rFalse) |
Private Member Functions | |
virtual OUString | ExpandImpl (SwRootFrame const *pLayout) const override |
virtual std::unique_ptr< SwField > | Copy () const override |
Private Attributes | |
OUString | m_aTRUEText |
Text if condition true. More... | |
OUString | m_aFALSEText |
If condition false. More... | |
OUString | m_aContent |
Evaluated DB-text. More... | |
OUString | m_aCond |
Condition. More... | |
SwFieldTypesEnum | m_nSubType |
bool | m_bCanToggle: 1 |
Can field be toggled alone? More... | |
bool | m_bIsHidden: 1 |
Is it not visible? More... | |
bool | m_bValid: 1 |
Is DB-field evaluated? More... | |
Additional Inherited Members | |
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) | |
Definition at line 297 of file docufld.hxx.
SwHiddenTextField::SwHiddenTextField | ( | SwHiddenTextFieldType * | pFieldType, |
bool | bConditional, | ||
OUString | aCond, | ||
const OUString & | rText, | ||
bool | bHidden, | ||
SwFieldTypesEnum | nSubType = SwFieldTypesEnum::HiddenText |
||
) |
Definition at line 1284 of file docufld.cxx.
References ConditionalText, m_aContent, m_aFALSEText, m_aTRUEText, m_bValid, m_nSubType, and nPos.
Referenced by Copy().
SwHiddenTextField::SwHiddenTextField | ( | SwHiddenTextFieldType * | pFieldType, |
OUString | aCond, | ||
OUString | aTrue, | ||
OUString | aFalse, | ||
SwFieldTypesEnum | nSubType = SwFieldTypesEnum::HiddenText |
||
) |
Definition at line 1312 of file docufld.cxx.
References m_aCond, and m_bCanToggle.
|
overrideprivatevirtual |
Implements SwField.
Definition at line 1411 of file docufld.cxx.
References SwField::GetFormat(), SwField::GetTyp(), m_aCond, m_aContent, m_aFALSEText, m_aTRUEText, m_bIsHidden, m_bValid, m_nSubType, and SwHiddenTextField().
void SwHiddenTextField::Evaluate | ( | SwDoc & | rDoc | ) |
get current field value and cache it
Definition at line 1344 of file docufld.cxx.
References ConditionalText, DB_DELIM, GetColumnName(), SwDoc::GetDBManager(), GetDBName(), SwField::GetLanguage(), SwDBManager::GetMergeColumnCnt(), comphelper::string::getTokenCount(), SwDBManager::IsDataSourceOpen(), SwDBManager::IsInMerge(), m_aContent, m_aFALSEText, m_aTRUEText, m_bCanToggle, m_bIsHidden, m_bValid, m_nSubType, and ReplacePoint().
Referenced by SwDocUpdateField::MakeFieldList_(), and sw::DocumentFieldsManager::UpdateExpFieldsImpl().
|
overrideprivatevirtual |
Implements SwField.
Definition at line 1323 of file docufld.cxx.
References ConditionalText, SwField::GetTyp(), m_aContent, m_aFALSEText, m_aTRUEText, m_bCanToggle, m_bIsHidden, m_bValid, and m_nSubType.
|
static |
Definition at line 1524 of file docufld.cxx.
References DB_DELIM, and nPos.
Referenced by Evaluate().
|
static |
Definition at line 1537 of file docufld.cxx.
References SL::aData, DB_DELIM, SwDoc::GetDBData(), and nPos.
Referenced by Evaluate().
|
overridevirtual |
get name or content
Reimplemented from SwField.
Definition at line 1399 of file docufld.cxx.
References aStr, ConditionalText, SwFieldType::GetTypeStr(), m_aCond, m_aFALSEText, m_aTRUEText, and m_nSubType.
|
overridevirtual |
Reimplemented from SwField.
Definition at line 1431 of file docufld.cxx.
References m_aCond.
Referenced by sw::DocumentFieldsManager::UpdateExpFieldsImpl().
|
overridevirtual |
get True/False text
Reimplemented from SwField.
Definition at line 1455 of file docufld.cxx.
References ConditionalText, m_aFALSEText, m_aTRUEText, and m_nSubType.
|
overridevirtual |
|
static |
Definition at line 1553 of file docufld.cxx.
References i, and o3tl::trim().
Referenced by SwWW8ImplReader::End_Field().
|
overridevirtual |
Reimplemented from SwField.
Definition at line 1494 of file docufld.cxx.
References FIELD_PROP_BOOL1, FIELD_PROP_PAR1, FIELD_PROP_PAR2, FIELD_PROP_PAR3, FIELD_PROP_PAR4, m_aContent, m_aFALSEText, m_aTRUEText, m_bIsHidden, m_bValid, and SetPar1().
|
overridevirtual |
Reimplemented from SwField.
Definition at line 1469 of file docufld.cxx.
References FIELD_PROP_BOOL1, FIELD_PROP_PAR1, FIELD_PROP_PAR2, FIELD_PROP_PAR3, FIELD_PROP_PAR4, m_aCond, m_aContent, m_aFALSEText, m_aTRUEText, and m_bIsHidden.
|
overridevirtual |
Condition.
set condition
Reimplemented from SwField.
Definition at line 1425 of file docufld.cxx.
References m_aCond, and m_bCanToggle.
Referenced by PutValue().
|
overridevirtual |
True/False - String.
set True/False text
Reimplemented from SwField.
Definition at line 1437 of file docufld.cxx.
References ConditionalText, m_aFALSEText, m_aTRUEText, m_nSubType, and nPos.
|
inline |
Definition at line 331 of file docufld.hxx.
Referenced by SwXTextField::attach(), SwDocUpdateField::MakeFieldList_(), and sw::DocumentFieldsManager::UpdateExpFieldsImpl().
|
private |
Condition.
Definition at line 303 of file docufld.hxx.
Referenced by Copy(), GetFieldName(), GetPar1(), QueryValue(), SetPar1(), and SwHiddenTextField().
|
private |
Evaluated DB-text.
Definition at line 301 of file docufld.hxx.
Referenced by Copy(), Evaluate(), ExpandImpl(), PutValue(), QueryValue(), and SwHiddenTextField().
|
private |
If condition false.
Definition at line 300 of file docufld.hxx.
Referenced by Copy(), Evaluate(), ExpandImpl(), GetFieldName(), GetPar2(), PutValue(), QueryValue(), SetPar2(), and SwHiddenTextField().
|
private |
Text if condition true.
Definition at line 299 of file docufld.hxx.
Referenced by Copy(), Evaluate(), ExpandImpl(), GetFieldName(), GetPar2(), PutValue(), QueryValue(), SetPar2(), and SwHiddenTextField().
|
private |
Can field be toggled alone?
Definition at line 306 of file docufld.hxx.
Referenced by Evaluate(), ExpandImpl(), SetPar1(), and SwHiddenTextField().
|
private |
Is it not visible?
Definition at line 307 of file docufld.hxx.
Referenced by Copy(), Evaluate(), ExpandImpl(), PutValue(), and QueryValue().
|
private |
Is DB-field evaluated?
Definition at line 308 of file docufld.hxx.
Referenced by Copy(), Evaluate(), ExpandImpl(), PutValue(), and SwHiddenTextField().
|
private |
Definition at line 304 of file docufld.hxx.
Referenced by Copy(), Evaluate(), ExpandImpl(), GetFieldName(), GetPar2(), GetSubType(), SetPar2(), and SwHiddenTextField().