summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
Diffstat (limited to 'sw')
-rw-r--r--sw/qa/extras/ooxmlexport/data/decimal-numbering-no-leveltext.docxbin0 -> 13517 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport5.cxx7
-rw-r--r--sw/qa/extras/rtfimport/rtfimport.cxx5
-rw-r--r--sw/source/filter/ww8/docxattributeoutput.cxx7
4 files changed, 17 insertions, 2 deletions
diff --git a/sw/qa/extras/ooxmlexport/data/decimal-numbering-no-leveltext.docx b/sw/qa/extras/ooxmlexport/data/decimal-numbering-no-leveltext.docx
new file mode 100644
index 000000000000..d7ec47997611
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/decimal-numbering-no-leveltext.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport5.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport5.cxx
index 89ead201944f..c65e54649502 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport5.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport5.cxx
@@ -99,6 +99,13 @@ DECLARE_OOXMLEXPORT_TEST(testfdo76589 , "fdo76589.docx")
assertXPath ( pXmlDoc, "/w:numbering/w:abstractNum[1]/w:lvl[1]/w:lvlText","val","%1" );
}
+DECLARE_OOXMLEXPORT_TEST(testDecimalNumberingNoLeveltext, "decimal-numbering-no-leveltext.docx")
+{
+ // This was "%1", not empty: we turned a kind-of-none numbering into a decimal one.
+ if (xmlDocPtr pXmlDoc = parseExport("word/numbering.xml"))
+ assertXPath (pXmlDoc, "/w:numbering/w:abstractNum[1]/w:lvl[1]/w:lvlText","val", "");
+}
+
DECLARE_OOXMLEXPORT_TEST(testfdo79008, "fdo79008.docx")
{
/* File getting crash while saving in LO.
diff --git a/sw/qa/extras/rtfimport/rtfimport.cxx b/sw/qa/extras/rtfimport/rtfimport.cxx
index 0e651d003829..4a07fd04c1b8 100644
--- a/sw/qa/extras/rtfimport/rtfimport.cxx
+++ b/sw/qa/extras/rtfimport/rtfimport.cxx
@@ -582,7 +582,10 @@ DECLARE_RTFIMPORT_TEST(testFdo49692, "fdo49692.rtf")
const beans::PropertyValue& rProp = aProps[i];
if (rProp.Name == "Suffix")
- CPPUNIT_ASSERT_EQUAL(sal_Int32(0), rProp.Value.get<OUString>().getLength());
+ {
+ OUString aExpected(static_cast<sal_Unicode>(0x200B));
+ CPPUNIT_ASSERT_EQUAL(aExpected, rProp.Value.get<OUString>());
+ }
}
}
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx
index b45371b833cf..4386d5b64b3e 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -5955,7 +5955,12 @@ void DocxAttributeOutput::NumberingLevel( sal_uInt8 nLevel,
}
else
{
- m_pSerializer->singleElementNS( XML_w, XML_lvlText,FSNS( XML_w, XML_val ), OUStringToOString( aBuffer.makeStringAndClear(), RTL_TEXTENCODING_UTF8 ).getStr(), FSEND );
+ // Writer's "zero width space" suffix is necessary, so that LabelFollowedBy shows up, but Word doesn't require that.
+ OUString aLevelText = aBuffer.makeStringAndClear();
+ static OUString aZeroWidthSpace(static_cast<sal_Unicode>(0x200B));
+ if (aLevelText == aZeroWidthSpace)
+ aLevelText.clear();
+ m_pSerializer->singleElementNS(XML_w, XML_lvlText, FSNS(XML_w, XML_val), aLevelText.toUtf8(), FSEND);
}
// bullet