sw/qa/extras/ooxmlexport/data/tdf132483.docx |binary sw/qa/extras/ooxmlexport/ooxmlexport14.cxx | 13 +++++++++++++ writerfilter/source/dmapper/DomainMapper_Impl.cxx | 4 +++- 3 files changed, 16 insertions(+), 1 deletion(-)
New commits: commit a7d8293072b157438c2881c4a866d78b0ca72422 Author: Bakos Attila <bakos.attilakar...@nisz.hu> AuthorDate: Fri Jul 10 12:42:11 2020 +0200 Commit: Gabor Kelemen <kelemen.gab...@nisz.hu> CommitDate: Sun Sep 13 21:28:04 2020 +0200 tdf#132483: DOCX import: fix OLE anchoring position The relative orientation of OLE objects was not copied from the replacement object to OLE, resulting bad position. Co-authored-by: Attila Bánhegyi (NISZ) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98493 Tested-by: László Németh <nem...@numbertext.org> Reviewed-by: László Németh <nem...@numbertext.org> (cherry picked from commit 54031e6a2912ebe723b4423b5d737c13c9bb03c5) Change-Id: If62124e5a40218a224e047efbe86a09606b44af5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102566 Tested-by: Gabor Kelemen <kelemen.gab...@nisz.hu> Reviewed-by: Gabor Kelemen <kelemen.gab...@nisz.hu> diff --git a/sw/qa/extras/ooxmlexport/data/tdf132483.docx b/sw/qa/extras/ooxmlexport/data/tdf132483.docx new file mode 100644 index 000000000000..e4ebf4b78511 Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/tdf132483.docx differ diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport14.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport14.cxx index 18c2648becd3..92d2d7869662 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport14.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport14.cxx @@ -453,6 +453,19 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf131539, "tdf131539.odt") CPPUNIT_ASSERT(aXmlVal.indexOf("margin-left:139.95")>-1); } +DECLARE_OOXMLIMPORT_TEST(TestTdf132483, "tdf132483.docx") +{ + uno::Reference<beans::XPropertySet> xOLEProps(getShape(1), uno::UNO_QUERY_THROW); + sal_Int16 nVRelPos = -1; + sal_Int16 nHRelPos = -1; + xOLEProps->getPropertyValue("VertOrientRelation") >>= nVRelPos; + xOLEProps->getPropertyValue("HoriOrientRelation") >>= nHRelPos; + CPPUNIT_ASSERT_EQUAL_MESSAGE("The OLE is shifted vertically", + text::RelOrientation::PAGE_FRAME , nVRelPos); + CPPUNIT_ASSERT_EQUAL_MESSAGE("The OLE is shifted horizontally", + text::RelOrientation::PAGE_FRAME , nHRelPos); +} + CPPUNIT_PLUGIN_IMPLEMENT(); /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx index c882ac586745..6e6a074dad43 100644 --- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx +++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx @@ -2062,7 +2062,9 @@ void DomainMapper_Impl::appendOLE( const OUString& rStreamName, const std::share OUString("HoriOrient"), OUString("HoriOrientPosition"), OUString("VertOrient"), - OUString("VertOrientPosition") + OUString("VertOrientPosition"), + OUString("VertOrientRelation"), + OUString("HoriOrientRelation") }; for (const OUString & s : pProperties) xOLEProperties->setPropertyValue(s, xReplacementProperties->getPropertyValue(s)); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits