https://bz.apache.org/ooo/show_bug.cgi?id=111781

--- Comment #8 from [email protected] ---
This patch is enough to fix it, but I also want to add a unit test that checks
the file after exporting and re-importing it, to make sure such bugs cannot fly
undercover for decades in the future:

---snip---
diff --git a/main/filter/source/xslt/export/spreadsheetml/formular.xsl
b/main/filter/source/xslt/export/spreadsheetml/formular.xsl
index 39a343a026..b33afbab7e 100644
--- a/main/filter/source/xslt/export/spreadsheetml/formular.xsl
+++ b/main/filter/source/xslt/export/spreadsheetml/formular.xsl
@@ -47,8 +47,9 @@
        xmlns:xt="http://www.jclark.com/xt";
        xmlns:common="http://exslt.org/common";
        xmlns:xalan="http://xml.apache.org/xalan";
+       xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2"
        xmlns="urn:schemas-microsoft-com:office:spreadsheet"
xmlns:c="urn:schemas-microsoft-com:office:component:spreadsheet"
xmlns:html="http://www.w3.org/TR/REC-html40";
xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet"
xmlns:x2="http://schemas.microsoft.com/office/excel/2003/xml";
xmlns:x="urn:schemas-microsoft-com:office:excel"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
-       exclude-result-prefixes="chart config dc dom dr3d draw fo form math
meta number office ooo oooc ooow script style svg table text xlink xt common
xalan">
+       exclude-result-prefixes="chart config dc dom dr3d draw fo form math
meta number office ooo oooc ooow script style svg table text xlink xt common
xalan of">


        <!-- Mapping @table:formula to @ss:Formula translating the expression
syntax -->
@@ -85,14 +86,14 @@
                        <xsl:when test="$expression != ''">
                                <xsl:choose>
                                        <!-- OASIS Open Document XML formular
expressions  -->
-                                       <xsl:when
test="starts-with($expression,'oooc:')">
-                                               <!-- giving out the '=', which
will be removed with 'oooc:=' to enable recursive string parsing  -->
+                                       <xsl:when
test="starts-with($expression,'of:')">
+                                               <!-- giving out the '=', which
will be removed with 'of:=' to enable recursive string parsing  -->
                                                <xsl:text>=</xsl:text>
                                                <xsl:call-template
name="function-parameter-mapping">
                                                        <xsl:with-param
name="rowPos" select="$rowPos" />
                                                        <xsl:with-param
name="columnPos" select="$columnPos" />
-                                                       <!-- 1) remove 'oooc:='
prefix and exchange ';' with ',' -->
-                                                       <xsl:with-param
name="expression" select="translate(substring($expression,7),';',',')"/>
+                                                       <!-- 1) remove 'of:='
prefix and exchange ';' with ',' -->
+                                                       <xsl:with-param
name="expression" select="translate(substring($expression,5),';',',')"/>
                                                </xsl:call-template>
                                        </xsl:when>
                                        <xsl:otherwise>
---snip---

-- 
You are receiving this mail because:
You are the assignee for the issue.
You are on the CC list for the issue.

Reply via email to