diff options
author | Tamás Zolnai <tamas.zolnai@collabora.com> | 2016-11-06 18:42:30 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2016-11-11 15:33:03 +0000 |
commit | d3d714f7a16df13b97a06ec68234d08d57a09479 (patch) | |
tree | 1e99580d6e30513a1e0e1b50ecd88914d7a4bea4 /sw/qa | |
parent | 5bbad83f5a4144181a46c68784a3ff3e3f368c2d (diff) |
tdf#103544: DOCX exp.: Image loss when have a frame anchored to the same para.
Regression from:
83d51e5e52688c4c9bc0ad70a511458bb06a242d
Partly revert the commit causes this regression.
I checked the related bugs (tdf#78590,tdf#80748)
intended to be fixed by this commit and reverting
this part does not bring back the corruption.
I guess something changed in frames' and text boxes'
import in the meantime, because this MergeMarks::IGNORE
is useless now.
Reviewed-on: https://gerrit.libreoffice.org/30351
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Tested-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Conflicts:
sw/qa/extras/ooxmlexport/ooxmlexport9.cxx
Change-Id: If17776e8628561961c7ce2a2994e3fc609f75639
Reviewed-on: https://gerrit.libreoffice.org/30358
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sw/qa')
-rw-r--r-- | sw/qa/extras/ooxmlexport/data/tdf103544.docx | bin | 0 -> 15012 bytes | |||
-rw-r--r-- | sw/qa/extras/ooxmlexport/ooxmlexport7.cxx | 14 | ||||
-rw-r--r-- | sw/qa/extras/ooxmlexport/ooxmlfieldexport.cxx | 4 |
3 files changed, 16 insertions, 2 deletions
diff --git a/sw/qa/extras/ooxmlexport/data/tdf103544.docx b/sw/qa/extras/ooxmlexport/data/tdf103544.docx Binary files differnew file mode 100644 index 000000000000..2e18f21213ea --- /dev/null +++ b/sw/qa/extras/ooxmlexport/data/tdf103544.docx diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport7.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport7.cxx index c3b94a7f00b6..d7c1f2211015 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport7.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport7.cxx @@ -25,6 +25,7 @@ #include <com/sun/star/text/GraphicCrop.hpp> #include <com/sun/star/text/HoriOrientation.hpp> #include <com/sun/star/text/RelOrientation.hpp> +#include <com/sun/star/graphic/XGraphic.hpp> #include <pagedesc.hxx> #include <comphelper/sequenceashashmap.hxx> @@ -1171,6 +1172,19 @@ DECLARE_OOXMLEXPORT_TEST(testTdf103573, "tdf103573.docx") CPPUNIT_ASSERT_EQUAL_MESSAGE("Not centered horizontally relatively to right page border", text::RelOrientation::PAGE_RIGHT, nValue); } +DECLARE_OOXMLEXPORT_TEST(testTdf103544, "tdf103544.docx") +{ + // We have two shapes: a frame and an image + uno::Reference<drawing::XDrawPageSupplier> xDrawPageSupplier(mxComponent, uno::UNO_QUERY); + uno::Reference<drawing::XDrawPage> xDrawPage = xDrawPageSupplier->getDrawPage(); + CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(2), xDrawPage->getCount()); + + // Image was lost because of the frame export + uno::Reference<beans::XPropertySet> xImage(getShape(1), uno::UNO_QUERY); + auto xGraphic = getProperty<uno::Reference<graphic::XGraphic> >(xImage, "Graphic"); + CPPUNIT_ASSERT(xGraphic.is()); +} + #endif CPPUNIT_PLUGIN_IMPLEMENT(); diff --git a/sw/qa/extras/ooxmlexport/ooxmlfieldexport.cxx b/sw/qa/extras/ooxmlexport/ooxmlfieldexport.cxx index 9af064c457a3..35525460b678 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlfieldexport.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlfieldexport.cxx @@ -498,8 +498,8 @@ DECLARE_OOXMLEXPORT_TEST(testFDO78590, "FDO78590.docx") return; // This is to ensure that the fld starts and ends inside a hyperlink... - assertXPath ( pXmlDoc, "/w:document/w:body/w:p[1]/w:pPr/w:framePr", "w", "9851" ); - assertXPath ( pXmlDoc, "/w:document/w:body/w:p[1]/w:pPr/w:framePr", "h", "1669" ); + assertXPath ( pXmlDoc, "/w:document/w:body/w:p[2]/w:pPr/w:framePr", "w", "9851" ); + assertXPath ( pXmlDoc, "/w:document/w:body/w:p[2]/w:pPr/w:framePr", "h", "1669" ); } DECLARE_OOXMLEXPORT_TEST(testSdtCitationRun, "sdt-citation-run.docx") |