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

SwFormatMeta is a pool item subclass that owns a Meta. More...

#include <fmtmeta.hxx>

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

Public Member Functions

 SwFormatMeta (std::shared_ptr< ::sw::Meta > i_pMeta, const sal_uInt16 i_nWhich)
 takes ownership More...
 
virtual ~SwFormatMeta () override
 
virtual bool operator== (const SfxPoolItem &) const override
 SfxPoolItem. More...
 
virtual SwFormatMetaClone (SfxItemPool *pPool=nullptr) const override
 
void NotifyChangeTextNode (SwTextNode *const pTextNode)
 notify clients registered at m_pMeta that this meta is being (re-)moved More...
 
::sw::MetaGetMeta ()
 
- 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
 

Static Public Member Functions

static SwFormatMetaCreatePoolDefault (const sal_uInt16 i_nWhich)
 

Private Member Functions

SwTextMetaGetTextAttr ()
 
void SetTextAttr (SwTextMeta *const i_pTextAttr)
 
void DoCopy (::sw::MetaFieldManager &i_rTargetDocManager, SwTextNode &i_rTargetTextNode)
 this method must be called when the hint is actually copied More...
 
 SwFormatMeta (const sal_uInt16 i_nWhich)
 

Private Attributes

std::shared_ptr< ::sw::Metam_pMeta
 
SwTextMetam_pTextAttr
 

Friends

class SwTextMeta
 needs SetTextAttr, DoCopy More...
 
class ::sw::Meta
 needs m_pTextAttr More...
 

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)
 

Detailed Description

SwFormatMeta is a pool item subclass that owns a Meta.

Definition at line 91 of file fmtmeta.hxx.

Constructor & Destructor Documentation

◆ SwFormatMeta() [1/2]

SwFormatMeta::SwFormatMeta ( const sal_uInt16  i_nWhich)
explicitprivate

Definition at line 545 of file fmtatr2.cxx.

References RES_TXTATR_META(), and RES_TXTATR_METAFIELD().

Referenced by Clone(), and CreatePoolDefault().

◆ SwFormatMeta() [2/2]

SwFormatMeta::SwFormatMeta ( std::shared_ptr< ::sw::Meta i_pMeta,
const sal_uInt16  i_nWhich 
)
explicit

takes ownership

Definition at line 554 of file fmtatr2.cxx.

References m_pMeta, RES_TXTATR_META(), and RES_TXTATR_METAFIELD().

◆ ~SwFormatMeta()

SwFormatMeta::~SwFormatMeta ( )
overridevirtual

Definition at line 566 of file fmtatr2.cxx.

References m_pMeta, and NotifyChangeTextNode().

Member Function Documentation

◆ Clone()

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

Implements SfxPoolItem.

Definition at line 581 of file fmtatr2.cxx.

References m_pMeta, SwFormatMeta(), and SfxPoolItem::Which().

◆ CreatePoolDefault()

SwFormatMeta * SwFormatMeta::CreatePoolDefault ( const sal_uInt16  i_nWhich)
static

Definition at line 540 of file fmtatr2.cxx.

References SwFormatMeta().

◆ DoCopy()

void SwFormatMeta::DoCopy ( ::sw::MetaFieldManager i_rTargetDocManager,
SwTextNode i_rTargetTextNode 
)
private

this method must be called when the hint is actually copied

Definition at line 624 of file fmtatr2.cxx.

References sw::MetaField::IsFixedLanguage(), sw::MetaField::m_nNumberFormat, m_pMeta, sw::MetaFieldManager::makeMetaField(), RES_TXTATR_META(), and SfxPoolItem::Which().

Referenced by SwTextMeta::CreateTextMeta().

◆ GetMeta()

::sw::Meta * SwFormatMeta::GetMeta ( )
inline

◆ GetTextAttr()

SwTextMeta * SwFormatMeta::GetTextAttr ( )
inlineprivate

Definition at line 101 of file fmtmeta.hxx.

References m_pTextAttr.

Referenced by SwTextMeta::ChgTextNode(), sw::Meta::GetTextAttr(), and SwTextMeta::~SwTextMeta().

◆ NotifyChangeTextNode()

void SwFormatMeta::NotifyChangeTextNode ( SwTextNode *const  pTextNode)

notify clients registered at m_pMeta that this meta is being (re-)moved

Definition at line 611 of file fmtatr2.cxx.

References m_pMeta.

Referenced by SwTextMeta::ChgTextNode(), SetTextAttr(), and ~SwFormatMeta().

◆ operator==()

bool SwFormatMeta::operator== ( const SfxPoolItem i_rOther) const
overridevirtual

SfxPoolItem.

Implements SfxPoolItem.

Definition at line 575 of file fmtatr2.cxx.

References m_pMeta, and SfxPoolItem::operator==().

◆ SetTextAttr()

void SwFormatMeta::SetTextAttr ( SwTextMeta *const  i_pTextAttr)
private

Definition at line 588 of file fmtatr2.cxx.

References m_pMeta, m_pTextAttr, and NotifyChangeTextNode().

Referenced by SwTextMeta::SwTextMeta(), and SwTextMeta::~SwTextMeta().

Friends And Related Function Documentation

◆ ::sw::Meta

friend class ::sw::Meta
friend

needs m_pTextAttr

Definition at line 96 of file fmtmeta.hxx.

◆ SwTextMeta

friend class SwTextMeta
friend

needs SetTextAttr, DoCopy

Definition at line 95 of file fmtmeta.hxx.

Member Data Documentation

◆ m_pMeta

std::shared_ptr< ::sw::Meta > SwFormatMeta::m_pMeta
private

◆ m_pTextAttr

SwTextMeta* SwFormatMeta::m_pTextAttr
private

Definition at line 99 of file fmtmeta.hxx.

Referenced by GetTextAttr(), and SetTextAttr().


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