diff options
author | Miklos Vajna <vmiklos@suse.cz> | 2013-07-04 10:55:50 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@suse.cz> | 2013-07-04 11:18:24 +0200 |
commit | f5b7acac624f07fa95835b6054b8d295901bb1dd (patch) | |
tree | ad3f8f721ccac4b7018a96051c645996461e78fd /sw/qa | |
parent | 25bfc4a4e6fd34c10d352c87e38e36c9303edfd2 (diff) |
bnc#820504 VML import: don't anchor shapes TO_PAGE
In theory, this is a problem because Word formats only support AT_CHAR
and AS_CHAR, so importing something as AT_PAGE is buggy.
In practice, this also leads to unvisible shapes, since
f0d001a378c64ea457e722266e60c96522c72e9b.
Change-Id: Ie730d67a789ef12734cede1f9b6c27764a66f237
Diffstat (limited to 'sw/qa')
-rw-r--r-- | sw/qa/extras/ooxmlimport/data/n820504.docx | bin | 19810 -> 23684 bytes | |||
-rw-r--r-- | sw/qa/extras/ooxmlimport/ooxmlimport.cxx | 8 |
2 files changed, 7 insertions, 1 deletions
diff --git a/sw/qa/extras/ooxmlimport/data/n820504.docx b/sw/qa/extras/ooxmlimport/data/n820504.docx Binary files differindex 36279a99dc20..3cc2bfaa2081 100644 --- a/sw/qa/extras/ooxmlimport/data/n820504.docx +++ b/sw/qa/extras/ooxmlimport/data/n820504.docx diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx index d53094e23bfa..6d036a816e90 100644 --- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx +++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx @@ -532,7 +532,7 @@ void Test::testN764005() CPPUNIT_ASSERT(eValue != text::TextContentAnchorType_AS_CHARACTER); sal_Bool bValue = sal_True; xPropertySet->getPropertyValue("Opaque") >>= bValue; - CPPUNIT_ASSERT_EQUAL(sal_False, bValue); + CPPUNIT_ASSERT_EQUAL(false, bool(bValue)); } void Test::testSmartart() @@ -1455,6 +1455,12 @@ void Test::testN820504() uno::Reference<beans::XPropertySet> xStyle(xStylesAccess->getByName("Default Style"), uno::UNO_QUERY); // The problem was that the CharColor was set to AUTO (-1) even if we have some default char color set CPPUNIT_ASSERT_EQUAL(sal_Int32(4040635), getProperty<sal_Int32>(xStyle, "CharColor")); + + // Also, the groupshape was anchored at-page instead of at-character + // (that's incorrect as Word only supports at-character and as-character). + uno::Reference<drawing::XDrawPageSupplier> xDrawPageSupplier(mxComponent, uno::UNO_QUERY); + uno::Reference<container::XIndexAccess> xDraws(xDrawPageSupplier->getDrawPage(), uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL(text::TextContentAnchorType_AT_CHARACTER, getProperty<text::TextContentAnchorType>(xDraws->getByIndex(0), "AnchorType")); } void Test::testFdo43641() |