diff options
author | Luboš Luňák <l.lunak@suse.cz> | 2013-04-07 12:06:47 +0200 |
---|---|---|
committer | Luboš Luňák <l.lunak@suse.cz> | 2013-04-07 14:23:11 +0200 |
commit | 1946794ae09ba732022fe6a74ea45e304ab70b84 (patch) | |
tree | e32bd7ba61fa021ecc7f8c85959df8ca837d6e81 /jvmfwk | |
parent | 5b08c6e7a21dda94d5b755eea0b1ed1e9c199bec (diff) |
mass removal of rtl:: prefixes for O(U)String*
Modules sal, salhelper, cppu, cppuhelper, codemaker (selectively) and odk
have kept them, in order not to break external API (the automatic using declaration
is LO-internal).
Change-Id: I588fc9e0c45b914f824f91c0376980621d730f09
Diffstat (limited to 'jvmfwk')
27 files changed, 369 insertions, 397 deletions
diff --git a/jvmfwk/inc/jvmfwk/framework.h b/jvmfwk/inc/jvmfwk/framework.h index dbc10ac125b9..9c9bb06780e3 100644 --- a/jvmfwk/inc/jvmfwk/framework.h +++ b/jvmfwk/inc/jvmfwk/framework.h @@ -277,7 +277,7 @@ JVMFWK_DLLPUBLIC void SAL_CALL jfw_freeJavaInfo(JavaInfo *pInfo); in the second <code>JavaInfo</code> object. The equality of the <code>rtl_uString</code> members is determined by the respective comparison function (see - <code>rtl::OUString::equals</code>). + <code>OUString::equals</code>). Similiarly the equality of the <code>sal_Sequence</code> is also determined by a comparison function (see <code>rtl::ByteSequence::operator ==</code>). </p> diff --git a/jvmfwk/plugins/sunmajor/javaenvsetup/javaldx.cxx b/jvmfwk/plugins/sunmajor/javaenvsetup/javaldx.cxx index c94b8b41f498..718844dc6b25 100644 --- a/jvmfwk/plugins/sunmajor/javaenvsetup/javaldx.cxx +++ b/jvmfwk/plugins/sunmajor/javaenvsetup/javaldx.cxx @@ -28,12 +28,9 @@ #include "rtl/byteseq.hxx" #include "jvmfwk/framework.h" -using ::rtl::OUString; -using ::rtl::OUStringToOString; -using ::rtl::OString; static sal_Bool hasOption(char const * szOption, int argc, char** argv); -static rtl::OString getLD_LIBRARY_PATH(const rtl::ByteSequence & vendorData); +static OString getLD_LIBRARY_PATH(const rtl::ByteSequence & vendorData); static bool findAndSelect(JavaInfo**); #define HELP_TEXT \ @@ -98,7 +95,7 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv) } } - rtl::OUString aVendor( pInfo->sVendor ); + OUString aVendor( pInfo->sVendor ); // Only do something if the sunjavaplugin created this JavaInfo if ( aVendor != "Sun Microsystems Inc." && aVendor != "Oracle Corporation" && @@ -114,24 +111,24 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv) return 0; } - rtl::OString sPaths = getLD_LIBRARY_PATH(pInfo->arVendorData); + OString sPaths = getLD_LIBRARY_PATH(pInfo->arVendorData); fprintf(stdout, "%s\n", sPaths.getStr()); jfw_freeJavaInfo(pInfo); return 0; } -rtl::OString getLD_LIBRARY_PATH(const rtl::ByteSequence & vendorData) +OString getLD_LIBRARY_PATH(const rtl::ByteSequence & vendorData) { const sal_Unicode* chars = (sal_Unicode*) vendorData.getConstArray(); sal_Int32 len = vendorData.getLength(); - rtl::OUString sData(chars, len / 2); + OUString sData(chars, len / 2); //the runtime lib is on the first line sal_Int32 index = 0; - rtl::OUString aToken = sData.getToken( 1, '\n', index); + OUString aToken = sData.getToken( 1, '\n', index); - rtl::OString paths = - rtl::OUStringToOString(aToken, osl_getThreadTextEncoding()); + OString paths = + OUStringToOString(aToken, osl_getThreadTextEncoding()); return paths; } diff --git a/jvmfwk/plugins/sunmajor/pluginlib/gnujre.cxx b/jvmfwk/plugins/sunmajor/pluginlib/gnujre.cxx index f58a66d3b4ea..25667848c54f 100644 --- a/jvmfwk/plugins/sunmajor/pluginlib/gnujre.cxx +++ b/jvmfwk/plugins/sunmajor/pluginlib/gnujre.cxx @@ -25,7 +25,6 @@ using namespace std; using namespace osl; -using ::rtl::OUString; using ::rtl::Reference; namespace jfw_plugin @@ -162,7 +161,7 @@ bool GnuInfo::initialize(vector<pair<OUString, OUString> > props) return false; if (m_sJavaHome.isEmpty()) - m_sJavaHome = rtl::OUString("file:///usr/lib"); + m_sJavaHome = OUString("file:///usr/lib"); // init m_sRuntimeLibrary OSL_ASSERT(!m_sHome.isEmpty()); @@ -227,9 +226,9 @@ bool GnuInfo::initialize(vector<pair<OUString, OUString> > props) #ifdef X86_64 //Make one last final legacy attempt on x86_64 in case the distro placed it in lib64 instead - if (!bRt && m_sJavaHome != rtl::OUString("file:///usr/lib")) + if (!bRt && m_sJavaHome != OUString("file:///usr/lib")) { - m_sHome = rtl::OUString("file:///usr/lib64"); + m_sHome = OUString("file:///usr/lib64"); for(i_path ip = libpaths.begin(); ip != libpaths.end(); ++ip) { //Construct an absolute path to the possible runtime @@ -283,7 +282,7 @@ bool GnuInfo::initialize(vector<pair<OUString, OUString> > props) return true; } -int GnuInfo::compareVersions(const rtl::OUString&) const +int GnuInfo::compareVersions(const OUString&) const { return 0; } diff --git a/jvmfwk/plugins/sunmajor/pluginlib/gnujre.hxx b/jvmfwk/plugins/sunmajor/pluginlib/gnujre.hxx index 950021ed7f96..0b1aa6bf2a03 100644 --- a/jvmfwk/plugins/sunmajor/pluginlib/gnujre.hxx +++ b/jvmfwk/plugins/sunmajor/pluginlib/gnujre.hxx @@ -29,7 +29,7 @@ namespace jfw_plugin class GnuInfo: public VendorBase { private: - rtl::OUString m_sJavaHome; + OUString m_sJavaHome; public: static char const* const* getJavaExePaths(int * size); @@ -38,8 +38,8 @@ public: virtual char const* const* getRuntimePaths(int * size); virtual bool initialize( - std::vector<std::pair<rtl::OUString, rtl::OUString> > props); - virtual int compareVersions(const rtl::OUString& sSecond) const; + std::vector<std::pair<OUString, OUString> > props); + virtual int compareVersions(const OUString& sSecond) const; }; diff --git a/jvmfwk/plugins/sunmajor/pluginlib/otherjre.cxx b/jvmfwk/plugins/sunmajor/pluginlib/otherjre.cxx index f3ee1e3c520a..07f9c0c05523 100644 --- a/jvmfwk/plugins/sunmajor/pluginlib/otherjre.cxx +++ b/jvmfwk/plugins/sunmajor/pluginlib/otherjre.cxx @@ -23,7 +23,6 @@ using namespace std; -using ::rtl::OUString; using ::rtl::Reference; namespace jfw_plugin { @@ -101,7 +100,7 @@ char const* const* OtherInfo::getLibraryPaths(int* size) #endif } -int OtherInfo::compareVersions(const rtl::OUString& /*sSecond*/) const +int OtherInfo::compareVersions(const OUString& /*sSecond*/) const { //Need to provide an own algorithm for comparing version. //Because this function returns always 0, which means the version of diff --git a/jvmfwk/plugins/sunmajor/pluginlib/otherjre.hxx b/jvmfwk/plugins/sunmajor/pluginlib/otherjre.hxx index 88ae1d935288..c2f33ee2dce7 100644 --- a/jvmfwk/plugins/sunmajor/pluginlib/otherjre.hxx +++ b/jvmfwk/plugins/sunmajor/pluginlib/otherjre.hxx @@ -37,7 +37,7 @@ public: using VendorBase::getLibraryPaths; virtual char const* const* getRuntimePaths(int * size); virtual char const* const* getLibraryPaths(int* size); - virtual int compareVersions(const rtl::OUString& sSecond) const; + virtual int compareVersions(const OUString& sSecond) const; }; diff --git a/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx b/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx index 27b704d079df..e5c888a697c6 100644 --- a/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx +++ b/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx @@ -71,9 +71,6 @@ using namespace osl; using namespace std; using namespace jfw_plugin; -using ::rtl::OUString; -using ::rtl::OUStringBuffer; -using ::rtl::OString; namespace { @@ -132,7 +129,7 @@ OString getPluginJarPath( } OSL_ASSERT(!sPath.isEmpty()); } - ret = rtl::OUStringToOString(sPath, osl_getThreadTextEncoding()); + ret = OUStringToOString(sPath, osl_getThreadTextEncoding()); return ret; } @@ -144,18 +141,18 @@ JavaInfo* createJavaInfo(const rtl::Reference<VendorBase> & info) JavaInfo* pInfo = (JavaInfo*) rtl_allocateMemory(sizeof(JavaInfo)); if (pInfo == NULL) return NULL; - rtl::OUString sVendor = info->getVendor(); + OUString sVendor = info->getVendor(); pInfo->sVendor = sVendor.pData; rtl_uString_acquire(sVendor.pData); - rtl::OUString sHome = info->getHome(); + OUString sHome = info->getHome(); pInfo->sLocation = sHome.pData; rtl_uString_acquire(pInfo->sLocation); - rtl::OUString sVersion = info->getVersion(); + OUString sVersion = info->getVersion(); pInfo->sVersion = sVersion.pData; rtl_uString_acquire(pInfo->sVersion); pInfo->nFeatures = info->supportsAccessibility() ? 1 : 0; pInfo->nRequirements = info->needsRestart() ? JFW_REQUIRE_NEEDRESTART : 0; - rtl::OUStringBuffer buf(1024); + OUStringBuffer buf(1024); buf.append(info->getRuntimeLibrary()); if (!info->getLibraryPaths().isEmpty()) { @@ -164,7 +161,7 @@ JavaInfo* createJavaInfo(const rtl::Reference<VendorBase> & info) buf.appendAscii("\n"); } - rtl::OUString sVendorData = buf.makeStringAndClear(); + OUString sVendorData = buf.makeStringAndClear(); rtl::ByteSequence byteSeq( (sal_Int8*) sVendorData.pData->buffer, sVendorData.getLength() * sizeof(sal_Unicode)); pInfo->arVendorData = byteSeq.get(); @@ -173,14 +170,14 @@ JavaInfo* createJavaInfo(const rtl::Reference<VendorBase> & info) return pInfo; } -rtl::OUString getRuntimeLib(const rtl::ByteSequence & data) +OUString getRuntimeLib(const rtl::ByteSequence & data) { const sal_Unicode* chars = (sal_Unicode*) data.getConstArray(); sal_Int32 len = data.getLength(); - rtl::OUString sData(chars, len / 2); + OUString sData(chars, len / 2); //the runtime lib is on the first line sal_Int32 index = 0; - rtl::OUString aToken = sData.getToken( 0, '\n', index); + OUString aToken = sData.getToken( 0, '\n', index); return aToken; } @@ -287,7 +284,7 @@ javaPluginError jfw_plugin_getAllJavaInfos( bool bExclude = false; for (int j = 0; j < nLenList; j++) { - rtl::OUString sExVer(arExcludeList[j]); + OUString sExVer(arExcludeList[j]); try { if (cur->compareVersions(sExVer) == 0) @@ -414,7 +411,7 @@ javaPluginError jfw_plugin_getJavaInfoByPath( for (int i = 0; i < nLenList; i++) { - rtl::OUString sExVer(arExcludeList[i]); + OUString sExVer(arExcludeList[i]); int nRes = 0; try { @@ -569,7 +566,7 @@ javaPluginError jfw_plugin_startJavaVirtualMachine( //Check if the Vendor (pInfo->sVendor) is supported by this plugin if ( ! isVendorSupported(pInfo->sVendor)) return JFW_PLUGIN_E_WRONG_VENDOR; - rtl::OUString sRuntimeLib = getRuntimeLib(pInfo->arVendorData); + OUString sRuntimeLib = getRuntimeLib(pInfo->arVendorData); JFW_TRACE2("[Java framework] Using Java runtime library: " + sRuntimeLib + ".\n"); @@ -599,26 +596,26 @@ javaPluginError jfw_plugin_startJavaVirtualMachine( #ifdef UNX //Setting the JAVA_HOME is needed for awt - rtl::OUString javaHome("JAVA_HOME="); - rtl::OUString sPathLocation; + OUString javaHome("JAVA_HOME="); + OUString sPathLocation; osl_getSystemPathFromFileURL(pInfo->sLocation, & sPathLocation.pData); javaHome += sPathLocation; - rtl::OString osJavaHome = rtl::OUStringToOString( + OString osJavaHome = OUStringToOString( javaHome, osl_getThreadTextEncoding()); putenv(strdup(osJavaHome.getStr())); #endif typedef jint JNICALL JNI_CreateVM_Type(JavaVM **, JNIEnv **, void *); - rtl::OUString sSymbolCreateJava("JNI_CreateJavaVM"); + OUString sSymbolCreateJava("JNI_CreateJavaVM"); JNI_CreateVM_Type * pCreateJavaVM = (JNI_CreateVM_Type *) osl_getFunctionSymbol( moduleRt, sSymbolCreateJava.pData); if (!pCreateJavaVM) { OSL_ASSERT(0); - rtl::OString sLib = rtl::OUStringToOString( + OString sLib = OUStringToOString( sRuntimeLib, osl_getThreadTextEncoding()); - rtl::OString sSymbol = rtl::OUStringToOString( + OString sSymbol = OUStringToOString( sSymbolCreateJava, osl_getThreadTextEncoding()); fprintf(stderr,"[Java framework]sunjavaplugin" SAL_DLLEXTENSION "Java runtime library: %s does not export symbol %s !\n", @@ -647,20 +644,20 @@ javaPluginError jfw_plugin_startJavaVirtualMachine( options[n].optionString= (char *) "abort"; options[n].extraInfo= (void* )(sal_IntPtr)abort_handler; ++n; - rtl::OString sClassPathProp("-Djava.class.path="); - rtl::OString sClassPathOption; + OString sClassPathProp("-Djava.class.path="); + OString sClassPathOption; for (int i = 0; i < cOptions; i++) { #ifdef UNX // Until java 1.5 we need to put a plugin.jar or javaplugin.jar (<1.4.2) // in the class path in order to have applet support. - rtl::OString sClassPath = arOptions[i].optionString; + OString sClassPath = arOptions[i].optionString; if (sClassPath.match(sClassPathProp, 0) == sal_True) { char sep[] = {SAL_PATHSEPARATOR, 0}; OString sAddPath = getPluginJarPath(pInfo->sVendor, pInfo->sLocation,pInfo->sVersion); if (!sAddPath.isEmpty()) - sClassPathOption = sClassPath + rtl::OString(sep) + sAddPath; + sClassPathOption = sClassPath + OString(sep) + sAddPath; else sClassPathOption = sClassPath; options[n].optionString = (char *) sClassPathOption.getStr(); @@ -756,7 +753,7 @@ javaPluginError jfw_plugin_existJRE(const JavaInfo *pInfo, sal_Bool *exist) javaPluginError ret = JFW_PLUGIN_E_NONE; if (!pInfo || !exist) return JFW_PLUGIN_E_INVALID_ARG; - ::rtl::OUString sLocation(pInfo->sLocation); + OUString sLocation(pInfo->sLocation); if (sLocation.isEmpty()) return JFW_PLUGIN_E_INVALID_ARG; @@ -780,7 +777,7 @@ javaPluginError jfw_plugin_existJRE(const JavaInfo *pInfo, sal_Bool *exist) //true although the runtime library may not be loadable. if (ret == JFW_PLUGIN_E_NONE && *exist == sal_True) { - rtl::OUString sRuntimeLib = getRuntimeLib(pInfo->arVendorData); + OUString sRuntimeLib = getRuntimeLib(pInfo->arVendorData); JFW_TRACE2("[Java framework] Checking existence of Java runtime library.\n"); ::osl::DirectoryItem itemRt; diff --git a/jvmfwk/plugins/sunmajor/pluginlib/sunjre.cxx b/jvmfwk/plugins/sunmajor/pluginlib/sunjre.cxx index d45555d7c92b..fb77e2a6703d 100644 --- a/jvmfwk/plugins/sunmajor/pluginlib/sunjre.cxx +++ b/jvmfwk/plugins/sunmajor/pluginlib/sunjre.cxx @@ -86,9 +86,9 @@ char const* const* SunInfo::getLibraryPaths(int* size) #endif } -int SunInfo::compareVersions(const rtl::OUString& sSecond) const +int SunInfo::compareVersions(const OUString& sSecond) const { - rtl::OUString sFirst = getVersion(); + OUString sFirst = getVersion(); SunVersion version1(sFirst); JFW_ENSURE(version1, "[Java framework] sunjavaplugin" SAL_DLLEXTENSION diff --git a/jvmfwk/plugins/sunmajor/pluginlib/sunjre.hxx b/jvmfwk/plugins/sunmajor/pluginlib/sunjre.hxx index 21ce38946972..9fd310e23542 100644 --- a/jvmfwk/plugins/sunmajor/pluginlib/sunjre.hxx +++ b/jvmfwk/plugins/sunmajor/pluginlib/sunjre.hxx @@ -37,7 +37,7 @@ public: virtual char const* const* getRuntimePaths(int * size); virtual char const* const* getLibraryPaths(int* size); - virtual int compareVersions(const rtl::OUString& sSecond) const; + virtual int compareVersions(const OUString& sSecond) const; }; } diff --git a/jvmfwk/plugins/sunmajor/pluginlib/sunversion.cxx b/jvmfwk/plugins/sunmajor/pluginlib/sunversion.cxx index 4eaff7ba6fff..aced75f63bec 100644 --- a/jvmfwk/plugins/sunmajor/pluginlib/sunversion.cxx +++ b/jvmfwk/plugins/sunmajor/pluginlib/sunversion.cxx @@ -27,9 +27,6 @@ #include "diagnostics.h" using namespace osl; -using ::rtl::OUString; -using ::rtl::OUStringToOString; -using ::rtl::OString; namespace jfw_plugin { //stoc_javadetect @@ -41,12 +38,12 @@ public: } test; #endif -SunVersion::SunVersion(const rtl::OUString &usVer): +SunVersion::SunVersion(const OUString &usVer): m_nUpdateSpecial(0), m_preRelease(Rel_NONE), usVersion(usVer) { memset(m_arVersionParts, 0, sizeof(m_arVersionParts)); - rtl::OString sVersion= rtl::OUStringToOString(usVer, osl_getThreadTextEncoding()); + OString sVersion= OUStringToOString(usVer, osl_getThreadTextEncoding()); m_bValid = init(sVersion.getStr()); } SunVersion::SunVersion(const char * szVer): @@ -54,7 +51,7 @@ SunVersion::SunVersion(const char * szVer): { memset(m_arVersionParts, 0, sizeof(m_arVersionParts)); m_bValid = init(szVer); - usVersion= rtl::OUString(szVer,strlen(szVer),osl_getThreadTextEncoding()); + usVersion= OUString(szVer,strlen(szVer),osl_getThreadTextEncoding()); } diff --git a/jvmfwk/plugins/sunmajor/pluginlib/sunversion.hxx b/jvmfwk/plugins/sunmajor/pluginlib/sunversion.hxx index e67d8e5f39cd..b60959c67105 100644 --- a/jvmfwk/plugins/sunmajor/pluginlib/sunversion.hxx +++ b/jvmfwk/plugins/sunmajor/pluginlib/sunversion.hxx @@ -82,7 +82,7 @@ protected: PreRelease m_preRelease; public: SunVersion(const char * szVer); - SunVersion(const rtl::OUString& usVer); + SunVersion(const OUString& usVer); ~SunVersion(); /** @@ -100,7 +100,7 @@ public: /** Will always contain a value if the object has been constructed with a version string. */ - rtl::OUString usVersion; + OUString usVersion; protected: bool init(const char * szVer); diff --git a/jvmfwk/plugins/sunmajor/pluginlib/util.cxx b/jvmfwk/plugins/sunmajor/pluginlib/util.cxx index e4e5b0945ddd..fea25b05e078 100644 --- a/jvmfwk/plugins/sunmajor/pluginlib/util.cxx +++ b/jvmfwk/plugins/sunmajor/pluginlib/util.cxx @@ -53,11 +53,7 @@ using namespace osl; using namespace std; -using ::rtl::OUString; using ::rtl::Reference; -using ::rtl::OString; -using ::rtl::OUStringBuffer; -using ::rtl::OUStringToOString; #ifdef WNT #define HKEY_SUN_JRE L"Software\\JavaSoft\\Java Runtime Environment" @@ -125,15 +121,15 @@ extern VendorSupportMapEntry gVendorMap[]; bool getSDKInfoFromRegistry(vector<OUString> & vecHome); bool getJREInfoFromRegistry(vector<OUString>& vecJavaHome); -bool decodeOutput(const rtl::OString& s, rtl::OUString* out); +bool decodeOutput(const OString& s, OUString* out); namespace { - rtl::OUString getLibraryLocation() + OUString getLibraryLocation() { - rtl::OUString libraryFileUrl; + OUString libraryFileUrl; OSL_VERIFY(osl::Module::getUrlFromAddress((void *)(sal_IntPtr)getLibraryLocation, libraryFileUrl)); return getDirFromFile(libraryFileUrl); } @@ -153,7 +149,7 @@ namespace OUString const & operator()() { static OUString sIni; - rtl::OUStringBuffer buf( 255); + OUStringBuffer buf( 255); buf.append( getLibraryLocation()); buf.appendAscii( SAL_CONFIGFILE("/sunjavaplugin") ); sIni = buf.makeStringAndClear(); @@ -217,7 +213,7 @@ public: inline FileHandleReader(oslFileHandle & rHandle) SAL_THROW(()): m_aGuard(rHandle), m_nSize(0), m_nIndex(0), m_bLf(false) {} - Result readLine(rtl::OString * pLine) SAL_THROW(()); + Result readLine(OString * pLine) SAL_THROW(()); private: enum { BUFFER_SIZE = 1024 }; @@ -230,7 +226,7 @@ private: }; FileHandleReader::Result -FileHandleReader::readLine(rtl::OString * pLine) +FileHandleReader::readLine(OString * pLine) SAL_THROW(()) { OSL_ENSURE(pLine, "specification violation"); @@ -273,13 +269,13 @@ FileHandleReader::readLine(rtl::OString * pLine) case 0x0D: m_bLf = true; case 0x0A: - *pLine += rtl::OString(m_aBuffer + nStart, + *pLine += OString(m_aBuffer + nStart, m_nIndex - 1 - nStart); //TODO! check for overflow, and not very efficient return RESULT_OK; } - *pLine += rtl::OString(m_aBuffer + nStart, m_nIndex - nStart); + *pLine += OString(m_aBuffer + nStart, m_nIndex - nStart); //TODO! check for overflow, and not very efficient } } @@ -365,7 +361,7 @@ bool getJavaProps(const OUString & exePath, #ifdef JVM_ONE_PATH_CHECK const OUString & homePath, #endif - std::vector<std::pair<rtl::OUString, rtl::OUString> >& props, + std::vector<std::pair<OUString, OUString> >& props, bool * bProcessRun) { bool ret = false; @@ -375,7 +371,7 @@ bool getJavaProps(const OUString & exePath, //We need to set the CLASSPATH in case the office is started from //a different directory. The JREProperties.class is expected to reside //next to the plugin. - rtl::OUString sThisLib; + OUString sThisLib; if (osl_getModuleURLFromAddress((void *) (sal_IntPtr)& getJavaProps, & sThisLib.pData) == sal_False) return false; @@ -496,7 +492,7 @@ bool getJavaProps(const OUString & exePath, readable strings. The strings are encoded as integer values separated by spaces. */ -bool decodeOutput(const rtl::OString& s, rtl::OUString* out) +bool decodeOutput(const OString& s, OUString* out) { OSL_ASSERT(out != 0); OUStringBuffer buff(512); @@ -687,7 +683,7 @@ void bubbleSortVersion(vector<rtl::Reference<VendorBase> >& vec) bool getJREInfoFromBinPath( - const rtl::OUString& path, vector<rtl::Reference<VendorBase> > & vecInfos) + const OUString& path, vector<rtl::Reference<VendorBase> > & vecInfos) { // file:///c:/jre/bin //map: jre/bin/java.exe @@ -781,7 +777,7 @@ vector<OUString> getVectorFromCharArray(char const * const * ar, int size) } return vec; } -bool getJREInfoByPath(const rtl::OUString& path, +bool getJREInfoByPath(const OUString& path, std::vector<rtl::Reference<VendorBase> > & vecInfos) { bool ret = false; diff --git a/jvmfwk/plugins/sunmajor/pluginlib/util.hxx b/jvmfwk/plugins/sunmajor/pluginlib/util.hxx index cab102757f64..33ff7e35b530 100644 --- a/jvmfwk/plugins/sunmajor/pluginlib/util.hxx +++ b/jvmfwk/plugins/sunmajor/pluginlib/util.hxx @@ -28,7 +28,7 @@ namespace jfw_plugin { class VendorBase; -std::vector<rtl::OUString> getVectorFromCharArray(char const * const * ar, int size); +std::vector<OUString> getVectorFromCharArray(char const * const * ar, int size); /* The function uses the relative paths, such as "bin/java.exe" and the provided path to derive the home directory. The home directory is then used as @@ -36,8 +36,8 @@ std::vector<rtl::OUString> getVectorFromCharArray(char const * const * ar, int s file:///c:/j2sdk/jre/bin then file:///c:/j2sdk/jre would be derived. */ bool getJREInfoFromBinPath( - const rtl::OUString& path, std::vector<rtl::Reference<VendorBase> > & vecInfos); -inline rtl::OUString getDirFromFile(const rtl::OUString& usFilePath); + const OUString& path, std::vector<rtl::Reference<VendorBase> > & vecInfos); +inline OUString getDirFromFile(const OUString& usFilePath); void createJavaInfoFromPath(std::vector<rtl::Reference<VendorBase> >& vecInfos); void createJavaInfoFromJavaHome(std::vector<rtl::Reference<VendorBase> > &vecInfos); void createJavaInfoDirScan(std::vector<rtl::Reference<VendorBase> >& vecInfos); @@ -45,7 +45,7 @@ void createJavaInfoDirScan(std::vector<rtl::Reference<VendorBase> >& vecInfos); void createJavaInfoFromWinReg(std::vector<rtl::Reference<VendorBase> >& vecInfos); #endif -bool makeDriveLetterSame(rtl::OUString * fileURL); +bool makeDriveLetterSame(OUString * fileURL); /* for std::find_if @@ -54,8 +54,8 @@ bool makeDriveLetterSame(rtl::OUString * fileURL); */ struct InfoFindSame { - rtl::OUString sJava; - InfoFindSame(const rtl::OUString& sJavaHome):sJava(sJavaHome){} + OUString sJava; + InfoFindSame(const OUString& sJavaHome):sJava(sJavaHome){} bool operator () (const rtl::Reference<VendorBase> & aVendorInfo) { @@ -65,16 +65,16 @@ struct InfoFindSame struct SameOrSubDirJREMap { - rtl::OUString s1; - SameOrSubDirJREMap(const rtl::OUString& s):s1(s){ + OUString s1; + SameOrSubDirJREMap(const OUString& s):s1(s){ } - bool operator () (const std::pair<const rtl::OUString, rtl::Reference<VendorBase> > & s2) + bool operator () (const std::pair<const OUString, rtl::Reference<VendorBase> > & s2) { if (s1 == s2.first) return true; - rtl::OUString sSub; - sSub = s2.first + rtl::OUString("/"); + OUString sSub; + sSub = s2.first + OUString("/"); if (s1.match(sSub) == sal_True) return true; return false; @@ -87,7 +87,7 @@ struct SameOrSubDirJREMap This depends if there is a JRE at all and if it is from a vendor that is supported by this plugin. */ -rtl::Reference<VendorBase> getJREInfoByPath(const rtl::OUString& path); +rtl::Reference<VendorBase> getJREInfoByPath(const OUString& path); /* Creates a VendorBase object if a JRE could be found at the specified path. @@ -102,17 +102,17 @@ rtl::Reference<VendorBase> getJREInfoByPath(const rtl::OUString& path); false - no VendorBase has been created. Either the path did not represent a supported JRE installation or there was already a VendorBase in vecInfos. */ -bool getJREInfoByPath(const rtl::OUString& path, +bool getJREInfoByPath(const OUString& path, std::vector<rtl::Reference<VendorBase> > & vecInfos); std::vector<rtl::Reference<VendorBase> > getAllJREInfos(); bool getJavaProps( - const rtl::OUString & exePath, + const OUString & exePath, #ifdef JVM_ONE_PATH_CHECK - const rtl::OUString & homePath, + const OUString & homePath, #endif - std::vector<std::pair<rtl::OUString, rtl::OUString> >& props, + std::vector<std::pair<OUString, OUString> >& props, bool * bProcessRun); void createJavaInfoFromWinReg(std::vector<rtl::Reference<VendorBase> > & vecInfos); diff --git a/jvmfwk/plugins/sunmajor/pluginlib/vendorbase.cxx b/jvmfwk/plugins/sunmajor/pluginlib/vendorbase.cxx index 67957ef6fbd2..6fa931d44eb7 100644 --- a/jvmfwk/plugins/sunmajor/pluginlib/vendorbase.cxx +++ b/jvmfwk/plugins/sunmajor/pluginlib/vendorbase.cxx @@ -27,7 +27,6 @@ using namespace std; using namespace osl; -using ::rtl::OUString; namespace jfw_plugin { @@ -238,7 +237,7 @@ bool VendorBase::needsRestart() const return false; } -int VendorBase::compareVersions(const rtl::OUString& /*sSecond*/) const +int VendorBase::compareVersions(const OUString& /*sSecond*/) const { OSL_FAIL("[Java framework] VendorBase::compareVersions must be " "overridden in derived class."); diff --git a/jvmfwk/plugins/sunmajor/pluginlib/vendorbase.hxx b/jvmfwk/plugins/sunmajor/pluginlib/vendorbase.hxx index f9f4a968cf3b..0d73dd67763d 100644 --- a/jvmfwk/plugins/sunmajor/pluginlib/vendorbase.hxx +++ b/jvmfwk/plugins/sunmajor/pluginlib/vendorbase.hxx @@ -121,7 +121,7 @@ public: it will be discarded by the caller. */ virtual bool initialize( - std::vector<std::pair<rtl::OUString, rtl::OUString> > props); + std::vector<std::pair<OUString, OUString> > props); /* returns relative file URLs to the runtime library. For example "/bin/client/jvm.dll" @@ -130,11 +130,11 @@ public: virtual char const* const* getLibraryPaths(int* size); - virtual const rtl::OUString & getVendor() const; - virtual const rtl::OUString & getVersion() const; - virtual const rtl::OUString & getHome() const; - virtual const rtl::OUString & getRuntimeLibrary() const; - virtual const rtl::OUString & getLibraryPaths() const; + virtual const OUString & getVendor() const; + virtual const OUString & getVersion() const; + virtual const OUString & getHome() const; + virtual const OUString & getRuntimeLibrary() const; + virtual const OUString & getLibraryPaths() const; virtual bool supportsAccessibility() const; /* determines if prior to running java something has to be done, like setting the LD_LIBRARY_PATH. This implementation checks @@ -156,22 +156,22 @@ public: @throw MalformedVersionException if the version string was not recognized. */ - virtual int compareVersions(const rtl::OUString& sSecond) const; + virtual int compareVersions(const OUString& sSecond) const; protected: - rtl::OUString m_sVendor; - rtl::OUString m_sVersion; - rtl::OUString m_sHome; - rtl::OUString m_sRuntimeLibrary; - rtl::OUString m_sLD_LIBRARY_PATH; + OUString m_sVendor; + OUString m_sVersion; + OUString m_sHome; + OUString m_sRuntimeLibrary; + OUString m_sLD_LIBRARY_PATH; bool m_bAccessibility; typedef rtl::Reference<VendorBase> (* createInstance_func) (); friend rtl::Reference<VendorBase> createInstance( createInstance_func pFunc, - std::vector<std::pair<rtl::OUString, rtl::OUString> > properties); + std::vector<std::pair<OUString, OUString> > properties); }; } diff --git a/jvmfwk/plugins/sunmajor/pluginlib/vendorlist.cxx b/jvmfwk/plugins/sunmajor/pluginlib/vendorlist.cxx index 02d82ce514d4..11ed82e7a668 100644 --- a/jvmfwk/plugins/sunmajor/pluginlib/vendorlist.cxx +++ b/jvmfwk/plugins/sunmajor/pluginlib/vendorlist.cxx @@ -27,10 +27,6 @@ using namespace com::sun::star::uno; -using ::rtl::OUString; -using ::rtl::OUStringToOString; -using ::rtl::OStringToOUString; -using ::rtl::OString; namespace jfw_plugin { @@ -64,7 +60,7 @@ Sequence<OUString> getVendorNames() return Sequence<OUString>(arNames, count); } -bool isVendorSupported(const rtl::OUString& sVendor) +bool isVendorSupported(const OUString& sVendor) { Sequence<OUString> seqNames = getVendorNames(); const OUString * arNames = seqNames.getConstArray(); diff --git a/jvmfwk/plugins/sunmajor/pluginlib/vendorlist.hxx b/jvmfwk/plugins/sunmajor/pluginlib/vendorlist.hxx index d91a9a1ec5cf..98b7b8a1bff8 100644 --- a/jvmfwk/plugins/sunmajor/pluginlib/vendorlist.hxx +++ b/jvmfwk/plugins/sunmajor/pluginlib/vendorlist.hxx @@ -46,13 +46,13 @@ VendorSupportMapEntry gVendorMap[] ={ {NULL, NULL, NULL} }; -com::sun::star::uno::Sequence<rtl::OUString> getVendorNames(); +com::sun::star::uno::Sequence<OUString> getVendorNames(); /* Examines if the vendor supplied in parameter sVendor is part of the list of supported vendors. That is the arry of VendorSupportMapEntry is search for an respective entry. */ -bool isVendorSupported(const rtl::OUString & sVendor); +bool isVendorSupported(const OUString & sVendor); } #endif diff --git a/jvmfwk/source/elements.cxx b/jvmfwk/source/elements.cxx index b49a8fb3f655..f9f481f5e0a2 100644 --- a/jvmfwk/source/elements.cxx +++ b/jvmfwk/source/elements.cxx @@ -38,7 +38,7 @@ using namespace osl; namespace jfw { -rtl::OString getElement(::rtl::OString const & docPath, +OString getElement(OString const & docPath, xmlChar const * pathExpression, bool bThrowIfEmpty) { //Prepare the xml document and context @@ -47,7 +47,7 @@ rtl::OString getElement(::rtl::OString const & docPath, if (doc == NULL) throw FrameworkException( JFW_E_ERROR, - rtl::OString("[Java framework] Error in function getElement " + OString("[Java framework] Error in function getElement " "(elements.cxx)")); jfw::CXPathContextPtr context(xmlXPathNewContext(doc)); @@ -55,18 +55,18 @@ rtl::OString getElement(::rtl::OString const & docPath, (xmlChar*) NS_JAVA_FRAMEWORK) == -1) throw FrameworkException( JFW_E_ERROR, - rtl::OString("[Java framework] Error in function getElement " + OString("[Java framework] Error in function getElement " "(elements.cxx)")); CXPathObjectPtr pathObj; pathObj = xmlXPathEvalExpression(pathExpression, context); - rtl::OString sValue; + OString sValue; if (xmlXPathNodeSetIsEmpty(pathObj->nodesetval)) { if (bThrowIfEmpty) throw FrameworkException( JFW_E_ERROR, - rtl::OString("[Java framework] Error in function getElement " + OString("[Java framework] Error in function getElement " "(elements.cxx)")); } else @@ -76,7 +76,7 @@ rtl::OString getElement(::rtl::OString const & docPath, return sValue; } -rtl::OString getElementUpdated() +OString getElementUpdated() { return getElement(jfw::getVendorSettingsPath(), (xmlChar*)"/jf:javaSelection/jf:updated/text()", true); @@ -84,7 +84,7 @@ rtl::OString getElementUpdated() void createSettingsStructure(xmlDoc * document, bool * bNeedsSave) { - rtl::OString sExcMsg("[Java framework] Error in function createSettingsStructure " + OString sExcMsg("[Java framework] Error in function createSettingsStructure " "(elements.cxx)."); xmlNode * root = xmlDocGetRootElement(document); if (root == NULL) @@ -174,7 +174,7 @@ VersionInfo::~VersionInfo() delete [] arVersions; } -void VersionInfo::addExcludeVersion(const rtl::OUString& sVersion) +void VersionInfo::addExcludeVersion(const OUString& sVersion) { vecExcludeVersions.push_back(sVersion); } @@ -187,7 +187,7 @@ rtl_uString** VersionInfo::getExcludeVersions() arVersions = new rtl_uString*[vecExcludeVersions.size()]; int j=0; - typedef std::vector<rtl::OUString>::const_iterator it; + typedef std::vector<OUString>::const_iterator it; for (it i = vecExcludeVersions.begin(); i != vecExcludeVersions.end(); ++i, ++j) { @@ -216,7 +216,7 @@ NodeJava::NodeJava(Layer layer): void NodeJava::load() { - const rtl::OString sExcMsg("[Java framework] Error in function NodeJava::load" + const OString sExcMsg("[Java framework] Error in function NodeJava::load" "(elements.cxx)."); if (SHARED == m_layer) { @@ -249,7 +249,7 @@ void NodeJava::load() //Read the user elements - rtl::OString sSettingsPath = getSettingsPath(); + OString sSettingsPath = getSettingsPath(); //There must not be a share settings file CXmlDocPtr docUser(xmlParseFile(sSettingsPath.getStr())); if (docUser == NULL) @@ -290,7 +290,7 @@ void NodeJava::load() { CXmlCharPtr sUser(xmlNodeListGetString( docUser, cur->children, 1)); - m_userClassPath = boost::optional<rtl::OUString>(rtl::OUString(sUser)); + m_userClassPath = boost::optional<OUString>(OUString(sUser)); } } else if (xmlStrcmp(cur->name, (xmlChar*) "javaInfo") == 0) @@ -316,8 +316,8 @@ void NodeJava::load() if (xmlStrcmp(sNil, (xmlChar*) "false") == 0) { if ( ! m_vmParameters) - m_vmParameters = boost::optional<std::vector<rtl::OUString> >( - std::vector<rtl::OUString> ()); + m_vmParameters = boost::optional<std::vector<OUString> >( + std::vector<OUString> ()); xmlNode * pOpt = cur->children; while (pOpt != NULL) @@ -342,8 +342,8 @@ void NodeJava::load() if (xmlStrcmp(sNil, (xmlChar*) "false") == 0) { if (! m_JRELocations) - m_JRELocations = boost::optional<std::vector<rtl::OUString> >( - std::vector<rtl::OUString>()); + m_JRELocations = boost::optional<std::vector<OUString> >( + std::vector<OUString>()); xmlNode * pLoc = cur->children; while (pLoc != NULL) @@ -363,9 +363,9 @@ void NodeJava::load() } } -::rtl::OString NodeJava::getSettingsPath() const +OString NodeJava::getSettingsPath() const { - ::rtl::OString ret; + OString ret; switch (m_layer) { case USER: ret = getUserSettingsPath(); break; @@ -376,9 +376,9 @@ void NodeJava::load() return ret; } -::rtl::OUString NodeJava::getSettingsURL() const +OUString NodeJava::getSettingsURL() const { - ::rtl::OUString ret; + OUString ret; switch (m_layer) { case USER: ret = BootParams::getUserData(); break; @@ -391,14 +391,14 @@ void NodeJava::load() bool NodeJava::prepareSettingsDocument() const { - rtl::OString sExcMsg( + OString sExcMsg( "[Java framework] Error in function prepareSettingsDocument" " (elements.cxx)."); if (!createSettingsDocument()) { return false; } - rtl::OString sSettings = getSettingsPath(); + OString sSettings = getSettingsPath(); CXmlDocPtr doc(xmlParseFile(sSettings.getStr())); if (!doc) throw FrameworkException(JFW_E_ERROR, sExcMsg); @@ -416,7 +416,7 @@ bool NodeJava::prepareSettingsDocument() const void NodeJava::write() const { - rtl::OString sExcMsg("[Java framework] Error in function NodeJava::writeSettings " + OString sExcMsg("[Java framework] Error in function NodeJava::writeSettings " "(elements.cxx)."); CXmlDocPtr docUser; CXPathContextPtr contextUser; @@ -429,7 +429,7 @@ void NodeJava::write() const } //Read the user elements - rtl::OString sSettingsPath = getSettingsPath(); + OString sSettingsPath = getSettingsPath(); docUser = xmlParseFile(sSettingsPath.getStr()); if (docUser == NULL) throw FrameworkException(JFW_E_ERROR, sExcMsg); @@ -448,7 +448,7 @@ void NodeJava::write() const //The element must exist if (m_enabled) { - rtl::OString sExpression= rtl::OString( + OString sExpression= OString( "/jf:java/jf:enabled"); pathObj = xmlXPathEvalExpression((xmlChar*) sExpression.getStr(), contextUser); @@ -471,7 +471,7 @@ void NodeJava::write() const //The element must exist if (m_userClassPath) { - rtl::OString sExpression= rtl::OString( + OString sExpression= OString( "/jf:java/jf:userClassPath"); pathObj = xmlXPathEvalExpression((xmlChar*) sExpression.getStr(), contextUser); @@ -486,7 +486,7 @@ void NodeJava::write() const //set <javaInfo> element if (m_javaInfo) { - rtl::OString sExpression= rtl::OString( + OString sExpression= OString( "/jf:java/jf:javaInfo"); pathObj = xmlXPathEvalExpression((xmlChar*) sExpression.getStr(), contextUser); @@ -499,7 +499,7 @@ void NodeJava::write() const //set <vmParameters> element if (m_vmParameters) { - rtl::OString sExpression= rtl::OString( + OString sExpression= OString( "/jf:java/jf:vmParameters"); pathObj = xmlXPathEvalExpression((xmlChar*) sExpression.getStr(), contextUser); @@ -526,7 +526,7 @@ void NodeJava::write() const xmlAddChild(vmParameters, nodeCrLf); } - typedef std::vector<rtl::OUString>::const_iterator cit; + typedef std::vector<OUString>::const_iterator cit; for (cit i = m_vmParameters->begin(); i != m_vmParameters->end(); ++i) { xmlNewTextChild(vmParameters, NULL, (xmlChar*) "param", @@ -540,7 +540,7 @@ void NodeJava::write() const //set <jreLocations> element if (m_JRELocations) { - rtl::OString sExpression= rtl::OString( + OString sExpression= OString( "/jf:java/jf:jreLocations"); pathObj = xmlXPathEvalExpression((xmlChar*) sExpression.getStr(), contextUser); @@ -567,7 +567,7 @@ void NodeJava::write() const xmlAddChild(jreLocationsNode, nodeCrLf); } - typedef std::vector<rtl::OUString>::const_iterator cit; + typedef std::vector<OUString>::const_iterator cit; for (cit i = m_JRELocations->begin(); i != m_JRELocations->end(); ++i) { xmlNewTextChild(jreLocationsNode, NULL, (xmlChar*) "location", @@ -588,9 +588,9 @@ void NodeJava::setEnabled(sal_Bool bEnabled) } -void NodeJava::setUserClassPath(const rtl::OUString & sClassPath) +void NodeJava::setUserClassPath(const OUString & sClassPath) { - m_userClassPath = boost::optional<rtl::OUString>(sClassPath); + m_userClassPath = boost::optional<OUString>(sClassPath); } void NodeJava::setJavaInfo(const JavaInfo * pInfo, bool bAutoSelect) @@ -613,7 +613,7 @@ void NodeJava::setJavaInfo(const JavaInfo * pInfo, bool bAutoSelect) else { m_javaInfo->m_bEmptyNode = true; - rtl::OUString sEmpty; + OUString sEmpty; m_javaInfo->sVendor = sEmpty; m_javaInfo->sLocation = sEmpty; m_javaInfo->sVersion = sEmpty; @@ -627,14 +627,14 @@ void NodeJava::setVmParameters(rtl_uString * * arOptions, sal_Int32 size) { OSL_ASSERT( !(arOptions == 0 && size != 0)); if ( ! m_vmParameters) - m_vmParameters = boost::optional<std::vector<rtl::OUString> >( - std::vector<rtl::OUString>()); + m_vmParameters = boost::optional<std::vector<OUString> >( + std::vector<OUString>()); m_vmParameters->clear(); if (arOptions != NULL) { for (int i = 0; i < size; i++) { - const rtl::OUString sOption(static_cast<rtl_uString*>(arOptions[i])); + const OUString sOption(static_cast<rtl_uString*>(arOptions[i])); m_vmParameters->push_back(sOption); } } @@ -644,17 +644,17 @@ void NodeJava::setJRELocations(rtl_uString * * arLocations, sal_Int32 size) { OSL_ASSERT( !(arLocations == 0 && size != 0)); if (! m_JRELocations) - m_JRELocations = boost::optional<std::vector<rtl::OUString> > ( - std::vector<rtl::OUString>()); + m_JRELocations = boost::optional<std::vector<OUString> > ( + std::vector<OUString>()); m_JRELocations->clear(); if (arLocations != NULL) { for (int i = 0; i < size; i++) { - const rtl::OUString & sLocation = static_cast<rtl_uString*>(arLocations[i]); + const OUString & sLocation = static_cast<rtl_uString*>(arLocations[i]); //only add the path if not already present - std::vector<rtl::OUString>::const_iterator it = + std::vector<OUString>::const_iterator it = std::find(m_JRELocations->begin(), m_JRELocations->end(), sLocation); if (it == m_JRELocations->end()) @@ -667,14 +667,14 @@ void NodeJava::addJRELocation(rtl_uString * sLocation) { OSL_ASSERT( sLocation); if (!m_JRELocations) - m_JRELocations = boost::optional<std::vector<rtl::OUString> >( - std::vector<rtl::OUString> ()); + m_JRELocations = boost::optional<std::vector<OUString> >( + std::vector<OUString> ()); //only add the path if not already present - std::vector<rtl::OUString>::const_iterator it = + std::vector<OUString>::const_iterator it = std::find(m_JRELocations->begin(), m_JRELocations->end(), - rtl::OUString(sLocation)); + OUString(sLocation)); if (it == m_JRELocations->end()) - m_JRELocations->push_back(rtl::OUString(sLocation)); + m_JRELocations->push_back(OUString(sLocation)); } const boost::optional<sal_Bool> & NodeJava::getEnabled() const @@ -682,18 +682,18 @@ const boost::optional<sal_Bool> & NodeJava::getEnabled() const return m_enabled; } -const boost::optional<std::vector<rtl::OUString> >& +const boost::optional<std::vector<OUString> >& NodeJava::getJRELocations() const { return m_JRELocations; } -const boost::optional<rtl::OUString> & NodeJava::getUserClassPath() const +const boost::optional<OUString> & NodeJava::getUserClassPath() const { return m_userClassPath; } -const boost::optional<std::vector<rtl::OUString> > & NodeJava::getVmParameters() const +const boost::optional<std::vector<OUString> > & NodeJava::getVmParameters() const { return m_vmParameters; } @@ -740,13 +740,13 @@ jfw::FileStatus NodeJava::checkSettingsFileStatus(OUString const & sURL) const bool NodeJava::createSettingsDocument() const { - const rtl::OUString sURL = getSettingsURL(); + const OUString sURL = getSettingsURL(); if (sURL.isEmpty()) { return false; } //make sure there is a user directory - rtl::OString sExcMsg("[Java framework] Error in function createSettingsDocument " + OString sExcMsg("[Java framework] Error in function createSettingsDocument " "(elements.cxx)."); // check if javasettings.xml already exist if (FILE_OK == checkSettingsFileStatus(sURL)) @@ -787,7 +787,7 @@ bool NodeJava::createSettingsDocument() const if (xmlAddPrevSibling(root, com) == NULL) throw FrameworkException(JFW_E_ERROR, sExcMsg); - const rtl::OString path = getSettingsPath(); + const OString path = getSettingsPath(); if (xmlSaveFormatFileEnc(path.getStr(), doc,"UTF-8", 1) == -1) throw FrameworkException(JFW_E_ERROR, sExcMsg); return true; @@ -806,7 +806,7 @@ CNodeJavaInfo::~CNodeJavaInfo() void CNodeJavaInfo::loadFromNode(xmlDoc * pDoc, xmlNode * pJavaInfo) { - rtl::OString sExcMsg("[Java framework] Error in function NodeJavaInfo::loadFromNode " + OString sExcMsg("[Java framework] Error in function NodeJavaInfo::loadFromNode " "(elements.cxx)."); OSL_ASSERT(pJavaInfo && pDoc); @@ -874,7 +874,7 @@ void CNodeJavaInfo::loadFromNode(xmlDoc * pDoc, xmlNode * pJavaInfo) CXmlCharPtr xmlFeatures; xmlFeatures = xmlNodeListGetString( pDoc, cur->children, 1); - rtl::OUString sFeatures = xmlFeatures; + OUString sFeatures = xmlFeatures; nFeatures = sFeatures.toInt64(16); } else if (xmlStrcmp(cur->name, (xmlChar*) "requirements") == 0) @@ -882,7 +882,7 @@ void CNodeJavaInfo::loadFromNode(xmlDoc * pDoc, xmlNode * pJavaInfo) CXmlCharPtr xmlRequire; xmlRequire = xmlNodeListGetString( pDoc, cur->children, 1); - rtl::OUString sRequire = xmlRequire; + OUString sRequire = xmlRequire; nRequirements = sRequire.toInt64(16); #ifdef MACOSX //javaldx is not used anymore in the mac build. In case the Java @@ -931,7 +931,7 @@ void CNodeJavaInfo::writeToNode(xmlDoc* pDoc, //javaInfo@vendorUpdate //creates the attribute if necessary - rtl::OString sUpdated = getElementUpdated(); + OString sUpdated = getElementUpdated(); xmlSetProp(pJavaInfoNode, (xmlChar*)"vendorUpdate", (xmlChar*) sUpdated.getStr()); @@ -992,7 +992,7 @@ void CNodeJavaInfo::writeToNode(xmlDoc* pDoc, xmlAddChild(pJavaInfoNode, nodeCrLf); //Create the features element - rtl::OUString sFeatures = rtl::OUString::valueOf( + OUString sFeatures = OUString::valueOf( (sal_Int64)nFeatures, 16); xmlNewTextChild(pJavaInfoNode, NULL, (xmlChar*) "features", CXmlCharPtr(sFeatures)); @@ -1002,7 +1002,7 @@ void CNodeJavaInfo::writeToNode(xmlDoc* pDoc, //Create the requirements element - rtl::OUString sRequirements = rtl::OUString::valueOf( + OUString sRequirements = OUString::valueOf( (sal_Int64) nRequirements, 16); xmlNewTextChild(pJavaInfoNode, NULL, (xmlChar*) "requirements", CXmlCharPtr(sRequirements)); @@ -1097,23 +1097,23 @@ bool MergedSettings::getEnabled() const { return m_bEnabled; } -const rtl::OUString& MergedSettings::getUserClassPath() const +const OUString& MergedSettings::getUserClassPath() const { return m_sClassPath; } -::std::vector< ::rtl::OString> MergedSettings::getVmParametersUtf8() const +::std::vector< OString> MergedSettings::getVmParametersUtf8() const { - ::std::vector< ::rtl::OString> ret; - typedef ::std::vector< ::rtl::OUString>::const_iterator cit; + ::std::vector< OString> ret; + typedef ::std::vector< OUString>::const_iterator cit; for (cit i = m_vmParams.begin(); i != m_vmParams.end(); ++i) { - ret.push_back( ::rtl::OUStringToOString(*i, RTL_TEXTENCODING_UTF8)); + ret.push_back( OUStringToOString(*i, RTL_TEXTENCODING_UTF8)); } return ret; } -const ::rtl::OString & MergedSettings::getJavaInfoAttrVendorUpdate() const +const OString & MergedSettings::getJavaInfoAttrVendorUpdate() const { return m_javaInfo.sAttrVendorUpdate; } @@ -1141,7 +1141,7 @@ void MergedSettings::getVmParametersArray( return; int j=0; - typedef std::vector<rtl::OUString>::const_iterator it; + typedef std::vector<OUString>::const_iterator it; for (it i = m_vmParams.begin(); i != m_vmParams.end(); ++i, ++j) { @@ -1163,7 +1163,7 @@ void MergedSettings::getJRELocations( return; int j=0; - typedef std::vector<rtl::OUString>::const_iterator it; + typedef std::vector<OUString>::const_iterator it; for (it i = m_JRELocations.begin(); i != m_JRELocations.end(); ++i, ++j) { @@ -1172,7 +1172,7 @@ void MergedSettings::getJRELocations( } *size = m_JRELocations.size(); } -const std::vector<rtl::OUString> & MergedSettings::getJRELocations() const +const std::vector<OUString> & MergedSettings::getJRELocations() const { return m_JRELocations; } diff --git a/jvmfwk/source/elements.hxx b/jvmfwk/source/elements.hxx index 8e3e4aa51c2f..0cc213f29a48 100644 --- a/jvmfwk/source/elements.hxx +++ b/jvmfwk/source/elements.hxx @@ -35,7 +35,7 @@ namespace jfw /** gets the value of the updated element from the javavendors.xml. */ -rtl::OString getElementUpdated(); +OString getElementUpdated(); /** create the child elements within the root structure for each platform. @@ -66,7 +66,7 @@ public: It is not used, when the javaInfo node is written. see writeToNode */ - ::rtl::OString sAttrVendorUpdate; + OString sAttrVendorUpdate; /** contains the nil value of the /java/javaInfo@xsi:nil attribute. Default is true; */ @@ -78,9 +78,9 @@ public: jfw_findAndSelectJRE sets the attribute to true. */ bool bAutoSelect; - ::rtl::OUString sVendor; - ::rtl::OUString sLocation; - ::rtl::OUString sVersion; + OUString sVendor; + OUString sLocation; + OUString sVersion; sal_uInt64 nFeatures; sal_uInt64 nRequirements; ::rtl::ByteSequence arVendorData; @@ -137,11 +137,11 @@ private: depends on the member m_layer and the bootstrap parameters UNO_JAVA_JFW_USER_DATA and UNO_JAVA_JFW_SHARED_DATA. */ - ::rtl::OString getSettingsPath() const; + OString getSettingsPath() const; /** returns the file URL to the data file which is to be used. See getSettingsPath. */ - ::rtl::OUString getSettingsURL() const; + OUString getSettingsURL() const; /** Verifies if the respective settings file exist. */ @@ -162,7 +162,7 @@ private: If /java/userClassPath@xsi:nil == true then the value is uninitialized after a call to load(). */ - boost::optional< ::rtl::OUString> m_userClassPath; + boost::optional< OUString> m_userClassPath; /** User configurable option. /java/javaInfo If /java/javaInfo@xsi:nil == true then the value is uninitialized after a call to load. @@ -172,12 +172,12 @@ private: If /java/vmParameters@xsi:nil == true then the value is uninitialized after a call to load. */ - boost::optional< ::std::vector< ::rtl::OUString> > m_vmParameters; + boost::optional< ::std::vector< OUString> > m_vmParameters; /** User configurable option. /java/jreLocations If /java/jreLocaltions@xsi:nil == true then the value is uninitialized after a call to load. */ - boost::optional< ::std::vector< ::rtl::OUString> > m_JRELocations; + boost::optional< ::std::vector< OUString> > m_JRELocations; public: @@ -190,7 +190,7 @@ public: /** sets m_sUserClassPath. See setEnabled. */ - void setUserClassPath(const ::rtl::OUString & sClassPath); + void setUserClassPath(const OUString & sClassPath); /** sets m_aInfo. See setEnabled. @param bAutoSelect @@ -232,7 +232,7 @@ public: const boost::optional<sal_Bool> & getEnabled() const; /** returns the value of the element /java/userClassPath. */ - const boost::optional< ::rtl::OUString> & getUserClassPath() const; + const boost::optional< OUString> & getUserClassPath() const; /** returns the value of the element /java/javaInfo. */ @@ -240,11 +240,11 @@ public: /** returns the parameters from the element /java/vmParameters/param. */ - const boost::optional< ::std::vector< ::rtl::OUString> > & getVmParameters() const; + const boost::optional< ::std::vector< OUString> > & getVmParameters() const; /** returns the parameters from the element /java/jreLocations/location. */ - const boost::optional< ::std::vector< ::rtl::OUString> > & getJRELocations() const; + const boost::optional< ::std::vector< OUString> > & getJRELocations() const; }; /** merges the settings for shared, user and installation during construction. @@ -277,11 +277,11 @@ private: bool m_bEnabled; - ::rtl::OUString m_sClassPath; + OUString m_sClassPath; - ::std::vector< ::rtl::OUString> m_vmParams; + ::std::vector< OUString> m_vmParams; - ::std::vector< ::rtl::OUString> m_JRELocations; + ::std::vector< OUString> m_JRELocations; CNodeJavaInfo m_javaInfo; @@ -293,9 +293,9 @@ public: */ bool getEnabled() const; - const ::rtl::OUString & getUserClassPath() const; + const OUString & getUserClassPath() const; - ::std::vector< ::rtl::OString> getVmParametersUtf8() const; + ::std::vector< OString> getVmParametersUtf8() const; /** returns a JavaInfo structure representing the node /java/javaInfo. Every time a new JavaInfo structure is created which needs to be freed by the caller. @@ -305,7 +305,7 @@ public: /** returns the value of the attribute /java/javaInfo[@vendorUpdate]. */ - ::rtl::OString const & getJavaInfoAttrVendorUpdate() const; + OString const & getJavaInfoAttrVendorUpdate() const; #ifdef WNT /** returns the javaInfo@autoSelect attribute. @@ -326,23 +326,23 @@ public: */ void getJRELocations(rtl_uString *** parLocations, sal_Int32 * size) const; - const ::std::vector< ::rtl::OUString> & getJRELocations() const; + const ::std::vector< OUString> & getJRELocations() const; }; class VersionInfo { - ::std::vector< ::rtl::OUString> vecExcludeVersions; + ::std::vector< OUString> vecExcludeVersions; rtl_uString ** arVersions; public: VersionInfo(); ~VersionInfo(); - void addExcludeVersion(const ::rtl::OUString& sVersion); + void addExcludeVersion(const OUString& sVersion); - ::rtl::OUString sMinVersion; - ::rtl::OUString sMaxVersion; + OUString sMinVersion; + OUString sMaxVersion; /** The caller DOES NOT get ownership of the strings. That is he does not need to release the strings. @@ -358,16 +358,16 @@ struct PluginLibrary PluginLibrary() { } - PluginLibrary(rtl::OUString vendor,::rtl::OUString path) : + PluginLibrary(OUString vendor,OUString path) : sVendor(vendor), sPath(path) { } /** contains the vendor string which is later userd in the xml API */ - ::rtl::OUString sVendor; + OUString sVendor; /** File URL the plug-in library */ - ::rtl::OUString sPath; + OUString sPath; }; } //end namespace diff --git a/jvmfwk/source/framework.cxx b/jvmfwk/source/framework.cxx index 7a3975b7c18b..ed907d69f494 100644 --- a/jvmfwk/source/framework.cxx +++ b/jvmfwk/source/framework.cxx @@ -123,7 +123,7 @@ javaFrameworkError SAL_CALL jfw_findAllJREs(JavaInfo ***pparInfo, sal_Int32 *pSi //get the list of paths to jre locations which have been //added manually const jfw::MergedSettings settings; - const std::vector<rtl::OUString>& vecJRELocations = + const std::vector<OUString>& vecJRELocations = settings.getJRELocations(); //Use every plug-in library to get Java installations. typedef std::vector<jfw::PluginLibrary>::const_iterator ci_pl; @@ -139,7 +139,7 @@ javaFrameworkError SAL_CALL jfw_findAllJREs(JavaInfo ***pparInfo, sal_Int32 *pSi if (pluginLib.is() == sal_False) { - rtl::OString msg = rtl::OUStringToOString( + OString msg = OUStringToOString( library.sPath, osl_getThreadTextEncoding()); fprintf(stderr,"[jvmfwk] Could not load plugin %s\n" \ "Modify the javavendors.xml accordingly!\n", msg.getStr()); @@ -147,7 +147,7 @@ javaFrameworkError SAL_CALL jfw_findAllJREs(JavaInfo ***pparInfo, sal_Int32 *pSi } jfw_plugin_getAllJavaInfos_ptr getAllJavaFunc = (jfw_plugin_getAllJavaInfos_ptr) pluginLib.getFunctionSymbol( - rtl::OUString("jfw_plugin_getAllJavaInfos")); + OUString("jfw_plugin_getAllJavaInfos")); #else jfw_plugin_getAllJavaInfos_ptr getAllJavaFunc = jfw_plugin_getAllJavaInfos; @@ -183,7 +183,7 @@ javaFrameworkError SAL_CALL jfw_findAllJREs(JavaInfo ***pparInfo, sal_Int32 *pSi #ifndef DISABLE_DYNLOADING jfw_plugin_getJavaInfoByPath_ptr jfw_plugin_getJavaInfoByPathFunc = (jfw_plugin_getJavaInfoByPath_ptr) pluginLib.getFunctionSymbol( - rtl::OUString("jfw_plugin_getJavaInfoByPath")); + OUString("jfw_plugin_getJavaInfoByPath")); OSL_ASSERT(jfw_plugin_getJavaInfoByPathFunc); if (jfw_plugin_getJavaInfoByPathFunc == NULL) return JFW_E_ERROR; @@ -192,7 +192,7 @@ javaFrameworkError SAL_CALL jfw_findAllJREs(JavaInfo ***pparInfo, sal_Int32 *pSi jfw_plugin_getJavaInfoByPath; #endif - typedef std::vector<rtl::OUString>::const_iterator citLoc; + typedef std::vector<OUString>::const_iterator citLoc; //Check every manually added location for (citLoc ii = vecJRELocations.begin(); ii != vecJRELocations.end(); ++ii) @@ -300,8 +300,8 @@ javaFrameworkError SAL_CALL jfw_startVM( if (ppVM == NULL) return JFW_E_INVALID_ARG; - std::vector<rtl::OString> vmParams; - rtl::OString sUserClassPath; + std::vector<OString> vmParams; + OString sUserClassPath; jfw::CJavaInfo aInfo; if (pInfo == NULL) { @@ -343,7 +343,7 @@ javaFrameworkError SAL_CALL jfw_startVM( } #endif //check if the javavendors.xml has changed after a Java was selected - rtl::OString sVendorUpdate = jfw::getElementUpdated(); + OString sVendorUpdate = jfw::getElementUpdated(); if (sVendorUpdate != settings.getJavaInfoAttrVendorUpdate()) return JFW_E_INVALID_SETTINGS; @@ -385,14 +385,14 @@ javaFrameworkError SAL_CALL jfw_startVM( //get the function jfw_plugin_startJavaVirtualMachine jfw::VendorSettings aVendorSettings; - rtl::OUString sLibPath = aVendorSettings.getPluginLibrary(pInfo->sVendor); + OUString sLibPath = aVendorSettings.getPluginLibrary(pInfo->sVendor); #ifndef DISABLE_DYNLOADING osl::Module modulePlugin(sLibPath); if ( ! modulePlugin) return JFW_E_NO_PLUGIN; - rtl::OUString sFunctionName("jfw_plugin_startJavaVirtualMachine"); + OUString sFunctionName("jfw_plugin_startJavaVirtualMachine"); jfw_plugin_startJavaVirtualMachine_ptr pFunc = (jfw_plugin_startJavaVirtualMachine_ptr) osl_getFunctionSymbol(modulePlugin, sFunctionName.pData); @@ -423,7 +423,7 @@ javaFrameworkError SAL_CALL jfw_startVM( //add the options set by options dialog int index = 2; - typedef std::vector<rtl::OString>::const_iterator cit; + typedef std::vector<OString>::const_iterator cit; for (cit i = vmParams.begin(); i != vmParams.end(); ++i) { arOpt[index].optionString = const_cast<sal_Char*>(i->getStr()); @@ -516,7 +516,7 @@ javaFrameworkError SAL_CALL jfw_findAndSelectJRE(JavaInfo **pInfo) jfw_plugin_getAllJavaInfos_ptr getAllJavaFunc = (jfw_plugin_getAllJavaInfos_ptr) pluginLib.getFunctionSymbol( - rtl::OUString("jfw_plugin_getAllJavaInfos")); + OUString("jfw_plugin_getAllJavaInfos")); #else jfw_plugin_getAllJavaInfos_ptr getAllJavaFunc = jfw_plugin_getAllJavaInfos; @@ -584,7 +584,7 @@ javaFrameworkError SAL_CALL jfw_findAndSelectJRE(JavaInfo **pInfo) //get the list of paths to jre locations which have been added manually const jfw::MergedSettings settings; //node.loadFromSettings(); - const std::vector<rtl::OUString> & vecJRELocations = + const std::vector<OUString> & vecJRELocations = settings.getJRELocations(); //use every plug-in to determine the JavaInfo objects bool bInfoFound = false; @@ -602,7 +602,7 @@ javaFrameworkError SAL_CALL jfw_findAndSelectJRE(JavaInfo **pInfo) //get the function from the plugin jfw_plugin_getJavaInfoByPath_ptr jfw_plugin_getJavaInfoByPathFunc = (jfw_plugin_getJavaInfoByPath_ptr) pluginLib.getFunctionSymbol( - rtl::OUString("jfw_plugin_getJavaInfoByPath")); + OUString("jfw_plugin_getJavaInfoByPath")); #else jfw_plugin_getJavaInfoByPath_ptr jfw_plugin_getJavaInfoByPathFunc = jfw_plugin_getJavaInfoByPath; @@ -611,7 +611,7 @@ javaFrameworkError SAL_CALL jfw_findAndSelectJRE(JavaInfo **pInfo) if (jfw_plugin_getJavaInfoByPathFunc == NULL) return JFW_E_ERROR; - typedef std::vector<rtl::OUString>::const_iterator citLoc; + typedef std::vector<OUString>::const_iterator citLoc; for (citLoc it = vecJRELocations.begin(); it != vecJRELocations.end(); ++it) { @@ -689,9 +689,9 @@ sal_Bool SAL_CALL jfw_areEqualJavaInfo( return sal_True; if (pInfoA == NULL || pInfoB == NULL) return sal_False; - rtl::OUString sVendor(pInfoA->sVendor); - rtl::OUString sLocation(pInfoA->sLocation); - rtl::OUString sVersion(pInfoA->sVersion); + OUString sVendor(pInfoA->sVendor); + OUString sLocation(pInfoA->sLocation); + OUString sVersion(pInfoA->sVersion); rtl::ByteSequence sData(pInfoA->arVendorData); if (sVendor.equals(pInfoB->sVendor) == sal_True && sLocation.equals(pInfoB->sLocation) == sal_True @@ -728,14 +728,14 @@ javaFrameworkError SAL_CALL jfw_getSelectedJRE(JavaInfo **ppInfo) if (jfw::getMode() == jfw::JFW_MODE_DIRECT) { - rtl::OUString sJRE = jfw::BootParams::getJREHome(); + OUString sJRE = jfw::BootParams::getJREHome(); jfw::CJavaInfo aInfo; if ((errcode = jfw_getJavaInfoByPath(sJRE.pData, & aInfo.pInfo)) != JFW_E_NONE) throw jfw::FrameworkException( JFW_E_CONFIGURATION, - rtl::OString( + OString( "[Java framework] The JRE specified by the bootstrap " "variable UNO_JAVA_JFW_JREHOME or UNO_JAVA_JFW_ENV_JREHOME " " could not be recognized. Check the values and make sure that you " @@ -756,7 +756,7 @@ javaFrameworkError SAL_CALL jfw_getSelectedJRE(JavaInfo **ppInfo) //If the javavendors.xml has changed, then the current selected //Java is not valid anymore // /java/javaInfo/@vendorUpdate != javaSelection/updated (javavendors.xml) - rtl::OString sUpdated = jfw::getElementUpdated(); + OString sUpdated = jfw::getElementUpdated(); if (sUpdated.equals(settings.getJavaInfoAttrVendorUpdate()) == sal_False) return JFW_E_INVALID_SETTINGS; @@ -804,8 +804,8 @@ javaFrameworkError SAL_CALL jfw_getJavaInfoByPath( sarModules.reset(new osl::Module[vecPlugins.size()]); osl::Module * arModules = sarModules.get(); #endif - typedef std::vector<rtl::OUString>::const_iterator CIT_VENDOR; - std::vector<rtl::OUString> vecVendors = + typedef std::vector<OUString>::const_iterator CIT_VENDOR; + std::vector<OUString> vecVendors = aVendorSettings.getSupportedVendors(); //Use every plug-in library to determine if the path represents a @@ -824,7 +824,7 @@ javaFrameworkError SAL_CALL jfw_getJavaInfoByPath( osl::Module & pluginLib = arModules[cModule]; if (pluginLib.is() == sal_False) { - rtl::OString msg = rtl::OUStringToOString( + OString msg = OUStringToOString( library.sPath, osl_getThreadTextEncoding()); fprintf(stderr,"[jvmfwk] Could not load plugin %s\n" \ "Modify the javavendors.xml accordingly!\n", msg.getStr()); @@ -833,7 +833,7 @@ javaFrameworkError SAL_CALL jfw_getJavaInfoByPath( jfw_plugin_getJavaInfoByPath_ptr jfw_plugin_getJavaInfoByPathFunc = (jfw_plugin_getJavaInfoByPath_ptr) pluginLib.getFunctionSymbol( - rtl::OUString("jfw_plugin_getJavaInfoByPath")); + OUString("jfw_plugin_getJavaInfoByPath")); #else jfw_plugin_getJavaInfoByPath_ptr jfw_plugin_getJavaInfoByPathFunc = jfw_plugin_getJavaInfoByPath; @@ -866,7 +866,7 @@ javaFrameworkError SAL_CALL jfw_getJavaInfoByPath( } else { - rtl::OUString sVendor(pInfo->sVendor); + OUString sVendor(pInfo->sVendor); CIT_VENDOR ivendor = std::find(vecVendors.begin(), vecVendors.end(), sVendor); if (ivendor != vecVendors.end()) @@ -1174,11 +1174,11 @@ javaFrameworkError jfw_existJRE(const JavaInfo *pInfo, sal_Bool *exist) jfw::CJavaInfo aInfo; aInfo = (const ::JavaInfo*) pInfo; //makes a copy of pInfo #ifndef DISABLE_DYNLOADING - rtl::OUString sLibPath = aVendorSettings.getPluginLibrary(aInfo.getVendor()); + OUString sLibPath = aVendorSettings.getPluginLibrary(aInfo.getVendor()); osl::Module modulePlugin(sLibPath); if ( ! modulePlugin) return JFW_E_NO_PLUGIN; - rtl::OUString sFunctionName("jfw_plugin_existJRE"); + OUString sFunctionName("jfw_plugin_existJRE"); jfw_plugin_existJRE_ptr pFunc = (jfw_plugin_existJRE_ptr) osl_getFunctionSymbol(modulePlugin, sFunctionName.pData); @@ -1314,20 +1314,20 @@ CJavaInfo::operator JavaInfo const * () const return pInfo; } -rtl::OUString CJavaInfo::getVendor() const +OUString CJavaInfo::getVendor() const { if (pInfo) - return rtl::OUString(pInfo->sVendor); + return OUString(pInfo->sVendor); else - return rtl::OUString(); + return OUString(); } -rtl::OUString CJavaInfo::getLocation() const +OUString CJavaInfo::getLocation() const { if (pInfo) - return rtl::OUString(pInfo->sLocation); + return OUString(pInfo->sLocation); else - return rtl::OUString(); + return OUString(); } sal_uInt64 CJavaInfo::getFeatures() const diff --git a/jvmfwk/source/framework.hxx b/jvmfwk/source/framework.hxx index 4ac6c63af78b..a884cd8ef3ff 100644 --- a/jvmfwk/source/framework.hxx +++ b/jvmfwk/source/framework.hxx @@ -100,8 +100,8 @@ public: operator ::JavaInfo const * () const; ::JavaInfo* cloneJavaInfo() const; - rtl::OUString getVendor() const; - rtl::OUString getLocation() const; + OUString getVendor() const; + OUString getLocation() const; sal_uInt64 getFeatures() const; }; @@ -109,12 +109,12 @@ class FrameworkException { public: - FrameworkException(javaFrameworkError err, const rtl::OString& msg): + FrameworkException(javaFrameworkError err, const OString& msg): errorCode(err), message(msg) { } javaFrameworkError errorCode; - rtl::OString message; + OString message; }; } #endif diff --git a/jvmfwk/source/fwkbase.cxx b/jvmfwk/source/fwkbase.cxx index 79bf2d5fb7e0..a9b38ffa5c0d 100644 --- a/jvmfwk/source/fwkbase.cxx +++ b/jvmfwk/source/fwkbase.cxx @@ -32,11 +32,6 @@ using namespace osl; -using ::rtl::OUString; -using ::rtl::OUStringBuffer; -using ::rtl::OString; -using ::rtl::OUStringToOString; -using ::rtl::OStringToOUString; #define UNO_JAVA_JFW_PARAMETER "UNO_JAVA_JFW_PARAMETER_" #define UNO_JAVA_JFW_JREHOME "UNO_JAVA_JFW_JREHOME" @@ -54,29 +49,29 @@ bool g_bJavaSet = false; namespace { -rtl::OString getVendorSettingsPath(rtl::OUString const & sURL) +OString getVendorSettingsPath(OUString const & sURL) { if (sURL.isEmpty()) - return rtl::OString(); - rtl::OUString sSystemPathSettings; + return OString(); + OUString sSystemPathSettings; if (osl_getSystemPathFromFileURL(sURL.pData, & sSystemPathSettings.pData) != osl_File_E_None) throw FrameworkException( JFW_E_ERROR, - rtl::OString("[Java framework] Error in function " + OString("[Java framework] Error in function " "getVendorSettingsPath (fwkbase.cxx) ")); - rtl::OString osSystemPathSettings = - rtl::OUStringToOString(sSystemPathSettings,osl_getThreadTextEncoding()); + OString osSystemPathSettings = + OUStringToOString(sSystemPathSettings,osl_getThreadTextEncoding()); return osSystemPathSettings; } -rtl::OUString getParam(const char * name) +OUString getParam(const char * name) { - rtl::OUString retVal; - if (Bootstrap::get()->getFrom(rtl::OUString::createFromAscii(name), retVal)) + OUString retVal; + if (Bootstrap::get()->getFrom(OUString::createFromAscii(name), retVal)) { #if OSL_DEBUG_LEVEL >=2 - rtl::OString sValue = rtl::OUStringToOString(retVal, osl_getThreadTextEncoding()); + OString sValue = OUStringToOString(retVal, osl_getThreadTextEncoding()); fprintf(stderr,"[Java framework] Using bootstrap parameter %s = %s.\n", name, sValue.getStr()); #endif @@ -84,7 +79,7 @@ rtl::OUString getParam(const char * name) return retVal; } -rtl::OUString getParamFirstUrl(const char * name) +OUString getParamFirstUrl(const char * name) { // Some parameters can consist of multiple URLs (separated by space // characters, although trim() harmlessly also removes other white-space), @@ -175,7 +170,7 @@ std::vector<PluginLibrary> VendorSettings::getPluginData() return vecPlugins; } -VersionInfo VendorSettings::getVersionInformation(const rtl::OUString & sVendor) +VersionInfo VendorSettings::getVersionInformation(const OUString & sVendor) { OSL_ASSERT(!sVendor.isEmpty()); VersionInfo aVersionInfo; @@ -259,7 +254,7 @@ VersionInfo VendorSettings::getVersionInformation(const rtl::OUString & sVendor) std::vector<OUString> VendorSettings::getSupportedVendors() { - std::vector<rtl::OUString> vecVendors; + std::vector<OUString> vecVendors; //get the nodeset for the library elements jfw::CXPathObjectPtr result; result = xmlXPathEvalExpression( @@ -268,7 +263,7 @@ std::vector<OUString> VendorSettings::getSupportedVendors() if (xmlXPathNodeSetIsEmpty(result->nodesetval)) throw FrameworkException( JFW_E_ERROR, - rtl::OString("[Java framework] Error in function getSupportedVendors (fwkbase.cxx).")); + OString("[Java framework] Error in function getSupportedVendors (fwkbase.cxx).")); //get the values of the library elements + vendor attribute xmlNode* cur = result->nodesetval->nodeTab[0]; @@ -337,7 +332,7 @@ OUString VendorSettings::getPluginLibrary(const OUString& sVendor) OUStringToOString(sValue, osl_getThreadTextEncoding()); vecParams.push_back(sParam); #if OSL_DEBUG_LEVEL >=2 - rtl::OString sParamName = rtl::OUStringToOString(sName, osl_getThreadTextEncoding()); + OString sParamName = OUStringToOString(sName, osl_getThreadTextEncoding()); fprintf(stderr,"[Java framework] Using bootstrap parameter %s" " = %s.\n", sParamName.getStr(), sParam.getStr()); #endif @@ -348,25 +343,25 @@ OUString VendorSettings::getPluginLibrary(const OUString& sVendor) return vecParams; } -rtl::OUString BootParams::getUserData() +OUString BootParams::getUserData() { return getParamFirstUrl(UNO_JAVA_JFW_USER_DATA); } -rtl::OUString BootParams::getSharedData() +OUString BootParams::getSharedData() { return getParamFirstUrl(UNO_JAVA_JFW_SHARED_DATA); } -rtl::OString BootParams::getClasspath() +OString BootParams::getClasspath() { - rtl::OString sClassPath; - rtl::OUString sCP; + OString sClassPath; + OUString sCP; if (Bootstrap::get()->getFrom( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(UNO_JAVA_JFW_CLASSPATH)), + OUString(RTL_CONSTASCII_USTRINGPARAM(UNO_JAVA_JFW_CLASSPATH)), sCP) == sal_True) { - sClassPath = rtl::OUStringToOString( + sClassPath = OUStringToOString( sCP, osl_getThreadTextEncoding()); #if OSL_DEBUG_LEVEL >=2 fprintf(stderr,"[Java framework] Using bootstrap parameter " @@ -374,16 +369,16 @@ rtl::OString BootParams::getClasspath() #endif } - rtl::OUString sEnvCP; + OUString sEnvCP; if (Bootstrap::get()->getFrom( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(UNO_JAVA_JFW_ENV_CLASSPATH)), + OUString(RTL_CONSTASCII_USTRINGPARAM(UNO_JAVA_JFW_ENV_CLASSPATH)), sEnvCP) == sal_True) { char * pCp = getenv("CLASSPATH"); if (pCp) { char szSep[] = {SAL_PATHSEPARATOR,0}; - sClassPath += rtl::OString(szSep) + rtl::OString(pCp); + sClassPath += OString(szSep) + OString(pCp); } #if OSL_DEBUG_LEVEL >=2 fprintf(stderr,"[Java framework] Using bootstrap parameter " @@ -394,10 +389,10 @@ rtl::OString BootParams::getClasspath() return sClassPath; } -rtl::OUString BootParams::getVendorSettings() +OUString BootParams::getVendorSettings() { - rtl::OUString sVendor; - rtl::OUString sName( + OUString sVendor; + OUString sName( RTL_CONSTASCII_USTRINGPARAM(UNO_JAVA_JFW_VENDOR_SETTINGS)); if (Bootstrap::get()->getFrom(sName ,sVendor) == sal_True) { @@ -406,13 +401,13 @@ rtl::OUString BootParams::getVendorSettings() if (s != FILE_OK) { //This bootstrap parameter can contain a relative URL - rtl::OUString sAbsoluteUrl; - rtl::OUString sBaseDir = getLibraryLocation(); + OUString sAbsoluteUrl; + OUString sBaseDir = getLibraryLocation(); if (File::getAbsoluteFileURL(sBaseDir, sVendor, sAbsoluteUrl) != File::E_None) throw FrameworkException( JFW_E_CONFIGURATION, - rtl::OString("[Java framework] Invalid value for bootstrap variable: " + OString("[Java framework] Invalid value for bootstrap variable: " UNO_JAVA_JFW_VENDOR_SETTINGS)); sVendor = sAbsoluteUrl; s = checkFileURL(sVendor); @@ -420,12 +415,12 @@ rtl::OUString BootParams::getVendorSettings() { throw FrameworkException( JFW_E_CONFIGURATION, - rtl::OString("[Java framework] Invalid value for bootstrap variable: " + OString("[Java framework] Invalid value for bootstrap variable: " UNO_JAVA_JFW_VENDOR_SETTINGS)); } } #if OSL_DEBUG_LEVEL >=2 - rtl::OString sValue = rtl::OUStringToOString(sVendor, osl_getThreadTextEncoding()); + OString sValue = OUStringToOString(sVendor, osl_getThreadTextEncoding()); fprintf(stderr,"[Java framework] Using bootstrap parameter " UNO_JAVA_JFW_VENDOR_SETTINGS" = %s.\n", sValue.getStr()); #endif @@ -433,20 +428,20 @@ rtl::OUString BootParams::getVendorSettings() return sVendor; } -rtl::OUString BootParams::getJREHome() +OUString BootParams::getJREHome() { - rtl::OUString sJRE; - rtl::OUString sEnvJRE; + OUString sJRE; + OUString sEnvJRE; sal_Bool bJRE = Bootstrap::get()->getFrom( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(UNO_JAVA_JFW_JREHOME)) ,sJRE); + OUString(RTL_CONSTASCII_USTRINGPARAM(UNO_JAVA_JFW_JREHOME)) ,sJRE); sal_Bool bEnvJRE = Bootstrap::get()->getFrom( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(UNO_JAVA_JFW_ENV_JREHOME)) ,sEnvJRE); + OUString(RTL_CONSTASCII_USTRINGPARAM(UNO_JAVA_JFW_ENV_JREHOME)) ,sEnvJRE); if (bJRE == sal_True && bEnvJRE == sal_True) { throw FrameworkException( JFW_E_CONFIGURATION, - rtl::OString("[Java framework] Both bootstrap parameter " + OString("[Java framework] Both bootstrap parameter " UNO_JAVA_JFW_JREHOME" and " UNO_JAVA_JFW_ENV_JREHOME" are set. However only one of them can be set." "Check bootstrap parameters: environment variables, command line " @@ -459,16 +454,16 @@ rtl::OUString BootParams::getJREHome() { throw FrameworkException( JFW_E_CONFIGURATION, - rtl::OString("[Java framework] Both bootstrap parameter " + OString("[Java framework] Both bootstrap parameter " UNO_JAVA_JFW_ENV_JREHOME" is set, but the environment variable " "JAVA_HOME is not set.")); } - rtl::OString osJRE(pJRE); - rtl::OUString usJRE = rtl::OStringToOUString(osJRE, osl_getThreadTextEncoding()); + OString osJRE(pJRE); + OUString usJRE = OStringToOUString(osJRE, osl_getThreadTextEncoding()); if (File::getFileURLFromSystemPath(usJRE, sJRE) != File::E_None) throw FrameworkException( JFW_E_ERROR, - rtl::OString("[Java framework] Error in function BootParams::getJREHome() " + OString("[Java framework] Error in function BootParams::getJREHome() " "(fwkbase.cxx).")); #if OSL_DEBUG_LEVEL >=2 fprintf(stderr,"[Java framework] Using bootstrap parameter " @@ -481,7 +476,7 @@ rtl::OUString BootParams::getJREHome() { throw FrameworkException( JFW_E_CONFIGURATION, - rtl::OString("[Java framework] The bootstrap parameter " + OString("[Java framework] The bootstrap parameter " UNO_JAVA_JFW_ENV_JREHOME" or " UNO_JAVA_JFW_JREHOME " must be set in direct mode.")); } @@ -489,7 +484,7 @@ rtl::OUString BootParams::getJREHome() #if OSL_DEBUG_LEVEL >=2 if (bJRE == sal_True) { - rtl::OString sValue = rtl::OUStringToOString(sJRE, osl_getThreadTextEncoding()); + OString sValue = OUStringToOString(sJRE, osl_getThreadTextEncoding()); fprintf(stderr,"[Java framework] Using bootstrap parameter " UNO_JAVA_JFW_JREHOME" = %s.\n", sValue.getStr()); } @@ -497,14 +492,14 @@ rtl::OUString BootParams::getJREHome() return sJRE; } -rtl::OUString BootParams::getClasspathUrls() +OUString BootParams::getClasspathUrls() { - rtl::OUString sParams; + OUString sParams; Bootstrap::get()->getFrom( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(UNO_JAVA_JFW_CLASSPATH_URLS)), + OUString(RTL_CONSTASCII_USTRINGPARAM(UNO_JAVA_JFW_CLASSPATH_URLS)), sParams); #if OSL_DEBUG_LEVEL >=2 - rtl::OString sValue = rtl::OUStringToOString(sParams, osl_getThreadTextEncoding()); + OString sValue = OUStringToOString(sParams, osl_getThreadTextEncoding()); fprintf(stderr,"[Java framework] Using bootstrap parameter " UNO_JAVA_JFW_CLASSPATH_URLS " = %s.\n", sValue.getStr()); #endif @@ -520,27 +515,27 @@ JFW_MODE getMode() { //check if either of the "direct mode" bootstrap variables is set bool bDirectMode = true; - rtl::OUString sValue; + OUString sValue; const rtl::Bootstrap * aBoot = Bootstrap::get(); - rtl::OUString sJREHome( + OUString sJREHome( RTL_CONSTASCII_USTRINGPARAM(UNO_JAVA_JFW_JREHOME)); if (aBoot->getFrom(sJREHome, sValue) == sal_False) { - rtl::OUString sEnvJRE( + OUString sEnvJRE( RTL_CONSTASCII_USTRINGPARAM(UNO_JAVA_JFW_ENV_JREHOME)); if (aBoot->getFrom(sEnvJRE, sValue) == sal_False) { - rtl::OUString sClasspath( + OUString sClasspath( RTL_CONSTASCII_USTRINGPARAM(UNO_JAVA_JFW_CLASSPATH)); if (aBoot->getFrom(sClasspath, sValue) == sal_False) { - rtl::OUString sEnvClasspath( + OUString sEnvClasspath( RTL_CONSTASCII_USTRINGPARAM(UNO_JAVA_JFW_ENV_CLASSPATH)); if (aBoot->getFrom(sEnvClasspath, sValue) == sal_False) { - rtl::OUString sParams = rtl::OUString( + OUString sParams = OUString( RTL_CONSTASCII_USTRINGPARAM(UNO_JAVA_JFW_PARAMETER)) + - rtl::OUString::valueOf((sal_Int32)1); + OUString::valueOf((sal_Int32)1); if (aBoot->getFrom(sParams, sValue) == sal_False) { bDirectMode = false; @@ -560,23 +555,23 @@ JFW_MODE getMode() return g_mode; } -rtl::OUString getApplicationClassPath() +OUString getApplicationClassPath() { OSL_ASSERT(getMode() == JFW_MODE_APPLICATION); - rtl::OUString retVal; - rtl::OUString sParams = BootParams::getClasspathUrls(); + OUString retVal; + OUString sParams = BootParams::getClasspathUrls(); if (sParams.isEmpty()) return retVal; - rtl::OUStringBuffer buf; + OUStringBuffer buf; sal_Int32 index = 0; char szClassPathSep[] = {SAL_PATHSEPARATOR,0}; do { - ::rtl::OUString token( sParams.getToken( 0, ' ', index ).trim() ); + OUString token( sParams.getToken( 0, ' ', index ).trim() ); if (!token.isEmpty()) { - ::rtl::OUString systemPathElement; + OUString systemPathElement; oslFileError rc = osl_getSystemPathFromFileURL( token.pData, &systemPathElement.pData ); OSL_ASSERT( rc == osl_File_E_None ); @@ -593,11 +588,11 @@ rtl::OUString getApplicationClassPath() return buf.makeStringAndClear(); } -rtl::OString makeClassPathOption(OUString const & sUserClassPath) +OString makeClassPathOption(OUString const & sUserClassPath) { //Compose the class path - rtl::OString sPaths; - rtl::OUStringBuffer sBufCP(4096); + OString sPaths; + OUStringBuffer sBufCP(4096); // append all user selected jars to the class path if (!sUserClassPath.isEmpty()) @@ -615,38 +610,38 @@ rtl::OString makeClassPathOption(OUString const & sUserClassPath) sBufCP.append(sAppCP); } - sPaths = rtl::OUStringToOString( + sPaths = OUStringToOString( sBufCP.makeStringAndClear(), osl_getThreadTextEncoding()); - rtl::OString sOptionClassPath("-Djava.class.path="); + OString sOptionClassPath("-Djava.class.path="); sOptionClassPath += sPaths; return sOptionClassPath; } -rtl::OString getUserSettingsPath() +OString getUserSettingsPath() { return getSettingsPath(BootParams::getUserData()); } -rtl::OString getSharedSettingsPath() +OString getSharedSettingsPath() { return getSettingsPath(BootParams::getSharedData()); } -rtl::OString getSettingsPath( const rtl::OUString & sURL) +OString getSettingsPath( const OUString & sURL) { if (sURL.isEmpty()) - return rtl::OString(); - rtl::OUString sPath; + return OString(); + OUString sPath; if (osl_getSystemPathFromFileURL(sURL.pData, & sPath.pData) != osl_File_E_None) throw FrameworkException( - JFW_E_ERROR, rtl::OString( + JFW_E_ERROR, OString( "[Java framework] Error in function ::getSettingsPath (fwkbase.cxx).")); - return rtl::OUStringToOString(sPath,osl_getThreadTextEncoding()); + return OUStringToOString(sPath,osl_getThreadTextEncoding()); } -rtl::OString getVendorSettingsPath() +OString getVendorSettingsPath() { return getVendorSettingsPath(BootParams::getVendorSettings()); } diff --git a/jvmfwk/source/fwkbase.hxx b/jvmfwk/source/fwkbase.hxx index 9eb0f0648f47..45a7dd2ac8c5 100644 --- a/jvmfwk/source/fwkbase.hxx +++ b/jvmfwk/source/fwkbase.hxx @@ -27,7 +27,7 @@ namespace jfw class VendorSettings { - ::rtl::OUString m_xmlDocVendorSettingsFileUrl; + OUString m_xmlDocVendorSettingsFileUrl; CXmlDocPtr m_xmlDocVendorSettings; CXPathContextPtr m_xmlPathContextVendorSettings; @@ -45,11 +45,11 @@ public: /* returns the file URL to the plugin. */ - ::rtl::OUString getPluginLibrary(const ::rtl::OUString& sVendor); + OUString getPluginLibrary(const OUString& sVendor); - VersionInfo getVersionInformation(const ::rtl::OUString & sVendor); + VersionInfo getVersionInformation(const OUString & sVendor); - ::std::vector< ::rtl::OUString> getSupportedVendors(); + ::std::vector< OUString> getSupportedVendors(); }; /* The class offers functions to retrieve verified bootstrap parameters. @@ -62,24 +62,24 @@ namespace BootParams In direct mode either of them must be set. If not an exception is thrown. */ -::rtl::OUString getJREHome(); +OUString getJREHome(); -::std::vector< ::rtl::OString> getVMParameters(); +::std::vector< OString> getVMParameters(); -::rtl::OUString getUserData(); +OUString getUserData(); -::rtl::OUString getSharedData(); +OUString getSharedData(); /* returns the file URL to the vendor settings xml file. */ -::rtl::OUString getVendorSettings(); +OUString getVendorSettings(); /* User the parameter UNO_JAVA_JFW_CLASSPATH and UNO_JAVA_JFW_ENV_CLASSPATH to compose a classpath */ -::rtl::OString getClasspath(); +OString getClasspath(); -::rtl::OUString getClasspathUrls(); +OUString getClasspathUrls(); } //end namespace @@ -97,9 +97,9 @@ JFW_MODE getMode(); /** creates the -Djava.class.path option with the complete classpath, including the paths which are set by UNO_JAVA_JFW_CLASSPATH_URLS. */ -::rtl::OString makeClassPathOption(::rtl::OUString const & sUserClassPath); +OString makeClassPathOption(OUString const & sUserClassPath); -::rtl::OString getSettingsPath( const ::rtl::OUString & sURL); +OString getSettingsPath( const OUString & sURL); /** Get the system path to the javasettings.xml Converts the URL returned from getUserSettingsURL to a @@ -107,20 +107,20 @@ JFW_MODE getMode(); does not exist. @throws FrameworkException */ -::rtl::OString getUserSettingsPath(); +OString getUserSettingsPath(); /** Returns the system path of the share settings file. Returns a valid string or throws an exception. @throws FrameworkException */ -::rtl::OString getSharedSettingsPath(); +OString getSharedSettingsPath(); /* returns a valid string or throws an exception. @throws FrameworkException */ -::rtl::OString getVendorSettingsPath(); +OString getVendorSettingsPath(); -::rtl::OUString buildClassPathFromDirectory(const ::rtl::OUString & relPath); +OUString buildClassPathFromDirectory(const OUString & relPath); /** Called from writeJavaInfoData. It sets the process identifier. When java is to be started, then the current id is compared to the one set by @@ -137,7 +137,7 @@ void setJavaSelected(); bool wasJavaSelectedInSameProcess(); /* Only for application mode. */ -::rtl::OUString getApplicationClassPath(); +OUString getApplicationClassPath(); } #endif diff --git a/jvmfwk/source/fwkutil.cxx b/jvmfwk/source/fwkutil.cxx index 8caf06d3741f..36007eda93fd 100644 --- a/jvmfwk/source/fwkutil.cxx +++ b/jvmfwk/source/fwkutil.cxx @@ -49,9 +49,6 @@ using namespace osl; -using ::rtl::OUString; -using ::rtl::OUStringToOString; -using ::rtl::OString; namespace jfw { @@ -193,13 +190,13 @@ rtl::ByteSequence decodeBase16(const rtl::ByteSequence& data) return ret; } -rtl::OUString getDirFromFile(const rtl::OUString& usFilePath) +OUString getDirFromFile(const OUString& usFilePath) { sal_Int32 index= usFilePath.lastIndexOf('/'); - return rtl::OUString(usFilePath.getStr(), index); + return OUString(usFilePath.getStr(), index); } -rtl::OUString getExecutableDirectory() +OUString getExecutableDirectory() { rtl_uString* sExe = NULL; if (osl_getExecutableFile( & sExe) != osl_Process_E_None) @@ -207,14 +204,14 @@ rtl::OUString getExecutableDirectory() JFW_E_ERROR, "[Java framework] Error in function getExecutableDirectory (fwkutil.cxx)"); - rtl::OUString ouExe(sExe, SAL_NO_ACQUIRE); + OUString ouExe(sExe, SAL_NO_ACQUIRE); return getDirFromFile(ouExe); } -rtl::OUString findPlugin( - const rtl::OUString & baseUrl, const rtl::OUString & plugin) +OUString findPlugin( + const OUString & baseUrl, const OUString & plugin) { - rtl::OUString expandedPlugin; + OUString expandedPlugin; try { expandedPlugin = cppu::bootstrap_expandUri(plugin); @@ -223,13 +220,13 @@ rtl::OUString findPlugin( { throw FrameworkException( JFW_E_ERROR, - (rtl::OString( + (OString( RTL_CONSTASCII_STRINGPARAM( "[Java framework] IllegalArgumentException in" " findPlugin: ")) - + rtl::OUStringToOString(e.Message, osl_getThreadTextEncoding()))); + + OUStringToOString(e.Message, osl_getThreadTextEncoding()))); } - rtl::OUString sUrl; + OUString sUrl; try { sUrl = rtl::Uri::convertRelToAbs(baseUrl, expandedPlugin); @@ -238,20 +235,20 @@ rtl::OUString findPlugin( { throw FrameworkException( JFW_E_ERROR, - (rtl::OString( + (OString( RTL_CONSTASCII_STRINGPARAM( "[Java framework] rtl::MalformedUriException in" " findPlugin: ")) - + rtl::OUStringToOString( + + OUStringToOString( e.getMessage(), osl_getThreadTextEncoding()))); } if (checkFileURL(sUrl) == jfw::FILE_OK) { return sUrl; } - rtl::OUString retVal; - rtl::OUString sProgDir = getExecutableDirectory(); - sUrl = sProgDir + rtl::OUString("/") + OUString retVal; + OUString sProgDir = getExecutableDirectory(); + sUrl = sProgDir + OUString("/") + plugin; jfw::FileStatus s = checkFileURL(sUrl); if (s == jfw::FILE_INVALID || s == jfw::FILE_DOES_NOT_EXIST) @@ -260,16 +257,16 @@ rtl::OUString findPlugin( //use PATH, LD_LIBRARY_PATH etc. to locate the plugin if (plugin.indexOf('/') == -1) { - rtl::OUString url; + OUString url; #ifdef UNX #if defined(MACOSX) - rtl::OUString path = rtl::OUString("DYLD_LIBRARY_PATH"); + OUString path = OUString("DYLD_LIBRARY_PATH"); #elif defined(AIX) - rtl::OUString path = rtl::OUString("LIBPATH"); + OUString path = OUString("LIBPATH"); #else - rtl::OUString path = rtl::OUString("LD_LIBRARY_PATH"); + OUString path = OUString("LD_LIBRARY_PATH"); #endif - rtl::OUString env_path; + OUString env_path; oslProcessError err = osl_getEnvironment(path.pData, &env_path.pData); if (err != osl_Process_E_None && err != osl_Process_E_NotFound) throw FrameworkException( @@ -297,11 +294,11 @@ rtl::OUString findPlugin( return retVal; } -rtl::OUString getLibraryLocation() +OUString getLibraryLocation() { - rtl::OString sExcMsg("[Java framework] Error in function getLibraryLocation " + OString sExcMsg("[Java framework] Error in function getLibraryLocation " "(fwkutil.cxx)."); - rtl::OUString libraryFileUrl; + OUString libraryFileUrl; if (!osl::Module::getUrlFromAddress( reinterpret_cast< oslGenericFunction >(getLibraryLocation), @@ -311,7 +308,7 @@ rtl::OUString getLibraryLocation() return getDirFromFile(libraryFileUrl); } -jfw::FileStatus checkFileURL(const rtl::OUString & sURL) +jfw::FileStatus checkFileURL(const OUString & sURL) { jfw::FileStatus ret = jfw::FILE_OK; DirectoryItem item; diff --git a/jvmfwk/source/fwkutil.hxx b/jvmfwk/source/fwkutil.hxx index 1509fb74e89d..0411869f8b72 100644 --- a/jvmfwk/source/fwkutil.hxx +++ b/jvmfwk/source/fwkutil.hxx @@ -37,7 +37,7 @@ namespace jfw /** Returns the file URL of the directory where the framework library (this library) resides. */ -rtl::OUString getLibraryLocation(); +OUString getLibraryLocation(); /** provides a bootstrap class which already knows the values from the jvmfkwrc file. @@ -45,13 +45,13 @@ rtl::OUString getLibraryLocation(); struct Bootstrap : public ::rtl::StaticWithInit< const rtl::Bootstrap *, Bootstrap > { const rtl::Bootstrap * operator () () { - ::rtl::OUStringBuffer buf(256); + OUStringBuffer buf(256); buf.append(getLibraryLocation()); buf.appendAscii(SAL_CONFIGFILE("/jvmfwk3")); - ::rtl::OUString sIni = buf.makeStringAndClear(); + OUString sIni = buf.makeStringAndClear(); ::rtl::Bootstrap * bootstrap = new ::rtl::Bootstrap(sIni); #if OSL_DEBUG_LEVEL >=2 - rtl::OString o = rtl::OUStringToOString( sIni , osl_getThreadTextEncoding() ); + OString o = OUStringToOString( sIni , osl_getThreadTextEncoding() ); fprintf(stderr, "[Java framework] Using configuration file %s\n" , o.getStr() ); #endif return bootstrap; @@ -63,14 +63,14 @@ struct FwkMutex: public ::rtl::Static<osl::Mutex, FwkMutex> {}; rtl::ByteSequence encodeBase16(const rtl::ByteSequence& rawData); rtl::ByteSequence decodeBase16(const rtl::ByteSequence& data); -rtl::OUString getPlatform(); +OUString getPlatform(); -rtl::OUString getDirFromFile(const rtl::OUString& usFilePath); +OUString getDirFromFile(const OUString& usFilePath); /** Returns the file URL of the folder where the executable resides. */ -rtl::OUString getExecutableDirectory(); +OUString getExecutableDirectory(); /** Locates the plugin library and returns the file URL. First tries to locate plugin relative to baseUrl (if relative); @@ -85,8 +85,8 @@ rtl::OUString getExecutableDirectory(); @param plugin The argument is an absolute or relative URL or just the name of the plugin. */ -rtl::OUString findPlugin( - const rtl::OUString & baseUrl, const rtl::OUString & plugin); +OUString findPlugin( + const OUString & baseUrl, const OUString & plugin); enum FileStatus @@ -110,13 +110,13 @@ enum FileStatus @exception Errors occurred during determining if the file exists */ -FileStatus checkFileURL(const rtl::OUString & path); +FileStatus checkFileURL(const OUString & path); bool isAccessibilitySupportDesired(); -rtl::OUString buildClassPathFromDirectory(const rtl::OUString & relPath); +OUString buildClassPathFromDirectory(const OUString & relPath); -rtl::OUString retrieveClassPath( ::rtl::OUString const & macro ); +OUString retrieveClassPath( OUString const & macro ); } #endif diff --git a/jvmfwk/source/libxmlutil.cxx b/jvmfwk/source/libxmlutil.cxx index a9ea83e24e7c..30b1d078ce2c 100644 --- a/jvmfwk/source/libxmlutil.cxx +++ b/jvmfwk/source/libxmlutil.cxx @@ -124,10 +124,10 @@ CXmlCharPtr::CXmlCharPtr(xmlChar * aChar) { } -CXmlCharPtr::CXmlCharPtr(const ::rtl::OUString & s): +CXmlCharPtr::CXmlCharPtr(const OUString & s): _object(NULL) { - ::rtl::OString o = ::rtl::OUStringToOString(s, RTL_TEXTENCODING_UTF8); + OString o = OUStringToOString(s, RTL_TEXTENCODING_UTF8); _object = xmlCharStrdup(o.getStr()); } CXmlCharPtr::CXmlCharPtr():_object(NULL) @@ -153,20 +153,20 @@ CXmlCharPtr::operator xmlChar*() const return _object; } -CXmlCharPtr::operator ::rtl::OUString() +CXmlCharPtr::operator OUString() { - ::rtl::OUString ret; + OUString ret; if (_object != NULL) { - ::rtl::OString aOStr((sal_Char*)_object); - ret = ::rtl::OStringToOUString(aOStr, RTL_TEXTENCODING_UTF8); + OString aOStr((sal_Char*)_object); + ret = OStringToOUString(aOStr, RTL_TEXTENCODING_UTF8); } return ret; } -CXmlCharPtr::operator ::rtl::OString() +CXmlCharPtr::operator OString() { - return ::rtl::OString((sal_Char*) _object); + return OString((sal_Char*) _object); } diff --git a/jvmfwk/source/libxmlutil.hxx b/jvmfwk/source/libxmlutil.hxx index 7035f2ed9698..4ee92d18c73e 100644 --- a/jvmfwk/source/libxmlutil.hxx +++ b/jvmfwk/source/libxmlutil.hxx @@ -88,12 +88,12 @@ class CXmlCharPtr public: CXmlCharPtr(); CXmlCharPtr(xmlChar* aDoc); - CXmlCharPtr(const ::rtl::OUString &); + CXmlCharPtr(const OUString &); ~CXmlCharPtr(); CXmlCharPtr & operator = (xmlChar* pObj); operator xmlChar* () const; - operator ::rtl::OUString (); - operator ::rtl::OString (); + operator OUString (); + operator OString (); }; |