Kaydet (Commit) a5c475c2 authored tarafından Miklos Vajna's avatar Miklos Vajna

Santa Claus brings fixed background color of textframes in drawingml import

Change-Id: Ie2b6885aae5e26c3d29d372da730837cb7dc97ce
üst e661d295
...@@ -613,6 +613,12 @@ Reference< XShape > Shape::createAndInsert( ...@@ -613,6 +613,12 @@ Reference< XShape > Shape::createAndInsert(
{ {
if (aServiceName == "com.sun.star.text.TextFrame") if (aServiceName == "com.sun.star.text.TextFrame")
{ {
// TextFrames have BackColor, not FillColor
if (aShapeProps.hasProperty(PROP_FillColor))
{
aShapeProps.setProperty(PROP_BackColor, aShapeProps[PROP_FillColor]);
aShapeProps.erase(PROP_FillColor);
}
// TextFrames have BackColorTransparency, not FillTransparence // TextFrames have BackColorTransparency, not FillTransparence
if (aShapeProps.hasProperty(PROP_FillTransparence)) if (aShapeProps.hasProperty(PROP_FillTransparence))
{ {
......
...@@ -1591,6 +1591,8 @@ DECLARE_OOXMLIMPORT_TEST(testMceNested, "mce-nested.docx") ...@@ -1591,6 +1591,8 @@ DECLARE_OOXMLIMPORT_TEST(testMceNested, "mce-nested.docx")
uno::Reference<beans::XPropertySet> xFrame(xIndexAccess->getByIndex(0), uno::UNO_QUERY); uno::Reference<beans::XPropertySet> xFrame(xIndexAccess->getByIndex(0), uno::UNO_QUERY);
// positionV's posOffset from the bugdoc, was 0. // positionV's posOffset from the bugdoc, was 0.
CPPUNIT_ASSERT_EQUAL(sal_Int32(EMU_TO_MM100(2514600)), getProperty<sal_Int32>(xFrame, "VertOrientPosition")); CPPUNIT_ASSERT_EQUAL(sal_Int32(EMU_TO_MM100(2514600)), getProperty<sal_Int32>(xFrame, "VertOrientPosition"));
// This was -1 (default), make sure the background color is set.
CPPUNIT_ASSERT_EQUAL(sal_Int32(0x4f81bd), getProperty<sal_Int32>(xFrame, "BackColor"));
} }
DECLARE_OOXMLIMPORT_TEST(testFdo70457, "fdo70457.docx") DECLARE_OOXMLIMPORT_TEST(testFdo70457, "fdo70457.docx")
......
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