From af313fc149f80adb0f1680ca20e19745ccb7fede Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Fri, 6 Jan 2017 13:49:06 +0100 Subject: [PATCH] tdf#105143 DOCX import: enable DoNotCaptureDrawObjsOnPage layout compat option Because that's what Word does to show only part of the shape in the bugdoc. Change-Id: Ic5cb84cace9237671d71eda0c64e9dadfe244cb9 Reviewed-on: https://gerrit.libreoffice.org/32782 Reviewed-by: Miklos Vajna Tested-by: Jenkins --- sw/qa/extras/ooxmlimport/data/tdf105143.docx | Bin 0 -> 13098 bytes sw/qa/extras/ooxmlimport/ooxmlimport.cxx | 8 ++++++++ writerfilter/source/filter/WriterFilter.cxx | 1 + 3 files changed, 9 insertions(+) create mode 100644 sw/qa/extras/ooxmlimport/data/tdf105143.docx diff --git a/sw/qa/extras/ooxmlimport/data/tdf105143.docx b/sw/qa/extras/ooxmlimport/data/tdf105143.docx new file mode 100644 index 0000000000000000000000000000000000000000..aa4bf40af02e2c95724cfa619b43f6e5bc54e704 GIT binary patch literal 13098 zcmeHuWmH^Q({AJL?!ny&4hhh>2X}XOcX#*3-GW1K2@b)71}9i>mn7Vtd1uzlaM4&cUSFt_O3cgvQW_209XJ#001BdAW%gF2SES;@h|`Y762YnN6f+A z)y&@2K-J69%tepI)6Vu)5i}%S0RR&G`Tsrs2aiB=s=Q*zTlDaAnxAlu8c=KAY{RK{ z1-BLQHJ4p1Vk@KmrWVh)=Oi++RfVP6-HCl1=g*T!oFTI^8MBar3^wl;6}_1tDecN8 znat|uM;_9}@k7UeRwyO5D5DY|Ct~_tPXUxw+?kCO&>kavZqi3x%$*S z1f8x#MXu*(u#?8&2emVx=D_nrukuNhNAMmOp~|KH07BFYTdYI}7R5{#)TZvUg^R6e zyw;qlT$h{F^T(H>)AitrDicCJIAJLd$>-c7$sWY^y({z!=oliV#t`7(Rz{?91 zKWp;4uB$PmfJrlYtUJ4nK$4G#d5e zSwp0lTiK8*^q}|#6`FMd;ek3?vf9&K{HjA~O@II9U_x;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ooxmlimport.cxx @@ -699,6 +699,14 @@ DECLARE_OOXMLIMPORT_TEST(testTdf105127, "tdf105127.docx") CPPUNIT_ASSERT_EQUAL(static_cast(3257), aPolyPolygon.Coordinates[0][0].Y); } +DECLARE_OOXMLIMPORT_TEST(testTdf105143, "tdf105143.docx") +{ + OUString aTop = parseDump("/root/page/body/txt/anchored/SwAnchoredDrawObject/bounds", "top"); + // This was 6272, i.e. the shape was moved up (incorrect position) to be + // inside the page rectangle. + CPPUNIT_ASSERT_EQUAL(OUString("6674"), aTop); +} + DECLARE_OOXMLIMPORT_TEST(testfdo76583, "fdo76583.docx") { // The problem was that the floating table was imported as a non-floating one. diff --git a/writerfilter/source/filter/WriterFilter.cxx b/writerfilter/source/filter/WriterFilter.cxx index 3826b09085a3..e247000158f3 100644 --- a/writerfilter/source/filter/WriterFilter.cxx +++ b/writerfilter/source/filter/WriterFilter.cxx @@ -298,6 +298,7 @@ void WriterFilter::setTargetDocument(const uno::Reference< lang::XComponent >& x xSettings->setPropertyValue("TabOverMargin", uno::makeAny(true)); xSettings->setPropertyValue("TreatSingleColumnBreakAsPageBreak", uno::makeAny(true)); xSettings->setPropertyValue("PropLineSpacingShrinksFirstLine", uno::makeAny(true)); + xSettings->setPropertyValue("DoNotCaptureDrawObjsOnPage", uno::makeAny(true)); } void WriterFilter::setSourceDocument(const uno::Reference< lang::XComponent >& xDoc) throw (lang::IllegalArgumentException, uno::RuntimeException, std::exception)