57 std::unique_ptr<SfxItemPool_Impl>
pImpl;
60 sal_uInt16 GetIndex_Impl(sal_uInt16 nWhich)
const;
61 sal_uInt16 GetSize_Impl()
const;
63 SVL_DLLPRIVATE bool IsItemPoolable_Impl( sal_uInt16 nWhich )
const;
71 static inline void ClearRefCount(
SfxPoolItem& rItem);
72 static inline void AddRef(
const SfxPoolItem& rItem);
73 static inline sal_uInt32 ReleaseRef(
const SfxPoolItem& rItem, sal_uInt32 n = 1);
77 bool bCloneStaticDefaults =
false );
79 sal_uInt16 nStart, sal_uInt16 nEnd,
81 std::vector<SfxPoolItem*> *pDefaults =
nullptr );
90 const SfxPoolItem* GetPoolDefaultItem( sal_uInt16 nWhich )
const;
92 {
return static_cast<const T*
>(GetPoolDefaultItem(sal_uInt16(nWhich))); }
94 void ResetPoolDefaultItem( sal_uInt16 nWhich );
96 void SetDefaults(std::vector<SfxPoolItem*>* pDefaults);
98 void ReleaseDefaults(
bool bDelete =
false );
99 static void ReleaseDefaults( std::vector<SfxPoolItem*> *pDefaults,
bool bDelete =
false );
101 virtual MapUnit GetMetric( sal_uInt16 nWhich )
const;
102 void SetDefaultMetric(
MapUnit eNewMetric );
103 MapUnit GetDefaultMetric()
const;
131 virtual bool GetPresentation(
const SfxPoolItem& rItem,
136 const OUString&
GetName()
const;
138 template<
class T>
const T&
Put( std::unique_ptr<T> xItem, sal_uInt16 nWhich = 0 )
139 {
return static_cast<const T&
>(
PutImpl( *xItem.release(), nWhich,
true)); }
140 template<
class T>
const T&
Put(
const T& rItem, sal_uInt16 nWhich = 0 )
141 {
return static_cast<const T&
>(
PutImpl( rItem, nWhich,
false)); }
144 const SfxPoolItem& GetDefaultItem( sal_uInt16 nWhich )
const;
146 {
return static_cast<const T&
>(GetDefaultItem(sal_uInt16(nWhich))); }
157 const SfxPoolItem * GetItem2Default(sal_uInt16 nWhich)
const;
159 {
return static_cast<const T*
>(GetItem2Default(sal_uInt16(nWhich))); }
161 sal_uInt32 GetItemCount2(sal_uInt16 nWhich)
const;
162 Item2Range GetItemSurrogates(sal_uInt16 nWhich)
const;
168 std::vector<const SfxPoolItem*> FindItemSurrogate(sal_uInt16 nWhich,
SfxPoolItem const & rNeedle)
const;
170 sal_uInt16 GetFirstWhich()
const;
171 sal_uInt16 GetLastWhich()
const;
172 bool IsInRange( sal_uInt16 nWhich )
const;
178 void FreezeIdRanges();
182 bool IsItemPoolable( sal_uInt16 nWhich )
const;
184 {
return IsItemPoolable( rItem.
Which() ); }
186 sal_uInt16
GetWhich( sal_uInt16 nSlot,
bool bDeep =
true )
const;
190 sal_uInt16 GetSlotId( sal_uInt16 nWhich )
const;
191 sal_uInt16 GetTrueWhich( sal_uInt16 nSlot,
bool bDeep =
true )
const;
192 sal_uInt16 GetTrueSlotId( sal_uInt16 nWhich )
const;
195 return nId &&
nId <= SFX_WHICH_MAX; }
197 return nId &&
nId > SFX_WHICH_MAX; }
202 virtual const SfxPoolItem& PutImpl(
const SfxPoolItem&, sal_uInt16 nWhich = 0,
bool bPassingOwnership =
false );
207 static const sal_uInt16 SFX_WHICH_MAX = 4999;
virtual const SfxPoolItem * PutImpl(const SfxPoolItem &, sal_uInt16 nWhich, bool bPassingOwnership) override
Putting with automatic extension of the WhichId with the ID of the Item.
virtual std::unique_ptr< SfxItemSet > Clone(bool bItems=true, SfxItemPool *pToPool=nullptr) const override
Base class for providers of defaults of SfxPoolItems.
const SfxItemPool & operator=(const SfxItemPool &)=delete
TypedWhichId< T > GetWhich(TypedWhichId< T > nSlot, bool bDeep=true) const
const SfxItemInfo * pItemInfos
static void ClearRefCount(SfxPoolItem &rItem)
const T & Put(const T &rItem, sal_uInt16 nWhich=0)
const T & Put(std::unique_ptr< T > xItem, sal_uInt16 nWhich=0)
static void AddRef(const SfxPoolItem &rItem)
const T * GetPoolDefaultItem(TypedWhichId< T > nWhich) const
static bool IsWhich(sal_uInt16 nId)
const T * GetItem2Default(TypedWhichId< T > nWhich) const
std::unique_ptr< SfxItemPool_Impl > pImpl
static bool IsSlot(sal_uInt16 nId)
bool IsItemPoolable(const SfxPoolItem &rItem) const
const T & GetDefaultItem(TypedWhichId< T > nWhich) const
static sal_uInt32 ReleaseRef(const SfxPoolItem &rItem, sal_uInt32 n=1)
void AddRef(sal_uInt32 n=1) const
void SetRefCount(sal_uInt32 n)
sal_uInt32 ReleaseRef(sal_uInt32 n=1) const
A very thin wrapper around the sal_uInt16 WhichId whose purpose is mostly to carry type information,...
std::vector< Value >::const_iterator const_iterator
virtual OUString GetName() const override
struct _xmlTextWriter * xmlTextWriterPtr
bool IsInRange(const WhichRangesContainer &pRange, const sal_uInt16 nId)
o3tl::sorted_vector< SfxPoolItem * >::const_iterator m_begin
o3tl::sorted_vector< SfxPoolItem * >::const_iterator m_end
o3tl::sorted_vector< SfxPoolItem * >::const_iterator const & begin() const
o3tl::sorted_vector< SfxPoolItem * >::const_iterator const & end() const
Most of the time, the which ranges we point at are a compile-time literal.