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

#include <docufld.hxx>

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

Public Member Functions

 SwHiddenTextField (SwHiddenTextFieldType *, bool bConditional, const OUString &rCond, const OUString &rText, bool bHidden, SwFieldTypesEnum nSubType=SwFieldTypesEnum::HiddenText)
 
 SwHiddenTextField (SwHiddenTextFieldType *, const OUString &rCond, const OUString &rTrue, const OUString &rFalse, SwFieldTypesEnum nSubType=SwFieldTypesEnum::HiddenText)
 
virtual OUString GetFieldName () const override
 get name or content More...
 
void Evaluate (SwDoc *)
 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
 
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...
 
std::unique_ptr< SwFieldCopyField () const
 
SwFieldIds Which () const
 ResId. More...
 
SwFieldTypesEnum GetTypeId () 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 GetFormula () const
 
void ChangeFormat (sal_uInt32 n)
 
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
 

Static Public Member Functions

static OUString GetColumnName (const OUString &rName)
 
static OUString GetDBName (const OUString &rName, SwDoc *pDoc)
 
static void ParseIfFieldDefinition (const OUString &aFieldDefinition, OUString &rCondition, OUString &rTrue, OUString &rFalse)
 

Private Member Functions

virtual OUString ExpandImpl (SwRootFrame const *pLayout) const override
 
virtual std::unique_ptr< SwFieldCopy () 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)
 

Detailed Description

Definition at line 291 of file docufld.hxx.

Constructor & Destructor Documentation

SwHiddenTextField::SwHiddenTextField ( SwHiddenTextFieldType pFieldType,
bool  bConditional,
const OUString &  rCond,
const OUString &  rText,
bool  bHidden,
SwFieldTypesEnum  nSubType = SwFieldTypesEnum::HiddenText 
)

Definition at line 1268 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,
const OUString &  rCond,
const OUString &  rTrue,
const OUString &  rFalse,
SwFieldTypesEnum  nSubType = SwFieldTypesEnum::HiddenText 
)

Definition at line 1296 of file docufld.cxx.

References m_aCond, and m_bCanToggle.

Member Function Documentation

std::unique_ptr< SwField > SwHiddenTextField::Copy ( ) const
overrideprivatevirtual
void SwHiddenTextField::Evaluate ( SwDoc pDoc)
OUString SwHiddenTextField::ExpandImpl ( SwRootFrame const *  pLayout) const
overrideprivatevirtual
OUString SwHiddenTextField::GetColumnName ( const OUString &  rName)
static

Definition at line 1510 of file docufld.cxx.

References DB_DELIM, and nPos.

Referenced by Evaluate().

OUString SwHiddenTextField::GetDBName ( const OUString &  rName,
SwDoc pDoc 
)
static

Definition at line 1523 of file docufld.cxx.

References aData, DB_DELIM, SwDoc::GetDBData(), nPos, SwDBData::sCommand, and SwDBData::sDataSource.

Referenced by Evaluate().

OUString SwHiddenTextField::GetFieldName ( ) const
overridevirtual

get name or content

Returns
name or content.

Reimplemented from SwField.

Definition at line 1385 of file docufld.cxx.

References aStr, ConditionalText, SwFieldType::GetTypeStr(), m_aCond, m_aFALSEText, m_aTRUEText, and m_nSubType.

OUString SwHiddenTextField::GetPar1 ( ) const
overridevirtual

Reimplemented from SwField.

Definition at line 1417 of file docufld.cxx.

References m_aCond.

Referenced by sw::DocumentFieldsManager::UpdateExpFieldsImpl().

OUString SwHiddenTextField::GetPar2 ( ) const
overridevirtual

get True/False text

Reimplemented from SwField.

Definition at line 1441 of file docufld.cxx.

References ConditionalText, m_aFALSEText, m_aTRUEText, and m_nSubType.

sal_uInt16 SwHiddenTextField::GetSubType ( ) const
overridevirtual

Reimplemented from SwField.

Definition at line 1450 of file docufld.cxx.

References m_nSubType.

void SwHiddenTextField::ParseIfFieldDefinition ( const OUString &  aFieldDefinition,
OUString &  rCondition,
OUString &  rTrue,
OUString &  rFalse 
)
static

Definition at line 1539 of file docufld.cxx.

References i.

Referenced by SwWW8ImplReader::End_Field().

bool SwHiddenTextField::PutValue ( const css::uno::Any &  rVal,
sal_uInt16  nWhich 
)
overridevirtual
bool SwHiddenTextField::QueryValue ( css::uno::Any &  rVal,
sal_uInt16  nWhich 
) const
overridevirtual
void SwHiddenTextField::SetPar1 ( const OUString &  rStr)
overridevirtual

Condition.

set condition

Reimplemented from SwField.

Definition at line 1411 of file docufld.cxx.

References m_aCond, and m_bCanToggle.

Referenced by PutValue().

void SwHiddenTextField::SetPar2 ( const OUString &  rStr)
overridevirtual

True/False - String.

set True/False text

Reimplemented from SwField.

Definition at line 1423 of file docufld.cxx.

References ConditionalText, m_aFALSEText, m_aTRUEText, m_nSubType, and nPos.

void SwHiddenTextField::SetValue ( bool  bHidden)
inline

Member Data Documentation

OUString SwHiddenTextField::m_aCond
private

Condition.

Definition at line 297 of file docufld.hxx.

Referenced by Copy(), GetFieldName(), GetPar1(), QueryValue(), SetPar1(), and SwHiddenTextField().

OUString SwHiddenTextField::m_aContent
private

Evaluated DB-text.

Definition at line 295 of file docufld.hxx.

Referenced by Copy(), Evaluate(), ExpandImpl(), PutValue(), QueryValue(), and SwHiddenTextField().

OUString SwHiddenTextField::m_aFALSEText
private

If condition false.

Definition at line 294 of file docufld.hxx.

Referenced by Copy(), Evaluate(), ExpandImpl(), GetFieldName(), GetPar2(), PutValue(), QueryValue(), SetPar2(), and SwHiddenTextField().

OUString SwHiddenTextField::m_aTRUEText
private

Text if condition true.

Definition at line 293 of file docufld.hxx.

Referenced by Copy(), Evaluate(), ExpandImpl(), GetFieldName(), GetPar2(), PutValue(), QueryValue(), SetPar2(), and SwHiddenTextField().

bool SwHiddenTextField::m_bCanToggle
private

Can field be toggled alone?

Definition at line 300 of file docufld.hxx.

Referenced by Evaluate(), ExpandImpl(), SetPar1(), and SwHiddenTextField().

bool SwHiddenTextField::m_bIsHidden
private

Is it not visible?

Definition at line 301 of file docufld.hxx.

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

bool SwHiddenTextField::m_bValid
private

Is DB-field evaluated?

Definition at line 302 of file docufld.hxx.

Referenced by Copy(), Evaluate(), ExpandImpl(), PutValue(), and SwHiddenTextField().

SwFieldTypesEnum SwHiddenTextField::m_nSubType
private

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