diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-02-01 14:35:34 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-02-02 07:46:43 +0100 |
commit | 13d6bfa5bb017ad2b107c9db982369ea050ccbdf (patch) | |
tree | 4eed6571e68c79f5b49426bfd9f6569de4fe4e3c /svx | |
parent | a3c78bbee81a82bb50ed2b92944d9946348f73ad (diff) |
convert OfaRefItem to a normal class
only instantiated with one type, so just turn it into a normal class
Change-Id: If3ae908f3e226ae9f4d3b81a7a7d9ba492ccda4f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129283
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svx')
-rw-r--r-- | svx/sdi/svxitems.sdi | 2 | ||||
-rw-r--r-- | svx/source/items/ofaitem.cxx | 16 |
2 files changed, 17 insertions, 1 deletions
diff --git a/svx/sdi/svxitems.sdi b/svx/sdi/svxitems.sdi index 549ffc3f3227..a7d376130539 100644 --- a/svx/sdi/svxitems.sdi +++ b/svx/sdi/svxitems.sdi @@ -196,7 +196,7 @@ item INT32 SdrAngleItem; // derived from SfxInt32Item item INT16 SdrTextFitToSizeTypeItem; // enum item String SfxStringListItem; // serialized into one concatenated string item double SvxDoubleItem; -item String OfaRefItem; +item String OfaXColorListItem; item String SvxDashListItem; item String SvxLineEndListItem; item String SvxColorListItem; diff --git a/svx/source/items/ofaitem.cxx b/svx/source/items/ofaitem.cxx index 3bffd661ed0f..688507592b40 100644 --- a/svx/source/items/ofaitem.cxx +++ b/svx/source/items/ofaitem.cxx @@ -19,6 +19,7 @@ #include <svx/ofaitem.hxx> +#include <svx/xtable.hxx> OfaPtrItem::OfaPtrItem( sal_uInt16 _nWhich, void *_pPtr ) : SfxPoolItem( _nWhich ), pPtr( _pPtr ) @@ -37,4 +38,19 @@ OfaPtrItem* OfaPtrItem::Clone( SfxItemPool * ) const return new OfaPtrItem( *this ); } +OfaXColorListItem::OfaXColorListItem( sal_uInt16 _nWhich, const rtl::Reference<XColorList> &xRef ) + : SfxPoolItem( _nWhich ), mxRef( xRef ) +{} + +bool OfaXColorListItem::operator==( const SfxPoolItem& rItem ) const +{ + return SfxPoolItem::operator==(rItem) + && mxRef == static_cast<OfaXColorListItem const &>(rItem).mxRef; +} + +OfaXColorListItem* OfaXColorListItem::Clone( SfxItemPool* /*pPool = 0*/ ) const +{ + return new OfaXColorListItem( *this ); +} + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |