summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf88583.odtbin0 -> 8471 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport.cxx7
-rw-r--r--sw/source/filter/ww8/ww8atr.cxx8
3 files changed, 15 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlexport/data/tdf88583.odt b/sw/qa/extras/ooxmlexport/data/tdf88583.odt
new file mode 100644
index 000000000000..307ab1e780d7
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf88583.odt
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
index c4a7934f3a1f..64dcfd75cdb9 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
@@ -606,6 +606,13 @@ DECLARE_OOXMLEXPORT_TEST(testNumOverrideStart, "num-override-start.docx")
CPPUNIT_ASSERT_EQUAL(sal_Int16(3), comphelper::SequenceAsHashMap(xRules->getByIndex(1))["StartWith"].get<sal_Int16>());
}
+DECLARE_OOXMLEXPORT_TEST(testTdf88583, "tdf88583.odt")
+{
+ if (xmlDocPtr pXmlDoc = parseExport())
+ // <w:pPr> had no <w:shd> child element, paragraph background was lost.
+ assertXPath(pXmlDoc, "//w:pPr/w:shd", "fill", "00CC00");
+}
+
CPPUNIT_PLUGIN_IMPLEMENT();
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/ww8/ww8atr.cxx b/sw/source/filter/ww8/ww8atr.cxx
index 5c87dd6e9c2a..d105bf55638d 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
}