[Libreoffice-commits] core.git: sw/qa sw/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Thu Aug 23 04:24:27 UTC 2018
sw/qa/extras/ooxmlexport/ooxmlexport9.cxx | 7 +++++++
sw/source/filter/ww8/docxattributeoutput.cxx | 3 ++-
2 files changed, 9 insertions(+), 1 deletion(-)
New commits:
commit 352efa5b3cb7d025b9a299e2fcade5f7822ed043
Author: Justin Luth <justin.luth at collabora.com>
AuthorDate: Wed Aug 22 09:10:04 2018 +0300
Commit: Justin Luth <justin_luth at sil.org>
CommitDate: Thu Aug 23 06:24:01 2018 +0200
related tdf#76683 docx export: use firstLine, not hanging
for negative first line indents. TwipMeasure must be positive
even though contrary to their documentation, Microsoft still
uses the negative number. So this should have no noticable
impact, other than making the output valid.
Change-Id: Iafd9411c748f086dde3165c2ac7229b17a2312ab
Reviewed-on: https://gerrit.libreoffice.org/59423
Tested-by: Jenkins
Reviewed-by: Justin Luth <justin_luth at sil.org>
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 );
More information about the Libreoffice-commits
mailing list