sw/qa/extras/ooxmlexport/data/tdf107119.docx |binary sw/qa/extras/ooxmlexport/ooxmlexport6.cxx | 7 +++++++ writerfilter/source/dmapper/DomainMapper.cxx | 5 +++-- 3 files changed, 10 insertions(+), 2 deletions(-)
New commits: commit 050e5f2f754bca091676e657e766a7889cb3051a Author: Tibor Nagy <nagy.tib...@nisz.hu> AuthorDate: Wed May 20 13:31:51 2020 +0200 Commit: Gabor Kelemen <kelemen.gab...@nisz.hu> CommitDate: Fri Jun 12 09:22:20 2020 +0200 tdf#107119 DOCX import: fix parallel text wrap around frames It was imported as "optimal page wrap" instead of parallel one, resulting different page layout depending on the distance of the frame object from the page margins. Co-authored-by: Attila Bakos (NISZ) Change-Id: I0db65c224f537bfd4f95ee073743a3d17d9e0e4d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94576 Tested-by: László Németh <nem...@numbertext.org> Reviewed-by: László Németh <nem...@numbertext.org> (cherry picked from commit 358f654af36fa12102685237f6eadebae4610fb5) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96142 Tested-by: Gabor Kelemen <kelemen.gab...@nisz.hu> Reviewed-by: Gabor Kelemen <kelemen.gab...@nisz.hu> diff --git a/sw/qa/extras/ooxmlexport/data/tdf107119.docx b/sw/qa/extras/ooxmlexport/data/tdf107119.docx new file mode 100644 index 000000000000..98de4f2ac7bd Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/tdf107119.docx differ diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport6.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport6.cxx index d460679b50ba..bfd67a6ede7a 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport6.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport6.cxx @@ -23,6 +23,7 @@ #include <com/sun/star/style/LineSpacingMode.hpp> #include <com/sun/star/text/GraphicCrop.hpp> #include <com/sun/star/text/VertOrientation.hpp> +#include <com/sun/star/text/WrapTextMode.hpp> #include <comphelper/sequenceashashmap.hxx> @@ -986,6 +987,12 @@ DECLARE_OOXMLEXPORT_TEST(testSyncedRelativePercent, "tdf93676-1.odt") assertXPath(pXmlDoc, "//wp14:pctHeight", 0); } +DECLARE_OOXMLIMPORT_TEST(testTdf107119, "tdf107119.docx") +{ + uno::Reference<beans::XPropertySet> XPropsWrap(getShape(1), uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL(text::WrapTextMode_PARALLEL, getProperty<text::WrapTextMode>(XPropsWrap, "Surround")); +} + CPPUNIT_PLUGIN_IMPLEMENT(); /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/writerfilter/source/dmapper/DomainMapper.cxx b/writerfilter/source/dmapper/DomainMapper.cxx index 938cc59be726..50c5704a032a 100644 --- a/writerfilter/source/dmapper/DomainMapper.cxx +++ b/writerfilter/source/dmapper/DomainMapper.cxx @@ -866,10 +866,11 @@ void DomainMapper::lcl_attribute(Id nName, Value & val) sal::static_int_cast<Id>(nIntValue) == NS_ooxml::LN_Value_doc_ST_Wrap_none || sal::static_int_cast<Id>(nIntValue) == NS_ooxml::LN_Value_doc_ST_Wrap_auto, "wrap not around, not_Beside, through, none or auto?"); - if( sal::static_int_cast<Id>(nIntValue) == NS_ooxml::LN_Value_doc_ST_Wrap_around || - sal::static_int_cast<Id>(nIntValue) == NS_ooxml::LN_Value_doc_ST_Wrap_through || + if( sal::static_int_cast<Id>(nIntValue) == NS_ooxml::LN_Value_doc_ST_Wrap_through || sal::static_int_cast<Id>(nIntValue) == NS_ooxml::LN_Value_doc_ST_Wrap_auto ) pParaProperties->SetWrap ( text::WrapTextMode_DYNAMIC ) ; + else if (sal::static_int_cast<Id>(nIntValue) == NS_ooxml::LN_Value_doc_ST_Wrap_around) + pParaProperties->SetWrap(text::WrapTextMode_PARALLEL); else if (sal::static_int_cast<Id>(nIntValue) == NS_ooxml::LN_Value_doc_ST_Wrap_none) pParaProperties->SetWrap ( text::WrapTextMode_THROUGH ) ; else _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits