Kaydet (Commit) 684539e1 authored tarafından Miklos Vajna's avatar Miklos Vajna

fdo#45724 fix WW8 export of textbox default background color

regression from 5609c512

Change-Id: I5f3ce73943b2805b7de1ae41699e605af9086b15
üst 5009c097
...@@ -219,7 +219,8 @@ public: ...@@ -219,7 +219,8 @@ public:
void convertToMSColor( void convertToMSColor(
PropertySet& rPropSet, PropertySet& rPropSet,
sal_Int32 nPropId, sal_Int32 nPropId,
sal_uInt32& nOleColor ) const; sal_uInt32& nOleColor,
sal_uInt32 nDefault = 0 ) const;
/** Converts the passed StdPic picture stream to UNO properties. */ /** Converts the passed StdPic picture stream to UNO properties. */
......
...@@ -273,11 +273,13 @@ void ControlConverter::convertColor( PropertyMap& rPropMap, sal_Int32 nPropId, s ...@@ -273,11 +273,13 @@ void ControlConverter::convertColor( PropertyMap& rPropMap, sal_Int32 nPropId, s
rPropMap.setProperty( nPropId, OleHelper::decodeOleColor( mrGraphicHelper, nOleColor, mbDefaultColorBgr ) ); 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; sal_uInt32 nRGB = 0;
rPropSet.getProperty( nRGB, nPropId ); if (rPropSet.getProperty( nRGB, nPropId ))
nOleColor = OleHelper::encodeOleColor( nRGB ); nOleColor = OleHelper::encodeOleColor( nRGB );
else
nOleColor = nDefault;
} }
void ControlConverter::convertPicture( PropertyMap& rPropMap, const StreamDataSequence& rPicData ) const void ControlConverter::convertPicture( PropertyMap& rPropMap, const StreamDataSequence& rPicData ) const
{ {
...@@ -1717,7 +1719,7 @@ void AxTextBoxModel::convertFromProperties( PropertySet& rPropSet, const Control ...@@ -1717,7 +1719,7 @@ void AxTextBoxModel::convertFromProperties( PropertySet& rPropSet, const Control
if ( rPropSet.getProperty( bRes, PROP_VScroll ) ) if ( rPropSet.getProperty( bRes, PROP_VScroll ) )
setFlag( mnScrollBars, AX_SCROLLBAR_VERTICAL, bRes ); 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 ); rConv.convertToAxBorder( rPropSet, mnBorderColor, mnBorderStyle, mnSpecialEffect );
AxMorphDataModelBase::convertFromProperties( rPropSet, rConv ); AxMorphDataModelBase::convertFromProperties( rPropSet, rConv );
......
...@@ -1648,6 +1648,8 @@ void SwBasicEscherEx::WriteBrushAttr(const SvxBrushItem &rBrush, ...@@ -1648,6 +1648,8 @@ void SwBasicEscherEx::WriteBrushAttr(const SvxBrushItem &rBrush,
bool lcl_isInHeader(const SwFrmFmt& rFmt) bool lcl_isInHeader(const SwFrmFmt& rFmt)
{ {
const SwFlyFrmFmt* pFlyFrmFmt = dynamic_cast<const SwFlyFrmFmt*>(&rFmt); const SwFlyFrmFmt* pFlyFrmFmt = dynamic_cast<const SwFlyFrmFmt*>(&rFmt);
if (!pFlyFrmFmt)
return false;
SwFlyFrm* pFlyFrm = const_cast<SwFlyFrm*>(pFlyFrmFmt->GetFrm()); SwFlyFrm* pFlyFrm = const_cast<SwFlyFrm*>(pFlyFrmFmt->GetFrm());
SwPageFrm* pPageFrm = pFlyFrm->FindPageFrmOfAnchor(); SwPageFrm* pPageFrm = pFlyFrm->FindPageFrmOfAnchor();
SwFrm* pHeader = pPageFrm->Lower(); SwFrm* pHeader = pPageFrm->Lower();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment