diff options
author | Gülşah Köse <gulsah.kose@collabora.com> | 2021-05-28 01:23:53 +0300 |
---|---|---|
committer | Gülşah Köse <gulsah.kose@collabora.com> | 2021-05-31 11:36:18 +0200 |
commit | 936af331ba6f5073aeaa0f10f5f2af1def1d74c6 (patch) | |
tree | e145eb9a5f7b9fe05a7f7832cf6eb76388cc4662 /include/editeng | |
parent | 7d34a7777cfeec112ab5cdabba059d01d8876be4 (diff) |
Clean redundant SvxBackgroundColorItem and use SvxColorItem instead.
SvxBackgroundColorItem is just copied from SvxColorItem. There is
nothing special to SvxBackgroundColorItem class. SvxColorItem is a
generic item and it's used on many places related with colors. We can
use SvxColorItem for background colors too.
Change-Id: Iacea31a7557b806e95f5859ff60add9a2626ec05
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116282
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Tested-by: Jenkins
Diffstat (limited to 'include/editeng')
-rw-r--r-- | include/editeng/colritem.hxx | 34 | ||||
-rw-r--r-- | include/editeng/eeitem.hxx | 3 |
2 files changed, 1 insertions, 36 deletions
diff --git a/include/editeng/colritem.hxx b/include/editeng/colritem.hxx index 8e081fc6aab1..630648adea19 100644 --- a/include/editeng/colritem.hxx +++ b/include/editeng/colritem.hxx @@ -60,40 +60,6 @@ public: void dumpAsXml(xmlTextWriterPtr pWriter) const override; }; -// XXX: to be moved in a separate header. -class EDITENG_DLLPUBLIC SvxBackgroundColorItem final : public SfxPoolItem -{ -private: - Color mColor; - -public: - static SfxPoolItem* CreateDefault(); - - SvxBackgroundColorItem(const sal_uInt16 nId); - SvxBackgroundColorItem(const Color& rCol, const sal_uInt16 nId); - virtual ~SvxBackgroundColorItem() override; - - virtual bool operator==(const SfxPoolItem& rPoolItem) const override; - 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 bool GetPresentation(SfxItemPresentation ePres, - MapUnit eCoreMetric, MapUnit ePresMetric, - OUString &rText, const IntlWrapper& rIntlWrapper) const override; - - virtual SvxBackgroundColorItem* Clone(SfxItemPool* pPool = nullptr) const override; - SvxBackgroundColorItem(SvxBackgroundColorItem const &) = default; // SfxPoolItem copy function dichotomy - - const Color& GetValue() const - { - return mColor; - } - - void SetValue(const Color& rNewColor); - - void dumpAsXml(xmlTextWriterPtr pWriter) const override; -}; - #endif /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/editeng/eeitem.hxx b/include/editeng/eeitem.hxx index 667890bf58c4..e4908ee59e0c 100644 --- a/include/editeng/eeitem.hxx +++ b/include/editeng/eeitem.hxx @@ -28,7 +28,6 @@ class SfxGrabBagItem; class SfxInt16Item; class SvxAdjustItem; class SvxAutoKernItem; -class SvxBackgroundColorItem; class SvxCaseMapItem; class SvxCharReliefItem; class SvxCharScaleWidthItem; @@ -127,7 +126,7 @@ constexpr TypedWhichId<SvXMLAttrContainerItem> EE_CHAR_XMLATTRIBS (EE_CHAR_S constexpr TypedWhichId<SvxOverlineItem> EE_CHAR_OVERLINE (EE_CHAR_START+29); constexpr TypedWhichId<SvxCaseMapItem> EE_CHAR_CASEMAP (EE_CHAR_START+30); constexpr TypedWhichId<SfxGrabBagItem> EE_CHAR_GRABBAG (EE_CHAR_START+31); -constexpr TypedWhichId<SvxBackgroundColorItem> EE_CHAR_BKGCOLOR (EE_CHAR_START+32); +constexpr TypedWhichId<SvxColorItem> EE_CHAR_BKGCOLOR (EE_CHAR_START+32); constexpr sal_uInt16 EE_CHAR_END (EE_CHAR_START + 32); |