summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVasily Melenchuk <vasily.melenchuk@cib.de>2020-05-20 11:48:47 +0300
committerThorsten Behrens <Thorsten.Behrens@CIB.de>2020-05-27 12:24:57 +0200
commitbf7acc698f91f420ac1b3796f18c1ae76ce1e401 (patch)
tree10d5b6e9668ec5634d467feb8fcde78a411238e7
parent5a050e8f0ae5704df6baac4c1b2ca949ddb17ea4 (diff)
tdf#78352: docx import: allow tab at left indent for list
Looks like first tab stop for list bullets is at left paragraph boundry. Luckely there is a compatibility option for this. Change-Id: Iea4bd2b51912746dbd4722ff61eeb2e9293cab31 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94559 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf78352.docxbin0 -> 15491 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport14.cxx9
-rw-r--r--writerfilter/source/dmapper/DomainMapper.cxx2
3 files changed, 11 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlexport/data/tdf78352.docx b/sw/qa/extras/ooxmlexport/data/tdf78352.docx
new file mode 100644
index 000000000000..6f85f2e2ab6a
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf78352.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport14.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport14.cxx
index 10b55a397111..b372f2e86dcd 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport14.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport14.cxx
@@ -392,6 +392,15 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf121045, "tdf121045.docx")
assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr/w:tc[1]/w:p/w:r[5]/w:rPr/w:szCs", "val", "20");
}
+DECLARE_OOXMLEXPORT_TEST(testTdf78352, "tdf78352.docx")
+{
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+
+ // Ensure that width of first tab is close to zero (previous value was ~1000 twips)
+ int nWidth = parseDump("/root/page/body/txt[1]/Text[@nType='PortionType::TabLeft']", "nWidth").toInt32();
+ CPPUNIT_ASSERT_LESS(150, nWidth);
+}
+
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf92472, "tdf92472.docx")
{
xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
diff --git a/writerfilter/source/dmapper/DomainMapper.cxx b/writerfilter/source/dmapper/DomainMapper.cxx
index 77abe842d695..60e32fd8aa05 100644
--- a/writerfilter/source/dmapper/DomainMapper.cxx
+++ b/writerfilter/source/dmapper/DomainMapper.cxx
@@ -126,6 +126,8 @@ DomainMapper::DomainMapper( const uno::Reference< uno::XComponentContext >& xCon
m_pImpl->SetDocumentSettingsProperty("StylesNoDefault", uno::makeAny(true));
m_pImpl->SetDocumentSettingsProperty("MsWordCompTrailingBlanks", uno::makeAny(true));
+ m_pImpl->SetDocumentSettingsProperty("TabAtLeftIndentForParagraphsInList", uno::makeAny(true));
+
// Initialize RDF metadata, to be able to add statements during the import.
try
{