summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf134619_numberingProps.docbin0 -> 75264 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport16.cxx14
-rw-r--r--sw/source/filter/ww8/docxattributeoutput.cxx8
3 files changed, 18 insertions, 4 deletions
diff --git a/sw/qa/extras/ooxmlexport/data/tdf134619_numberingProps.doc b/sw/qa/extras/ooxmlexport/data/tdf134619_numberingProps.doc
new file mode 100644
index 000000000000..742b45ce6563
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf134619_numberingProps.doc
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport16.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport16.cxx
index 316a1c080b00..3d89e01501c7 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport16.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport16.cxx
@@ -38,6 +38,20 @@ DECLARE_OOXMLEXPORT_TEST(testTdf138892_noNumbering, "tdf138892_noNumbering.docx"
CPPUNIT_ASSERT_MESSAGE("Para3: <blank line>", getProperty<OUString>(getParagraph(3), "NumberingStyleName").isEmpty());
}
+DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf134619_numberingProps, "tdf134619_numberingProps.doc")
+{
+ // Get the third paragraph's numbering style's 1st level's bullet size
+ uno::Reference<text::XTextRange> xParagraph = getParagraph(3);
+ auto xLevels = getProperty< uno::Reference<container::XIndexAccess> >(xParagraph, "NumberingRules");
+ uno::Sequence<beans::PropertyValue> aLevel;
+ xLevels->getByIndex(0) >>= aLevel; // 1st level
+ OUString aCharStyleName = std::find_if(aLevel.begin(), aLevel.end(), [](const beans::PropertyValue& rValue) { return rValue.Name == "CharStyleName"; })->Value.get<OUString>();
+
+ // Make sure that the blue bullet's font size is 72 points, not 12 points.
+ uno::Reference<beans::XPropertySet> xStyle(getStyles("CharacterStyles")->getByName(aCharStyleName), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(72.f, getProperty<float>(xStyle, "CharHeight"));
+}
+
DECLARE_OOXMLEXPORT_TEST(testTdf139580, "tdf139580.odt")
{
// Without the fix in place, this test would have crashed at export time
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx
index 43ee8a245a39..04bf7b36c068 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -7395,6 +7395,7 @@ void DocxAttributeOutput::NumberingLevel( sal_uInt8 nLevel,
{
m_pSerializer->startElementNS(XML_w, XML_rPr);
+ SfxItemSet aTempSet(*pOutSet);
if ( pFont )
{
GetExport().GetId( *pFont ); // ensure font info is written to fontTable.xml
@@ -7404,11 +7405,10 @@ void DocxAttributeOutput::NumberingLevel( sal_uInt8 nLevel,
FSNS( XML_w, XML_hAnsi ), aFamilyName,
FSNS( XML_w, XML_cs ), aFamilyName,
FSNS( XML_w, XML_hint ), "default" );
+ aTempSet.ClearItem(RES_CHRATR_FONT);
+ aTempSet.ClearItem(RES_CHRATR_CTL_FONT);
}
- else
- {
- m_rExport.OutputItemSet(*pOutSet, false, true, i18n::ScriptType::LATIN, m_rExport.m_bExportModeRTF);
- }
+ m_rExport.OutputItemSet(aTempSet, false, true, i18n::ScriptType::LATIN, m_rExport.m_bExportModeRTF);
WriteCollectedRunProperties();