LibreOffice Module sw (master) 1
Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | List of all members
SwField Class Referenceabstract

Base class of all fields. More...

#include <fldbas.hxx>

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

Public Member Functions

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)
 

Protected Member Functions

void SetFormat (sal_uInt32 const nSet)
 
 SwField (SwFieldType *pTyp, sal_uInt32 nFormat=0, LanguageType nLang=LANGUAGE_SYSTEM, bool m_bUseFieldValueCache=true)
 

Private Member Functions

virtual OUString ExpandImpl (SwRootFrame const *pLayout) const =0
 
virtual std::unique_ptr< SwFieldCopy () const =0
 

Private Attributes

OUString m_Cache
 Cached expansion (for clipboard). More...
 
SwFieldTypem_pType
 
sal_uInt32 m_nFormat
 
LanguageType m_nLang
 this can be either SvxNumType or SwChapterFormat depending on the subtype More...
 
bool m_bUseFieldValueCache
 
bool m_bIsAutomaticLanguage
 control the usage of the cached field value More...
 
OUString m_aTitle
 Used for tooltip purposes when it's not-empty. More...
 

Detailed Description

Base class of all fields.

Type of field is queried via Which. Expanded content of field is queried via ExpandField().

Definition at line 295 of file fldbas.hxx.

Constructor & Destructor Documentation

◆ SwField() [1/3]

SwField::SwField ( SwFieldType pTyp,
sal_uInt32  nFormat = 0,
LanguageType  nLang = LANGUAGE_SYSTEM,
bool  m_bUseFieldValueCache = true 
)
protected

Definition at line 242 of file fldbas.cxx.

References m_nFormat, and m_pType.

◆ ~SwField()

SwField::~SwField ( )
virtual

Definition at line 256 of file fldbas.cxx.

◆ SwField() [2/3]

SwField::SwField ( SwField const &  )
default

◆ SwField() [3/3]

SwField::SwField ( SwField &&  )
default

Member Function Documentation

◆ ChangeFormat()

void SwField::ChangeFormat ( sal_uInt32  n)

Definition at line 454 of file fldbas.cxx.

References m_nFormat.

Referenced by SwDateTimeField::PutValue(), and SwDateTimeField::SwDateTimeField().

◆ ChgTyp()

SwFieldType * SwField::ChgTyp ( SwFieldType pNewType)
virtual

Set new type (used for copying among documents).

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 in SwAuthorityField, SwDBField, and SwValueField.

Definition at line 415 of file fldbas.cxx.

References m_pType, and SwFieldType::Which().

Referenced by SwDoc::ChangeDBFields(), SwAuthorityField::ChgTyp(), SwValueField::ChgTyp(), SwTextField::CopyTextField(), and SwpHints::TryInsertHint().

◆ Copy()

virtual std::unique_ptr< SwField > SwField::Copy ( ) const
privatepure virtual

◆ CopyField()

std::unique_ptr< SwField > SwField::CopyField ( ) const

◆ dumpAsXml()

void SwField::dumpAsXml ( xmlTextWriterPtr  pWriter) const
virtual

◆ ExpandField()

OUString SwField::ExpandField ( bool  bCached,
SwRootFrame const *  pLayout 
) const

◆ ExpandImpl()

virtual OUString SwField::ExpandImpl ( SwRootFrame const *  pLayout) const
privatepure virtual

◆ GetDescription()

OUString SwField::GetDescription ( ) const
virtual

Reimplemented in SwAuthorityField, SwPostItField, SwScriptField, and SwGetRefField.

Definition at line 909 of file fldbas.cxx.

References SwResId().

Referenced by SwContentType::FillMemberList(), and SwWrtShell::InsertField2().

◆ GetFieldName()

OUString SwField::GetFieldName ( ) const
virtual

◆ GetFormat()

sal_uInt32 SwField::GetFormat ( ) const
inline

Query parameters for dialog and for BASIC.

Definition at line 407 of file fldbas.hxx.

References m_nFormat.

Referenced by SwGetExpField::ChangeExpansion(), SwRefPageGetField::ChangeExpansion(), SwDocStatField::ChangeExpansion(), SwValueField::ChgTyp(), SwDBField::ChgValue(), SwWrtShell::ClickToField(), SwChapterField::Copy(), SwDBField::Copy(), SwDBNameField::Copy(), SwDBSetNumberField::Copy(), SwPageNumberField::Copy(), SwAuthorField::Copy(), SwFileNameField::Copy(), SwTemplNameField::Copy(), SwDocStatField::Copy(), SwHiddenTextField::Copy(), SwDocInfoField::Copy(), SwExtUserField::Copy(), SwRefPageGetField::Copy(), SwJumpEditField::Copy(), SwGetExpField::Copy(), SwSetExpField::Copy(), SwInputField::Copy(), SwTableField::Copy(), SwDateTimeField::Copy(), SwGetRefField::Copy(), SwUserField::Copy(), SwDBField::Evaluate(), SwTextShell::ExecField(), SwTextShell::Execute(), SwChapterField::ExpandImpl(), SwDBSetNumberField::ExpandImpl(), SwPageNumberField::ExpandImpl(), SwAuthorField::ExpandImpl(), SwFileNameField::ExpandImpl(), SwTemplNameField::ExpandImpl(), SwDocStatField::ExpandImpl(), SwDocInfoField::ExpandImpl(), SwDateTimeField::ExpandImpl(), SwUserField::ExpandImpl(), SwFieldVarPage::FillFormatLB(), AttributeOutputBase::GenerateBookmarksForSequenceField(), SwFieldMgr::GetCurField(), SwFormulaField::GetExpandedFormula(), SwAccessibleParagraph::GetFieldTypeNameAtIndex(), SwFormulaField::GetInputOrDateTime(), MSWordExportBase::GetNumberFormat(), AttributeOutputBase::GetNumberPara(), SwUserField::GetPar2(), IsFixed(), SwJavaEditDialog::IsUpdate(), SwTextFormatter::NewFieldPortion(), OutHTML_SwField(), SwAuthorField::PutValue(), SwFileNameField::PutValue(), SwExtUserField::PutValue(), SwDateTimeField::QueryValue(), SwChapterField::QueryValue(), SwDBField::QueryValue(), SwDBSetNumberField::QueryValue(), SwPageNumberField::QueryValue(), SwAuthorField::QueryValue(), SwFileNameField::QueryValue(), SwTemplNameField::QueryValue(), SwDocStatField::QueryValue(), SwDocInfoField::QueryValue(), SwRefPageGetField::QueryValue(), SwJumpEditField::QueryValue(), SwGetExpField::QueryValue(), SwSetExpField::QueryValue(), SwTableField::QueryValue(), SwGetRefField::QueryValue(), SwUserField::QueryValue(), SwFieldDBPage::Reset(), SwFieldDokInfPage::Reset(), SwFieldDokPage::Reset(), SwFieldFuncPage::Reset(), SwFieldVarPage::Reset(), SwFormulaField::SetExpandedFormula(), sw::DocumentFieldsManager::SetFixFields(), SwFormulaField::SetFormula(), SwDocInfoField::SetLanguage(), SwValueField::SetLanguage(), SwUserField::SetPar2(), SwGetExpField::SetValue(), SwSetExpField::SetValue(), SwTableField::SetValue(), SwAuthorField::SwAuthorField(), SwFileNameField::SwFileNameField(), AttributeOutputBase::TextField(), SwFieldDBPage::TypeHdl(), SwXTextField::update(), SwGetRefField::UpdateField(), and SwRefPageGetFieldType::UpdateField().

◆ GetFormula()

OUString SwField::GetFormula ( ) const
virtual

Reimplemented in SwFormulaField.

Definition at line 344 of file fldbas.cxx.

References GetPar2().

Referenced by SwDoc::ChangeDBFields(), and SwDoc::GetAllUsedDB().

◆ GetLanguage()

LanguageType SwField::GetLanguage ( ) const
inline

◆ GetPar1()

OUString SwField::GetPar1 ( ) const
virtual

◆ GetPar2()

OUString SwField::GetPar2 ( ) const
virtual

◆ GetSubType()

sal_uInt16 SwField::GetSubType ( ) const
virtual

◆ GetTitle()

const OUString & SwField::GetTitle ( ) const
inline

Definition at line 398 of file fldbas.hxx.

Referenced by SwUserField::Copy(), and SwEditWin::RequestHelp().

◆ GetTyp()

SwFieldType * SwField::GetTyp ( ) const
inline

Definition at line 402 of file fldbas.hxx.

References m_pType.

Referenced by SwInputField::applyFieldContent(), SwpHints::CalcFlags(), SwpHints::CalcHiddenParaField(), SwDoc::ChangeDBFields(), SwGetExpField::ChangeExpansion(), SwRefPageGetField::ChangeExpansion(), SwDocStatField::ChangeExpansion(), SwNodes::ChgNode(), SwAuthorityField::ChgTyp(), SwValueField::ChgTyp(), SwDBField::ChgValue(), SwWrtShell::ClickToField(), SwAuthorityField::ConditionalExpandAuthIdentifier(), SwDoc::ConvertFieldsToText(), SwGetRefField::ConvertProgrammaticToUIName(), SwAuthorityField::Copy(), SwChapterField::Copy(), SwDBField::Copy(), SwDBNextSetField::Copy(), SwDBNumSetField::Copy(), SwDBNameField::Copy(), SwDBSetNumberField::Copy(), SwDDEField::Copy(), SwPageNumberField::Copy(), SwAuthorField::Copy(), SwFileNameField::Copy(), SwTemplNameField::Copy(), SwDocStatField::Copy(), SwHiddenTextField::Copy(), SwHiddenParaField::Copy(), SwMacroField::Copy(), SwPostItField::Copy(), SwDocInfoField::Copy(), SwExtUserField::Copy(), SwRefPageSetField::Copy(), SwRefPageGetField::Copy(), SwJumpEditField::Copy(), SwScriptField::Copy(), SwCombinedCharField::Copy(), SwGetExpField::Copy(), SwSetExpField::Copy(), SwInputField::Copy(), SwTableField::Copy(), SwDateTimeField::Copy(), SwGetRefField::Copy(), SwUserField::Copy(), SwTextField::CopyTextField(), SwpHints::DeleteAtPos(), SwTextNode::DestroyAttr(), SwUndoFieldFromDoc::DoImpl(), sw::DropDownFieldDialog::DropDownFieldDialog(), SwDBField::Evaluate(), SwTextShell::ExecField(), SwTextShell::Execute(), SwAuthorityField::ExpandCitation(), SwDBNameField::ExpandImpl(), SwDDEField::ExpandImpl(), SwPageNumberField::ExpandImpl(), SwFileNameField::ExpandImpl(), SwTemplNameField::ExpandImpl(), SwDocStatField::ExpandImpl(), SwHiddenTextField::ExpandImpl(), SwDocInfoField::ExpandImpl(), SwSetExpField::ExpandImpl(), SwInputField::ExpandImpl(), SwUserField::ExpandImpl(), SwTextField::ExpandTextField(), SwDoc::FieldHidesPara(), sw::DocumentFieldsManager::FieldsToExpand(), SwTOXAuthority::FillText(), AttributeOutputBase::GenerateBookmarksForSequenceField(), SwAuthorityField::GetAbsoluteURL(), SwDoc::GetAllUsedDB(), SwAuthorityField::GetAuthority(), SwJumpEditField::GetCharFormat(), SwCursorShell::GetCurField(), SwFormulaField::GetExpandedFormula(), GetFieldName(), SwDBField::GetFieldName(), SwMacroField::GetFieldName(), SwSetExpField::GetFieldName(), SwInputField::GetFieldName(), SwTableField::GetFieldName(), SwGetRefField::GetFieldName(), SwUserField::GetFieldName(), SwXTextField::Impl::GetFieldType(), SwAccessibleParagraph::GetFieldTypeNameAtIndex(), SwTextShell::GetIdxState(), SwFormulaField::GetInputOrDateTime(), SwTableField::GetNodeOfFormula(), SwDBField::GetPar1(), SwDDEField::GetPar1(), SwSetExpField::GetPar1(), SwUserField::GetPar1(), SwDDEField::GetPar2(), SwSetExpField::GetPar2(), SwUserField::GetPar2(), sw::DocumentFieldsManager::GetRecordsPerDocument(), SwGetRefField::GetReferencedTextNode(), SwAuthorityField::GetRelativeURI(), SwTextShell::GetState(), SwSetExpField::GetSubType(), SwUserField::GetSubType(), SwTOXAuthority::GetText(), SwUserField::GetValue(), SwTableBox::GetValue(), SwFieldMgr::GoNextPrev(), SwPaM::HasReadonlySel(), IMPL_LINK(), SwHandleAnchorNodeChg::ImplDestroy(), SwDBField::InitContent(), SwAuthorMarkPane::InitControls(), SwDocUpdateField::InsDelFieldInFieldLst(), SwHTMLParser::InsertComment(), SwWrtShell::InsertField2(), SwTextNode::InsertHint(), SwWrtShell::InsertPostIt(), SwTextFrame::IsHiddenNow(), SwSetExpField::IsSequenceField(), lcl_CopyHint(), lcl_FindInputField(), SwXFieldMaster::LocalizeFormula(), SwDocUpdateField::MakeFieldList_(), SwTextFormatter::NewFieldPortion(), OutHTML_SwField(), OutHTML_SwFormatField(), WW8Export::OutputField(), SwDBField::PutValue(), SwSetExpField::PutValue(), SwAuthorityField::PutValue(), SwPostItField::QueryValue(), SwAuthorityField::QueryValue(), DocxAttributeOutput::RefField(), SwFormulaField::SetExpandedFormula(), sw::DocumentFieldsManager::SetFixFields(), SwValueField::SetLanguage(), SwAuthorityField::SetPar1(), SwDDEField::SetPar2(), SwSetExpField::SetPar2(), SwUserField::SetPar2(), SwUserField::SetSubType(), SwSetExpField::SetSubType(), SwGetExpField::SetValue(), SwSetExpField::SetValue(), SwTableField::SetValue(), SwUserField::SetValue(), SwTOXAuthority::sort_lt(), SwTextShell::StateField(), SwFieldVarPage::SubTypeHdl(), SwDBField::SwDBField(), SwDocInfoField::SwDocInfoField(), SwFieldInputDlg::SwFieldInputDlg(), SwFileNameField::SwFileNameField(), SwFormatField::SwFormatField(), SwJavaEditDialog::SwJavaEditDialog(), AttributeOutputBase::TextField(), SwpHints::TryInsertHint(), SwFieldDBPage::TypeHdl(), SwXTextField::update(), sw::DocumentFieldsManager::UpdateExpFieldsImpl(), SwGetRefField::UpdateField(), sw::DocumentFieldsManager::UpdateField(), SwWrtShell::UpdateInputFields(), SwEditShell::UpdateOneField(), RtfAttributeOutput::WriteExpand(), SwAuthorityField::~SwAuthorityField(), SwDBField::~SwDBField(), and SwDDEField::~SwDDEField().

◆ GetTypeId()

SwFieldTypesEnum SwField::GetTypeId ( ) const

◆ HasClickHdl()

bool SwField::HasClickHdl ( ) const

Does the field possess an action on its ClickHandler? (e.g. INetFields, ...).

Does the field have an action on a ClickHandler? (E.g. INetFields,...)

Definition at line 425 of file fldbas.cxx.

References Dropdown, GetRef, Input, Internet, JumpEdit, m_pType, Macro, SetExp, TableOfAuthorities, and SwFieldType::Which().

Referenced by SwCursorShell::GetContentAtPos().

◆ IsAutomaticLanguage()

bool SwField::IsAutomaticLanguage ( ) const
inline

◆ IsClickable()

bool SwField::IsClickable ( ) const

Is this field clickable?

Definition at line 914 of file fldbas.cxx.

References Dropdown, GetRef, Input, JumpEdit, Macro, SetExp, TableOfAuthorities, and Which().

Referenced by SwWrtShell::ClickToField(), and SwPageFrame::GetModelPositionForViewPoint().

◆ IsFixed()

bool SwField::IsFixed ( ) const

◆ operator=() [1/2]

SwField & SwField::operator= ( SwField &&  )
default

◆ operator=() [2/2]

SwField & SwField::operator= ( SwField const &  )
default

◆ PutValue()

bool SwField::PutValue ( const css::uno::Any &  rVal,
sal_uInt16  nWhichId 
)
virtual

◆ QueryValue()

bool SwField::QueryValue ( css::uno::Any &  rVal,
sal_uInt16  nWhichId 
) const
virtual

◆ SetAutomaticLanguage()

void SwField::SetAutomaticLanguage ( bool const  bSet)
inline

Definition at line 390 of file fldbas.hxx.

Referenced by SwWW8ImplReader::ForceFieldLanguage().

◆ SetFormat()

void SwField::SetFormat ( sal_uInt32 const  nSet)
inlineprotected

◆ SetLanguage()

void SwField::SetLanguage ( LanguageType  nLng)
virtual

◆ SetPar1()

void SwField::SetPar1 ( const OUString &  rStr)
virtual

◆ SetPar2()

void SwField::SetPar2 ( const OUString &  rStr)
virtual

◆ SetSubType()

void SwField::SetSubType ( sal_uInt16  )
virtual

◆ SetTitle()

void SwField::SetTitle ( const OUString &  rTitle)
inline

Definition at line 399 of file fldbas.hxx.

◆ Which()

SwFieldIds SwField::Which ( ) const

Member Data Documentation

◆ m_aTitle

OUString SwField::m_aTitle
private

Used for tooltip purposes when it's not-empty.

Definition at line 305 of file fldbas.hxx.

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

◆ m_bIsAutomaticLanguage

bool SwField::m_bIsAutomaticLanguage
private

control the usage of the cached field value

Definition at line 303 of file fldbas.hxx.

Referenced by PutValue(), and QueryValue().

◆ m_bUseFieldValueCache

bool SwField::m_bUseFieldValueCache
private

Definition at line 302 of file fldbas.hxx.

Referenced by CopyField(), and ExpandField().

◆ m_Cache

OUString SwField::m_Cache
mutableprivate

Cached expansion (for clipboard).

Definition at line 298 of file fldbas.hxx.

Referenced by CopyField(), and ExpandField().

◆ m_nFormat

sal_uInt32 SwField::m_nFormat
private

Definition at line 300 of file fldbas.hxx.

Referenced by ChangeFormat(), dumpAsXml(), and GetFormat().

◆ m_nLang

LanguageType SwField::m_nLang
private

this can be either SvxNumType or SwChapterFormat depending on the subtype

Always change via SetLanguage!

Definition at line 301 of file fldbas.hxx.

Referenced by dumpAsXml(), GetLanguage(), and SetLanguage().

◆ m_pType

SwFieldType* SwField::m_pType
private

Definition at line 299 of file fldbas.hxx.

Referenced by ChgTyp(), GetTyp(), GetTypeId(), HasClickHdl(), IsFixed(), SwField(), and Which().


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