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

DOCX import: make sure inline shapes are not in the background

Change-Id: I80d684662ac3f94bff4448fcdae94f9e69fd1590
üst e0d94ef4
...@@ -2120,6 +2120,12 @@ DECLARE_OOXMLIMPORT_TEST(testChartSize, "chart-size.docx") ...@@ -2120,6 +2120,12 @@ DECLARE_OOXMLIMPORT_TEST(testChartSize, "chart-size.docx")
CPPUNIT_ASSERT_EQUAL(sal_Int32(6008), getProperty<sal_Int32>(xEmbeddedObjects->getByIndex(0), "Width")); CPPUNIT_ASSERT_EQUAL(sal_Int32(6008), getProperty<sal_Int32>(xEmbeddedObjects->getByIndex(0), "Width"));
} }
DECLARE_OOXMLIMPORT_TEST(testInlineGroupshape, "inline-groupshape.docx")
{
// Inline groupshape was in the background, so it was hidden sometimes by other shapes.
CPPUNIT_ASSERT_EQUAL(true, getProperty<bool>(getShape(1), "Opaque"));
}
#endif #endif
CPPUNIT_PLUGIN_IMPLEMENT(); CPPUNIT_PLUGIN_IMPLEMENT();
......
...@@ -723,6 +723,10 @@ void GraphicImport::lcl_attribute(Id nName, Value& rValue) ...@@ -723,6 +723,10 @@ void GraphicImport::lcl_attribute(Id nName, Value& rValue)
uno::makeAny uno::makeAny
(text::TextContentAnchorType_AS_CHARACTER)); (text::TextContentAnchorType_AS_CHARACTER));
// In Word, if a shape is anchored inline, that
// excludes being in the background.
xShapeProps->setPropertyValue("Opaque", uno::makeAny(true));
uno::Reference<lang::XServiceInfo> xServiceInfo(m_xShape, uno::UNO_QUERY_THROW); uno::Reference<lang::XServiceInfo> xServiceInfo(m_xShape, uno::UNO_QUERY_THROW);
// TextFrames can't be rotated. But for anything else, // TextFrames can't be rotated. But for anything else,
......
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