summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2015-08-27 12:21:37 +0100
committerMichael Meeks <michael.meeks@collabora.com>2015-08-28 11:29:29 +0000
commit27f6ddefd4b845f3d51221681c864490fa9b580b (patch)
tree4e88097c4d2efe0fb5659b95adf898ba543d1c60 /include
parent4970009499a5dfb634b25dc144ee35bac0cf9d31 (diff)
don't write SvxBackgroundColorItem via inherited SvxColorItem::Store
SvxBackgroundColorItem inherits from SvxColorItem and for backwards compatibility with the StarOffice 5 binary file format (yes, really) writes/reads only rgb and not the transparency value, so copying and pasting text from a sidebar comment in writer to itself or another one results in a black character background as the default COL_AUTO turns into black (cherry picked from commit 3bc69b1d0d8620afd89a993b5f6bc46a2ff5267f) Change-Id: I18b5105dd8e060b9e49dda6026e26d3a0f00d8f5 Reviewed-on: https://gerrit.libreoffice.org/18074 Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Michael Meeks <michael.meeks@collabora.com>
Diffstat (limited to 'include')
-rw-r--r--include/editeng/colritem.hxx10
-rw-r--r--include/tools/color.hxx4
2 files changed, 7 insertions, 7 deletions
diff --git a/include/editeng/colritem.hxx b/include/editeng/colritem.hxx
index bead03e14e45..81f4ac5d321a 100644
--- a/include/editeng/colritem.hxx
+++ b/include/editeng/colritem.hxx
@@ -91,11 +91,11 @@ class EDITENG_DLLPUBLIC SvxBackgroundColorItem : public SvxColorItem
SvxBackgroundColorItem( SvStream& rStrm, const sal_uInt16 nId );
SvxBackgroundColorItem( const SvxBackgroundColorItem& rCopy );
- virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const SAL_OVERRIDE;
- virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const SAL_OVERRIDE;
-
- virtual bool QueryValue(com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0) const SAL_OVERRIDE;
- virtual bool PutValue(const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0) SAL_OVERRIDE;
+ virtual SfxPoolItem* Clone(SfxItemPool* pPool = 0) const SAL_OVERRIDE;
+ virtual SvStream& Store(SvStream& rStream, sal_uInt16 nVersion) const SAL_OVERRIDE;
+ virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const SAL_OVERRIDE;
+ virtual bool QueryValue(css::uno::Any& rVal, sal_uInt8 nMemberId = 0) const SAL_OVERRIDE;
+ virtual bool PutValue(const css::uno::Any& rVal, sal_uInt8 nMemberId) SAL_OVERRIDE;
};
#endif
diff --git a/include/tools/color.hxx b/include/tools/color.hxx
index ea921878e48c..15ba3df1dc6d 100644
--- a/include/tools/color.hxx
+++ b/include/tools/color.hxx
@@ -156,8 +156,8 @@ public:
bool operator!=( const Color& rColor ) const
{ return !(Color::operator==( rColor )); }
- SvStream& Read( SvStream& rIStm, bool bNewFormat = true );
- SvStream& Write( SvStream& rOStm, bool bNewFormat = true );
+ SvStream& Read(SvStream& rIStream, bool bNewFormat = true);
+ SvStream& Write(SvStream& rOStream, bool bNewFormat = true) const;
TOOLS_DLLPUBLIC friend SvStream& ReadColor( SvStream& rIStream, Color& rColor );
TOOLS_DLLPUBLIC friend SvStream& WriteColor( SvStream& rOStream, const Color& rColor );