Hi, Michael

It's simple to make an example.
1. Use [1] and [2] to set an flatxml XML Filter;
2. Use the flatxml filter to create an flatxml in Impress:
<presentation:date-time/>,<presentation:header/> in <style:handout-master>
or <style:master-page> are right;
3. Use the filter to import the created flatxml;
4. Switch to handout view or Slide Master view, the <date/time> which is
corresponded to <presentation:date-time/>, <header> are increased.

I'm a OOo code beginner and try to trace. It seems right in
xmloff/source/text/txtfldi.cxx:
XMLTextFieldImportContext::CreateTextFieldImportContext(...)
{ ...
case XML_TOK_DRAW_DATE_TIME:
            pContext = new XMLDateTimeFieldImportContext( rImport, rHlp,
                                                          nPrefix, rName );
   break;
...
}
I don't know how to trace further in SD.

[1] odfflatxmlimport.xsl
<?xml version='1.0' encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="
http://www.w3.org/1999/XSL/Transform";>
    <xsl:output method="xml" encoding="UTF-8" indent="yes"/>
    <xsl:template match="@*|node()">
        <xsl:copy>
            <xsl:apply-templates select="@*|node()"/>
        </xsl:copy>
    </xsl:template>
</xsl:stylesheet>

[2]  odfflatxmlexport.xsl
<?xml version='1.0' encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="
http://www.w3.org/1999/XSL/Transform";
xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0">
    <xsl:output method="xml" encoding="UTF-8"/>
  <xsl:template match="@*|node()">
    <xsl:copy>
      <xsl:apply-templates select="@*|node()"/>
    </xsl:copy>
  </xsl:template>
  <xsl:template
match="@office:mimetype[string(.)='application/vnd.oasis.opendocument.drawing']">
      <xsl:attribute
name="office:mimetype">application/vnd.oasis.opendocument.graphics</xsl:attribute>
  </xsl:template>
</xsl:stylesheet>

Thanks!

Woods Yan

On Fri, Dec 19, 2008 at 9:45 PM, Michael Brauer - Sun Germany - ham02 -
Hamburg <[email protected]> wrote:

> Hi Woods Yan,
>
> do you have an example what the <presentation:date-time/> is before and
> after you import and export it?
>
> Michael
>
>
>

Reply via email to