diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-10-23 12:06:00 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-10-24 14:43:34 +0200 |
commit | 6f50961e69406a17d6ec998956a6b33208b1001b (patch) | |
tree | 413c83df969e73c5cba1e11ef3740afc748ee1f5 /sal/osl/unx | |
parent | 4e729de73f2947155248f8df5897380611b87917 (diff) |
remove more rtl::OUString and OString prefixes
which seem to have snuck back in since the great rounds of removals.
Change-Id: I85f7f5f4801c0b48dae8b50f51f83595b286d6a1
Reviewed-on: https://gerrit.libreoffice.org/62229
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sal/osl/unx')
-rw-r--r-- | sal/osl/unx/file_misc.cxx | 8 | ||||
-rw-r--r-- | sal/osl/unx/file_path_helper.cxx | 40 | ||||
-rw-r--r-- | sal/osl/unx/file_path_helper.hxx | 20 | ||||
-rw-r--r-- | sal/osl/unx/file_stat.cxx | 20 | ||||
-rw-r--r-- | sal/osl/unx/file_url.cxx | 36 | ||||
-rw-r--r-- | sal/osl/unx/nlsupport.cxx | 4 | ||||
-rw-r--r-- | sal/osl/unx/nlsupport.hxx | 2 | ||||
-rw-r--r-- | sal/osl/unx/osxlocale.cxx | 6 | ||||
-rw-r--r-- | sal/osl/unx/process.cxx | 14 | ||||
-rw-r--r-- | sal/osl/unx/process_impl.cxx | 2 | ||||
-rw-r--r-- | sal/osl/unx/uunxapi.cxx | 22 | ||||
-rw-r--r-- | sal/osl/unx/uunxapi.hxx | 10 |
12 files changed, 92 insertions, 92 deletions
diff --git a/sal/osl/unx/file_misc.cxx b/sal/osl/unx/file_misc.cxx index 05e72997070b..fb12e4155e14 100644 --- a/sal/osl/unx/file_misc.cxx +++ b/sal/osl/unx/file_misc.cxx @@ -519,7 +519,7 @@ static int create_dir_with_callback( { if (aDirectoryCreationCallbackFunc) { - rtl::OUString url; + OUString url; osl::FileBase::getFileURLFromSystemPath(directory_path, url); aDirectoryCreationCallbackFunc(pData, url.pData); } @@ -570,7 +570,7 @@ oslFileError SAL_CALL osl_createDirectoryPath( if (aDirectoryUrl == nullptr) return osl_File_E_INVAL; - rtl::OUString sys_path; + OUString sys_path; oslFileError osl_error = osl_getSystemPathFromFileURL_Ex(aDirectoryUrl, &sys_path.pData); if (osl_error != osl_File_E_None) @@ -811,12 +811,12 @@ static oslFileError oslDoCopy(const sal_Char* pszSourceFileName, const sal_Char* { int nRet=0; - rtl::OString tmpDestFile; + OString tmpDestFile; if ( DestFileExists ) { //TODO: better pick a temp file name instead of adding .osl-tmp: // use the destination file to avoid EXDEV /* Cross-device link */ - tmpDestFile = rtl::OString(pszDestFileName) + ".osl-tmp"; + tmpDestFile = OString(pszDestFileName) + ".osl-tmp"; if (rename(pszDestFileName, tmpDestFile.getStr()) != 0) { int e = errno; diff --git a/sal/osl/unx/file_path_helper.cxx b/sal/osl/unx/file_path_helper.cxx index 923b588a20c9..7fc2effb5f03 100644 --- a/sal/osl/unx/file_path_helper.cxx +++ b/sal/osl/unx/file_path_helper.cxx @@ -28,14 +28,14 @@ const sal_Unicode FPH_CHAR_PATH_SEPARATOR = '/'; const sal_Unicode FPH_CHAR_DOT = '.'; const sal_Unicode FPH_CHAR_COLON = ':'; -static const rtl::OUString FPH_PATH_SEPARATOR() -{ return rtl::OUString(FPH_CHAR_PATH_SEPARATOR); } +static const OUString FPH_PATH_SEPARATOR() +{ return OUString(FPH_CHAR_PATH_SEPARATOR); } -static const rtl::OUString FPH_LOCAL_DIR_ENTRY() -{ return rtl::OUString(FPH_CHAR_DOT); } +static const OUString FPH_LOCAL_DIR_ENTRY() +{ return OUString(FPH_CHAR_DOT); } -static const rtl::OUString FPH_PARENT_DIR_ENTRY() -{ return rtl::OUString(".."); } +static const OUString FPH_PARENT_DIR_ENTRY() +{ return OUString(".."); } void osl_systemPathRemoveSeparator(rtl_uString* pustrPath) { @@ -62,7 +62,7 @@ void osl_systemPathEnsureSeparator(rtl_uString** ppustrPath) OSL_PRECOND((nullptr != ppustrPath) && (nullptr != *ppustrPath), "osl_systemPathEnsureSeparator: Invalid parameter"); if ((ppustrPath != nullptr) && (*ppustrPath != nullptr)) { - rtl::OUString path(*ppustrPath); + OUString path(*ppustrPath); sal_Int32 lp = path.getLength(); sal_Int32 i = path.lastIndexOf(FPH_CHAR_PATH_SEPARATOR); @@ -89,8 +89,8 @@ void osl_systemPathMakeAbsolutePath( const rtl_uString* pustrRelPath, rtl_uString** ppustrAbsolutePath) { - rtl::OUString base(rtl_uString_getStr(const_cast<rtl_uString*>(pustrBasePath))); - rtl::OUString rel(const_cast<rtl_uString*>(pustrRelPath)); + OUString base(rtl_uString_getStr(const_cast<rtl_uString*>(pustrBasePath))); + OUString rel(const_cast<rtl_uString*>(pustrRelPath)); if (!base.isEmpty()) osl_systemPathEnsureSeparator(&base.pData); @@ -108,11 +108,11 @@ void osl_systemPathGetFileNameOrLastDirectoryPart( OSL_PRECOND(pustrPath && ppustrFileNameOrLastDirPart, "osl_systemPathGetFileNameOrLastDirectoryPart: Invalid parameter"); - rtl::OUString path(const_cast<rtl_uString*>(pustrPath)); + OUString path(const_cast<rtl_uString*>(pustrPath)); osl_systemPathRemoveSeparator(path.pData); - rtl::OUString last_part; + OUString last_part; if (path.getLength() > 1 || (path.getLength() == 1 && path[0] != FPH_CHAR_PATH_SEPARATOR)) { @@ -130,7 +130,7 @@ bool osl_systemPathIsHiddenFileOrDirectoryEntry( if ((pustrPath == nullptr) || (pustrPath->length == 0)) return false; - rtl::OUString fdp; + OUString fdp; osl_systemPathGetFileNameOrLastDirectoryPart(pustrPath, &fdp.pData); return ((fdp.pData->length > 0) && @@ -143,7 +143,7 @@ bool osl_systemPathIsLocalOrParentDirectoryEntry( { OSL_PRECOND(pustrPath, "osl_systemPathIsLocalOrParentDirectoryEntry: Invalid parameter"); - rtl::OUString dirent; + OUString dirent; osl_systemPathGetFileNameOrLastDirectoryPart(pustrPath, &dirent.pData); @@ -161,7 +161,7 @@ public: returns the first path in list, no need to call reset first */ - path_list_iterator(const rtl::OUString& path_list, sal_Unicode list_separator = FPH_CHAR_COLON) : + path_list_iterator(const OUString& path_list, sal_Unicode list_separator = FPH_CHAR_COLON) : m_path_list(path_list), m_end(m_path_list.getStr() + m_path_list.getLength() + 1), m_separator(list_separator) @@ -191,9 +191,9 @@ public: return (m_path_segment_end >= m_end); } - rtl::OUString get_current_item() const + OUString get_current_item() const { - return rtl::OUString( + return OUString( m_path_segment_begin, (m_path_segment_end - m_path_segment_begin)); } @@ -211,7 +211,7 @@ private: } private: - rtl::OUString const m_path_list; + OUString const m_path_list; const sal_Unicode* m_end; const sal_Unicode m_separator; const sal_Unicode* m_path_segment_begin; @@ -226,13 +226,13 @@ bool osl_searchPath( OSL_PRECOND(pustrFilePath && pustrSearchPathList && ppustrPathFound, "osl_searchPath: Invalid parameter"); bool bfound = false; - rtl::OUString fp(const_cast<rtl_uString*>(pustrFilePath)); - rtl::OUString pl = rtl::OUString(const_cast<rtl_uString*>(pustrSearchPathList)); + OUString fp(const_cast<rtl_uString*>(pustrFilePath)); + OUString pl = OUString(const_cast<rtl_uString*>(pustrSearchPathList)); path_list_iterator pli(pl); while (!pli.done()) { - rtl::OUString p = pli.get_current_item(); + OUString p = pli.get_current_item(); osl::systemPathEnsureSeparator(p); p += fp; diff --git a/sal/osl/unx/file_path_helper.hxx b/sal/osl/unx/file_path_helper.hxx index 2b2fd8891256..18af761cb310 100644 --- a/sal/osl/unx/file_path_helper.hxx +++ b/sal/osl/unx/file_path_helper.hxx @@ -184,7 +184,7 @@ namespace osl ******************************************/ - inline void systemPathRemoveSeparator(/*inout*/ rtl::OUString& Path) + inline void systemPathRemoveSeparator(/*inout*/ OUString& Path) { osl_systemPathRemoveSeparator(Path.pData); } @@ -206,7 +206,7 @@ namespace osl ******************************************/ - inline void systemPathEnsureSeparator(/*inout*/ rtl::OUString& Path) + inline void systemPathEnsureSeparator(/*inout*/ OUString& Path) { osl_systemPathEnsureSeparator(&Path.pData); } @@ -225,7 +225,7 @@ namespace osl ******************************************/ - inline bool systemPathIsRelativePath(const rtl::OUString& Path) + inline bool systemPathIsRelativePath(const OUString& Path) { return osl_systemPathIsRelativePath(Path.pData); } @@ -265,9 +265,9 @@ namespace osl *****************************************/ inline void systemPathMakeAbsolutePath( - const rtl::OUString& BasePath, - const rtl::OUString& RelPath, - rtl::OUString& AbsolutePath) + const OUString& BasePath, + const OUString& RelPath, + OUString& AbsolutePath) { osl_systemPathMakeAbsolutePath( BasePath.pData, RelPath.pData, &AbsolutePath.pData); @@ -291,7 +291,7 @@ namespace osl *********************************************/ inline bool systemPathIsHiddenFileOrDirectoryEntry( - const rtl::OUString& Path) + const OUString& Path) { return osl_systemPathIsHiddenFileOrDirectoryEntry(Path.pData); } @@ -301,9 +301,9 @@ namespace osl ***********************************************/ inline bool searchPath( - const rtl::OUString& ustrFilePath, - const rtl::OUString& ustrSearchPathList, - rtl::OUString& ustrPathFound) + const OUString& ustrFilePath, + const OUString& ustrSearchPathList, + OUString& ustrPathFound) { return osl_searchPath( ustrFilePath.pData, diff --git a/sal/osl/unx/file_stat.cxx b/sal/osl/unx/file_stat.cxx index 7ba3d90a7037..b25bc3f1ed14 100644 --- a/sal/osl/unx/file_stat.cxx +++ b/sal/osl/unx/file_stat.cxx @@ -99,7 +99,7 @@ namespace required on network file systems not using unix semantics (AFS, see fdo#43095). */ - void set_file_access_rights(const rtl::OUString& file_path, oslFileStatus* pStat) + void set_file_access_rights(const OUString& file_path, oslFileStatus* pStat) { pStat->uValidFields |= osl_FileStatus_Mask_Attributes; @@ -110,7 +110,7 @@ namespace pStat->uAttributes |= osl_File_Attribute_Executable; } - void set_file_hidden_status(const rtl::OUString& file_path, oslFileStatus* pStat) + void set_file_hidden_status(const OUString& file_path, oslFileStatus* pStat) { pStat->uAttributes = osl::systemPathIsHiddenFileOrDirectoryEntry(file_path) ? osl_File_Attribute_Hidden : 0; pStat->uValidFields |= osl_FileStatus_Mask_Attributes; @@ -119,7 +119,7 @@ namespace /* the set_file_access_rights must be called after set_file_hidden_status(...) and set_file_access_mask(...) because of the hack in set_file_access_rights(...) */ void set_file_attributes( - const rtl::OUString& file_path, const struct stat& file_stat, const sal_uInt32 uFieldMask, oslFileStatus* pStat) + const OUString& file_path, const struct stat& file_stat, const sal_uInt32 uFieldMask, oslFileStatus* pStat) { set_file_hidden_status(file_path, pStat); set_file_access_mask(file_stat, pStat); @@ -168,9 +168,9 @@ namespace (field_mask & osl_FileStatus_Mask_Validate)); } - oslFileError set_link_target_url(const rtl::OUString& file_path, oslFileStatus* pStat) + oslFileError set_link_target_url(const OUString& file_path, oslFileStatus* pStat) { - rtl::OUString link_target; + OUString link_target; if (!osl::realpath(file_path, link_target)) return oslTranslateFileError(errno); @@ -183,12 +183,12 @@ namespace } oslFileError setup_osl_getFileStatus( - DirectoryItem_Impl * pImpl, oslFileStatus* pStat, rtl::OUString& file_path) + DirectoryItem_Impl * pImpl, oslFileStatus* pStat, OUString& file_path) { if ((pImpl == nullptr) || (pStat == nullptr)) return osl_File_E_INVAL; - file_path = rtl::OUString(pImpl->m_ustrFilePath); + file_path = OUString(pImpl->m_ustrFilePath); OSL_ASSERT(!file_path.isEmpty()); if (file_path.isEmpty()) return osl_File_E_INVAL; @@ -203,7 +203,7 @@ oslFileError SAL_CALL osl_getFileStatus(oslDirectoryItem Item, oslFileStatus* pS { DirectoryItem_Impl * pImpl = static_cast< DirectoryItem_Impl* >(Item); - rtl::OUString file_path; + OUString file_path; oslFileError osl_error = setup_osl_getFileStatus(pImpl, pStat, file_path); if (osl_error != osl_File_E_None) return osl_error; @@ -432,8 +432,8 @@ SAL_CALL osl_identicalDirectoryItem( oslDirectoryItem a, oslDirectoryItem b) struct stat a_stat, b_stat; - if (osl::lstat(rtl::OUString(pA->m_ustrFilePath), a_stat) != 0 || - osl::lstat(rtl::OUString(pB->m_ustrFilePath), b_stat) != 0) + if (osl::lstat(OUString(pA->m_ustrFilePath), a_stat) != 0 || + osl::lstat(OUString(pB->m_ustrFilePath), b_stat) != 0) return false; return (a_stat.st_ino == b_stat.st_ino); diff --git a/sal/osl/unx/file_url.cxx b/sal/osl/unx/file_url.cxx index 8e6f30f839d1..24fa04c7bfa6 100644 --- a/sal/osl/unx/file_url.cxx +++ b/sal/osl/unx/file_url.cxx @@ -454,7 +454,7 @@ namespace PATH_MAX else osl_File_E_NAMETOOLONG is the result */ - oslFileError osl_getAbsoluteFileURL_impl_(const rtl::OUString& unresolved_path, rtl::OUString& resolved_path) + oslFileError osl_getAbsoluteFileURL_impl_(const OUString& unresolved_path, OUString& resolved_path) { /* the given unresolved path must not exceed PATH_MAX */ if (unresolved_path.getLength() >= (PATH_MAX - 2)) @@ -569,7 +569,7 @@ namespace OSL_ASSERT(len < PATH_MAX); - resolved_path = rtl::OUString(path_resolved_so_far, len); + resolved_path = OUString(path_resolved_so_far, len); return osl_File_E_None; } @@ -584,13 +584,13 @@ oslFileError osl_getAbsoluteFileURL( /* Work around the below call to getSystemPathFromFileURL rejecting input that starts with "/" (for whatever reason it behaves that way; but changing that would start to break lots of tests at least) */ - rtl::OUString relUrl(ustrRelativeURL); + OUString relUrl(ustrRelativeURL); if (relUrl.startsWith("//")) relUrl = "file:" + relUrl; else if (relUrl.startsWith("/")) relUrl = "file://" + relUrl; - rtl::OUString unresolved_path; + OUString unresolved_path; FileBase::RC frc = FileBase::getSystemPathFromFileURL(relUrl, unresolved_path); if (frc != FileBase::E_None) @@ -598,18 +598,18 @@ oslFileError osl_getAbsoluteFileURL( if (systemPathIsRelativePath(unresolved_path)) { - rtl::OUString base_path; + OUString base_path; oslFileError rc = osl_getSystemPathFromFileURL_Ex(ustrBaseDirURL, &base_path.pData); if (rc != osl_File_E_None) return rc; - rtl::OUString abs_path; + OUString abs_path; systemPathMakeAbsolutePath(base_path, unresolved_path, abs_path); unresolved_path = abs_path; } - rtl::OUString resolved_path; + OUString resolved_path; oslFileError rc = osl_getAbsoluteFileURL_impl_(unresolved_path, resolved_path); if (rc == osl_File_E_None) { @@ -627,11 +627,11 @@ namespace detail { No separate error code if unicode to text conversion or getenv fails because for the caller there is no difference why a file could not be found in $PATH */ - bool find_in_PATH(const rtl::OUString& file_path, rtl::OUString& result) + bool find_in_PATH(const OUString& file_path, OUString& result) { bool bfound = false; - rtl::OUString path("PATH"); - rtl::OUString env_path; + OUString path("PATH"); + OUString env_path; if (osl_getEnvironment(path.pData, &env_path.pData) == osl_Process_E_None) bfound = osl::searchPath(file_path, env_path, result); @@ -647,23 +647,23 @@ namespace No separate error code if unicode to text conversion or getcwd fails because for the caller there is no difference why a file could not be found in CDW */ - bool find_in_CWD(const rtl::OUString& file_path, rtl::OUString& result) + bool find_in_CWD(const OUString& file_path, OUString& result) { bool bfound = false; - rtl::OUString cwd_url; + OUString cwd_url; if (osl_getProcessWorkingDir(&cwd_url.pData) == osl_Process_E_None) { - rtl::OUString cwd; + OUString cwd; FileBase::getSystemPathFromFileURL(cwd_url, cwd); bfound = osl::searchPath(file_path, cwd, result); } return bfound; } - bool find_in_searchPath(const rtl::OUString& file_path, rtl_uString* search_path, rtl::OUString& result) + bool find_in_searchPath(const OUString& file_path, rtl_uString* search_path, OUString& result) { - return (search_path && osl::searchPath(file_path, rtl::OUString(search_path), result)); + return (search_path && osl::searchPath(file_path, OUString(search_path), result)); } } @@ -673,7 +673,7 @@ oslFileError osl_searchFileURL(rtl_uString* ustrFilePath, rtl_uString* ustrSearc OSL_PRECOND(ustrFilePath && pustrURL, "osl_searchFileURL: invalid parameter"); FileBase::RC rc; - rtl::OUString file_path; + OUString file_path; // try to interpret search path as file url else assume it's a system path list rc = FileBase::getSystemPathFromFileURL(ustrFilePath, file_path); @@ -683,13 +683,13 @@ oslFileError osl_searchFileURL(rtl_uString* ustrFilePath, rtl_uString* ustrSearc return oslFileError(rc); bool bfound = false; - rtl::OUString result; + OUString result; if (find_in_searchPath(file_path, ustrSearchPath, result) || osl::detail::find_in_PATH(file_path, result) || find_in_CWD(file_path, result)) { - rtl::OUString resolved; + OUString resolved; if (osl::realpath(result, resolved)) { diff --git a/sal/osl/unx/nlsupport.cxx b/sal/osl/unx/nlsupport.cxx index c9377040894a..01225e631d82 100644 --- a/sal/osl/unx/nlsupport.cxx +++ b/sal/osl/unx/nlsupport.cxx @@ -807,8 +807,8 @@ rtl_TextEncoding osl_getTextEncodingFromLocale( rtl_Locale * pLocale ) void imp_getProcessLocale( rtl_Locale ** ppLocale ) { - rtl::OUString loc16(macosx_getLocale()); - rtl::OString locale; + OUString loc16(macosx_getLocale()); + OString locale; if (!loc16.convertToString( &locale, RTL_TEXTENCODING_UTF8, (RTL_UNICODETOTEXT_FLAGS_UNDEFINED_ERROR diff --git a/sal/osl/unx/nlsupport.hxx b/sal/osl/unx/nlsupport.hxx index 53a132487c82..dce5d65c3df8 100644 --- a/sal/osl/unx/nlsupport.hxx +++ b/sal/osl/unx/nlsupport.hxx @@ -29,7 +29,7 @@ namespace rtl { class OUString; } void imp_getProcessLocale( rtl_Locale ** ); #if defined IOS || defined MACOSX -rtl::OUString macosx_getLocale(); +OUString macosx_getLocale(); #endif #endif diff --git a/sal/osl/unx/osxlocale.cxx b/sal/osl/unx/osxlocale.cxx index b1bf89827212..7bd611d85c17 100644 --- a/sal/osl/unx/osxlocale.cxx +++ b/sal/osl/unx/osxlocale.cxx @@ -62,7 +62,7 @@ namespace return CFLocaleCreateCanonicalLocaleIdentifierFromString(kCFAllocatorDefault, sref); } - void append(rtl::OUStringBuffer & buffer, CFStringRef string) { + void append(OUStringBuffer & buffer, CFStringRef string) { CFIndex n = CFStringGetLength(string); CFStringGetCharacters( string, CFRangeMake(0, n), @@ -72,7 +72,7 @@ namespace /** Grab current locale from system. */ -rtl::OUString macosx_getLocale() +OUString macosx_getLocale() { CFStringRef sref = getProcessLocale(); CFStringGuard sGuard(sref); @@ -84,7 +84,7 @@ rtl::OUString macosx_getLocale() CFArrayRef subs = CFStringCreateArrayBySeparatingStrings(nullptr, sref, CFSTR("-")); CFArrayGuard arrGuard(subs); - rtl::OUStringBuffer buf; + OUStringBuffer buf; append(buf, static_cast<CFStringRef>(CFArrayGetValueAtIndex(subs, 0))); // country also available? Assumption: if the array contains more than one diff --git a/sal/osl/unx/process.cxx b/sal/osl/unx/process.cxx index 480bb264a267..fcb074d9b7c0 100644 --- a/sal/osl/unx/process.cxx +++ b/sal/osl/unx/process.cxx @@ -177,7 +177,7 @@ static void ChildStatusProc(void *pData) if (! INIT_GROUPS(data.m_name, data.m_gid) || (setuid(data.m_uid) != 0)) SAL_WARN("sal.osl", "Failed to change uid and guid: " << UnixErrnoString(errno)); - const rtl::OUString envVar("HOME"); + const OUString envVar("HOME"); osl_clearEnvironment(envVar.pData); } @@ -393,25 +393,25 @@ oslProcessError SAL_CALL osl_executeProcess_WithRedirectedIO( oslFileHandle *pErrorRead ) { - rtl::OUString image; + OUString image; if (ustrImageName == nullptr) { if (nArguments == 0) { return osl_Process_E_InvalidError; } - image = rtl::OUString::unacquired(ustrArguments); + image = OUString::unacquired(ustrArguments); } else { osl::FileBase::RC e = osl::FileBase::getSystemPathFromFileURL( - rtl::OUString::unacquired(&ustrImageName), image); + OUString::unacquired(&ustrImageName), image); if (e != osl::FileBase::E_None) { SAL_INFO( "sal.osl", "getSystemPathFromFileURL(" - << rtl::OUString::unacquired(&ustrImageName) + << OUString::unacquired(&ustrImageName) << ") failed with " << e); return osl_Process_E_Unknown; } @@ -419,7 +419,7 @@ oslProcessError SAL_CALL osl_executeProcess_WithRedirectedIO( if ((Options & osl_Process_SEARCHPATH) != 0) { - rtl::OUString path; + OUString path; if (osl::detail::find_in_PATH(image, path)) { image = path; @@ -452,7 +452,7 @@ oslProcessError SAL_CALL osl_executeProcess_WithRedirectedIO( { SAL_INFO( "sal.osl", - "FileURLToPath(" << rtl::OUString::unacquired(&ustrWorkDir) + "FileURLToPath(" << OUString::unacquired(&ustrWorkDir) << ") failed with " << e); return osl_Process_E_Unknown; } diff --git a/sal/osl/unx/process_impl.cxx b/sal/osl/unx/process_impl.cxx index b232695cd57f..2b59e9f3147c 100644 --- a/sal/osl/unx/process_impl.cxx +++ b/sal/osl/unx/process_impl.cxx @@ -224,7 +224,7 @@ void SAL_CALL osl_setCommandArgs (int argc, char ** argv) /* see @ osl_getExecutableFile(). */ if (rtl_ustr_indexOfChar (rtl_uString_getStr(ppArgs[0]), '/') == -1) { - const rtl::OUString PATH ("PATH"); + const OUString PATH ("PATH"); rtl_uString * pSearchPath = nullptr; osl_getEnvironment (PATH.pData, &pSearchPath); diff --git a/sal/osl/unx/uunxapi.cxx b/sal/osl/unx/uunxapi.cxx index a9aaa1f29564..ea48309c3b94 100644 --- a/sal/osl/unx/uunxapi.cxx +++ b/sal/osl/unx/uunxapi.cxx @@ -31,9 +31,9 @@ #include <osl/detail/android-bootstrap.h> #endif -static rtl::OString OUStringToOString(const rtl_uString* s) +static OString OUStringToOString(const rtl_uString* s) { - return rtl::OUStringToOString(rtl::OUString(const_cast<rtl_uString*>(s)), + return OUStringToOString(OUString(const_cast<rtl_uString*>(s)), osl_getThreadTextEncoding()); } @@ -142,16 +142,16 @@ typedef void accessFilePathState; #ifdef MACOSX /* * Helper function for resolving Mac native alias files (not the same as unix alias files) - * and to return the resolved alias as rtl::OString + * and to return the resolved alias as OString */ -static rtl::OString macxp_resolveAliasAndConvert(rtl::OString const & p) +static OString macxp_resolveAliasAndConvert(OString const & p) { sal_Char path[PATH_MAX]; if (p.getLength() < PATH_MAX) { strcpy(path, p.getStr()); macxp_resolveAlias(path, PATH_MAX); - return rtl::OString(path); + return OString(path); } return p; } @@ -159,7 +159,7 @@ static rtl::OString macxp_resolveAliasAndConvert(rtl::OString const & p) int access_u(const rtl_uString* pustrPath, int mode) { - rtl::OString fn = OUStringToOString(pustrPath); + OString fn = OUStringToOString(pustrPath); #ifdef ANDROID if (fn == "/assets" || fn.startsWith("/assets/")) { @@ -197,7 +197,7 @@ int access_u(const rtl_uString* pustrPath, int mode) bool realpath_u(const rtl_uString* pustrFileName, rtl_uString** ppustrResolvedName) { - rtl::OString fn = OUStringToOString(pustrFileName); + OString fn = OUStringToOString(pustrFileName); #ifdef ANDROID if (fn == "/assets" || fn.startsWith("/assets/")) { @@ -229,7 +229,7 @@ bool realpath_u(const rtl_uString* pustrFileName, rtl_uString** ppustrResolvedNa if (bRet) { - rtl::OUString resolved = rtl::OStringToOUString(rtl::OString(static_cast<sal_Char*>(rp)), + OUString resolved = OStringToOUString(OString(static_cast<sal_Char*>(rp)), osl_getThreadTextEncoding()); rtl_uString_assign(ppustrResolvedName, resolved.pData); @@ -292,7 +292,7 @@ int lstat_c(const char* cpPath, struct stat* buf) int lstat_u(const rtl_uString* pustrPath, struct stat* buf) { - rtl::OString fn = OUStringToOString(pustrPath); + OString fn = OUStringToOString(pustrPath); #ifdef MACOSX fn = macxp_resolveAliasAndConvert(fn); @@ -303,7 +303,7 @@ int lstat_u(const rtl_uString* pustrPath, struct stat* buf) int mkdir_u(const rtl_uString* path, mode_t mode) { - rtl::OString fn = OUStringToOString(path); + OString fn = OUStringToOString(path); accessFilePathState *state = prepare_to_access_file_path(fn.getStr()); @@ -388,7 +388,7 @@ int ftruncate_with_name(int fd, sal_uInt64 uSize, rtl_String* path) * abstraction layer that keeps the pathname around. */ - rtl::OString fn = rtl::OString(path); + OString fn = OString(path); #ifdef MACOSX fn = macxp_resolveAliasAndConvert(fn); diff --git a/sal/osl/unx/uunxapi.hxx b/sal/osl/unx/uunxapi.hxx index 4be4fbb28748..5030b75ca214 100644 --- a/sal/osl/unx/uunxapi.hxx +++ b/sal/osl/unx/uunxapi.hxx @@ -60,7 +60,7 @@ int ftruncate_with_name(int fd, sal_uInt64 uSize, rtl_String* path); namespace osl { - inline int access(const rtl::OUString& ustrPath, int mode) + inline int access(const OUString& ustrPath, int mode) { return access_u(ustrPath.pData, mode); } @@ -79,18 +79,18 @@ namespace osl **********************************/ inline bool realpath( - const rtl::OUString& ustrFileName, - rtl::OUString& ustrResolvedName) + const OUString& ustrFileName, + OUString& ustrResolvedName) { return realpath_u(ustrFileName.pData, &ustrResolvedName.pData); } - inline int lstat(const rtl::OUString& ustrPath, struct stat& buf) + inline int lstat(const OUString& ustrPath, struct stat& buf) { return lstat_u(ustrPath.pData, &buf); } - inline int mkdir(const rtl::OUString& aPath, mode_t aMode) + inline int mkdir(const OUString& aPath, mode_t aMode) { return mkdir_u(aPath.pData, aMode); } |