Ask Your Question
0

want documentation for '--convert-to' filters

asked 2019-08-10 11:28:05 +0200

Where can I find all the gory details on the various --convert-to filters? I'm especially interested in conversion from HTML to ODT, and I wonder how this really works. For example, how must a footnote in HTML be constructed so that the filter converts it to a footnote. Ditto for <figure> environments to make it a floating figure with a caption, etc., etc.

It seems to me that this information is very well hidden. Even a longer search didn't yield any results – either I'm searching for the wrong tags, or maybe it is really missing? Note that I don't have problems with looking at source code, if I only knew where it resides...

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
0

answered 2019-08-10 12:19:17 +0200

updated 2019-08-10 12:29:10 +0200

What you are asking is actually a mix of very different things. Specifically, the details on "how must a footnote in HTML be constructed so that the filter converts it to a footnote" is not something specific for --convert-to. It is just a detail of a specific filter - HTML one - that reads HTML document and converts it into LibreOffice document model; and that is no different in case of --convert-to compared to opening an HTML in LibreOffice GUI. So - in fact, your too broad question is equivalent to "I want to know how everything in LibreOffice works" - which has quite a simple answer: "all the gory details are in the source code". And - the code is ever evolving; so if today someone starts improving HTML import filter, tomorrow the specific detail on the footnote might change...

I don't have problems with looking at source code, if I only knew where it resides...

https://git.libreoffice.org/core

edit flag offensive delete link more

Comments

Thank you for the answer. Alas, it is not helpful at all. There must be some rules to convert HTML to the LibreOffice document model! Why is this my request 'too broad'? For example, text marked as bold in HTML gets converted to emboldened text (I know this is obvious); there must be similar rules for <figure> – or not, but somewhere this has to be documented. Or shall I really accept that LibreOffice is a black box for ordinary users, and I have to pray that an update of LibreOffice to the next version doesn't completely change the conversion? I can hardly believe that.

And can you please be a bit more specific regarding the source code of the HTML filter? I've seen this git tree before, but it is incredibly large.

lemzwerg gravatar imagelemzwerg ( 2019-08-10 17:40:11 +0200 )edit

And can you please be a bit more specific regarding the source code of the HTML filter?

Look into sw/source/filter/html

Mike Kaganski gravatar imageMike Kaganski ( 2019-08-10 22:01:58 +0200 )edit
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2019-08-10 11:28:05 +0200

Seen: 21 times

Last updated: Aug 10