summaryrefslogtreecommitdiff
path: root/cui
diff options
context:
space:
mode:
authorSamuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>2023-06-05 10:21:44 +0200
committerSamuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>2023-06-08 09:18:42 +0200
commit452856addb26a24846505061b08e2dd64a9c5b5f (patch)
treeca46f93af4635c44596895994dd90ff8d22e3a5f /cui
parent40725c05ae1eee580a9b974363fd8921c65b5d17 (diff)
Revert "Allow bootstrap variables in Java user classpath settings"
This breaks existing paths which contain "\" or "$". This reverts commit cfc2376f804f13eb562f39182cb24fe7dc61d6ef. Change-Id: Ia58df0a4f061f45140575e89231bd18d044a9bc1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152604 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>
Diffstat (limited to 'cui')
-rw-r--r--cui/source/options/optjava.cxx21
1 files changed, 2 insertions, 19 deletions
diff --git a/cui/source/options/optjava.cxx b/cui/source/options/optjava.cxx
index 631d085c3bfb..c1528138f326 100644
--- a/cui/source/options/optjava.cxx
+++ b/cui/source/options/optjava.cxx
@@ -944,30 +944,13 @@ void SvxJavaClassPathDlg::SetClassPath( const OUString& _rPath )
sal_Int32 nIdx = 0;
do
{
- sal_Int32 nextColon = _rPath.indexOf(CLASSPATH_DELIMITER, nIdx);
- OUString sToken(
- _rPath.subView(nIdx, nextColon > 0 ? nextColon - nIdx : _rPath.getLength() - nIdx));
-
- // Detect open bootstrap variables - they might contain colons - we need to skip those.
- sal_Int32 nBootstrapVarStart = sToken.indexOf("${");
- if (nBootstrapVarStart >= 0)
- {
- sal_Int32 nBootstrapVarEnd = sToken.indexOf("}");
- if (nBootstrapVarEnd == -1)
- {
- // Current colon is part of bootstrap variable - skip it!
- nextColon = _rPath.indexOf(CLASSPATH_DELIMITER, nextColon + 1);
- sToken = _rPath.subView(nIdx, nextColon > 0 ? nextColon - nIdx
- : _rPath.getLength() - nIdx);
- }
- }
+ OUString sToken = _rPath.getToken( 0, CLASSPATH_DELIMITER, nIdx );
OUString sURL;
osl::FileBase::getFileURLFromSystemPath(sToken, sURL); // best effort
INetURLObject aURL( sURL );
m_xPathList->append("", sToken, SvFileInformationManager::GetImageId(aURL));
- nIdx = nextColon + 1;
}
- while (nIdx > 0);
+ while (nIdx>=0);
// select first entry
m_xPathList->select(0);
}