[Libreoffice-commits] core.git: Branch 'libreoffice-4-0' - 4 commits - android/sdremote sd/source

Michael Meeks michael.meeks at suse.com
Fri Feb 15 14:46:47 PST 2013


 android/sdremote/res/values/strings.xml                                      |   12 ++--
 android/sdremote/src/org/libreoffice/impressremote/PresentationActivity.java |    2 
 sd/source/ui/view/drviews7.cxx                                               |   26 ++++++----
 3 files changed, 25 insertions(+), 15 deletions(-)

New commits:
commit dcbb11df33fdb32be58694907cfe633e39103204
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.
    (cherry picked from commit 13cb088a2d8902822e3eb5607ba4cac81ad4d2f2)
    
    Signed-off-by: Thorsten Behrens <tbehrens at suse.com>

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 e412e2750a1821e31099e6defc5d62eace061281
Author: Michael Meeks <michael.meeks at suse.com>
Date:   Wed Feb 13 13:51:08 2013 +0000

    sdremote: avoid crash when fiddling with elapsed time.
    (cherry picked from commit 03b941e9ae63626a3336aabdb6a3485835ec6f9d)
    
    Signed-off-by: Thorsten Behrens <tbehrens at suse.com>

diff --git a/android/sdremote/src/org/libreoffice/impressremote/PresentationActivity.java b/android/sdremote/src/org/libreoffice/impressremote/PresentationActivity.java
index 0de6b32..d3a0352 100644
--- a/android/sdremote/src/org/libreoffice/impressremote/PresentationActivity.java
+++ b/android/sdremote/src/org/libreoffice/impressremote/PresentationActivity.java
@@ -485,7 +485,7 @@ public class PresentationActivity extends SherlockFragmentActivity {
 
         @Override
         public boolean onEditorAction(TextView tv, int aID, KeyEvent aEvent) {
-            if (aEvent.getKeyCode() == KeyEvent.KEYCODE_ENTER) {
+            if (aEvent != null && aEvent.getKeyCode() == KeyEvent.KEYCODE_ENTER) {
 
                 long aTime = 0;
                 try {
commit eb72920b5a9c5e7a46bb65281bbd0cc41fbba12e
Author: Tor Lillqvist <tml at iki.fi>
Date:   Wed Feb 13 09:26:42 2013 +0200

    Ah, manually adding computers is for non-Bluetooth ones
    
    So yeah, need to keep this feature. Spell Wi-Fi correctly, and mention Wi-Fi
    in the menu button.
    
    Change-Id: I4cd6f0689a6ff9647f355d4b1404be84ec0c0138
    (cherry picked from commit ea264f0c8165eb0c62bf624af5f450b20898469f)
    
    Signed-off-by: Thorsten Behrens <tbehrens at suse.com>

diff --git a/android/sdremote/res/values/strings.xml b/android/sdremote/res/values/strings.xml
index 80493f9..a08edd1 100644
--- a/android/sdremote/res/values/strings.xml
+++ b/android/sdremote/res/values/strings.xml
@@ -23,7 +23,7 @@
     <string name="options_switchcomputer">Switch computer</string>
     <string name="blankscreen_return">Return to Slide</string>
     <string name="bluetooth">Bluetooth</string>
-    <string name="wifi">WI-FI</string>
+    <string name="wifi">Wi-Fi</string>
     <string name="selector_noservers">Searching for computers…</string>
     <string name="selector_delete">Remove computer</string>
     <string name="selector_choose_a_computer">Choose a Computer</string>
@@ -42,7 +42,7 @@
     <string name="about_copyright">Copyright © 2012 LibreOffice Contributors and/or their affiliates.</string>
     <string name="about_licence">This app is released under the Mozilla Public License, v. 2.0.</string>
     <string name="about_libraries">This app uses android-coverflow\n\tCopyright © 2011, Polidea\n\tNew BSD License.\n\nThis app uses ActionBarSherlock:\n\tCopyright 2012 Jake Wharton\n\tLicensed under the Apache License, Version 2.0 (the "License")</string>
-    <string name="addserver">Add Computer Manually</string>
+    <string name="addserver">Add Wi-Fi Computer Manually</string>
     <string name="addserver_entername">Computer name:</string>
     <string name="addserver_enteraddress">Computer IP address or hostname:</string>
     <string name="addserver_remember">Remember this computer next time</string>
commit 9f1dd0e8481c166b6c16e87548a8adf6b8b28d7c
Author: Tor Lillqvist <tml at iki.fi>
Date:   Wed Feb 13 09:17:53 2013 +0200

    Use consistent terminology
    
    Why "Choose a Computer" but "Add Server"? Let's always call them "computers"
    in the UI.
    
    And in fact I think the feature to add a computer manually is kinda pointless;
    is it too much to ask people to have their machines discoverable? I doubt
    keeping a computer not discoverable through Bluetooth thwarts a determined
    attacker from finding it anyway. (I am not saying that just finding it would
    mean compromising it.)
    
    Change-Id: Ib8041a8a793d84bee24587adac582c5fad03d1be
    (cherry picked from commit 056968fae7fa598e8cb528fb6b45c999de33a102)
    
    Signed-off-by: Thorsten Behrens <tbehrens at suse.com>

diff --git a/android/sdremote/res/values/strings.xml b/android/sdremote/res/values/strings.xml
index e84b7fa..80493f9 100644
--- a/android/sdremote/res/values/strings.xml
+++ b/android/sdremote/res/values/strings.xml
@@ -25,7 +25,7 @@
     <string name="bluetooth">Bluetooth</string>
     <string name="wifi">WI-FI</string>
     <string name="selector_noservers">Searching for computers…</string>
-    <string name="selector_delete">Remove server</string>
+    <string name="selector_delete">Remove computer</string>
     <string name="selector_choose_a_computer">Choose a Computer</string>
     <string name="selector_dialog_connecting">Attempting to connect to {0}…</string>
     <string name="selector_dialog_connectionfailed">Impress Remote could not connect to {0}.</string>
@@ -42,10 +42,10 @@
     <string name="about_copyright">Copyright © 2012 LibreOffice Contributors and/or their affiliates.</string>
     <string name="about_licence">This app is released under the Mozilla Public License, v. 2.0.</string>
     <string name="about_libraries">This app uses android-coverflow\n\tCopyright © 2011, Polidea\n\tNew BSD License.\n\nThis app uses ActionBarSherlock:\n\tCopyright 2012 Jake Wharton\n\tLicensed under the Apache License, Version 2.0 (the "License")</string>
-    <string name="addserver">Add Server</string>
-    <string name="addserver_entername">Server name:</string>
-    <string name="addserver_enteraddress">Server address as IP or hostname:</string>
-    <string name="addserver_remember">Remember this server next time</string>
+    <string name="addserver">Add Computer Manually</string>
+    <string name="addserver_entername">Computer name:</string>
+    <string name="addserver_enteraddress">Computer IP address or hostname:</string>
+    <string name="addserver_remember">Remember this computer next time</string>
     <string name="addserver_add">Add</string>
     <string name="addserver_cancel">Cancel</string>
     <string name="reconnect_description1">Your connection has been dropped.</string>


More information about the Libreoffice-commits mailing list