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

Justin Luth justin_luth at sil.org
Tue Jun 6 12:11:56 UTC 2017


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

New commits:
commit 707eb4db1918658e0c2c2c2033c6a69f80c4eafd
Author: Justin Luth <justin_luth at sil.org>
Date:   Sat Jun 3 10:02:20 2017 +0300

    tdf#82173 writerfilter: charStyle XnoteReference->Xnote Characters
    
    In MSWord, there is a single character style (Footnote Reference) that
    affects both the in-text anchor number and the in-footnote number.
    In Writer, that is split out into "Footnote anchor" for in-text and
    "Footnote Characters" for in-footnote.
    
    The biggest difference in LO is that Footnote Characters does NOT
    default to superscript, while Footnote anchor does.
    In order to handle the default situation, it is best to map
    "Footnote Reference" to "Footnote Characters" so that the style
    differences between the two will be removed. It seems
    that WW8 also does the same thing.
    
    The "regression" will come if someone has done custom formatting that
    they prefer to show up in-text rather than in-footnote. Now it will be
    reversed, where the custom formatting will show up in-footer and not
    in-text. However, it is preferable to handle the default case and
    "fix" the missing superscript problem.
    
    (In WW8, the stiXnoteRef's are RES_POOLCHR_FOOTNOTE/ENDNOTE,
    as mapped in sw/source/filter/ww8/writerwordglue.cxx,
    which turns out to be "Xnote Characters" styles.)
    
    Change-Id: I9152b4a85f6facf3f8192c943e66312988718b0d
    Reviewed-on: https://gerrit.libreoffice.org/38306
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Justin Luth <justin_luth at sil.org>
    Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>

diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx
index a7aadf16549f..24092d620263 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx
@@ -522,7 +522,7 @@ DECLARE_OOXMLEXPORT_TEST(testTdf99227, "tdf99227.docx")
 
 DECLARE_OOXMLIMPORT_TEST(testTdf82173_footnoteStyle, "tdf82173_footnoteStyle.docx")
 {
-    uno::Reference<beans::XPropertySet> xPageStyle(getStyles("CharacterStyles")->getByName("Footnote anchor"), uno::UNO_QUERY);
+    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") );
 }
diff --git a/writerfilter/source/dmapper/StyleSheetTable.cxx b/writerfilter/source/dmapper/StyleSheetTable.cxx
index c70975a1f4b3..4a62b42589c3 100644
--- a/writerfilter/source/dmapper/StyleSheetTable.cxx
+++ b/writerfilter/source/dmapper/StyleSheetTable.cxx
@@ -1366,11 +1366,11 @@ static const sal_Char* const aStyleNamePairs[] =
     "Table of Figures",          "",
     "Envelope Address",          "Addressee",
     "Envelope Return",           "Sender",
-    "Footnote Reference",        "Footnote anchor",
+    "Footnote Reference",        "Footnote Characters",
     "Annotation Reference",      "",
     "Line Number",               "Line numbering",
     "Page Number",               "Page Number",
-    "Endnote Reference",         "Endnote anchor",
+    "Endnote Reference",         "Endnote Characters",
     "Endnote Text",              "Endnote Symbol",
     "Table of Authorities",      "",
     "Macro Text",                "",


More information about the Libreoffice-commits mailing list