rpms/openoffice.org/F-11 openoffice.org-3.1.0.ooo101354.filter.xhtml.do-not-label-list-headers.patch, NONE, 1.1 openoffice.org.spec, 1.1898, 1.1899
David Tardon
dtardon at fedoraproject.org
Mon Apr 27 05:59:25 UTC 2009
- Previous message (by thread): rpms/php-ezc-File/devel import.log, NONE, 1.1 php-ezc-File.spec, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2
- Next message (by thread): rpms/php-ezc-File/F-9 import.log, NONE, 1.1 php-ezc-File.spec, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: dtardon
Update of /cvs/extras/rpms/openoffice.org/F-11
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv17996
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-11/openoffice.org.spec,v
retrieving revision 1.1898
retrieving revision 1.1899
diff -u -r1.1898 -r1.1899
--- openoffice.org.spec 24 Apr 2009 16:46:01 -0000 1.1898
+++ openoffice.org.spec 27 Apr 2009 05:58:54 -0000 1.1899
@@ -135,6 +135,7 @@
Patch60: workspace.slideshow1.patch
Patch61: openoffice.org-3.1.0.ooo90439.sfx2.qstart.hackaround.patch
Patch62: openoffice.org-3.1.0.ooo101274.opening-a-directory.patch
+Patch63: openoffice.org-3.1.0.ooo101354.filter.xhtml.do-not-label-list-headers.patch
%define python_py_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(0)")
%define instdir %{_libdir}
@@ -1628,6 +1629,7 @@
%patch60 -p2 -b .workspace.slideshow1.patch
%patch61 -p0 -b .ooo90439.sfx2.qstart.hackaround.patch
%patch62 -p0 -b .ooo101274.opening-a-directory.patch
+%patch63 -p0 -b .ooo101354.filter.xhtml.do-not-label-list-headers.patch
%build
echo build start time is `date`, diskspace: `df -h . | tail -n 1`
@@ -4128,6 +4130,7 @@
- Resolves: rhbz#473985 - "oocalc this-is-a-dir" finishes immediately
+ add openoffice.org-3.1.0-ooo101274.opening-a-directory.patch
- silence stupid survey dialog
+- Resolves: rhbz#484177 openoffice.org-3.1.0.ooo101354.filter.xhtml.do-not-label-list-headers.patch
* Sun Apr 19 2009 Caolán McNamara <caolanm at redhat.com> - 1:3.1.0-10.2
- Resolves: rhbz#496280 ooo#101184 dynamically detect multiple monitors
- Previous message (by thread): rpms/php-ezc-File/devel import.log, NONE, 1.1 php-ezc-File.spec, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2
- Next message (by thread): rpms/php-ezc-File/F-9 import.log, NONE, 1.1 php-ezc-File.spec, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the fedora-extras-commits
mailing list