summaryrefslogtreecommitdiff
path: root/scripting
diff options
context:
space:
mode:
authorGert Faller <gertfaller@aliceadsl.fr>2010-11-19 19:43:57 +0100
committerGert Faller <gertfaller@aliceadsl.fr>2010-11-19 19:43:57 +0100
commitc33f4c624b22d2b41718e126d8124b37ea9ccf33 (patch)
treeb1fe711d8ef6e558cb07e63d4839ddad982ad097 /scripting
parent60fec7754d70f0527d6ae80455b4ca876b7d451b (diff)
TL_CONSTASCII_USTRINGPARAM in libs core 15
Diffstat (limited to 'scripting')
-rw-r--r--scripting/source/basprov/basmethnode.cxx28
-rw-r--r--scripting/source/basprov/basprov.cxx20
-rw-r--r--scripting/source/dlgprov/dlgevtatt.cxx28
-rw-r--r--scripting/source/dlgprov/dlgprov.cxx30
-rw-r--r--scripting/source/protocolhandler/scripthandler.cxx18
-rw-r--r--scripting/source/provider/ActiveMSPList.cxx10
-rw-r--r--scripting/source/provider/BrowseNodeFactoryImpl.cxx18
-rw-r--r--scripting/source/provider/MasterScriptProvider.cxx25
-rw-r--r--scripting/source/provider/MasterScriptProviderFactory.cxx8
-rw-r--r--scripting/source/provider/ProviderCache.cxx4
-rw-r--r--scripting/source/provider/URIHelper.cxx60
-rw-r--r--scripting/source/runtimemgr/ScriptNameResolverImpl.cxx32
-rw-r--r--scripting/source/runtimemgr/ScriptRuntimeManager.cxx16
-rw-r--r--scripting/source/runtimemgr/StorageBridge.cxx2
-rw-r--r--scripting/source/storage/ScriptInfo.cxx2
-rw-r--r--scripting/source/storage/ScriptMetadataImporter.cxx62
-rw-r--r--scripting/source/storage/ScriptSecurityManager.cxx38
-rw-r--r--scripting/source/storage/ScriptStorage.cxx28
-rw-r--r--scripting/source/storage/ScriptStorageManager.cxx35
-rw-r--r--scripting/source/storage/ScriptURI.cxx2
-rw-r--r--scripting/source/stringresource/stringresource.cxx74
-rw-r--r--scripting/source/vbaevents/eventhelper.cxx26
-rw-r--r--scripting/source/vbaevents/vbamsformreturntypes.hxx4
23 files changed, 282 insertions, 288 deletions
diff --git a/scripting/source/basprov/basmethnode.cxx b/scripting/source/basprov/basmethnode.cxx
index f87ee1759dd2..b41f5c2988ce 100644
--- a/scripting/source/basprov/basmethnode.cxx
+++ b/scripting/source/basprov/basmethnode.cxx
@@ -87,17 +87,17 @@ namespace basprov
StarBASIC* pBasic = static_cast< StarBASIC* >( pModule->GetParent() );
if ( pBasic )
{
- m_sURI = ::rtl::OUString::createFromAscii( "vnd.sun.star.script:" );
+ m_sURI = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("vnd.sun.star.script:"));
m_sURI += pBasic->GetName();
- m_sURI += ::rtl::OUString::createFromAscii( "." );
+ m_sURI += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("."));
m_sURI += pModule->GetName();
- m_sURI += ::rtl::OUString::createFromAscii( "." );
+ m_sURI += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("."));
m_sURI += m_pMethod->GetName();
- m_sURI += ::rtl::OUString::createFromAscii( "?language=Basic&location=" );
+ m_sURI += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("?language=Basic&location="));
if ( m_bIsAppScript )
- m_sURI += ::rtl::OUString::createFromAscii( "application" );
+ m_sURI += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("application"));
else
- m_sURI += ::rtl::OUString::createFromAscii( "document" );
+ m_sURI += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("document"));
}
}
}
@@ -236,7 +236,7 @@ namespace basprov
for ( sal_Int32 i = 0; i < nProps; ++i )
{
// TODO: according to MBA the property 'Title' may change in future
- if ( pProps[i].Name == ::rtl::OUString::createFromAscii( "Title" ) )
+ if ( pProps[i].Name == ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Title")) )
{
pProps[i].Value >>= sDocURL;
break;
@@ -280,17 +280,17 @@ namespace basprov
if ( xHelper.is() )
{
Sequence < PropertyValue > aArgs(7);
- aArgs[0].Name = ::rtl::OUString::createFromAscii( "Document" );
+ aArgs[0].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Document"));
aArgs[0].Value <<= sDocURL;
- aArgs[1].Name = ::rtl::OUString::createFromAscii( "LibName" );
+ aArgs[1].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("LibName"));
aArgs[1].Value <<= sLibName;
- aArgs[2].Name = ::rtl::OUString::createFromAscii( "Name" );
+ aArgs[2].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Name"));
aArgs[2].Value <<= sModName;
- aArgs[3].Name = ::rtl::OUString::createFromAscii( "Type" );
- aArgs[3].Value <<= ::rtl::OUString::createFromAscii( "Module" );
- aArgs[4].Name = ::rtl::OUString::createFromAscii( "Line" );
+ aArgs[3].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Type"));
+ aArgs[3].Value <<= ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Module"));
+ aArgs[4].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Line"));
aArgs[4].Value <<= static_cast< sal_uInt32 >( nLine1 );
- xHelper->executeDispatch( xProv, ::rtl::OUString::createFromAscii( ".uno:BasicIDEAppear" ), ::rtl::OUString(), 0, aArgs );
+ xHelper->executeDispatch( xProv, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".uno:BasicIDEAppear")), ::rtl::OUString(), 0, aArgs );
}
}
}
diff --git a/scripting/source/basprov/basprov.cxx b/scripting/source/basprov/basprov.cxx
index 5cb4e1425f7b..e64166533f9f 100644
--- a/scripting/source/basprov/basprov.cxx
+++ b/scripting/source/basprov/basprov.cxx
@@ -150,8 +150,8 @@ namespace basprov
Reference< lang::XMultiComponentFactory > xSMgr( m_xContext->getServiceManager() );
if ( xSMgr.is() )
{
- xUriFac.set( xSMgr->createInstanceWithContext( ::rtl::OUString::createFromAscii(
- "com.sun.star.uri.UriReferenceFactory" ), m_xContext ), UNO_QUERY );
+ xUriFac.set( xSMgr->createInstanceWithContext( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
+ "com.sun.star.uri.UriReferenceFactory" )), m_xContext ), UNO_QUERY );
}
if ( xUriFac.is() )
@@ -175,7 +175,7 @@ namespace basprov
aDecodedURL = ::rtl::Uri::decode( aDecodedURL, rtl_UriDecodeWithCharset, RTL_TEXTENCODING_UTF8 );
Reference<util::XMacroExpander> xMacroExpander(
m_xContext->getValueByName(
- ::rtl::OUString::createFromAscii( "/singletons/com.sun.star.util.theMacroExpander" ) ),
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/singletons/com.sun.star.util.theMacroExpander")) ),
UNO_QUERY );
if ( xMacroExpander.is() )
aFileURL = xMacroExpander->expandMacros( aDecodedURL );
@@ -338,8 +338,8 @@ namespace basprov
Reference< provider::XScript > xScript;
Reference< lang::XMultiComponentFactory > xMcFac ( m_xContext->getServiceManager() );
Reference< uri::XUriReferenceFactory > xFac (
- xMcFac->createInstanceWithContext( rtl::OUString::createFromAscii(
- "com.sun.star.uri.UriReferenceFactory"), m_xContext ) , UNO_QUERY );
+ xMcFac->createInstanceWithContext( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
+ "com.sun.star.uri.UriReferenceFactory")), m_xContext ) , UNO_QUERY );
if ( !xFac.is() )
{
@@ -356,7 +356,7 @@ namespace basprov
if ( !uriRef.is() || !sfUri.is() )
{
- ::rtl::OUString errorMsg = ::rtl::OUString::createFromAscii( "BasicProviderImpl::getScript: failed to parse URI: " );
+ ::rtl::OUString errorMsg(RTL_CONSTASCII_USTRINGPARAM("BasicProviderImpl::getScript: failed to parse URI: "));
errorMsg = errorMsg.concat( scriptURI );
throw provider::ScriptFrameworkErrorException(
errorMsg, Reference< XInterface >(),
@@ -367,18 +367,18 @@ namespace basprov
::rtl::OUString aDescription = sfUri->getName();
::rtl::OUString aLocation = sfUri->getParameter(
- ::rtl::OUString::createFromAscii( "location" ) );
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("location")) );
sal_Int32 nIndex = 0;
// In some strange circumstances the Library name can have an
// apparantly illegal '.' in it ( in imported VBA )
BasicManager* pBasicMgr = NULL;
- if ( aLocation.equals( ::rtl::OUString::createFromAscii("document") ) )
+ if ( aLocation.equals( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("document")) ) )
{
pBasicMgr = m_pDocBasicManager;
}
- else if ( aLocation.equals( ::rtl::OUString::createFromAscii("application") ) )
+ else if ( aLocation.equals( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("application")) ) )
{
pBasicMgr = m_pAppBasicManager;
}
@@ -469,7 +469,7 @@ namespace basprov
SolarMutexGuard aGuard;
- return ::rtl::OUString::createFromAscii( "Basic" );
+ return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Basic"));
}
// -----------------------------------------------------------------------------
diff --git a/scripting/source/dlgprov/dlgevtatt.cxx b/scripting/source/dlgprov/dlgevtatt.cxx
index d3bb20db13aa..02eb6495b464 100644
--- a/scripting/source/dlgprov/dlgevtatt.cxx
+++ b/scripting/source/dlgprov/dlgevtatt.cxx
@@ -145,7 +145,7 @@ namespace dlgprov
void DialogVBAScriptListenerImpl::firing_impl( const script::ScriptEvent& aScriptEvent, uno::Any* )
{
- if ( aScriptEvent.ScriptType.equals( rtl::OUString::createFromAscii("VBAInterop") ) && mxListener.is() )
+ if ( aScriptEvent.ScriptType.equals( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("VBAInterop")) ) && mxListener.is() )
{
ScriptEvent aScriptEventCopy( aScriptEvent );
aScriptEventCopy.ScriptCode = msDialogLibName.concat( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "." ) ) ).concat( msDialogCodeName );
@@ -172,12 +172,12 @@ namespace dlgprov
// key listeners by protocol when ScriptType = 'Script'
// otherwise key is the ScriptType e.g. StarBasic
if ( rxRTLListener.is() ) // set up handler for RTL_BASIC
- listernersForTypes[ rtl::OUString::createFromAscii("StarBasic") ] = rxRTLListener;
+ listernersForTypes[ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("StarBasic")) ] = rxRTLListener;
else
- listernersForTypes[ rtl::OUString::createFromAscii("StarBasic") ] = new DialogLegacyScriptListenerImpl( rxContext, rxModel );
- // handler for Script & ::rtl::OUString::createFromAscii( "vnd.sun.star.UNO:" )
- listernersForTypes[ rtl::OUString::createFromAscii("vnd.sun.star.UNO") ] = new DialogUnoScriptListenerImpl( rxContext, rxModel, rxControl, rxHandler, rxIntrospect, bProviderMode );
- listernersForTypes[ rtl::OUString::createFromAscii("vnd.sun.star.script") ] = new DialogSFScriptListenerImpl( rxContext, rxModel );
+ listernersForTypes[ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("StarBasic")) ] = new DialogLegacyScriptListenerImpl( rxContext, rxModel );
+ // handler for Script & ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("vnd.sun.star.UNO:"))
+ listernersForTypes[ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("vnd.sun.star.UNO")) ] = new DialogUnoScriptListenerImpl( rxContext, rxModel, rxControl, rxHandler, rxIntrospect, bProviderMode );
+ listernersForTypes[ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("vnd.sun.star.script")) ] = new DialogSFScriptListenerImpl( rxContext, rxModel );
// Note: in a future cws ( npower13_ObjectModule ) it will be possible
// to determine the vba mode from the basiclibrary container, the tunnel hack
// below can then be replaced
@@ -193,7 +193,7 @@ namespace dlgprov
}
}
if ( mbUseFakeVBAEvents )
- listernersForTypes[ rtl::OUString::createFromAscii("VBAInterop") ] = new DialogVBAScriptListenerImpl( rxContext, rxControl, rxModel, sDialogLibName );
+ listernersForTypes[ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("VBAInterop")) ] = new DialogVBAScriptListenerImpl( rxContext, rxControl, rxModel, sDialogLibName );
}
// -----------------------------------------------------------------------------
@@ -235,7 +235,7 @@ namespace dlgprov
Reference< XControlModel > xControlModel = xControl->getModel();
Reference< XPropertySet > xProps( xControlModel, uno::UNO_QUERY );
rtl::OUString sName;
- xProps->getPropertyValue( rtl::OUString::createFromAscii("Name") ) >>= sName;
+ xProps->getPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Name")) ) >>= sName;
if ( xEventCont.is() )
{
Sequence< ::rtl::OUString > aNames = xEventCont->getElementNames();
@@ -249,7 +249,7 @@ namespace dlgprov
Any aElement = xEventCont->getByName( pNames[ j ] );
aElement >>= aDesc;
rtl::OUString sKey = aDesc.ScriptType;
- if ( aDesc.ScriptType.equals( rtl::OUString::createFromAscii("Script" ) ) || aDesc.ScriptType.equals( rtl::OUString::createFromAscii("UNO" ) ) )
+ if ( aDesc.ScriptType.equals( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Script")) ) || aDesc.ScriptType.equals( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("UNO")) ) )
{
sal_Int32 nIndex = aDesc.ScriptCode.indexOf( ':' );
sKey = aDesc.ScriptCode.copy( 0, nIndex );
@@ -502,13 +502,13 @@ namespace dlgprov
{
Reference< provider::XScriptProviderFactory > xFactory(
m_xContext->getValueByName(
- ::rtl::OUString::createFromAscii( "/singletons/com.sun.star.script.provider.theMasterScriptProviderFactory" ) ),
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/singletons/com.sun.star.script.provider.theMasterScriptProviderFactory")) ),
UNO_QUERY );
OSL_ENSURE( xFactory.is(), "SFURL_firing_impl: failed to get master script provider factory" );
if ( xFactory.is() )
{
Any aCtx;
- aCtx <<= ::rtl::OUString::createFromAscii( "user" );
+ aCtx <<= ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("user"));
xScriptProvider.set( xFactory->createScriptProvider( aCtx ), UNO_QUERY );
}
}
@@ -553,9 +553,9 @@ namespace dlgprov
sal_Int32 nIndex = sScriptCode.indexOf( ':' );
if ( nIndex >= 0 && nIndex < sScriptCode.getLength() )
{
- sScriptURL = ::rtl::OUString::createFromAscii( "vnd.sun.star.script:" );
+ sScriptURL = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("vnd.sun.star.script:"));
sScriptURL += sScriptCode.copy( nIndex + 1 );
- sScriptURL += ::rtl::OUString::createFromAscii( "?language=Basic&location=" );
+ sScriptURL += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("?language=Basic&location="));
sScriptURL += sScriptCode.copy( 0, nIndex );
}
ScriptEvent aSFScriptEvent( aScriptEvent );
@@ -566,7 +566,7 @@ namespace dlgprov
void DialogUnoScriptListenerImpl::firing_impl( const ScriptEvent& aScriptEvent, Any* pRet )
{
- static ::rtl::OUString sUnoURLScheme = ::rtl::OUString::createFromAscii( "vnd.sun.star.UNO:" );
+ static ::rtl::OUString sUnoURLScheme(RTL_CONSTASCII_USTRINGPARAM("vnd.sun.star.UNO:"));
::rtl::OUString sScriptCode( aScriptEvent.ScriptCode );
::rtl::OUString aMethodName = aScriptEvent.ScriptCode.copy( sUnoURLScheme.getLength() );
diff --git a/scripting/source/dlgprov/dlgprov.cxx b/scripting/source/dlgprov/dlgprov.cxx
index 8eeeb85a9ec1..89462dd9df7c 100644
--- a/scripting/source/dlgprov/dlgprov.cxx
+++ b/scripting/source/dlgprov/dlgprov.cxx
@@ -74,7 +74,7 @@ namespace dlgprov
{
//.........................................................................
-static ::rtl::OUString aResourceResolverPropName = ::rtl::OUString::createFromAscii( "ResourceResolver" );
+static ::rtl::OUString aResourceResolverPropName(RTL_CONSTASCII_USTRINGPARAM("ResourceResolver"));
// =============================================================================
// component operations
// =============================================================================
@@ -243,13 +243,13 @@ static ::rtl::OUString aResourceResolverPropName = ::rtl::OUString::createFromAs
}
Reference< uri::XUriReferenceFactory > xFac (
- xSMgr->createInstanceWithContext( rtl::OUString::createFromAscii(
- "com.sun.star.uri.UriReferenceFactory"), m_xContext ) , UNO_QUERY );
+ xSMgr->createInstanceWithContext( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
+ "com.sun.star.uri.UriReferenceFactory")), m_xContext ) , UNO_QUERY );
if ( !xFac.is() )
{
throw RuntimeException(
- ::rtl::OUString::createFromAscii( "DialogProviderImpl::getDialogModel(), could not instatiate UriReferenceFactory." ),
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DialogProviderImpl::getDialogModel(), could not instatiate UriReferenceFactory.")),
Reference< XInterface >() );
}
@@ -262,7 +262,7 @@ static ::rtl::OUString aResourceResolverPropName = ::rtl::OUString::createFromAs
Reference< util::XMacroExpander > xMacroExpander(
m_xContext->getValueByName(
- ::rtl::OUString::createFromAscii( "/singletons/com.sun.star.util.theMacroExpander" ) ),
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/singletons/com.sun.star.util.theMacroExpander")) ),
UNO_QUERY_THROW );
Reference< uri::XUriReference > uriRef;
@@ -271,7 +271,7 @@ static ::rtl::OUString aResourceResolverPropName = ::rtl::OUString::createFromAs
uriRef = Reference< uri::XUriReference >( xFac->parse( aURL ), UNO_QUERY );
if ( !uriRef.is() )
{
- ::rtl::OUString errorMsg = ::rtl::OUString::createFromAscii( "DialogProviderImpl::getDialogModel: failed to parse URI: " );
+ ::rtl::OUString errorMsg(RTL_CONSTASCII_USTRINGPARAM("DialogProviderImpl::getDialogModel: failed to parse URI: "));
errorMsg += aURL;
throw IllegalArgumentException( errorMsg,
Reference< XInterface >(), 1 );
@@ -291,7 +291,7 @@ static ::rtl::OUString aResourceResolverPropName = ::rtl::OUString::createFromAs
// Try any other URL with SimpleFileAccess
Reference< ::com::sun::star::ucb::XSimpleFileAccess > xSFI =
Reference< ::com::sun::star::ucb::XSimpleFileAccess >( xSMgr->createInstanceWithContext
- ( ::rtl::OUString::createFromAscii( "com.sun.star.ucb.SimpleFileAccess" ), m_xContext ), UNO_QUERY );
+ ( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.ucb.SimpleFileAccess")), m_xContext ), UNO_QUERY );
try
{
@@ -312,18 +312,18 @@ static ::rtl::OUString aResourceResolverPropName = ::rtl::OUString::createFromAs
sDlgName = sDescription.getToken( 0, (sal_Unicode)'.', nIndex );
::rtl::OUString sLocation = sfUri->getParameter(
- ::rtl::OUString::createFromAscii( "location" ) );
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("location")) );
// get dialog library container
// TODO: dialogs in packages
Reference< XLibraryContainer > xLibContainer;
- if ( sLocation == ::rtl::OUString::createFromAscii( "application" ) )
+ if ( sLocation == ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("application")) )
{
xLibContainer = Reference< XLibraryContainer >( SFX_APP()->GetDialogContainer(), UNO_QUERY );
}
- else if ( sLocation == ::rtl::OUString::createFromAscii( "document" ) )
+ else if ( sLocation == ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("document")) )
{
Reference< XEmbeddedScripts > xDocumentScripts( m_xModel, UNO_QUERY );
if ( xDocumentScripts.is() )
@@ -442,7 +442,7 @@ static ::rtl::OUString aResourceResolverPropName = ::rtl::OUString::createFromAs
Reference< XMultiComponentFactory > xSMgr_( m_xContext->getServiceManager(), UNO_QUERY_THROW );
// TODO: Ctor
xStringResourceManager = Reference< resource::XStringResourceManager >( xSMgr_->createInstanceWithContext
- ( ::rtl::OUString::createFromAscii( "com.sun.star.resource.StringResourceWithLocation" ),
+ ( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.resource.StringResourceWithLocation")),
m_xContext ), UNO_QUERY );
if( xStringResourceManager.is() )
{
@@ -582,7 +582,7 @@ static ::rtl::OUString aResourceResolverPropName = ::rtl::OUString::createFromAs
// Get introspection service
Reference< XInterface > xI = xSMgr->createInstanceWithContext
- ( rtl::OUString::createFromAscii("com.sun.star.beans.Introspection"), m_xContext );
+ ( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.beans.Introspection")), m_xContext );
if (xI.is())
xIntrospection = Reference< XIntrospection >::query( xI );
}
@@ -680,10 +680,8 @@ static ::rtl::OUString aResourceResolverPropName = ::rtl::OUString::createFromAs
// XDialogProvider
// -----------------------------------------------------------------------------
- static ::rtl::OUString aDecorationPropName =
- ::rtl::OUString::createFromAscii( "Decoration" );
- static ::rtl::OUString aTitlePropName =
- ::rtl::OUString::createFromAscii( "Title" );
+ static ::rtl::OUString aDecorationPropName(RTL_CONSTASCII_USTRINGPARAM("Decoration"));
+ static ::rtl::OUString aTitlePropName(RTL_CONSTASCII_USTRINGPARAM("Title"));
Reference < XControl > DialogProviderImpl::createDialogImpl(
const ::rtl::OUString& URL, const Reference< XInterface >& xHandler,
diff --git a/scripting/source/protocolhandler/scripthandler.cxx b/scripting/source/protocolhandler/scripthandler.cxx
index c7289b993d2f..dce9ddee15f5 100644
--- a/scripting/source/protocolhandler/scripthandler.cxx
+++ b/scripting/source/protocolhandler/scripthandler.cxx
@@ -114,8 +114,8 @@ Reference< XDispatch > SAL_CALL ScriptProtocolHandler::queryDispatch(
// get scheme of url
Reference< uri::XUriReferenceFactory > xFac (
- m_xFactory->createInstance( rtl::OUString::createFromAscii(
- "com.sun.star.uri.UriReferenceFactory") ) , UNO_QUERY );
+ m_xFactory->createInstance( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
+ "com.sun.star.uri.UriReferenceFactory")) ) , UNO_QUERY );
if ( xFac.is() )
{
Reference< uri::XUriReference > uriRef(
@@ -163,7 +163,7 @@ void SAL_CALL ScriptProtocolHandler::dispatchWithNotification(
{
try
{
- bool bIsDocumentScript = ( aURL.Complete.indexOf( ::rtl::OUString::createFromAscii( "document" ) ) !=-1 );
+ bool bIsDocumentScript = ( aURL.Complete.indexOf( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("document")) ) !=-1 );
// TODO: isn't this somewhat strange? This should be a test for a location=document parameter, shouldn't it?
if ( bIsDocumentScript )
@@ -252,8 +252,8 @@ void SAL_CALL ScriptProtocolHandler::dispatchWithNotification(
#ifdef _DEBUG
catch ( ... )
{
- ::rtl::OUString reason = ::rtl::OUString::createFromAscii(
- "ScriptProtocolHandler::dispatch: caught unknown exception" );
+ ::rtl::OUString reason(RTL_CONSTASCII_USTRINGPARAM(
+ "ScriptProtocolHandler::dispatch: caught unknown exception" ));
invokeResult <<= reason;
}
@@ -262,9 +262,9 @@ void SAL_CALL ScriptProtocolHandler::dispatchWithNotification(
}
else
{
- ::rtl::OUString reason = ::rtl::OUString::createFromAscii(
+ ::rtl::OUString reason(RTL_CONSTASCII_USTRINGPARAM(
"ScriptProtocolHandler::dispatchWithNotification failed, ScriptProtocolHandler not initialised"
- );
+ ));
invokeResult <<= reason;
}
@@ -408,8 +408,8 @@ ScriptProtocolHandler::createScriptProvider()
Reference< XComponentContext > xCtx(
xProps->getPropertyValue( dc ), UNO_QUERY_THROW );
- ::rtl::OUString tmspf = ::rtl::OUString::createFromAscii(
- "/singletons/com.sun.star.script.provider.theMasterScriptProviderFactory");
+ ::rtl::OUString tmspf(RTL_CONSTASCII_USTRINGPARAM(
+ "/singletons/com.sun.star.script.provider.theMasterScriptProviderFactory"));
Reference< provider::XScriptProviderFactory > xFac(
xCtx->getValueByName( tmspf ), UNO_QUERY_THROW );
diff --git a/scripting/source/provider/ActiveMSPList.cxx b/scripting/source/provider/ActiveMSPList.cxx
index c60e81a590ca..226951ff9fbd 100644
--- a/scripting/source/provider/ActiveMSPList.cxx
+++ b/scripting/source/provider/ActiveMSPList.cxx
@@ -58,9 +58,9 @@ namespace func_provider
ActiveMSPList::ActiveMSPList( const Reference< XComponentContext > & xContext ) : m_xContext( xContext )
{
- userDirString = ::rtl::OUString::createFromAscii("user");
- shareDirString = ::rtl::OUString::createFromAscii("share");
- bundledDirString = ::rtl::OUString::createFromAscii("bundled");
+ userDirString = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("user"));
+ shareDirString = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("share"));
+ bundledDirString = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("bundled"));
}
ActiveMSPList::~ActiveMSPList()
@@ -70,7 +70,7 @@ ActiveMSPList::~ActiveMSPList()
Reference< provider::XScriptProvider >
ActiveMSPList::createNewMSP( const uno::Any& context )
{
- ::rtl::OUString serviceName = ::rtl::OUString::createFromAscii("com.sun.star.script.provider.MasterScriptProvider");
+ ::rtl::OUString serviceName(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.script.provider.MasterScriptProvider"));
Sequence< Any > args( &context, 1 );
Reference< provider::XScriptProvider > msp(
@@ -297,7 +297,7 @@ ActiveMSPList::createNonDocMSPs()
return;
}
// do creation of user and share MSPs here
- ::rtl::OUString serviceName = ::rtl::OUString::createFromAscii("com.sun.star.script.provider.MasterScriptProvider");
+ ::rtl::OUString serviceName(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.script.provider.MasterScriptProvider"));
Sequence< Any > args(1);
args[ 0 ] <<= userDirString;
diff --git a/scripting/source/provider/BrowseNodeFactoryImpl.cxx b/scripting/source/provider/BrowseNodeFactoryImpl.cxx
index bcc48dae1894..8123ec2c9611 100644
--- a/scripting/source/provider/BrowseNodeFactoryImpl.cxx
+++ b/scripting/source/provider/BrowseNodeFactoryImpl.cxx
@@ -265,7 +265,7 @@ private:
for ( sal_Int32 i = 0; i < langNodes.getLength(); i++ )
{
Reference< browse::XBrowseNode > xbn;
- if ( langNodes[ i ]->getName().equals(::rtl::OUString::createFromAscii("uno_packages")) )
+ if ( langNodes[ i ]->getName().equals(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("uno_packages"))) )
{
xbn.set( new LocationBrowseNode( langNodes[ i ] ) );
}
@@ -325,8 +325,8 @@ Sequence< Reference< browse::XBrowseNode > > getAllBrowseNodes( const Reference<
xCtx->getValueByName(
OUSTR("/singletons/com.sun.star.script.provider.theMasterScriptProviderFactory") ), UNO_QUERY_THROW );
- locnBNs[ mspIndex++ ] = Reference< browse::XBrowseNode >( xFac->createScriptProvider( makeAny( ::rtl::OUString::createFromAscii("user") ) ), UNO_QUERY_THROW );
- locnBNs[ mspIndex++ ] = Reference< browse::XBrowseNode >( xFac->createScriptProvider( makeAny( ::rtl::OUString::createFromAscii("share") ) ), UNO_QUERY_THROW );
+ locnBNs[ mspIndex++ ] = Reference< browse::XBrowseNode >( xFac->createScriptProvider( makeAny( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("user")) ) ), UNO_QUERY_THROW );
+ locnBNs[ mspIndex++ ] = Reference< browse::XBrowseNode >( xFac->createScriptProvider( makeAny( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("share")) ) ), UNO_QUERY_THROW );
}
// TODO proper exception handling, should throw
catch( Exception& e )
@@ -570,7 +570,7 @@ public:
{
m_vNodes.push_back( new DefaultBrowseNode( xCtx, nodes[ i ] ) );
}
- m_Name = ::rtl::OUString::createFromAscii( "Root" );
+ m_Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Root"));
}
~DefaultRootBrowseNode()
@@ -638,7 +638,7 @@ public:
virtual ::rtl::OUString SAL_CALL getName()
throw ( RuntimeException )
{
- return ::rtl::OUString::createFromAscii( "Root" );
+ return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Root"));
}
virtual Sequence< Reference< browse::XBrowseNode > > SAL_CALL
@@ -736,8 +736,8 @@ Sequence< ::rtl::OUString > SAL_CALL
bnf_getSupportedServiceNames( )
SAL_THROW( () )
{
- ::rtl::OUString str_name = ::rtl::OUString::createFromAscii(
- "com.sun.star.script.browse.BrowseNodeFactory");
+ ::rtl::OUString str_name(RTL_CONSTASCII_USTRINGPARAM(
+ "com.sun.star.script.browse.BrowseNodeFactory"));
return Sequence< ::rtl::OUString >( &str_name, 1 );
}
@@ -746,8 +746,8 @@ bnf_getSupportedServiceNames( )
bnf_getImplementationName( )
SAL_THROW( () )
{
- return ::rtl::OUString::createFromAscii(
- "com.sun.star.script.browse.BrowseNodeFactory" );
+ return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
+ "com.sun.star.script.browse.BrowseNodeFactory" ));
}
Reference< XInterface > SAL_CALL
diff --git a/scripting/source/provider/MasterScriptProvider.cxx b/scripting/source/provider/MasterScriptProvider.cxx
index de359380b461..b326bf6a31bf 100644
--- a/scripting/source/provider/MasterScriptProvider.cxx
+++ b/scripting/source/provider/MasterScriptProvider.cxx
@@ -273,11 +273,11 @@ throw ( provider::ScriptFrameworkErrorException,
// need to get the language from the string
Reference< uri::XUriReferenceFactory > xFac (
- m_xMgr->createInstanceWithContext( rtl::OUString::createFromAscii(
- "com.sun.star.uri.UriReferenceFactory"), m_xContext ) , UNO_QUERY );
+ m_xMgr->createInstanceWithContext( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
+ "com.sun.star.uri.UriReferenceFactory")), m_xContext ) , UNO_QUERY );
if ( !xFac.is() )
{
- ::rtl::OUString message = ::rtl::OUString::createFromAscii("Failed to instantiate UriReferenceFactory");
+ ::rtl::OUString message(RTL_CONSTASCII_USTRINGPARAM("Failed to instantiate UriReferenceFactory"));
throw provider::ScriptFrameworkErrorException(
message, Reference< XInterface >(),
scriptURI, ::rtl::OUString(),
@@ -299,8 +299,8 @@ throw ( provider::ScriptFrameworkErrorException,
provider::ScriptFrameworkErrorType::UNKNOWN );
}
- ::rtl::OUString langKey = ::rtl::OUString::createFromAscii( "language" );
- ::rtl::OUString locKey = ::rtl::OUString::createFromAscii( "location" );
+ ::rtl::OUString langKey(RTL_CONSTASCII_USTRINGPARAM("language"));
+ ::rtl::OUString locKey(RTL_CONSTASCII_USTRINGPARAM("location"));
if ( sfUri->hasParameter( langKey ) == sal_False ||
sfUri->hasParameter( locKey ) == sal_False ||
@@ -319,8 +319,7 @@ throw ( provider::ScriptFrameworkErrorException,
// if script us located in uno pkg
sal_Int32 index = -1;
- ::rtl::OUString pkgTag =
- ::rtl::OUString::createFromAscii( ":uno_packages" );
+ ::rtl::OUString pkgTag(RTL_CONSTASCII_USTRINGPARAM(":uno_packages"));
// for languages other than basic, scripts located in uno packages
// are merged into the user/share location context.
// For other languages the location attribute in script url has the form
@@ -819,8 +818,8 @@ MasterScriptProvider::getAllProviders() throw ( css::uno::RuntimeException )
}
else
{
- ::rtl::OUString errorMsg = ::rtl::OUString::createFromAscii(
- "MasterScriptProvider::getAllProviders, cache not initialised");
+ ::rtl::OUString errorMsg(RTL_CONSTASCII_USTRINGPARAM(
+ "MasterScriptProvider::getAllProviders, cache not initialised"));
throw RuntimeException( errorMsg.concat( errorMsg ),
Reference< XInterface >() );
}
@@ -922,8 +921,8 @@ Sequence< ::rtl::OUString > urihelper_getSupportedServiceNames( )
SAL_THROW( () )
{
::rtl::OUString serviceNameList[] = {
- ::rtl::OUString::createFromAscii(
- "com.sun.star.script.provider.ScriptURIHelper" ) };
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
+ "com.sun.star.script.provider.ScriptURIHelper" )) };
Sequence< ::rtl::OUString > serviceNames = Sequence <
::rtl::OUString > ( serviceNameList, 1 );
@@ -934,8 +933,8 @@ Sequence< ::rtl::OUString > urihelper_getSupportedServiceNames( )
::rtl::OUString urihelper_getImplementationName( )
SAL_THROW( () )
{
- return ::rtl::OUString::createFromAscii(
- "com.sun.star.script.provider.ScriptURIHelper");
+ return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
+ "com.sun.star.script.provider.ScriptURIHelper"));
}
static struct cppu::ImplementationEntry s_entries [] =
diff --git a/scripting/source/provider/MasterScriptProviderFactory.cxx b/scripting/source/provider/MasterScriptProviderFactory.cxx
index dac81770dcd6..946793461ed9 100644
--- a/scripting/source/provider/MasterScriptProviderFactory.cxx
+++ b/scripting/source/provider/MasterScriptProviderFactory.cxx
@@ -92,8 +92,8 @@ Sequence< ::rtl::OUString > SAL_CALL
mspf_getSupportedServiceNames( )
SAL_THROW( () )
{
- ::rtl::OUString str_name = ::rtl::OUString::createFromAscii(
- "com.sun.star.script.provider.MasterScriptProviderFactory");
+ ::rtl::OUString str_name(RTL_CONSTASCII_USTRINGPARAM(
+ "com.sun.star.script.provider.MasterScriptProviderFactory"));
return Sequence< ::rtl::OUString >( &str_name, 1 );
}
@@ -102,8 +102,8 @@ mspf_getSupportedServiceNames( )
mspf_getImplementationName( )
SAL_THROW( () )
{
- return ::rtl::OUString::createFromAscii(
- "com.sun.star.script.provider.MasterScriptProviderFactory");
+ return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
+ "com.sun.star.script.provider.MasterScriptProviderFactory"));
}
Reference< XInterface > SAL_CALL
diff --git a/scripting/source/provider/ProviderCache.cxx b/scripting/source/provider/ProviderCache.cxx
index e11de9b14d47..ae0f0858f6f7 100644
--- a/scripting/source/provider/ProviderCache.cxx
+++ b/scripting/source/provider/ProviderCache.cxx
@@ -167,7 +167,7 @@ ProviderCache::populateCache() throw ( RuntimeException )
Reference< lang::XSingleComponentFactory > factory;
if ( sal_False == ( xEnum->nextElement() >>= factory ) )
{
- throw new RuntimeException( ::rtl::OUString::createFromAscii( " error extracting XSingleComponentFactory from Content enumeration. " ), Reference< XInterface >() );
+ throw new RuntimeException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" error extracting XSingleComponentFactory from Content enumeration. ")), Reference< XInterface >() );
}
validateXRef( factory, "ProviderCache::populateCache() invalid factory" );
Reference< lang::XServiceInfo > xServiceInfo( factory, UNO_QUERY_THROW );
@@ -214,7 +214,7 @@ ProviderCache::createProvider( ProviderDetails& details ) throw ( RuntimeExcepti
}
catch ( RuntimeException& e )
{
- ::rtl::OUString temp = ::rtl::OUString::createFromAscii("ProviderCache::createProvider() Error creating provider from factory!!!");
+ ::rtl::OUString temp(RTL_CONSTASCII_USTRINGPARAM("ProviderCache::createProvider() Error creating provider from factory!!!"));
throw RuntimeException( temp.concat( e.Message ), Reference< XInterface >() );
}
diff --git a/scripting/source/provider/URIHelper.cxx b/scripting/source/provider/URIHelper.cxx
index e59e24147618..e5ab80f838cf 100644
--- a/scripting/source/provider/URIHelper.cxx
+++ b/scripting/source/provider/URIHelper.cxx
@@ -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 );
diff --git a/scripting/source/runtimemgr/ScriptNameResolverImpl.cxx b/scripting/source/runtimemgr/ScriptNameResolverImpl.cxx
index 5a45a29b731b..4ce06254b30f 100644
--- a/scripting/source/runtimemgr/ScriptNameResolverImpl.cxx
+++ b/scripting/source/runtimemgr/ScriptNameResolverImpl.cxx
@@ -54,10 +54,10 @@ namespace scripting_runtimemgr
{
const sal_Char* const LANGUAGE_TO_RESOLVE_ON[] = { "All" }; // should be configurable
-OUString nrs_implName = OUString::createFromAscii(
- "drafts.com.sun.star.script.framework.runtime.DefaultScriptNameResolver" );
-OUString nrs_serviceName = OUString::createFromAscii(
- "drafts.com.sun.star.script.framework.runtime.DefaultScriptNameResolver" );
+OUString nrs_implName(RTL_CONSTASCII_USTRINGPARAM(
+ "drafts.com.sun.star.script.framework.runtime.DefaultScriptNameResolver" ));
+OUString nrs_serviceName(RTL_CONSTASCII_USTRINGPARAM(
+ "drafts.com.sun.star.script.framework.runtime.DefaultScriptNameResolver" ));
Sequence< OUString > nrs_serviceNames = Sequence< OUString >( &nrs_serviceName, 1 );
const char* const SCRIPTSTORAGEMANAGER_SERVICE =
@@ -173,10 +173,10 @@ throw ( lang::IllegalArgumentException, script::CannotConvertException, RuntimeE
OSL_TRACE( "ScriptNameResolverImpl::resolve Starting..." );
- OUString docString = OUString::createFromAscii( "location=document" );
- OUString userString = OUString::createFromAscii( "location=user" );
- OUString shareString = OUString::createFromAscii( "location=share" );
- OUString filesysString = OUString::createFromAscii( "location=filesystem" );
+ OUString docString(RTL_CONSTASCII_USTRINGPARAM("location=document"));
+ OUString userString(RTL_CONSTASCII_USTRINGPARAM("location=user"));
+ OUString shareString(RTL_CONSTASCII_USTRINGPARAM("location=share"));
+ OUString filesysString(RTL_CONSTASCII_USTRINGPARAM("location=filesystem"));
// initialise vector with doc, user and share
@@ -222,8 +222,8 @@ throw ( lang::IllegalArgumentException, script::CannotConvertException, RuntimeE
throw RuntimeException( temp.concat( e.Message ), Reference< XInterface >() );
}
Reference< XInterface > xInterface = m_xMultiComFac->createInstanceWithContext(
- ::rtl::OUString::createFromAscii(
- "com.sun.star.ucb.SimpleFileAccess" ), m_xContext );
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
+ "com.sun.star.ucb.SimpleFileAccess" )), m_xContext );
validateXRef( xInterface,
"ScriptProvider::initialise: cannot get SimpleFileAccess Service\n" );
Reference < ucb::XSimpleFileAccess > xSimpleFileAccess = Reference <
@@ -270,7 +270,7 @@ throw ( lang::IllegalArgumentException, script::CannotConvertException, RuntimeE
// b) an illegal location
// detect illegal location
- if ( scriptURI.indexOf( OUString::createFromAscii( "location=" ) ) != -1 )
+ if ( scriptURI.indexOf( OUString(RTL_CONSTASCII_USTRINGPARAM("location=")) ) != -1 )
{
OSL_TRACE(
"ScriptNameResolver::resolve, throwing IllegalArgException" );
@@ -432,7 +432,7 @@ SAL_THROW ( ( lang::IllegalArgumentException, css::security::AccessControlExcept
try
{
OUString permissionURI = docURI;
- OUString filesysString = OUString::createFromAscii( "location=filesystem" );
+ OUString filesysString(RTL_CONSTASCII_USTRINGPARAM("location=filesystem"));
if ( scriptURI.indexOf( filesysString ) != -1 )
{
// in the case of filesys scripts we're checking whether the
@@ -520,7 +520,7 @@ const ::rtl::OUString & permissionURI ) SAL_THROW ( ( RuntimeException, css::sec
Reference< XInterface > xInterface;
Any a = m_xContext->getValueByName(
- OUString::createFromAscii( SCRIPTSTORAGEMANAGER_SERVICE ) );
+ OUString(RTL_CONSTASCII_USTRINGPARAM( SCRIPTSTORAGEMANAGER_SERVICE )) );
if ( sal_False == ( a >>= xInterface ) )
{
throw RuntimeException(
@@ -541,7 +541,7 @@ const ::rtl::OUString & permissionURI ) SAL_THROW ( ( RuntimeException, css::sec
( sid != scriptingConstantsPool.SHARED_STORAGE_ID ) )
{
xScriptSecurity->checkPermission( permissionURI,
- OUString::createFromAscii( "execute" ) );
+ OUString(RTL_CONSTASCII_USTRINGPARAM("execute")) );
// if we get here, the checkPermission hasn't thrown an
// AccessControlException, ie. permission has been granted
OSL_TRACE( "ScriptNameResolverImpl::getStorageInstance: got execute permission for ID=%d", sid );
@@ -586,7 +586,7 @@ throw( lang::IllegalArgumentException )
{
OUString filePath;
OUString fileName;
- OUString filesysString = OUString::createFromAscii( "location=filesystem" );
+ OUString filesysString(RTL_CONSTASCII_USTRINGPARAM("location=filesystem"));
sal_Int32 locationPos = scriptURI.indexOf( filesysString );
// expect location=filesys:file:///foo/bar/myscript.bsh etc
// except the file url at this point is encoded
@@ -603,7 +603,7 @@ throw( lang::IllegalArgumentException )
endOfLocn - locationPos - filesysStrLen );
}
//file name shoul also be encoded so again ok to search for '&'
- OUString functionKey = OUString::createFromAscii( "function=" );
+ OUString functionKey(RTL_CONSTASCII_USTRINGPARAM("function="));
sal_Int32 functionKeyLength = functionKey.getLength();
sal_Int32 functionNamePos = scriptURI.indexOf( functionKey );
if ( functionNamePos > 0 )
diff --git a/scripting/source/runtimemgr/ScriptRuntimeManager.cxx b/scripting/source/runtimemgr/ScriptRuntimeManager.cxx
index 113c08bc63b4..06dc463b4878 100644
--- a/scripting/source/runtimemgr/ScriptRuntimeManager.cxx
+++ b/scripting/source/runtimemgr/ScriptRuntimeManager.cxx
@@ -55,10 +55,10 @@ using namespace ::drafts::com::sun::star::script::framework;
namespace scripting_runtimemgr
{
-static OUString s_implName = ::rtl::OUString::createFromAscii(
- "drafts.com.sun.star.script.framework.runtime.ScriptRuntimeManager" );
-static OUString s_serviceName = ::rtl::OUString::createFromAscii(
- "drafts.com.sun.star.script.framework.runtime.ScriptRuntimeManager" );
+static OUString s_implName(RTL_CONSTASCII_USTRINGPARAM(
+ "drafts.com.sun.star.script.framework.runtime.ScriptRuntimeManager" ));
+static OUString s_serviceName(RTL_CONSTASCII_USTRINGPARAM(
+ "drafts.com.sun.star.script.framework.runtime.ScriptRuntimeManager" ));
static Sequence< OUString > s_serviceNames = Sequence< OUString >( &s_serviceName, 1 );
::rtl_StandardModuleCount s_moduleCount = MODULE_COUNT_INIT;
@@ -143,8 +143,8 @@ throw( RuntimeException )
try
{
Reference< XInterface > xInterface = m_xMgr->createInstanceWithContext(
- OUString::createFromAscii(
- "drafts.com.sun.star.script.framework.runtime.DefaultScriptNameResolver" ),
+ OUString(RTL_CONSTASCII_USTRINGPARAM(
+ "drafts.com.sun.star.script.framework.runtime.DefaultScriptNameResolver" )),
m_xContext );
validateXRef( xInterface,
"ScriptRuntimeManager::GetScriptRuntime: cannot get instance of DefaultScriptNameResolver" );
@@ -225,8 +225,8 @@ Any SAL_CALL ScriptRuntimeManager::invoke(
aOutParamIndex, aOutParam );
// need to dispose of filesystem storage
- OUString filesysString = OUString::createFromAscii(
- "location=filesystem" );
+ OUString filesysString(RTL_CONSTASCII_USTRINGPARAM(
+ "location=filesystem" ));
if ( scriptURI.indexOf( filesysString ) != -1 )
{
Any a = m_xContext->getValueByName(
diff --git a/scripting/source/runtimemgr/StorageBridge.cxx b/scripting/source/runtimemgr/StorageBridge.cxx
index e441389f2b05..f422a4a67666 100644
--- a/scripting/source/runtimemgr/StorageBridge.cxx
+++ b/scripting/source/runtimemgr/StorageBridge.cxx
@@ -82,7 +82,7 @@ StorageBridge::initStorage() throw ( ::com::sun::star::uno::RuntimeException )
Reference< XInterface > temp;
Any a = m_xContext->getValueByName(
- OUString::createFromAscii( SCRIPTSTORAGEMANAGER_SERVICE ) );
+ OUString(RTL_CONSTASCII_USTRINGPARAM( SCRIPTSTORAGEMANAGER_SERVICE )) );
if ( sal_False == ( a >>= temp ) )
{
throw RuntimeException(
diff --git a/scripting/source/storage/ScriptInfo.cxx b/scripting/source/storage/ScriptInfo.cxx
index 1511d9ff5644..fa41501c4283 100644
--- a/scripting/source/storage/ScriptInfo.cxx
+++ b/scripting/source/storage/ScriptInfo.cxx
@@ -247,7 +247,7 @@ OUString SAL_CALL ScriptInfo::getDescription( ) throw ( RuntimeException )
// TDB need to determine locale here, hardcoded at the moment
// to english
- OUString localeLang = OUString::createFromAscii( "en" );
+ OUString localeLang(RTL_CONSTASCII_USTRINGPARAM("en"));
strpair_map::const_iterator str_it =
m_scriptData.locales.find( localeLang );
diff --git a/scripting/source/storage/ScriptMetadataImporter.cxx b/scripting/source/storage/ScriptMetadataImporter.cxx
index f46d87b7ceae..b6a7e78838fd 100644
--- a/scripting/source/storage/ScriptMetadataImporter.cxx
+++ b/scripting/source/storage/ScriptMetadataImporter.cxx
@@ -93,7 +93,7 @@ void ScriptMetadataImporter::parseMetaData(
"ScriptMetadataImporter::parseMetaData: No service manager available" );
Reference< XInterface > xInterface = xMgr->createInstanceWithContext(
- OUString::createFromAscii( "com.sun.star.xml.sax.Parser" ), m_xContext );
+ OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.sax.Parser")), m_xContext );
validateXRef( xInterface, "ScriptMetadataImporter::parseMetaData: cannot get SAX Parser" );
Reference< xml::sax::XParser > xParser;
@@ -103,8 +103,8 @@ void ScriptMetadataImporter::parseMetaData(
}
catch (RuntimeException & re )
{
- OUString msg = OUString::createFromAscii(
- "ScriptMetadata:Importer::parserMetaData cannot get XParser" );
+ OUString msg(RTL_CONSTASCII_USTRINGPARAM(
+ "ScriptMetadata:Importer::parserMetaData cannot get XParser" ));
msg.concat( re.Message );
throw RuntimeException( msg, Reference< XInterface > () );
}
@@ -127,24 +127,24 @@ void ScriptMetadataImporter::parseMetaData(
}
catch ( xml::sax::SAXException & saxe )
{
- OUString msg = OUString::createFromAscii(
- "ScriptMetadata:Importer::parserMetaData SAXException" );
+ OUString msg(RTL_CONSTASCII_USTRINGPARAM(
+ "ScriptMetadata:Importer::parserMetaData SAXException" ));
msg.concat( saxe.Message );
throw xml::sax::SAXException( msg, Reference< XInterface > (),
saxe.WrappedException );
}
catch ( io::IOException & ioe )
{
- throw io::IOException( OUString::createFromAscii(
- "ScriptMetadataImporter::parseMetaData IOException: " ) + ioe.Message,
+ throw io::IOException( OUString(RTL_CONSTASCII_USTRINGPARAM(
+ "ScriptMetadataImporter::parseMetaData IOException: " )) + ioe.Message,
Reference< XInterface > () );
}
#ifdef _DEBUG
catch ( ... )
{
- throw RuntimeException( OUString::createFromAscii(
- "ScriptMetadataImporter::parseMetadata UnknownException: " ),
+ throw RuntimeException( OUString(RTL_CONSTASCII_USTRINGPARAM(
+ "ScriptMetadataImporter::parseMetadata UnknownException: " )),
Reference< XInterface > () );
}
#endif
@@ -230,35 +230,35 @@ void ScriptMetadataImporter::startElement(
case SCRIPT:
m_ScriptData.parcelURI = ms_parcelURI;
m_ScriptData.language = xAttribs->getValueByName(
- ::rtl::OUString::createFromAscii( "language" ));
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("language")));
OSL_TRACE( "Trace Message: language is %s\n",
::rtl::OUStringToOString( m_ScriptData.language,
RTL_TEXTENCODING_ASCII_US ).pData->buffer );
break;
case LOCALE:
ms_localeLang = xAttribs->getValueByName(
- ::rtl::OUString::createFromAscii( "lang" ) );
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("lang")) );
OSL_TRACE( "Trace Message: Locale is %s\n",
::rtl::OUStringToOString( ms_localeLang,
RTL_TEXTENCODING_ASCII_US ).pData->buffer );
break;
case DISPLAYNAME:
ms_localeDisName = xAttribs->getValueByName(
- ::rtl::OUString::createFromAscii( "value" ));
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("value")));
OSL_TRACE( "Trace Message: Displyaname is %s\n",
::rtl::OUStringToOString( ms_localeDisName,
RTL_TEXTENCODING_ASCII_US ).pData->buffer );
break;
case FUNCTIONNAME:
m_ScriptData.functionname = xAttribs->getValueByName(
- ::rtl::OUString::createFromAscii( "value" ) );
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("value")) );
OSL_TRACE( "Trace Message: Functionname is %s\n",
::rtl::OUStringToOString( m_ScriptData.functionname,
RTL_TEXTENCODING_ASCII_US ).pData->buffer );
break;
case LOGICALNAME:
m_ScriptData.logicalname = xAttribs->getValueByName(
- ::rtl::OUString::createFromAscii( "value" ));
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("value")));
#ifdef _DEBUG
fprintf(stderr, "Trace Message: logicalname is %s\n",
::rtl::OUStringToOString( m_ScriptData.logicalname,
@@ -268,21 +268,21 @@ void ScriptMetadataImporter::startElement(
case LANGDEPPROPS:
m_ScriptData.languagedepprops.push_back(
::std::make_pair( xAttribs->getValueByName(
- ::rtl::OUString::createFromAscii( "name" ) ),
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("name")) ),
xAttribs->getValueByName(
- ::rtl::OUString::createFromAscii( "value" ) )
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("value")) )
));
OSL_TRACE( "Trace Message: Langdepprops is %s\t%s\n",
::rtl::OUStringToOString( xAttribs->getValueByName(
- ::rtl::OUString::createFromAscii( "name" ) ),
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("name")) ),
RTL_TEXTENCODING_ASCII_US ).pData->buffer,
::rtl::OUStringToOString( xAttribs->getValueByName(
- ::rtl::OUString::createFromAscii( "value" ) ),
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("value")) ),
RTL_TEXTENCODING_ASCII_US ).pData->buffer );
break;
case FILESET:
ms_filesetname = xAttribs->getValueByName(
- ::rtl::OUString::createFromAscii( "name" ) );
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("name")) );
OSL_TRACE( "Trace Message: filesetname is %s\n",
::rtl::OUStringToOString(ms_filesetname,
RTL_TEXTENCODING_ASCII_US ).pData->buffer );
@@ -290,21 +290,21 @@ void ScriptMetadataImporter::startElement(
case FILESETPROPS:
mv_filesetprops.push_back( ::std::make_pair(
xAttribs->getValueByName(
- ::rtl::OUString::createFromAscii( "name" ) ),
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("name")) ),
xAttribs->getValueByName(
- ::rtl::OUString::createFromAscii( "value" ) )
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("value")) )
));
OSL_TRACE( "Trace Message: filesetprops is %s\t%s\n",
::rtl::OUStringToOString( xAttribs->getValueByName(
- ::rtl::OUString::createFromAscii( "name" ) ),
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("name")) ),
RTL_TEXTENCODING_ASCII_US ).pData->buffer,
::rtl::OUStringToOString( xAttribs->getValueByName(
- ::rtl::OUString::createFromAscii( "value" ) ),
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("value")) ),
RTL_TEXTENCODING_ASCII_US ).pData->buffer );
break;
case FILES:
ms_filename = xAttribs->getValueByName(
- ::rtl::OUString::createFromAscii( "name" ) );
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("name")) );
OSL_TRACE( "Trace Message: filename is %s\n",
::rtl::OUStringToOString( ms_filename,
RTL_TEXTENCODING_ASCII_US).pData->buffer );
@@ -313,22 +313,22 @@ void ScriptMetadataImporter::startElement(
/**
mm_files.insert( strpair_pair( ms_filename,
str_pair( xAttribs->getValueByName(
- ::rtl::OUString::createFromAscii( "name" ) ),
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("name")) ),
xAttribs->getValueByName(
- ::rtl::OUString::createFromAscii( "value") ) )
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("value")) ) )
)
);
*/
mv_fileprops.push_back(str_pair( xAttribs->getValueByName(
- ::rtl::OUString::createFromAscii( "name" ) ),
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("name")) ),
xAttribs->getValueByName(
- ::rtl::OUString::createFromAscii( "value") ) ) );
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("value")) ) ) );
OSL_TRACE( "Trace Message: fileprops is %s\t%s\n",
::rtl::OUStringToOString( xAttribs->getValueByName(
- ::rtl::OUString::createFromAscii( "name" ) ),
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("name")) ),
RTL_TEXTENCODING_ASCII_US ).pData->buffer,
::rtl::OUStringToOString( xAttribs->getValueByName(
- ::rtl::OUString::createFromAscii( "value" ) ),
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("value")) ),
RTL_TEXTENCODING_ASCII_US ).pData->buffer );
break;
@@ -519,7 +519,7 @@ void ScriptMetadataImporter::setState( const ::rtl::OUString & tagName )
else
{
//If there is a tag we don't know about, throw a exception (wobbler) :)
- ::rtl::OUString str_sax = ::rtl::OUString::createFromAscii( "No Such Tag" );
+ ::rtl::OUString str_sax(RTL_CONSTASCII_USTRINGPARAM("No Such Tag"));
OSL_TRACE( "ScriptMetadataImporter: No Such Tag: %s\n",
::rtl::OUStringToOString(
diff --git a/scripting/source/storage/ScriptSecurityManager.cxx b/scripting/source/storage/ScriptSecurityManager.cxx
index 42fa362e0e85..57fd00c8003b 100644
--- a/scripting/source/storage/ScriptSecurityManager.cxx
+++ b/scripting/source/storage/ScriptSecurityManager.cxx
@@ -63,17 +63,17 @@ const char* const SCRIPTSTORAGEMANAGER_SERVICE =
namespace scripting_securitymgr
{
-static OUString s_configProv = ::rtl::OUString::createFromAscii(
- "com.sun.star.configuration.ConfigurationProvider");
+static OUString s_configProv(RTL_CONSTASCII_USTRINGPARAM(
+ "com.sun.star.configuration.ConfigurationProvider"));
-static OUString s_configAccess = ::rtl::OUString::createFromAscii(
- "com.sun.star.configuration.ConfigurationAccess");
+static OUString s_configAccess(RTL_CONSTASCII_USTRINGPARAM(
+ "com.sun.star.configuration.ConfigurationAccess"));
-static OUString s_configUpdate = ::rtl::OUString::createFromAscii(
- "com.sun.star.configuration.ConfigurationUpdateAccess");
+static OUString s_configUpdate(RTL_CONSTASCII_USTRINGPARAM(
+ "com.sun.star.configuration.ConfigurationUpdateAccess"));
-static OUString s_securityDialog = ::rtl::OUString::createFromAscii(
- "com.sun.star.script.framework.security.SecurityDialog");
+static OUString s_securityDialog(RTL_CONSTASCII_USTRINGPARAM(
+ "com.sun.star.script.framework.security.SecurityDialog"));
static const int PERMISSION_NEVER = 0;
static const int PERMISSION_PATHLIST = 1;
@@ -356,7 +356,7 @@ void ScriptSecurityManager::checkPermission( const OUString & scriptStorageURL,
const OUString & permissionRequest )
throw ( RuntimeException, lang::IllegalArgumentException, security::AccessControlException )
{
- if( permissionRequest.equals( OUString::createFromAscii( "execute" ) ) )
+ if( permissionRequest.equals( OUString(RTL_CONSTASCII_USTRINGPARAM("execute")) ) )
{
OSL_TRACE(
"ScriptSecurityManager::checkPermission: execute permission request for %s",
@@ -376,18 +376,18 @@ void ScriptSecurityManager::checkPermission( const OUString & scriptStorageURL,
OSL_TRACE( "permission refused" );
Any aPermission;
security::RuntimePermission permission;
- permission.Name = OUString::createFromAscii( "execute" ).concat( scriptStorageURL );
+ permission.Name = OUString(RTL_CONSTASCII_USTRINGPARAM("execute")).concat( scriptStorageURL );
aPermission <<= permission;
throw security::AccessControlException(
- OUString::createFromAscii( "ScriptSecurityManager::checkPermission: no execute permission for URL" ).concat( scriptStorageURL ),
+ OUString(RTL_CONSTASCII_USTRINGPARAM("ScriptSecurityManager::checkPermission: no execute permission for URL")).concat( scriptStorageURL ),
Reference< XInterface > (), aPermission );
}
}
// we should never get here!!
- throw lang::IllegalArgumentException( OUString::createFromAscii( "ScriptSecurityManager::checkPermission: storageURL not found" ), Reference< XInterface > (), 0 );
+ throw lang::IllegalArgumentException( OUString(RTL_CONSTASCII_USTRINGPARAM("ScriptSecurityManager::checkPermission: storageURL not found")), Reference< XInterface > (), 0 );
}
// inappropriate permission request
- throw lang::IllegalArgumentException( OUString::createFromAscii( "ScriptSecurityManager::checkPermission: storageURL not found" ), Reference< XInterface > (), 1 );
+ throw lang::IllegalArgumentException( OUString(RTL_CONSTASCII_USTRINGPARAM("ScriptSecurityManager::checkPermission: storageURL not found")), Reference< XInterface > (), 1 );
}
void ScriptSecurityManager::removePermissionSettings ( ::rtl::OUString & scriptStorageURL )
@@ -415,8 +415,8 @@ void ScriptSecurityManager::readConfiguration()
try
{
beans::PropertyValue configPath;
- configPath.Name = ::rtl::OUString::createFromAscii( "nodepath" );
- configPath.Value <<= ::rtl::OUString::createFromAscii( "org.openoffice.Office.Common/Security/Scripting" );
+ configPath.Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("nodepath"));
+ configPath.Value <<= ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("org.openoffice.Office.Common/Security/Scripting"));
Sequence < Any > aargs( 1 );
aargs[ 0 ] <<= configPath;
validateXRef( m_xConfigProvFactory,
@@ -513,8 +513,8 @@ void ScriptSecurityManager::readConfiguration()
validateXRef( xMgr,
"ScriptSecurityManager::readConfiguration: cannot get XMultiComponentFactory" );
xInterface = xMgr->createInstanceWithContext(
- ::rtl::OUString::createFromAscii(
- "com.sun.star.util.PathSubstitution"), m_xContext);
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
+ "com.sun.star.util.PathSubstitution")), m_xContext);
validateXRef( xInterface,
"ScriptSecurityManager::readConfiguration: cannot get ConfigurationProvider" );
Reference< util::XStringSubstitution > xStringSubstitution(
@@ -549,8 +549,8 @@ throw ( RuntimeException )
{
OSL_TRACE( "--->ScriptSecurityManager::addToSecurePaths" );
beans::PropertyValue configPath;
- configPath.Name = ::rtl::OUString::createFromAscii( "nodepath" );
- configPath.Value <<= ::rtl::OUString::createFromAscii( "org.openoffice.Office.Common/Security/Scripting" );
+ configPath.Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("nodepath"));
+ configPath.Value <<= ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("org.openoffice.Office.Common/Security/Scripting"));
Sequence < Any > aargs( 1 );
aargs[ 0 ] <<= configPath;
Reference< XInterface > xInterface = m_xConfigProvFactory->createInstanceWithArguments( s_configUpdate,
diff --git a/scripting/source/storage/ScriptStorage.cxx b/scripting/source/storage/ScriptStorage.cxx
index 957532185866..02f49fb47239 100644
--- a/scripting/source/storage/ScriptStorage.cxx
+++ b/scripting/source/storage/ScriptStorage.cxx
@@ -70,8 +70,8 @@ const sal_Char * const SCRIPT_DIR = "/Scripts";
const sal_Char * const SCRIPT_PARCEL = "/parcel-descriptor.xml";
const sal_Char * const SCRIPT_PARCEL_NAME_ONLY = "parcel-descriptor";
-static OUString ss_implName = OUString::createFromAscii( IMPL_NAME );
-static OUString ss_serviceName = OUString::createFromAscii( SERVICE_NAME );
+static OUString ss_implName(RTL_CONSTASCII_USTRINGPARAM( IMPL_NAME ));
+static OUString ss_serviceName(RTL_CONSTASCII_USTRINGPARAM( SERVICE_NAME ));
static Sequence< OUString > ss_serviceNames =
Sequence< OUString >( &ss_serviceName, 1 );
@@ -104,8 +104,8 @@ throw ( RuntimeException )
mh_scriptLangs = new ScriptLanguages_hash();
Reference< XInterface > xInterface =
m_xMgr->createInstanceWithContext(
- OUString::createFromAscii(
- "com.sun.star.configuration.ConfigurationProvider" )
+ OUString(RTL_CONSTASCII_USTRINGPARAM(
+ "com.sun.star.configuration.ConfigurationProvider" ))
, m_xContext );
validateXRef( xInterface,
"ScriptStorage::ScriptStorage: cannot get ConfigurationProvider" );
@@ -117,14 +117,14 @@ throw ( RuntimeException )
validateXRef( xConfigProvFactory,
"ScriptStorage::ScriptStorage: cannot get XMultiServiceFactory interface from ConfigurationProvider" );
beans::PropertyValue configPath;
- configPath.Name = ::rtl::OUString::createFromAscii( "nodepath" );
- configPath.Value <<= ::rtl::OUString::createFromAscii( "org.openoffice.Office.Scripting/ScriptRuntimes" );
+ configPath.Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("nodepath"));
+ configPath.Value <<= ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("org.openoffice.Office.Scripting/ScriptRuntimes"));
Sequence < Any > aargs( 1 );
aargs[ 0 ] <<= configPath;
xInterface = xConfigProvFactory->createInstanceWithArguments(
- OUString::createFromAscii(
- "com.sun.star.configuration.ConfigurationAccess"),
+ OUString(RTL_CONSTASCII_USTRINGPARAM(
+ "com.sun.star.configuration.ConfigurationAccess")),
aargs );
validateXRef( xInterface,
"ScriptStorage::ScriptStorage: cannot get ConfigurationAccess" );
@@ -144,7 +144,7 @@ throw ( RuntimeException )
validateXRef( xPropSet,
"ScriptStorage::ScriptStorage: cannot get XPropertySet for name" );
Any aProp = xPropSet->getPropertyValue(
- OUString::createFromAscii( "SupportedFileExtensions") );
+ OUString(RTL_CONSTASCII_USTRINGPARAM("SupportedFileExtensions")) );
Sequence< OUString > extns;
if( sal_False == ( aProp >>= extns ) )
{
@@ -448,7 +448,7 @@ throw ( RuntimeException, Exception )
// the char just after the filesep
lastFileSep += 1;
sal_Int32 lastFileExt = xStringUri.lastIndexOf( fileExtension );
- OUString searchString = OUString::createFromAscii( "://" );
+ OUString searchString(RTL_CONSTASCII_USTRINGPARAM("://"));
sal_Int32 searchStringLength = searchString.getLength();
sal_Int32 startPath = xStringUri.indexOf( searchString );
sal_Int32 uriLength = xStringUri.getLength();
@@ -500,7 +500,7 @@ ScriptStorage::getFileExtension( const OUString & stringUri )
}
else
{
- fileExtension = OUString::createFromAscii("");
+ fileExtension = OUString(RTL_CONSTASCII_USTRINGPARAM(""));
}
return fileExtension;
}
@@ -584,13 +584,13 @@ throw ( RuntimeException )
xOS = m_xSimpleFileAccess->openFileWrite( parcel_xml_path );
OSL_TRACE( "saving: %s\n", rtl::OUStringToOString(
- it_sfh->second.parcelURI.concat( OUString::createFromAscii(
- "/parcel.xml" ) ),
+ it_sfh->second.parcelURI.concat( OUString(RTL_CONSTASCII_USTRINGPARAM(
+ "/parcel.xml" )) ),
RTL_TEXTENCODING_ASCII_US ).pData->buffer );
Reference< XInterface > xInterface =
m_xMgr->createInstanceWithContext(
- OUString::createFromAscii( "com.sun.star.xml.sax.Writer" ),
+ OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.sax.Writer")),
m_xContext );
validateXRef( xInterface, "ScriptStorage::save: cannot get sax.Writer" );
xHandler = Reference<xml::sax::XExtendedDocumentHandler>(
diff --git a/scripting/source/storage/ScriptStorageManager.cxx b/scripting/source/storage/ScriptStorageManager.cxx
index ae05ff7cd57d..07e5031376dc 100644
--- a/scripting/source/storage/ScriptStorageManager.cxx
+++ b/scripting/source/storage/ScriptStorageManager.cxx
@@ -55,12 +55,10 @@ using namespace ::drafts::com::sun::star::script::framework;
namespace scripting_impl
{
-static OUString s_implName =
- ::rtl::OUString::createFromAscii(
- "drafts.com.sun.star.script.framework.storage.ScriptStorageManager" );
-static OUString s_serviceName =
- ::rtl::OUString::createFromAscii(
+static OUString s_implName(RTL_CONSTASCII_USTRINGPARAM(
"drafts.com.sun.star.script.framework.storage.ScriptStorageManager" );
+static OUString s_serviceName(RTL_CONSTASCII_USTRINGPARAM(
+ "drafts.com.sun.star.script.framework.storage.ScriptStorageManager" ));
static Sequence< OUString > s_serviceNames = Sequence< OUString >( &s_serviceName, 1 );
//extern ::rtl_StandardModuleCount s_moduleCount = MODULE_COUNT_INIT;
@@ -87,8 +85,8 @@ ScriptStorageManager::ScriptStorageManager( const Reference<
{
// obtain the macro expander singleton to use in determining the
// location of the application script storage
- Any aAny = m_xContext->getValueByName( OUString::createFromAscii(
- "/singletons/com.sun.star.util.theMacroExpander" ) );
+ Any aAny = m_xContext->getValueByName( OUString(RTL_CONSTASCII_USTRINGPARAM(
+ "/singletons/com.sun.star.util.theMacroExpander" )) );
Reference< util::XMacroExpander > xME;
if ( sal_False == ( aAny >>= xME ) )
{
@@ -98,14 +96,14 @@ ScriptStorageManager::ScriptStorageManager( const Reference<
}
validateXRef( xME, "ScriptStorageManager constructor: can't get MacroExpander" );
- OUString base = OUString::createFromAscii(
- SAL_CONFIGFILE( "${$BRAND_BASE_DIR/program/bootstrap" ) );
+ OUString base(RTL_CONSTASCII_USTRINGPARAM(
+ SAL_CONFIGFILE( "${$BRAND_BASE_DIR/program/bootstrap" )) );
setupAppStorage( xME,
- base.concat( OUString::createFromAscii( "::BaseInstallation}/share" ) ),
+ base.concat( OUString(RTL_CONSTASCII_USTRINGPARAM("::BaseInstallation}/share")) ),
OUSTR( "SHARE" ) );
setupAppStorage( xME,
- base.concat( OUString::createFromAscii( "::UserInstallation}/user" ) ),
+ base.concat( OUString(RTL_CONSTASCII_USTRINGPARAM("::UserInstallation}/user")) ),
OUSTR( "USER" ) );
}
@@ -129,7 +127,7 @@ SAL_THROW ( ( RuntimeException ) )
{
Reference< XInterface > xInterface =
m_xMgr->createInstanceWithContext(
- OUString::createFromAscii( "com.sun.star.ucb.SimpleFileAccess" ), m_xContext );
+ OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.ucb.SimpleFileAccess")), m_xContext );
validateXRef( xInterface,
"ScriptStorageManager constructor: can't get SimpleFileAccess XInterface" );
Reference< ucb::XSimpleFileAccess > xSFA( xInterface, UNO_QUERY_THROW );
@@ -171,8 +169,8 @@ SAL_THROW ( ( RuntimeException ) )
Reference< XInterface > xInterface =
m_xMgr->createInstanceWithArgumentsAndContext(
- OUString::createFromAscii(
- "drafts.com.sun.star.script.framework.storage.ScriptStorage" ),
+ OUString(RTL_CONSTASCII_USTRINGPARAM(
+ "drafts.com.sun.star.script.framework.storage.ScriptStorage" )),
aArgs, m_xContext );
validateXRef( xInterface, "ScriptStorageManager:: setupAnyStorage: Can't create ScriptStorage for share" );
@@ -219,8 +217,8 @@ throw ( RuntimeException )
validateXRef( xSFA,
"ScriptStorageManager::createScriptStorage: XSimpleFileAccess is not valid" );
- return setupAnyStorage( xSFA, ::rtl::OUString::createFromAscii( "" ),
- ::rtl::OUString::createFromAscii( "" ) );
+ return setupAnyStorage( xSFA, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("")),
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("")) );
}
//*************************************************************************
@@ -237,7 +235,7 @@ throw ( RuntimeException )
// workaround issue: no functionProvider created on doc open
// if NODIALOG tag, strip from stringURI, set boolean=true
bool displayDialog = true;
- ::rtl::OUString dialogTag = ::rtl::OUString::createFromAscii( "NoDialog::" );
+ ::rtl::OUString dialogTag(RTL_CONSTASCII_USTRINGPARAM("NoDialog::"));
::rtl::OUString stringURI = cStringURI;
if( stringURI.indexOf( dialogTag ) == 0 )
{
@@ -249,8 +247,7 @@ throw ( RuntimeException )
// convert file:///... url to vnd... syntax
- ::rtl::OUString canonicalURI(
- ::rtl::OUString::createFromAscii( "vnd.sun.star.pkg://" ) );
+ ::rtl::OUString canonicalURI(RTL_CONSTASCII_USTRINGPARAM("vnd.sun.star.pkg://"));
canonicalURI = canonicalURI.concat( ::rtl::Uri::encode( stringURI,
rtl_UriCharClassUricNoSlash, rtl_UriEncodeCheckEscapes,
RTL_TEXTENCODING_ASCII_US ) );
diff --git a/scripting/source/storage/ScriptURI.cxx b/scripting/source/storage/ScriptURI.cxx
index ead8b99f9f68..b001b1d25e67 100644
--- a/scripting/source/storage/ScriptURI.cxx
+++ b/scripting/source/storage/ScriptURI.cxx
@@ -47,7 +47,7 @@ using namespace ::com::sun::star::lang;
namespace scripting_impl {
-static const OUString schema = OUString::createFromAscii( "vnd.sun.star.script://" );
+static const OUString schema(RTL_CONSTASCII_USTRINGPARAM("vnd.sun.star.script://"));
/**
* Constructor
diff --git a/scripting/source/stringresource/stringresource.cxx b/scripting/source/stringresource/stringresource.cxx
index 2f9201f4fb3d..555bd5ef77fc 100644
--- a/scripting/source/stringresource/stringresource.cxx
+++ b/scripting/source/stringresource/stringresource.cxx
@@ -208,7 +208,7 @@ void StringResourceImpl::removeModifyListener( const Reference< XModifyListener
}
if( !bSuccess )
{
- ::rtl::OUString errorMsg = ::rtl::OUString::createFromAscii( "StringResourceImpl: No entry for ResourceID: " );
+ ::rtl::OUString errorMsg(RTL_CONSTASCII_USTRINGPARAM("StringResourceImpl: No entry for ResourceID: "));
errorMsg.concat( ResourceID );
throw ::com::sun::star::resource::MissingResourceException( errorMsg, Reference< XInterface >() );
}
@@ -456,7 +456,7 @@ void StringResourceImpl::implRemoveId( const ::rtl::OUString& ResourceID, Locale
IdToStringMap::iterator it = rHashMap.find( ResourceID );
if( it == rHashMap.end() )
{
- ::rtl::OUString errorMsg = ::rtl::OUString::createFromAscii( "StringResourceImpl: No entries for ResourceID: " );
+ ::rtl::OUString errorMsg(RTL_CONSTASCII_USTRINGPARAM("StringResourceImpl: No entries for ResourceID: "));
errorMsg.concat( ResourceID );
throw ::com::sun::star::resource::MissingResourceException( errorMsg, Reference< XInterface >() );
}
@@ -491,7 +491,7 @@ void StringResourceImpl::newLocale( const Locale& locale )
if( getItemForLocale( locale, false ) != NULL )
{
- ::rtl::OUString errorMsg = ::rtl::OUString::createFromAscii( "StringResourceImpl: locale already exists" );
+ ::rtl::OUString errorMsg(RTL_CONSTASCII_USTRINGPARAM("StringResourceImpl: locale already exists"));
throw ElementExistException( errorMsg, Reference< XInterface >() );
}
@@ -544,7 +544,7 @@ void StringResourceImpl::newLocale( const Locale& locale )
}
else
{
- ::rtl::OUString errorMsg = ::rtl::OUString::createFromAscii( "StringResourceImpl: Invalid locale" );
+ ::rtl::OUString errorMsg(RTL_CONSTASCII_USTRINGPARAM("StringResourceImpl: Invalid locale"));
throw IllegalArgumentException( errorMsg, Reference< XInterface >(), 0 );
}
}
@@ -649,7 +649,7 @@ sal_Int32 StringResourceImpl::getUniqueNumericId( )
if( m_nNextUniqueNumericId < UNIQUE_NUMBER_NEEDS_INITIALISATION )
{
- ::rtl::OUString errorMsg = ::rtl::OUString::createFromAscii( "getUniqueNumericId: Extended sal_Int32 range" );
+ ::rtl::OUString errorMsg(RTL_CONSTASCII_USTRINGPARAM("getUniqueNumericId: Extended sal_Int32 range"));
throw NoSupportException( errorMsg, Reference< XInterface >() );
}
return m_nNextUniqueNumericId;
@@ -684,7 +684,7 @@ LocaleItem* StringResourceImpl::getItemForLocale
if( pRetItem == NULL && bException )
{
- ::rtl::OUString errorMsg = ::rtl::OUString::createFromAscii( "StringResourceImpl: Invalid locale" );
+ ::rtl::OUString errorMsg(RTL_CONSTASCII_USTRINGPARAM("StringResourceImpl: Invalid locale"));
throw IllegalArgumentException( errorMsg, Reference< XInterface >(), 0 );
}
return pRetItem;
@@ -830,7 +830,7 @@ Sequence< ::rtl::OUString > StringResourcePersistenceImpl::getSupportedServiceNa
// XInitialization base functionality for derived classes
// -----------------------------------------------------------------------------
-static ::rtl::OUString aNameBaseDefaultStr = ::rtl::OUString::createFromAscii( "strings" );
+static ::rtl::OUString aNameBaseDefaultStr(RTL_CONSTASCII_USTRINGPARAM("strings"));
void StringResourcePersistenceImpl::implInitializeCommonParameters
( const Sequence< Any >& aArguments )
@@ -839,7 +839,7 @@ void StringResourcePersistenceImpl::implInitializeCommonParameters
bool bReadOnlyOk = (aArguments[1] >>= m_bReadOnly);
if( !bReadOnlyOk )
{
- ::rtl::OUString errorMsg = ::rtl::OUString::createFromAscii( "XInitialization::initialize: Expected ReadOnly flag" );
+ ::rtl::OUString errorMsg(RTL_CONSTASCII_USTRINGPARAM("XInitialization::initialize: Expected ReadOnly flag"));
throw IllegalArgumentException( errorMsg, Reference< XInterface >(), 1 );
}
@@ -847,14 +847,14 @@ void StringResourcePersistenceImpl::implInitializeCommonParameters
bool bLocaleOk = (aArguments[2] >>= aCurrentLocale);
if( !bLocaleOk )
{
- ::rtl::OUString errorMsg = ::rtl::OUString::createFromAscii( "XInitialization::initialize: Expected Locale" );
+ ::rtl::OUString errorMsg(RTL_CONSTASCII_USTRINGPARAM("XInitialization::initialize: Expected Locale"));
throw IllegalArgumentException( errorMsg, Reference< XInterface >(), 2 );
}
bool bNameBaseOk = (aArguments[3] >>= m_aNameBase);
if( !bNameBaseOk )
{
- ::rtl::OUString errorMsg = ::rtl::OUString::createFromAscii( "XInitialization::initialize: Expected NameBase string" );
+ ::rtl::OUString errorMsg(RTL_CONSTASCII_USTRINGPARAM("XInitialization::initialize: Expected NameBase string"));
throw IllegalArgumentException( errorMsg, Reference< XInterface >(), 3 );
}
if( m_aNameBase.getLength() == 0 )
@@ -863,7 +863,7 @@ void StringResourcePersistenceImpl::implInitializeCommonParameters
bool bCommentOk = (aArguments[4] >>= m_aComment);
if( !bCommentOk )
{
- ::rtl::OUString errorMsg = ::rtl::OUString::createFromAscii( "XInitialization::initialize: Expected Comment string" );
+ ::rtl::OUString errorMsg(RTL_CONSTASCII_USTRINGPARAM("XInitialization::initialize: Expected Comment string"));
throw IllegalArgumentException( errorMsg, Reference< XInterface >(), 4 );
}
@@ -1043,7 +1043,7 @@ void StringResourcePersistenceImpl::implStoreAtStorage
if( pLocaleItem != NULL )
{
::rtl::OUString aStreamName = implGetFileNameForLocaleItem( pLocaleItem, m_aNameBase );
- aStreamName += ::rtl::OUString::createFromAscii( ".properties" );
+ aStreamName += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".properties"));
try
{
@@ -1065,13 +1065,13 @@ void StringResourcePersistenceImpl::implStoreAtStorage
loadLocale( pLocaleItem ) )
{
::rtl::OUString aStreamName = implGetFileNameForLocaleItem( pLocaleItem, aNameBase );
- aStreamName += ::rtl::OUString::createFromAscii( ".properties" );
+ aStreamName += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".properties"));
Reference< io::XStream > xElementStream =
Storage->openStreamElement( aStreamName, ElementModes::READWRITE );
- ::rtl::OUString aPropName = ::rtl::OUString::createFromAscii( "MediaType" );
- ::rtl::OUString aMime = ::rtl::OUString::createFromAscii( "text/plain" );
+ ::rtl::OUString aPropName(RTL_CONSTASCII_USTRINGPARAM("MediaType"));
+ ::rtl::OUString aMime(RTL_CONSTASCII_USTRINGPARAM("text/plain"));
uno::Reference< beans::XPropertySet > xProps( xElementStream, uno::UNO_QUERY );
OSL_ENSURE( xProps.is(), "The StorageStream must implement XPropertySet interface!\n" );
@@ -1079,7 +1079,7 @@ void StringResourcePersistenceImpl::implStoreAtStorage
{
xProps->setPropertyValue( aPropName, uno::makeAny( aMime ) );
- aPropName = ::rtl::OUString::createFromAscii( "UseCommonStoragePasswordEncryption" );
+ aPropName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("UseCommonStoragePasswordEncryption"));
xProps->setPropertyValue( aPropName, uno::makeAny( sal_True ) );
}
@@ -1103,7 +1103,7 @@ void StringResourcePersistenceImpl::implStoreAtStorage
if( pLocaleItem != NULL )
{
::rtl::OUString aStreamName = implGetFileNameForLocaleItem( pLocaleItem, m_aNameBase );
- aStreamName += ::rtl::OUString::createFromAscii( ".default" );
+ aStreamName += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".default"));
try
{
@@ -1122,13 +1122,13 @@ void StringResourcePersistenceImpl::implStoreAtStorage
if( m_pDefaultLocaleItem != NULL && (bStoreAll || m_bDefaultModified) )
{
::rtl::OUString aStreamName = implGetFileNameForLocaleItem( m_pDefaultLocaleItem, aNameBase );
- aStreamName += ::rtl::OUString::createFromAscii( ".default" );
+ aStreamName += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".default"));
Reference< io::XStream > xElementStream =
Storage->openStreamElement( aStreamName, ElementModes::READWRITE );
- ::rtl::OUString aPropName = ::rtl::OUString::createFromAscii( "MediaType" );
- ::rtl::OUString aMime = ::rtl::OUString::createFromAscii( "text/plain" );
+ ::rtl::OUString aPropName(RTL_CONSTASCII_USTRINGPARAM("MediaType"));
+ ::rtl::OUString aMime(RTL_CONSTASCII_USTRINGPARAM("text/plain"));
// Only create stream without content
Reference< io::XOutputStream > xOutputStream = xElementStream->getOutputStream();
@@ -1152,7 +1152,7 @@ void StringResourcePersistenceImpl::storeToURL( const ::rtl::OUString& URL,
Reference< XMultiComponentFactory > xMCF = getMultiComponentFactory();
Reference< ucb::XSimpleFileAccess > xFileAccess;
xFileAccess = Reference< ucb::XSimpleFileAccess >( xMCF->createInstanceWithContext
- ( ::rtl::OUString::createFromAscii( "com.sun.star.ucb.SimpleFileAccess" ),
+ ( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.ucb.SimpleFileAccess")),
m_xContext ), UNO_QUERY );
if( xFileAccess.is() && Handler.is() )
xFileAccess->setInteractionHandler( Handler );
@@ -1316,7 +1316,7 @@ BinaryOutput::BinaryOutput( Reference< XMultiComponentFactory > xMCF,
, m_xContext( xContext )
{
m_xTempFile = m_xMCF->createInstanceWithContext
- ( ::rtl::OUString::createFromAscii( "com.sun.star.io.TempFile" ), m_xContext );
+ ( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.io.TempFile")), m_xContext );
if( m_xTempFile.is() )
m_xOutputStream = Reference< io::XOutputStream >( m_xTempFile, UNO_QUERY );
}
@@ -1544,7 +1544,7 @@ Reference< io::XInputStream > BinaryInput::getInputStreamForSection( sal_Int32 n
if( m_nCurPos + nSize <= m_nSize )
{
Reference< io::XOutputStream > xTempOut( m_xMCF->createInstanceWithContext
- ( ::rtl::OUString::createFromAscii( "com.sun.star.io.TempFile" ), m_xContext ), UNO_QUERY );
+ ( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.io.TempFile")), m_xContext ), UNO_QUERY );
if( xTempOut.is() )
{
Sequence< sal_Int8 > aSection( m_pData + m_nCurPos, nSize );
@@ -1846,7 +1846,7 @@ bool StringResourcePersistenceImpl::implLoadLocale( LocaleItem* )
::rtl::OUString implGetNameScemeForLocaleItem( const LocaleItem* pLocaleItem )
{
- static ::rtl::OUString aUnder = ::rtl::OUString::createFromAscii( "_" );
+ static ::rtl::OUString aUnder(RTL_CONSTASCII_USTRINGPARAM("_"));
OSL_ENSURE( pLocaleItem,
"StringResourcePersistenceImpl::implGetNameScemeForLocaleItem(): pLocaleItem == NULL" );
@@ -2017,7 +2017,7 @@ bool StringResourcePersistenceImpl::implReadPropertiesFile
bool bSuccess = false;
Reference< XMultiComponentFactory > xMCF = getMultiComponentFactory();
Reference< io::XTextInputStream > xTextInputStream( xMCF->createInstanceWithContext
- ( ::rtl::OUString::createFromAscii( "com.sun.star.io.TextInputStream" ), m_xContext ), UNO_QUERY );
+ ( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.io.TextInputStream")), m_xContext ), UNO_QUERY );
if( xTextInputStream.is() )
{
@@ -2229,8 +2229,8 @@ void implWriteStringWithEncoding( const ::rtl::OUString& aStr,
bool StringResourcePersistenceImpl::implWritePropertiesFile( LocaleItem* pLocaleItem,
const Reference< io::XOutputStream >& xOutputStream, const ::rtl::OUString& aComment )
{
- static ::rtl::OUString aAssignmentStr = ::rtl::OUString::createFromAscii( "=" );
- static ::rtl::OUString aLineFeedStr = ::rtl::OUString::createFromAscii( "\n" );
+ static ::rtl::OUString aAssignmentStr(RTL_CONSTASCII_USTRINGPARAM("="));
+ static ::rtl::OUString aLineFeedStr(RTL_CONSTASCII_USTRINGPARAM("\n"));
if( !xOutputStream.is() || pLocaleItem == NULL )
return false;
@@ -2238,7 +2238,7 @@ bool StringResourcePersistenceImpl::implWritePropertiesFile( LocaleItem* pLocale
bool bSuccess = false;
Reference< XMultiComponentFactory > xMCF = getMultiComponentFactory();
Reference< io::XTextOutputStream > xTextOutputStream( xMCF->createInstanceWithContext
- ( ::rtl::OUString::createFromAscii( "com.sun.star.io.TextOutputStream" ), m_xContext ), UNO_QUERY );
+ ( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.io.TextOutputStream")), m_xContext ), UNO_QUERY );
if( xTextOutputStream.is() )
{
@@ -2402,7 +2402,7 @@ void StringResourceWithStorageImpl::initialize( const Sequence< Any >& aArgument
if( !bOk )
{
- ::rtl::OUString errorMsg = ::rtl::OUString::createFromAscii( "StringResourceWithStorageImpl::initialize: invalid storage" );
+ ::rtl::OUString errorMsg(RTL_CONSTASCII_USTRINGPARAM("StringResourceWithStorageImpl::initialize: invalid storage"));
throw IllegalArgumentException( errorMsg, Reference< XInterface >(), 0 );
}
@@ -2593,8 +2593,8 @@ void StringResourceWithStorageImpl::setStorage( const Reference< XStorage >& Sto
if( !Storage.is() )
{
- ::rtl::OUString errorMsg = ::rtl::OUString::createFromAscii
- ( "StringResourceWithStorageImpl::setStorage: invalid storage" );
+ ::rtl::OUString errorMsg(RTL_CONSTASCII_USTRINGPARAM
+ ( "StringResourceWithStorageImpl::setStorage: invalid storage" ));
throw IllegalArgumentException( errorMsg, Reference< XInterface >(), 0 );
}
@@ -2744,12 +2744,12 @@ void StringResourceWithLocationImpl::initialize( const Sequence< Any >& aArgumen
else
{
if( m_aLocation.getStr()[nLen - 1] != '/' )
- m_aLocation += ::rtl::OUString::createFromAscii( "/" );
+ m_aLocation += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/"));
}
if( !bOk )
{
- ::rtl::OUString errorMsg = ::rtl::OUString::createFromAscii( "XInitialization::initialize: invalid URL" );
+ ::rtl::OUString errorMsg(RTL_CONSTASCII_USTRINGPARAM("XInitialization::initialize: invalid URL"));
throw IllegalArgumentException( errorMsg, Reference< XInterface >(), 0 );
}
@@ -2757,7 +2757,7 @@ void StringResourceWithLocationImpl::initialize( const Sequence< Any >& aArgumen
bOk = (aArguments[5] >>= m_xInteractionHandler);
if( !bOk )
{
- ::rtl::OUString errorMsg = ::rtl::OUString::createFromAscii( "StringResourceWithStorageImpl::initialize: invalid type" );
+ ::rtl::OUString errorMsg(RTL_CONSTASCII_USTRINGPARAM("StringResourceWithStorageImpl::initialize: invalid type"));
throw IllegalArgumentException( errorMsg, Reference< XInterface >(), 5 );
}
@@ -2953,8 +2953,8 @@ void StringResourceWithLocationImpl::setURL( const ::rtl::OUString& URL )
sal_Int32 nLen = URL.getLength();
if( nLen == 0 )
{
- ::rtl::OUString errorMsg = ::rtl::OUString::createFromAscii
- ( "StringResourceWithLocationImpl::setURL: invalid URL" );
+ ::rtl::OUString errorMsg(RTL_CONSTASCII_USTRINGPARAM
+ ( "StringResourceWithLocationImpl::setURL: invalid URL" ));
throw IllegalArgumentException( errorMsg, Reference< XInterface >(), 0 );
}
@@ -3023,7 +3023,7 @@ const Reference< ucb::XSimpleFileAccess > StringResourceWithLocationImpl::getFil
{
Reference< XMultiComponentFactory > xMCF = getMultiComponentFactory();
m_xSFI = Reference< ucb::XSimpleFileAccess >( xMCF->createInstanceWithContext
- ( ::rtl::OUString::createFromAscii( "com.sun.star.ucb.SimpleFileAccess" ), m_xContext ), UNO_QUERY );
+ ( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.ucb.SimpleFileAccess")), m_xContext ), UNO_QUERY );
if( m_xSFI.is() && m_xInteractionHandler.is() )
m_xSFI->setInteractionHandler( m_xInteractionHandler );
diff --git a/scripting/source/vbaevents/eventhelper.cxx b/scripting/source/vbaevents/eventhelper.cxx
index 165b5f86a045..5676a0d401ea 100644
--- a/scripting/source/vbaevents/eventhelper.cxx
+++ b/scripting/source/vbaevents/eventhelper.cxx
@@ -117,7 +117,7 @@ using namespace ::ooo::vba;
#define GET_TYPE(x) ::getCppuType((uno::Reference< x > *)0);
// Some constants
-const static rtl::OUString DELIM = rtl::OUString::createFromAscii( "::" );
+const static rtl::OUString DELIM(RTL_CONSTASCII_USTRINGPARAM("::"));
const static sal_Int32 DELIMLEN = DELIM.getLength();
bool isKeyEventOk( awt::KeyEvent& evt, const Sequence< Any >& params )
@@ -414,8 +414,8 @@ eventMethodToDescriptor( const ::rtl::OUString& rEventMethod, ScriptEventDescrip
// set this it VBAInterop, ensures that it doesn't
// get persisted or shown in property editors
- evtDesc.ScriptType = rtl::OUString::createFromAscii(
- "VBAInterop" );
+ evtDesc.ScriptType = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
+ "VBAInterop" ));
return true;
}
return false;
@@ -522,18 +522,18 @@ public:
virtual void SAL_CALL insertByName( const ::rtl::OUString&, const Any& ) throw (lang::IllegalArgumentException, container::ElementExistException, lang::WrappedTargetException, RuntimeException)
{
- throw RuntimeException( rtl::OUString::createFromAscii( "ReadOnly container" ), Reference< XInterface >() );
+ throw RuntimeException( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ReadOnly container")), Reference< XInterface >() );
}
virtual void SAL_CALL removeByName( const ::rtl::OUString& ) throw (::com::sun::star::container::NoSuchElementException, lang::WrappedTargetException, RuntimeException)
{
- throw RuntimeException( rtl::OUString::createFromAscii( "ReadOnly container" ), Reference< XInterface >() );
+ throw RuntimeException( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ReadOnly container")), Reference< XInterface >() );
}
// XNameReplace
virtual void SAL_CALL replaceByName( const ::rtl::OUString&, const Any& ) throw (lang::IllegalArgumentException, container::NoSuchElementException, lang::WrappedTargetException, RuntimeException)
{
- throw RuntimeException( rtl::OUString::createFromAscii( "ReadOnly container" ), Reference< XInterface >() );
+ throw RuntimeException( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ReadOnly container")), Reference< XInterface >() );
}
@@ -699,7 +699,7 @@ OPropertyContainer(GetBroadcastHelper()), m_xContext( rxContext ), m_bDocClosed(
{
registerProperty( EVENTLSTNR_PROPERTY_MODEL, EVENTLSTNR_PROPERTY_ID_MODEL,
beans::PropertyAttribute::TRANSIENT, &m_xModel, ::getCppuType( &m_xModel ) );
- msProject = rtl::OUString::createFromAscii("Standard");
+ msProject = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Standard"));
}
void
@@ -924,7 +924,7 @@ EventListener::firing_Impl(const ScriptEvent& evt, Any* pRet ) throw(RuntimeExce
{
OSL_TRACE("EventListener::firing_Impl( FAKE VBA_EVENTS )");
static const ::rtl::OUString vbaInterOp =
- ::rtl::OUString::createFromAscii("VBAInterop");
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("VBAInterop"));
// let default handlers deal with non vba stuff
if ( !evt.ScriptType.equals( vbaInterOp ) )
@@ -998,8 +998,8 @@ EventListener::firing_Impl(const ScriptEvent& evt, Any* pRet ) throw(RuntimeExce
if ( sScriptCode.indexOf( '.' ) == -1 )
{
//'Project' is a better default but I want to force failures
- //rtl::OUString sMacroLoc = rtl::OUString::createFromAscii("Project");
- sProject = rtl::OUString::createFromAscii("Standard");
+ //rtl::OUString sMacroLoc(RTL_CONSTASCII_USTRINGPARAM("Project"));
+ sProject = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Standard"));
if ( pBasicManager->GetName().Len() > 0 )
sProject = pBasicManager->GetName();
@@ -1011,8 +1011,8 @@ EventListener::firing_Impl(const ScriptEvent& evt, Any* pRet ) throw(RuntimeExce
sScriptCode = sScriptCode.copy( nIndex + 1 );
}
rtl::OUString sMacroLoc = sProject;
- sMacroLoc = sMacroLoc.concat( rtl::OUString::createFromAscii(".") );
- sMacroLoc = sMacroLoc.concat( sScriptCode ).concat( rtl::OUString::createFromAscii(".") );
+ sMacroLoc = sMacroLoc.concat( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".")) );
+ sMacroLoc = sMacroLoc.concat( sScriptCode ).concat( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".")) );
OSL_TRACE("sMacroLoc is %s", rtl::OUStringToOString( sMacroLoc, RTL_TEXTENCODING_UTF8 ).getStr() );
for ( ; txInfo != txInfo_end; ++txInfo )
@@ -1057,7 +1057,7 @@ EventListener::firing_Impl(const ScriptEvent& evt, Any* pRet ) throw(RuntimeExce
RTL_TEXTENCODING_UTF8 ).getStr() );
try
{
- uno::Any aDummyCaller = uno::makeAny( rtl::OUString::createFromAscii("Error") );
+ uno::Any aDummyCaller = uno::makeAny( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Error")) );
if ( pRet )
ooo::vba::executeMacro( mpShell, url, aArguments, *pRet, aDummyCaller );
else
diff --git a/scripting/source/vbaevents/vbamsformreturntypes.hxx b/scripting/source/vbaevents/vbamsformreturntypes.hxx
index 4f3e26b32fa4..82e6ddce8ff4 100644
--- a/scripting/source/vbaevents/vbamsformreturntypes.hxx
+++ b/scripting/source/vbaevents/vbamsformreturntypes.hxx
@@ -50,7 +50,7 @@ public:
virtual void SAL_CALL setValue( ::sal_Bool _value ) throw (::com::sun::star::uno::RuntimeException) { Value = _value; }
// XDefaultProperty
- ::rtl::OUString SAL_CALL getDefaultPropertyName() throw (com::sun::star::uno::RuntimeException) { return ::rtl::OUString::createFromAscii("Value"); }
+ ::rtl::OUString SAL_CALL getDefaultPropertyName() throw (com::sun::star::uno::RuntimeException) { return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Value")); }
};
@@ -69,7 +69,7 @@ public:
virtual void SAL_CALL setValue( ::sal_Int32 _value ) throw (::com::sun::star::uno::RuntimeException) { Value = _value; }
// XDefaultProperty
- ::rtl::OUString SAL_CALL getDefaultPropertyName() throw (com::sun::star::uno::RuntimeException) { return ::rtl::OUString::createFromAscii("Value"); }
+ ::rtl::OUString SAL_CALL getDefaultPropertyName() throw (com::sun::star::uno::RuntimeException) { return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Value")); }
};
#endif