corinthia-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jan i <>
Subject Re: headers
Date Mon, 18 May 2015 08:21:03 GMT
On 18 May 2015 at 01:51, Gabriela Gibson <> wrote:

> 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

Could it be you too talk in east and west....sounds a little bit like it.

H1 - H6 are builtin style names, but most users (and office packages) use
kind of names for header styles. E.x. in my standard style sheet, they are
called header1 - header6.

There is no way we can trust style names to be anything specific. But the
TEXT_OUTLINE_LEVEL is an attribute within the style (part of the style
definition) and should be used.

If will get even more fun, with you look at style names for bullets and
they are completely random.

> <header>
> <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?
that sounds like a good idea.

jan I.

> G
> --
> Visit my Coding Diary:

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message