include/svl/poolitem.hxx | 13 ++++++ include/svx/xbtmpit.hxx | 2 - include/svx/xcolit.hxx | 8 ++-- include/svx/xflclit.hxx | 2 - include/svx/xflgrit.hxx | 2 - include/svx/xflhtit.hxx | 2 - include/svx/xftshcit.hxx | 5 ++ include/svx/xit.hxx | 6 +-- include/svx/xlnclit.hxx | 2 - include/svx/xlndsit.hxx | 2 - svx/source/unodraw/UnoNameItemTable.cxx | 2 - svx/source/xoutdev/xattr.cxx | 60 ++++++++++++++++---------------- svx/source/xoutdev/xattrbmp.cxx | 4 +- 13 files changed, 62 insertions(+), 48 deletions(-)
New commits: commit 8e03fced7ce1a3c45e8e48090373f85cc11c1fad Author: Noel Grandin <noel.gran...@collabora.co.uk> AuthorDate: Fri Jul 26 13:24:06 2024 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Fri Jul 26 15:33:37 2024 +0200 fix in some missing SfxItemTypes Change-Id: I7dcb9768a8cd63200b8f8c50d8170e78ff5aeec2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171068 Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> Tested-by: Jenkins diff --git a/include/svl/poolitem.hxx b/include/svl/poolitem.hxx index 60b6ae98068b..111ee2253f7f 100644 --- a/include/svl/poolitem.hxx +++ b/include/svl/poolitem.hxx @@ -471,8 +471,10 @@ enum class SfxItemType : sal_uInt16 { SwTransparencyGrfType, SwUINumRuleItemType, SwWrtShellItemType, + XColorItemType, XFillAttrSetItemType, XFillBackgroundItemType, + XFillBitmapItemType, XFillBmpPosItemType, XFillBmpPosOffsetXItemType, XFillBmpPosOffsetYItemType, @@ -483,6 +485,9 @@ enum class SfxItemType : sal_uInt16 { XFillBmpTileItemType, XFillBmpTileOffsetXItemType, XFillBmpTileOffsetYItemType, + XFillColorItemType, + XFillGradientItemType, + XFillHatchItemType, XFillStyleItemType, XFillTransparenceItemType, XFillUseSlideBackgroundItemType, @@ -491,6 +496,7 @@ enum class SfxItemType : sal_uInt16 { XFormTextHideFormItemType, XFormTextMirrorItemType, XFormTextOutlineItemType, + XFormTextShadowColorItemType, XFormTextShadowItemType, XFormTextShadowTranspItemType, XFormTextShadowXValItemType, @@ -500,14 +506,19 @@ enum class SfxItemType : sal_uInt16 { XGradientStepCountItemType, XLineAttrSetItemType, XLineCapItemType, + XLineColorItemType, + XLineDashItemType, XLineEndCenterItemType, + XLineEndItemType, XLineEndWidthItemType, XLineJointItemType, XLineStartCenterItem, + XLineStartItemType, XLineStartWidthItemType, XLineStyleItemType, XLineTransparenceItemType, - XLineWidthItemType + XLineWidthItemType, + XSecondaryFillColorItemType #ifdef DBG_UTIL , SwTestItemType #endif diff --git a/include/svx/xbtmpit.hxx b/include/svx/xbtmpit.hxx index 88a7df1a807f..151ad52c662e 100644 --- a/include/svx/xbtmpit.hxx +++ b/include/svx/xbtmpit.hxx @@ -35,7 +35,7 @@ private: public: static SfxPoolItem* CreateDefault(); - XFillBitmapItem() : NameOrIndex(XATTR_FILLBITMAP, -1 ) {} + XFillBitmapItem() : NameOrIndex(XATTR_FILLBITMAP, -1, SfxItemType::XFillBitmapItemType ) {} XFillBitmapItem(const OUString& rName, const GraphicObject& rGraphicObject); XFillBitmapItem( const GraphicObject& rGraphicObject ); XFillBitmapItem( const XFillBitmapItem& rItem ); diff --git a/include/svx/xcolit.hxx b/include/svx/xcolit.hxx index a89a1f37e97f..8f3594a8e70f 100644 --- a/include/svx/xcolit.hxx +++ b/include/svx/xcolit.hxx @@ -35,10 +35,10 @@ class SVXCORE_DLLPUBLIC XColorItem : public NameOrIndex public: static SfxPoolItem* CreateDefault(); - XColorItem() {} - XColorItem(TypedWhichId<XColorItem> nWhich, sal_Int32 nIndex, const Color& rTheColor); - XColorItem(TypedWhichId<XColorItem> nWhich, const Color& rTheColor); - XColorItem(TypedWhichId<XColorItem> nWhich, const OUString& rName, const Color& rTheColor); + XColorItem(SfxItemType eItemType = SfxItemType::XColorItemType) : NameOrIndex(eItemType) {} + XColorItem(TypedWhichId<XColorItem> nWhich, sal_Int32 nIndex, const Color& rTheColor, SfxItemType eItemType = SfxItemType::XColorItemType); + XColorItem(TypedWhichId<XColorItem> nWhich, const Color& rTheColor, SfxItemType eItemType = SfxItemType::XColorItemType); + XColorItem(TypedWhichId<XColorItem> nWhich, const OUString& rName, const Color& rTheColor, SfxItemType eItemType = SfxItemType::XColorItemType); XColorItem(const XColorItem& rItem); virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override; diff --git a/include/svx/xflclit.hxx b/include/svx/xflclit.hxx index df6b302d3e66..dc38c9393450 100644 --- a/include/svx/xflclit.hxx +++ b/include/svx/xflclit.hxx @@ -33,7 +33,7 @@ class SVXCORE_DLLPUBLIC XFillColorItem final : public XColorItem { public: static SfxPoolItem* CreateDefault(); - XFillColorItem() {} + XFillColorItem() : XColorItem(SfxItemType::XFillColorItemType) {} XFillColorItem(sal_Int32 nIndex, const Color& rTheColor); XFillColorItem(const OUString& rName, const Color& rTheColor); diff --git a/include/svx/xflgrit.hxx b/include/svx/xflgrit.hxx index e988544a275b..0e02813d968d 100644 --- a/include/svx/xflgrit.hxx +++ b/include/svx/xflgrit.hxx @@ -34,7 +34,7 @@ class SVXCORE_DLLPUBLIC XFillGradientItem : public NameOrIndex public: static SfxPoolItem* CreateDefault(); - XFillGradientItem() : NameOrIndex(XATTR_FILLGRADIENT, -1) {} + XFillGradientItem() : NameOrIndex(XATTR_FILLGRADIENT, -1, SfxItemType::XFillGradientItemType) {} XFillGradientItem(sal_Int32 nIndex, const basegfx::BGradient& rTheGradient); XFillGradientItem(const OUString& rName, const basegfx::BGradient& rTheGradient, TypedWhichId<XFillGradientItem> nWhich = XATTR_FILLGRADIENT); XFillGradientItem(const basegfx::BGradient& rTheGradient); diff --git a/include/svx/xflhtit.hxx b/include/svx/xflhtit.hxx index dd3bbff21193..6084e042f9ea 100644 --- a/include/svx/xflhtit.hxx +++ b/include/svx/xflhtit.hxx @@ -35,7 +35,7 @@ class SVXCORE_DLLPUBLIC XFillHatchItem final : public NameOrIndex public: static SfxPoolItem* CreateDefault(); - XFillHatchItem() : NameOrIndex(XATTR_FILLHATCH, -1) {} + XFillHatchItem() : NameOrIndex(XATTR_FILLHATCH, -1, SfxItemType::XFillHatchItemType) {} XFillHatchItem(const OUString& rName, const XHatch& rTheHatch); XFillHatchItem(const XHatch& rTheHatch); XFillHatchItem(const XFillHatchItem& rItem); diff --git a/include/svx/xftshcit.hxx b/include/svx/xftshcit.hxx index cfaccbfadec7..f23229fbaf82 100644 --- a/include/svx/xftshcit.hxx +++ b/include/svx/xftshcit.hxx @@ -33,7 +33,10 @@ class SVXCORE_DLLPUBLIC XFormTextShadowColorItem final : public XColorItem { public: static SfxPoolItem* CreateDefault(); - XFormTextShadowColorItem() {} + XFormTextShadowColorItem() + : XColorItem(SfxItemType::XFormTextShadowColorItemType) + { + } XFormTextShadowColorItem(const OUString& rName, const Color& rTheColor); virtual XFormTextShadowColorItem* Clone(SfxItemPool* pPool = nullptr) const override; diff --git a/include/svx/xit.hxx b/include/svx/xit.hxx index b51af17a4d4d..5902424a7d05 100644 --- a/include/svx/xit.hxx +++ b/include/svx/xit.hxx @@ -42,9 +42,9 @@ protected: void Detach() { m_nPalIndex = -1; } public: - NameOrIndex() { m_nPalIndex = -1; } - NameOrIndex(TypedWhichId<NameOrIndex> nWhich, sal_Int32 nIndex); - NameOrIndex(TypedWhichId<NameOrIndex> nWhich, const OUString& rName); + NameOrIndex(SfxItemType eItemType) : SfxStringItem(0, eItemType) { m_nPalIndex = -1; } + NameOrIndex(TypedWhichId<NameOrIndex> nWhich, sal_Int32 nIndex, SfxItemType eItemType); + NameOrIndex(TypedWhichId<NameOrIndex> nWhich, const OUString& rName, SfxItemType eItemType); NameOrIndex(const NameOrIndex& rNameOrIndex); virtual bool operator==(const SfxPoolItem& rItem) const override; diff --git a/include/svx/xlnclit.hxx b/include/svx/xlnclit.hxx index 7de9bc8b688a..f76a7469cce6 100644 --- a/include/svx/xlnclit.hxx +++ b/include/svx/xlnclit.hxx @@ -29,7 +29,7 @@ class SVXCORE_DLLPUBLIC XLineColorItem final : public XColorItem { public: static SfxPoolItem* CreateDefault(); - XLineColorItem() {} + XLineColorItem() : XColorItem(SfxItemType::XLineColorItemType) {} XLineColorItem(sal_Int32 nIndex, const Color& rTheColor); XLineColorItem(const OUString& rName, const Color& rTheColor); diff --git a/include/svx/xlndsit.hxx b/include/svx/xlndsit.hxx index ca108eb5edcc..2c3212277f27 100644 --- a/include/svx/xlndsit.hxx +++ b/include/svx/xlndsit.hxx @@ -36,7 +36,7 @@ class SVXCORE_DLLPUBLIC XLineDashItem final : public NameOrIndex public: static SfxPoolItem* CreateDefault(); - XLineDashItem() : NameOrIndex(XATTR_LINEDASH, -1) {} + XLineDashItem() : NameOrIndex(XATTR_LINEDASH, -1, SfxItemType::XLineDashItemType) {} XLineDashItem(const OUString& rName, const XDash& rTheDash); XLineDashItem(const XDash& rTheDash); XLineDashItem(const XLineDashItem& rItem); diff --git a/svx/source/unodraw/UnoNameItemTable.cxx b/svx/source/unodraw/UnoNameItemTable.cxx index 2612bbf9b67d..c930f2fb2b74 100644 --- a/svx/source/unodraw/UnoNameItemTable.cxx +++ b/svx/source/unodraw/UnoNameItemTable.cxx @@ -44,7 +44,7 @@ namespace class SampleItem : public NameOrIndex { public: - SampleItem(sal_uInt16 nWhich, const OUString& rName) : NameOrIndex(TypedWhichId<NameOrIndex>(nWhich), rName) {} + SampleItem(sal_uInt16 nWhich, const OUString& rName) : NameOrIndex(TypedWhichId<NameOrIndex>(nWhich), rName, SfxItemType::NameOrIndexType) {} bool operator==(const SfxPoolItem& rCmp) const { diff --git a/svx/source/xoutdev/xattr.cxx b/svx/source/xoutdev/xattr.cxx index 7ab66e2e2b29..a7b307c066e8 100644 --- a/svx/source/xoutdev/xattr.cxx +++ b/svx/source/xoutdev/xattr.cxx @@ -97,14 +97,14 @@ using namespace ::com::sun::star; typedef std::map<OUString, OUString> StringMap; -NameOrIndex::NameOrIndex(TypedWhichId<NameOrIndex> _nWhich, sal_Int32 nIndex) : - SfxStringItem(_nWhich, OUString(), SfxItemType::NameOrIndexType), +NameOrIndex::NameOrIndex(TypedWhichId<NameOrIndex> _nWhich, sal_Int32 nIndex, SfxItemType eItemType) : + SfxStringItem(_nWhich, OUString(), eItemType), m_nPalIndex(nIndex) { } -NameOrIndex::NameOrIndex(TypedWhichId<NameOrIndex> _nWhich, const OUString& rName) : - SfxStringItem(_nWhich, rName, SfxItemType::NameOrIndexType), +NameOrIndex::NameOrIndex(TypedWhichId<NameOrIndex> _nWhich, const OUString& rName, SfxItemType eItemType) : + SfxStringItem(_nWhich, rName, eItemType), m_nPalIndex(-1) { } @@ -265,22 +265,22 @@ void NameOrIndex::dumpAsXml(xmlTextWriterPtr pWriter) const (void)xmlTextWriterEndElement(pWriter); } -SfxPoolItem* XColorItem::CreateDefault() { return new XColorItem; } +SfxPoolItem* XColorItem::CreateDefault() { return new XColorItem(SfxItemType::XColorItemType); } -XColorItem::XColorItem(TypedWhichId<XColorItem> _nWhich, sal_Int32 nIndex, const Color& rTheColor) : - NameOrIndex(_nWhich, nIndex), +XColorItem::XColorItem(TypedWhichId<XColorItem> _nWhich, sal_Int32 nIndex, const Color& rTheColor, SfxItemType eItemType) : + NameOrIndex(_nWhich, nIndex, eItemType), m_aColor(rTheColor) { } -XColorItem::XColorItem(TypedWhichId<XColorItem> _nWhich, const OUString& rName, const Color& rTheColor) : - NameOrIndex(_nWhich, rName), +XColorItem::XColorItem(TypedWhichId<XColorItem> _nWhich, const OUString& rName, const Color& rTheColor, SfxItemType eItemType) : + NameOrIndex(_nWhich, rName, eItemType), m_aColor(rTheColor) { } -XColorItem::XColorItem(TypedWhichId<XColorItem> _nWhich, const Color& rTheColor) - : NameOrIndex(_nWhich, OUString()) +XColorItem::XColorItem(TypedWhichId<XColorItem> _nWhich, const Color& rTheColor, SfxItemType eItemType) + : NameOrIndex(_nWhich, OUString(), eItemType) , m_aColor(rTheColor) { } @@ -657,7 +657,7 @@ double XDash::CreateDotDashArray(::std::vector< double >& rDotDashArray, double SfxPoolItem* XLineDashItem::CreateDefault() {return new XLineDashItem;} XLineDashItem::XLineDashItem(const OUString& rName, const XDash& rTheDash) : - NameOrIndex(XATTR_LINEDASH, rName), + NameOrIndex(XATTR_LINEDASH, rName, SfxItemType::XLineDashItemType), aDash(rTheDash) { } @@ -669,7 +669,7 @@ XLineDashItem::XLineDashItem(const XLineDashItem& rItem) : } XLineDashItem::XLineDashItem(const XDash& rTheDash) -: NameOrIndex( XATTR_LINEDASH, -1 ), +: NameOrIndex( XATTR_LINEDASH, -1, SfxItemType::XLineDashItemType ), aDash(rTheDash) { } @@ -1020,12 +1020,12 @@ bool XLineWidthItem::PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId ) SfxPoolItem* XLineColorItem::CreateDefault() { return new XLineColorItem; } XLineColorItem::XLineColorItem(sal_Int32 nIndex, const Color& rTheColor) : - XColorItem(XATTR_LINECOLOR, nIndex, rTheColor) + XColorItem(XATTR_LINECOLOR, nIndex, rTheColor, SfxItemType::XLineColorItemType) { } XLineColorItem::XLineColorItem(const OUString& rName, const Color& rTheColor) : - XColorItem(XATTR_LINECOLOR, rName, rTheColor) + XColorItem(XATTR_LINECOLOR, rName, rTheColor, SfxItemType::XLineColorItemType) { } @@ -1115,12 +1115,12 @@ bool XLineColorItem::PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId) SfxPoolItem* XLineStartItem::CreateDefault() {return new XLineStartItem;} XLineStartItem::XLineStartItem(sal_Int32 nIndex) -: NameOrIndex(XATTR_LINESTART, nIndex) +: NameOrIndex(XATTR_LINESTART, nIndex, SfxItemType::XLineStartItemType) { } XLineStartItem::XLineStartItem(const OUString& rName, basegfx::B2DPolyPolygon aPolyPolygon) -: NameOrIndex(XATTR_LINESTART, rName), +: NameOrIndex(XATTR_LINESTART, rName, SfxItemType::XLineStartItemType), maPolyPolygon(std::move(aPolyPolygon)) { } @@ -1132,7 +1132,7 @@ XLineStartItem::XLineStartItem(const XLineStartItem& rItem) } XLineStartItem::XLineStartItem(basegfx::B2DPolyPolygon aPolyPolygon) -: NameOrIndex( XATTR_LINESTART, -1 ), +: NameOrIndex( XATTR_LINESTART, -1, SfxItemType::XLineStartItemType ), maPolyPolygon(std::move(aPolyPolygon)) { } @@ -1418,12 +1418,12 @@ std::unique_ptr<XLineStartItem> XLineStartItem::checkForUniqueItem( SdrModel& rM SfxPoolItem* XLineEndItem::CreateDefault() {return new XLineEndItem;} XLineEndItem::XLineEndItem(sal_Int32 nIndex) -: NameOrIndex(XATTR_LINEEND, nIndex) +: NameOrIndex(XATTR_LINEEND, nIndex, SfxItemType::XLineEndItemType) { } XLineEndItem::XLineEndItem(const OUString& rName, basegfx::B2DPolyPolygon aPolyPolygon) -: NameOrIndex(XATTR_LINEEND, rName), +: NameOrIndex(XATTR_LINEEND, rName, SfxItemType::XLineEndItemType), maPolyPolygon(std::move(aPolyPolygon)) { } @@ -1435,7 +1435,7 @@ XLineEndItem::XLineEndItem(const XLineEndItem& rItem) } XLineEndItem::XLineEndItem(basegfx::B2DPolyPolygon aPolyPolygon) -: NameOrIndex( XATTR_LINEEND, -1 ), +: NameOrIndex( XATTR_LINEEND, -1, SfxItemType::XLineEndItemType ), maPolyPolygon(std::move(aPolyPolygon)) { } @@ -2007,12 +2007,12 @@ boost::property_tree::ptree XFillStyleItem::dumpAsJSON() const SfxPoolItem* XFillColorItem::CreateDefault() { return new XFillColorItem; } XFillColorItem::XFillColorItem(sal_Int32 nIndex, const Color& rTheColor) : - XColorItem(XATTR_FILLCOLOR, nIndex, rTheColor) + XColorItem(XATTR_FILLCOLOR, nIndex, rTheColor, SfxItemType::XFillColorItemType) { } XFillColorItem::XFillColorItem(const OUString& rName, const Color& rTheColor) : - XColorItem(XATTR_FILLCOLOR, rName, rTheColor) + XColorItem(XATTR_FILLCOLOR, rName, rTheColor, SfxItemType::XFillColorItemType) { } @@ -2177,7 +2177,7 @@ boost::property_tree::ptree XFillColorItem::dumpAsJSON() const } XSecondaryFillColorItem::XSecondaryFillColorItem(const OUString& rName, const Color& rTheColor) : - XColorItem(XATTR_SECONDARYFILLCOLOR, rName, rTheColor) + XColorItem(XATTR_SECONDARYFILLCOLOR, rName, rTheColor, SfxItemType::XSecondaryFillColorItemType) { } @@ -2202,14 +2202,14 @@ SfxPoolItem* XFillGradientItem::CreateDefault() { return new XFillGradientItem; XFillGradientItem::XFillGradientItem(sal_Int32 nIndex, const basegfx::BGradient& rTheGradient) : - NameOrIndex(XATTR_FILLGRADIENT, nIndex), + NameOrIndex(XATTR_FILLGRADIENT, nIndex, SfxItemType::XFillGradientItemType), m_aGradient(rTheGradient) { } XFillGradientItem::XFillGradientItem(const OUString& rName, const basegfx::BGradient& rTheGradient, TypedWhichId<XFillGradientItem> nWhich) - : NameOrIndex(nWhich, rName) + : NameOrIndex(nWhich, rName, SfxItemType::XFillGradientItemType) , m_aGradient(rTheGradient) { } @@ -2221,7 +2221,7 @@ XFillGradientItem::XFillGradientItem(const XFillGradientItem& rItem) : } XFillGradientItem::XFillGradientItem( const basegfx::BGradient& rTheGradient ) -: NameOrIndex( XATTR_FILLGRADIENT, -1 ), +: NameOrIndex( XATTR_FILLGRADIENT, -1, SfxItemType::XFillGradientItemType ), m_aGradient(rTheGradient) { } @@ -2654,7 +2654,7 @@ SfxPoolItem* XFillHatchItem::CreateDefault() { return new XFillHatchItem; } XFillHatchItem::XFillHatchItem(const OUString& rName, const XHatch& rTheHatch) : - NameOrIndex(XATTR_FILLHATCH, rName), + NameOrIndex(XATTR_FILLHATCH, rName, SfxItemType::XFillHatchItemType), m_aHatch(rTheHatch) { } @@ -2666,7 +2666,7 @@ XFillHatchItem::XFillHatchItem(const XFillHatchItem& rItem) : } XFillHatchItem::XFillHatchItem(const XHatch& rTheHatch) -: NameOrIndex( XATTR_FILLHATCH, -1 ), +: NameOrIndex( XATTR_FILLHATCH, -1, SfxItemType::XFillHatchItemType ), m_aHatch(rTheHatch) { } @@ -3027,7 +3027,7 @@ SfxPoolItem* XFormTextShadowColorItem::CreateDefault() { return new XFormTextSha XFormTextShadowColorItem::XFormTextShadowColorItem(const OUString& rName, const Color& rTheColor) : - XColorItem(XATTR_FORMTXTSHDWCOLOR, rName, rTheColor) + XColorItem(XATTR_FORMTXTSHDWCOLOR, rName, rTheColor, SfxItemType::XFormTextShadowColorItemType) { } diff --git a/svx/source/xoutdev/xattrbmp.cxx b/svx/source/xoutdev/xattrbmp.cxx index 740db886d2e9..fba490ba2594 100644 --- a/svx/source/xoutdev/xattrbmp.cxx +++ b/svx/source/xoutdev/xattrbmp.cxx @@ -130,7 +130,7 @@ void XOBitmap::Array2Bitmap() SfxPoolItem* XFillBitmapItem::CreateDefault() { return new XFillBitmapItem; } XFillBitmapItem::XFillBitmapItem(const OUString& rName, const GraphicObject& rGraphicObject) -: NameOrIndex(XATTR_FILLBITMAP, rName), +: NameOrIndex(XATTR_FILLBITMAP, rName, SfxItemType::XFillBitmapItemType), maGraphicObject(rGraphicObject) { } @@ -142,7 +142,7 @@ XFillBitmapItem::XFillBitmapItem(const XFillBitmapItem& rItem) } XFillBitmapItem::XFillBitmapItem(const GraphicObject& rGraphicObject) - : NameOrIndex(XATTR_FILLBITMAP, -1) + : NameOrIndex(XATTR_FILLBITMAP, -1, SfxItemType::XFillBitmapItemType) , maGraphicObject(rGraphicObject) { }