diff options
author | Miklos Vajna <vmiklos@suse.cz> | 2012-07-31 11:18:31 +0200 |
---|---|---|
committer | Noel Power <noel.power@novell.com> | 2012-08-01 10:24:02 +0100 |
commit | 1db74f95ca260b65e04f7ed3e11f2bb36d3d8414 (patch) | |
tree | 3e69b2d84071cb0d061e9318f666dc30a534438a | |
parent | 557e31707bccfaf0b1238a17242e32fbbddc8f1d (diff) |
fdo#45724 fix WW8 export of textbox default background color
regression from 5609c512cd4d2899300b432d88d93cff05a05c87
Change-Id: I5f3ce73943b2805b7de1ae41699e605af9086b15
-rw-r--r-- | oox/inc/oox/ole/axcontrol.hxx | 3 | ||||
-rw-r--r-- | oox/source/ole/axcontrol.cxx | 10 |
2 files changed, 8 insertions, 5 deletions
diff --git a/oox/inc/oox/ole/axcontrol.hxx b/oox/inc/oox/ole/axcontrol.hxx index ee3a9acc5c53..153aaf685a2d 100644 --- a/oox/inc/oox/ole/axcontrol.hxx +++ b/oox/inc/oox/ole/axcontrol.hxx @@ -227,7 +227,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 6013f7544dd7..ff86c8dc5385 100644 --- a/oox/source/ole/axcontrol.cxx +++ b/oox/source/ole/axcontrol.cxx @@ -281,11 +281,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 { @@ -1725,7 +1727,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 ); |