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


Hi,

I have submitted a patch for review:

    https://gerrit.libreoffice.org/2120

To pull it, you can do:

    git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/20/2120/1

CMIS: proxy was setin to ":-1" is no proxy is defined in the UI

Don't output the port number if that one is not valid.
(cherry picked from commit 12ea70362f9b1234b4b1613872c8f07735dd386b)

Change-Id: Ia533d189117227a25c2df2e639b7fbd854e1bc45
---
M ucb/source/ucp/cmis/cmis_content.cxx
M ucb/source/ucp/cmis/cmis_repo_content.cxx
2 files changed, 6 insertions(+), 2 deletions(-)



diff --git a/ucb/source/ucp/cmis/cmis_content.cxx b/ucb/source/ucp/cmis/cmis_content.cxx
index a8b1c86..5f94d7a 100644
--- a/ucb/source/ucp/cmis/cmis_content.cxx
+++ b/ucb/source/ucp/cmis/cmis_content.cxx
@@ -262,7 +262,9 @@
         INetURLObject aBindingUrl( m_aURL.getBindingUrl( ) );
         const ucbhelper::InternetProxyServer& rProxy = aProxyDecider.getProxy(
                 INetURLObject::GetScheme( aBindingUrl.GetProtocol( ) ), aBindingUrl.GetHost(), 
aBindingUrl.GetPort() );
-        rtl::OUString sProxy = rProxy.aName + ":" + rtl::OUString::valueOf( rProxy.nPort );
+        rtl::OUString sProxy = rProxy.aName;
+        if ( rProxy.nPort > 0 )
+            sProxy += ":" + rtl::OUString::valueOf( rProxy.nPort );
         libcmis::SessionFactory::setProxySettings( OUSTR_TO_STDSTR( sProxy ), string(), string(), 
string() );
 
         // Look for a cached session, key is binding url + repo id
diff --git a/ucb/source/ucp/cmis/cmis_repo_content.cxx b/ucb/source/ucp/cmis/cmis_repo_content.cxx
index afd503c..b76514c 100644
--- a/ucb/source/ucp/cmis/cmis_repo_content.cxx
+++ b/ucb/source/ucp/cmis/cmis_repo_content.cxx
@@ -144,7 +144,9 @@
         INetURLObject aBindingUrl( m_aURL.getBindingUrl( ) );
         const ucbhelper::InternetProxyServer& rProxy = aProxyDecider.getProxy(
                 INetURLObject::GetScheme( aBindingUrl.GetProtocol( ) ), aBindingUrl.GetHost(), 
aBindingUrl.GetPort() );
-        rtl::OUString sProxy = rProxy.aName + ":" + rtl::OUString::valueOf( rProxy.nPort );
+        rtl::OUString sProxy = rProxy.aName;
+        if ( rProxy.nPort > 0 )
+            sProxy += ":" + rtl::OUString::valueOf( rProxy.nPort );
         libcmis::SessionFactory::setProxySettings( OUSTR_TO_STDSTR( sProxy ), string(), string(), 
string() );
 
         if ( m_aRepositories.empty() )

-- 
To view, visit https://gerrit.libreoffice.org/2120
To unsubscribe, visit https://gerrit.libreoffice.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia533d189117227a25c2df2e639b7fbd854e1bc45
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: libreoffice-4-0
Gerrit-Owner: Bosdonnat Cedric <cedric.bosdonnat@free.fr>

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.