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.

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.


Regards, Oliver.

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