summaryrefslogtreecommitdiffstats
path: root/officecfg
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2012-01-25 18:17:08 +0100
committerStephan Bergmann <sbergman@redhat.com>2012-01-25 18:18:52 +0100
commitd70aa23c2d3af951c8846b4aea83c87c06a37a35 (patch)
tree4669966eef4aef87b3da1d818884cd0d7f04c4f9 /officecfg
parenttypo (diff)
downloadcore-d70aa23c2d3af951c8846b4aea83c87c06a37a35.tar.gz
core-d70aa23c2d3af951c8846b4aea83c87c06a37a35.zip
Add configuration wrappers for groups, too (to add listeners etc.).
Diffstat (limited to 'officecfg')
-rw-r--r--officecfg/registry/cppheader.xsl24
1 files changed, 20 insertions, 4 deletions
diff --git a/officecfg/registry/cppheader.xsl b/officecfg/registry/cppheader.xsl
index df891c29e6e2..2522aca68d5d 100644
--- a/officecfg/registry/cppheader.xsl
+++ b/officecfg/registry/cppheader.xsl
@@ -141,9 +141,18 @@
<xsl:template match="group">
<xsl:param name="path"/>
<xsl:if test=".//prop or .//set">
- <xsl:text>namespace </xsl:text>
- <xsl:value-of select="translate(@oor:name, '-.', '__')"/>
- <xsl:text> {&#xA;</xsl:text>
+ <xsl:variable name="name" select="translate(@oor:name, '-.', '__')"/>
+ <xsl:text>struct </xsl:text>
+ <xsl:value-of select="$name"/>
+ <xsl:text>: public unotools::ConfigurationGroup&lt; </xsl:text>
+ <xsl:value-of select="$name"/>
+ <xsl:text>&gt; {&#xA;</xsl:text>
+ <xsl:text> static rtl::OUString path() { return rtl::OUString(<!--
+ -->RTL_CONSTASCII_USTRINGPARAM("</xsl:text>
+ <xsl:value-of select="$path"/>
+ <xsl:text>/</xsl:text>
+ <xsl:value-of select="@oor:name"/>
+ <xsl:text>")); }&#xA;</xsl:text>
<xsl:text>&#xA;</xsl:text>
<xsl:apply-templates select="group|set|prop">
<xsl:with-param name="path">
@@ -152,7 +161,14 @@
<xsl:value-of select="@oor:name"/>
</xsl:with-param>
</xsl:apply-templates>
- <xsl:text>}&#xA;</xsl:text>
+ <xsl:text>private:&#xA;</xsl:text>
+ <xsl:text> </xsl:text>
+ <xsl:value-of select="$name"/>
+ <xsl:text>(); // not defined&#xA;</xsl:text>
+ <xsl:text> ~</xsl:text>
+ <xsl:value-of select="$name"/>
+ <xsl:text>(); // not defined&#xA;</xsl:text>
+ <xsl:text>};&#xA;</xsl:text>
<xsl:text>&#xA;</xsl:text>
</xsl:if>
</xsl:template>