20#ifndef INCLUDED_SVL_POOLITEM_HXX
21#define INCLUDED_SVL_POOLITEM_HXX
28#include <com/sun/star/uno/Any.hxx>
34#include <boost/property_tree/ptree_fwd.hpp>
46#define SFX_ITEMS_OLD_MAXREF 0xffef
47#define SFX_ITEMS_MAXREF 0xfffffffe
48#define SFX_ITEMS_SPECIAL 0xffffffff
50#define CONVERT_TWIPS 0x80
53inline bool Any2Bool(
const css::uno::Any&rValue )
56 if( !(rValue >>= bValue) )
109#define INVALID_POOL_ITEM reinterpret_cast<SfxPoolItem*>(-1)
131 inline void AddRef(sal_uInt32 n = 1)
const;
133 inline sal_uInt32
ReleaseRef(sal_uInt32 n = 1)
const;
156 assert(
dynamic_cast<T*
>(
this));
157 return *
static_cast<T*
>(
this);
163 assert(
dynamic_cast<const T*
>(
this));
164 return *
static_cast<const T*
>(
this);
173 assert(
dynamic_cast<T*
>(
this));
174 return static_cast<T*
>(
this);
180 assert(
dynamic_cast<const T*
>(
this));
181 return static_cast<const T*
>(
this);
185 {
return !(*
this == rItem); }
203 { assert(
false );
return end; }
220 std::unique_ptr<SfxPoolItem>
CloneSetWhich( sal_uInt16 nNewWhich )
const;
223 return std::unique_ptr<T>(
static_cast<T*
>(
CloneSetWhich(sal_uInt16(
nId)).release()));
229 virtual boost::property_tree::ptree
dumpAsJSON()
const;
319 virtual bool IsVoidItem()
const override;
Base class for providers of defaults of SfxPoolItems.
SfxPoolItem * GetObject() const
SfxPoolItemHint(SfxPoolItem *Object)
virtual void ScaleMetrics(tools::Long lMult, tools::Long lDiv)
std::vector< SfxPoolItem * >::const_iterator lookup_iterator
virtual bool QueryValue(css::uno::Any &rVal, sal_uInt8 nMemberId=0) const
T & StaticWhichCast(TypedWhichId< T > nId)
void SetKind(SfxItemKind n)
void AddRef(sal_uInt32 n=1) const
SfxPoolItem(const SfxPoolItem &rCopy)
sal_uInt32 GetRefCount() const
const T & StaticWhichCast(TypedWhichId< T > nId) const
void SetRefCount(sal_uInt32 n)
T * DynamicWhichCast(TypedWhichId< T > nId)
const T * DynamicWhichCast(TypedWhichId< T > nId) const
virtual bool HasLookup() const
virtual lookup_iterator Lookup(lookup_iterator, lookup_iterator end) const
SfxPoolItem(sal_uInt16 nWhich=0)
bool operator!=(const SfxPoolItem &rItem) const
virtual bool IsSortable() const
virtual bool PutValue(const css::uno::Any &rVal, sal_uInt8 nMemberId)
std::unique_ptr< SfxPoolItem > CloneSetWhich(sal_uInt16 nNewWhich) const
virtual bool operator<(const SfxPoolItem &) const
void SetWhich(sal_uInt16 nId)
SfxItemKind GetKind() const
sal_uInt32 ReleaseRef(sal_uInt32 n=1) const
SfxPoolItem & operator=(const SfxPoolItem &)=delete
virtual boost::property_tree::ptree dumpAsJSON() const
virtual SfxPoolItem * Clone(SfxItemPool *pPool=nullptr) const =0
std::unique_ptr< T > CloneSetWhich(TypedWhichId< T > nId) const
virtual bool HasMetrics() const
virtual bool GetPresentation(SfxItemPresentation ePres, MapUnit eCoreMetric, MapUnit ePresMetric, OUString &rText, const IntlWrapper &) const override
This virtual method allows to get a textual representation of the value for the SfxPoolItem subclasse...
SfxVoidItem(SfxVoidItem &&)=default
SfxVoidItem(SfxVoidItem const &)=default
virtual void dumpAsXml(xmlTextWriterPtr pWriter) const override
virtual bool IsVoidItem() const override
Always returns true as this is an SfxVoidItem.
A very thin wrapper around the sal_uInt16 WhichId whose purpose is mostly to carry type information,...
struct _xmlTextWriter * xmlTextWriterPtr
css::uno::Reference< css::animations::XAnimationNode > Clone(const css::uno::Reference< css::animations::XAnimationNode > &xSourceNode, const SdPage *pSource=nullptr, const SdPage *pTarget=nullptr)
#define INVALID_POOL_ITEM
bool IsPoolDefaultItem(const SfxPoolItem *pItem)
struct _xmlTextWriter * xmlTextWriterPtr
SfxItemState
These values have to match the values in the css::frame::status::ItemState IDL to be found at offapi/...
@ SET
The property has been explicitly set to a given value hence we know we are not taking the default val...
@ DONTCARE
Specifies that the property is currently in a don't care state.
bool IsDefaultItem(const SfxPoolItem *pItem)
bool Any2Bool(const css::uno::Any &rValue)
bool IsInvalidItem(const SfxPoolItem *pItem)
bool IsPooledItem(const SfxPoolItem *pItem)
bool IsStaticDefaultItem(const SfxPoolItem *pItem)
#define SFX_ITEMS_SPECIAL
constexpr bool operator==(TypedWhichId< T > const &lhs, TypedWhichId< T > rhs)