优化项目结构、优化 maven 结构

This commit is contained in:
chenkailing
2021-02-10 00:58:13 +08:00
parent 28d3e05ca9
commit 2542a24675
3610 changed files with 77 additions and 180 deletions

View File

@@ -0,0 +1,344 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--***********************************************************
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*
***********************************************************-->
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:w="http://schemas.microsoft.com/office/word/2003/wordml" xmlns:wx="http://schemas.microsoft.com/office/word/2003/auxHint" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:aml="http://schemas.microsoft.com/aml/2001/core" xmlns:dt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" xmlns:math="http://www.w3.org/1998/Math/MathML" xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" xmlns:ooo="http://openoffice.org/2004/office" xmlns:ooow="http://openoffice.org/2004/writer" xmlns:oooc="http://openoffice.org/2004/calc" xmlns:dom="http://www.w3.org/2001/xml-events" exclude-result-prefixes="w wx aml o dt v" xmlns:fla="urn:experimental:fla">
<xsl:output method="xml" indent="no" encoding="UTF-8" version="1.0"/>
<xsl:include href="../../common/measure_conversion.xsl"/>
<xsl:include href="../common/ms2ooo_docpr.xsl"/>
<xsl:include href="wordml2ooo_text.xsl"/>
<xsl:include href="wordml2ooo_settings.xsl"/>
<xsl:include href="wordml2ooo_table.xsl"/>
<xsl:include href="wordml2ooo_page.xsl"/>
<xsl:include href="wordml2ooo_list.xsl"/>
<xsl:include href="wordml2ooo_draw.xsl"/>
<xsl:include href="wordml2ooo_field.xsl"/>
<xsl:include href="wordml2ooo_props.xsl"/>
<xsl:key name="paragraph-style" match="w:style[@w:type = 'paragraph']" use="@w:styleId"/>
<xsl:key name="heading-style" match="w:style[@w:type = 'paragraph' and w:pPr/w:outlineLvl]" use="@w:styleId"/>
<xsl:variable name="preserve-alien-markup">no</xsl:variable>
<xsl:variable name="native-namespace-prefixes">,w,o,v,wx,aml,w10,dt,</xsl:variable>
<xsl:variable name="to-dispatch-elements">,wx:sect,wx:sub-section,w:p,w:tbl,w:sectPr,w:r,w:fldSimple,w:hlink,w:t,w:pict,w:br,w:instrText,w:fldChar,w:tab,w:footnote,w:endnote,aml:annotation,w:hlink,w:footnote,w:endnote,w:tblGrid,w:tr,w:tc,wx:pBdrGroup,</xsl:variable>
<xsl:template match="/">
<xsl:apply-templates select="w:wordDocument"/>
</xsl:template>
<xsl:template match="*" mode="dispatch">
<xsl:choose>
<xsl:when test="not(contains($native-namespace-prefixes, concat(',', substring-before(name(), ':'), ',')))">
<!-- if alien namespace dispatch -->
<xsl:choose>
<xsl:when test="$preserve-alien-markup = 'yes'">
<xsl:copy>
<xsl:copy-of select="@*"/>
<xsl:apply-templates mode="dispatch"/>
</xsl:copy>
</xsl:when>
<xsl:otherwise>
<xsl:apply-templates mode="dispatch"/>
</xsl:otherwise>
</xsl:choose>
</xsl:when>
<xsl:when test="contains($to-dispatch-elements, concat(',',name(),','))">
<xsl:apply-templates select="current()"/>
</xsl:when>
</xsl:choose>
</xsl:template>
<xsl:template match="w:wordDocument">
<office:document office:mimetype="application/vnd.oasis.opendocument.text" office:version="1.0">
<fla:fla.activate/>
<xsl:apply-templates select="o:DocumentProperties"/>
<xsl:apply-templates select="w:docOleData" mode="init"/>
<xsl:apply-templates select="w:docPr"/>
<xsl:apply-templates select="w:fonts"/>
<xsl:apply-templates select="w:styles"/>
<xsl:apply-templates select="w:body"/>
<xsl:apply-templates select="w:docOleData" mode="exit"/>
</office:document>
</xsl:template>
<xsl:template match="w:fonts">
<xsl:element name="office:font-face-decls">
<!-- MS Word's default font declaration, added for Writer automatically. glu -->
<style:font-face style:name="Arial" svg:font-family="Arial" style:font-family-generic="roman" style:font-pitch="variable"/>
<style:font-face style:name="Times New Roman" svg:font-family="'Times New Roman'" style:font-family-generic="roman" style:font-pitch="variable"/>
<style:font-face style:name="Symbol" svg:font-family="Symbol" style:font-family-generic="roman" style:font-pitch="variable" style:font-charset="x-symbol"/>
<style:font-face style:name="Courier New" svg:font-family="'Courier New'" style:font-family-generic="modern" style:font-pitch="fixed"/>
<xsl:if test="not(w:font[@w:name='StarSymbol'])">
<style:font-face style:name="StarSymbol" svg:font-family="StarSymbol" style:font-charset="x-symbol"/>
</xsl:if>
<xsl:for-each select="w:font">
<xsl:element name="style:font-face">
<xsl:attribute name="style:name">
<xsl:value-of select="@w:name"/>
</xsl:attribute>
<xsl:attribute name="svg:font-family">
<xsl:value-of select="@w:name"/>
</xsl:attribute>
<!-- added by glu, for process special fonts e.g. Marlett, -->
<xsl:if test="w:charset/@w:val = '02'">
<xsl:attribute name="style:font-charset">x-symbol</xsl:attribute>
</xsl:if>
<xsl:if test="w:family">
<xsl:choose>
<xsl:when test="w:family/@w:val = 'Swiss'">
<xsl:attribute name="style:font-family-generic">swiss</xsl:attribute>
</xsl:when>
<xsl:when test="w:family/@w:val='Modern'">
<xsl:attribute name="style:font-family-generic">modern</xsl:attribute>
</xsl:when>
<xsl:when test="w:family/@w:val='Roman'">
<xsl:attribute name="style:font-family-generic">roman</xsl:attribute>
</xsl:when>
<xsl:when test="w:family/@w:val='Script'">
<xsl:attribute name="style:font-family-generic">script</xsl:attribute>
</xsl:when>
<xsl:when test="w:family/@w:val='Decorative'">
<xsl:attribute name="style:font-family-generic">decorative</xsl:attribute>
</xsl:when>
<xsl:when test="w:family/@w:val='System'">
<xsl:attribute name="style:font-family-generic">system</xsl:attribute>
</xsl:when>
<xsl:otherwise>
<xsl:attribute name="style:font-family-generic">system</xsl:attribute>
</xsl:otherwise>
</xsl:choose>
</xsl:if>
<xsl:if test="w:pitch and string-length(w:pitch/@w:val) &gt; 0">
<xsl:attribute name="style:font-pitch">
<xsl:choose>
<xsl:when test="w:pitch/@w:val = 'default'">variable</xsl:when>
<xsl:otherwise>
<xsl:value-of select="w:pitch/@w:val"/>
</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
</xsl:if>
</xsl:element>
</xsl:for-each>
</xsl:element>
</xsl:template>
<xsl:template match="w:styles">
<office:styles>
<!--The next statement Added by wguo,collect the pict's dash and mark-style.The template is implemented in file wordml2ooo_draw.xsl-->
<xsl:apply-templates select="/w:wordDocument/w:body//w:pict" mode="style4dash_mark"/>
<xsl:apply-templates select="//v:fill" mode="office-style"/>
<xsl:call-template name="create-default-paragraph-styles"/>
<xsl:call-template name="create-default-text-styles"/>
<xsl:call-template name="create-default-frame-style"/>
<!-- StarWriter has no default style family 'list'. glu -->
<xsl:if test="w:style[@w:type = 'paragraph' and w:pPr/w:outlineLvl and w:pPr/w:listPr]">
<xsl:call-template name="create-outline-style"/>
</xsl:if>
<xsl:apply-templates select="w:style[@w:type='table']" mode="table"/>
<xsl:apply-templates select="w:style[@w:type='list']" mode="list"/>
<xsl:apply-templates select="w:style[@w:type!='list']"/>
<xsl:apply-templates select="/w:wordDocument/w:docPr/w:footnotePr" mode="config"/>
<xsl:apply-templates select="/w:wordDocument/w:docPr/w:endnotePr" mode="config"/>
</office:styles>
<office:automatic-styles>
<xsl:apply-templates select="/w:wordDocument/w:body//w:p" mode="style"/>
<xsl:apply-templates select="/w:wordDocument/w:body//w:rPr[not(parent::w:pPr)]" mode="style"/>
<!--The next statement Added by wguo for the pict's draw-style.The template is implemented in file wordml2ooo_draw.xsl-->
<xsl:apply-templates select="/w:wordDocument/w:body//w:pict" mode="style"/>
<xsl:apply-templates select="/w:wordDocument/w:body//w:tblPr" mode="style"/>
<xsl:apply-templates select="/w:wordDocument/w:body//w:gridCol" mode="style"/>
<xsl:apply-templates select="/w:wordDocument/w:body//w:trPr" mode="style"/>
<xsl:apply-templates select="/w:wordDocument/w:body//w:tcPr" mode="style"/>
<xsl:apply-templates select="/w:wordDocument/w:body//w:listPr" mode="style"/>
<xsl:apply-templates select="/w:wordDocument/w:body//w:sectPr" mode="page-layout"/>
<xsl:call-template name="default_date_style"/>
<!--add for generate the date , time style for date , time field G.Y.-->
<xsl:apply-templates select="/w:wordDocument/w:body//w:instrText | /w:wordDocument/w:body//w:fldSimple " mode="style"/>
</office:automatic-styles>
<office:master-styles>
<xsl:apply-templates select="/w:wordDocument/w:body//w:sectPr" mode="master-page"/>
</office:master-styles>
</xsl:template>
<xsl:template match="w:style">
<style:style>
<xsl:attribute name="style:name">
<xsl:value-of select="concat('w',translate(@w:styleId,' ~`!@#$%^*(&#x26;)+/,;?&lt;&gt;{}[]:','_'))"/>
</xsl:attribute>
<xsl:if test="w:basedOn">
<xsl:attribute name="style:parent-style-name">
<xsl:value-of select="concat('w',translate(w:basedOn/@w:val,' ~`!@#$%^*(&#x26;)+/,;?&lt;&gt;{}[]:','_'))"/>
</xsl:attribute>
</xsl:if>
<xsl:if test="w:next">
<xsl:attribute name="style:next-style-name">
<xsl:value-of select="concat('w',translate(w:basedOn/@w:val,' ~`!@#$%^*(&#x26;)+/,;?&lt;&gt;{}[]:','_'))"/>
</xsl:attribute>
</xsl:if>
<xsl:choose>
<xsl:when test="@w:type = 'character'">
<xsl:attribute name="style:family">text</xsl:attribute>
</xsl:when>
<!-- table, paragraph are the same as in Writer . glu -->
<xsl:when test="@w:type">
<xsl:attribute name="style:family">
<xsl:value-of select="@w:type"/>
</xsl:attribute>
</xsl:when>
<xsl:otherwise>
<xsl:attribute name="style:family">text</xsl:attribute>
</xsl:otherwise>
</xsl:choose>
<xsl:choose>
<xsl:when test="@w:type = 'table'">
<xsl:element name="style:table-properties">
<!-- xsl:apply-templates select="w:tblPr" mode="style"/ -->
</xsl:element>
</xsl:when>
<xsl:when test="@w:type = 'character' ">
<xsl:element name="style:text-properties">
<!--
<xsl:apply-templates select="w:pPr/w:rPr"/>
<xsl:apply-templates select="w:rPr"/>
-->
<xsl:for-each select="w:rPr">
<xsl:call-template name="text-properties"/>
</xsl:for-each>
</xsl:element>
</xsl:when>
<xsl:otherwise>
<xsl:element name="style:paragraph-properties">
<xsl:apply-templates select="w:pPr"/>
</xsl:element>
<xsl:element name="style:text-properties">
<xsl:apply-templates select="w:rPr"/>
<xsl:apply-templates select="w:pPr/w:rPr"/>
</xsl:element>
</xsl:otherwise>
</xsl:choose>
</style:style>
</xsl:template>
<xsl:template match="w:body">
<xsl:element name="office:body">
<xsl:element name="office:text">
<!-- to add the sequece variable declaration at the begining of the office:body G.Y.-->
<text:sequence-decls>
<xsl:call-template name="default_seqence_declaration"/>
<xsl:apply-templates select="/w:wordDocument/w:body//w:instrText[substring(normalize-space(text()),1,3) = 'SEQ' ] | /w:wordDocument/w:body//w:fldSimple[substring(normalize-space(@w:instr),1,3) = 'SEQ' ] " mode="sequence_declare"/>
</text:sequence-decls>
<!-- add the user field variables declare for Docpropety fields importing G.Y.-->
<text:user-field-decls>
<xsl:call-template name="user_fields_declare_docproperty"/>
</text:user-field-decls>
<xsl:apply-templates mode="dispatch"/>
</xsl:element>
</xsl:element>
</xsl:template>
<xsl:template match="wx:sect">
<xsl:apply-templates mode="dispatch"/>
</xsl:template>
<xsl:template match="wx:sub-section">
<xsl:apply-templates mode="dispatch"/>
</xsl:template>
<xsl:template name="create-default-frame-style">
<!--add for default frame style -->
<style:style style:name="Frame" style:family="graphic">
<style:graphic-properties text:anchor-type="paragraph" svg:x="0in" svg:y="0in" style:wrap="parallel" style:number-wrapped-paragraphs="no-limit" style:wrap-contour="false" style:vertical-pos="top" style:vertical-rel="paragraph-content" style:horizontal-pos="center" style:horizontal-rel="paragraph-content"/>
</style:style>
</xsl:template>
<xsl:template name="ConvertMeasure">
<xsl:param name="TargetMeasure" select="'cm'"/>
<xsl:param name="TargetTruncate" select=" 'all' "/>
<xsl:param name="value"/>
<!-- When TargetTruncate ='all' it returns the number whichsoever the return value is negative or positive
When TargetTruncate ='nonNegative' it only returns nonNegative number, all negative number to be returned as 0
When TargetTruncate ='positive" it only returns positive number, all nonPositive number to be returned as 1 -->
<xsl:variable name="return_value">
<xsl:choose>
<!-- remove the measure mark, if the value is null, the result should be 0. Must be the first case -->
<xsl:when test="string-length(translate($value,'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ ','')) = 0">0</xsl:when>
<xsl:when test="string-length(translate($value,'-.0123456789 ','')) = 0">
<xsl:value-of select="$value"/>
</xsl:when>
<xsl:when test="$TargetMeasure = 'cm'">
<xsl:call-template name="convert2cm">
<xsl:with-param name="value" select="$value"/>
</xsl:call-template>
</xsl:when>
<xsl:when test="$TargetMeasure = 'pt'">
<xsl:call-template name="convert2pt">
<xsl:with-param name="value" select="$value"/>
</xsl:call-template>
</xsl:when>
<xsl:when test="$TargetMeasure = 'twip'">
<xsl:call-template name="convert2twip">
<xsl:with-param name="value" select="$value"/>
</xsl:call-template>
</xsl:when>
<xsl:when test="$TargetMeasure = 'in'">
<xsl:call-template name="convert2in">
<xsl:with-param name="value" select="$value"/>
</xsl:call-template>
</xsl:when>
</xsl:choose>
</xsl:variable>
<xsl:choose>
<xsl:when test="$TargetTruncate = 'all' ">
<xsl:choose>
<xsl:when test="number($TargetMeasure) = 'NaN' ">
<xsl:value-of select=" '0' "/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$return_value"/>
</xsl:otherwise>
</xsl:choose>
</xsl:when>
<xsl:when test="$TargetTruncate = 'nonNegative' ">
<xsl:choose>
<xsl:when test="number($TargetMeasure) = 'NaN' ">
<xsl:value-of select=" '0' "/>
</xsl:when>
<xsl:otherwise>
<xsl:choose>
<xsl:when test=" $return_value &lt; 0 ">
<xsl:value-of select=" '0' "/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$return_value"/>
</xsl:otherwise>
</xsl:choose>
</xsl:otherwise>
</xsl:choose>
</xsl:when>
<xsl:when test="$TargetTruncate = 'positive' ">
<xsl:choose>
<xsl:when test="number($TargetMeasure) = 'NaN' ">
<xsl:value-of select=" '1' "/>
</xsl:when>
<xsl:otherwise>
<xsl:choose>
<xsl:when test=" $return_value &lt;= 0 ">
<xsl:value-of select=" '1' "/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$return_value"/>
</xsl:otherwise>
</xsl:choose>
</xsl:otherwise>
</xsl:choose>
</xsl:when>
</xsl:choose>
</xsl:template>
</xsl:stylesheet>

View File

@@ -0,0 +1,280 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--***********************************************************
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*
***********************************************************-->
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:w="http://schemas.microsoft.com/office/word/2003/wordml" xmlns:wx="http://schemas.microsoft.com/office/word/2003/auxHint" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:aml="http://schemas.microsoft.com/aml/2001/core" xmlns:dt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" xmlns:math="http://www.w3.org/1998/Math/MathML" xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" xmlns:ooo="http://openoffice.org/2004/office" xmlns:ooow="http://openoffice.org/2004/writer" xmlns:oooc="http://openoffice.org/2004/calc" xmlns:dom="http://www.w3.org/2001/xml-events" exclude-result-prefixes="w wx aml o dt fo v">
<xsl:template name="ms_word_draw_map2ooo_custom_draw">
<xsl:param name="ms_word_draw_type"/>
<!-- all ooo draw names are get from EnhancedCustomShapeGeometry.idl-->
<xsl:choose>
<xsl:when test="$ms_word_draw_type = '#_x0000_t5' ">
<xsl:value-of select=" 'isosceles-triangle'"/>
</xsl:when>
<xsl:when test="$ms_word_draw_type ='#_x0000_t6' ">
<xsl:value-of select=" 'right-triangle' "/>
</xsl:when>
<xsl:when test="$ms_word_draw_type = '#_x0000_t8' ">
<xsl:value-of select=" 'trapezoid' "/>
</xsl:when>
<xsl:when test="$ms_word_draw_type = '#_x0000_t4' ">
<xsl:value-of select=" 'diamond' "/>
</xsl:when>
<xsl:when test="$ms_word_draw_type = '#_x0000_t9' ">
<xsl:value-of select=" 'hexagon' "/>
</xsl:when>
<xsl:when test="$ms_word_draw_type = '#_x0000_t7' ">
<xsl:value-of select="'parallelogram' "/>
</xsl:when>
<xsl:when test="$ms_word_draw_type = '#_x0000_t56' ">
<xsl:value-of select=" 'pentagon' "/>
</xsl:when>
<xsl:when test="$ms_word_draw_type = '#_x0000_t10' ">
<xsl:value-of select=" 'octagon' "/>
</xsl:when>
<xsl:when test="$ms_word_draw_type = '#_x0000_t11' ">
<xsl:value-of select=" 'cross' "/>
</xsl:when>
<xsl:when test="$ms_word_draw_type = '#_x0000_t23' ">
<xsl:value-of select=" 'ring' "/>
</xsl:when>
<xsl:when test="$ms_word_draw_type = '#_x0000_t95' ">
<xsl:value-of select=" 'block-arc' "/>
</xsl:when>
<xsl:when test="$ms_word_draw_type = '#_x0000_t22' ">
<xsl:value-of select=" 'can' "/>
</xsl:when>
<xsl:when test="$ms_word_draw_type = '#_x0000_t16' ">
<xsl:value-of select=" 'cube' "/>
</xsl:when>
<xsl:when test="$ms_word_draw_type = '#_x0000_t65' ">
<xsl:value-of select=" 'paper' "/>
</xsl:when>
<xsl:when test="$ms_word_draw_type = '#_x0000_t96' ">
<xsl:value-of select=" 'smiley' "/>
</xsl:when>
<xsl:when test="$ms_word_draw_type = '#_x0000_t183' ">
<xsl:value-of select=" 'sun' "/>
</xsl:when>
<xsl:when test="$ms_word_draw_type = '#_x0000_t184' ">
<xsl:value-of select=" 'moon' "/>
</xsl:when>
<xsl:when test="$ms_word_draw_type = '#_x0000_t74' ">
<xsl:value-of select=" 'heart' "/>
</xsl:when>
<xsl:when test="$ms_word_draw_type = '#_x0000_t57' ">
<xsl:value-of select=" 'forbidden' "/>
</xsl:when>
<xsl:when test="$ms_word_draw_type ='#_x0000_t85' ">
<xsl:value-of select=" 'left-bracket' "/>
</xsl:when>
<xsl:when test="$ms_word_draw_type = '#_x0000_t86' ">
<xsl:value-of select=" 'right-bracket' "/>
</xsl:when>
<xsl:when test="$ms_word_draw_type = '#_x0000_t87' ">
<xsl:value-of select=" 'left-brace' "/>
</xsl:when>
<xsl:when test="$ms_word_draw_type = '#_x0000_t88' ">
<xsl:value-of select=" 'right-brace' "/>
</xsl:when>
<xsl:when test="$ms_word_draw_type = '#_x0000_t185' ">
<xsl:value-of select=" 'bracket-pair' "/>
</xsl:when>
<xsl:when test="$ms_word_draw_type = '#_x0000_t186' ">
<xsl:value-of select=" 'brace-pair' "/>
</xsl:when>
<xsl:when test="$ms_word_draw_type = '#_x0000_t189' ">
<xsl:value-of select=" 'quad-bevel' "/>
</xsl:when>
<xsl:when test="$ms_word_draw_type = '#_x0000_t66' ">
<xsl:value-of select=" 'left-arrow' "/>
</xsl:when>
<xsl:when test="$ms_word_draw_type = '#_x0000_t67' ">
<xsl:value-of select=" 'down-arrow' "/>
</xsl:when>
<xsl:when test="$ms_word_draw_type = '#_x0000_t68' ">
<xsl:value-of select=" 'up-arrow' "/>
</xsl:when>
<xsl:when test="$ms_word_draw_type = '#_x0000_t13' ">
<xsl:value-of select=" 'right-arrow' "/>
</xsl:when>
<xsl:when test="$ms_word_draw_type = '#_x0000_t69' ">
<xsl:value-of select=" 'left-right-arrow' "/>
</xsl:when>
<xsl:when test="$ms_word_draw_type = '#_x0000_t70' ">
<xsl:value-of select=" 'up-down-arrow' "/>
</xsl:when>
<xsl:when test="$ms_word_draw_type = '#_x0000_t89' ">
<xsl:value-of select=" 'mso-spt89' "/>
</xsl:when>
<xsl:when test="$ms_word_draw_type = '#_x0000_t76' ">
<xsl:value-of select=" 'quad-arrow' "/>
</xsl:when>
<xsl:when test="$ms_word_draw_type = '#_x0000_t94' ">
<xsl:value-of select=" 'notched-right-arrow' "/>
</xsl:when>
<xsl:when test="$ms_word_draw_type = '#_x0000_t177' ">
<xsl:value-of select=" 'pentagon-right' "/>
</xsl:when>
<xsl:when test="$ms_word_draw_type = '#_x0000_t55' ">
<xsl:value-of select=" 'chevron' "/>
</xsl:when>
<xsl:when test="$ms_word_draw_type = '#_x0000_t79' ">
<xsl:value-of select=" 'up-arrow-callout' "/>
</xsl:when>
<xsl:when test="$ms_word_draw_type = '#_x0000_t80' ">
<xsl:value-of select=" 'down-arrow-callout' "/>
</xsl:when>
<xsl:when test="$ms_word_draw_type = '#_x0000_t82' ">
<xsl:value-of select=" 'up-down-arrow-callout' "/>
</xsl:when>
<xsl:when test="$ms_word_draw_type = '#_x0000_t103' ">
<xsl:value-of select=" 'circular-arrow' "/>
</xsl:when>
<xsl:when test="$ms_word_draw_type = '#_x0000_t109' ">
<xsl:value-of select=" 'flowchart-process' "/>
</xsl:when>
<xsl:when test="$ms_word_draw_type = '#_x0000_t116' ">
<xsl:value-of select=" 'flowchart-alternate-process' "/>
</xsl:when>
<xsl:when test="$ms_word_draw_type = '#_x0000_t110' ">
<xsl:value-of select=" 'flowchart-decision' "/>
</xsl:when>
<xsl:when test="$ms_word_draw_type = '#_x0000_t111' ">
<xsl:value-of select=" 'flowchart-data' "/>
</xsl:when>
<xsl:when test="$ms_word_draw_type = '#_x0000_t112' ">
<xsl:value-of select=" 'flowchart-predefined-process' "/>
</xsl:when>
<xsl:when test="$ms_word_draw_type = '#_x0000_t113' ">
<xsl:value-of select=" 'flowchart-internal-storage' "/>
</xsl:when>
<xsl:when test="$ms_word_draw_type = '#_x0000_t114' ">
<xsl:value-of select=" 'flowchart-document' "/>
</xsl:when>
<xsl:when test="$ms_word_draw_type = '#_x0000_t115' ">
<xsl:value-of select=" 'flowchart-multidocument' "/>
</xsl:when>
<xsl:when test="$ms_word_draw_type = '#_x0000_t116' ">
<xsl:value-of select=" 'flowchart-terminator' "/>
</xsl:when>
<xsl:when test="$ms_word_draw_type = '#_x0000_t117' ">
<xsl:value-of select=" 'flowchart-preparation' "/>
</xsl:when>
<xsl:when test="$ms_word_draw_type = '#_x0000_t118' ">
<xsl:value-of select=" 'flowchart-manual-input' "/>
</xsl:when>
<xsl:when test="$ms_word_draw_type = '#_x0000_t119' ">
<xsl:value-of select=" 'flowchart-manual-operation' "/>
</xsl:when>
<xsl:when test="$ms_word_draw_type = '#_x0000_t120' ">
<xsl:value-of select=" 'flowchart-connector' "/>
</xsl:when>
<xsl:when test="$ms_word_draw_type = '#_x0000_t177' ">
<xsl:value-of select=" 'flowchart-off-page-connector' "/>
</xsl:when>
<xsl:when test="$ms_word_draw_type = '#_x0000_t121' ">
<xsl:value-of select=" 'flowchart-card' "/>
</xsl:when>
<xsl:when test="$ms_word_draw_type = '#_x0000_t122' ">
<xsl:value-of select=" 'flowchart-punched-tape' "/>
</xsl:when>
<xsl:when test="$ms_word_draw_type = '#_x0000_t123' ">
<xsl:value-of select=" 'flowchart-summing-junction' "/>
</xsl:when>
<xsl:when test="$ms_word_draw_type = '#_x0000_t124' ">
<xsl:value-of select=" 'flowchart-or' "/>
</xsl:when>
<xsl:when test="$ms_word_draw_type = '#_x0000_t125' ">
<xsl:value-of select=" 'flowchart-collate' "/>
</xsl:when>
<xsl:when test="$ms_word_draw_type = '#_x0000_t126' ">
<xsl:value-of select=" 'flowchart-sort' "/>
</xsl:when>
<xsl:when test="$ms_word_draw_type = '#_x0000_t127' ">
<xsl:value-of select=" 'flowchart-extract' "/>
</xsl:when>
<xsl:when test="$ms_word_draw_type = '#_x0000_t128' ">
<xsl:value-of select=" 'flowchart-merge' "/>
</xsl:when>
<xsl:when test="$ms_word_draw_type = '#_x0000_t130' ">
<xsl:value-of select=" 'flowchart-stored-data' "/>
</xsl:when>
<xsl:when test="$ms_word_draw_type = '#_x0000_t135' ">
<xsl:value-of select=" 'flowchart-delay' "/>
</xsl:when>
<xsl:when test="$ms_word_draw_type = '#_x0000_t131' ">
<xsl:value-of select=" 'flowchart-sequential-access' "/>
</xsl:when>
<xsl:when test="$ms_word_draw_type = '#_x0000_t132' ">
<xsl:value-of select=" 'flowchart-magnetic-disk' "/>
</xsl:when>
<xsl:when test="$ms_word_draw_type = '#_x0000_t133' ">
<xsl:value-of select=" 'flowchart-direct-access-storage' "/>
</xsl:when>
<xsl:when test="$ms_word_draw_type = '#_x0000_t134' ">
<xsl:value-of select=" 'flowchart-display' "/>
</xsl:when>
<xsl:when test="$ms_word_draw_type = '#_x0000_t61' ">
<xsl:value-of select=" 'rectangular-callout' "/>
</xsl:when>
<xsl:when test="$ms_word_draw_type = '#_x0000_t62' ">
<xsl:value-of select=" 'round-rectangular-callout' "/>
</xsl:when>
<xsl:when test="$ms_word_draw_type = '#_x0000_t63' ">
<xsl:value-of select=" 'round-callout' "/>
</xsl:when>
<xsl:when test="$ms_word_draw_type = '#_x0000_t106' ">
<xsl:value-of select=" 'cloud-callout' "/>
</xsl:when>
<xsl:when test="$ms_word_draw_type = '#_x0000_t50' ">
<xsl:value-of select=" 'line-callout-1' "/>
</xsl:when>
<xsl:when test="$ms_word_draw_type = '#_x0000_t51' ">
<xsl:value-of select=" 'line-callout-2' "/>
</xsl:when>
<xsl:when test="$ms_word_draw_type = '#_x0000_t47' ">
<xsl:value-of select=" 'line-callout-3' "/>
</xsl:when>
<xsl:when test="$ms_word_draw_type = '#_x0000_t72' ">
<xsl:value-of select=" 'bang' "/>
</xsl:when>
<xsl:when test="$ms_word_draw_type = '#_x0000_t187' ">
<xsl:value-of select=" 'star4' "/>
</xsl:when>
<xsl:when test="$ms_word_draw_type = '#_x0000_t12' ">
<xsl:value-of select=" 'star5' "/>
</xsl:when>
<xsl:when test="$ms_word_draw_type = '#_x0000_t58' ">
<xsl:value-of select=" 'star8' "/>
</xsl:when>
<xsl:when test="$ms_word_draw_type = '#_x0000_t92' ">
<xsl:value-of select=" 'star24' "/>
</xsl:when>
<xsl:when test="$ms_word_draw_type = '#_x0000_t97' ">
<xsl:value-of select=" 'vertical-scroll' "/>
</xsl:when>
<xsl:when test="$ms_word_draw_type = '#_x0000_t98' ">
<xsl:value-of select=" 'horizontal-scroll' "/>
</xsl:when>
</xsl:choose>
</xsl:template>
</xsl:stylesheet>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,404 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--***********************************************************
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*
***********************************************************-->
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:w="http://schemas.microsoft.com/office/word/2003/wordml" xmlns:wx="http://schemas.microsoft.com/office/word/2003/auxHint" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:aml="http://schemas.microsoft.com/aml/2001/core" xmlns:dt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" xmlns:math="http://www.w3.org/1998/Math/MathML" xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" xmlns:ooo="http://openoffice.org/2004/office" xmlns:ooow="http://openoffice.org/2004/writer" xmlns:oooc="http://openoffice.org/2004/calc" xmlns:dom="http://www.w3.org/2001/xml-events" exclude-result-prefixes="w wx aml o dt v">
<xsl:template match="w:footnotePr" mode="config">
<text:notes-configuration text:note-class="footnote" text:citation-style-name="Footnote_20_Symbol">
<xsl:if test="w:pos">
<xsl:choose>
<xsl:when test="w:pos/@w:val = 'beneath-text'">
<xsl:attribute name="text:footnotes-position">document</xsl:attribute>
</xsl:when>
<xsl:otherwise>
<xsl:attribute name="text:footnotes-position">page</xsl:attribute>
</xsl:otherwise>
</xsl:choose>
</xsl:if>
<xsl:if test="w:numStart">
<xsl:choose>
<xsl:when test="w:numStart/@w:val - 1 &gt; 0">
<xsl:attribute name="text:start-value">
<xsl:value-of select="w:numStart/@w:val - 1"/>
</xsl:attribute>
</xsl:when>
<xsl:otherwise>
<xsl:attribute name="text:start-value">
<xsl:value-of select=" '1' "/>
</xsl:attribute>
</xsl:otherwise>
</xsl:choose>
<!--xsl:attribute name="text:start-value"><xsl:value-of select="w:numStart/@w:val - 1"/></xsl:attribute-->
</xsl:if>
<xsl:if test="w:numFmt">
<xsl:call-template name="convert-number-format">
<xsl:with-param name="number-format" select="w:numFmt/@w:val"/>
</xsl:call-template>
</xsl:if>
<xsl:if test="w:numRestart">
<xsl:choose>
<xsl:when test="w:numRestart/@w:val = 'continuous'">
<xsl:attribute name="text:start-numbering-at">document</xsl:attribute>
</xsl:when>
<xsl:when test="w:numRestart/@w:val = 'each-sect'">
<xsl:attribute name="text:start-numbering-at">chapter</xsl:attribute>
</xsl:when>
<xsl:otherwise>
<xsl:attribute name="text:start-numbering-at">page</xsl:attribute>
</xsl:otherwise>
</xsl:choose>
</xsl:if>
<!--
<xsl:if test="w:footnote[@w:type = 'continuation-separator']">
<text:footnote-continuation-notice-backward>
<xsl:value-of select="normalize-space(w:footnote[@w:type = 'continuation-separator'])"/>
</text:footnote-continuation-notice-backward>
</xsl:if>
<xsl:if test="w:footnote[@w:type = 'continuation-notice']">
<text:footnote-continuation-notice-forward>
<xsl:value-of select="normalize-space(w:footnote[@w:type = 'continuation-notice'])"/>
</text:footnote-continuation-notice-forward>
</xsl:if>
-->
</text:notes-configuration>
</xsl:template>
<xsl:template match="w:endnotePr" mode="config">
<text:notes-configuration text:note-class="endnote" text:citation-style-name="Endnote_20_Symbol">
<xsl:if test="w:numStart">
<xsl:choose>
<xsl:when test="(w:numStart/@w:val - 1) &gt; 0">
<xsl:attribute name="text:start-value">
<xsl:value-of select="w:numStart/@w:val - 1"/>
</xsl:attribute>
</xsl:when>
<xsl:otherwise>
<xsl:attribute name="text:start-value">
<xsl:value-of select=" '1' "/>
</xsl:attribute>
</xsl:otherwise>
</xsl:choose>
<!--xsl:attribute name="text:start-value"><xsl:value-of select="w:numStart/@w:val - 1"/></xsl:attribute -->
</xsl:if>
<xsl:if test="w:numFmt">
<xsl:call-template name="convert-number-format">
<xsl:with-param name="number-format" select="w:numFmt/@w:val"/>
</xsl:call-template>
</xsl:if>
</text:notes-configuration>
</xsl:template>
<xsl:template name="convert-number-format">
<xsl:param name="number-format"/>
<xsl:choose>
<xsl:when test="$number-format = 'decimal' or $number-format = 'decimal-half-width'">
<xsl:attribute name="style:num-format">1</xsl:attribute>
</xsl:when>
<xsl:when test="$number-format = 'decimal-zero'">
<xsl:attribute name="style:num-format">1</xsl:attribute>
<xsl:attribute name="style:num-prefix">0</xsl:attribute>
</xsl:when>
<xsl:when test="$number-format = 'decimal-enclosed-fullstop'">
<xsl:attribute name="style:num-format">1</xsl:attribute>
<xsl:attribute name="style:num-prefix">.</xsl:attribute>
</xsl:when>
<xsl:when test="$number-format = 'decimal-enclosed-paren'">
<xsl:attribute name="style:num-format">1</xsl:attribute>
<xsl:attribute name="style:num-prefix">(</xsl:attribute>
<xsl:attribute name="style:num-suffix">)</xsl:attribute>
</xsl:when>
<xsl:when test="$number-format = 'number-in-dash'">
<xsl:attribute name="style:num-format">1</xsl:attribute>
<xsl:attribute name="style:num-prefix">-</xsl:attribute>
<xsl:attribute name="style:num-suffix">-</xsl:attribute>
</xsl:when>
<xsl:when test="$number-format = 'upper-letter'">
<xsl:attribute name="style:num-format">A</xsl:attribute>
</xsl:when>
<xsl:when test="$number-format = 'lower-letter'">
<xsl:attribute name="style:num-format">a</xsl:attribute>
</xsl:when>
<xsl:when test="$number-format = 'upper-roman'">
<xsl:attribute name="style:num-format">I</xsl:attribute>
</xsl:when>
<xsl:when test="$number-format = 'lower-roman'">
<xsl:attribute name="style:num-format">i</xsl:attribute>
</xsl:when>
<!-- ordinal, cardinal-text, ordinal-text, hex, chicago, bullet, ideograph-zodiac-traditional,
vietnamese-counting, russian-lower, russian-upper, hindi-vowels, hindi-consonants, hindi-numbers, hindi-counting -->
<xsl:otherwise>
<xsl:attribute name="style:num-format">1</xsl:attribute>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template match="w:bgPict">
<xsl:if test="w:background/@w:bgcolor">
<xsl:attribute name="fo:background-color">
<xsl:call-template name="MapConstColor">
<xsl:with-param name="color" select="w:background/@w:bgcolor"/>
</xsl:call-template>
</xsl:attribute>
</xsl:if>
<xsl:if test="w:background/@w:background">
<style:background-image>
<office:binary-data>
<xsl:variable name="the-image" select="key('imagedata',w:background/@w:background)"/>
<xsl:value-of select="translate($the-image/text(),'&#9;&#10;&#13;&#32;','' ) "/>
</office:binary-data>
</style:background-image>
</xsl:if>
</xsl:template>
<xsl:template match="w:sectPr" mode="page-layout">
<style:page-layout>
<xsl:attribute name="style:name">pm<xsl:number from="/w:wordDocument/w:body" level="any" count="w:sectPr" format="1"/>
</xsl:attribute>
<style:page-layout-properties>
<xsl:call-template name="page-layout-properties"/>
<xsl:apply-templates select="/w:wordDocument/w:bgPict"/>
</style:page-layout-properties>
<style:header-style>
<style:header-footer-properties style:dynamic-spacing="true" fo:margin-bottom="0">
<xsl:variable name="header-margin">
<xsl:choose>
<xsl:when test="w:pgMar/@w:header">
<xsl:value-of select="w:pgMar/@w:header"/>
</xsl:when>
<xsl:otherwise>720</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:variable name="header-margin-diff">
<xsl:value-of select="w:pgMar/@w:top - $header-margin"/>
</xsl:variable>
<xsl:variable name="min-height">
<xsl:choose>
<xsl:when test="$header-margin-diff &gt; 0">
<xsl:value-of select="$header-margin-diff div 567.0"/>
</xsl:when>
<xsl:otherwise>0</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:attribute name="fo:min-height">
<xsl:value-of select="concat($min-height, 'cm')"/>
</xsl:attribute>
</style:header-footer-properties>
</style:header-style>
</style:page-layout>
</xsl:template>
<xsl:template match="w:sectPr" mode="master-page">
<!-- style:page-layout style:style-->
<xsl:variable name="master-page-number">
<xsl:number count="w:sectPr" from="/w:wordDocument/w:body" level="any" format="1"/>
</xsl:variable>
<xsl:if test="$master-page-number = '1'">
<style:master-page style:next-style-name="Standard-1" style:page-layout-name="pm1" style:display-name="First Page" style:name="First_20_Page">
<style:header>
<xsl:apply-templates select="w:hdr[@w:type='first']/child::*" mode="dispatch"/>
</style:header>
<style:footer>
<xsl:apply-templates select="w:ftr[@w:type='first']/child::*" mode="dispatch"/>
</style:footer>
</style:master-page>
</xsl:if>
<xsl:element name="style:master-page">
<xsl:attribute name="style:name">Standard-<xsl:value-of select="$master-page-number"/>
</xsl:attribute>
<xsl:attribute name="style:page-layout-name">
<xsl:value-of select="concat('pm', $master-page-number)"/>
</xsl:attribute>
<style:header>
<xsl:apply-templates select="w:hdr[@w:type='odd']/child::*" mode="dispatch"/>
</style:header>
<style:header-left>
<xsl:apply-templates select="w:hdr[@w:type='even']/child::*" mode="dispatch"/>
</style:header-left>
<style:footer>
<xsl:apply-templates select="w:ftr[@w:type='odd']/child::*" mode="dispatch"/>
</style:footer>
<style:footer-left>
<xsl:apply-templates select="w:ftr[@w:type='even']/child::*" mode="dispatch"/>
</style:footer-left>
<!-- Headers and footers-->
<!--
<style:header-style>
<style:header-footer-properties>
<xsl:attribute name="fo:min-height"><xsl:call-template name="ConvertMeasure"><xsl:with-param name="value" select="concat(w:pgMar/@w:header,'twip')"/></xsl:call-template>cm</xsl:attribute>
<xsl:attribute name="fo:margin-bottom">0.792cm</xsl:attribute>
<xsl:attribute name="style:dynamic-spacing">true</xsl:attribute>
</style:header-footer-properties>
</style:header-style>
<style:footer-style>
<style:header-footer-properties>
<xsl:attribute name="fo:min-height"><xsl:call-template name="ConvertMeasure"><xsl:with-param name="value" select="concat(w:pgMar/@w:footer,'twip')"/></xsl:call-template>cm</xsl:attribute>
<xsl:attribute name="fo:margin-top">0.792cm</xsl:attribute>
<xsl:attribute name="style:dynamic-spacing">true</xsl:attribute>
</style:header-footer-properties>
</style:footer-style>
-->
<!-- any examples for w:titlePg usage? -->
<xsl:if test="not(w:titlePg)">
<xsl:apply-templates select="w:hdr[@w:type='odd']"/>
<xsl:apply-templates select="w:hdr[@w:type='even']"/>
<xsl:apply-templates select="w:ftr[@w:type='odd']"/>
<xsl:apply-templates select="w:ftr[@w:type='even']"/>
</xsl:if>
</xsl:element>
</xsl:template>
<xsl:template match="w:hdr">
<!--
<xsl:choose>
<xsl:when test="@w:type = 'odd'">
<style:header>
<xsl:apply-templates select="wx:pBdrGroup | w:p | w:tbl"/>
</style:header>
</xsl:when>
<xsl:when test="@w:type = 'even'">
<style:header>
<xsl:apply-templates select="wx:pBdrGroup | w:p | w:tbl"/>
</style:header>
</xsl:when>
</xsl:choose>
-->
</xsl:template>
<xsl:template match="w:ftr">
<!--
<xsl:choose>
<xsl:when test="@w:type = 'odd'">
<style:footer>
<xsl:apply-templates select="wx:pBdrGroup | w:p | w:tbl"/>
</style:footer>
</xsl:when>
<xsl:when test="@w:type = 'even'">
<style:footer-left>
<xsl:apply-templates select="wx:pBdrGroup | w:p | w:tbl"/>
</style:footer-left>
</xsl:when>
</xsl:choose>
-->
</xsl:template>
<xsl:template match="wx:pBdrGroup">
<xsl:apply-templates mode="dispatch"/>
</xsl:template>
<!-- xsl:template name="convert-number-format">
<xsl:param name="number-format"/>
<xsl:choose>
<xsl:when test="$number-format = 'decimal' or $number-format = 'decimal-half-width'">
<xsl:attribute name="style:num-format">1</xsl:attribute>
</xsl:when>
<xsl:when test="$number-format = 'decimal-zero'">
<xsl:attribute name="style:num-format">1</xsl:attribute>
<xsl:attribute name="style:num-prefix">0</xsl:attribute>
</xsl:when>
<xsl:when test="$number-format = 'decimal-enclosed-fullstop'">
<xsl:attribute name="style:num-format">1</xsl:attribute>
<xsl:attribute name="style:num-prefix">.</xsl:attribute>
</xsl:when>
<xsl:when test="$number-format = 'decimal-enclosed-paren'">
<xsl:attribute name="style:num-format">1</xsl:attribute>
<xsl:attribute name="style:num-prefix">(</xsl:attribute>
<xsl:attribute name="style:num-suffix">)</xsl:attribute>
</xsl:when>
<xsl:when test="$number-format = 'number-in-dash'">
<xsl:attribute name="style:num-format">1</xsl:attribute>
<xsl:attribute name="style:num-prefix">-</xsl:attribute>
<xsl:attribute name="style:num-suffix">-</xsl:attribute>
</xsl:when>
<xsl:when test="$number-format = 'upper-letter'">
<xsl:attribute name="style:num-format">A</xsl:attribute>
</xsl:when>
<xsl:when test="$number-format = 'lower-letter'">
<xsl:attribute name="style:num-format">a</xsl:attribute>
</xsl:when>
<xsl:when test="$number-format = 'upper-roman'">
<xsl:attribute name="style:num-format">I</xsl:attribute>
</xsl:when>
<xsl:when test="$number-format = 'lower-roman'">
<xsl:attribute name="style:num-format">i</xsl:attribute>
</xsl:when>
<xsl:when test="$number-format = 'decimal-full-width' or $number-format = 'decimal-full-width2'">
<xsl:attribute name="style:num-format">, , , ...</xsl:attribute>
</xsl:when>
<xsl:when test="$number-format = 'decimal-enclosed-circle-chinese' or $number-format = 'decimal-enclosed-circle'">
<xsl:attribute name="style:num-format">①, ②, ③, ...</xsl:attribute>
</xsl:when>
<xsl:when test="$number-format = 'ideograph-enclosed-circle'">
<xsl:attribute name="style:num-format">一, 二, 三, ...</xsl:attribute>
<xsl:attribute name="style:num-prefix">(</xsl:attribute>
<xsl:attribute name="style:num-suffix">)</xsl:attribute>
</xsl:when>
<xsl:when test="$number-format = 'chinese-counting-thousand' or $number-format = 'ideograph-digital' or $number-format = 'japanese-counting' or $number-format = 'japanese-digital-ten-thousand' or $number-format = 'taiwanese-counting-thousand' or $number-format = 'taiwanese-counting' or $number-format = 'taiwanese-digital' or $number-format = 'chinese-counting' or $number-format = 'korean-digital2' or $number-format = 'chinese-not-impl'">
<xsl:attribute name="style:num-format">一, 二, 三, ...</xsl:attribute>
</xsl:when>
<xsl:when test="$number-format = 'chinese-legal-simplified'">
<xsl:attribute name="style:num-format">壹, 贰, 叁, ...</xsl:attribute>
</xsl:when>
<xsl:when test="$number-format = 'ideograph-legal-traditional'">
<xsl:attribute name="style:num-format">壹, 貳, 參, ...</xsl:attribute>
</xsl:when>
<xsl:when test="$number-format = 'ideograph-traditional'">
<xsl:attribute name="style:num-format">甲, 乙, 丙, ...</xsl:attribute>
</xsl:when>
<xsl:when test="$number-format = 'ideograph-zodiac'">
<xsl:attribute name="style:num-format">子, 丑, 寅, ...</xsl:attribute>
</xsl:when>
<xsl:when test="$number-format = 'japanese-legal'">
<xsl:attribute name="style:num-format">壱, 弐, 参, ...</xsl:attribute>
</xsl:when>
<xsl:when test="$number-format = 'aiueo-full-width'">
<xsl:attribute name="style:num-format">ア, イ, ウ, ...</xsl:attribute>
</xsl:when>
<xsl:when test="$number-format = 'aiueo'">
<xsl:attribute name="style:num-format">ア, イ, ウ, ...</xsl:attribute>
</xsl:when>
<xsl:when test="$number-format = 'iroha-full-width'">
<xsl:attribute name="style:num-format">イ, ロ, ハ, ...</xsl:attribute>
</xsl:when>
<xsl:when test="$number-format = 'iroha'">
<xsl:attribute name="style:num-format">イ, ロ, ハ, ...</xsl:attribute>
</xsl:when>
<xsl:when test="$number-format = 'korean-digital' or $number-format = 'korean-counting' or $number-format = 'korean-legal'">
<xsl:attribute name="style:num-format">일, 이, 삼, ...</xsl:attribute>
</xsl:when>
<xsl:when test="$number-format = 'chosung'">
<xsl:attribute name="style:num-format">ㄱ, ㄴ, ㄷ, ...</xsl:attribute>
</xsl:when>
<xsl:when test="$number-format = 'ganada'">
<xsl:attribute name="style:num-format">가, 나, 다, ...</xsl:attribute>
</xsl:when>
<xsl:when test="$number-format = 'arabic-alpha' or $number-format = 'arabic-abjad'">
<xsl:attribute name="style:num-format">أ, ب, ت, ...</xsl:attribute>
</xsl:when>
<xsl:when test="$number-format = 'thai-letters' or $number-format = 'thai-numbers' or $number-format = 'thai-counting'">
<xsl:attribute name="style:num-format">ก, ข, ฃ, ...</xsl:attribute>
</xsl:when>
<xsl:when test="$number-format = 'hebrew-1' or $number-format = 'hebrew-2'">
<xsl:attribute name="style:num-format">א, ב, ג, ...</xsl:attribute>
</xsl:when>
< ordinal, cardinal-text, ordinal-text, hex, chicago, bullet, ideograph-zodiac-traditional,
vietnamese-counting, russian-lower, russian-upper, hindi-vowels, hindi-consonants, hindi-numbers, hindi-counting >
<xsl:otherwise>
<xsl:attribute name="style:num-format">Native Numbering</xsl:attribute>
</xsl:otherwise>
</xsl:choose>
</xsl:template -->
</xsl:stylesheet>

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,288 @@
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:w="http://schemas.microsoft.com/office/word/2003/wordml" xmlns:wx="http://schemas.microsoft.com/office/word/2003/auxHint" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:aml="http://schemas.microsoft.com/aml/2001/core" xmlns:dt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" xmlns:math="http://www.w3.org/1998/Math/MathML" xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" xmlns:ooo="http://openoffice.org/2004/office" xmlns:ooow="http://openoffice.org/2004/writer" xmlns:oooc="http://openoffice.org/2004/calc" xmlns:dom="http://www.w3.org/2001/xml-events" exclude-result-prefixes="w wx aml o dt v" xmlns:an="urn:flr:annotate">
<!--***********************************************************
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*
***********************************************************-->
<an:page-layout-properties
context-node-input="w:sectPr"
context-node-output="style:page-layout-properties">
<an:so-supported select="w:pgMar/@w:gutter"/>
<an:so-supported select="w:pgSz/@w:code"/>
</an:page-layout-properties>
<xsl:template name="page-layout-properties">
<!-- NOTE: "div 567.0" converts from twips to cm -->
<xsl:attribute name="fo:margin-top">
<xsl:variable name="header-margin">
<xsl:choose>
<xsl:when test="w:pgMar/@w:header">
<xsl:value-of select="w:pgMar/@w:header"/>
</xsl:when>
<xsl:otherwise>720</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:variable name="margin-top">
<xsl:choose>
<xsl:when test="w:hdr">
<xsl:choose>
<xsl:when test="w:pgMar/@w:top &gt;= $header-margin">
<xsl:value-of select="$header-margin"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="w:pgMar/@w:top"/>
</xsl:otherwise>
</xsl:choose>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="w:pgMar/@w:top"/>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:value-of select="concat($margin-top div 567.0, 'cm')"/>
</xsl:attribute>
<xsl:attribute name="fo:margin-bottom">
<xsl:variable name="footer-margin">
<xsl:choose>
<xsl:when test="w:pgMar/@w:footer">
<xsl:value-of select="w:pgMar/@w:footer"/>
</xsl:when>
<xsl:otherwise>720</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:variable name="margin-bottom">
<xsl:choose>
<xsl:when test="w:ftr">
<xsl:value-of select="$footer-margin"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="w:pgMar/@w:bottom"/>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:value-of select="concat($margin-bottom div 567.0, 'cm')"/>
</xsl:attribute>
<xsl:attribute name="fo:margin-left">
<xsl:value-of select="concat(w:pgMar/@w:left div 567.0, 'cm')"/>
</xsl:attribute>
<xsl:attribute name="fo:margin-right">
<xsl:value-of select="concat(w:pgMar/@w:right div 567.0, 'cm')"/>
</xsl:attribute>
<xsl:attribute name="fo:page-width">
<xsl:value-of select="concat(w:pgSz/@w:w div 567.0, 'cm')"/>
</xsl:attribute>
<xsl:attribute name="fo:page-height">
<xsl:value-of select="concat(w:pgSz/@w:h div 567.0, 'cm')"/>
</xsl:attribute>
<xsl:attribute name="style:footnote-max-height">
<xsl:value-of select="'0cm'"/>
</xsl:attribute>
<xsl:attribute name="style:print-orientation">
<xsl:choose>
<xsl:when test="w:pgSz/@w:orient">
<xsl:value-of select="w:pgSz/@w:orient"/>
</xsl:when>
<xsl:otherwise>portrait</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
<xsl:apply-templates select="//w:bgPict"/>
<xsl:call-template name="column-properties"/>
</xsl:template>
<an:column-properties
context-node-input="w:sectPr"
context-node-output="style:page-layout-properties">
<an:so-supported select="w:cols/@w:sep"/>
</an:column-properties>
<xsl:template name="column-properties">
<style:columns>
<xsl:attribute name="fo:column-count">
<xsl:choose>
<xsl:when test="w:cols/@w:num">
<xsl:value-of select="w:cols/@w:num"/>
</xsl:when>
<xsl:otherwise>1</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
<xsl:if test="not(w:cols/w:col)">
<!-- bug in the OASIS spec resp. bug in xmloff -->
<xsl:attribute name="fo:column-gap">
<xsl:value-of select="concat(w:cols/@w:space div 567.0, 'cm')"/>
</xsl:attribute>
</xsl:if>
<xsl:for-each select="w:cols/w:col">
<style:column>
<xsl:attribute name="style:rel-width">
<xsl:value-of select="concat(@w:w, '*')"/>
</xsl:attribute>
<xsl:attribute name="fo:start-indent">
<xsl:value-of select="'0cm'"/>
</xsl:attribute>
<xsl:attribute name="fo:end-indent">
<xsl:choose>
<xsl:when test="@w:space">
<xsl:value-of select="concat(@w:space div 567.0, 'cm')"/>
</xsl:when>
<xsl:otherwise>0cm</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
</style:column>
</xsl:for-each>
</style:columns>
</xsl:template>
<an:text-properties
context-node-input="w:rPr"
context-node-output="style:text-properties">
</an:text-properties >
<xsl:template name="text-properties">
<xsl:variable name="b-value">
<xsl:choose>
<xsl:when test="w:b/@val">
<xsl:value-of select="w:b/@val"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="local-name(w:b)"/>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<!-- could be simplified: is "b" actually a valid value of w:b/@val ? -->
<xsl:variable name="font-weight">
<xsl:choose>
<xsl:when test="$b-value = 'on'">bold</xsl:when>
<xsl:when test="$b-value = 'off'">normal</xsl:when>
<xsl:when test="$b-value = 'b'">bold</xsl:when>
<xsl:otherwise></xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:attribute name="fo:font-weight">
<xsl:value-of select="$font-weight"/>
</xsl:attribute>
<xsl:attribute name="style:font-weight-asian">
<xsl:value-of select="$font-weight"/>
</xsl:attribute>
<xsl:attribute name="style:font-weight-complex">
<xsl:variable name="b-cs-value">
<xsl:choose>
<xsl:when test="w:b-cs/@val">
<xsl:value-of select="w:b-cs/@val"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="local-name(w:b-cs)"/>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<!-- could be simplified: is "b-cs" actually a valid value of w:b-cs/@val -->
<xsl:choose>
<xsl:when test="$b-cs-value = 'on'">bold</xsl:when>
<xsl:when test="$b-cs-value = 'off'">normal</xsl:when>
<xsl:when test="$b-cs-value = 'b-cs'">bold</xsl:when>
<xsl:otherwise></xsl:otherwise>
</xsl:choose>
</xsl:attribute>
<xsl:variable name="i-value">
<xsl:choose>
<xsl:when test="w:i/@val">
<xsl:value-of select="w:i/@val"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="local-name(w:i)"/>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<!-- could be simplified: is "i" actually a valid value of w:i/@val ? -->
<xsl:variable name="font-style">
<xsl:choose>
<xsl:when test="$i-value = 'on'">italic</xsl:when>
<xsl:when test="$i-value = 'off'">normal</xsl:when>
<xsl:when test="$i-value = 'i'">italic</xsl:when>
<xsl:otherwise></xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:attribute name="fo:font-style">
<xsl:value-of select="$font-style"/>
</xsl:attribute>
<xsl:attribute name="style:font-style-asian">
<xsl:value-of select="$font-style"/>
</xsl:attribute>
<xsl:attribute name="style:font-style-complex">
<xsl:variable name="i-cs-value">
<xsl:choose>
<xsl:when test="w:i-cs/@val">
<xsl:value-of select="w:i-cs/@val"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="local-name(w:i-cs)"/>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<!-- could be simplified: is "i-cs" actually a valid value of w:i-cs/@val -->
<xsl:choose>
<xsl:when test="$i-cs-value = 'on'">italic</xsl:when>
<xsl:when test="$i-cs-value = 'off'">normal</xsl:when>
<xsl:when test="$i-cs-value = 'i-cs'">italic</xsl:when>
<xsl:otherwise></xsl:otherwise>
</xsl:choose>
</xsl:attribute>
<xsl:attribute name="fo:text-transform">
<xsl:variable name="caps-value">
<xsl:choose>
<xsl:when test="w:caps/@val">
<xsl:value-of select="w:caps/@val"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="local-name(w:caps)"/>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<!-- could be simplified: is "caps" actually a valid value of w:caps/@val -->
<xsl:choose>
<xsl:when test="$caps-value = 'on'">uppercase</xsl:when>
<xsl:when test="$caps-value = 'off'">normal</xsl:when>
<xsl:when test="$caps-value = 'caps'">uppercase</xsl:when>
<xsl:otherwise></xsl:otherwise>
</xsl:choose>
</xsl:attribute>
<xsl:attribute name="fo:font-variant">
<xsl:variable name="small-caps-value">
<xsl:choose>
<xsl:when test="w:smallCaps/@val">
<xsl:value-of select="w:smallCaps/@val"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="local-name(w:smallCaps)"/>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<!-- could be simplified: is "smallCaps" actually a valid value of w:smallCaps/@val -->
<xsl:choose>
<xsl:when test="$small-caps-value = 'on'">small-caps</xsl:when>
<xsl:when test="$small-caps-value = 'off'">normal</xsl:when>
<xsl:when test="$small-caps-value = 'smallCaps'">small-caps</xsl:when>
<xsl:otherwise></xsl:otherwise>
</xsl:choose>
</xsl:attribute>
</xsl:template>
</xsl:stylesheet>

View File

@@ -0,0 +1,65 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--***********************************************************
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*
***********************************************************-->
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:w="http://schemas.microsoft.com/office/word/2003/wordml" xmlns:wx="http://schemas.microsoft.com/office/word/2003/auxHint" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:aml="http://schemas.microsoft.com/aml/2001/core" xmlns:dt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" xmlns:math="http://www.w3.org/1998/Math/MathML" xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" xmlns:ooo="http://openoffice.org/2004/office" xmlns:ooow="http://openoffice.org/2004/writer" xmlns:oooc="http://openoffice.org/2004/calc" xmlns:dom="http://www.w3.org/2001/xml-events" exclude-result-prefixes="w wx aml o dt v">
<xsl:template match="w:docPr">
<office:settings>
<config:config-item-set config:name="view-settings">
<config:config-item config:name="InBrowseMode" config:type="boolean">
<xsl:choose>
<xsl:when test="w:view/@w:val = 'outline'">true</xsl:when>
<xsl:when test="w:view/@w:val = 'print'">false</xsl:when>
<!-- others: web, reading, normal, master-pages, none. glu -->
<xsl:otherwise>true</xsl:otherwise>
</xsl:choose>
</config:config-item>
<config:config-item-map-indexed config:name="Views">
<config:config-item-map-entry>
<xsl:if test="w:zoom">
<!-- VisibleRight and VisibleBottom are arbitrary positive numbers. ;) glu -->
<config:config-item config:name="VisibleRight" config:type="int">1</config:config-item>
<config:config-item config:name="VisibleBottom" config:type="int">1</config:config-item>
<xsl:choose>
<xsl:when test="w:zoom/@w:val = 'best-fit'">
<config:config-item config:name="ZoomType" config:type="short">3</config:config-item>
</xsl:when>
<xsl:when test="w:zoom/@w:val = 'full-page'">
<config:config-item config:name="ZoomType" config:type="short">2</config:config-item>
</xsl:when>
<xsl:when test="w:zoom/@w:val = 'text-fit'">
<config:config-item config:name="ZoomType" config:type="short">1</config:config-item>
</xsl:when>
<xsl:otherwise>
<config:config-item config:name="ZoomType" config:type="short">0</config:config-item>
</xsl:otherwise>
</xsl:choose>
<config:config-item config:name="ZoomFactor" config:type="short">
<xsl:value-of select="w:zoom/@w:percent"/>
</config:config-item>
</xsl:if>
</config:config-item-map-entry>
</config:config-item-map-indexed>
</config:config-item-set>
</office:settings>
</xsl:template>
</xsl:stylesheet>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff