diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2018-10-15 21:11:24 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2018-10-16 09:02:46 +0200 |
commit | 2b920bdc12f3bf3a196ec0d6d59043a68e663e33 (patch) | |
tree | cc6f5263a005d45ea4c025f5bdd5bcbadb2a27d2 /sw/qa | |
parent | 8c8926d127a3113a6cabc67df6cc6f7f0d583f98 (diff) |
tdf#112520 RTF export: write ZOrder only for toplevel shapes
RTF export at the moment exports children of group shapes as a flat
shape list. This means that the order inside the group shape is not
relevant for the toplevel ZOrder, so just don't write it.
Change-Id: I870707cb28c2f177c0e5d9cf5328260e76b661f3
Reviewed-on: https://gerrit.libreoffice.org/61805
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Diffstat (limited to 'sw/qa')
-rw-r--r-- | sw/qa/extras/rtfexport/data/tdf112520.docx | bin | 0 -> 13279 bytes | |||
-rw-r--r-- | sw/qa/extras/rtfexport/rtfexport3.cxx | 21 |
2 files changed, 21 insertions, 0 deletions
diff --git a/sw/qa/extras/rtfexport/data/tdf112520.docx b/sw/qa/extras/rtfexport/data/tdf112520.docx Binary files differnew file mode 100644 index 000000000000..31c5a0afc21e --- /dev/null +++ b/sw/qa/extras/rtfexport/data/tdf112520.docx diff --git a/sw/qa/extras/rtfexport/rtfexport3.cxx b/sw/qa/extras/rtfexport/rtfexport3.cxx index 45be1c450cb4..26bbc8121372 100644 --- a/sw/qa/extras/rtfexport/rtfexport3.cxx +++ b/sw/qa/extras/rtfexport/rtfexport3.cxx @@ -16,6 +16,7 @@ #include <com/sun/star/text/XPageCursor.hpp> #include <com/sun/star/text/XTextViewCursorSupplier.hpp> #include <com/sun/star/text/XTextColumns.hpp> +#include <com/sun/star/text/TextContentAnchorType.hpp> class Test : public SwModelTestBase { @@ -172,6 +173,26 @@ DECLARE_RTFEXPORT_TEST(testTdf117505, "tdf117505.odt") getProperty<sal_Int32>(xFirstPage, "HeaderHeight")); } +DECLARE_RTFEXPORT_TEST(testTdf112520, "tdf112520.docx") +{ + if (!mbExported) + return; + + // Assert that the white shape is on top of the yellow one. + CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(0xffff00), + getProperty<sal_Int32>(getShape(2), "FillColor")); + CPPUNIT_ASSERT_EQUAL(text::TextContentAnchorType_AT_CHARACTER, + getProperty<text::TextContentAnchorType>(getShape(2), "AnchorType")); + CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(0xffffff), + getProperty<sal_Int32>(getShape(3), "FillColor")); + // Without the accompanying fix in place, this test would have failed with + // 'expected: 4, actual: 2'. + // This means the draw page was 0/at-char/white, 1/at-char/yellow, 2/at-page/white, + // instead of the good 0/at-page/white, 1/at-char/yellow, 2/at-char/white. + CPPUNIT_ASSERT_EQUAL(text::TextContentAnchorType_AT_CHARACTER, + getProperty<text::TextContentAnchorType>(getShape(3), "AnchorType")); +} + CPPUNIT_PLUGIN_IMPLEMENT(); /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |