ucb/source/ucp/cmis/cmis_content.cxx      |    4 +++-
 ucb/source/ucp/cmis/cmis_repo_content.cxx |    4 +++-
 2 files changed, 6 insertions(+), 2 deletions(-)

New commits:
commit 9698ecfe0adc556f2f7894f47f95a1d2c843fe7e
Author: Cédric Bosdonnat <[email protected]>
Date:   Tue Feb 12 16:09:20 2013 +0100

    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
    Reviewed-on: https://gerrit.libreoffice.org/2120
    Reviewed-by: Michael Stahl <[email protected]>
    Tested-by: Michael Stahl <[email protected]>

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 @@ namespace cmis
         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 @@ namespace cmis
         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() )
_______________________________________________
Libreoffice-commits mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to