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:
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. */
......
......@@ -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 );
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 );
......
......@@ -1648,6 +1648,8 @@ void SwBasicEscherEx::WriteBrushAttr(const SvxBrushItem &rBrush,
bool lcl_isInHeader(const SwFrmFmt& rFmt)
{
const SwFlyFrmFmt* pFlyFrmFmt = dynamic_cast<const SwFlyFrmFmt*>(&rFmt);
if (!pFlyFrmFmt)
return false;
SwFlyFrm* pFlyFrm = const_cast<SwFlyFrm*>(pFlyFrmFmt->GetFrm());
SwPageFrm* pPageFrm = pFlyFrm->FindPageFrmOfAnchor();
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