summaryrefslogtreecommitdiff
path: root/sw/qa/extras/odfexport
diff options
context:
space:
mode:
authorTünde Tóth <toth.tunde@nisz.hu>2022-07-06 14:12:54 +0200
committerLászló Németh <nemeth@numbertext.org>2022-08-01 00:03:33 +0200
commitf224cdfb3c264a339d3148c7c2936f3202015f7d (patch)
tree73b575dd234b1cd337ffa83e38b8f74b7524d38a /sw/qa/extras/odfexport
parent9a6b673699fa925f5d87e47d4b359f37ad27260e (diff)
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 <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
Diffstat (limited to 'sw/qa/extras/odfexport')
-rw-r--r--sw/qa/extras/odfexport/data/table_number_format_3.docxbin0 -> 5130 bytes
-rw-r--r--sw/qa/extras/odfexport/odfexport2.cxx17
2 files changed, 17 insertions, 0 deletions
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
--- /dev/null
+++ b/sw/qa/extras/odfexport/data/table_number_format_3.docx
Binary files differ
diff --git a/sw/qa/extras/odfexport/odfexport2.cxx b/sw/qa/extras/odfexport/odfexport2.cxx
index 064e4dbd24ea..30b3791d0dbc 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: */