summaryrefslogtreecommitdiff
path: root/sw/source/filter/ww8
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2015-01-31 10:55:39 +0100
committerMiklos Vajna <vmiklos@collabora.co.uk>2015-01-31 10:57:50 +0100
commit60cdeb2d441a6bf5c55f511f574b2b9dd598fbb8 (patch)
tree11f8f3bee96c1318401ebd0a188f25c5edaa4d25 /sw/source/filter/ww8
parent4b9a9ce8a0e5e0716dad9a9ec87d16237e534dc2 (diff)
tdf#88583 MSWordExportBase: fix handling of paragraph background color
Regression from 7d9bb549d498d6beed2c4050c402d09643febdfa (Related: i#124638 Second step of DrawingLayer FillAttributes..., 2014-06-02), the problem was that exporters still expect an SvxBrushItem for the para background color, while doc model was changed to have an XFillStyleItem / XFillColorItem pair instead. Change-Id: Ib94fda103ec35a6f087307aafdd890183d9d935f
Diffstat (limited to 'sw/source/filter/ww8')
-rw-r--r--sw/source/filter/ww8/ww8atr.cxx8
1 files changed, 8 insertions, 0 deletions
diff --git a/sw/source/filter/ww8/ww8atr.cxx b/sw/source/filter/ww8/ww8atr.cxx
index 1a80623d0ac0..9ef456e21312 100644
--- a/sw/source/filter/ww8/ww8atr.cxx
+++ b/sw/source/filter/ww8/ww8atr.cxx
@@ -304,6 +304,14 @@ void MSWordExportBase::OutputItemSet( const SfxItemSet& rSet, bool bPapFmt, bool
(nWhich >= XATTR_FILL_FIRST && nWhich < XATTR_FILL_LAST))
AttrOutput().OutputItem( *pItem );
}
+
+ // Has to be called after RES_PARATR_GRABBAG is processed.
+ const XFillStyleItem* pXFillStyleItem(static_cast<const XFillStyleItem*>(rSet.GetItem(XATTR_FILLSTYLE)));
+ if (pXFillStyleItem && pXFillStyleItem->GetValue() == drawing::FillStyle_SOLID && !rSet.HasItem(RES_BACKGROUND))
+ {
+ // Construct an SvxBrushItem, as expected by the exporters.
+ AttrOutput().OutputItem(getSvxBrushItemFromSourceSet(rSet, RES_BACKGROUND));
+ }
}
pISet = 0; // fuer Doppel-Attribute
}