diff options
author | Henning Brinkmann <hbrinkm@openoffice.org> | 2007-05-03 12:44:10 +0000 |
---|---|---|
committer | Henning Brinkmann <hbrinkm@openoffice.org> | 2007-05-03 12:44:10 +0000 |
commit | 92e35848da100eac440d8ff2237a87b8d6b39f98 (patch) | |
tree | f7130bbd774b0622bda9f92845d65b1666f79c94 | |
parent | e5793d78d0beae0d470134626a7ce56ec337d3fc (diff) |
Generate table events in OOXML
-rw-r--r-- | writerfilter/source/ooxml/dummyannotate.xsl | 27 | ||||
-rw-r--r-- | writerfilter/source/ooxml/model.xml | 9 | ||||
-rw-r--r-- | writerfilter/source/ooxml/resourcestools.xsl | 77 | ||||
-rw-r--r-- | writerfilter/unocomponent/debugservices/ooxml/OOXMLTestService.cxx | 6 |
4 files changed, 80 insertions, 39 deletions
diff --git a/writerfilter/source/ooxml/dummyannotate.xsl b/writerfilter/source/ooxml/dummyannotate.xsl index cd684fbc1c3c..779a126a8b41 100644 --- a/writerfilter/source/ooxml/dummyannotate.xsl +++ b/writerfilter/source/ooxml/dummyannotate.xsl @@ -5,9 +5,9 @@ * * $RCSfile: dummyannotate.xsl,v $ * - * $Revision: 1.6 $ + * $Revision: 1.7 $ * - * last change: $Author: hbrinkm $ $Date: 2007-04-16 09:14:16 $ + * last change: $Author: hbrinkm $ $Date: 2007-05-03 13:44:06 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -767,9 +767,30 @@ </xsl:element> </xsl:template> + <xsl:template match="rng:define" mode="tabledoc" xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main"> + <xsl:for-each select=".//rng:element"> + <w:tbl> + <w:tblPr> + <xsl:element name="w:{@name}"/> + </w:tblPr> + <w:tr> + <w:tc> + <w:tcPr/> + <w:p > + <w:pPr> + <w:rPr/> + </w:pPr> + <w:r><w:t><xsl:value-of select="@name"/></w:t></w:r> + </w:p> + </w:tc> + </w:tr> + </w:tbl> + </xsl:for-each> + </xsl:template> + <xsl:template match="/"> <out> - <xsl:apply-templates select="//rng:define[@name='CT_FontSig']" mode="resourcesPropertySetValue"/> + <xsl:apply-templates select="//rng:define[@name='CT_TrPrBase']" mode="resourcesPropertySetValue"/> </out> </xsl:template> </xsl:stylesheet>
\ No newline at end of file diff --git a/writerfilter/source/ooxml/model.xml b/writerfilter/source/ooxml/model.xml index b427a46bb800..d0164d10a38b 100644 --- a/writerfilter/source/ooxml/model.xml +++ b/writerfilter/source/ooxml/model.xml @@ -14806,7 +14806,6 @@ </resource> <resource name="CT_R" resource="Stream"> <action name="start" action="startCharacterGroup"/> - <action name="end" action="endCharacterGroup"/> </resource> <resource name="ST_Hint" resource="List"> <value tokenid="ooxml:Value_ST_Hint_default">default</value> @@ -14887,8 +14886,8 @@ <resource name="CT_Attr" resource="StringValue" generated="yes"/> <resource name="CT_P" resource="Stream"> <action name="start" action="startParagraphGroup"/> + <action name="start" action="sendTableDepth"/> <action name="end" action="endOfParagraph"/> - <action name="end" action="endParagraphGroup"/> </resource> <resource name="ST_TblWidth" resource="List"> <value tokenid="ooxml:Value_ST_TblWidth_nil">nil</value> @@ -14946,7 +14945,9 @@ </resource> <resource name="CT_TcPr" resource="Properties"/> <resource name="CT_Tc" resource="TextTableCell"> - <action name="start" action="startParagraphGroup"/> + <action name="start" action="startCell"/> + <action name="end" action="endCell"/> + <action name="end" action="endCharacterGroup"/> <action name="end" action="endParagraphGroup"/> </resource> <resource name="CT_Cnf" resource="StringValue" generated="yes"/> @@ -15155,6 +15156,8 @@ <resource name="CT_FontsList" resource="Table" tokenid="rtf:FONTTABLE"/> <resource name="CT_Body" resource="Stream"> <action name="start" action="startSectionGroup"/> + <action name="end" action="endCharacterGroup"/> + <action name="end" action="endParagraphGroup"/> <action name="end" action="endSectionGroup"/> </resource> <resource name="ST_ThemeColor" resource="List"> diff --git a/writerfilter/source/ooxml/resourcestools.xsl b/writerfilter/source/ooxml/resourcestools.xsl index c7e8a06ee93e..c2bc80faca1f 100644 --- a/writerfilter/source/ooxml/resourcestools.xsl +++ b/writerfilter/source/ooxml/resourcestools.xsl @@ -5,9 +5,9 @@ * * $RCSfile: resourcestools.xsl,v $ * - * $Revision: 1.26 $ + * $Revision: 1.27 $ * - * last change: $Author: fridrich_strba $ $Date: 2007-04-30 16:32:25 $ + * last change: $Author: hbrinkm $ $Date: 2007-05-03 13:44:07 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -964,22 +964,31 @@ bool </xsl:text> : </xsl:text> <xsl:call-template name="contextparent"/> <xsl:text>(rContext) -{ -</xsl:text> - <xsl:choose> - <xsl:when test="$resource/action[@name='start' and @action='startParagraphGroup']"> - <xsl:text> - mrStream.startParagraphGroup();</xsl:text> - </xsl:when> - <xsl:when test="$resource/action[@name='start' and @action='startCharacterGroup']"> - <xsl:text> - mrStream.startCharacterGroup();</xsl:text> - </xsl:when> - <xsl:when test="$resource/action[@name='start' and @action='startSectionGroup']"> - <xsl:text> +{</xsl:text> + <xsl:for-each select="$resource/action[@name='start']"> + <xsl:choose> + <xsl:when test="@action='sendTableDepth'"> + <xsl:text> + sendTableDepth();</xsl:text> + </xsl:when> + <xsl:when test="@action='startCell'"> + <xsl:text> + startCell();</xsl:text> + </xsl:when> + <xsl:when test="@action='startParagraphGroup'"> + <xsl:text> + startParagraphGroup();</xsl:text> + </xsl:when> + <xsl:when test="@action='startCharacterGroup'"> + <xsl:text> + startCharacterGroup();</xsl:text> + </xsl:when> + <xsl:when test="@action='startSectionGroup'"> + <xsl:text> mrStream.startSectionGroup();</xsl:text> - </xsl:when> - </xsl:choose> + </xsl:when> + </xsl:choose> + </xsl:for-each> <xsl:if test="$resource/@resource='Properties'"> <xsl:for-each select="$resource//attribute[@default]"> /*<xsl:value-of select="@name"/>*/ @@ -1023,26 +1032,34 @@ bool </xsl:text> <xsl:value-of select="$classname"/> <xsl:text>() {</xsl:text> - <xsl:if test="$resource/action[@name='end' and @action='endOfParagraph']"> - <xsl:text> + <xsl:for-each select="$resource/action[@name='end']"> + <xsl:choose> + <xsl:when test="@action='endOfParagraph'"> + <xsl:text> mrStream.utext(reinterpret_cast<const sal_uInt8 *>(sCR.getStr()), sCR.getLength());</xsl:text> - </xsl:if> - <xsl:if test="$resource/action[@name='end' and @action='setLastParagraphInSection']"> + </xsl:when> + <xsl:when test="@action='setLastParagraphInSection'"> <xsl:text> mrStream.setLastParagraphInSection();</xsl:text> - </xsl:if> - <xsl:if test="$resource/action[@name='end' and @action='endParagraphGroup']"> + </xsl:when> + <xsl:when test="@action='endCell'"> <xsl:text> - mrStream.endParagraphGroup();</xsl:text> - </xsl:if> - <xsl:if test="$resource/action[@name='end' and @action='endCharacterGroup']"> + endCell();</xsl:text> + </xsl:when> + <xsl:when test="@action='endParagraphGroup'"> <xsl:text> - mrStream.endCharacterGroup();</xsl:text> - </xsl:if> - <xsl:if test="$resource/action[@name='end' and @action='endSectionGroup']"> + endParagraphGroup();</xsl:text> + </xsl:when> + <xsl:when test="@action='endCharacterGroup'"> + <xsl:text> + endCharacterGroup();</xsl:text> + </xsl:when> + <xsl:when test="@action='endSectionGroup'"> <xsl:text> mrStream.endSectionGroup();</xsl:text> - </xsl:if> + </xsl:when> + </xsl:choose> + </xsl:for-each> <xsl:text> }
</xsl:text> </xsl:template> diff --git a/writerfilter/unocomponent/debugservices/ooxml/OOXMLTestService.cxx b/writerfilter/unocomponent/debugservices/ooxml/OOXMLTestService.cxx index f01cbe2d98f5..88807e3a2ff6 100644 --- a/writerfilter/unocomponent/debugservices/ooxml/OOXMLTestService.cxx +++ b/writerfilter/unocomponent/debugservices/ooxml/OOXMLTestService.cxx @@ -4,9 +4,9 @@ * * $RCSfile: OOXMLTestService.cxx,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: fridrich_strba $ $Date: 2007-02-22 17:16:07 $ + * last change: $Author: hbrinkm $ $Date: 2007-05-03 13:44:10 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -135,7 +135,7 @@ sal_Int32 SAL_CALL ScannerTestService::run( const uno::Sequence< rtl::OUString > TimeValue t1; osl_getSystemTime(&t1); #endif - doctok::Stream::Pointer_t pStream = ooxml::createStreamHandler(); + doctok::Stream::Pointer_t pStream = doctok::createStreamHandler(); pDocument->resolve(*pStream); #if 0 |