[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-5.1' - sw/qa writerfilter/source
Miklos Vajna
vmiklos at collabora.co.uk
Fri Jan 6 15:32:12 UTC 2017
sw/qa/extras/ooxmlimport/data/tdf105143.docx |binary
sw/qa/extras/ooxmlimport/ooxmlimport.cxx | 8 ++++++++
writerfilter/source/filter/WriterFilter.cxx | 1 +
3 files changed, 9 insertions(+)
New commits:
commit 3753e2010d0acd5f4ff25e2cb75a33cb580d310f
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date: Fri Jan 6 13:49:06 2017 +0100
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.
Conflicts:
writerfilter/source/filter/WriterFilter.cxx
Change-Id: Ic5cb84cace9237671d71eda0c64e9dadfe244cb9
Reviewed-on: https://gerrit.libreoffice.org/32782
Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>
Tested-by: Jenkins <ci at libreoffice.org>
diff --git a/sw/qa/extras/ooxmlimport/data/tdf105143.docx b/sw/qa/extras/ooxmlimport/data/tdf105143.docx
new file mode 100644
index 0000000..aa4bf40
Binary files /dev/null and b/sw/qa/extras/ooxmlimport/data/tdf105143.docx differ
diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
index 097b749..7168d17 100644
--- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
+++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
@@ -1740,6 +1740,14 @@ DECLARE_OOXMLIMPORT_TEST(testTdf105127, "tdf105127.docx")
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(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 1ab28c2..0b95b45 100644
--- a/writerfilter/source/filter/WriterFilter.cxx
+++ b/writerfilter/source/filter/WriterFilter.cxx
@@ -300,6 +300,7 @@ void WriterFilter::setTargetDocument(const uno::Reference< lang::XComponent >& x
xSettings->setPropertyValue("BackgroundParaOverDrawings", uno::makeAny(sal_True));
xSettings->setPropertyValue("TabOverMargin", uno::makeAny(sal_True));
xSettings->setPropertyValue("PropLineSpacingShrinksFirstLine", uno::makeAny(sal_True));
+ xSettings->setPropertyValue("DoNotCaptureDrawObjsOnPage", uno::makeAny(sal_True));
}
void WriterFilter::setSourceDocument(const uno::Reference< lang::XComponent >& xDoc) throw (lang::IllegalArgumentException, uno::RuntimeException, std::exception)
More information about the Libreoffice-commits
mailing list