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

DOCX drawingML shape import: always set Opaque

If behindDoc was 0, we did not set Opaque, so it went into the
background, fix this.

Change-Id: Id5aa683ffb388b1f4de33dcb19559729db5a4e02
üst 95f60222
......@@ -1561,6 +1561,8 @@ DECLARE_OOXMLIMPORT_TEST(textboxWpgOnly, "textbox-wpg-only.docx")
// The relativeFrom attribute was ignored for groupshapes, i.e. these were text::RelOrientation::FRAME.
CPPUNIT_ASSERT_EQUAL(text::RelOrientation::PAGE_FRAME, getProperty<sal_Int16>(xShape, "HoriOrientRelation"));
CPPUNIT_ASSERT_EQUAL(text::RelOrientation::PAGE_FRAME, getProperty<sal_Int16>(xShape, "VertOrientRelation"));
// Make sure the shape is not in the background, as we have behindDoc="0" in the doc.
CPPUNIT_ASSERT_EQUAL(true, bool(getProperty<sal_Bool>(xShape, "Opaque")));
// The 3 paragraphs on the rectangles inside the groupshape ended up in the
// body text, make sure we don't have multiple paragraphs there anymore.
......
......@@ -1043,8 +1043,7 @@ void GraphicImport::lcl_attribute(Id nName, Value & val)
m_pImpl->applyMargins(xShapeProps);
bool bOpaque = m_pImpl->bOpaque && !m_pImpl->rDomainMapper.IsInHeaderFooter();
if (!bOpaque)
xShapeProps->setPropertyValue("Opaque", uno::makeAny(bOpaque));
xShapeProps->setPropertyValue("Opaque", uno::makeAny(bOpaque));
xShapeProps->setPropertyValue("Surround", uno::makeAny(m_pImpl->nWrap));
}
}
......
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