summaryrefslogtreecommitdiff
path: root/oox
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@suse.cz>2012-07-31 11:18:31 +0200
committerMiklos Vajna <vmiklos@suse.cz>2012-08-01 10:57:09 +0200
commit684539e19ef7a54afcb2c4f24ba966ec04a2ad87 (patch)
tree4815b39ce60ea70c553ed0c5405b39d90eb1ef66 /oox
parent5009c09737c36f078ecde32e8848b0d4ee37f7c1 (diff)
fdo#45724 fix WW8 export of textbox default background color
regression from 5609c512cd4d2899300b432d88d93cff05a05c87 Change-Id: I5f3ce73943b2805b7de1ae41699e605af9086b15
Diffstat (limited to 'oox')
-rw-r--r--oox/inc/oox/ole/axcontrol.hxx3
-rw-r--r--oox/source/ole/axcontrol.cxx10
2 files changed, 8 insertions, 5 deletions
diff --git a/oox/inc/oox/ole/axcontrol.hxx b/oox/inc/oox/ole/axcontrol.hxx
index da042b94010e..4c453c32dbd5 100644
--- a/oox/inc/oox/ole/axcontrol.hxx
+++ b/oox/inc/oox/ole/axcontrol.hxx
@@ -219,7 +219,8 @@ public:
void convertToMSColor(
PropertySet& rPropSet,
sal_Int32 nPropId,
- sal_uInt32& nOleColor ) const;
+ sal_uInt32& nOleColor,
+ sal_uInt32 nDefault = 0 ) const;
/** Converts the passed StdPic picture stream to UNO properties. */
diff --git a/oox/source/ole/axcontrol.cxx b/oox/source/ole/axcontrol.cxx
index 4e113af36b40..30aee564eebe 100644
--- a/oox/source/ole/axcontrol.cxx
+++ b/oox/source/ole/axcontrol.cxx
@@ -273,11 +273,13 @@ void ControlConverter::convertColor( PropertyMap& rPropMap, sal_Int32 nPropId, s
rPropMap.setProperty( nPropId, OleHelper::decodeOleColor( mrGraphicHelper, nOleColor, mbDefaultColorBgr ) );
}
-void ControlConverter::convertToMSColor( PropertySet& rPropSet, sal_Int32 nPropId, sal_uInt32& nOleColor ) const
+void ControlConverter::convertToMSColor( PropertySet& rPropSet, sal_Int32 nPropId, sal_uInt32& nOleColor, sal_uInt32 nDefault ) const
{
sal_uInt32 nRGB = 0;
- rPropSet.getProperty( nRGB, nPropId );
- nOleColor = OleHelper::encodeOleColor( nRGB );
+ if (rPropSet.getProperty( nRGB, nPropId ))
+ nOleColor = OleHelper::encodeOleColor( nRGB );
+ else
+ nOleColor = nDefault;
}
void ControlConverter::convertPicture( PropertyMap& rPropMap, const StreamDataSequence& rPicData ) const
{
@@ -1717,7 +1719,7 @@ void AxTextBoxModel::convertFromProperties( PropertySet& rPropSet, const Control
if ( rPropSet.getProperty( bRes, PROP_VScroll ) )
setFlag( mnScrollBars, AX_SCROLLBAR_VERTICAL, bRes );
- rConv.convertToMSColor( rPropSet, PROP_BackgroundColor, mnBackColor );
+ rConv.convertToMSColor( rPropSet, PROP_BackgroundColor, mnBackColor, 0x80000005L );
rConv.convertToAxBorder( rPropSet, mnBorderColor, mnBorderStyle, mnSpecialEffect );
AxMorphDataModelBase::convertFromProperties( rPropSet, rConv );