a991ad93dc
ODF represents footnotes by using a fixed string for the label (text:note-citation) and a flexible body (text:note-body) for the representation in the footnote area. The only formatting of the footnote reference is done by changing the character class assigned to the anchor (which is the text range of the label in the text). For most of the setting, the footnote area label just follows the footnote body character formatting. OTOH MS Word has no such "restrictions". It handles the label just as concated, formated text runs with the same style. On top of it, DOCX completely splits the reference from the footnote area part, including its own label, which can easily result in completely different labels for the footnote and the reference, as I happened to repoduce for my test documents. At this point it's quite obvious that for any complex footnotes, LibreOffice won't be able to represent them. IMHO ODF should offer the same flexibility for the label and the body and allow all the normal formatting in the label. I'm not sure that getting footnote area and reference label out of sync is a good idea. So this patch tries to improve the situation in the current constraints set by ODF. 1. It imports all runs of the whole custom DOCX footnote label. 2. If any run contains a symbol, switches the font of the whole label to the referenced symbol font. 3. Completely ignores the label of the footnote area and overrides the font of the footnote area label with the font of the reference. Other problems I found while testing this code: 1. LO edit field correctly gets the font and character set, but displays empty glyphs. So no real way to edit the label. 2. Normally the font of the footnote area label would follow the footnote font. This doesn't work anymore when the font is overridden for the label. Setting the whole font of the label to Symbol doesn't seem like a good solution either. 3. You can't mix multiple fonts, or even symbols and letters, as you can just select one font for the label. 4. You can't change the footnote are label font at all and since it doesn't follow the footnote area anymore, there is basically no way to change it. Change-Id: Iafa16936be81e1866c610ebf0f71ab15e74dd059 Reviewed-on: https://gerrit.libreoffice.org/81370 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de> |
||
---|---|---|
.. | ||
factory_ns.py | ||
factoryimpl.py | ||
factoryimpl_ns.py | ||
factoryinc.py | ||
Handler.cxx | ||
Handler.hxx | ||
model.xml | ||
modelpreprocess.py | ||
OOXMLBinaryObjectReference.cxx | ||
OOXMLBinaryObjectReference.hxx | ||
OOXMLDocumentImpl.cxx | ||
OOXMLDocumentImpl.hxx | ||
OOXMLFactory.cxx | ||
OOXMLFactory.hxx | ||
OOXMLFastContextHandler.cxx | ||
OOXMLFastContextHandler.hxx | ||
OOXMLFastDocumentHandler.cxx | ||
OOXMLFastDocumentHandler.hxx | ||
OOXMLFastHelper.hxx | ||
OOXMLParserState.cxx | ||
OOXMLParserState.hxx | ||
OOXMLPropertySet.cxx | ||
OOXMLPropertySet.hxx | ||
OOXMLStreamImpl.cxx | ||
OOXMLStreamImpl.hxx | ||
qnametostr.py | ||
qnametostrcore.cxx | ||
README | ||
resourceids.py | ||
tox.ini |
= DOCX tokenizer == Coding style This directory uses the PEP 8 (see <http://legacy.python.org/dev/peps/pep-0008/>) coding style for Python files. Please run ---- pycodestyle *.py ---- before committing.