Hi Oliver,

Oliver-Rainer Wittmann - Software Engineer - Sun Microsystems wrote:
Hi Giuseppe,

I have look at your patch and I have got some thoughts about the ODF:

First of all, your patch is in good shape.
There is one thing that not so good - it's the calling of method <SwChapterField::ChangeExpansion(..)>. But, there exists a solution - stay tuned.

well, I got the idea from SRC680_m201:sw/source/core/doc/doctxm.cxx:1905
the one that's currently working for index entry line formats (the code
used to expand the Chapter Info token put into index line with Chapter
info pushbutton, if I'm not wrong)


Your solution works, except the load and save, but I think, we should choose a more flexible solution. This opinion comes from your suggestion for the OpenDocument file format. Your suggestion to enhance the index entry "chapter" (ODF element text:index-entry-chapter) by adding the missing value "plain-number" for attribute text:display and adding attribute text:outline-level as these are for chapter field sounds good. I will discuss this with our ODF experts. If they agree, we have to make a proposal to the OASIS ODF TC to include this change in the next ODF version. This means your proposed core boolean IsPrefixPageNum results in an additional index entry. Thus, why do not provide the user the possiblility to include such a index entry on its own in an arbitray position. Not only as a prefix to the page number entry. Then we haven't got the problem in the ODF to group the enhanced chapter entry with the page number entry together. In this case we also doesn't have add extra code to make the separator configurable. The already existing button "Chapter Info" already provides the chapter index entry to the user - the outline-level attribute has to be added.
What do you think? I think you could implement this.

Well, that was my second idea after I implemented the patch you examined.
I agree with you that a more flexible solution is needed, then using the
already available Chapter info pushbutton seems a good idea, but you
need to add the text:outline-level and may be text:plain-number attributes.

These are missing in the index entry description (ODF 1.0 spec: 7.12.1)
whereas they are present as token in XML mapping (in
SRC680_m201:xmloff/source/core/xmltoken.cxx:1296 and :1356) because they
are available in chapter field formatting (ODF 1.0: 6.2.7).

Besides Chapter Info is currently available only in Alphabetical Index,
so in the UI it should be added where possible or the Chapter number (E#
token) could be used instead where available, by adding the outline
level to it.

Let me know it this is the way to go (e.g. using Chapter Info way and
the like) and I'll try to implement a patch to demonstrate it.

One more thing about ODF: it seems that the Illustration Index and its
derived indexes lack the chapter information completely (ODF 1.0: 7.4.2).

--
Kind Regards,
Giuseppe Castagno
Acca Esse http://www.acca-esse.eu
[EMAIL PROTECTED]

Giuseppe Castagno wrote:
Hi Oliver,

Oliver-Rainer Wittmann - Software Engineer - Sun Microsystems wrote:
Giuseppe Castagno wrote:
Hi Oliver,

....

But, questions, which strongly belong to a certain OOo application, can also be asked in the mailing list of this application.


Good, so here are the comments re: ODF spec, quite verbose, I'm afraid.

I attached to issue 53420 a writer document [2] I created using a patched version of OOo to show what I have in mind. The feature is not persistent, I changed only the index bodies, if you update the indexes with a standard OOo version, you'll loose the "chapter-page" feature in the index body. I can provide the patch to OOo if you'd like to do some testing, it patches only the sw module.

Looking for a way to make the new feature persistent in the ODT file according to the ODF standard [1], it seems to me there is something missing or, more probably, I can't make out how an index entry should be filled to obtain what I attached as an example.

In the "Table of Content Entry Template" ([1] 7.3.2), when it comes down to the chapter number explained in [1]7.12.1, the "Display Chapter Format" attribute seems to lack the value needed to generate the chapter number with neither prefix nor suffix as is instead specified for fields (see [1]6.2.7 "text:display" attribute). If I'm not wrong the missing value is "plain-number". Furthermore to only display the chapter number up to a chosen outline level, the attribute "outline-level" is needed as well.

The [1]7.7.2 "User-Defined Index Entry Template" and [1]7.8.3 "Alphabetical Index Entry Template" have the same format as [1]7.3.2 just explained: the same attributes/values are missing from chapter numbering. The "User-Defined Index Entry Template" has the chapter number attribute, but this is not available on the OOo dialog window for that type of index, whereas the "Alphabetical Index Entry Template" dialog has it.

In the [1]7.4.2 "Illustration Index Entry Template" the chapter numbering is completely missing in the spec, hence it's missing from the indexes which use this same template: [1]7.5.2 "Table Index Entry Template" and [1]7.6.2 "Object Index Entry Template".

The solution should be to update the "text-index-entry-chapter" attribute by adding it the value needed (plain-number) and added the attribute "outline-level", then add the attribute "text-index-entry-chapter" to the entries that don't have it.

There is something to be discussed about how the "Alphabetical Index" entry are to be grouped in order to maintain the chapter-page numbering stuff correct, we'll talk about that later.

One last thing: I started with issue 53420, but is seems to me that issue 14725 [3] refers to the same topic, even if it was for OOo 1.x code line.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

  • [sw-discussi... Giuseppe Castagno
    • Re: [sw... Mathias Bauer
    • Re: [sw... Oliver-Rainer Wittmann - Software Engineer - Sun Microsystems
      • Re:... Giuseppe Castagno
        • ... Oliver-Rainer Wittmann - Software Engineer - Sun Microsystems
          • ... Giuseppe Castagno
            • ... Oliver-Rainer Wittmann - Software Engineer - Sun Microsystems
              • ... Giuseppe Castagno
            • ... Oliver-Rainer Wittmann - Software Engineer - Sun Microsystems
              • ... Giuseppe Castagno
                • ... Oliver-Rainer Wittmann - Software Engineer - Sun Microsystems
                • ... Giuseppe Castagno

Reply via email to