[Libreoffice-commits] core.git: sw/qa writerfilter/source
Vasily Melenchuk (via logerrit)
logerrit at kemper.freedesktop.org
Mon May 11 08:41:01 UTC 2020
sw/qa/extras/ooxmlexport/data/tdf132754.docx |binary
sw/qa/extras/ooxmlexport/ooxmlexport14.cxx | 16 ++++++++++++++++
writerfilter/source/dmapper/NumberingManager.cxx | 4 +++-
3 files changed, 19 insertions(+), 1 deletion(-)
New commits:
commit f8211e84a5239de25fe6dc45a4bb6b6f8673a1ee
Author: Vasily Melenchuk <vasily.melenchuk at cib.de>
AuthorDate: Sun May 10 00:43:59 2020 +0300
Commit: Thorsten Behrens <Thorsten.Behrens at CIB.de>
CommitDate: Mon May 11 10:40:20 2020 +0200
tdf#132754: DOCX import: changed default list start nubmer
Default value for list numbering startAt is zero. If it is not
proveded numbering starts from this value.
Change-Id: I2cf7be9063e7bfb8b72d6ba77fcd9507e33bb848
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93899
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>
diff --git a/sw/qa/extras/ooxmlexport/data/tdf132754.docx b/sw/qa/extras/ooxmlexport/data/tdf132754.docx
new file mode 100644
index 000000000000..baec54f5e0d7
Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/tdf132754.docx differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport14.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport14.cxx
index 3a10ff2e0bed..26c8fc248298 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport14.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport14.cxx
@@ -733,6 +733,22 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf128889, "tdf128889.fodt")
assertXPath(pXml, "/w:document/w:body/w:p[1]/w:r[2]/w:br", "type", "page");
}
+DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf132754, "tdf132754.docx")
+{
+ {
+ uno::Reference<beans::XPropertySet> xPara(getParagraph(1), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString("0.0.0."), getProperty<OUString>(xPara, "ListLabelString"));
+ }
+ {
+ uno::Reference<beans::XPropertySet> xPara(getParagraph(2), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString("0.0.1."), getProperty<OUString>(xPara, "ListLabelString"));
+ }
+ {
+ uno::Reference<beans::XPropertySet> xPara(getParagraph(3), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString("0.0.2."), getProperty<OUString>(xPara, "ListLabelString"));
+ }
+}
+
DECLARE_OOXMLEXPORT_TEST(testTdf129353, "tdf129353.docx")
{
CPPUNIT_ASSERT_EQUAL(1, getPages());
diff --git a/writerfilter/source/dmapper/NumberingManager.cxx b/writerfilter/source/dmapper/NumberingManager.cxx
index 252d543d67b7..cca1845d2782 100644
--- a/writerfilter/source/dmapper/NumberingManager.cxx
+++ b/writerfilter/source/dmapper/NumberingManager.cxx
@@ -189,8 +189,10 @@ uno::Sequence<beans::PropertyValue> ListLevel::GetLevelProperties(bool bDefaults
{
std::vector<beans::PropertyValue> aNumberingProperties;
- if( m_nIStartAt >= 0)
+ if (m_nIStartAt >= 0)
aNumberingProperties.push_back(lcl_makePropVal<sal_Int16>(PROP_START_WITH, m_nIStartAt) );
+ else if (bDefaults)
+ aNumberingProperties.push_back(lcl_makePropVal<sal_Int16>(PROP_START_WITH, 0));
sal_Int16 nNumberFormat = -1;
if (m_nNFC == NS_ooxml::LN_Value_ST_NumberFormat_custom)
More information about the Libreoffice-commits
mailing list