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

#include <docufld.hxx>

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

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
 
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...
 
virtual OUString GetFieldName () const
 get name or content More...
 
std::unique_ptr< SwFieldCopyField () 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< 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 297 of file docufld.hxx.

Constructor & Destructor Documentation

◆ SwHiddenTextField() [1/2]

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() [2/2]

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.

Member Function Documentation

◆ Copy()

std::unique_ptr< SwField > SwHiddenTextField::Copy ( ) const
overrideprivatevirtual

◆ Evaluate()

void SwHiddenTextField::Evaluate ( SwDoc rDoc)

◆ ExpandImpl()

OUString SwHiddenTextField::ExpandImpl ( SwRootFrame const *  pLayout) const
overrideprivatevirtual

◆ GetColumnName()

OUString SwHiddenTextField::GetColumnName ( const OUString &  rName)
static

Definition at line 1524 of file docufld.cxx.

References DB_DELIM, and nPos.

Referenced by Evaluate().

◆ GetDBName()

OUString SwHiddenTextField::GetDBName ( std::u16string_view  rName,
SwDoc rDoc 
)
static

Definition at line 1537 of file docufld.cxx.

References SL::aData, DB_DELIM, SwDoc::GetDBData(), and nPos.

Referenced by Evaluate().

◆ GetFieldName()

OUString SwHiddenTextField::GetFieldName ( ) const
overridevirtual

get name or content

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

◆ GetPar1()

OUString SwHiddenTextField::GetPar1 ( ) const
overridevirtual

Reimplemented from SwField.

Definition at line 1431 of file docufld.cxx.

References m_aCond.

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

◆ GetPar2()

OUString SwHiddenTextField::GetPar2 ( ) const
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.

◆ GetSubType()

sal_uInt16 SwHiddenTextField::GetSubType ( ) const
overridevirtual

Reimplemented from SwField.

Definition at line 1464 of file docufld.cxx.

References m_nSubType.

◆ ParseIfFieldDefinition()

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

Definition at line 1553 of file docufld.cxx.

References i, and o3tl::trim().

Referenced by SwWW8ImplReader::End_Field().

◆ PutValue()

bool SwHiddenTextField::PutValue ( const css::uno::Any &  rVal,
sal_uInt16  nWhich 
)
overridevirtual

◆ QueryValue()

bool SwHiddenTextField::QueryValue ( css::uno::Any &  rVal,
sal_uInt16  nWhich 
) const
overridevirtual

◆ SetPar1()

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

Condition.

set condition

Reimplemented from SwField.

Definition at line 1425 of file docufld.cxx.

References m_aCond, and m_bCanToggle.

Referenced by PutValue().

◆ SetPar2()

void SwHiddenTextField::SetPar2 ( const OUString &  rStr)
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.

◆ SetValue()

void SwHiddenTextField::SetValue ( bool  bHidden)
inline

Member Data Documentation

◆ m_aCond

OUString SwHiddenTextField::m_aCond
private

Condition.

Definition at line 303 of file docufld.hxx.

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

◆ m_aContent

OUString SwHiddenTextField::m_aContent
private

Evaluated DB-text.

Definition at line 301 of file docufld.hxx.

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

◆ m_aFALSEText

OUString SwHiddenTextField::m_aFALSEText
private

If condition false.

Definition at line 300 of file docufld.hxx.

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

◆ m_aTRUEText

OUString SwHiddenTextField::m_aTRUEText
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().

◆ m_bCanToggle

bool SwHiddenTextField::m_bCanToggle
private

Can field be toggled alone?

Definition at line 306 of file docufld.hxx.

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

◆ m_bIsHidden

bool SwHiddenTextField::m_bIsHidden
private

Is it not visible?

Definition at line 307 of file docufld.hxx.

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

◆ m_bValid

bool SwHiddenTextField::m_bValid
private

Is DB-field evaluated?

Definition at line 308 of file docufld.hxx.

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

◆ m_nSubType

SwFieldTypesEnum SwHiddenTextField::m_nSubType
private

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