Kaydet (Commit) 707eb4db authored tarafından Justin Luth's avatar Justin Luth Kaydeden (comit) Miklos Vajna

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/38306Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarJustin Luth <justin_luth@sil.org>
Reviewed-by: 's avatarMiklos Vajna <vmiklos@collabora.co.uk>
üst 0c48e747
......@@ -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") );
}
......
......@@ -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", "",
......
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