This is an automated email from the ASF dual-hosted git repository.

jimjag pushed a commit to branch odf-devel
in repository https://gitbox.apache.org/repos/asf/openoffice.git

commit 9b2c7c37f07af8d93f79ed9145eee0e6b14dd034
Author: Jim Jagielski <[email protected]>
AuthorDate: Fri Oct 23 13:40:01 2026 -0400

    filter: read fo:keep-together and style:layout-grid-snap-to in the UOF 
export transforms
    
    The ODF exporter stops writing style:keep-together on table rows and 
style:layout-grid-snap-to-characters in default mode.
---
 main/filter/source/xslt/export/uof/odf2uof_text.xsl | 6 +++---
 main/filter/source/xslt/export/uof2/odf2uof.xsl     | 6 +++---
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/main/filter/source/xslt/export/uof/odf2uof_text.xsl 
b/main/filter/source/xslt/export/uof/odf2uof_text.xsl
index 8e3a8c36f2..5159242b2b 100644
--- a/main/filter/source/xslt/export/uof/odf2uof_text.xsl
+++ b/main/filter/source/xslt/export/uof/odf2uof_text.xsl
@@ -2848,12 +2848,12 @@
                                                <xsl:attribute 
name="uof:attrList">固定值 最小值</xsl:attribute>
                                        </xsl:element>
                                </xsl:for-each>
-                               <xsl:if 
test="key('set_styleStyle',$rowStyleName)/style:table-row-properties[@style:keep-together]">
+                               <xsl:if 
test="key('set_styleStyle',$rowStyleName)/style:table-row-properties[@style:keep-together
 or @fo:keep-together]">
                                        <xsl:element name="字:跨页">
                                                <xsl:attribute 
name="uof:locID">t0146</xsl:attribute>
                                                <xsl:attribute 
name="uof:attrList">值</xsl:attribute>
-                                               <xsl:for-each 
select="key('set_styleStyle',$rowStyleName)/style:table-row-properties[@style:keep-together]">
-                                                       <xsl:attribute 
name="字:值"><xsl:choose><xsl:when 
test="@style:keep-together='false'">false</xsl:when><xsl:otherwise>true</xsl:otherwise></xsl:choose></xsl:attribute>
+                                               <xsl:for-each 
select="key('set_styleStyle',$rowStyleName)/style:table-row-properties[@style:keep-together
 or @fo:keep-together]">
+                                                       <xsl:attribute 
name="字:值"><xsl:choose><xsl:when test="@style:keep-together='false' or 
@fo:keep-together='always'">false</xsl:when><xsl:otherwise>true</xsl:otherwise></xsl:choose></xsl:attribute>
                                                </xsl:for-each>
                                        </xsl:element>
                                </xsl:if>
diff --git a/main/filter/source/xslt/export/uof2/odf2uof.xsl 
b/main/filter/source/xslt/export/uof2/odf2uof.xsl
index f56d7e87d1..1453de19b7 100644
--- a/main/filter/source/xslt/export/uof2/odf2uof.xsl
+++ b/main/filter/source/xslt/export/uof2/odf2uof.xsl
@@ -5886,10 +5886,10 @@
                                                </xsl:element>
                                        </xsl:if>
                                </xsl:for-each>
-                               <xsl:if 
test="key('RowStyle',$rowStyleName)/style:table-row-properties[@style:keep-together]">
+                               <xsl:if 
test="key('RowStyle',$rowStyleName)/style:table-row-properties[@style:keep-together
 or @fo:keep-together]">
                                        <xsl:element name="字:是否跨页_41BB">
                                                <xsl:choose>
-                                                       <xsl:when 
test="key('RowStyle',$rowStyleName)/style:table-row-properties[@style:keep-together]/@style:keep-together='false'">false</xsl:when>
+                                                       <xsl:when 
test="key('RowStyle',$rowStyleName)/style:table-row-properties[@style:keep-together='false'
 or @fo:keep-together='always']">false</xsl:when>
                                                        
<xsl:otherwise>true</xsl:otherwise>
                                                </xsl:choose>
                                        </xsl:element>
@@ -6387,7 +6387,7 @@
                                <xsl:if 
test="style:page-layout-properties/@style:layout-grid-mode">
                                        <字:网格设置_420E>
                                                <xsl:if 
test="style:page-layout-properties/@style:layout-grid-mode">
-                                                       <xsl:attribute 
name="网格类型_420F"><xsl:choose><xsl:when 
test="style:page-layout-properties/@style:layout-grid-mode='both' and 
style:page-layout-properties/@style:layout-grid-snap-to-characters = 
'false'">line-char</xsl:when><xsl:when 
test="style:page-layout-properties/@style:layout-grid-mode='both' and 
style:page-layout-properties/@style:layout-grid-snap-to-characters = 
'true'">char</xsl:when><xsl:when 
test="style:page-layout-properties/@style:layout-grid-mode='line'">line</xsl:when
 [...]
+                                                       <xsl:attribute 
name="网格类型_420F"><xsl:choose><xsl:when 
test="style:page-layout-properties/@style:layout-grid-mode='both' and 
(style:page-layout-properties/@style:layout-grid-snap-to-characters = 'false' 
or style:page-layout-properties/@style:layout-grid-snap-to = 
'false')">line-char</xsl:when><xsl:when 
test="style:page-layout-properties/@style:layout-grid-mode='both' and 
(style:page-layout-properties/@style:layout-grid-snap-to-characters = 'true' or 
style:page-layout-properties/@st [...]
                                                </xsl:if>
                                                <xsl:if 
test="style:page-layout-properties/@style:layout-grid-base-width and 
(style:page-layout-properties/@style:layout-grid-mode = 'both' or 
style:page-layout-properties/@style:layout-grid-mode = 'both-nosnap')">
                                                        <xsl:attribute 
name="字符数_4228"><xsl:value-of select="floor((number($pageWidth) - $uof_left - 
$uof_right) div number($layoutGridRubyWidth) * 1.003)"/></xsl:attribute>

Reply via email to