summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sw/qa/extras/ooxmlimport/ooxmlimport.cxx3
-rw-r--r--sw/source/core/unocore/unoframe.cxx12
2 files changed, 10 insertions, 5 deletions
diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
index 4619fb74cb68..da5472d68560 100644
--- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
+++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
@@ -1678,8 +1678,6 @@ DECLARE_OOXMLIMPORT_TEST(testMceWpg, "mce-wpg.docx")
getParagraphOfText(1, xText, "DML1");
}
-#if 0
-// FIXME port to FillAttributes
DECLARE_OOXMLIMPORT_TEST(testMceNested, "mce-nested.docx")
{
// Vertical position of the textbox was incorrect due to incorrect nested mce handling.
@@ -1704,7 +1702,6 @@ DECLARE_OOXMLIMPORT_TEST(testMceNested, "mce-nested.docx")
CPPUNIT_ASSERT_EQUAL(awt::FontWeight::BOLD, getProperty<float>(getRun(xParagraph, 1), "CharWeight"));
CPPUNIT_ASSERT_EQUAL(drawing::TextVerticalAdjust_BOTTOM, getProperty<drawing::TextVerticalAdjust>(xGroup->getByIndex(1), "TextVerticalAdjust"));
}
-#endif
DECLARE_OOXMLIMPORT_TEST(testMissingPath, "missing-path.docx")
{
diff --git a/sw/source/core/unocore/unoframe.cxx b/sw/source/core/unocore/unoframe.cxx
index b77266a80e47..8258f86e7e0a 100644
--- a/sw/source/core/unocore/unoframe.cxx
+++ b/sw/source/core/unocore/unoframe.cxx
@@ -332,10 +332,10 @@ bool BaseFrameProperties_Impl::FillBaseProperties(SfxItemSet& rToSet, const SfxI
if(bXFillStyleItemUsed)
{
+ XFillStyleItem aXFillStyleItem;
+
if(pXFillStyleItem)
{
- XFillStyleItem aXFillStyleItem;
-
aXFillStyleItem.PutValue(*pXFillStyleItem);
rToSet.Put(aXFillStyleItem);
}
@@ -348,6 +348,14 @@ bool BaseFrameProperties_Impl::FillBaseProperties(SfxItemSet& rToSet, const SfxI
aXFillColorItem.PutValue(*pXFillColorItem);
rToSet.Put(aXFillColorItem);
}
+ else if (aXFillStyleItem.GetValue() == XFILL_SOLID && pCol)
+ {
+ // Fill style set to solid, but no fill color is given.
+ // On the other hand, we have a BackColor, so use that.
+ SvxBrushItem aBrush(RES_BACKGROUND);
+ aBrush.PutValue(*pCol, MID_BACK_COLOR);
+ sw::setSvxBrushItemAsFillAttributesToTargetSet(aBrush, rToSet);
+ }
if(pXFillGradientItem || pXFillGradientNameItem)
{