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

#include <fmtfld.hxx>

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

Public Member Functions

 SwFormatField (const SwField &rField)
 Single argument constructors shall be explicit. More...
 
 SwFormatField (const SwFormatField &rAttr)
 
virtual ~SwFormatField () override
 
virtual bool operator== (const SfxPoolItem &) const override
 "Pure virtual methods" of SfxPoolItem. More...
 
virtual SwFormatFieldClone (SfxItemPool *pPool=nullptr) const override
 
virtual bool GetInfo (SfxPoolItem &rInfo) const override
 
void InvalidateField ()
 
const SwFieldGetField () const
 
SwFieldGetField ()
 
void SetField (std::unique_ptr< SwField > pField)
 Sets current field. More...
 
const SwTextFieldGetTextField () const
 
SwTextFieldGetTextField ()
 
void SetTextField (SwTextField &rTextField)
 
void ClearTextField ()
 
void RegisterToFieldType (SwFieldType &)
 
bool IsFieldInDoc () const
 
bool IsProtect () const
 
SAL_DLLPRIVATE unotools::WeakReference< SwXTextField > const & GetXTextField () const
 
SAL_DLLPRIVATE void SetXTextField (rtl::Reference< SwXTextField > const &xTextField)
 
void dumpAsXml (xmlTextWriterPtr pWriter) const override
 
void ForceUpdateTextNode ()
 
void UpdateTextNode (const SfxHint &rHint)
 
void UpdateDocPos (const SwTwips nDocPos)
 
- Public Member Functions inherited from SfxPoolItem
void AddRef (sal_uInt32 n=1) const
 
virtual ~SfxPoolItem ()
 
void SetWhich (sal_uInt16 nId)
 
sal_uInt16 Which () const
 
T & StaticWhichCast (TypedWhichId< T > nId)
 
const T & StaticWhichCast (TypedWhichId< T > nId) const
 
T * DynamicWhichCast (TypedWhichId< T > nId)
 
const T * DynamicWhichCast (TypedWhichId< T > nId) const
 
virtual bool operator== (const SfxPoolItem &) const=0
 
bool operator!= (const SfxPoolItem &rItem) const
 
virtual bool operator< (const SfxPoolItem &) const
 
virtual bool IsSortable () const
 
virtual bool HasLookup () const
 
virtual lookup_iterator Lookup (lookup_iterator, lookup_iterator end) const
 
virtual bool GetPresentation (SfxItemPresentation ePresentation, MapUnit eCoreMetric, MapUnit ePresentationMetric, OUString &rText, const IntlWrapper &rIntlWrapper) const
 
virtual void ScaleMetrics (tools::Long lMult, tools::Long lDiv)
 
virtual bool HasMetrics () const
 
virtual bool QueryValue (css::uno::Any &rVal, sal_uInt8 nMemberId=0) const
 
virtual bool PutValue (const css::uno::Any &rVal, sal_uInt8 nMemberId)
 
virtual SfxPoolItemClone (SfxItemPool *pPool=nullptr) const=0
 
std::unique_ptr< SfxPoolItemCloneSetWhich (sal_uInt16 nNewWhich) const
 
std::unique_ptr< T > CloneSetWhich (TypedWhichId< T > nId) const
 
sal_uInt32 GetRefCount () const
 
SfxItemKind GetKind () const
 
virtual void dumpAsXml (xmlTextWriterPtr pWriter) const
 
virtual boost::property_tree::ptree dumpAsJSON () const
 
virtual bool IsVoidItem () const
 
- Public Member Functions inherited from SfxBroadcaster
 SfxBroadcaster ()
 
 SfxBroadcaster (const SfxBroadcaster &rBC)
 
virtual ~SfxBroadcaster () COVERITY_NOEXCEPT_FALSE
 
void Broadcast (const SfxHint &rHint)
 
bool HasListeners () const
 
size_t GetListenerCount () const
 
void ForAllListeners (std::function< bool(SfxListener *)> f) const
 

Private Member Functions

 SwFormatField (sal_uInt16 nWhich)
 
virtual void SwClientNotify (const SwModify &rModify, const SfxHint &rHint) override
 

Private Attributes

unotools::WeakReference< SwXTextFieldm_wXTextField
 
std::unique_ptr< SwFieldmpField
 
SwTextFieldmpTextField
 

Friends

void InitCore ()
 

Additional Inherited Members

- Public Types inherited from SfxPoolItem
typedef std::vector< SfxPoolItem * >::const_iterator lookup_iterator
 
- Protected Member Functions inherited from SfxPoolItem
 SfxPoolItem (sal_uInt16 nWhich=0)
 
 SfxPoolItem (const SfxPoolItem &rCopy)
 
- Protected Member Functions inherited from SfxBroadcaster
void Forward (SfxBroadcaster &rBC, const SfxHint &rHint)
 

Detailed Description

Definition at line 99 of file fmtfld.hxx.

Constructor & Destructor Documentation

◆ SwFormatField() [1/3]

SwFormatField::SwFormatField ( sal_uInt16  nWhich)
private

Definition at line 48 of file atrfld.cxx.

Referenced by Clone().

◆ SwFormatField() [2/3]

SwFormatField::SwFormatField ( const SwField rField)
explicit

◆ SwFormatField() [3/3]

SwFormatField::SwFormatField ( const SwFormatField rAttr)

◆ ~SwFormatField()

SwFormatField::~SwFormatField ( )
overridevirtual

Member Function Documentation

◆ ClearTextField()

void SwFormatField::ClearTextField ( )

Definition at line 195 of file atrfld.cxx.

References mpTextField.

Referenced by SwTextField::~SwTextField().

◆ Clone()

SwFormatField * SwFormatField::Clone ( SfxItemPool pPool = nullptr) const
overridevirtual

Implements SfxPoolItem.

Definition at line 211 of file atrfld.cxx.

References SwFormatField().

Referenced by SwWW8FltRefStack::RefToVar().

◆ dumpAsXml()

void SwFormatField::dumpAsXml ( xmlTextWriterPtr  pWriter) const
overridevirtual

Reimplemented from SfxPoolItem.

Definition at line 474 of file atrfld.cxx.

References SfxPoolItem::dumpAsXml(), mpField, and mpTextField.

Referenced by SwTextAttr::dumpAsXml().

◆ ForceUpdateTextNode()

void SwFormatField::ForceUpdateTextNode ( )

◆ GetField() [1/2]

SwField * SwFormatField::GetField ( )
inline

Definition at line 135 of file fmtfld.hxx.

◆ GetField() [2/2]

const SwField * SwFormatField::GetField ( ) const
inline

Definition at line 131 of file fmtfld.hxx.

Referenced by SwXTextField::attach(), SwTaggedPDFHelper::BeginInlineStructureElements(), SwpHints::CalcFlags(), SwpHints::CalcHiddenParaField(), SwDoc::ChangeDBFields(), SwRefPageGetField::ChangeExpansion(), SwNodes::ChgNode(), SwDoc::ConvertFieldsToText(), SwTextField::CopyTextField(), sw::annotation::SwAnnotationWin::CountFollowing(), SwpHints::DeleteAtPos(), SwWrtShell::DelRight(), SwTextNode::DestroyAttr(), SwUndoFieldFromDoc::DoImpl(), SwTOXAuthority::equivalent(), SwTextField::ExpandTextField(), sw::DocumentFieldsManager::FieldsToExpand(), SwTOXAuthority::FillText(), ForceUpdateTextNode(), AttributeOutputBase::GenerateBookmarksForSequenceField(), SwDoc::GetAllUsedDB(), SwTextAnnotationField::GetAnnotationMark(), SwDocUpdateField::GetBodyNode(), SwCursorShell::GetContentAtPos(), SwInputFieldList::GetField(), SwCursorShell::GetFieldAtCursor(), sw::DocumentFieldsManager::GetFieldAtPos(), SwTextInputField::GetFieldContent(), SwXTextField::Impl::GetFieldType(), SwAccessibleParagraph::GetFieldTypeNameAtIndex(), SwTOXAuthority::GetLevel(), SwTextNode::GetMinMaxSize(), SwPageFrame::GetModelPositionForViewPoint(), sw::annotation::SwAnnotationWin::GetParaId(), SwCursorShell::GetPostItFieldAtCursor(), sw::DocumentFieldsManager::GetRecordsPerDocument(), SwTextFrame::GetScalingOfSelectedText(), SwAuthorityFieldType::GetSequencePos(), SwTOXAuthority::GetText(), SwTableBox::GetValue(), SwPaM::HasReadonlySel(), SwHandleAnchorNodeChg::ImplDestroy(), sw::mark::AnnotationMark::InitDoc(), SwDocUpdateField::InsDelFieldInFieldLst(), SwHTMLParser::InsertComment(), SwTextNode::InsertHint(), SwWW8FltRefStack::IsFootnoteEdnBkmField(), SwTextFrame::IsHiddenNow(), sw::annotation::SwAnnotationWin::IsResolved(), SwTableBox::IsValidNumTextNd(), lcl_CopyHint(), lcl_ExportHints(), lcl_GetText(), lcl_IsNoEndTextAttrAtPos(), lcl_MakeFieldLst(), lcl_SelectByContentTypeAndAddress(), SwDocUpdateField::MakeFieldList_(), MakeTextAttr(), SwEditWin::MouseButtonDown(), SwTextFormatter::NewFieldPortion(), SwPostItMgr::Notify(), OutHTML_SwFormatField(), OutHTML_SwTextNode(), SwFEShell::RequestObjectResize(), SwFltControlStack::SetAttrInDoc(), SwWW8FltRefStack::SetAttrInDoc(), sw::annotation::SwAnnotationWin::SetPostItText(), sw::annotation::SwAnnotationWin::SetResolved(), SwTOXAuthority::sort_lt(), SwClientNotify(), AttributeOutputBase::TextField(), SwXTextField::TransmuteLeadToInputField(), SwpHints::TryInsertHint(), SwUndoFieldFromDoc::UndoImpl(), sw::DocumentFieldsManager::UpdateExpFieldsImpl(), sw::DocumentFieldsManager::UpdateField(), SwRefPageGetFieldType::UpdateField(), SwTextInputField::UpdateFieldContent(), SwEditShell::UpdateOneField(), and SwEditWin::UpdatePointer().

◆ GetInfo()

bool SwFormatField::GetInfo ( SfxPoolItem rInfo) const
overridevirtual

◆ GetTextField() [1/2]

SwTextField * SwFormatField::GetTextField ( )
inline

Definition at line 153 of file fmtfld.hxx.

◆ GetTextField() [2/2]

const SwTextField * SwFormatField::GetTextField ( ) const
inline

◆ GetXTextField()

SAL_DLLPRIVATE unotools::WeakReference< SwXTextField > const & SwFormatField::GetXTextField ( ) const
inline

◆ InvalidateField()

void SwFormatField::InvalidateField ( )

Definition at line 216 of file atrfld.cxx.

References RES_REMOVE_UNO_OBJECT().

◆ IsFieldInDoc()

bool SwFormatField::IsFieldInDoc ( ) const

◆ IsProtect()

bool SwFormatField::IsProtect ( ) const

◆ operator==()

bool SwFormatField::operator== ( const SfxPoolItem rAttr) const
overridevirtual

"Pure virtual methods" of SfxPoolItem.

Implements SfxPoolItem.

Definition at line 200 of file atrfld.cxx.

References mpField.

◆ RegisterToFieldType()

void SwFormatField::RegisterToFieldType ( SwFieldType rType)

Definition at line 170 of file atrfld.cxx.

Referenced by SwDoc::ChangeDBFields(), and SwpHints::TryInsertHint().

◆ SetField()

void SwFormatField::SetField ( std::unique_ptr< SwField pField)

Sets current field.

Parameters
pFieldnew field
Attention: \n The current field will be destroyed before setting the new field.

Definition at line 175 of file atrfld.cxx.

References SfxBroadcaster::Broadcast(), CHANGED, Input, mpField, and SetExp.

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

◆ SetTextField()

void SwFormatField::SetTextField ( SwTextField rTextField)

Definition at line 190 of file atrfld.cxx.

References mpTextField.

Referenced by SwTextField::SwTextField().

◆ SetXTextField()

void SwFormatField::SetXTextField ( rtl::Reference< SwXTextField > const &  xTextField)

Definition at line 798 of file atrfld.cxx.

References m_wXTextField.

◆ SwClientNotify()

void SwFormatField::SwClientNotify ( const SwModify rModify,
const SfxHint rHint 
)
overrideprivatevirtual

◆ UpdateDocPos()

void SwFormatField::UpdateDocPos ( const SwTwips  nDocPos)

◆ UpdateTextNode()

void SwFormatField::UpdateTextNode ( const SfxHint rHint)

Friends And Related Function Documentation

◆ InitCore

void InitCore ( )
friend

Definition at line 459 of file init.cxx.

Member Data Documentation

◆ m_wXTextField

unotools::WeakReference<SwXTextField> SwFormatField::m_wXTextField
private

Definition at line 107 of file fmtfld.hxx.

Referenced by SetXTextField(), and UpdateTextNode().

◆ mpField

std::unique_ptr<SwField> SwFormatField::mpField
private

◆ mpTextField

SwTextField* SwFormatField::mpTextField
private

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