To comment on the following update, log in, then open the issue:
http://www.openoffice.org/issues/show_bug.cgi?id=50728
                  Issue #:|50728
                  Summary:|loading odt with user-index increments outline-level
                Component:|Word processor
                  Version:|OOo 2.0 Beta
                 Platform:|All
                      URL:|
               OS/Version:|Windows XP
                   Status:|UNCONFIRMED
        Status whiteboard:|
                 Keywords:|
               Resolution:|
               Issue type:|DEFECT
                 Priority:|P3
             Subcomponent:|editing
              Assigned to:|mru
              Reported by:|danomytt





------- Additional comments from [EMAIL PROTECTED] Tue Jun 14 09:26:48 -0700 
2005 -------
Steps to reproduce :

1. create a new odt document.
2. put three lines in it :

sentence #1
sentence #2
sentence #3

3. above those, insert a "user defined index"
4. hilight 'sentence #1', Insert -> Indexes and Tables -> Entry.  Choose 'User
Defined" from the index drop down and make level = 1.  click 'insert'
5. repeat step #4 for the other two sentences increasing the level by one for
each (e.g. #2 is at level 2 and #3 is at level 3)
6. Tools -> Update -> Update All and you'll see the nice new user-defined index
with the cascading three indexes.
7. save the document
8. quit oo, and re-load the document.  Initially, the previously generated
user-index is correct.  But, repeat step #6 to see the index jump to the right.

The cause seems to be OO, when it opens the document, incorrectly adds one to
the "text:outline-level" attribute on the user-index-mark.  I wrote a very small
xslt which when run on the content.xml file adjusts the level back :

...

  <xsl:template match="text:user-index-mark">
    <xsl:copy>
      <xsl:apply-templates select="@*[not(name() = 'text:outline-level')]" />
      <xsl:if test="@text:outline-level">
        <xsl:attribute name="text:outline-level"><xsl:value-of
select="@text:outline-level - 1" /></xsl:attribute>
      </xsl:if>
      <xsl:apply-templates select="node()" />
    </xsl:copy>
  </xsl:template>

  <xsl:template match="node() | @*">
    <xsl:copy>
      <xsl:apply-templates select="node() | @*" />
    </xsl:copy>
  </xsl:template>
...

And finally, every time the document is loaded and saved, the outline level
keeps getting higher.

I can surely email an example document if needed.

Thanks for such a wonderful product!
daniel

---------------------------------------------------------------------
Please do not reply to this automatically generated notification from
Issue Tracker. Please log onto the website and enter your comments.
http://qa.openoffice.org/issue_handling/project_issues.html#notification

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


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

Reply via email to