rpms/openoffice.org/F-10 openoffice.org-3.1.0.ooo101354.filter.xhtml.do-not-label-list-headers.patch, NONE, 1.1 openoffice.org.spec, 1.1726, 1.1727
David Tardon
dtardon at fedoraproject.org
Mon Apr 27 05:52:19 UTC 2009
Author: dtardon
Update of /cvs/extras/rpms/openoffice.org/F-10
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv16036
Modified Files:
openoffice.org.spec
Added Files:
openoffice.org-3.1.0.ooo101354.filter.xhtml.do-not-label-list-headers.patch
Log Message:
Resolves: rhbz#484177 openoffice.org-3.1.0.ooo101354.filter.xhtml.do-not-label-list-headers.patch
openoffice.org-3.1.0.ooo101354.filter.xhtml.do-not-label-list-headers.patch:
--- NEW FILE openoffice.org-3.1.0.ooo101354.filter.xhtml.do-not-label-list-headers.patch ---
Index: filter/source/xslt/odf2xhtml/export/xhtml/body.xsl
===================================================================
--- filter/source/xslt/odf2xhtml/export/xhtml/body.xsl (revision 270524)
+++ filter/source/xslt/odf2xhtml/export/xhtml/body.xsl (working copy)
@@ -1028,7 +1027,11 @@
<xsl:param name="minLabelWidth"/>
<xsl:param name="listIndent" />
-
+ <!-- The text:list-header shall not be labeled. According to ODF specification (sect. 4.3.2):
+ "The <text:list-header> element represents a list header and is a special kind of list item. It
+ contains one or more paragraphs that are displayed before a list. The paragraphs are formatted
+ like list items but they do not have a preceding number or bullet." -->
+ <xsl:variable name="isListHeader" select="boolean(self::text:list-header)"/>
<xsl:variable name="listIndentNew">
<xsl:choose>
<xsl:when test="$listIndent">
@@ -1046,13 +1049,16 @@
<xsl:variable name="itemNumberNew">
<xsl:if test="$listStyle/text:list-level-style-number">
<xsl:choose>
+ <xsl:when test="$isListHeader">0</xsl:when>
<xsl:when test="$isEmptyList">
<!-- An empty list item (no text:h/text:p as child), will not count as item and does not increment the count. -->
<xsl:variable name="tempItemNumber">
<xsl:choose>
<!-- siblings will be incremented by one -->
<xsl:when test="$itemNumber">
- <xsl:value-of select="$itemNumber + 1"/>
+ <xsl:if test="not($isListHeader)">
+ <xsl:value-of select="$itemNumber + 1"/>
+ </xsl:if>
</xsl:when>
<!-- if a higher list level had content the numbering starts with 1 -->
<xsl:when test="$isListNumberingReset and $listLevel > 1">
@@ -1132,6 +1138,7 @@
<xsl:when test="$display">
<xsl:value-of select="$display"/>
</xsl:when>
+ <xsl:when test="$isListHeader">0</xsl:when>
<xsl:otherwise>1</xsl:otherwise>
</xsl:choose>
</xsl:with-param>
@@ -1144,9 +1151,10 @@
</xsl:variable>
<xsl:element name="li">
<xsl:choose>
- <xsl:when test="$isEmptyList">
+ <xsl:when test="$isEmptyList or $isListHeader">
<xsl:apply-templates>
<xsl:with-param name="globalData" select="$globalData"/>
+ <xsl:with-param name="isNextLevelNumberingReset" select="$isListHeader or $isNextLevelNumberingReset"/>
<xsl:with-param name="itemLabel" select="$itemLabelNew"/>
<xsl:with-param name="listLevel" select="$listLevel + 1"/>
<xsl:with-param name="listStyleName" select="$listStyleName"/>
@@ -1181,7 +1189,7 @@
<xsl:apply-templates mode="first-list-child-margin-adaption" select="*[1]">
<xsl:with-param name="globalData" select="$globalData"/>
<xsl:with-param name="isEmptyList" select="$isEmptyList"/>
- <xsl:with-param name="isNextLevelNumberingReset" select="$isNextLevelNumberingReset"/>
+ <xsl:with-param name="isNextLevelNumberingReset" select="$isListHeader or $isNextLevelNumberingReset"/>
<!-- The new created label is given to the children -->
<xsl:with-param name="itemLabel" select="$itemLabelNew"/>
<xsl:with-param name="listLabelElement" select="$listLabelElement"/>
@@ -1225,7 +1233,7 @@
<!-- The Numbering start value (or offset from regular counteing) is used at the first item of offset,
- but have to be reused on following item/headers with no text:start-value -->
+ but have to be reused on following items with no text:start-value -->
<xsl:template name="getItemNumber">
<xsl:param name="listLevel"/>
<xsl:param name="listLevelStyle"/>
@@ -1261,6 +1269,9 @@
the level 3 gets a 'pseudoLevel' -->
<xsl:param name="pseudoLevel" select="0" />
+ <xsl:variable name="isListHeader" select="boolean(self::text:list-header)"/>
+ <xsl:variable name="isEmptyList" select="not(*[name() = 'text:h' or name() = 'text:p'])"/>
+
<!-- set the next of preceding list items. Starting from the current to the next previous text:list-item -->
<xsl:variable name="precedingListItemOfSameLevelAndStyle" select="$precedingListItemsOfSameLevelAndStyle[$precedingListItemsOfSameLevelAndStyleCount - $IteratorSameLevelAndStyle + 1]"/>
<xsl:variable name="precedingListItemOfSameStyle" select="$precedingListItemsOfSameStyle[$precedingListItemsOfSameStyleCount - $IteratorSameStyle + 1]"/>
@@ -1293,7 +1304,7 @@
<xsl:when test="$currentListLevel < $listLevel">
<xsl:choose>
<!-- if it has content the counting is ended -->
- <xsl:when test="*[name() = 'text:h' or name() = 'text:p']">
+ <xsl:when test="not($isEmptyList or $isListHeader)">
<!-- 2DO: Perhaps the children still have to be processed -->
<xsl:value-of select="$itemNumber + $pseudoLevel"/>
</xsl:when>
@@ -1348,7 +1359,7 @@
<xsl:with-param name="pseudoLevel">
<xsl:choose>
<!-- empty list item does not count -->
- <xsl:when test="not(*[name() = 'text:h' or name() = 'text:p'])">
+ <xsl:when test="$isEmptyList or $isListHeader">
<xsl:value-of select="$pseudoLevel"/>
</xsl:when>
<xsl:otherwise>1</xsl:otherwise>
@@ -1381,11 +1392,14 @@
<xsl:param name="precedingListItemsOfSameStyleCount"/>
<xsl:param name="pseudoLevel" />
+ <xsl:variable name="isListHeader" select="boolean(self::text:list-header)"/>
+ <xsl:variable name="isEmptyList" select="not(*[name() = 'text:h' or name() = 'text:p'])"/>
+
<xsl:choose>
<xsl:when test="@text:start-value">
<xsl:choose>
- <xsl:when test="not(*[name() = 'text:h' or name() = 'text:p'])">
- <!-- empty list item does not count -->
+ <xsl:when test="$isEmptyList or $isListHeader">
+ <!-- empty list item does not count. neither does list header -->
<xsl:call-template name="countListItemTillStartValue">
<xsl:with-param name="IteratorSameLevelAndStyle" select="$IteratorSameLevelAndStyle + 1" />
<xsl:with-param name="IteratorSameStyle" select="$IteratorSameStyle + 1"/>
@@ -1407,8 +1421,8 @@
</xsl:when>
<xsl:when test="$listLevelStyle/@text:start-value">
<xsl:choose>
- <xsl:when test="not(*[name() = 'text:h' or name() = 'text:p'])">
- <!-- empty list item does not count -->
+ <xsl:when test="$isEmptyList or $isListHeader">
+ <!-- empty list item does not count. neither does list header -->
<xsl:call-template name="countListItemTillStartValue">
<xsl:with-param name="IteratorSameLevelAndStyle" select="$IteratorSameLevelAndStyle + 1" />
<xsl:with-param name="IteratorSameStyle" select="$IteratorSameStyle + 1"/>
@@ -1430,8 +1444,8 @@
</xsl:when>
<xsl:otherwise>
<xsl:choose>
- <xsl:when test="not(*[name() = 'text:h' or name() = 'text:p'])">
- <!-- empty list item does not count -->
+ <xsl:when test="$isEmptyList or $isListHeader">
+ <!-- empty list item does not count. neither does list header -->
<xsl:call-template name="countListItemTillStartValue">
<xsl:with-param name="IteratorSameLevelAndStyle" select="$IteratorSameLevelAndStyle + 1" />
<xsl:with-param name="IteratorSameStyle" select="$IteratorSameStyle + 1"/>
@@ -1911,4 +1925,4 @@
<xsl:template match="math:annotation" mode="math"/>
-</xsl:stylesheet>
\ No newline at end of file
+</xsl:stylesheet>
Index: openoffice.org.spec
===================================================================
RCS file: /cvs/extras/rpms/openoffice.org/F-10/openoffice.org.spec,v
retrieving revision 1.1726
retrieving revision 1.1727
diff -u -r1.1726 -r1.1727
--- openoffice.org.spec 21 Apr 2009 08:08:05 -0000 1.1726
+++ openoffice.org.spec 27 Apr 2009 05:51:48 -0000 1.1727
@@ -147,6 +147,7 @@
Patch74: openoffice.org-3.1.0.ooo100942.svtools.oversafeemf.patch
Patch75: openoffice.org-3.1.0.ooo101145.vcl.safe.dpi.patch
Patch76: openoffice.org-3.0.1.oooXXXXX.sfx2.badexception.patch
+Patch77: openoffice.org-3.1.0.ooo101354.filter.xhtml.do-not-label-list-headers.patch
%define instdir %{_libdir}
%define baseinstdir %{instdir}/openoffice.org
@@ -1417,6 +1418,7 @@
%patch73 -p0 -b .ooo99541.sw.reopen.flat.addrbooks.patch
%patch74 -p1 -b .ooo100942.svtools.oversafeemf.patch
%patch76 -p1 -b .oooXXXXX.sfx2.badexception.patch
+%patch77 -p1 -b .ooo101354.filter.xhtml.do-not-label-list-headers.patch
%build
echo build start time is `date`, diskspace: `df -h . | tail -n 1`
@@ -3787,6 +3789,7 @@
- Resolves: rhbz#494643 EMF polypolygons issue
- Resolves: rhbz#495840 openoffice.org-3.1.0.ooo101145.vcl.safe.dpi.patch
- Resolves: rhbz#496315 openoffice.org-3.0.1.oooXXXXX.sfx2.badexception.patch
+- Resolves: rhbz#484177 openoffice.org-3.1.0.ooo101354.filter.xhtml.do-not-label-list-headers.patch
* Mon Mar 09 2009 Caolán McNamara <caolanm at redhat.com> - 1:3.0.1-15.3
- Resolves: rhbz#483223 openoffice.org-3.0.1.ooo98649.svtools.missingUI.patch
More information about the scm-commits
mailing list