[Libreoffice-commits] core.git: sw/qa writerfilter/source

Miklos Vajna vmiklos at collabora.co.uk
Fri May 16 07:32:49 PDT 2014


 sw/qa/extras/ooxmlimport/data/inline-groupshape.docx |binary
 sw/qa/extras/ooxmlimport/ooxmlimport.cxx             |    6 ++++++
 writerfilter/source/dmapper/GraphicImport.cxx        |    4 ++++
 3 files changed, 10 insertions(+)

New commits:
commit e25bdf7f602ce7d3d941c07b8c1cf5740e2b0a85
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Fri May 16 15:57:09 2014 +0200

    DOCX import: make sure inline shapes are not in the background
    
    Change-Id: I80d684662ac3f94bff4448fcdae94f9e69fd1590

diff --git a/sw/qa/extras/ooxmlimport/data/inline-groupshape.docx b/sw/qa/extras/ooxmlimport/data/inline-groupshape.docx
new file mode 100644
index 0000000..def5a05
Binary files /dev/null and b/sw/qa/extras/ooxmlimport/data/inline-groupshape.docx differ
diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
index 5c08d7a..3e2f2ac 100644
--- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
+++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
@@ -2120,6 +2120,12 @@ DECLARE_OOXMLIMPORT_TEST(testChartSize, "chart-size.docx")
     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
 
 CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/writerfilter/source/dmapper/GraphicImport.cxx b/writerfilter/source/dmapper/GraphicImport.cxx
index 59f27fc..1d19df0 100644
--- a/writerfilter/source/dmapper/GraphicImport.cxx
+++ b/writerfilter/source/dmapper/GraphicImport.cxx
@@ -723,6 +723,10 @@ void GraphicImport::lcl_attribute(Id nName, Value& rValue)
                              uno::makeAny
                              (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);
 
                         // TextFrames can't be rotated. But for anything else,


More information about the Libreoffice-commits mailing list