[Libreoffice-commits] core.git: cui/source

Caolán McNamara caolanm at redhat.com
Thu May 17 08:14:46 UTC 2018


 cui/source/options/optjava.cxx |   17 ++++++++++-------
 1 file changed, 10 insertions(+), 7 deletions(-)

New commits:
commit 195ea6ced2e3cb2ae32faec07e5737e1664739e6
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Wed May 16 12:36:14 2018 +0100

    '/' appearing in java classpath list
    
    regression from...
    
    commit 2f6b3fb0f30cd03e5ac60805a922711bdcab77f9
    Date:   Wed Apr 25 18:21:46 2018 +0200
    
        Avoid comphelper::string::getTokenCount()
    
    Change-Id: I5bbfa38d8cceb56fe03282c89039ab30cf108204
    Reviewed-on: https://gerrit.libreoffice.org/54422
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/cui/source/options/optjava.cxx b/cui/source/options/optjava.cxx
index 23a5a9f5f299..3f8c0cb794da 100644
--- a/cui/source/options/optjava.cxx
+++ b/cui/source/options/optjava.cxx
@@ -1001,15 +1001,18 @@ void SvxJavaClassPathDlg::SetClassPath( const OUString& _rPath )
     if ( m_sOldPath.isEmpty() )
         m_sOldPath = _rPath;
     m_xPathList->clear();
-    sal_Int32 nIdx = 0;
-    do
+    if (!_rPath.isEmpty())
     {
-        OUString sToken = _rPath.getToken( 0, CLASSPATH_DELIMITER, nIdx );
-        INetURLObject aURL( sToken, FSysStyle::Detect );
-        OUString sPath = aURL.getFSysPath( FSysStyle::Detect );
-        m_xPathList->append("", sPath, SvFileInformationManager::GetImageId(aURL));
+        sal_Int32 nIdx = 0;
+        do
+        {
+            OUString sToken = _rPath.getToken( 0, CLASSPATH_DELIMITER, nIdx );
+            INetURLObject aURL( sToken, FSysStyle::Detect );
+            OUString sPath = aURL.getFSysPath( FSysStyle::Detect );
+            m_xPathList->append("", sPath, SvFileInformationManager::GetImageId(aURL));
+        }
+        while (nIdx>=0);
     }
-    while (nIdx>=0);
     // select first entry
     m_xPathList->select(0);
     SelectHdl_Impl(*m_xPathList);


More information about the Libreoffice-commits mailing list