summaryrefslogtreecommitdiff
path: root/jvmfwk
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2021-10-05 20:42:00 +0200
committerJulien Nabet <serval2412@yahoo.fr>2021-10-05 22:22:55 +0200
commit3068ab9a2c9307cbea2efa2b6924ce427bb54466 (patch)
tree0ac8aab930ab06eae12247e629272257fa1cbcf7 /jvmfwk
parentb35b1dca3a734739a9780c17331b8368d7df7657 (diff)
drop 'using namespace std' in h* i* j*
Change-Id: I3c28651779f17e1a410505ffaa863b4773037ccf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123119 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Diffstat (limited to 'jvmfwk')
-rw-r--r--jvmfwk/plugins/sunmajor/pluginlib/gnujre.cxx7
-rw-r--r--jvmfwk/plugins/sunmajor/pluginlib/otherjre.cxx2
-rw-r--r--jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx9
-rw-r--r--jvmfwk/plugins/sunmajor/pluginlib/sunjre.cxx2
-rw-r--r--jvmfwk/plugins/sunmajor/pluginlib/util.cxx35
-rw-r--r--jvmfwk/plugins/sunmajor/pluginlib/vendorbase.cxx7
6 files changed, 27 insertions, 35 deletions
diff --git a/jvmfwk/plugins/sunmajor/pluginlib/gnujre.cxx b/jvmfwk/plugins/sunmajor/pluginlib/gnujre.cxx
index 0e3682e9d99d..99e07bda8c41 100644
--- a/jvmfwk/plugins/sunmajor/pluginlib/gnujre.cxx
+++ b/jvmfwk/plugins/sunmajor/pluginlib/gnujre.cxx
@@ -22,7 +22,6 @@
#include "gnujre.hxx"
#include "util.hxx"
-using namespace std;
using namespace osl;
using ::rtl::Reference;
@@ -90,7 +89,7 @@ char const* const* GnuInfo::getLibraryPaths(int* /*size*/)
return nullptr;
}
-bool GnuInfo::initialize(vector<pair<OUString, OUString> > props)
+bool GnuInfo::initialize(std::vector<std::pair<OUString, OUString> > props)
{
//get java.vendor, java.version, java.home
//from system properties
@@ -163,7 +162,7 @@ bool GnuInfo::initialize(vector<pair<OUString, OUString> > props)
int size = 0;
char const* const* arRtPaths = getRuntimePaths( & size);
- vector<OUString> libpaths = getVectorFromCharArray(arRtPaths, size);
+ std::vector<OUString> libpaths = getVectorFromCharArray(arRtPaths, size);
bool bRt = false;
for (auto const& libpath : libpaths)
@@ -245,7 +244,7 @@ bool GnuInfo::initialize(vector<pair<OUString, OUString> > props)
OSL_ASSERT(!m_sHome.isEmpty());
size = 0;
char const * const * arLDPaths = getLibraryPaths( & size);
- vector<OUString> ld_paths = getVectorFromCharArray(arLDPaths, size);
+ std::vector<OUString> ld_paths = getVectorFromCharArray(arLDPaths, size);
bool bLdPath = true;
int c = 0;
diff --git a/jvmfwk/plugins/sunmajor/pluginlib/otherjre.cxx b/jvmfwk/plugins/sunmajor/pluginlib/otherjre.cxx
index fd2468edf65e..5c7f3ba9afc8 100644
--- a/jvmfwk/plugins/sunmajor/pluginlib/otherjre.cxx
+++ b/jvmfwk/plugins/sunmajor/pluginlib/otherjre.cxx
@@ -20,8 +20,6 @@
#include "otherjre.hxx"
-using namespace std;
-
using ::rtl::Reference;
namespace jfw_plugin
{
diff --git a/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx b/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx
index 5df7ef298795..d3b9b92a5b5e 100644
--- a/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx
+++ b/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx
@@ -95,7 +95,6 @@
#endif
using namespace osl;
-using namespace std;
using namespace jfw_plugin;
@@ -343,9 +342,9 @@ javaPluginError jfw_plugin_getAllJavaInfos(
assert(parJavaInfo);
//Find all JREs
- vector<rtl::Reference<VendorBase> > vecInfos =
+ std::vector<rtl::Reference<VendorBase> > vecInfos =
addAllJREInfos(checkJavaHomeAndPath, infos);
- vector<rtl::Reference<VendorBase> > vecVerifiedInfos;
+ std::vector<rtl::Reference<VendorBase> > vecVerifiedInfos;
for (auto const& vecInfo : vecInfos)
{
@@ -438,10 +437,10 @@ javaPluginError jfw_plugin_getJavaInfosFromPath(
std::vector<rtl::Reference<jfw_plugin::VendorBase>> & infos)
{
// find JREs from PATH
- vector<rtl::Reference<VendorBase>> vecInfosFromPath;
+ std::vector<rtl::Reference<VendorBase>> vecInfosFromPath;
addJavaInfosFromPath(infos, vecInfosFromPath);
- vector<std::unique_ptr<JavaInfo>> vecVerifiedInfos;
+ std::vector<std::unique_ptr<JavaInfo>> vecVerifiedInfos;
// copy infos of JREs that meet version requirements to vecVerifiedInfos
for (auto const& infosFromPath : vecInfosFromPath)
diff --git a/jvmfwk/plugins/sunmajor/pluginlib/sunjre.cxx b/jvmfwk/plugins/sunmajor/pluginlib/sunjre.cxx
index 4f1e95fb4580..a0f8cbee1f3e 100644
--- a/jvmfwk/plugins/sunmajor/pluginlib/sunjre.cxx
+++ b/jvmfwk/plugins/sunmajor/pluginlib/sunjre.cxx
@@ -22,8 +22,6 @@
#include "sunversion.hxx"
#include "diagnostics.h"
-using namespace std;
-
namespace jfw_plugin
{
diff --git a/jvmfwk/plugins/sunmajor/pluginlib/util.cxx b/jvmfwk/plugins/sunmajor/pluginlib/util.cxx
index bc66d68de052..743db3a9ce13 100644
--- a/jvmfwk/plugins/sunmajor/pluginlib/util.cxx
+++ b/jvmfwk/plugins/sunmajor/pluginlib/util.cxx
@@ -51,7 +51,6 @@
#endif
using namespace osl;
-using namespace std;
using ::rtl::Reference;
@@ -110,8 +109,8 @@ char const *g_arSearchPaths[] = {
namespace jfw_plugin
{
#if defined(_WIN32)
-static bool getSDKInfoFromRegistry(vector<OUString> & vecHome);
-static bool getJREInfoFromRegistry(vector<OUString>& vecJavaHome);
+static bool getSDKInfoFromRegistry(std::vector<OUString> & vecHome);
+static bool getJREInfoFromRegistry(std::vector<OUString>& vecJavaHome);
#endif
static bool decodeOutput(const OString& s, OUString* out);
@@ -511,7 +510,7 @@ bool decodeOutput(const OString& s, OUString* out)
#if defined(_WIN32)
static bool getJavaInfoFromRegistry(const wchar_t* szRegKey,
- vector<OUString>& vecJavaHome)
+ std::vector<OUString>& vecJavaHome)
{
HKEY hRoot;
if (RegOpenKeyExW(HKEY_LOCAL_MACHINE, szRegKey, 0, KEY_ENUMERATE_SUB_KEYS, &hRoot)
@@ -582,12 +581,12 @@ static bool getJavaInfoFromRegistry(const wchar_t* szRegKey,
}
-bool getSDKInfoFromRegistry(vector<OUString> & vecHome)
+bool getSDKInfoFromRegistry(std::vector<OUString> & vecHome)
{
return getJavaInfoFromRegistry(HKEY_SUN_SDK, vecHome);
}
-bool getJREInfoFromRegistry(vector<OUString>& vecJavaHome)
+bool getJREInfoFromRegistry(std::vector<OUString>& vecJavaHome)
{
return getJavaInfoFromRegistry(HKEY_SUN_JRE, vecJavaHome);
}
@@ -633,7 +632,7 @@ static void addJavaInfoFromWinReg(
#endif // _WIN32
-void bubbleSortVersion(vector<rtl::Reference<VendorBase> >& vec)
+void bubbleSortVersion(std::vector<rtl::Reference<VendorBase> >& vec)
{
if(vec.empty())
return;
@@ -684,7 +683,7 @@ void bubbleSortVersion(vector<rtl::Reference<VendorBase> >& vec)
void addJREInfoFromBinPath(
- const OUString& path, vector<rtl::Reference<VendorBase>> & allInfos,
+ const OUString& path, std::vector<rtl::Reference<VendorBase>> & allInfos,
std::vector<rtl::Reference<VendorBase>> & addedInfos)
{
// file:///c:/jre/bin
@@ -693,7 +692,7 @@ void addJREInfoFromBinPath(
for ( sal_Int32 pos = 0;
gVendorMap[pos].sVendorName != nullptr; ++pos )
{
- vector<OUString> vecPaths;
+ std::vector<OUString> vecPaths;
getJavaExePaths_func pFunc = gVendorMap[pos].getJavaFunc;
int size = 0;
@@ -738,11 +737,11 @@ void addJREInfoFromBinPath(
}
}
-vector<Reference<VendorBase> > addAllJREInfos(
+std::vector<Reference<VendorBase> > addAllJREInfos(
bool checkJavaHomeAndPath,
std::vector<rtl::Reference<VendorBase>> & allInfos)
{
- vector<Reference<VendorBase> > addedInfos;
+ std::vector<Reference<VendorBase> > addedInfos;
#if defined(_WIN32)
// Get Javas from the registry
@@ -765,9 +764,9 @@ vector<Reference<VendorBase> > addAllJREInfos(
}
-vector<OUString> getVectorFromCharArray(char const * const * ar, int size)
+std::vector<OUString> getVectorFromCharArray(char const * const * ar, int size)
{
- vector<OUString> vec;
+ std::vector<OUString> vec;
for( int i = 0; i < size; i++)
{
OUString s(ar[i], strlen(ar[i]), RTL_TEXTENCODING_UTF8);
@@ -826,11 +825,11 @@ rtl::Reference<VendorBase> getJREInfoByPath(
const OUString& path)
{
rtl::Reference<VendorBase> ret;
- static vector<OUString> vecBadPaths;
+ static std::vector<OUString> vecBadPaths;
- static map<OUString, rtl::Reference<VendorBase> > mapJREs;
+ static std::map<OUString, rtl::Reference<VendorBase> > mapJREs;
OUString sFilePath;
- vector<pair<OUString, OUString> > props;
+ std::vector<std::pair<OUString, OUString> > props;
OUString sResolvedDir = resolveDirPath(path);
// If this path is invalid then there is no chance to find a JRE here
@@ -855,7 +854,7 @@ rtl::Reference<VendorBase> getJREInfoByPath(
for ( sal_Int32 pos = 0;
gVendorMap[pos].sVendorName != nullptr; ++pos )
{
- vector<OUString> vecPaths;
+ std::vector<OUString> vecPaths;
getJavaExePaths_func pFunc = gVendorMap[pos].getJavaFunc;
int size = 0;
@@ -1011,7 +1010,7 @@ rtl::Reference<VendorBase> getJREInfoByPath(
}
Reference<VendorBase> createInstance(createInstance_func pFunc,
- const vector<pair<OUString, OUString> >& properties)
+ const std::vector<std::pair<OUString, OUString> >& properties)
{
Reference<VendorBase> aBase = (*pFunc)();
diff --git a/jvmfwk/plugins/sunmajor/pluginlib/vendorbase.cxx b/jvmfwk/plugins/sunmajor/pluginlib/vendorbase.cxx
index 4bfc1fd90af0..e9c26778a461 100644
--- a/jvmfwk/plugins/sunmajor/pluginlib/vendorbase.cxx
+++ b/jvmfwk/plugins/sunmajor/pluginlib/vendorbase.cxx
@@ -23,7 +23,6 @@
#include <vendorbase.hxx>
#include "util.hxx"
-using namespace std;
using namespace osl;
@@ -36,7 +35,7 @@ VendorBase::VendorBase()
{
}
-bool VendorBase::initialize(vector<pair<OUString, OUString> > props)
+bool VendorBase::initialize(std::vector<std::pair<OUString, OUString> > props)
{
//get java.vendor, java.version, java.home
//from system properties
@@ -97,7 +96,7 @@ bool VendorBase::initialize(vector<pair<OUString, OUString> > props)
int size = 0;
char const* const* arRtPaths = getRuntimePaths( & size);
- vector<OUString> libpaths = getVectorFromCharArray(arRtPaths, size);
+ std::vector<OUString> libpaths = getVectorFromCharArray(arRtPaths, size);
bool bRt = false;
for (auto const& libpath : libpaths)
@@ -120,7 +119,7 @@ bool VendorBase::initialize(vector<pair<OUString, OUString> > props)
OSL_ASSERT(!m_sHome.isEmpty());
size = 0;
char const * const * arLDPaths = getLibraryPaths( & size);
- vector<OUString> ld_paths = getVectorFromCharArray(arLDPaths, size);
+ std::vector<OUString> ld_paths = getVectorFromCharArray(arLDPaths, size);
bool bLdPath = true;
int c = 0;