Kaydet (Commit) 55bfc3b6 authored tarafından Norbert Thiebaud's avatar Norbert Thiebaud

targeted string re-work

Change-Id: I6b23bd671c3c090a7c3b60d5301c59da5f9354d5
üst 08dedb5e
...@@ -106,29 +106,29 @@ static Reference<XInterface> SAL_CALL test1_createInstance(const Reference<XMult ...@@ -106,29 +106,29 @@ static Reference<XInterface> SAL_CALL test1_createInstance(const Reference<XMult
throw (RuntimeException) throw (RuntimeException)
{ {
return Reference<XInterface>( static_cast<XWeak*>( new TestService( return Reference<XInterface>( static_cast<XWeak*>( new TestService(
OUString( RTL_CONSTASCII_USTRINGPARAM( IMPLNAME1)), OUString( IMPLNAME1),
OUString( RTL_CONSTASCII_USTRINGPARAM( SERVICENAME1)) )), UNO_QUERY); OUString( SERVICENAME1) )), UNO_QUERY);
} }
static Reference<XInterface> SAL_CALL test2_createInstance(const Reference<XMultiServiceFactory> & rSMgr) static Reference<XInterface> SAL_CALL test2_createInstance(const Reference<XMultiServiceFactory> & rSMgr)
throw (RuntimeException) throw (RuntimeException)
{ {
return Reference<XInterface>( static_cast<XWeak*>( new TestService( return Reference<XInterface>( static_cast<XWeak*>( new TestService(
OUString( RTL_CONSTASCII_USTRINGPARAM( IMPLNAME2)), OUString( IMPLNAME2),
OUString( RTL_CONSTASCII_USTRINGPARAM( SERVICENAME2)) )), UNO_QUERY); OUString( SERVICENAME2) )), UNO_QUERY);
} }
static Reference<XInterface> SAL_CALL test3_createInstance(const Reference<XMultiServiceFactory> & rSMgr) static Reference<XInterface> SAL_CALL test3_createInstance(const Reference<XMultiServiceFactory> & rSMgr)
throw (RuntimeException) throw (RuntimeException)
{ {
return Reference<XInterface>( static_cast<XWeak*>( new TestService( return Reference<XInterface>( static_cast<XWeak*>( new TestService(
OUString( RTL_CONSTASCII_USTRINGPARAM( IMPLNAME3)), OUString( IMPLNAME3),
OUString( RTL_CONSTASCII_USTRINGPARAM( SERVICENAME3)) )), UNO_QUERY); OUString( SERVICENAME3) )), UNO_QUERY);
} }
static Reference<XInterface> SAL_CALL test4_createInstance(const Reference<XMultiServiceFactory> & rSMgr) static Reference<XInterface> SAL_CALL test4_createInstance(const Reference<XMultiServiceFactory> & rSMgr)
throw (RuntimeException) throw (RuntimeException)
{ {
return Reference<XInterface>( static_cast<XWeak*>( new TestService( return Reference<XInterface>( static_cast<XWeak*>( new TestService(
OUString( RTL_CONSTASCII_USTRINGPARAM( IMPLNAME4)), OUString( IMPLNAME4),
OUString( RTL_CONSTASCII_USTRINGPARAM( SERVICENAME4)) )), UNO_QUERY); OUString( SERVICENAME4) )), UNO_QUERY);
} }
...@@ -142,26 +142,26 @@ extern "C" { ...@@ -142,26 +142,26 @@ extern "C" {
{ {
Reference< XRegistryKey > xNewKey( Reference< XRegistryKey > xNewKey(
reinterpret_cast< XRegistryKey * >( pRegistryKey )->createKey( reinterpret_cast< XRegistryKey * >( pRegistryKey )->createKey(
OUString(RTL_CONSTASCII_USTRINGPARAM( "/" IMPLNAME1 "/UNO/SERVICES" )) ) ); OUString( "/" IMPLNAME1 "/UNO/SERVICES" ) ) );
xNewKey->createKey( OUString( RTL_CONSTASCII_USTRINGPARAM( SERVICENAME1))); xNewKey->createKey( OUString( SERVICENAME1));
xNewKey= xNewKey=
reinterpret_cast< XRegistryKey * >( pRegistryKey )->createKey( reinterpret_cast< XRegistryKey * >( pRegistryKey )->createKey(
OUString(RTL_CONSTASCII_USTRINGPARAM( "/" IMPLNAME2 "/UNO/SERVICES" )) ); OUString( "/" IMPLNAME2 "/UNO/SERVICES" ) );
xNewKey->createKey(OUString( RTL_CONSTASCII_USTRINGPARAM( SERVICENAME2))); xNewKey->createKey(OUString( SERVICENAME2));
xNewKey= xNewKey=
reinterpret_cast< XRegistryKey * >( pRegistryKey )->createKey( reinterpret_cast< XRegistryKey * >( pRegistryKey )->createKey(
OUString(RTL_CONSTASCII_USTRINGPARAM( "/" IMPLNAME3 "/UNO/SERVICES" )) ); OUString( "/" IMPLNAME3 "/UNO/SERVICES" ) );
xNewKey->createKey(OUString( RTL_CONSTASCII_USTRINGPARAM( SERVICENAME3))); xNewKey->createKey(OUString( SERVICENAME3));
xNewKey= xNewKey=
reinterpret_cast< XRegistryKey * >( pRegistryKey )->createKey( reinterpret_cast< XRegistryKey * >( pRegistryKey )->createKey(
OUString(RTL_CONSTASCII_USTRINGPARAM( "/" IMPLNAME4 "/UNO/SERVICES" )) ); OUString( "/" IMPLNAME4 "/UNO/SERVICES" ) );
xNewKey->createKey(OUString( RTL_CONSTASCII_USTRINGPARAM( SERVICENAME4))); xNewKey->createKey(OUString( SERVICENAME4));
return sal_True; return sal_True;
} }
catch (const InvalidRegistryException &) catch (const InvalidRegistryException &)
...@@ -177,14 +177,14 @@ extern "C" { ...@@ -177,14 +177,14 @@ extern "C" {
void * pRet = 0; void * pRet = 0;
OUString implname1( RTL_CONSTASCII_USTRINGPARAM( IMPLNAME1) ); OUString implname1( IMPLNAME1 );
OUString serviceName1( RTL_CONSTASCII_USTRINGPARAM( SERVICENAME1) ); OUString serviceName1( SERVICENAME1 );
OUString implname2( RTL_CONSTASCII_USTRINGPARAM( IMPLNAME2) ); OUString implname2( IMPLNAME2 );
OUString serviceName2( RTL_CONSTASCII_USTRINGPARAM( SERVICENAME2) ); OUString serviceName2( SERVICENAME2 );
OUString implname3( RTL_CONSTASCII_USTRINGPARAM( IMPLNAME3) ); OUString implname3( IMPLNAME3 );
OUString serviceName3( RTL_CONSTASCII_USTRINGPARAM( SERVICENAME3) ); OUString serviceName3( SERVICENAME3 );
OUString implname4( RTL_CONSTASCII_USTRINGPARAM( IMPLNAME4) ); OUString implname4( IMPLNAME4 );
OUString serviceName4( RTL_CONSTASCII_USTRINGPARAM( SERVICENAME4) ); OUString serviceName4( SERVICENAME4 );
if (implname1.equals( OUString::createFromAscii(pImplName))) if (implname1.equals( OUString::createFromAscii(pImplName)))
{ {
......
...@@ -103,22 +103,22 @@ static Reference<XInterface> SAL_CALL test21_createInstance(const Reference<XMul ...@@ -103,22 +103,22 @@ static Reference<XInterface> SAL_CALL test21_createInstance(const Reference<XMul
throw (RuntimeException) throw (RuntimeException)
{ {
return Reference<XInterface>( static_cast<XWeak*>( new TestService( return Reference<XInterface>( static_cast<XWeak*>( new TestService(
OUString( RTL_CONSTASCII_USTRINGPARAM( IMPLNAME1)), OUString( IMPLNAME1),
OUString( RTL_CONSTASCII_USTRINGPARAM( SERVICENAME1)) )), UNO_QUERY); OUString( SERVICENAME1) )), UNO_QUERY);
} }
static Reference<XInterface> SAL_CALL test22_createInstance(const Reference<XMultiServiceFactory> & rSMgr) static Reference<XInterface> SAL_CALL test22_createInstance(const Reference<XMultiServiceFactory> & rSMgr)
throw (RuntimeException) throw (RuntimeException)
{ {
return Reference<XInterface>( static_cast<XWeak*>( new TestService( return Reference<XInterface>( static_cast<XWeak*>( new TestService(
OUString( RTL_CONSTASCII_USTRINGPARAM( IMPLNAME2)), OUString( IMPLNAME2),
OUString( RTL_CONSTASCII_USTRINGPARAM( SERVICENAME2)) )), UNO_QUERY); OUString( SERVICENAME2) )), UNO_QUERY);
} }
static Reference<XInterface> SAL_CALL test23_createInstance(const Reference<XMultiServiceFactory> & rSMgr) static Reference<XInterface> SAL_CALL test23_createInstance(const Reference<XMultiServiceFactory> & rSMgr)
throw (RuntimeException) throw (RuntimeException)
{ {
return Reference<XInterface>( static_cast<XWeak*>( new TestService( return Reference<XInterface>( static_cast<XWeak*>( new TestService(
OUString( RTL_CONSTASCII_USTRINGPARAM( IMPLNAME3)), OUString( IMPLNAME3),
OUString( RTL_CONSTASCII_USTRINGPARAM( SERVICENAME3)) )), UNO_QUERY); OUString( SERVICENAME3) )), UNO_QUERY);
} }
...@@ -132,20 +132,20 @@ extern "C" { ...@@ -132,20 +132,20 @@ extern "C" {
{ {
Reference< XRegistryKey > xNewKey( Reference< XRegistryKey > xNewKey(
reinterpret_cast< XRegistryKey * >( pRegistryKey )->createKey( reinterpret_cast< XRegistryKey * >( pRegistryKey )->createKey(
OUString(RTL_CONSTASCII_USTRINGPARAM( "/" IMPLNAME1 "/UNO/SERVICES" )) ) ); OUString( "/" IMPLNAME1 "/UNO/SERVICES" ) ) );
xNewKey->createKey( OUString( RTL_CONSTASCII_USTRINGPARAM( SERVICENAME1))); xNewKey->createKey( OUString( SERVICENAME1));
xNewKey= xNewKey=
reinterpret_cast< XRegistryKey * >( pRegistryKey )->createKey( reinterpret_cast< XRegistryKey * >( pRegistryKey )->createKey(
OUString(RTL_CONSTASCII_USTRINGPARAM( "/" IMPLNAME2 "/UNO/SERVICES" )) ); OUString( "/" IMPLNAME2 "/UNO/SERVICES" ) );
xNewKey->createKey(OUString( RTL_CONSTASCII_USTRINGPARAM( SERVICENAME2))); xNewKey->createKey(OUString( SERVICENAME2));
xNewKey= xNewKey=
reinterpret_cast< XRegistryKey * >( pRegistryKey )->createKey( reinterpret_cast< XRegistryKey * >( pRegistryKey )->createKey(
OUString(RTL_CONSTASCII_USTRINGPARAM( "/" IMPLNAME3 "/UNO/SERVICES" )) ); OUString( "/" IMPLNAME3 "/UNO/SERVICES" ) );
xNewKey->createKey(OUString( RTL_CONSTASCII_USTRINGPARAM( SERVICENAME3))); xNewKey->createKey(OUString( SERVICENAME3));
return sal_True; return sal_True;
} }
...@@ -162,12 +162,12 @@ extern "C" { ...@@ -162,12 +162,12 @@ extern "C" {
void * pRet = 0; void * pRet = 0;
OUString implname1( RTL_CONSTASCII_USTRINGPARAM( IMPLNAME1) ); OUString implname1( IMPLNAME1 );
OUString serviceName1( RTL_CONSTASCII_USTRINGPARAM( SERVICENAME1) ); OUString serviceName1( SERVICENAME1 );
OUString implname2( RTL_CONSTASCII_USTRINGPARAM( IMPLNAME2) ); OUString implname2( IMPLNAME2 );
OUString serviceName2( RTL_CONSTASCII_USTRINGPARAM( SERVICENAME2) ); OUString serviceName2( SERVICENAME2 );
OUString implname3( RTL_CONSTASCII_USTRINGPARAM( IMPLNAME3) ); OUString implname3( IMPLNAME3 );
OUString serviceName3( RTL_CONSTASCII_USTRINGPARAM( SERVICENAME3) ); OUString serviceName3( SERVICENAME3 );
if (implname1.equals( OUString::createFromAscii(pImplName))) if (implname1.equals( OUString::createFromAscii(pImplName)))
{ {
......
...@@ -88,28 +88,28 @@ public: ...@@ -88,28 +88,28 @@ public:
void test_osl_getVolumeInformation() void test_osl_getVolumeInformation()
{ {
rtl::OUString path = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(TEST_PATH_1)); rtl::OUString path = rtl::OUString(TEST_PATH_1);
rtl::OUString path_url; rtl::OUString path_url;
osl_getFileURLFromSystemPath(path.pData, &path_url.pData); osl_getFileURLFromSystemPath(path.pData, &path_url.pData);
test_getVolumeInformation(path_url); test_getVolumeInformation(path_url);
path = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(TEST_PATH_2)); path = rtl::OUString(TEST_PATH_2);
osl_getFileURLFromSystemPath(path.pData, &path_url.pData); osl_getFileURLFromSystemPath(path.pData, &path_url.pData);
test_getVolumeInformation(path_url); test_getVolumeInformation(path_url);
path = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(TEST_PATH_3)); path = rtl::OUString(TEST_PATH_3);
osl_getFileURLFromSystemPath(path.pData, &path_url.pData); osl_getFileURLFromSystemPath(path.pData, &path_url.pData);
test_getVolumeInformation(path_url); test_getVolumeInformation(path_url);
path = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(TEST_PATH_4)); path = rtl::OUString(TEST_PATH_4);
osl_getFileURLFromSystemPath(path.pData, &path_url.pData); osl_getFileURLFromSystemPath(path.pData, &path_url.pData);
test_getVolumeInformation(path_url); test_getVolumeInformation(path_url);
path = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(TEST_PATH_5)); path = rtl::OUString(TEST_PATH_5);
osl_getFileURLFromSystemPath(path.pData, &path_url.pData); osl_getFileURLFromSystemPath(path.pData, &path_url.pData);
test_getVolumeInformation(path_url); test_getVolumeInformation(path_url);
path = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(TEST_PATH_6)); path = rtl::OUString(TEST_PATH_6);
osl_getFileURLFromSystemPath(path.pData, &path_url.pData); osl_getFileURLFromSystemPath(path.pData, &path_url.pData);
test_getVolumeInformation(path_url); test_getVolumeInformation(path_url);
} }
......
...@@ -36,12 +36,12 @@ ...@@ -36,12 +36,12 @@
#include <signal.h> #include <signal.h>
#ifdef WNT #ifdef WNT
const rtl::OUString IMAGE_NAME(RTL_CONSTASCII_USTRINGPARAM("ojpx.exe")); const rtl::OUString IMAGE_NAME("ojpx.exe");
#else #else
const rtl::OUString IMAGE_NAME(RTL_CONSTASCII_USTRINGPARAM("ojpx")); const rtl::OUString IMAGE_NAME("ojpx");
#endif #endif
const rtl::OUString CWD(RTL_CONSTASCII_USTRINGPARAM(".")); const rtl::OUString CWD(".");
class Test_osl_Process : public CppUnit::TestFixture class Test_osl_Process : public CppUnit::TestFixture
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment