23#include <osl/diagnose.h>
25#include <libxml/xmlwriter.h>
27#include <boost/property_tree/ptree.hpp>
470 assert(nWhich <= SHRT_MAX);
481 "comparing different pool item subclasses " <<
typeid(rCmp).
name() <<
" && "
482 <<
typeid(*this).name());
483 assert(
typeid(rCmp) ==
typeid(*
this) &&
"comparing different pool item subclasses");
536 (void)xmlTextWriterStartElement(pWriter, BAD_CAST(
"SfxPoolItem"));
537 (void)xmlTextWriterWriteFormatAttribute(pWriter, BAD_CAST(
"ptr"),
"%p",
this);
538 (void)xmlTextWriterWriteAttribute(pWriter, BAD_CAST(
"whichId"),
539 BAD_CAST(OString::number(
Which()).getStr()));
540 (void)xmlTextWriterWriteAttribute(pWriter, BAD_CAST(
"typeName"),
541 BAD_CAST(
typeid(*this).name()));
545 rText, aIntlWrapper))
546 (void)xmlTextWriterWriteAttribute(pWriter, BAD_CAST(
"presentation"),
547 BAD_CAST(rText.toUtf8().getStr()));
548 (void)xmlTextWriterEndElement(pWriter);
553 boost::property_tree::ptree aTree;
559 std::unique_ptr<SfxPoolItem> pItem(
Clone());
560 pItem->SetWhich(nNewWhich);
575 assert(SfxPoolItem::operator==(rCmp));
590 (void)xmlTextWriterStartElement(pWriter, BAD_CAST(
"SfxVoidItem"));
591 (void)xmlTextWriterWriteAttribute(pWriter, BAD_CAST(
"whichId"),
592 BAD_CAST(OString::number(
Which()).getStr()));
593 (void)xmlTextWriterEndElement(pWriter);
606 OSL_FAIL(
"There is no implementation for QueryValue for this item!");
612 OSL_FAIL(
"There is no implementation for PutValue for this item!");
Base class for providers of defaults of SfxPoolItems.
virtual void ScaleMetrics(tools::Long lMult, tools::Long lDiv)
virtual bool QueryValue(css::uno::Any &rVal, sal_uInt8 nMemberId=0) 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 subclasse...
virtual void dumpAsXml(xmlTextWriterPtr pWriter) const
SfxPoolItem(sal_uInt16 nWhich=0)
virtual bool operator==(const SfxPoolItem &) const =0
virtual bool PutValue(const css::uno::Any &rVal, sal_uInt8 nMemberId)
std::unique_ptr< SfxPoolItem > CloneSetWhich(sal_uInt16 nNewWhich) const
virtual boost::property_tree::ptree dumpAsJSON() const
virtual SfxPoolItem * Clone(SfxItemPool *pPool=nullptr) const =0
virtual bool HasMetrics() const
virtual bool IsVoidItem() const
Only SfxVoidItem shall and must return true for this.
virtual ~SfxVoidItem() override
virtual SfxVoidItem * Clone(SfxItemPool *pPool=nullptr) const override
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...
virtual void dumpAsXml(xmlTextWriterPtr pWriter) const override
virtual bool IsVoidItem() const override
Always returns true as this is an SfxVoidItem.
static SfxPoolItem * CreateDefault()
virtual bool operator==(const SfxPoolItem &) const override
struct _xmlTextWriter * xmlTextWriterPtr
#define SAL_WARN_IF(condition, area, stream)