summaryrefslogtreecommitdiff
path: root/oox/source/ole/axcontrol.cxx
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/source/ole/axcontrol.cxx
parent5009c09737c36f078ecde32e8848b0d4ee37f7c1 (diff)
fdo#45724 fix WW8 export of textbox default background color
regression from 5609c512cd4d2899300b432d88d93cff05a05c87 Change-Id: I5f3ce73943b2805b7de1ae41699e605af9086b15
Diffstat (limited to 'oox/source/ole/axcontrol.cxx')
-rw-r--r--oox/source/ole/axcontrol.cxx10
1 files changed, 6 insertions, 4 deletions
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 );