sw/qa/extras/ooxmlexport/ooxmlexport9.cxx       |   10 +++++++++-
 writerfilter/source/dmapper/StyleSheetTable.cxx |    3 ++-
 2 files changed, 11 insertions(+), 2 deletions(-)

New commits:
commit 79225b5a70595740af500485253a4b2084e940f8
Author: Justin Luth <justin_l...@sil.org>
Date:   Thu Jun 29 13:47:21 2017 -0400

    related tdf#82173 writerfilter: ensure Xnote para-style round-tripping
    
    MSO Xnote styles are "footnote text"/"endnote text".
    LO Xnote styles are "Footnote"/"Endnote", and exports
    Footnote as "Footnote Text" and Endnote as "Endnote Text"
    
    The mapping ensures that the same Xnote style applies to both
    existing (loaded) notes, as well as newly inserted notes.
    
    This patch does two things:
    1.) Endnote should not translate into Endnote Symbol.
    2.) Prepare for when style mapping becomes case sensitive again
    
    Change-Id: I9881c069a3124f83cd0bc2a428577c4a382a8377
    Reviewed-on: https://gerrit.libreoffice.org/39395
    Tested-by: Jenkins <c...@libreoffice.org>
    Reviewed-by: Justin Luth <justin_l...@sil.org>

diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx
index 55582cce7800..30836becd964 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx
@@ -526,6 +526,14 @@ DECLARE_OOXMLEXPORT_TEST(testTdf99227, "tdf99227.docx")
 
 DECLARE_OOXMLEXPORT_TEST(testTdf82173_footnoteStyle, 
"tdf82173_footnoteStyle.docx")
 {
+    uno::Reference<text::XFootnotesSupplier> xFootnotesSupplier(mxComponent, 
uno::UNO_QUERY);
+    uno::Reference<container::XIndexAccess> 
xFootnotes(xFootnotesSupplier->getFootnotes(), uno::UNO_QUERY);
+
+    uno::Reference<text::XText> xFootnoteText;
+    xFootnotes->getByIndex(0) >>= xFootnoteText;
+    // This was footnote text, which didn't match with newly created footnotes
+    CPPUNIT_ASSERT_EQUAL(OUString("Footnote"), 
getProperty<OUString>(getParagraphOfText(1, xFootnoteText), "ParaStyleName"));
+
     uno::Reference<beans::XPropertySet> 
xPageStyle(getStyles("CharacterStyles")->getByName("Footnote Characters"), 
uno::UNO_QUERY);
     CPPUNIT_ASSERT_EQUAL( sal_Int32(58),       getProperty< sal_Int32 
>(xPageStyle, "CharEscapementHeight") );
     CPPUNIT_ASSERT_EQUAL( sal_Int32(0x00FF00), getProperty< sal_Int32 
>(xPageStyle, "CharColor") );
@@ -547,7 +555,7 @@ DECLARE_OOXMLEXPORT_TEST(testTdf82173_endnoteStyle, 
"tdf82173_endnoteStyle.docx"
 
     uno::Reference<text::XText> xEndnoteText;
     xEndnotes->getByIndex(0) >>= xEndnoteText;
-    // This was Footnote Symbol
+    // This was Endnote 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"));
 
diff --git a/writerfilter/source/dmapper/StyleSheetTable.cxx 
b/writerfilter/source/dmapper/StyleSheetTable.cxx
index 699f605a52a6..2861377454ad 100644
--- a/writerfilter/source/dmapper/StyleSheetTable.cxx
+++ b/writerfilter/source/dmapper/StyleSheetTable.cxx
@@ -1349,6 +1349,7 @@ static const sal_Char* const aStyleNamePairs[] =
     "TOC8",                     "Contents 8",
     "TOC9",                     "Contents 9",
     "Normal Indent",             "",
+    "footnote text",             "Footnote",
     "Footnote Text",             "Footnote",
     "Annotation Text",           "",
     "Header",                    "Header",
@@ -1364,7 +1365,7 @@ static const sal_Char* const aStyleNamePairs[] =
     "Page Number",               "Page Number",
     "Endnote Reference",         "Endnote Characters",
     "endnote text",              "Endnote",
-    "Endnote Text",              "Endnote Symbol",
+    "Endnote Text",              "Endnote",
     "Table of Authorities",      "",
     "Macro Text",                "",
     "TOA Heading",               "",
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to