diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2017-04-11 21:38:46 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2017-04-12 09:36:20 +0200 |
commit | 346b5cfd9078826f8705e226ad317b2e4c58162d (patch) | |
tree | 150f002d8c5c7b27bd0e5ab4157818e22da0507f /jvmfwk | |
parent | e2ba48e50d30a4cbcf7a9b0208baaa395114f6e8 (diff) |
Convert some rtl_uString -> OUString in jvmfwk
Change-Id: I08de5cab29dabc6fd824d5df8bac12c8520a05ae
Diffstat (limited to 'jvmfwk')
-rw-r--r-- | jvmfwk/inc/elements.hxx | 2 | ||||
-rw-r--r-- | jvmfwk/source/elements.cxx | 8 | ||||
-rw-r--r-- | jvmfwk/source/framework.cxx | 22 |
3 files changed, 12 insertions, 20 deletions
diff --git a/jvmfwk/inc/elements.hxx b/jvmfwk/inc/elements.hxx index edf44ccc0f64..a2c17bfcaeb0 100644 --- a/jvmfwk/inc/elements.hxx +++ b/jvmfwk/inc/elements.hxx @@ -210,7 +210,7 @@ public: /** adds a location to the already existing locations. Note: call load() before, then add the location and then call write(). */ - void addJRELocation(rtl_uString * sLocation); + void addJRELocation(OUString const & sLocation); /** writes the data to user settings. */ diff --git a/jvmfwk/source/elements.cxx b/jvmfwk/source/elements.cxx index 64258699713e..70c38e852eaf 100644 --- a/jvmfwk/source/elements.cxx +++ b/jvmfwk/source/elements.cxx @@ -645,18 +645,16 @@ void NodeJava::setVmParameters(rtl_uString * * arOptions, sal_Int32 size) } } -void NodeJava::addJRELocation(rtl_uString * sLocation) +void NodeJava::addJRELocation(OUString const & sLocation) { - assert( sLocation); if (!m_JRELocations) m_JRELocations = boost::optional<std::vector<OUString> >( std::vector<OUString> ()); //only add the path if not already present std::vector<OUString>::const_iterator it = - std::find(m_JRELocations->begin(), m_JRELocations->end(), - OUString(sLocation)); + std::find(m_JRELocations->begin(), m_JRELocations->end(), sLocation); if (it == m_JRELocations->end()) - m_JRELocations->push_back(OUString(sLocation)); + m_JRELocations->push_back(sLocation); } jfw::FileStatus NodeJava::checkSettingsFileStatus(OUString const & sURL) diff --git a/jvmfwk/source/framework.cxx b/jvmfwk/source/framework.cxx index 9c3a35c56aca..5ae4c8773f71 100644 --- a/jvmfwk/source/framework.cxx +++ b/jvmfwk/source/framework.cxx @@ -641,9 +641,8 @@ javaFrameworkError jfw_getSelectedJRE(std::unique_ptr<JavaInfo> *ppInfo) if (jfw::getMode() == jfw::JFW_MODE_DIRECT) { - OUString sJRE = jfw::BootParams::getJREHome(); - - if ((errcode = jfw_getJavaInfoByPath(sJRE.pData, ppInfo)) + if ((errcode = jfw_getJavaInfoByPath( + jfw::BootParams::getJREHome(), ppInfo)) != JFW_E_NONE) throw jfw::FrameworkException( JFW_E_CONFIGURATION, @@ -688,17 +687,14 @@ bool jfw_isVMRunning() return g_pJavaVM != nullptr; } -javaFrameworkError jfw_getJavaInfoByPath(rtl_uString *pPath, std::unique_ptr<JavaInfo> *ppInfo) +javaFrameworkError jfw_getJavaInfoByPath(OUString const & pPath, std::unique_ptr<JavaInfo> *ppInfo) { - assert(pPath != nullptr); assert(ppInfo != nullptr); javaFrameworkError errcode = JFW_E_NONE; try { osl::MutexGuard guard(jfw::FwkMutex::get()); - OUString ouPath(pPath); - jfw::VendorSettings aVendorSettings; std::vector<OUString> vecVendors = aVendorSettings.getSupportedVendors(); @@ -717,7 +713,7 @@ javaFrameworkError jfw_getJavaInfoByPath(rtl_uString *pPath, std::unique_ptr<Jav //Only if it does return a JavaInfo JavaInfo* pInfo = nullptr; javaPluginError plerr = jfw_plugin_getJavaInfoByPath( - ouPath, + pPath, vendor, versionInfo.sMinVersion, versionInfo.sMaxVersion, @@ -888,9 +884,8 @@ javaFrameworkError jfw_getVMParameters( return errcode; } -javaFrameworkError jfw_setUserClassPath(rtl_uString * pCp) +javaFrameworkError jfw_setUserClassPath(OUString const & pCp) { - assert(pCp != nullptr); javaFrameworkError errcode = JFW_E_NONE; try { @@ -910,7 +905,7 @@ javaFrameworkError jfw_setUserClassPath(rtl_uString * pCp) return errcode; } -javaFrameworkError jfw_getUserClassPath(rtl_uString ** ppCP) +javaFrameworkError jfw_getUserClassPath(OUString * ppCP) { assert(ppCP != nullptr); javaFrameworkError errcode = JFW_E_NONE; @@ -920,8 +915,7 @@ javaFrameworkError jfw_getUserClassPath(rtl_uString ** ppCP) if (jfw::getMode() == jfw::JFW_MODE_DIRECT) return JFW_E_DIRECT_MODE; const jfw::MergedSettings settings; - *ppCP = settings.getUserClassPath().pData; - rtl_uString_acquire(*ppCP); + *ppCP = settings.getUserClassPath(); } catch (const jfw::FrameworkException& e) { @@ -932,7 +926,7 @@ javaFrameworkError jfw_getUserClassPath(rtl_uString ** ppCP) return errcode; } -javaFrameworkError jfw_addJRELocation(rtl_uString * sLocation) +javaFrameworkError jfw_addJRELocation(OUString const & sLocation) { javaFrameworkError errcode = JFW_E_NONE; try |