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 | 30b25cf3535669de5f88a8dc7c90e15ed171225f (patch) | |
tree | ea83084f5b8138868495da0b561828b65aec1e1b | |
parent | 3af16145583534dff29a522369411ed67791eb3b (diff) |
Remove "using namespace ::rtl"
-rw-r--r-- | remotebridges/source/unourl_resolver/unourl_resolver.cxx | 3 | ||||
-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 |
10 files changed, 26 insertions, 88 deletions
diff --git a/remotebridges/source/unourl_resolver/unourl_resolver.cxx b/remotebridges/source/unourl_resolver/unourl_resolver.cxx index d7486c92b..830c51783 100644 --- a/remotebridges/source/unourl_resolver/unourl_resolver.cxx +++ b/remotebridges/source/unourl_resolver/unourl_resolver.cxx @@ -45,7 +45,6 @@ #include <com/sun/star/bridge/XUnoUrlResolver.hpp> using namespace cppu; -using namespace rtl; using namespace osl; using namespace com::sun::star::uno; using namespace com::sun::star::lang; @@ -53,6 +52,8 @@ using namespace com::sun::star::connection; using namespace com::sun::star::bridge; using namespace com::sun::star::registry; +using ::rtl::OUString; + #define SERVICENAME "com.sun.star.bridge.UnoUrlResolver" #define IMPLNAME "com.sun.star.comp.bridge.UnoUrlResolver" diff --git a/sal/qa/osl/file/osl_File.cxx b/sal/qa/osl/file/osl_File.cxx index 4d8906368..1c6379bf1 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 67f1d6222..b68bb7acb 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 cfa724660..891163120 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 0c8adf347..b75be1654 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 74fdb3f57..8129d7143 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 948fe50cd..12df2a5c7 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 4984ac303..e9cc8d7c4 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 f52b3bd8d..46cd9d594 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 3978d8c00..4315f24c6 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. */ |