corinthia-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gabriela Gibson <>
Subject headers
Date Sun, 17 May 2015 23:51:47 GMT
Peter said about the value of the H(n) tag:

"  In ODF, we can’t rely on style names to determine the heading level,
  because it’s perfectly legal to call them something other than
  Heading_20_n, which is what OpenOffice seems to do by default. The
  text:h element has an outline-level attribute; this indicates the
  level of the heading. So you should get the value of the
  TEXT_OUTLINE_LEVEL attribute and use that to determine which HTML
  heading tag to use.

That is a solid value thoughout tho(being an enum), and does not
help me to determine if it's H1 or H6.  I can get it with
odfNode->attrs->value for now, but it's a char* and so will take some
ASCII value mangling TLC.   It probably would be an idea to have a
translation function for this, just for reading clarity.

Regard H(n) > 6 I think it's probably better to keep it H6
because the user will be expecting some kind of header (which h6
is) and not a paragraph.  In the end they'll make it a paragraph
probably, but in the meanwhile, they did ask for something of the
shape of

<their text to be headed>

so I think we should give that to them, even if imperfect.

Alternative ideas (to be explored later) are to press a list (of lists
(of lists (...)) into service. (bullets?  numbered?)

Finally: Do we have a notifying mechanism that kicks in if we cannot
translate from A to B?

If not, should we?


Visit my Coding Diary:

View raw message