diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2013-11-19 11:55:29 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2013-11-19 17:07:02 +0100 |
commit | cc8f8ae55f681755f5da3bf64e4c30bb713f0383 (patch) | |
tree | e5df935b163030d74a21329457033f2255d25841 /sw | |
parent | a5d7813de1d2e9c3234c5c0c32987c137bdf3ca1 (diff) |
DOCX drawingML shape import: wp:anchor's behindDoc attribute
Also, adapt anchoring to what we have in VML import as well: when the
paragraph moves, the shape should stay at the same place. (This is a bit
odd, as ideally Word does not support at-paragraph anchoring, but this
change results in the behavior what Word does at the end.)
Change-Id: I3b849b2898d303e48920e6056c472f08fbb43af1
Diffstat (limited to 'sw')
-rw-r--r-- | sw/qa/extras/ooxmlimport/data/wps-only.docx | bin | 13141 -> 13196 bytes | |||
-rw-r--r-- | sw/qa/extras/ooxmlimport/ooxmlimport.cxx | 7 |
2 files changed, 6 insertions, 1 deletions
diff --git a/sw/qa/extras/ooxmlimport/data/wps-only.docx b/sw/qa/extras/ooxmlimport/data/wps-only.docx Binary files differindex 5b563b040aa1..d45aa3ed75f8 100644 --- a/sw/qa/extras/ooxmlimport/data/wps-only.docx +++ b/sw/qa/extras/ooxmlimport/data/wps-only.docx diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx index 14c8ba548e41..d8ca06f9cafa 100644 --- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx +++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx @@ -1510,7 +1510,7 @@ DECLARE_OOXMLIMPORT_TEST(testWpsOnly, "wps-only.docx") // Document has wp:anchor, not wp:inline, so handle it accordingly. uno::Reference<drawing::XShape> xShape = getShape(1); text::TextContentAnchorType eValue = getProperty<text::TextContentAnchorType>(xShape, "AnchorType"); - CPPUNIT_ASSERT_EQUAL(text::TextContentAnchorType_AT_CHARACTER, eValue); + CPPUNIT_ASSERT_EQUAL(text::TextContentAnchorType_AT_PARAGRAPH, eValue); // Check position, it was 0. This is a shape, so use getPosition(), not a property. CPPUNIT_ASSERT_EQUAL(sal_Int32(EMU_TO_MM100(671830)), xShape->getPosition().X); @@ -1519,6 +1519,11 @@ DECLARE_OOXMLIMPORT_TEST(testWpsOnly, "wps-only.docx") CPPUNIT_ASSERT_EQUAL(sal_Int32(318), getProperty<sal_Int32>(xShape, "LeftMargin")); // Wrap type was PARALLEL. CPPUNIT_ASSERT_EQUAL(text::WrapTextMode_THROUGHT, getProperty<text::WrapTextMode>(xShape, "Surround")); + + // This should be in front of text. + CPPUNIT_ASSERT_EQUAL(true, bool(getProperty<sal_Bool>(xShape, "Opaque"))); + // And this should be behind the document. + CPPUNIT_ASSERT_EQUAL(false, bool(getProperty<sal_Bool>(getShape(2), "Opaque"))); } DECLARE_OOXMLIMPORT_TEST(testFdo70457, "fdo70457.docx") |