summaryrefslogtreecommitdiff
path: root/officecfg
diff options
context:
space:
mode:
authorTor Lillqvist <tml@collabora.com>2014-09-12 12:09:17 +0300
committerTor Lillqvist <tml@collabora.com>2014-09-23 09:50:34 +0300
commitfcc56e342ffdd20908c1e9fb426f3c8d47e0a240 (patch)
treecf94f9e751ddde81117f7f92c78735a3417c8c2a /officecfg
parent39409db7cde46d0aad9e0f61dfda085cff1235a0 (diff)
Handle LIBO_SHARE_HELP_FOLDER
Change-Id: I4f004321c58da1d81a2cc3c80504347db583d86a (cherry picked from commit fa2801f2c349811e00c3f2f19f9ce62a68daa4dc)
Diffstat (limited to 'officecfg')
-rw-r--r--officecfg/registry/data/org/openoffice/Office/Paths.xcu2
-rw-r--r--officecfg/registry/schema/org/openoffice/Office/Common.xcs4
-rw-r--r--officecfg/util/alllang.xsl52
-rw-r--r--officecfg/util/schema_trim.xsl44
4 files changed, 90 insertions, 12 deletions
diff --git a/officecfg/registry/data/org/openoffice/Office/Paths.xcu b/officecfg/registry/data/org/openoffice/Office/Paths.xcu
index 7568f4d2fb23..6d739e67d72f 100644
--- a/officecfg/registry/data/org/openoffice/Office/Paths.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/Paths.xcu
@@ -98,7 +98,7 @@
</node>
<node oor:name="Help" oor:op="fuse" oor:mandatory="true">
<node oor:name="InternalPaths">
- <node oor:name="$(instpath)/help" oor:op="fuse"/>
+ <node oor:name="$(instpath)/@LIBO_SHARE_HELP_FOLDER@" oor:op="fuse"/>
</node>
</node>
<node oor:name="Linguistic" oor:op="fuse" oor:mandatory="true">
diff --git a/officecfg/registry/schema/org/openoffice/Office/Common.xcs b/officecfg/registry/schema/org/openoffice/Office/Common.xcs
index 9bc607677d2a..54707b2e835f 100644
--- a/officecfg/registry/schema/org/openoffice/Office/Common.xcs
+++ b/officecfg/registry/schema/org/openoffice/Office/Common.xcs
@@ -1613,7 +1613,7 @@
<info>
<desc>Specifies the path to the Office help files.</desc>
</info>
- <value>$(instpath)/help</value>
+ <value>$(instpath)/@LIBO_SHARE_HELP_FOLDER@</value>
</prop>
<prop oor:name="Linguistic" oor:type="xs:string" oor:nillable="false">
<info>
@@ -1808,7 +1808,7 @@
<desc>Specifies the default directory where Office help files are
located.</desc>
</info>
- <value>$(instpath)/help</value>
+ <value>$(instpath)/@LIBO_SHARE_HELP_FOLDER@</value>
</prop>
<prop oor:name="Linguistic" oor:type="xs:string" oor:nillable="false">
<info>
diff --git a/officecfg/util/alllang.xsl b/officecfg/util/alllang.xsl
index 31b53bccd853..f5d9ae103fc5 100644
--- a/officecfg/util/alllang.xsl
+++ b/officecfg/util/alllang.xsl
@@ -35,6 +35,7 @@
<xsl:param name="fallback-locale">en-US</xsl:param>
<xsl:param name="LIBO_SHARE_FOLDER"/>
+<xsl:param name="LIBO_SHARE_HELP_FOLDER"/>
<xsl:variable name="schemaRootURL">
<xsl:value-of select="$schemaRoot"/>
@@ -341,19 +342,23 @@
<xsl:template match="@oor:name">
<xsl:attribute name="oor:name">
- <xsl:call-template name="replace">
+ <xsl:call-template name="replacetwo">
<xsl:with-param name="input" select="current()"/>
- <xsl:with-param name="pattern" select="'@LIBO_SHARE_FOLDER@'"/>
- <xsl:with-param name="replace" select="$LIBO_SHARE_FOLDER"/>
+ <xsl:with-param name="pattern1" select="'@LIBO_SHARE_FOLDER@'"/>
+ <xsl:with-param name="replace1" select="$LIBO_SHARE_FOLDER"/>
+ <xsl:with-param name="pattern2" select="'@LIBO_SHARE_HELP_FOLDER@'"/>
+ <xsl:with-param name="replace2" select="$LIBO_SHARE_HELP_FOLDER"/>
</xsl:call-template>
</xsl:attribute>
</xsl:template>
<xsl:template match="text()">
- <xsl:call-template name="replace">
+ <xsl:call-template name="replacetwo">
<xsl:with-param name="input" select="current()"/>
- <xsl:with-param name="pattern" select="'@LIBO_SHARE_FOLDER@'"/>
- <xsl:with-param name="replace" select="$LIBO_SHARE_FOLDER"/>
+ <xsl:with-param name="pattern1" select="'@LIBO_SHARE_FOLDER@'"/>
+ <xsl:with-param name="replace1" select="$LIBO_SHARE_FOLDER"/>
+ <xsl:with-param name="pattern2" select="'@LIBO_SHARE_HELP_FOLDER@'"/>
+ <xsl:with-param name="replace2" select="$LIBO_SHARE_HELP_FOLDER"/>
</xsl:call-template>
</xsl:template>
@@ -378,4 +383,39 @@
</xsl:choose>
</xsl:template>
+ <xsl:template name="replacetwo">
+ <xsl:param name="input"/>
+ <xsl:param name="pattern1"/>
+ <xsl:param name="replace1"/>
+ <xsl:param name="pattern2"/>
+ <xsl:param name="replace2"/>
+ <xsl:choose>
+ <xsl:when test="contains($input, $pattern1)">
+ <xsl:call-template name="replace">
+ <xsl:with-param
+ name="input" select="substring-before($input, $pattern1)"/>
+ <xsl:with-param name="pattern" select="$pattern2"/>
+ <xsl:with-param name="replace" select="$replace2"/>
+ </xsl:call-template>
+ <xsl:value-of select="$replace1"/>
+ <xsl:call-template name="replacetwo">
+ <xsl:with-param
+ name="input" select="substring-after($input, $pattern1)"/>
+ <xsl:with-param name="pattern1" select="$pattern1"/>
+ <xsl:with-param name="replace1" select="$replace1"/>
+ <xsl:with-param name="pattern2" select="$pattern2"/>
+ <xsl:with-param name="replace2" select="$replace2"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="replace">
+ <xsl:with-param
+ name="input" select="$input"/>
+ <xsl:with-param name="pattern" select="$pattern2"/>
+ <xsl:with-param name="replace" select="$replace2"/>
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+
</xsl:transform>
diff --git a/officecfg/util/schema_trim.xsl b/officecfg/util/schema_trim.xsl
index 79b3c5c8cb4f..4ebac1c5b733 100644
--- a/officecfg/util/schema_trim.xsl
+++ b/officecfg/util/schema_trim.xsl
@@ -24,6 +24,7 @@
version="1.0">
<xsl:param name="LIBO_SHARE_FOLDER"/>
+ <xsl:param name="LIBO_SHARE_HELP_FOLDER"/>
<!-- Get the correct format -->
<xsl:output method="xml" indent="yes"/>
@@ -81,10 +82,12 @@
</xsl:template>
<xsl:template match="text()">
- <xsl:call-template name="replace">
+ <xsl:call-template name="replacetwo">
<xsl:with-param name="input" select="current()"/>
- <xsl:with-param name="pattern" select="'@LIBO_SHARE_FOLDER@'"/>
- <xsl:with-param name="replace" select="$LIBO_SHARE_FOLDER"/>
+ <xsl:with-param name="pattern1" select="'@LIBO_SHARE_FOLDER@'"/>
+ <xsl:with-param name="replace1" select="$LIBO_SHARE_FOLDER"/>
+ <xsl:with-param name="pattern2" select="'@LIBO_SHARE_HELP_FOLDER@'"/>
+ <xsl:with-param name="replace2" select="$LIBO_SHARE_HELP_FOLDER"/>
</xsl:call-template>
</xsl:template>
@@ -109,4 +112,39 @@
</xsl:choose>
</xsl:template>
+ <xsl:template name="replacetwo">
+ <xsl:param name="input"/>
+ <xsl:param name="pattern1"/>
+ <xsl:param name="replace1"/>
+ <xsl:param name="pattern2"/>
+ <xsl:param name="replace2"/>
+ <xsl:choose>
+ <xsl:when test="contains($input, $pattern1)">
+ <xsl:call-template name="replace">
+ <xsl:with-param
+ name="input" select="substring-before($input, $pattern1)"/>
+ <xsl:with-param name="pattern" select="$pattern2"/>
+ <xsl:with-param name="replace" select="$replace2"/>
+ </xsl:call-template>
+ <xsl:value-of select="$replace1"/>
+ <xsl:call-template name="replacetwo">
+ <xsl:with-param
+ name="input" select="substring-after($input, $pattern1)"/>
+ <xsl:with-param name="pattern1" select="$pattern1"/>
+ <xsl:with-param name="replace1" select="$replace1"/>
+ <xsl:with-param name="pattern2" select="$pattern2"/>
+ <xsl:with-param name="replace2" select="$replace2"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="replace">
+ <xsl:with-param
+ name="input" select="$input"/>
+ <xsl:with-param name="pattern" select="$pattern2"/>
+ <xsl:with-param name="replace" select="$replace2"/>
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+
</xsl:transform>