tools: Use appropriate OUString functions on string constants

Change-Id: Idbca92ee8d38fe5839ec0aeb8ee02af3e326549d
This commit is contained in:
Stephan Bergmann
2014-12-18 17:36:14 +01:00
parent a349a4763f
commit 09e071fddd

View File

@@ -58,9 +58,8 @@ namespace tools_urlobj
{ {
INetURLObject aUrl( OUString( "file://10.10.1.1/sampledir/sample.file" ) ); INetURLObject aUrl( OUString( "file://10.10.1.1/sampledir/sample.file" ) );
#ifdef LINUX #ifdef LINUX
CPPUNIT_ASSERT( aUrl.GetMainURL( INetURLObject::NO_DECODE ). CPPUNIT_ASSERT( aUrl.GetMainURL( INetURLObject::NO_DECODE )
equalsAscii == "smb://10.10.1.1/sampledir/sample.file" );
( "smb://10.10.1.1/sampledir/sample.file" ) );
CPPUNIT_ASSERT( aUrl.GetProtocol( ) == INET_PROT_SMB ); CPPUNIT_ASSERT( aUrl.GetProtocol( ) == INET_PROT_SMB );
#endif #endif
#ifdef WIN #ifdef WIN
@@ -86,8 +85,8 @@ namespace tools_urlobj
setFSysPath( OUString( "\\\\137.65.170.24\\c$\\Img0001.jpg" ), setFSysPath( OUString( "\\\\137.65.170.24\\c$\\Img0001.jpg" ),
INetURLObject::FSYS_DETECT ); INetURLObject::FSYS_DETECT );
#ifdef LINUX #ifdef LINUX
CPPUNIT_ASSERT( aUrl.GetMainURL( INetURLObject::NO_DECODE ). CPPUNIT_ASSERT( aUrl.GetMainURL( INetURLObject::NO_DECODE )
equalsAscii( "smb://137.65.170.24/c$/Img0001.jpg" ) ); == "smb://137.65.170.24/c$/Img0001.jpg" );
CPPUNIT_ASSERT( aUrl.GetProtocol( ) == INET_PROT_SMB ); CPPUNIT_ASSERT( aUrl.GetProtocol( ) == INET_PROT_SMB );
#endif #endif
#ifdef WIN #ifdef WIN
@@ -112,8 +111,8 @@ namespace tools_urlobj
setFSysPath( OUString( "\\\\hive-winxp-x86\\pmladek\\test2.odt" ), setFSysPath( OUString( "\\\\hive-winxp-x86\\pmladek\\test2.odt" ),
INetURLObject::FSYS_DETECT ); INetURLObject::FSYS_DETECT );
#ifdef LINUX #ifdef LINUX
CPPUNIT_ASSERT( aUrl.GetMainURL( INetURLObject::NO_DECODE ). CPPUNIT_ASSERT( aUrl.GetMainURL( INetURLObject::NO_DECODE )
equalsAscii( "smb://hive-winxp-x86/pmladek/test2.odt" ) ); == "smb://hive-winxp-x86/pmladek/test2.odt" );
CPPUNIT_ASSERT( aUrl.GetProtocol( ) == INET_PROT_SMB ); CPPUNIT_ASSERT( aUrl.GetProtocol( ) == INET_PROT_SMB );
#endif #endif
#ifdef WIN #ifdef WIN
@@ -131,8 +130,8 @@ namespace tools_urlobj
{ {
INetURLObject aUrl( OUString( "smb://10.10.1.1/sampledir/sample.file" ) ); INetURLObject aUrl( OUString( "smb://10.10.1.1/sampledir/sample.file" ) );
#ifdef LINUX #ifdef LINUX
CPPUNIT_ASSERT( aUrl.GetMainURL( INetURLObject::NO_DECODE ). CPPUNIT_ASSERT( aUrl.GetMainURL( INetURLObject::NO_DECODE )
equalsAscii( "smb://10.10.1.1/sampledir/sample.file" ) ); == "smb://10.10.1.1/sampledir/sample.file" );
CPPUNIT_ASSERT( aUrl.GetProtocol( ) == INET_PROT_SMB ); CPPUNIT_ASSERT( aUrl.GetProtocol( ) == INET_PROT_SMB );
#endif #endif
#ifdef WIN #ifdef WIN
@@ -155,8 +154,8 @@ namespace tools_urlobj
aUrl.setFSysPath( OUString( "//137.65.170.24/c$/Img0001.jpg" ), aUrl.setFSysPath( OUString( "//137.65.170.24/c$/Img0001.jpg" ),
INetURLObject::FSYS_DETECT ); INetURLObject::FSYS_DETECT );
#ifdef LINUX #ifdef LINUX
CPPUNIT_ASSERT( aUrl.GetMainURL( INetURLObject::NO_DECODE ). CPPUNIT_ASSERT( aUrl.GetMainURL( INetURLObject::NO_DECODE )
equalsAscii( "smb://137.65.170.24/c$/Img0001.jpg" ) ); == "smb://137.65.170.24/c$/Img0001.jpg" );
CPPUNIT_ASSERT( aUrl.GetProtocol( ) == INET_PROT_SMB ); CPPUNIT_ASSERT( aUrl.GetProtocol( ) == INET_PROT_SMB );
#endif #endif
#ifdef WIN #ifdef WIN
@@ -180,8 +179,8 @@ namespace tools_urlobj
aUrl.setFSysPath( OUString( "//hive-winxp-x86/pmladek/test2.odt" ), aUrl.setFSysPath( OUString( "//hive-winxp-x86/pmladek/test2.odt" ),
INetURLObject::FSYS_DETECT ); INetURLObject::FSYS_DETECT );
#ifdef LINUX #ifdef LINUX
CPPUNIT_ASSERT( aUrl.GetMainURL( INetURLObject::NO_DECODE ). CPPUNIT_ASSERT( aUrl.GetMainURL( INetURLObject::NO_DECODE )
equalsAscii( "smb://hive-winxp-x86/pmladek/test2.odt" ) ); == "smb://hive-winxp-x86/pmladek/test2.odt" );
CPPUNIT_ASSERT( aUrl.GetProtocol( ) == INET_PROT_SMB ); CPPUNIT_ASSERT( aUrl.GetProtocol( ) == INET_PROT_SMB );
#endif #endif
#ifdef WIN #ifdef WIN