20#include <com/sun/star/drawing/LineJoint.hpp>
21#include <com/sun/star/drawing/LineCap.hpp>
22#include <com/sun/star/uno/Any.hxx>
24#include <osl/diagnose.h>
26#include <svx/strings.hrc>
27#include <svx/svxids.hrc>
51#include <libxml/xmlwriter.h>
75 case SfxItemPresentation::Complete:
76 rText =
SvxResId(RID_SVXSTR_TRANSPARENCE) +
": ";
78 case SfxItemPresentation::Nameless:
109 case css::drawing::LineJoint::LineJoint_MAKE_FIXED_SIZE:
110 case css::drawing::LineJoint_NONE:
114 case css::drawing::LineJoint_MIDDLE:
115 pId = RID_SVXSTR_LINEJOINT_MIDDLE;
119 case css::drawing::LineJoint_BEVEL:
120 pId = RID_SVXSTR_LINEJOINT_BEVEL;
124 case css::drawing::LineJoint_MITER:
125 pId = RID_SVXSTR_LINEJOINT_MITER;
129 case css::drawing::LineJoint_ROUND:
130 pId = RID_SVXSTR_LINEJOINT_ROUND;
142 const css::drawing::LineJoint eJoint =
GetValue();
149 css::drawing::LineJoint eUnoJoint;
151 if(!(rVal >>= eUnoJoint))
157 eUnoJoint =
static_cast<css::drawing::LineJoint
>(nLJ);
202 if(!SfxPoolItem::operator==(rRef))
240 OSL_ENSURE(
false,
"AffineMatrixItem::PutValue - Wrong type!");
265 pId = RID_SVXSTR_LINECAP_BUTT;
268 case css::drawing::LineCap_ROUND:
269 pId = RID_SVXSTR_LINECAP_ROUND;
272 case css::drawing::LineCap_SQUARE:
273 pId = RID_SVXSTR_LINECAP_SQUARE;
284 const css::drawing::LineCap eCap(
GetValue());
291 css::drawing::LineCap eUnoCap;
293 if(!(rVal >>= eUnoCap))
303 eUnoCap =
static_cast<css::drawing::LineCap
>(nLJ);
306 OSL_ENSURE(css::drawing::LineCap_BUTT == eUnoCap
307 || css::drawing::LineCap_ROUND == eUnoCap
308 || css::drawing::LineCap_SQUARE == eUnoCap,
"Unknown enum value in XATTR_LINECAP (!)");
324 OSL_ENSURE(css::drawing::LineCap_BUTT == eRetval
325 || css::drawing::LineCap_ROUND == eRetval
326 || css::drawing::LineCap_SQUARE == eRetval,
"Unknown enum value in XATTR_LINECAP (!)");
353 case SfxItemPresentation::Complete:
354 rText =
SvxResId(RID_SVXSTR_TRANSPARENCE) +
": ";
356 case SfxItemPresentation::Nameless:
367 (void)xmlTextWriterStartElement(pWriter, BAD_CAST(
"XFillTransparenceItem"));
368 (void)xmlTextWriterWriteAttribute(pWriter, BAD_CAST(
"whichId"), BAD_CAST(OString::number(
Which()).getStr()));
369 (void)xmlTextWriterWriteAttribute(pWriter, BAD_CAST(
"value"), BAD_CAST(OString::number(
GetValue()).getStr()));
370 (void)xmlTextWriterEndElement(pWriter);
405 rText += OUString::number(
GetValue());
434 (void)xmlTextWriterStartElement(pWriter, BAD_CAST(
"XFillBmpTileItem"));
435 (void)xmlTextWriterWriteAttribute(pWriter, BAD_CAST(
"whichId"), BAD_CAST(OString::number(
Which()).getStr()));
436 (void)xmlTextWriterWriteAttribute(pWriter, BAD_CAST(
"value"), BAD_CAST(OString::boolean(
GetValue()).getStr()));
437 (void)xmlTextWriterEndElement(pWriter);
471 (void)xmlTextWriterStartElement(pWriter, BAD_CAST(
"XFillBmpPosItem"));
472 (void)xmlTextWriterWriteAttribute(pWriter, BAD_CAST(
"whichId"), BAD_CAST(OString::number(
Which()).getStr()));
473 (void)xmlTextWriterWriteAttribute(pWriter, BAD_CAST(
"value"), BAD_CAST(OString::number(
static_cast<int>(
GetValue())).getStr()));
474 (void)xmlTextWriterEndElement(pWriter);
628 (void)xmlTextWriterStartElement(pWriter, BAD_CAST(
"XFillBmpStretchItem"));
629 (void)xmlTextWriterWriteAttribute(pWriter, BAD_CAST(
"whichId"), BAD_CAST(OString::number(
Which()).getStr()));
630 (void)xmlTextWriterWriteAttribute(pWriter, BAD_CAST(
"value"), BAD_CAST(OString::boolean(
GetValue()).getStr()));
631 (void)xmlTextWriterEndElement(pWriter);
699 (void)xmlTextWriterStartElement(pWriter, BAD_CAST(
"XFillBackgroundItem"));
700 (void)xmlTextWriterWriteAttribute(pWriter, BAD_CAST(
"whichId"), BAD_CAST(OString::number(
Which()).getStr()));
701 (void)xmlTextWriterWriteAttribute(pWriter, BAD_CAST(
"value"), BAD_CAST(OString::boolean(
GetValue()).getStr()));
702 (void)xmlTextWriterEndElement(pWriter);
724 (void)xmlTextWriterStartElement(pWriter, BAD_CAST(
"XFillUseSlideBackgroundItem"));
725 (void)xmlTextWriterWriteAttribute(pWriter, BAD_CAST(
"whichId"), BAD_CAST(OString::number(
Which()).getStr()));
726 (void)xmlTextWriterWriteAttribute(pWriter, BAD_CAST(
"value"), BAD_CAST(OString::boolean(
GetValue()).getStr()));
727 (void)xmlTextWriterEndElement(pWriter);
virtual bool PutValue(const css::uno::Any &rVal, sal_uInt8 nMemberId) override
virtual bool operator==(const SfxPoolItem &) const override
virtual bool QueryValue(css::uno::Any &rVal, sal_uInt8 nMemberId=0) const override
virtual AffineMatrixItem * Clone(SfxItemPool *pPool=nullptr) const override
css::geometry::AffineMatrix2D maMatrix
virtual ~AffineMatrixItem() override
AffineMatrixItem(const css::geometry::AffineMatrix2D *pMatrix)
static const AllSettings & GetSettings()
sal_Int32 GetValue() const
sal_uInt16 GetValue() const
void SetValue(EnumT nTheValue)
void dumpAsXml(xmlTextWriterPtr pWriter) const override
XFillBackgroundItem(bool bFill=false)
virtual SVX_DLLPRIVATE XFillBackgroundItem * Clone(SfxItemPool *pPool=nullptr) const override
virtual SVX_DLLPRIVATE bool GetPresentation(SfxItemPresentation ePres, MapUnit eCoreMetric, MapUnit ePresMetric, OUString &rText, const IntlWrapper &) const override
virtual SVX_DLLPRIVATE sal_uInt16 GetValueCount() const override
virtual SVX_DLLPRIVATE bool GetPresentation(SfxItemPresentation ePres, MapUnit eCoreMetric, MapUnit ePresMetric, OUString &rText, const IntlWrapper &) const override
XFillBmpPosItem(RectPoint eRP=RectPoint::MM)
virtual SVX_DLLPRIVATE XFillBmpPosItem * Clone(SfxItemPool *pPool=nullptr) const override
void dumpAsXml(xmlTextWriterPtr pWriter) const override
XFillBmpPosOffsetXItem(sal_uInt16 nOffPosX=0)
virtual SVX_DLLPRIVATE bool GetPresentation(SfxItemPresentation ePres, MapUnit eCoreMetric, MapUnit ePresMetric, OUString &rText, const IntlWrapper &) const override
virtual SVX_DLLPRIVATE XFillBmpPosOffsetXItem * Clone(SfxItemPool *pPool=nullptr) const override
virtual SVX_DLLPRIVATE bool GetPresentation(SfxItemPresentation ePres, MapUnit eCoreMetric, MapUnit ePresMetric, OUString &rText, const IntlWrapper &) const override
XFillBmpPosOffsetYItem(sal_uInt16 nOffPosY=0)
virtual SVX_DLLPRIVATE XFillBmpPosOffsetYItem * Clone(SfxItemPool *pPool=nullptr) const override
virtual SVX_DLLPRIVATE XFillBmpSizeLogItem * Clone(SfxItemPool *pPool=nullptr) const override
XFillBmpSizeLogItem(bool bLog=true)
virtual SVX_DLLPRIVATE bool GetPresentation(SfxItemPresentation ePres, MapUnit eCoreMetric, MapUnit ePresMetric, OUString &rText, const IntlWrapper &) const override
virtual SVX_DLLPRIVATE XFillBmpSizeXItem * Clone(SfxItemPool *pPool=nullptr) const override
XFillBmpSizeXItem(tools::Long nSizeX=0)
virtual SVX_DLLPRIVATE bool HasMetrics() const override
virtual SVX_DLLPRIVATE bool GetPresentation(SfxItemPresentation ePres, MapUnit eCoreMetric, MapUnit ePresMetric, OUString &rText, const IntlWrapper &) const override
virtual SVX_DLLPRIVATE bool HasMetrics() const override
XFillBmpSizeYItem(tools::Long nSizeY=0)
virtual SVX_DLLPRIVATE bool GetPresentation(SfxItemPresentation ePres, MapUnit eCoreMetric, MapUnit ePresMetric, OUString &rText, const IntlWrapper &) const override
virtual SVX_DLLPRIVATE XFillBmpSizeYItem * Clone(SfxItemPool *pPool=nullptr) const override
void dumpAsXml(xmlTextWriterPtr pWriter) const override
XFillBmpStretchItem(bool bStretch=true)
virtual XFillBmpStretchItem * Clone(SfxItemPool *pPool=nullptr) const override
virtual bool GetPresentation(SfxItemPresentation ePres, MapUnit eCoreMetric, MapUnit ePresMetric, OUString &rText, const IntlWrapper &) const override
virtual XFillBmpTileItem * Clone(SfxItemPool *pPool=nullptr) const override
void dumpAsXml(xmlTextWriterPtr pWriter) const override
virtual bool GetPresentation(SfxItemPresentation ePres, MapUnit eCoreMetric, MapUnit ePresMetric, OUString &rText, const IntlWrapper &) const override
XFillBmpTileItem(bool bTile=true)
virtual SVX_DLLPRIVATE XFillBmpTileOffsetXItem * Clone(SfxItemPool *pPool=nullptr) const override
XFillBmpTileOffsetXItem(sal_uInt16 nOffX=0)
virtual SVX_DLLPRIVATE bool GetPresentation(SfxItemPresentation ePres, MapUnit eCoreMetric, MapUnit ePresMetric, OUString &rText, const IntlWrapper &) const override
virtual SVX_DLLPRIVATE XFillBmpTileOffsetYItem * Clone(SfxItemPool *pPool=nullptr) const override
XFillBmpTileOffsetYItem(sal_uInt16 nOffX=0)
virtual SVX_DLLPRIVATE bool GetPresentation(SfxItemPresentation ePres, MapUnit eCoreMetric, MapUnit ePresMetric, OUString &rText, const IntlWrapper &) const override
virtual XFillTransparenceItem * Clone(SfxItemPool *pPool=nullptr) const override
virtual bool GetPresentation(SfxItemPresentation ePres, MapUnit eCoreMetric, MapUnit ePresMetric, OUString &rText, const IntlWrapper &) const override
void dumpAsXml(xmlTextWriterPtr pWriter) const override
XFillTransparenceItem(sal_uInt16 nFillTransparence=0)
Item to enable slide background for filled objects.
void dumpAsXml(xmlTextWriterPtr pWriter) const override
XFillUseSlideBackgroundItem(bool bFill=false)
virtual XFillUseSlideBackgroundItem * Clone(SfxItemPool *pPool=nullptr) const override
virtual bool GetPresentation(SfxItemPresentation ePres, MapUnit eCoreMetric, MapUnit ePresMetric, OUString &rText, const IntlWrapper &) const override
XFormTextShadowTranspItem(sal_uInt16 nShdwTransparence=0)
virtual XFormTextShadowTranspItem * Clone(SfxItemPool *pPool=nullptr) const override
virtual bool GetPresentation(SfxItemPresentation ePres, MapUnit eCoreMetric, MapUnit ePresMetric, OUString &rText, const IntlWrapper &) const override
virtual XGradientStepCountItem * Clone(SfxItemPool *pPool=nullptr) const override
XGradientStepCountItem(sal_uInt16 nStepCount=0)
css::drawing::LineCap GetValue() const
virtual bool PutValue(const css::uno::Any &rVal, sal_uInt8 nMemberId) override
XLineCapItem(css::drawing::LineCap eLineCap=css::drawing::LineCap_BUTT)
virtual bool GetPresentation(SfxItemPresentation ePres, MapUnit eCoreMetric, MapUnit ePresMetric, OUString &rText, const IntlWrapper &) const override
virtual bool QueryValue(css::uno::Any &rVal, sal_uInt8 nMemberId=0) const override
virtual sal_uInt16 GetValueCount() const override
static SfxPoolItem * CreateDefault()
virtual XLineCapItem * Clone(SfxItemPool *pPool=nullptr) const override
virtual bool GetPresentation(SfxItemPresentation ePres, MapUnit eCoreMetric, MapUnit ePresMetric, OUString &rText, const IntlWrapper &) const override
XLineJointItem(css::drawing::LineJoint eLineJoint=css::drawing::LineJoint_ROUND)
virtual bool QueryValue(css::uno::Any &rVal, sal_uInt8 nMemberId=0) const override
virtual bool PutValue(const css::uno::Any &rVal, sal_uInt8 nMemberId) override
virtual sal_uInt16 GetValueCount() const override
static SfxPoolItem * CreateDefault()
virtual XLineJointItem * Clone(SfxItemPool *pPool=nullptr) const override
XLineTransparenceItem(sal_uInt16 nLineTransparence=0)
virtual bool GetPresentation(SfxItemPresentation ePres, MapUnit eCoreMetric, MapUnit ePresMetric, OUString &rText, const IntlWrapper &) const override
virtual XLineTransparenceItem * Clone(SfxItemPool *pPool=nullptr) const override
static OUString formatPercent(double dNumber, const LanguageTag &rLangTag)
OUString SvxResId(TranslateId aId)
struct _xmlTextWriter * xmlTextWriterPtr
constexpr TypedWhichId< XFillBmpPosOffsetYItem > XATTR_FILLBMP_POSOFFSETY(XATTR_FILL_FIRST+18)
constexpr TypedWhichId< XGradientStepCountItem > XATTR_GRADIENTSTEPCOUNT(XATTR_FILL_FIRST+6)
constexpr TypedWhichId< XFillBmpPosItem > XATTR_FILLBMP_POS(XATTR_FILL_FIRST+8)
constexpr TypedWhichId< XFillUseSlideBackgroundItem > XATTR_FILLUSESLIDEBACKGROUND(XATTR_FILL_FIRST+20)
constexpr TypedWhichId< XLineJointItem > XATTR_LINEJOINT(XATTR_LINE_FIRST+11)
constexpr TypedWhichId< XFillBmpTileOffsetXItem > XATTR_FILLBMP_TILEOFFSETX(XATTR_FILL_FIRST+14)
constexpr TypedWhichId< XFillTransparenceItem > XATTR_FILLTRANSPARENCE(XATTR_FILL_FIRST+5)
constexpr TypedWhichId< XFormTextShadowTranspItem > XATTR_FORMTXTSHDWTRANSP(XATTR_TEXT_FIRST+11)
constexpr TypedWhichId< SfxMetricItem > XATTR_FILLBMP_SIZEX(XATTR_FILL_FIRST+9)
constexpr TypedWhichId< XLineCapItem > XATTR_LINECAP(XATTR_LINE_FIRST+12)
constexpr TypedWhichId< XFillBmpPosOffsetXItem > XATTR_FILLBMP_POSOFFSETX(XATTR_FILL_FIRST+17)
constexpr TypedWhichId< XFillBmpTileOffsetYItem > XATTR_FILLBMP_TILEOFFSETY(XATTR_FILL_FIRST+15)
constexpr TypedWhichId< XFillBmpSizeYItem > XATTR_FILLBMP_SIZEY(XATTR_FILL_FIRST+10)
constexpr TypedWhichId< XFillBmpStretchItem > XATTR_FILLBMP_STRETCH(XATTR_FILL_FIRST+16)
constexpr TypedWhichId< XFillBmpSizeLogItem > XATTR_FILLBMP_SIZELOG(XATTR_FILL_FIRST+13)
constexpr TypedWhichId< XFillBmpTileItem > XATTR_FILLBMP_TILE(XATTR_FILL_FIRST+7)
constexpr TypedWhichId< XFillBackgroundItem > XATTR_FILLBACKGROUND(XATTR_FILL_FIRST+19)
constexpr TypedWhichId< XLineTransparenceItem > XATTR_LINETRANSPARENCE(XATTR_LINE_FIRST+10)