diff options
author | Julien Nabet <serval2412@yahoo.fr> | 2011-03-03 22:09:48 +0100 |
---|---|---|
committer | Julien Nabet <serval2412@yahoo.fr> | 2011-03-03 22:09:48 +0100 |
commit | bcbb8d7962cf94993af56970b5625adf2875c636 (patch) | |
tree | 6d5b22a410fe712fa8c2a15dca77339a51e30d4f /sal | |
parent | b406c51330ebea0459f38b0073f0783410b072f3 (diff) |
Remove "using namespace ::rtl"
Diffstat (limited to 'sal')
-rw-r--r-- | sal/qa/osl/file/osl_File.cxx | 6 | ||||
-rw-r--r-- | sal/qa/osl/file/osl_old_test_file.cxx | 5 | ||||
-rw-r--r-- | sal/qa/osl/file/test_cpy_wrt_file.cxx | 5 | ||||
-rw-r--r-- | sal/qa/osl/socket/osl_AcceptorSocket.cxx | 2 | ||||
-rw-r--r-- | sal/qa/osl/socket/osl_ConnectorSocket.cxx | 2 | ||||
-rw-r--r-- | sal/qa/osl/socket/osl_DatagramSocket.cxx | 3 | ||||
-rw-r--r-- | sal/qa/osl/socket/osl_Socket2.cxx | 2 | ||||
-rw-r--r-- | sal/qa/osl/socket/osl_SocketAddr.cxx | 5 | ||||
-rw-r--r-- | sal/qa/osl/socket/osl_StreamSocket.cxx | 81 |
9 files changed, 24 insertions, 87 deletions
diff --git a/sal/qa/osl/file/osl_File.cxx b/sal/qa/osl/file/osl_File.cxx index af6ca18643c4..40eb7bc767f6 100644 --- a/sal/qa/osl/file/osl_File.cxx +++ b/sal/qa/osl/file/osl_File.cxx @@ -47,7 +47,11 @@ #include <cppunit/plugin/TestPlugIn.h> using namespace osl; -using namespace rtl; + +using ::rtl::OUString; +using ::rtl::OUStringToOString; +using ::rtl::OString; +using ::rtl::OStringToOUString; //------------------------------------------------------------------------ // helper functions diff --git a/sal/qa/osl/file/osl_old_test_file.cxx b/sal/qa/osl/file/osl_old_test_file.cxx index 3806a98a7d3d..0b2f4d5664ca 100644 --- a/sal/qa/osl/file/osl_old_test_file.cxx +++ b/sal/qa/osl/file/osl_old_test_file.cxx @@ -110,8 +110,9 @@ const char * const aSource3[ ] = 0,0 }; -using namespace rtl; - +using ::rtl::OUString; +using ::rtl::OUStringToOString; +using ::rtl::OString; void oldtestfile::test_file_001() { #ifdef WIN32 diff --git a/sal/qa/osl/file/test_cpy_wrt_file.cxx b/sal/qa/osl/file/test_cpy_wrt_file.cxx index cfa724660d3a..891163120489 100644 --- a/sal/qa/osl/file/test_cpy_wrt_file.cxx +++ b/sal/qa/osl/file/test_cpy_wrt_file.cxx @@ -37,7 +37,10 @@ #include <rtl/ustring.hxx> using namespace osl; -using namespace rtl; + +using ::rtl::OUString; +using ::rtl::OUStringToOString; +using ::rtl::OString; //Use to silence OSL_ warnings for a deliberate error extern "C" void SAL_CALL suppressOslDebugMessage( const sal_Char *, sal_Int32, const sal_Char * ) diff --git a/sal/qa/osl/socket/osl_AcceptorSocket.cxx b/sal/qa/osl/socket/osl_AcceptorSocket.cxx index e6ce837bbbbe..9d9c1819b390 100644 --- a/sal/qa/osl/socket/osl_AcceptorSocket.cxx +++ b/sal/qa/osl/socket/osl_AcceptorSocket.cxx @@ -65,7 +65,7 @@ #include "sockethelper.hxx" using namespace osl; -using namespace rtl; +using ::rtl::OUString; #define IP_PORT_FTP 21 #define IP_PORT_MYPORT9 8897 diff --git a/sal/qa/osl/socket/osl_ConnectorSocket.cxx b/sal/qa/osl/socket/osl_ConnectorSocket.cxx index 6bfc718c9967..1e03418104e8 100644 --- a/sal/qa/osl/socket/osl_ConnectorSocket.cxx +++ b/sal/qa/osl/socket/osl_ConnectorSocket.cxx @@ -65,7 +65,7 @@ #include "sockethelper.hxx" using namespace osl; -using namespace rtl; +using ::rtl::OUString; #define IP_PORT_MYPORT2 8883 #define IP_PORT_FTP 21 diff --git a/sal/qa/osl/socket/osl_DatagramSocket.cxx b/sal/qa/osl/socket/osl_DatagramSocket.cxx index 9ff799e95e98..b76c6dffcc33 100644 --- a/sal/qa/osl/socket/osl_DatagramSocket.cxx +++ b/sal/qa/osl/socket/osl_DatagramSocket.cxx @@ -60,7 +60,8 @@ #include "sockethelper.hxx" using namespace osl; -using namespace rtl; + +using ::rtl::OUString; #define IP_PORT_MYPORT9 8897 #define IP_PORT_MYPORT10 8898 diff --git a/sal/qa/osl/socket/osl_Socket2.cxx b/sal/qa/osl/socket/osl_Socket2.cxx index a6a681a8a731..eb96d8bc965a 100644 --- a/sal/qa/osl/socket/osl_Socket2.cxx +++ b/sal/qa/osl/socket/osl_Socket2.cxx @@ -60,7 +60,7 @@ #include "sockethelper.hxx" using namespace osl; -using namespace rtl; +using ::rtl::OUString; #define IP_PORT_FTP 21 #define IP_PORT_TELNET 23 diff --git a/sal/qa/osl/socket/osl_SocketAddr.cxx b/sal/qa/osl/socket/osl_SocketAddr.cxx index 086123805e4f..7dc0a93374c7 100644 --- a/sal/qa/osl/socket/osl_SocketAddr.cxx +++ b/sal/qa/osl/socket/osl_SocketAddr.cxx @@ -60,7 +60,10 @@ #include "sockethelper.hxx" using namespace osl; -using namespace rtl; + +using ::rtl::OUString; +using ::rtl::OUStringToOString; +using ::rtl::OString; #define IP_PORT_ZERO 0 #define IP_PORT_FTP 21 diff --git a/sal/qa/osl/socket/osl_StreamSocket.cxx b/sal/qa/osl/socket/osl_StreamSocket.cxx index 2164dbcd72b3..e1058fc37b6c 100644 --- a/sal/qa/osl/socket/osl_StreamSocket.cxx +++ b/sal/qa/osl/socket/osl_StreamSocket.cxx @@ -61,7 +61,9 @@ #include <osl/conditn.hxx> using namespace osl; -using namespace rtl; + +using ::rtl::OUString; +using ::rtl::OString; #define IP_PORT_MYPORT9 8897 #define IP_PORT_MYPORT10 18900 @@ -456,31 +458,6 @@ protected: else { -// LLA: removed, due to the fact, this is to error prone -// LLA: char * pSrcRoot = getenv("SOURCE_ROOT"); -// LLA: // LLA: This is absolute wrong! -// LLA: // strcat( pSrcRoot, "/sal/inc/osl/file.hxx"); -// LLA: rtl::OString sSrcRoot(pSrcRoot); -// LLA: sSrcRoot += "/sal/inc/osl/file.hxx"; -// LLA: -// LLA: ::rtl::OUString sFilePath = ::rtl::OUString::createFromAscii( sSrcRoot.getStr() ); -// LLA: #ifdef WNT -// LLA: while (sFilePath.lastIndexOf('/') != -1) -// LLA: sFilePath = sFilePath.replace('/',(sal_Unicode)'\\'); -// LLA: #endif -// LLA: FILE *stream; -// LLA: sal_uInt64 nCount_read; -// LLA: sal_Char buffer_read[FILE_READ]; -// LLA: -// LLA: if( (stream = fopen( oustring2char( sFilePath ), "r+t" )) != NULL ) -// LLA: { -// LLA: /* Attempt to read in 25 characters */ -// LLA: nCount_read = fread( buffer_read, sizeof( char ), FILE_READ, stream ); -// LLA: fclose( stream ); -// LLA: } -// LLA: else -// LLA: t_print("# File $SRC_ROOT/sal/inc/osl/file.hxx could not be opened\n" ); - t_print("write()\n"); ssStreamConnection.write( m_aValues.getBuffer(), m_aValues.getBufferSize() ); @@ -925,58 +902,6 @@ namespace osl_StreamSocket }; // class isExceptionPending // ----------------------------------------------------------------------------- -/** Server Socket Thread, write a file which is large - */ -// LLA: class WriteSocketThread : public Thread -// LLA: { -// LLA: ValueCheckProvider m_aValues; -// LLA: -// LLA: protected: -// LLA: oslThreadIdentifier m_id; -// LLA: -// LLA: void SAL_CALL run( ) -// LLA: { -// LLA: ::osl::AcceptorSocket asAcceptorSocket( osl_Socket_FamilyInet, osl_Socket_ProtocolIp, osl_Socket_TypeStream ); -// LLA: ::osl::SocketAddr saLocalSocketAddr( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("10.16.66.252")), 8888 ); -// LLA: ::osl::StreamSocket ssStreamConnection; -// LLA: -// LLA: //if has not set this option, socket addr can not be binded in some time(maybe 2 minutes) by another socket -// LLA: asAcceptorSocket.setOption( osl_Socket_OptionReuseAddr, 1 ); //sal_True); -// LLA: -// LLA: /// if the thread should terminate, schedule return false -// LLA: while ( schedule( ) == sal_True ) -// LLA: { -// LLA: sal_Bool bOK1 = asAcceptorSocket.bind( saLocalSocketAddr ); -// LLA: if ( sal_True != bOK1 ) -// LLA: { -// LLA: t_print("# WriteSocketThread: AcceptorSocket bind address failed. \n" ) ; -// LLA: break; -// LLA: } -// LLA: sal_Bool bOK2 = asAcceptorSocket.listen( 1 ); -// LLA: if ( sal_True != bOK2 ) -// LLA: { -// LLA: t_print("# WriteSocketThread: AcceptorSocket listen address failed. \n" ) ; -// LLA: break; -// LLA: } -// LLA: // blocking mode, if read/recv failed, block until success -// LLA: asAcceptorSocket.enableNonBlockingMode( sal_False); -// LLA: -// LLA: oslSocketResult eResult = asAcceptorSocket.acceptConnection( ssStreamConnection ); -// LLA: if (eResult != osl_Socket_Ok ) -// LLA: { -// LLA: t_print("WriteSocketThread: acceptConnection failed! \n"); -// LLA: break; -// LLA: } -// LLA: -// LLA: -// LLA: sal_Int32 nReadNumber1 = ssStreamConnection.write( m_aValues.getBuffer(), m_aValues.getBufferSize() ); -// LLA: break; -// LLA: } -// LLA: ssStreamConnection.close(); -// LLA: asAcceptorSocket.close(); -// LLA: } -// LLA: } - /** Client Socket Thread, served as a temp little client to communicate with server. */ |