summaryrefslogtreecommitdiff
path: root/sal/qa/osl
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-10-23 12:06:00 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-10-24 14:43:34 +0200
commit6f50961e69406a17d6ec998956a6b33208b1001b (patch)
tree413c83df969e73c5cba1e11ef3740afc748ee1f5 /sal/qa/osl
parent4e729de73f2947155248f8df5897380611b87917 (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/qa/osl')
-rw-r--r--sal/qa/osl/condition/osl_Condition_Const.h2
-rw-r--r--sal/qa/osl/file/osl_File_Const.h2
-rw-r--r--sal/qa/osl/file/osl_old_test_file.cxx2
-rw-r--r--sal/qa/osl/file/test_cpy_wrt_file.cxx6
-rw-r--r--sal/qa/osl/module/osl_Module.cxx24
-rw-r--r--sal/qa/osl/pipe/osl_Pipe.cxx21
-rw-r--r--sal/qa/osl/process/osl_Thread.cxx8
-rw-r--r--sal/qa/osl/process/osl_process.cxx12
-rw-r--r--sal/qa/osl/profile/osl_old_testprofile.cxx6
-rw-r--r--sal/qa/osl/security/osl_Security.cxx50
-rw-r--r--sal/qa/osl/security/osl_Security_Const.h6
11 files changed, 63 insertions, 76 deletions
diff --git a/sal/qa/osl/condition/osl_Condition_Const.h b/sal/qa/osl/condition/osl_Condition_Const.h
index 61082aaba791..6bcf9e73018d 100644
--- a/sal/qa/osl/condition/osl_Condition_Const.h
+++ b/sal/qa/osl/condition/osl_Condition_Const.h
@@ -38,7 +38,7 @@
// condition names
-::rtl::OUString aTestCon( "testcondition" );
+OUString aTestCon( "testcondition" );
const char pTestString[17] = "Sun Microsystems";
diff --git a/sal/qa/osl/file/osl_File_Const.h b/sal/qa/osl/file/osl_File_Const.h
index ed77b6d4484e..40bb81fb807a 100644
--- a/sal/qa/osl/file/osl_File_Const.h
+++ b/sal/qa/osl/file/osl_File_Const.h
@@ -109,7 +109,7 @@ OUString aUserDirectorySys( TEST_PLATFORM_ROOT TEST_PLATFORM_TEMP "" );
// common used URL:temp, canonical, root, relative, link,etc
OUString aCanURL1( FILE_PREFIX TEST_PLATFORM TEST_PLATFORM_TEMP "/canonical.name" );
-rtl::OUString aCanURL2(
+OUString aCanURL2(
RTL_CONSTASCII_USTRINGPARAM("ca@#;+.,$///78no\0ni..name"));
OUString aCanURL3( "ca@#;+.,$//tmp/678nonical//name" );
OUString aCanURL4( "canonical.name" );
diff --git a/sal/qa/osl/file/osl_old_test_file.cxx b/sal/qa/osl/file/osl_old_test_file.cxx
index f093d5fe1bb8..ee89b836d78b 100644
--- a/sal/qa/osl/file/osl_old_test_file.cxx
+++ b/sal/qa/osl/file/osl_old_test_file.cxx
@@ -78,8 +78,6 @@ const char * const aSource2[ ] =
};
#endif
-using ::rtl::OUString;
-
void oldtestfile::test_file_001()
{
#ifndef _WIN32
diff --git a/sal/qa/osl/file/test_cpy_wrt_file.cxx b/sal/qa/osl/file/test_cpy_wrt_file.cxx
index a4c1ba44b0f6..41e9f88c9fea 100644
--- a/sal/qa/osl/file/test_cpy_wrt_file.cxx
+++ b/sal/qa/osl/file/test_cpy_wrt_file.cxx
@@ -35,7 +35,7 @@ public:
FileBase::RC err;
//create a tempfile
- rtl::OUString aTmpFile;
+ OUString aTmpFile;
err = FileBase::createTempFile(nullptr, nullptr, &aTmpFile);
CPPUNIT_ASSERT_EQUAL_MESSAGE("temp File creation failed", osl::FileBase::E_None, err);
@@ -43,8 +43,8 @@ public:
File tmp_file(aTmpFile);
err = tmp_file.open(osl_File_OpenFlag_Write | osl_File_OpenFlag_Create);
- rtl::OString sErrorMsg = "Expected that '";
- sErrorMsg += rtl::OUStringToOString(aTmpFile, RTL_TEXTENCODING_ASCII_US);
+ OString sErrorMsg = "Expected that '";
+ sErrorMsg += OUStringToOString(aTmpFile, RTL_TEXTENCODING_ASCII_US);
sErrorMsg += "' would exist!";
CPPUNIT_ASSERT_EQUAL_MESSAGE(sErrorMsg.getStr(), FileBase::E_EXIST, err);
diff --git a/sal/qa/osl/module/osl_Module.cxx b/sal/qa/osl/module/osl_Module.cxx
index 9910925e3c5a..97d5cc1beaf4 100644
--- a/sal/qa/osl/module/osl_Module.cxx
+++ b/sal/qa/osl/module/osl_Module.cxx
@@ -23,19 +23,17 @@
using namespace osl;
-using ::rtl::OUString;
-
/** get dll file URL.
*/
-static ::rtl::OUString getDllURL()
+static OUString getDllURL()
{
#if defined(_WIN32) // lib in Unix and lib in Windows are not same in file name.
- ::rtl::OUString libPath( "test_Module_DLL.dll" );
+ OUString libPath( "test_Module_DLL.dll" );
#else
- ::rtl::OUString libPath( "libtest_Module_DLL.so" );
+ OUString libPath( "libtest_Module_DLL.so" );
#endif
- ::rtl::OUString dirPath, dllPath;
+ OUString dirPath, dllPath;
osl::Module::getUrlFromAddress(
reinterpret_cast<oslGenericFunction>(&getDllURL), dirPath);
dirPath = dirPath.copy( 0, dirPath.lastIndexOf('/') + 1);
@@ -61,7 +59,7 @@ namespace osl_Module
/** testing the methods:
Module();
- Module( const ::rtl::OUString& strModuleName, sal_Int32 nRtldMode = SAL_LOADMODULE_DEFAULT);
+ Module( const OUString& strModuleName, sal_Int32 nRtldMode = SAL_LOADMODULE_DEFAULT);
*/
class ctors : public CppUnit::TestFixture
{
@@ -105,7 +103,7 @@ namespace osl_Module
}; // class ctors
/** testing the methods:
- static sal_Bool getUrlFromAddress(void * addr, ::rtl::OUString & libraryUrl)
+ static sal_Bool getUrlFromAddress(void * addr, OUString & libraryUrl)
*/
class getUrlFromAddress : public CppUnit::TestFixture
{
@@ -164,7 +162,7 @@ namespace osl_Module
}; // class getUrlFromAddress
/** testing the method:
- sal_Bool SAL_CALL load( const ::rtl::OUString& strModuleName,
+ sal_Bool SAL_CALL load( const OUString& strModuleName,
sal_Int32 nRtldMode = SAL_LOADMODULE_DEFAULT)
*/
class load : public CppUnit::TestFixture
@@ -252,7 +250,7 @@ namespace osl_Module
}; // class is
/** testing the methods:
- void* SAL_CALL getSymbol( const ::rtl::OUString& strSymbolName)
+ void* SAL_CALL getSymbol( const OUString& strSymbolName)
*/
class getSymbol : public CppUnit::TestFixture
{
@@ -312,7 +310,7 @@ namespace osl_Module
#if !defined( MACOSX )
// TODO: Find out why this fails on Mac OS X
::osl::Module aMod( getDllURL( ) );
- ::rtl::OUString funcName( "firstfunc" );
+ OUString funcName( "firstfunc" );
FuncPtr pFunc = reinterpret_cast<FuncPtr>(osl_getSymbol( static_cast<oslModule>(aMod), funcName.pData ));
bRes = false;
@@ -333,7 +331,7 @@ namespace osl_Module
}; // class optr_oslModule
/** testing the methods:
- oslGenericFunction SAL_CALL getFunctionSymbol( const ::rtl::OUString& ustrFunctionSymbolName )
+ oslGenericFunction SAL_CALL getFunctionSymbol( const OUString& ustrFunctionSymbolName )
*/
class getFunctionSymbol : public CppUnit::TestFixture
{
@@ -346,7 +344,7 @@ namespace osl_Module
// TODO: Find out why this fails on Mac OS X
::osl::Module aMod( getDllURL( ) );
oslGenericFunction oslFunc = aMod.getFunctionSymbol( "firstfunc" );
- ::rtl::OUString aLibraryURL;
+ OUString aLibraryURL;
bRes = ::osl::Module::getUrlFromAddress( oslFunc, aLibraryURL);
aMod.unload();
CPPUNIT_ASSERT_MESSAGE( "#test comment#: load a dll and get its function addr and get its URL.",
diff --git a/sal/qa/osl/pipe/osl_Pipe.cxx b/sal/qa/osl/pipe/osl_Pipe.cxx
index d50921d4ff8c..482ae750f36f 100644
--- a/sal/qa/osl/pipe/osl_Pipe.cxx
+++ b/sal/qa/osl/pipe/osl_Pipe.cxx
@@ -39,9 +39,6 @@
using namespace osl;
-using ::rtl::OUString;
-using ::rtl::OString;
-
/** print last error of pipe system.
*/
static void printPipeError( ::osl::Pipe const & aPipe )
@@ -90,9 +87,9 @@ static void printPipeError( ::osl::Pipe const & aPipe )
// pipe name and transfer contents
-const rtl::OUString aTestPipeName("testpipe2");
-const rtl::OUString aTestPipe1("testpipe1");
-const rtl::OUString aTestString("Sun Microsystems");
+const OUString aTestPipeName("testpipe2");
+const OUString aTestPipe1("testpipe1");
+const OUString aTestString("Sun Microsystems");
const OString m_pTestString1("Sun Microsystems");
const OString m_pTestString2("test pipe PASS/OK");
@@ -108,8 +105,8 @@ namespace osl_Pipe
/** testing the methods:
inline Pipe();
- inline Pipe(const ::rtl::OUString& strName, oslPipeOptions Options);
- inline Pipe(const ::rtl::OUString& strName, oslPipeOptions Options,const Security & rSecurity);
+ inline Pipe(const OUString& strName, oslPipeOptions Options);
+ inline Pipe(const OUString& strName, oslPipeOptions Options,const Security & rSecurity);
inline Pipe(const Pipe& pipe);
inline Pipe(oslPipe pipe, __sal_NoAcquire noacquire );
inline Pipe(oslPipe Pipe);
@@ -264,9 +261,9 @@ namespace osl_Pipe
};
/** testing the methods:
- inline sal_Bool create( const ::rtl::OUString & strName,
+ inline sal_Bool create( const OUString & strName,
oslPipeOptions Options, const Security &rSec );
- nline sal_Bool create( const ::rtl::OUString & strName,
+ nline sal_Bool create( const OUString & strName,
oslPipeOptions Options = osl_Pipe_OPEN );
*/
class create : public CppUnit::TestFixture
@@ -611,8 +608,8 @@ namespace osl_StreamPipe
inline StreamPipe();
inline StreamPipe(oslPipe Pipe);
inline StreamPipe(const StreamPipe& Pipe);
- inline StreamPipe(const ::rtl::OUString& strName, oslPipeOptions Options = osl_Pipe_OPEN);
- inline StreamPipe(const ::rtl::OUString& strName, oslPipeOptions Options, const Security &rSec );
+ inline StreamPipe(const OUString& strName, oslPipeOptions Options = osl_Pipe_OPEN);
+ inline StreamPipe(const OUString& strName, oslPipeOptions Options, const Security &rSec );
inline StreamPipe( oslPipe pipe, __sal_NoAcquire noacquire );
*/
class ctors : public CppUnit::TestFixture
diff --git a/sal/qa/osl/process/osl_Thread.cxx b/sal/qa/osl/process/osl_Thread.cxx
index 770b82691286..bfd17db06174 100644
--- a/sal/qa/osl/process/osl_Thread.cxx
+++ b/sal/qa/osl/process/osl_Thread.cxx
@@ -48,8 +48,6 @@
using namespace osl;
-using ::rtl::OString;
-
// Small stopwatch
class StopWatch {
TimeValue t1,t2; // Start and stoptime
@@ -935,9 +933,9 @@ namespace osl_Thread
{
public:
// insert your test code here.
- rtl::OString getPrioName(oslThreadPriority _aPriority)
+ OString getPrioName(oslThreadPriority _aPriority)
{
- rtl::OString sPrioStr;
+ OString sPrioStr;
switch (_aPriority)
{
case osl_Thread_PriorityHighest:
@@ -997,7 +995,7 @@ namespace osl_Thread
sal_Int32 nValueNormal2 = 0;
nValueNormal2 = p2Thread->getValue();
- rtl::OString sPrio = getPrioName(_aPriority);
+ OString sPrio = getPrioName(_aPriority);
t_print("After 10 tenth seconds\n");
t_print("nValue in %s Prio Thread is %d\n",sPrio.getStr(), static_cast<int>(nValueNormal));
diff --git a/sal/qa/osl/process/osl_process.cxx b/sal/qa/osl/process/osl_process.cxx
index 1f484060e393..f08777d4f1ac 100644
--- a/sal/qa/osl/process/osl_process.cxx
+++ b/sal/qa/osl/process/osl_process.cxx
@@ -65,15 +65,11 @@
using namespace osl;
-using ::rtl::OUString;
-using ::rtl::OUStringToOString;
-using ::rtl::OString;
-
/** get binary Path.
*/
-static ::rtl::OUString getExecutablePath()
+static OUString getExecutablePath()
{
- ::rtl::OUString dirPath;
+ OUString dirPath;
osl::Module::getUrlFromAddress(
reinterpret_cast<oslGenericFunction>(&getExecutablePath), dirPath);
dirPath = dirPath.copy( 0, dirPath.lastIndexOf('/') );
@@ -405,9 +401,9 @@ public:
{
oslProcess process;
#if defined(_WIN32)
- rtl::OUString suBatch = suCWD + "/batch.bat";
+ OUString suBatch = suCWD + "/batch.bat";
#else
- rtl::OUString suBatch = suCWD + "/batch.sh";
+ OUString suBatch = suCWD + "/batch.sh";
#endif
oslProcessError osl_error = osl_executeProcess(
suBatch.pData,
diff --git a/sal/qa/osl/profile/osl_old_testprofile.cxx b/sal/qa/osl/profile/osl_old_testprofile.cxx
index 46201a258fa3..d1556bb157ae 100644
--- a/sal/qa/osl/profile/osl_old_testprofile.cxx
+++ b/sal/qa/osl/profile/osl_old_testprofile.cxx
@@ -40,11 +40,11 @@ namespace osl_Profile
void oldtests::test_profile()
{
- rtl::OUString baseUrl;
+ OUString baseUrl;
CPPUNIT_ASSERT(rtl::Bootstrap::get("UserInstallation", baseUrl));
// successful write
- oslProfile hProfile = osl_openProfile( rtl::OUString(baseUrl + "/soffice.ini").pData, osl_Profile_WRITELOCK );
+ oslProfile hProfile = osl_openProfile( OUString(baseUrl + "/soffice.ini").pData, osl_Profile_WRITELOCK );
CPPUNIT_ASSERT(hProfile != nullptr);
CPPUNIT_ASSERT_MESSAGE(
"cannot write into init file",
@@ -52,7 +52,7 @@ void oldtests::test_profile()
CPPUNIT_ASSERT(osl_closeProfile( hProfile ));
// unsuccessful open
- CPPUNIT_ASSERT_EQUAL(oslProfile(nullptr), osl_openProfile( rtl::OUString(baseUrl + "/not_existing_path/soffice.ini").pData, osl_Profile_WRITELOCK ));
+ CPPUNIT_ASSERT_EQUAL(oslProfile(nullptr), osl_openProfile( OUString(baseUrl + "/not_existing_path/soffice.ini").pData, osl_Profile_WRITELOCK ));
}
} // namespace osl_Profile
diff --git a/sal/qa/osl/security/osl_Security.cxx b/sal/qa/osl/security/osl_Security.cxx
index 85b0e8f0fb0b..8f9980844530 100644
--- a/sal/qa/osl/security/osl_Security.cxx
+++ b/sal/qa/osl/security/osl_Security.cxx
@@ -38,12 +38,12 @@ using namespace rtl;
/** print a UNI_CODE String.
*/
-static void printUString( const ::rtl::OUString & str )
+static void printUString( const OUString & str )
{
- rtl::OString aString;
+ OString aString;
//t_print("#printUString_u# " );
- aString = ::rtl::OUStringToOString( str, RTL_TEXTENCODING_ASCII_US );
+ aString = OUStringToOString( str, RTL_TEXTENCODING_ASCII_US );
t_print("%s\n", aString.getStr( ) );
}
@@ -74,11 +74,11 @@ namespace osl_Security
}; // class ctors
/** testing the methods:
- inline sal_Bool SAL_CALL logonUser(const ::rtl::OUString& strName,
- const ::rtl::OUString& strPasswd);
- inline sal_Bool SAL_CALL logonUser(const ::rtl::OUString & strName,
- const ::rtl::OUString & strPasswd,
- const ::rtl::OUString & strFileServer);
+ inline sal_Bool SAL_CALL logonUser(const OUString& strName,
+ const OUString& strPasswd);
+ inline sal_Bool SAL_CALL logonUser(const OUString & strName,
+ const OUString & strPasswd,
+ const OUString & strFileServer);
*/
class logonUser : public CppUnit::TestFixture
{
@@ -118,7 +118,7 @@ namespace osl_Security
}; // class logonUser
/** testing the method:
- inline sal_Bool Security::getUserIdent( rtl::OUString& strIdent) const
+ inline sal_Bool Security::getUserIdent( OUString& strIdent) const
*/
class getUserIdent : public CppUnit::TestFixture
{
@@ -128,14 +128,14 @@ namespace osl_Security
void getUserIdent_001( )
{
::osl::Security aSec;
- ::rtl::OUString strID;
+ OUString strID;
bRes = aSec.getUserIdent( strID );
- rtl::OStringBuffer aMessage;
+ OStringBuffer aMessage;
aMessage.append("strUserID: ");
- aMessage.append(rtl::OUStringToOString(strUserID, osl_getThreadTextEncoding()));
+ aMessage.append(OUStringToOString(strUserID, osl_getThreadTextEncoding()));
aMessage.append(", strID: ");
- aMessage.append(rtl::OUStringToOString(strID, osl_getThreadTextEncoding()));
+ aMessage.append(OUStringToOString(strID, osl_getThreadTextEncoding()));
aMessage.append(", bRes: ");
aMessage.append(bRes);
@@ -149,7 +149,7 @@ namespace osl_Security
}; // class getUserIdent
/** testing the method:
- inline sal_Bool SAL_CALL getUserName( ::rtl::OUString& strName) const;
+ inline sal_Bool SAL_CALL getUserName( OUString& strName) const;
*/
class getUserName : public CppUnit::TestFixture
{
@@ -160,9 +160,9 @@ namespace osl_Security
{
::osl::Security aSec;
#ifdef _WIN32
- ::rtl::OUString strName( strUserName ), strGetName;
+ OUString strName( strUserName ), strGetName;
#else
- ::rtl::OUString strName( strUserName ), strGetName;
+ OUString strName( strUserName ), strGetName;
#endif
bRes = aSec.getUserName( strGetName );
@@ -183,7 +183,7 @@ namespace osl_Security
}; // class getUserName
/** testing the method:
- inline sal_Bool Security::getConfigDir( rtl::OUString& strDirectory ) const
+ inline sal_Bool Security::getConfigDir( OUString& strDirectory ) const
*/
class getConfigDir : public CppUnit::TestFixture
{
@@ -193,7 +193,7 @@ namespace osl_Security
void getConfigDir_001( )
{
::osl::Security aSec;
- ::rtl::OUString strConfig;
+ OUString strConfig;
bRes = aSec.getConfigDir( strConfig );
CPPUNIT_ASSERT_MESSAGE( "failed to find a ConfigDir!", bRes );
@@ -279,9 +279,9 @@ namespace osl_Security
void loginUserOnFileServer_001( )
{
- rtl::OUString suUserName;
- rtl::OUString suPassword;
- rtl::OUString suFileServer;
+ OUString suUserName;
+ OUString suPassword;
+ OUString suFileServer;
::osl::Security aSec;
oslSecurity pSec = aSec.getHandle();
@@ -342,14 +342,14 @@ void MyTestPlugInImpl::initialize( CPPUNIT_NS::TestFactoryRegistry *,
strUserID = OUString::number( getuid( ) );
/// get user Name;
- strUserName = ::rtl::OUString::createFromAscii( pw->pw_name );
+ strUserName = OUString::createFromAscii( pw->pw_name );
/// get home directory;
char *pw_dir = pw->pw_dir;
if( getenv( "FAKEROOTKEY" ) )
pw_dir = getenv("HOME");
CPPUNIT_ASSERT_EQUAL_MESSAGE( "#Convert from system path to URL failed.",
- ::osl::File::E_None, ::osl::File::getFileURLFromSystemPath( ::rtl::OUString::createFromAscii( pw_dir ), strHomeDirectory ) );
+ ::osl::File::E_None, ::osl::File::getFileURLFromSystemPath( OUString::createFromAscii( pw_dir ), strHomeDirectory ) );
/// get config directory;
strConfigDirectory = strHomeDirectory.copy(0);
@@ -553,12 +553,12 @@ void MyTestPlugInImpl::initialize( CPPUNIT_NS::TestFactoryRegistry *,
t_print("Administrator.\n" );
/// get and display forwarded text if available.
- rtl::OUString args[ 3 ];
+ OUString args[ 3 ];
int argsCount = 0;
sal_uInt32 n = rtl_getAppCommandArgCount();
for (sal_uInt32 i = 0; i < n; ++i)
{
- rtl::OUString arg;
+ OUString arg;
rtl_getAppCommandArg(i, &arg.pData);
if( arg.startsWith("-") )
continue;
diff --git a/sal/qa/osl/security/osl_Security_Const.h b/sal/qa/osl/security/osl_Security_Const.h
index 83dd21f31f14..58f578814693 100644
--- a/sal/qa/osl/security/osl_Security_Const.h
+++ b/sal/qa/osl/security/osl_Security_Const.h
@@ -47,9 +47,9 @@
#define BUFSIZE 1024
const char pTestString[17] = "Sun Microsystems";
-::rtl::OUString aLogonUser, aLogonPasswd, aFileServer, aStringForward;
-::rtl::OUString strUserName, strComputerName, strHomeDirectory;
-::rtl::OUString strConfigDirectory, strUserID;
+OUString aLogonUser, aLogonPasswd, aFileServer, aStringForward;
+OUString strUserName, strComputerName, strHomeDirectory;
+OUString strConfigDirectory, strUserID;
bool isAdmin = false;