sw/qa/extras/odfexport/data/table_number_format_3.docx |binary sw/qa/extras/odfexport/odfexport2.cxx | 17 +++++++++++++++++ writerfilter/source/dmapper/DomainMapper_Impl.hxx | 4 +--- 3 files changed, 18 insertions(+), 3 deletions(-)
New commits: commit 7e93946fc5252a2437f05400dba02dd5bf5140c5 Author: Tünde Tóth <toth.tu...@nisz.hu> AuthorDate: Wed Jul 6 14:12:54 2022 +0200 Commit: Michael Stahl <michael.st...@allotropia.de> CommitDate: Wed Aug 3 12:29:38 2022 +0200 tdf#120972 DOCX: fix import of decimal tabulators Use locale specific decimal separator for decimal tabulators, because OOXML does not support custom decimal separator. Regression from commit c0b6aadedc9429eee4f4df85957e00e29ccb0c8f "(related: fdo#81033) writerfilter: default tab fill character is space". Change-Id: I9d89e5817707f3b39a1b718b732f6e289f7c6a99 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136846 Tested-by: László Németh <nem...@numbertext.org> Reviewed-by: László Németh <nem...@numbertext.org> (cherry picked from commit c4e3b76d99e0d32f55aacc3ddffcc68c107cc4db) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137601 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.st...@allotropia.de> diff --git a/sw/qa/extras/odfexport/data/table_number_format_3.docx b/sw/qa/extras/odfexport/data/table_number_format_3.docx new file mode 100644 index 000000000000..1bb423e455df Binary files /dev/null and b/sw/qa/extras/odfexport/data/table_number_format_3.docx differ diff --git a/sw/qa/extras/odfexport/odfexport2.cxx b/sw/qa/extras/odfexport/odfexport2.cxx index c128d7be52d1..dc4762314c32 100644 --- a/sw/qa/extras/odfexport/odfexport2.cxx +++ b/sw/qa/extras/odfexport/odfexport2.cxx @@ -11,6 +11,7 @@ #include <com/sun/star/text/XTextTable.hpp> #include <com/sun/star/text/XTextTablesSupplier.hpp> +#include <unotools/localedatawrapper.hxx> class Test : public SwModelTestBase { @@ -211,6 +212,22 @@ CPPUNIT_TEST_FIXTURE(Test, testStyleLink) CPPUNIT_ASSERT_EQUAL(OUString("List Paragraph Char"), getProperty<OUString>(aParaStyle, "LinkStyle")); } +CPPUNIT_TEST_FIXTURE(Test, tdf120972) +{ + loadAndReload("table_number_format_3.docx"); + + xmlDocUniquePtr pXmlDoc = parseExport("content.xml"); + OUString cDecimal(SvtSysLocale().GetLocaleData().getNumDecimalSep()[0]); + assertXPath( + pXmlDoc, + "//style:style[@style:name='P1']/style:paragraph-properties/style:tab-stops/style:tab-stop", + "char", cDecimal); + assertXPath( + pXmlDoc, + "//style:style[@style:name='P2']/style:paragraph-properties/style:tab-stops/style:tab-stop", + "char", cDecimal); +} + CPPUNIT_PLUGIN_IMPLEMENT(); /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.hxx b/writerfilter/source/dmapper/DomainMapper_Impl.hxx index 4072a646840b..f6b88fec09b3 100644 --- a/writerfilter/source/dmapper/DomainMapper_Impl.hxx +++ b/writerfilter/source/dmapper/DomainMapper_Impl.hxx @@ -289,9 +289,7 @@ struct DeletableTabStop : public css::style::TabStop explicit DeletableTabStop() : bDeleted(false) { - // same defaults as SvxXMLTabStopContext_Impl - FillChar = ' '; - DecimalChar = ','; + FillChar = ' '; // same default as SvxXMLTabStopContext_Impl } DeletableTabStop(const css::style::TabStop& rTabStop) : TabStop(rTabStop),