TL_CONSTASCII_USTRINGPARAM in libs core 15

This commit is contained in:
Gert Faller
2010-11-19 19:43:57 +01:00
parent 60fec7754d
commit c33f4c624b
23 changed files with 282 additions and 288 deletions

View File

@@ -72,8 +72,8 @@ ScriptingFrameworkURIHelper::ScriptingFrameworkURIHelper(
{
m_xSimpleFileAccess = uno::Reference< ucb::XSimpleFileAccess >(
xContext->getServiceManager()->createInstanceWithContext(
OUString::createFromAscii(
"com.sun.star.ucb.SimpleFileAccess"),
OUString(RTL_CONSTASCII_USTRINGPARAM(
"com.sun.star.ucb.SimpleFileAccess")),
xContext), uno::UNO_QUERY_THROW);
}
catch (uno::Exception&)
@@ -86,8 +86,8 @@ ScriptingFrameworkURIHelper::ScriptingFrameworkURIHelper(
{
m_xUriReferenceFactory = uno::Reference< uri::XUriReferenceFactory >(
xContext->getServiceManager()->createInstanceWithContext(
OUString::createFromAscii(
"com.sun.star.uri.UriReferenceFactory"),
OUString(RTL_CONSTASCII_USTRINGPARAM(
"com.sun.star.uri.UriReferenceFactory")),
xContext ), uno::UNO_QUERY_THROW );
}
catch (uno::Exception&)
@@ -111,26 +111,26 @@ throw ( uno::Exception, uno::RuntimeException )
args[0].getValueType() != ::getCppuType((const OUString*)NULL) ||
args[1].getValueType() != ::getCppuType((const OUString*)NULL) )
{
throw uno::RuntimeException( OUString::createFromAscii(
"ScriptingFrameworkURIHelper got invalid argument list" ),
throw uno::RuntimeException( OUString(RTL_CONSTASCII_USTRINGPARAM(
"ScriptingFrameworkURIHelper got invalid argument list" )),
uno::Reference< uno::XInterface >() );
}
if ( (args[0] >>= m_sLanguage) == sal_False ||
(args[1] >>= m_sLocation) == sal_False )
{
throw uno::RuntimeException( OUString::createFromAscii(
"ScriptingFrameworkURIHelper error parsing args" ),
throw uno::RuntimeException( OUString(RTL_CONSTASCII_USTRINGPARAM(
"ScriptingFrameworkURIHelper error parsing args" )),
uno::Reference< uno::XInterface >() );
}
SCRIPTS_PART = OUString::createFromAscii( "/Scripts/" );
SCRIPTS_PART = OUString(RTL_CONSTASCII_USTRINGPARAM("/Scripts/"));
SCRIPTS_PART = SCRIPTS_PART.concat( m_sLanguage.toAsciiLowerCase() );
if ( !initBaseURI() )
{
throw uno::RuntimeException( OUString::createFromAscii(
"ScriptingFrameworkURIHelper cannot find script directory"),
throw uno::RuntimeException( OUString(RTL_CONSTASCII_USTRINGPARAM(
"ScriptingFrameworkURIHelper cannot find script directory")),
uno::Reference< uno::XInterface >() );
}
}
@@ -143,31 +143,31 @@ ScriptingFrameworkURIHelper::initBaseURI()
if ( m_sLocation.equalsAscii(USER))
{
test = OUString::createFromAscii(USER);
uri = OUString::createFromAscii(USER_URI);
test = OUString(RTL_CONSTASCII_USTRINGPARAM(USER));
uri = OUString(RTL_CONSTASCII_USTRINGPARAM(USER_URI));
bAppendScriptsPart = true;
}
else if ( m_sLocation.equalsAscii(USER_UNO_PACKAGES))
{
test = OUString::createFromAscii("uno_packages");
uri = OUString::createFromAscii(USER_URI);
uri = uri.concat(OUString::createFromAscii(USER_UNO_PACKAGES_DIR));
test = OUString(RTL_CONSTASCII_USTRINGPARAM("uno_packages"));
uri = OUString(RTL_CONSTASCII_USTRINGPARAM(USER_URI));
uri = uri.concat(OUString(RTL_CONSTASCII_USTRINGPARAM(USER_UNO_PACKAGES_DIR)));
}
else if (m_sLocation.equalsAscii(SHARE))
{
test = OUString::createFromAscii(SHARE);
uri = OUString::createFromAscii(SHARE_URI);
test = OUString(RTL_CONSTASCII_USTRINGPARAM(SHARE));
uri = OUString(RTL_CONSTASCII_USTRINGPARAM(SHARE_URI));
bAppendScriptsPart = true;
}
else if (m_sLocation.equalsAscii(SHARE_UNO_PACKAGES))
{
test = OUString::createFromAscii("uno_packages");
uri = OUString::createFromAscii(SHARE_UNO_PACKAGES_URI);
test = OUString(RTL_CONSTASCII_USTRINGPARAM("uno_packages"));
uri = OUString(RTL_CONSTASCII_USTRINGPARAM(SHARE_UNO_PACKAGES_URI));
}
else if (m_sLocation.indexOf(OUString::createFromAscii(TDOC_SCHEME)) == 0)
else if (m_sLocation.indexOf(OUString(RTL_CONSTASCII_USTRINGPARAM(TDOC_SCHEME))) == 0)
{
m_sBaseURI = m_sLocation.concat( SCRIPTS_PART );
m_sLocation = OUString::createFromAscii( DOCUMENT );
m_sLocation = OUString(RTL_CONSTASCII_USTRINGPARAM( DOCUMENT ));
return true;
}
else
@@ -264,13 +264,13 @@ ScriptingFrameworkURIHelper::getStorageURI(const OUString& rScriptURI)
catch ( uno::Exception& )
{
throw lang::IllegalArgumentException(
OUString::createFromAscii( "Script URI not valid" ),
OUString(RTL_CONSTASCII_USTRINGPARAM("Script URI not valid")),
uno::Reference< uno::XInterface >(), 1 );
}
::rtl::OUStringBuffer buf(120);
buf.append(m_sBaseURI);
buf.append(OUString::createFromAscii("/"));
buf.append(OUString(RTL_CONSTASCII_USTRINGPARAM("/")));
buf.append(getLanguagePath(sLanguagePart));
OUString result = buf.makeStringAndClear();
@@ -289,16 +289,16 @@ OUString SAL_CALL
ScriptingFrameworkURIHelper::getImplementationName()
throw( uno::RuntimeException )
{
return OUString::createFromAscii(
"com.sun.star.script.provider.ScriptURIHelper" );
return OUString(RTL_CONSTASCII_USTRINGPARAM(
"com.sun.star.script.provider.ScriptURIHelper" ));
}
sal_Bool SAL_CALL
ScriptingFrameworkURIHelper::supportsService( const OUString& serviceName )
throw( uno::RuntimeException )
{
OUString m_sServiceName = OUString::createFromAscii(
"com.sun.star.script.provider.ScriptURIHelper" );
OUString m_sServiceName(RTL_CONSTASCII_USTRINGPARAM(
"com.sun.star.script.provider.ScriptURIHelper" ));
if ( serviceName.equals( m_sServiceName ) )
{
@@ -312,8 +312,8 @@ ScriptingFrameworkURIHelper::getSupportedServiceNames()
throw( uno::RuntimeException )
{
::rtl::OUString serviceNameList[] = {
::rtl::OUString::createFromAscii(
"com.sun.star.script.provider.ScriptURIHelper" ) };
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
"com.sun.star.script.provider.ScriptURIHelper" )) };
uno::Sequence< ::rtl::OUString > serviceNames = uno::Sequence <
::rtl::OUString > ( serviceNameList, 1 );