Kaydet (Commit) 52b6c649 authored tarafından Justin Luth's avatar Justin Luth

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/38605Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarJustin Luth <justin_luth@sil.org>
üst 430774c4
......@@ -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") );
......
......@@ -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", "",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment