summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin Luth <justin_luth@sil.org>2017-06-03 10:02:20 +0300
committerMiklos Vajna <vmiklos@collabora.co.uk>2017-06-06 14:11:36 +0200
commit707eb4db1918658e0c2c2c2033c6a69f80c4eafd (patch)
treee09a8db8cc40fda635aa5bb2b31cc81d9d067c5d
parent0c48e747327bfa7f7d883297da8dbf818a9aef87 (diff)
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@libreoffice.org> Reviewed-by: Justin Luth <justin_luth@sil.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport9.cxx2
-rw-r--r--writerfilter/source/dmapper/StyleSheetTable.cxx4
2 files changed, 3 insertions, 3 deletions
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", "",