diff options
author | Justin Luth <justin_luth@sil.org> | 2017-06-09 13:02:40 +0300 |
---|---|---|
committer | Justin Luth <justin_luth@sil.org> | 2017-06-23 01:47:13 +0200 |
commit | 52b6c6493837a6bdccffd16d06daba54e932bd07 (patch) | |
tree | 34bb9d1e7a25b4c863dba015979f0bc270192ed0 | |
parent | 430774c4edcdba3e6a4e383d9ac9345a517e227f (diff) |
writerfilter: map endnote text to Endnote
I'm not exactly sure what role the Endnote Symbol char style
plays, but it is only related to Endnote Characters, not the
main footnote text.
Note: the existing mapping rarely takes effect since MSWord
exports the stylename in lower-case. Unfortunately, there is
no history to indicate why "Endnote Text" is mapped to
"Endnote Symbol". That looks like an error to me.
related to tdf#82173 which exposed this issue.
Change-Id: Ie92f527b1e594fd571f1118d18a8ff225cfc2314
Reviewed-on: https://gerrit.libreoffice.org/38605
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Justin Luth <justin_luth@sil.org>
-rw-r--r-- | sw/qa/extras/ooxmlexport/data/tdf82173_endnoteStyle.docx | bin | 12867 -> 14321 bytes | |||
-rw-r--r-- | sw/qa/extras/ooxmlexport/ooxmlexport9.cxx | 6 | ||||
-rw-r--r-- | writerfilter/source/dmapper/StyleSheetTable.cxx | 1 |
3 files changed, 7 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlexport/data/tdf82173_endnoteStyle.docx b/sw/qa/extras/ooxmlexport/data/tdf82173_endnoteStyle.docx Binary files differindex 1c6c2f4f5b8c..d38a65943c32 100644 --- a/sw/qa/extras/ooxmlexport/data/tdf82173_endnoteStyle.docx +++ b/sw/qa/extras/ooxmlexport/data/tdf82173_endnoteStyle.docx diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx index 93f3f320f27d..f628aab82670 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx @@ -545,6 +545,12 @@ DECLARE_OOXMLEXPORT_TEST(testTdf82173_endnoteStyle, "tdf82173_endnoteStyle.docx" CPPUNIT_ASSERT_EQUAL( 24.0f, getProperty< float >(xEndnote->getAnchor(), "CharHeight") ); CPPUNIT_ASSERT_EQUAL( sal_Int32(0xFF0000), getProperty< sal_Int32 >(xEndnote->getAnchor(), "CharColor") ); + uno::Reference<text::XText> xEndnoteText; + xEndnotes->getByIndex(0) >>= xEndnoteText; + // This was Footnote Symbol + CPPUNIT_ASSERT_EQUAL(OUString("Endnote"), getProperty<OUString>(getParagraphOfText(1, xEndnoteText), "ParaStyleName")); + CPPUNIT_ASSERT_EQUAL(sal_Int32(0x993300), getProperty<sal_Int32>(getParagraphOfText(1, xEndnoteText), "CharColor")); + uno::Reference<beans::XPropertySet> xPageStyle(getStyles("CharacterStyles")->getByName("Endnote Characters"), uno::UNO_QUERY); CPPUNIT_ASSERT_EQUAL( sal_Int32(58), getProperty< sal_Int32 >(xPageStyle, "CharEscapementHeight") ); CPPUNIT_ASSERT_EQUAL( sal_Int32(0xFF00FF), getProperty< sal_Int32 >(xPageStyle, "CharColor") ); diff --git a/writerfilter/source/dmapper/StyleSheetTable.cxx b/writerfilter/source/dmapper/StyleSheetTable.cxx index 53fb4c1b3d0c..699f605a52a6 100644 --- a/writerfilter/source/dmapper/StyleSheetTable.cxx +++ b/writerfilter/source/dmapper/StyleSheetTable.cxx @@ -1363,6 +1363,7 @@ static const sal_Char* const aStyleNamePairs[] = "Line Number", "Line numbering", "Page Number", "Page Number", "Endnote Reference", "Endnote Characters", + "endnote text", "Endnote", "Endnote Text", "Endnote Symbol", "Table of Authorities", "", "Macro Text", "", |