LibreOffice Module svl (master) 1
|
#include <poolitem.hxx>
Public Types | |
typedef std::vector< SfxPoolItem * >::const_iterator | lookup_iterator |
Public Member Functions | |
void | AddRef (sal_uInt32 n=1) const |
virtual | ~SfxPoolItem () |
void | SetWhich (sal_uInt16 nId) |
sal_uInt16 | Which () const |
template<class T > | |
T & | StaticWhichCast (TypedWhichId< T > nId) |
template<class T > | |
const T & | StaticWhichCast (TypedWhichId< T > nId) const |
template<class T > | |
T * | DynamicWhichCast (TypedWhichId< T > nId) |
template<class T > | |
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 |
This virtual method allows to get a textual representation of the value for the SfxPoolItem subclasses. More... | |
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 SfxPoolItem * | Clone (SfxItemPool *pPool=nullptr) const =0 |
std::unique_ptr< SfxPoolItem > | CloneSetWhich (sal_uInt16 nNewWhich) const |
template<class T > | |
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 |
Only SfxVoidItem shall and must return true for this. More... | |
Protected Member Functions | |
SfxPoolItem (sal_uInt16 nWhich=0) | |
SfxPoolItem (const SfxPoolItem &rCopy) | |
Private Member Functions | |
void | SetRefCount (sal_uInt32 n) |
void | SetKind (SfxItemKind n) |
sal_uInt32 | ReleaseRef (sal_uInt32 n=1) const |
SfxPoolItem & | operator= (const SfxPoolItem &)=delete |
Private Attributes | |
sal_uInt32 | m_nRefCount |
sal_uInt16 | m_nWhich |
SfxItemKind | m_nKind |
Friends | |
class | SfxItemPool |
class | SfxItemDisruptor_Impl |
class | SfxItemPoolCache |
class | SfxItemSet |
class | SfxVoidItem |
Definition at line 115 of file poolitem.hxx.
typedef std::vector<SfxPoolItem*>::const_iterator SfxPoolItem::lookup_iterator |
Definition at line 201 of file poolitem.hxx.
|
explicitprotected |
Definition at line 465 of file poolitem.cxx.
References NONE.
|
inlineprotected |
Definition at line 137 of file poolitem.hxx.
|
virtual |
Definition at line 473 of file poolitem.cxx.
References m_nRefCount, and SFX_ITEMS_MAXREF.
|
inline |
Definition at line 254 of file poolitem.hxx.
References m_nRefCount, n, and SFX_ITEMS_MAXREF.
Referenced by SfxItemPool::AddRef(), SfxItemPoolCache::ApplyTo(), SfxItemSet::PutDirect(), SfxItemSet::RecreateRanges_Impl(), and SfxItemSet::SfxItemSet().
|
pure virtual |
Implemented in CntByteItem, CntUInt16Item, CntInt32Item, CntUInt32Item, CntUnencodedStringItem, SfxBoolItem, SfxByteItem, SfxInt16Item, SfxUInt16Item, SfxInt32Item, SfxUInt32Item, SfxStringItem, SfxVisibilityItem, SfxInt64Item, SfxFlagItem, SfxGlobalNameItem, SfxGrabBagItem, SfxIntegerListItem, SfxImageItem, SfxLockBytesItem, SvxMacroItem, SfxVoidItem, SfxPointItem, SfxRectangleItem, SfxRangeItem, SfxStringListItem, SvxSearchItem, and SfxSetItem.
Referenced by CloneSetWhich(), SfxItemSet::PutImpl(), SfxItemPool::PutImpl(), SfxItemPool::SetPoolDefaultItem(), and SfxItemSet::SfxItemSet().
std::unique_ptr< SfxPoolItem > SfxPoolItem::CloneSetWhich | ( | sal_uInt16 | nNewWhich | ) | const |
|
inline |
Definition at line 221 of file poolitem.hxx.
References CloneSetWhich(), and nId.
|
virtual |
Reimplemented in SfxInt16Item, SfxUInt16Item, SfxInt32Item, and SfxUInt32Item.
Definition at line 551 of file poolitem.cxx.
Referenced by SfxInt16Item::dumpAsJSON(), SfxUInt16Item::dumpAsJSON(), SfxInt32Item::dumpAsJSON(), and SfxUInt32Item::dumpAsJSON().
|
virtual |
Reimplemented in SfxBoolItem, SfxUInt16Item, SfxInt32Item, SfxUInt32Item, SfxVoidItem, and SfxStringItem.
Definition at line 534 of file poolitem.cxx.
References Complete, GetPresentation(), and Which().
Referenced by SfxBoolItem::dumpAsXml().
|
inline |
Definition at line 169 of file poolitem.hxx.
|
inline |
Definition at line 176 of file poolitem.hxx.
|
inline |
Definition at line 227 of file poolitem.hxx.
References m_nKind.
Referenced by IsDefaultItem(), IsPoolDefaultItem(), IsStaticDefaultItem(), and SfxItemPool::PutImpl().
|
virtual |
This virtual method allows to get a textual representation of the value for the SfxPoolItem subclasses.
It should be overridden by all UI-relevant SfxPoolItem subclasses.
Because the unit of measure of the value in the SfxItemPool is only queryable via
The corresponding unit of measure is passed as 'ePresentationMetric'.
SfxItemPresentation::Complete A complete textual representation could be created with semantic meaning (if applicable with unit of measure)
Example:
pSvxFontItem->GetPresentation( SFX_PRESENTATION_NAMELESS, ... ) "12pt" with return SfxItemPresentation::Nameless
pSvxColorItem->GetPresentation( SFX_PRESENTATION_COMPLETE, ... ) "red" with return SfxItemPresentation::Nameless Because the SvxColorItem does not know which color it represents it cannot provide a name, which is communicated by the return value
pSvxBorderItem->GetPresentation( SFX_PRESENTATION_COMPLETE, ... ) "1cm top border, 2cm left border, 0.2cm bottom border, ..."
Reimplemented in SfxFlagItem, SvxMacroItem, SfxVoidItem, SfxPointItem, SfxRectangleItem, SfxRangeItem, SfxSetItem, SfxStringListItem, SvxSearchItem, SfxEnumItemInterface, CntByteItem, CntUInt16Item, CntInt32Item, CntUInt32Item, CntUnencodedStringItem, SfxBoolItem, SfxInt16Item, SfxVisibilityItem, and SfxInt64Item.
Definition at line 524 of file poolitem.cxx.
Referenced by dumpAsXml(), and SfxItemPool::GetPresentation().
|
inline |
Definition at line 226 of file poolitem.hxx.
References m_nRefCount.
Referenced by IsPooledItem(), SfxItemPool::Remove(), CntUnencodedStringItem::SetValue(), SfxPointItem::SetValue(), SfxEnumItem< EnumT >::SetValue(), SfxInt16Item::SetValue(), CntInt32Item::SetValue(), SfxFlagItem::SetValue(), CntUInt16Item::SetValue(), CntUInt32Item::SetValue(), and CntByteItem::SetValue().
|
inlinevirtual |
Definition at line 200 of file poolitem.hxx.
Referenced by SfxItemPool::PutImpl().
|
virtual |
Reimplemented in SfxMetricItem.
Definition at line 602 of file poolitem.cxx.
|
inlinevirtual |
Reimplemented in CntUnencodedStringItem.
Definition at line 190 of file poolitem.hxx.
Referenced by SfxPoolItemArray_Impl::insert(), and SfxItemPool::PutImpl().
|
virtual |
Only SfxVoidItem shall and must return true for this.
This avoids costly calls to dynamic_cast<const SfxVoidItem*>() specifically in SfxItemSet::GetItemState()
Reimplemented in SfxVoidItem.
Definition at line 564 of file poolitem.cxx.
Referenced by SfxItemSet::Get().
|
inlinevirtual |
|
inline |
Definition at line 184 of file poolitem.hxx.
|
inlinevirtual |
Reimplemented in CntUnencodedStringItem.
Definition at line 189 of file poolitem.hxx.
|
privatedelete |
|
pure virtual |
Implemented in SfxFlagItem, SfxGlobalNameItem, SfxIntegerListItem, SfxImageItem, SfxLockBytesItem, SvxMacroItem, SfxVoidItem, SfxPointItem, SfxRectangleItem, SfxRangeItem, SfxSetItem, SfxStringListItem, SvxSearchItem, SfxEnumItemInterface, CntByteItem, CntUInt16Item, CntInt32Item, CntUInt32Item, CntUnencodedStringItem, SfxBoolItem, SfxGrabBagItem, SfxInt64Item, SfxInt16Item, SfxVisibilityItem, and SfxEnumItem< EnumT >.
Definition at line 478 of file poolitem.cxx.
References name, and SAL_WARN_IF.
Referenced by SfxGlobalNameItem::operator==(), SfxLockBytesItem::operator==(), SfxGrabBagItem::operator==(), and SfxInt64Item::operator==().
|
virtual |
Reimplemented in CntByteItem, CntUInt16Item, CntInt32Item, CntUInt32Item, CntUnencodedStringItem, SfxGlobalNameItem, SfxGrabBagItem, SfxIntegerListItem, SfxImageItem, SfxInt64Item, SfxInt16Item, SfxLockBytesItem, SfxPointItem, SfxRectangleItem, SfxStringListItem, SvxSearchItem, SfxVisibilityItem, SfxEnumItemInterface, and SfxBoolItem.
Definition at line 610 of file poolitem.cxx.
|
virtual |
Reimplemented in CntByteItem, CntUInt16Item, CntInt32Item, CntUInt32Item, CntUnencodedStringItem, SfxGlobalNameItem, SfxGrabBagItem, SfxIntegerListItem, SfxImageItem, SfxInt64Item, SfxInt16Item, SfxLockBytesItem, SfxPointItem, SfxRectangleItem, SfxStringListItem, SvxSearchItem, SfxVisibilityItem, SfxEnumItemInterface, and SfxBoolItem.
Definition at line 604 of file poolitem.cxx.
|
inlineprivate |
Definition at line 261 of file poolitem.hxx.
References m_nRefCount, n, and SFX_ITEMS_MAXREF.
Referenced by SfxItemPool::ReleaseRef(), and SfxItemSet::~SfxItemSet().
|
virtual |
Reimplemented in SfxMetricItem.
Definition at line 600 of file poolitem.cxx.
|
inlineprivate |
Definition at line 248 of file poolitem.hxx.
References m_nKind, m_nRefCount, n, and SFX_ITEMS_SPECIAL.
Referenced by SfxItemPool::SetPoolDefaultItem().
|
inlineprivate |
Definition at line 242 of file poolitem.hxx.
References m_nKind, m_nRefCount, n, and NONE.
Referenced by SfxItemPool::ClearRefCount().
|
inline |
Definition at line 143 of file poolitem.hxx.
References m_nRefCount, m_nWhich, and nId.
Referenced by SfxItemPool::PutImpl().
|
inline |
Definition at line 152 of file poolitem.hxx.
|
inline |
Definition at line 159 of file poolitem.hxx.
|
inline |
Definition at line 149 of file poolitem.hxx.
References m_nWhich.
Referenced by SfxItemPoolCache::ApplyTo(), SfxItemPool::CheckItemInPool(), SfxItemSet::ClearSingleItemImpl(), SfxItemSet::Clone(), SfxRangeItem::Clone(), SfxItemSet::CloneAsValue(), SfxItemSet::Differentiate(), dumpAsXml(), SfxUInt16Item::dumpAsXml(), SfxInt32Item::dumpAsXml(), SfxUInt32Item::dumpAsXml(), SfxVoidItem::dumpAsXml(), SfxStringItem::dumpAsXml(), SfxItemSet::Get(), SfxItemPool::GetPresentation(), StylePoolImpl::insertItemSet(), SfxItemSet::Intersect(), SfxItemPool::IsItemPoolable(), MergeItem_Impl(), SfxItemSet::MergeValue(), SfxEnumItemInterface::operator==(), SfxItemSet::Put(), SfxItemSet::PutDirect(), SfxItemSet::PutImpl(), SfxItemPool::PutImpl(), SfxItemSet::RecreateRanges_Impl(), SfxItemPool::Remove(), SfxItemSet::Set(), and SfxItemPool::SetPoolDefaultItem().
|
friend |
Definition at line 118 of file poolitem.hxx.
|
friend |
Definition at line 117 of file poolitem.hxx.
|
friend |
Definition at line 119 of file poolitem.hxx.
|
friend |
Definition at line 120 of file poolitem.hxx.
|
friend |
Definition at line 121 of file poolitem.hxx.
Referenced by SfxVoidItem::Clone(), and SfxVoidItem::CreateDefault().
|
private |
Definition at line 125 of file poolitem.hxx.
Referenced by GetKind(), SetKind(), and SetRefCount().
|
mutableprivate |
Definition at line 123 of file poolitem.hxx.
Referenced by AddRef(), GetRefCount(), ReleaseRef(), SetKind(), SetRefCount(), SetWhich(), and ~SfxPoolItem().
|
private |
Definition at line 124 of file poolitem.hxx.
Referenced by SfxItemSet::ClearAllItemsImpl(), DynamicWhichCast(), SetWhich(), StaticWhichCast(), and Which().