summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sw/qa/extras/odfimport/data/tdf96113.odtbin0 -> 13364 bytes
-rw-r--r--sw/qa/extras/odfimport/odfimport.cxx6
-rw-r--r--sw/source/core/unocore/unoframe.cxx2
3 files changed, 7 insertions, 1 deletions
diff --git a/sw/qa/extras/odfimport/data/tdf96113.odt b/sw/qa/extras/odfimport/data/tdf96113.odt
new file mode 100644
index 000000000000..ede7b078175e
--- /dev/null
+++ b/sw/qa/extras/odfimport/data/tdf96113.odt
Binary files differ
diff --git a/sw/qa/extras/odfimport/odfimport.cxx b/sw/qa/extras/odfimport/odfimport.cxx
index 105e046e29db..5c60935174b2 100644
--- a/sw/qa/extras/odfimport/odfimport.cxx
+++ b/sw/qa/extras/odfimport/odfimport.cxx
@@ -613,6 +613,12 @@ DECLARE_ODFIMPORT_TEST(testTdf92586, "tdf92586.odt")
CPPUNIT_ASSERT_EQUAL(drawing::BitmapMode_STRETCH, getProperty<drawing::BitmapMode>(xPageStyle, "FillBitmapMode"));
}
+DECLARE_ODFIMPORT_TEST(testTdf96113, "tdf96113.odt")
+{
+ // Background of the formula frame was white (0xffffff), not green.
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(0x00ff00), getProperty<sal_Int32>(getShape(1), "BackColor"));
+}
+
#endif
CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/sw/source/core/unocore/unoframe.cxx b/sw/source/core/unocore/unoframe.cxx
index dd9f7894531a..ab14e38299c9 100644
--- a/sw/source/core/unocore/unoframe.cxx
+++ b/sw/source/core/unocore/unoframe.cxx
@@ -1803,7 +1803,7 @@ void SwXFrame::setPropertyValue(const :: OUString& rPropertyName, const :: uno::
if(RES_BACKGROUND == pEntry->nWID)
{
const SwAttrSet& rSet = pFormat->GetAttrSet();
- const SvxBrushItem aOriginalBrushItem(getSvxBrushItemFromSourceSet(rSet, RES_BACKGROUND));
+ const SvxBrushItem aOriginalBrushItem(getSvxBrushItemFromSourceSet(rSet, RES_BACKGROUND, true, pDoc->IsInXMLImport()));
SvxBrushItem aChangedBrushItem(aOriginalBrushItem);
aChangedBrushItem.PutValue(aValue, nMemberId);