[Libreoffice-commits] core.git: sw/qa writerfilter/source

Justin Luth justin_luth at sil.org
Thu Jun 22 23:47:33 UTC 2017


 sw/qa/extras/ooxmlexport/data/tdf82173_endnoteStyle.docx |binary
 sw/qa/extras/ooxmlexport/ooxmlexport9.cxx                |    6 ++++++
 writerfilter/source/dmapper/StyleSheetTable.cxx          |    1 +
 3 files changed, 7 insertions(+)

New commits:
commit 52b6c6493837a6bdccffd16d06daba54e932bd07
Author: Justin Luth <justin_luth at sil.org>
Date:   Fri Jun 9 13:02:40 2017 +0300

    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 at libreoffice.org>
    Reviewed-by: Justin Luth <justin_luth at sil.org>

diff --git a/sw/qa/extras/ooxmlexport/data/tdf82173_endnoteStyle.docx b/sw/qa/extras/ooxmlexport/data/tdf82173_endnoteStyle.docx
index 1c6c2f4f5b8c..d38a65943c32 100644
Binary files a/sw/qa/extras/ooxmlexport/data/tdf82173_endnoteStyle.docx and b/sw/qa/extras/ooxmlexport/data/tdf82173_endnoteStyle.docx differ
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",                "",


More information about the Libreoffice-commits mailing list