diff options
Diffstat (limited to 'sw')
-rw-r--r-- | sw/qa/extras/ooxmlexport/ooxmlexport9.cxx | 7 | ||||
-rw-r--r-- | sw/source/filter/ww8/docxattributeoutput.cxx | 3 |
2 files changed, 9 insertions, 1 deletions
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx index 57955e46e7f1..51287c7035cd 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx @@ -1148,6 +1148,13 @@ DECLARE_OOXMLEXPORT_TEST(testActiveXOptionButtonGroup, "activex_option_button_gr DECLARE_OOXMLEXPORT_TEST(tdf112169, "tdf112169.odt") { // LO crashed while export because of character background color handling + + //tdf76683 - Cannot be negative number - use firstLine instead of hanging + xmlDocPtr pXmlDoc = parseExport("word/numbering.xml"); + if (!pXmlDoc) + return; + assertXPathNoAttribute(pXmlDoc, "/w:numbering/w:abstractNum[1]/w:lvl[1]/w:pPr/w:ind", "hanging"); + assertXPath(pXmlDoc, "/w:numbering/w:abstractNum[1]/w:lvl[1]/w:pPr/w:ind", "firstLine","360"); } DECLARE_OOXMLEXPORT_TEST(testTdf103090, "tdf103090.odt") diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx index 00412096bbde..845763404813 100644 --- a/sw/source/filter/ww8/docxattributeoutput.cxx +++ b/sw/source/filter/ww8/docxattributeoutput.cxx @@ -6635,9 +6635,10 @@ void DocxAttributeOutput::NumberingLevel( sal_uInt8 nLevel, } sal_Int32 nToken = ecmaDialect ? XML_left : XML_start; + sal_Int32 nIndentToken = nFirstLineIndex > 0 ? XML_firstLine : XML_hanging; m_pSerializer->singleElementNS( XML_w, XML_ind, FSNS( XML_w, nToken ), OString::number( nIndentAt ).getStr(), - FSNS( XML_w, XML_hanging ), OString::number( -nFirstLineIndex ).getStr(), + FSNS( XML_w, nIndentToken ), OString::number( abs(nFirstLineIndex) ).getStr(), FSEND ); m_pSerializer->endElementNS( XML_w, XML_pPr ); |