summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/editeng/colritem.hxx36
1 files changed, 28 insertions, 8 deletions
diff --git a/include/editeng/colritem.hxx b/include/editeng/colritem.hxx
index e1bf9e0c0a5d..b9fcd4c228bd 100644
--- a/include/editeng/colritem.hxx
+++ b/include/editeng/colritem.hxx
@@ -61,17 +61,37 @@ public:
};
// XXX: to be moved in a separate header.
-class EDITENG_DLLPUBLIC SvxBackgroundColorItem final : public SvxColorItem
+class EDITENG_DLLPUBLIC SvxBackgroundColorItem final : public SfxPoolItem
{
- public:
- static SfxPoolItem* CreateDefault();
+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;
- SvxBackgroundColorItem(const sal_uInt16 nId);
- SvxBackgroundColorItem(const Color& rCol, const sal_uInt16 nId);
+ virtual SvxBackgroundColorItem* Clone(SfxItemPool* pPool = nullptr) const override;
+ SvxBackgroundColorItem(SvxBackgroundColorItem const &) = default; // SfxPoolItem copy function dichotomy
- virtual SfxPoolItem* Clone(SfxItemPool* pPool = nullptr) 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;
+ const Color& GetValue() const
+ {
+ return mColor;
+ }
+
+ void SetValue(const Color& rNewColor);
+
+ void dumpAsXml(xmlTextWriterPtr pWriter) const override;
};
#endif