[Libreoffice-commits] core.git: 2 commits - officecfg/registry sd/source

Michael Meeks michael.meeks at suse.com
Wed Feb 13 06:36:20 PST 2013


 officecfg/registry/cppheader.xsl |   12 ++++++------
 sd/source/ui/view/drviews7.cxx   |   26 ++++++++++++++++++--------
 2 files changed, 24 insertions(+), 14 deletions(-)

New commits:
commit 13cb088a2d8902822e3eb5607ba4cac81ad4d2f2
Author: Michael Meeks <michael.meeks at suse.com>
Date:   Wed Feb 13 14:35:40 2013 +0000

    sdremote: hide TCP/IP server selection dialog menu item
    
    Now shown only in experimental mode (ie. when TCP/IP is enabled)
    to reduce user-confusion. Said dialog is not needed for bluetooth.

diff --git a/sd/source/ui/view/drviews7.cxx b/sd/source/ui/view/drviews7.cxx
index f2d69be..f077d30 100644
--- a/sd/source/ui/view/drviews7.cxx
+++ b/sd/source/ui/view/drviews7.cxx
@@ -26,6 +26,7 @@
 #include <editeng/eeitem.hxx>
 #include <editeng/flditem.hxx>
 #include <editeng/outlobj.hxx>
+#include <officecfg/Office/Common.hxx>
 #include <officecfg/Office/Impress.hxx>
 #include <svx/svxids.hrc>
 #include <svx/svdpagv.hxx>
@@ -51,7 +52,6 @@
 #include <comphelper/processfactory.hxx>
 #include <sfx2/request.hxx>
 
-
 #include <svx/pfiledlg.hxx>
 #include <svx/grafctrl.hxx>
 #include <svtools/cliplistener.hxx>
@@ -996,15 +996,25 @@ void DrawViewShell::GetMenuState( SfxItemSet &rSet )
        rSet.DisableItem(SID_ZOOM_PREV);
     }
 
-    bool bDisableSdremoteForGood = false;
+    if( SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_REMOTE_DLG ) )
+    {
+
+        bool bDisableSdremoteForGood = false;
 #ifndef ENABLE_SDREMOTE
-    bDisableSdremoteForGood = true;
+        bDisableSdremoteForGood = true;
 #endif
-    uno::Reference< uno::XComponentContext > xContext = comphelper::getProcessComponentContext();
-    if ( bDisableSdremoteForGood || ( xContext.is() && !officecfg::Office::Impress::Misc::Start::EnableSdremote::get( xContext ) ) )
-    {
-        rSet.ClearItem(SID_REMOTE_DLG);
-        rSet.DisableItem(SID_REMOTE_DLG);
+        uno::Reference< uno::XComponentContext > xContext = comphelper::getProcessComponentContext();
+        if ( xContext.is() )
+            bDisableSdremoteForGood |= ! ( officecfg::Office::Common::Misc::ExperimentalMode::get( xContext ) &&
+
+                                           officecfg::Office::Impress::Misc::Start::EnableSdremote::get( xContext ) );
+
+        // This dialog is only useful for TCP/IP remote control
+        // which is unusual, under-tested and a security issue.
+        if ( bDisableSdremoteForGood )
+        {
+            rSet.Put(SfxVisibilityItem(SID_REMOTE_DLG, false));
+        }
     }
 
     // EditText aktiv
commit 90d42440eeaf7994f3ad57ebfdc8edb129c8faff
Author: Michael Meeks <michael.meeks at suse.com>
Date:   Wed Feb 13 14:24:26 2013 +0000

    cleanup generated config includes to make them more readable.

diff --git a/officecfg/registry/cppheader.xsl b/officecfg/registry/cppheader.xsl
index 372876e..9bdce8e 100644
--- a/officecfg/registry/cppheader.xsl
+++ b/officecfg/registry/cppheader.xsl
@@ -149,11 +149,11 @@
       <xsl:value-of select="$name"/>
       <xsl:text>> {&#xA;</xsl:text>
       <xsl:text>    static rtl::OUString path() { return rtl::OUString(<!--
-      -->RTL_CONSTASCII_USTRINGPARAM("</xsl:text>
+      -->"</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:text>&#xA;</xsl:text>
       <xsl:apply-templates select="group|set|prop">
         <xsl:with-param name="path">
@@ -183,11 +183,11 @@
     <xsl:value-of select="$name"/>
     <xsl:text>> {&#xA;</xsl:text>
     <xsl:text>    static rtl::OUString path() { return rtl::OUString(<!--
-    -->RTL_CONSTASCII_USTRINGPARAM("</xsl:text>
+    -->"</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:text>private:&#xA;</xsl:text>
     <xsl:text>    </xsl:text>
     <xsl:value-of select="$name"/>
@@ -272,11 +272,11 @@
     </xsl:if>
     <xsl:text>> {&#xA;</xsl:text>
     <xsl:text>    static rtl::OUString path() { return rtl::OUString(<!--
-    -->RTL_CONSTASCII_USTRINGPARAM("</xsl:text>
+    -->"</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:text>private:&#xA;</xsl:text>
     <xsl:text>    </xsl:text>
     <xsl:value-of select="$name"/>


More information about the Libreoffice-commits mailing list