Date: prev next · Thread: first prev next last
2012 Archives by date, by thread · List index


hi Stephan,

On 18/09/12 20:46, Libreoffice Gerrit user wrote:
 officecfg/registry/cppheader.xsl      |   18 +++++++++---------
 officecfg/registry/files.mk           |    3 ++-
 sd/source/ui/remotecontrol/Server.cxx |    6 ++++--
 3 files changed, 15 insertions(+), 12 deletions(-)

New commits:
commit ee5403b98bf0e89693a14f7a1ae5658d9e5eb730
Author: Michael Stahl <mstahl@redhat.com>
Date:   Tue Sep 18 20:41:56 2012 +0200

    officecfg: generate header for Impress-sdremote, handle "-" in xcs name

this was an urgent change to fix a non-building master, to handle the
newly introduced "Office/Impress-sdremote.xcs"; but i wonder, is it
perhaps intentional that schema files aren't allowed to have "-" in
their names, considering that there are a bunch of .xcu files with names
like Foo-bar.xcu where a Foo.xcs exists; should the
Office/Impress-sdremote.xcs simply be renamed instead, and the xslt
change reverted?

    Change-Id: I3f965a293cb6cbd5cafe42e1a05565282f2e10c7

diff --git a/officecfg/registry/cppheader.xsl b/officecfg/registry/cppheader.xsl
index 372876e..ac7dce7 100644
--- a/officecfg/registry/cppheader.xsl
+++ b/officecfg/registry/cppheader.xsl
@@ -65,29 +65,29 @@
     <xsl:param name="path"/>
     <xsl:text>#ifndef INCLUDED_OFFICECFG_</xsl:text>
     <xsl:value-of
-        select="translate($ns1, 'abcdefghijklmnopqrstuvwxyz', 'ABCDEFGHIJKLMNOPQRSTUVWXYZ')"/>
+        select="translate($ns1, 'abcdefghijklmnopqrstuvwxyz-', 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_')"/>
     <xsl:if test="$ns2">
       <xsl:text>_</xsl:text>
       <xsl:value-of
-          select="translate($ns2, 'abcdefghijklmnopqrstuvwxyz', 'ABCDEFGHIJKLMNOPQRSTUVWXYZ')"/>
+          select="translate($ns2, 'abcdefghijklmnopqrstuvwxyz-', 
'ABCDEFGHIJKLMNOPQRSTUVWXYZ_')"/>
       <xsl:if test="$ns3">
         <xsl:text>_</xsl:text>
         <xsl:value-of
-            select="translate($ns3, 'abcdefghijklmnopqrstuvwxyz', 
'ABCDEFGHIJKLMNOPQRSTUVWXYZ')"/>
+            select="translate($ns3, 'abcdefghijklmnopqrstuvwxyz-', 
'ABCDEFGHIJKLMNOPQRSTUVWXYZ_')"/>
       </xsl:if>
     </xsl:if>
     <xsl:text>_HXX&#xA;</xsl:text>
     <xsl:text>#define INCLUDED_OFFICECFG_</xsl:text>
     <xsl:value-of
-        select="translate($ns1, 'abcdefghijklmnopqrstuvwxyz', 'ABCDEFGHIJKLMNOPQRSTUVWXYZ')"/>
+        select="translate($ns1, 'abcdefghijklmnopqrstuvwxyz-', 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_')"/>
     <xsl:if test="$ns2">
       <xsl:text>_</xsl:text>
       <xsl:value-of
-          select="translate($ns2, 'abcdefghijklmnopqrstuvwxyz', 'ABCDEFGHIJKLMNOPQRSTUVWXYZ')"/>
+          select="translate($ns2, 'abcdefghijklmnopqrstuvwxyz-', 
'ABCDEFGHIJKLMNOPQRSTUVWXYZ_')"/>
       <xsl:if test="$ns3">
         <xsl:text>_</xsl:text>
         <xsl:value-of
-            select="translate($ns3, 'abcdefghijklmnopqrstuvwxyz', 
'ABCDEFGHIJKLMNOPQRSTUVWXYZ')"/>
+            select="translate($ns3, 'abcdefghijklmnopqrstuvwxyz-', 
'ABCDEFGHIJKLMNOPQRSTUVWXYZ_')"/>
       </xsl:if>
     </xsl:if>
     <xsl:text>_HXX&#xA;</xsl:text>
@@ -113,13 +113,13 @@
       <xsl:text>#include "comphelper/configuration.hxx"&#xA;</xsl:text>
       <xsl:text>&#xA;</xsl:text>
       <xsl:text>namespace officecfg { namespace </xsl:text>
-      <xsl:value-of select="$ns1"/>
+      <xsl:value-of select="translate($ns1, '-', '_')"/>
       <xsl:if test="$ns2">
         <xsl:text> { namespace </xsl:text>
-        <xsl:value-of select="$ns2"/>
+        <xsl:value-of select="translate($ns2, '-', '_')"/>
         <xsl:if test="$ns3">
           <xsl:text> { namespace </xsl:text>
-          <xsl:value-of select="$ns3"/>
+          <xsl:value-of select="translate($ns3, '-', '_')"/>
         </xsl:if>
       </xsl:if>
       <xsl:text> {&#xA;</xsl:text>
diff --git a/officecfg/registry/files.mk b/officecfg/registry/files.mk
index 21a4a15..5e93fb4 100644
--- a/officecfg/registry/files.mk
+++ b/officecfg/registry/files.mk
@@ -1,4 +1,4 @@
-officecfg_FILES = \
+officecfg_FILES := \
     FirstStartWizard \
     Inet \
     Interaction \
@@ -22,6 +22,7 @@ officecfg_FILES = \
     Office/FormWizard \
     Office/Histories \
     Office/Impress \
+     $(if $(filter YES,$(ENABLE_SDREMOTE)),Office/Impress-sdremote) \
     Office/Java \
     Office/Jobs \
     Office/Labels \
diff --git a/sd/source/ui/remotecontrol/Server.cxx b/sd/source/ui/remotecontrol/Server.cxx
index f072f27..685af34 100644
--- a/sd/source/ui/remotecontrol/Server.cxx
+++ b/sd/source/ui/remotecontrol/Server.cxx
@@ -125,7 +125,8 @@ void RemoteServer::execute()
             while ( aLine.getLength() > 0 );
 
             // Check if we already have this server.
-            Reference< XNameAccess > xConfig = 
officecfg::Office::Impress-sdremote::Content::AuthorisedRemotes::get();
+            Reference< XNameAccess > const xConfig = officecfg::Office
+                ::Impress_sdremote::Content::AuthorisedRemotes::get();
             Sequence< OUString > aNames = xConfig->getElementNames();
             bool aFound = false;
             for ( int i = 0; i < aNames.getLength(); i++ )
@@ -232,7 +233,8 @@ sal_Bool RemoteServer::connectClient( ClientInfo* pClient, rtl::OUString aPin 
)
     {
         // Save in settings first
         boost::shared_ptr< ConfigurationChanges > aChanges = ConfigurationChanges::create();
-        Reference< XNameContainer > xConfig = 
officecfg::Office::Impress-sdremote::Content::AuthorisedRemotes::get( aChanges );
+        Reference< XNameContainer > const xConfig = officecfg::Office
+            ::Impress_sdremote::Content::AuthorisedRemotes::get( aChanges );
 
         Reference<XSingleServiceFactory> xChildFactory (
             xConfig, UNO_QUERY);




Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.