To comment on the following update, log in, then open the issue:
http://www.openoffice.org/issues/show_bug.cgi?id=65447
                  Issue #:|65447
                  Summary:|WordML import does not set style:master-page-name
                          |attribut for tables
                Component:|xml
                  Version:|OOo 2.0.2
                 Platform:|All
                      URL:|
               OS/Version:|All
                   Status:|UNCONFIRMED
        Status whiteboard:|
                 Keywords:|
               Resolution:|
               Issue type:|DEFECT
                 Priority:|P3
             Subcomponent:|external filters
              Assigned to:|jsi
              Reported by:|stefan_ziel





------- Additional comments from [EMAIL PROTECTED] Tue May 16 06:43:52 -0700 
2006 -------
That problem is a little more tricky ;). the "style:master-page-name" attribute
is not set in the table-style. but if the body of an document starts with a
table (no paragraph before) it should so to apply the defined page-layout.

a quick and dirty workarround uses code similar to wordml2ooo_text.xsl in
wordml2ooo_table.xsl

  <xsl:template match="w:tblPr" mode="style">
    <xsl:variable name="table-number">
       <xsl:number count="w:tbl" from="/w:wordDocument/w:body" level="any"
format="1" />
    </xsl:variable>
    <xsl:element name="style:style">
      <xsl:attribute name="style:name">
        <xsl:text>Table</xsl:text>
        <xsl:value-of select="$table-number"/>
      </xsl:attribute>
      <xsl:attribute name="style:family">table</xsl:attribute>
      <xsl:if test="w:tblStyle">
        <xsl:attribute name="style:parent-style-name">
          <xsl:value-of select="concat('w',translate(w:tblStyle/@w:val,'
[EMAIL PROTECTED](&#x26;)+/,;?&lt;&gt;{}[]:','_'))" />
        </xsl:attribute>
      </xsl:if>
      <xsl:variable name="section-property-number"
select="count(preceding::w:sectPr)" />
      <xsl:variable name="last-section-property"
select="preceding::w:pPr/w:sectPr[1]" />
      <xsl:variable name="next-section-property" 
select="following::w:sectPr[1]" />
      <xsl:variable name="last-next-p-tbl"
select="$last-section-property[last()]/following::*[name()='w:p' or
name()='w:tbl']" />
      <xsl:choose>
        <xsl:when test="not($next-section-property/w:type/@w:val = 'continuous')
and generate-id($last-next-p-tbl[1]) = generate-id(..) and
not(ancestor::w:sectPr or ancestor::w:styles)">
          <xsl:attribute name="style:master-page-name">
            <xsl:text>Standard</xsl:text>
            <xsl:value-of select="$section-property-number + 1" />
          </xsl:attribute>
        </xsl:when>
        <xsl:when test="$table-number = 1">
          <xsl:attribute name="style:master-page-name">Standard1</xsl:attribute>
        </xsl:when>
      </xsl:choose>
...

but both could probably disturb page formats.

a second, related problem: the xpath 

"not($next-section-property/w:type/@w:val = 'continuous') and
generate-id($last-next-p-tbl[1]) = generate-id(..) and not(ancestor::w:sectPr or
ancestor::w:styles)" 

should consider the very last section property of the document even if marked as
"continous".

---------------------------------------------------------------------
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