[Libreoffice-commits] .: 3 commits - dtrans/source scripting/source sfx2/source svx/source
Norbert Thiebaud
nthiebaud at kemper.freedesktop.org
Sat Jun 2 18:21:36 PDT 2012
dtrans/source/win32/dtobj/MimeAttrib.hxx | 2
scripting/source/basprov/basmethnode.cxx | 40 +-
scripting/source/basprov/basprov.cxx | 38 +-
scripting/source/dlgprov/dlgevtatt.cxx | 42 +-
scripting/source/dlgprov/dlgprov.cxx | 66 ++--
scripting/source/protocolhandler/scripthandler.cxx | 16
scripting/source/provider/ActiveMSPList.cxx | 10
scripting/source/provider/BrowseNodeFactoryImpl.cxx | 19 -
scripting/source/provider/MasterScriptProvider.cxx | 53 +--
scripting/source/provider/MasterScriptProviderFactory.cxx | 8
scripting/source/provider/ProviderCache.cxx | 8
scripting/source/provider/URIHelper.cxx | 60 +--
scripting/source/runtimemgr/ScriptNameResolverImpl.cxx | 30 -
scripting/source/runtimemgr/ScriptRuntimeManager.cxx | 15
scripting/source/stringresource/stringresource.cxx | 88 ++---
scripting/source/vbaevents/eventhelper.cxx | 44 +-
scripting/source/vbaevents/vbamsformreturntypes.hxx | 4
sfx2/source/doc/SfxDocumentMetaData.cxx | 226 +++++++-------
sfx2/source/doc/sfxbasemodel.cxx | 196 ++++++------
svx/source/customshapes/EnhancedCustomShapeFontWork.cxx | 6
svx/source/dialog/docrecovery.cxx | 22 -
svx/source/dialog/fntctrl.cxx | 2
svx/source/form/fmshimp.cxx | 40 +-
svx/source/form/formcontroller.cxx | 40 +-
24 files changed, 531 insertions(+), 544 deletions(-)
New commits:
commit 65269c97c305d7d8efc42add2faf99a18731af52
Author: Norbert Thiebaud <nthiebaud at gmail.com>
Date: Sat Jun 2 20:19:28 2012 -0500
targeted string re-work
Change-Id: I37e225902bf7f3a6e007e7641b2b9898b044a45b
diff --git a/scripting/source/basprov/basmethnode.cxx b/scripting/source/basprov/basmethnode.cxx
index 2759b9e..b3fbfd1 100644
--- a/scripting/source/basprov/basmethnode.cxx
+++ b/scripting/source/basprov/basmethnode.cxx
@@ -52,8 +52,8 @@ using namespace ::sf_misc;
#define BASPROV_PROPERTY_ID_URI 1
#define BASPROV_PROPERTY_ID_EDITABLE 2
-#define BASPROV_PROPERTY_URI ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "URI" ) )
-#define BASPROV_PROPERTY_EDITABLE ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Editable" ) )
+#define BASPROV_PROPERTY_URI ::rtl::OUString( "URI" )
+#define BASPROV_PROPERTY_EDITABLE ::rtl::OUString( "Editable" )
#define BASPROV_DEFAULT_ATTRIBS() PropertyAttribute::BOUND | PropertyAttribute::TRANSIENT | PropertyAttribute::READONLY
@@ -85,17 +85,17 @@ namespace basprov
StarBASIC* pBasic = static_cast< StarBASIC* >( pModule->GetParent() );
if ( pBasic )
{
- m_sURI = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("vnd.sun.star.script:"));
+ m_sURI = ::rtl::OUString("vnd.sun.star.script:");
m_sURI += pBasic->GetName();
- m_sURI += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("."));
+ m_sURI += ::rtl::OUString(".");
m_sURI += pModule->GetName();
- m_sURI += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("."));
+ m_sURI += ::rtl::OUString(".");
m_sURI += m_pMethod->GetName();
- m_sURI += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("?language=Basic&location="));
+ m_sURI += ::rtl::OUString("?language=Basic&location=");
if ( m_bIsAppScript )
- m_sURI += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("application"));
+ m_sURI += ::rtl::OUString("application");
else
- m_sURI += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("document"));
+ m_sURI += ::rtl::OUString("document");
}
}
}
@@ -264,7 +264,7 @@ namespace basprov
if ( xSMgr.is() )
{
Reference< frame::XDesktop > xDesktop( xSMgr->createInstanceWithContext(
- ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.frame.Desktop" ) ), m_xContext ), UNO_QUERY );
+ ::rtl::OUString( "com.sun.star.frame.Desktop" ), m_xContext ), UNO_QUERY );
if ( xDesktop.is() )
{
@@ -273,22 +273,22 @@ namespace basprov
if ( xProv.is() )
{
Reference< frame::XDispatchHelper > xHelper( xSMgr->createInstanceWithContext(
- ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.frame.DispatchHelper" ) ), m_xContext ), UNO_QUERY );
+ ::rtl::OUString( "com.sun.star.frame.DispatchHelper" ), m_xContext ), UNO_QUERY );
if ( xHelper.is() )
{
Sequence < PropertyValue > aArgs(7);
- aArgs[0].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Document"));
+ aArgs[0].Name = ::rtl::OUString("Document");
aArgs[0].Value <<= sDocURL;
- aArgs[1].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("LibName"));
+ aArgs[1].Name = ::rtl::OUString("LibName");
aArgs[1].Value <<= sLibName;
- aArgs[2].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Name"));
+ aArgs[2].Name = ::rtl::OUString("Name");
aArgs[2].Value <<= sModName;
- 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[3].Name = ::rtl::OUString("Type");
+ aArgs[3].Value <<= ::rtl::OUString("Module");
+ aArgs[4].Name = ::rtl::OUString("Line");
aArgs[4].Value <<= static_cast< sal_uInt32 >( nLine1 );
- xHelper->executeDispatch( xProv, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".uno:BasicIDEAppear")), ::rtl::OUString(), 0, aArgs );
+ xHelper->executeDispatch( xProv, ::rtl::OUString(".uno:BasicIDEAppear"), ::rtl::OUString(), 0, aArgs );
}
}
}
@@ -298,7 +298,7 @@ namespace basprov
else
{
throw IllegalArgumentException(
- ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "BasicMethodNodeImpl::invoke: function name not supported!" ) ),
+ ::rtl::OUString( "BasicMethodNodeImpl::invoke: function name not supported!" ),
Reference< XInterface >(), 1 );
}
@@ -315,7 +315,7 @@ namespace basprov
(void)aValue;
throw UnknownPropertyException(
- ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "BasicMethodNodeImpl::setValue: property name is unknown!" ) ),
+ ::rtl::OUString( "BasicMethodNodeImpl::setValue: property name is unknown!" ),
Reference< XInterface >() );
}
@@ -326,7 +326,7 @@ namespace basprov
(void)aPropertyName;
throw UnknownPropertyException(
- ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "BasicMethodNodeImpl::getValue: property name is unknown!" ) ),
+ ::rtl::OUString( "BasicMethodNodeImpl::getValue: property name is unknown!" ),
Reference< XInterface >() );
}
diff --git a/scripting/source/basprov/basprov.cxx b/scripting/source/basprov/basprov.cxx
index 953c362..ae6a553 100644
--- a/scripting/source/basprov/basprov.cxx
+++ b/scripting/source/basprov/basprov.cxx
@@ -83,7 +83,7 @@ namespace basprov
::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
if ( !pImplName )
{
- static ::rtl::OUString aImplName( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.scripting.ScriptProviderForBasic" ) );
+ static ::rtl::OUString aImplName( "com.sun.star.comp.scripting.ScriptProviderForBasic" );
pImplName = &aImplName;
}
}
@@ -101,10 +101,10 @@ namespace basprov
if ( !pNames )
{
static Sequence< ::rtl::OUString > aNames(4);
- aNames.getArray()[0] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.script.provider.ScriptProviderForBasic" ) );
- aNames.getArray()[1] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.script.provider.LanguageScriptProvider" ) );
- aNames.getArray()[2] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.script.provider.ScriptProvider" ) );
- aNames.getArray()[3] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.script.browse.BrowseNode" ) );
+ aNames.getArray()[0] = ::rtl::OUString( "com.sun.star.script.provider.ScriptProviderForBasic" );
+ aNames.getArray()[1] = ::rtl::OUString( "com.sun.star.script.provider.LanguageScriptProvider" );
+ aNames.getArray()[2] = ::rtl::OUString( "com.sun.star.script.provider.ScriptProvider" );
+ aNames.getArray()[3] = ::rtl::OUString( "com.sun.star.script.browse.BrowseNode" );
pNames = &aNames;
}
}
@@ -148,8 +148,8 @@ namespace basprov
Reference< lang::XMultiComponentFactory > xSMgr( m_xContext->getServiceManager() );
if ( xSMgr.is() )
{
- xUriFac.set( xSMgr->createInstanceWithContext( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
- "com.sun.star.uri.UriReferenceFactory" )), m_xContext ), UNO_QUERY );
+ xUriFac.set( xSMgr->createInstanceWithContext( ::rtl::OUString(
+ "com.sun.star.uri.UriReferenceFactory" ), m_xContext ), UNO_QUERY );
}
if ( xUriFac.is() )
@@ -173,7 +173,7 @@ namespace basprov
aDecodedURL = ::rtl::Uri::decode( aDecodedURL, rtl_UriDecodeWithCharset, RTL_TEXTENCODING_UTF8 );
Reference<util::XMacroExpander> xMacroExpander(
m_xContext->getValueByName(
- ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/singletons/com.sun.star.util.theMacroExpander")) ),
+ ::rtl::OUString("/singletons/com.sun.star.util.theMacroExpander") ),
UNO_QUERY );
if ( xMacroExpander.is() )
aFileURL = xMacroExpander->expandMacros( aDecodedURL );
@@ -191,8 +191,8 @@ namespace basprov
OSL_VERIFY( aFileItem.getFileStatus( aFileStatus ) == osl::FileBase::E_None );
::rtl::OUString aCanonicalFileURL( aFileStatus.getFileURL() );
- ::rtl::OUString aSearchURL1( RTL_CONSTASCII_USTRINGPARAM( "share/basic" ) );
- ::rtl::OUString aSearchURL2( RTL_CONSTASCII_USTRINGPARAM( "share/uno_packages" ) );
+ ::rtl::OUString aSearchURL1( "share/basic" );
+ ::rtl::OUString aSearchURL2( "share/uno_packages" );
if( aCanonicalFileURL.indexOf( aSearchURL1 ) != -1 || aCanonicalFileURL.indexOf( aSearchURL2 ) != -1 )
bIsShared = true;
}
@@ -243,7 +243,7 @@ namespace basprov
if ( aArguments.getLength() != 1 )
{
throw IllegalArgumentException(
- ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "BasicProviderImpl::initialize: incorrect argument count." ) ),
+ ::rtl::OUString( "BasicProviderImpl::initialize: incorrect argument count." ),
*this,
1
);
@@ -258,7 +258,7 @@ namespace basprov
if ( !xModel.is() )
{
throw IllegalArgumentException(
- ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "BasicProviderImpl::initialize: unable to determine the document model from the script invocation context." ) ),
+ ::rtl::OUString( "BasicProviderImpl::initialize: unable to determine the document model from the script invocation context." ),
*this,
1
);
@@ -269,7 +269,7 @@ namespace basprov
if ( !( aArguments[0] >>= m_sScriptingContext ) )
{
throw IllegalArgumentException(
- ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "BasicProviderImpl::initialize: incorrect argument type " ) ).concat( aArguments[0].getValueTypeName() ),
+ ::rtl::OUString( "BasicProviderImpl::initialize: incorrect argument type " ).concat( aArguments[0].getValueTypeName() ),
*this,
1
);
@@ -307,7 +307,7 @@ namespace basprov
{
/*
throw RuntimeException(
- ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "BasicProviderImpl::initialize: no scripting context!" ) ),
+ ::rtl::OUString( "BasicProviderImpl::initialize: no scripting context!" ),
Reference< XInterface >() );
*/
}
@@ -336,8 +336,8 @@ namespace basprov
Reference< provider::XScript > xScript;
Reference< lang::XMultiComponentFactory > xMcFac ( m_xContext->getServiceManager() );
Reference< uri::XUriReferenceFactory > xFac (
- xMcFac->createInstanceWithContext( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
- "com.sun.star.uri.UriReferenceFactory")), m_xContext ) , UNO_QUERY );
+ xMcFac->createInstanceWithContext( rtl::OUString(
+ "com.sun.star.uri.UriReferenceFactory"), m_xContext ) , UNO_QUERY );
if ( !xFac.is() )
{
@@ -354,7 +354,7 @@ namespace basprov
if ( !uriRef.is() || !sfUri.is() )
{
- ::rtl::OUString errorMsg(RTL_CONSTASCII_USTRINGPARAM("BasicProviderImpl::getScript: failed to parse URI: "));
+ ::rtl::OUString errorMsg("BasicProviderImpl::getScript: failed to parse URI: ");
errorMsg = errorMsg.concat( scriptURI );
throw provider::ScriptFrameworkErrorException(
errorMsg, Reference< XInterface >(),
@@ -365,7 +365,7 @@ namespace basprov
::rtl::OUString aDescription = sfUri->getName();
::rtl::OUString aLocation = sfUri->getParameter(
- ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("location")) );
+ ::rtl::OUString("location") );
sal_Int32 nIndex = 0;
// In some strange circumstances the Library name can have an
@@ -467,7 +467,7 @@ namespace basprov
SolarMutexGuard aGuard;
- return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Basic"));
+ return ::rtl::OUString("Basic");
}
// -----------------------------------------------------------------------------
diff --git a/scripting/source/dlgprov/dlgevtatt.cxx b/scripting/source/dlgprov/dlgevtatt.cxx
index 789bd38..6c83537 100644
--- a/scripting/source/dlgprov/dlgevtatt.cxx
+++ b/scripting/source/dlgprov/dlgevtatt.cxx
@@ -121,16 +121,16 @@ namespace dlgprov
if ( xSMgr.is() )
{
args[0] <<= xModel;
- mxListener = Reference< XScriptListener >( xSMgr->createInstanceWithArgumentsAndContext( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ooo.vba.EventListener" ) ), args, m_xContext ), UNO_QUERY );
+ mxListener = Reference< XScriptListener >( xSMgr->createInstanceWithArgumentsAndContext( ::rtl::OUString( "ooo.vba.EventListener" ), args, m_xContext ), UNO_QUERY );
}
if ( rxControl.is() )
{
try
{
Reference< XPropertySet > xProps( rxControl->getModel(), UNO_QUERY_THROW );
- xProps->getPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Name") ) ) >>= msDialogCodeName;
+ xProps->getPropertyValue( rtl::OUString("Name" ) ) >>= msDialogCodeName;
xProps.set( mxListener, UNO_QUERY_THROW );
- xProps->setPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Model") ), args[ 0 ] );
+ xProps->setPropertyValue( rtl::OUString("Model" ), args[ 0 ] );
}
catch( const Exception& )
{
@@ -145,7 +145,7 @@ namespace dlgprov
if ( aScriptEvent.ScriptType == "VBAInterop" && mxListener.is() )
{
ScriptEvent aScriptEventCopy( aScriptEvent );
- aScriptEventCopy.ScriptCode = msDialogLibName.concat( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "." ) ) ).concat( msDialogCodeName );
+ aScriptEventCopy.ScriptCode = msDialogLibName.concat( rtl::OUString( "." ) ).concat( msDialogCodeName );
try
{
mxListener->firing( aScriptEventCopy );
@@ -169,26 +169,26 @@ 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(RTL_CONSTASCII_USTRINGPARAM("StarBasic")) ] = rxRTLListener;
+ listernersForTypes[ rtl::OUString("StarBasic") ] = rxRTLListener;
else
- 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 );
+ listernersForTypes[ rtl::OUString("StarBasic") ] = new DialogLegacyScriptListenerImpl( rxContext, rxModel );
+ // handler for Script & ::rtl::OUString("vnd.sun.star.UNO:")
+ listernersForTypes[ rtl::OUString("vnd.sun.star.UNO") ] = new DialogUnoScriptListenerImpl( rxContext, rxModel, rxControl, rxHandler, rxIntrospect, bProviderMode );
+ listernersForTypes[ rtl::OUString("vnd.sun.star.script") ] = new DialogSFScriptListenerImpl( rxContext, rxModel );
// determine the VBA compatibility mode from the Basic library container
try
{
uno::Reference< beans::XPropertySet > xModelProps( rxModel, uno::UNO_QUERY_THROW );
uno::Reference< script::vba::XVBACompatibility > xVBACompat(
- xModelProps->getPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "BasicLibraries" ) ) ), uno::UNO_QUERY_THROW );
+ xModelProps->getPropertyValue( ::rtl::OUString( "BasicLibraries" ) ), uno::UNO_QUERY_THROW );
mbUseFakeVBAEvents = xVBACompat->getVBACompatibilityMode();
}
catch( uno::Exception& )
{
}
if ( mbUseFakeVBAEvents )
- listernersForTypes[ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("VBAInterop")) ] = new DialogVBAScriptListenerImpl( rxContext, rxControl, rxModel, sDialogLibName );
+ listernersForTypes[ rtl::OUString("VBAInterop") ] = new DialogVBAScriptListenerImpl( rxContext, rxControl, rxModel, sDialogLibName );
}
// -----------------------------------------------------------------------------
@@ -212,7 +212,7 @@ namespace dlgprov
Reference< XMultiComponentFactory > xSMgr( m_xContext->getServiceManager() );
if ( xSMgr.is() )
{
- Reference< ooo::vba::XVBAToOOEventDescGen > xVBAToOOEvtDesc( xSMgr->createInstanceWithContext( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ooo.vba.VBAToOOEventDesc" ) ), m_xContext ), UNO_QUERY );
+ Reference< ooo::vba::XVBAToOOEventDescGen > xVBAToOOEvtDesc( xSMgr->createInstanceWithContext( ::rtl::OUString( "ooo.vba.VBAToOOEventDesc" ), m_xContext ), UNO_QUERY );
if ( xVBAToOOEvtDesc.is() )
xEventsSupplier.set( xVBAToOOEvtDesc->getEventSupplier( xControl, sControlName ), UNO_QUERY );
@@ -230,7 +230,7 @@ namespace dlgprov
Reference< XControlModel > xControlModel = xControl->getModel();
Reference< XPropertySet > xProps( xControlModel, uno::UNO_QUERY );
rtl::OUString sName;
- xProps->getPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Name")) ) >>= sName;
+ xProps->getPropertyValue( rtl::OUString("Name") ) >>= sName;
if ( xEventCont.is() )
{
Sequence< ::rtl::OUString > aNames = xEventCont->getElementNames();
@@ -352,7 +352,7 @@ namespace dlgprov
if ( xSMgr.is() )
{
m_xEventAttacher = Reference< XEventAttacher >( xSMgr->createInstanceWithContext(
- ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.script.EventAttacher" ) ), m_xContext ), UNO_QUERY );
+ ::rtl::OUString( "com.sun.star.script.EventAttacher" ), m_xContext ), UNO_QUERY );
if ( !m_xEventAttacher.is() )
throw ServiceNotRegisteredException();
@@ -372,7 +372,7 @@ namespace dlgprov
Reference< XPropertySet > xProps( xDlgControl->getModel(), UNO_QUERY );
try
{
- xProps->getPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Name") ) ) >>= sDialogCodeName;
+ xProps->getPropertyValue( rtl::OUString("Name" ) ) >>= sDialogCodeName;
}
catch( Exception& ){}
}
@@ -497,13 +497,13 @@ namespace dlgprov
{
Reference< provider::XScriptProviderFactory > xFactory(
m_xContext->getValueByName(
- ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/singletons/com.sun.star.script.provider.theMasterScriptProviderFactory")) ),
+ ::rtl::OUString("/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(RTL_CONSTASCII_USTRINGPARAM("user"));
+ aCtx <<= ::rtl::OUString("user");
xScriptProvider.set( xFactory->createScriptProvider( aCtx ), UNO_QUERY );
}
}
@@ -548,9 +548,9 @@ namespace dlgprov
sal_Int32 nIndex = sScriptCode.indexOf( ':' );
if ( nIndex >= 0 && nIndex < sScriptCode.getLength() )
{
- sScriptURL = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("vnd.sun.star.script:"));
+ sScriptURL = ::rtl::OUString("vnd.sun.star.script:");
sScriptURL += sScriptCode.copy( nIndex + 1 );
- sScriptURL += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("?language=Basic&location="));
+ sScriptURL += ::rtl::OUString("?language=Basic&location=");
sScriptURL += sScriptCode.copy( 0, nIndex );
}
ScriptEvent aSFScriptEvent( aScriptEvent );
@@ -561,7 +561,7 @@ namespace dlgprov
void DialogUnoScriptListenerImpl::firing_impl( const ScriptEvent& aScriptEvent, Any* pRet )
{
- static ::rtl::OUString sUnoURLScheme(RTL_CONSTASCII_USTRINGPARAM("vnd.sun.star.UNO:"));
+ static ::rtl::OUString sUnoURLScheme("vnd.sun.star.UNO:");
::rtl::OUString sScriptCode( aScriptEvent.ScriptCode );
::rtl::OUString aMethodName = aScriptEvent.ScriptCode.copy( sUnoURLScheme.getLength() );
@@ -650,7 +650,7 @@ namespace dlgprov
if( pResMgr )
{
String aRes( ResId(STR_ERRUNOEVENTBINDUNG, *pResMgr) );
- ::rtl::OUString aQuoteChar( RTL_CONSTASCII_USTRINGPARAM( "\"" ) );
+ ::rtl::OUString aQuoteChar( "\"" );
::rtl::OUString aOURes = aRes;
sal_Int32 nIndex = aOURes.indexOf( '%' );
diff --git a/scripting/source/dlgprov/dlgprov.cxx b/scripting/source/dlgprov/dlgprov.cxx
index 420506c..bc75db1 100644
--- a/scripting/source/dlgprov/dlgprov.cxx
+++ b/scripting/source/dlgprov/dlgprov.cxx
@@ -74,13 +74,13 @@ namespace comp_DialogModelProvider
::rtl::OUString SAL_CALL _getImplementationName()
{
- return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DialogModelProvider"));
+ return ::rtl::OUString("DialogModelProvider");
}
uno::Sequence< ::rtl::OUString > SAL_CALL _getSupportedServiceNames()
{
uno::Sequence< ::rtl::OUString > s(1);
- s[0] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.awt.UnoControlDialogModelProvider"));
+ s[0] = ::rtl::OUString("com.sun.star.awt.UnoControlDialogModelProvider");
return s;
}
@@ -94,7 +94,7 @@ namespace dlgprov
{
//.........................................................................
-static ::rtl::OUString aResourceResolverPropName(RTL_CONSTASCII_USTRINGPARAM("ResourceResolver"));
+static ::rtl::OUString aResourceResolverPropName("ResourceResolver");
Reference< resource::XStringResourceManager > lcl_getStringResourceManager(const Reference< XComponentContext >& i_xContext,const ::rtl::OUString& i_sURL)
{
@@ -118,7 +118,7 @@ static ::rtl::OUString aResourceResolverPropName(RTL_CONSTASCII_USTRINGPARAM("Re
Reference< XMultiComponentFactory > xSMgr_( i_xContext->getServiceManager(), UNO_QUERY_THROW );
// TODO: Ctor
Reference< resource::XStringResourceManager > xStringResourceManager( xSMgr_->createInstanceWithContext
- ( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.resource.StringResourceWithLocation")),
+ ( ::rtl::OUString("com.sun.star.resource.StringResourceWithLocation"),
i_xContext ), UNO_QUERY );
if( xStringResourceManager.is() )
{
@@ -131,7 +131,7 @@ static ::rtl::OUString aResourceResolverPropName(RTL_CONSTASCII_USTRINGPARAM("Re
Reference< container::XNameContainer > lcl_createControlModel(const Reference< XComponentContext >& i_xContext)
{
Reference< XMultiComponentFactory > xSMgr_( i_xContext->getServiceManager(), UNO_QUERY_THROW );
- Reference< container::XNameContainer > xControlModel( xSMgr_->createInstanceWithContext( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.awt.UnoControlDialogModel" ) ), i_xContext ), UNO_QUERY_THROW );
+ Reference< container::XNameContainer > xControlModel( xSMgr_->createInstanceWithContext( ::rtl::OUString( "com.sun.star.awt.UnoControlDialogModel" ), i_xContext ), UNO_QUERY_THROW );
return xControlModel;
}
Reference< container::XNameContainer > lcl_createDialogModel( const Reference< XComponentContext >& i_xContext,
@@ -142,7 +142,7 @@ static ::rtl::OUString aResourceResolverPropName(RTL_CONSTASCII_USTRINGPARAM("Re
{
Reference< container::XNameContainer > xDialogModel( lcl_createControlModel(i_xContext) );
- ::rtl::OUString aDlgSrcUrlPropName( RTL_CONSTASCII_USTRINGPARAM( "DialogSourceURL" ) );
+ ::rtl::OUString aDlgSrcUrlPropName( "DialogSourceURL" );
Reference< beans::XPropertySet > xDlgPropSet( xDialogModel, UNO_QUERY );
xDlgPropSet->setPropertyValue( aDlgSrcUrlPropName, aDialogSourceURL );
@@ -178,7 +178,7 @@ static ::rtl::OUString aResourceResolverPropName(RTL_CONSTASCII_USTRINGPARAM("Re
::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
if ( !pImplName )
{
- static ::rtl::OUString aImplName( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.scripting.DialogProvider" ) );
+ static ::rtl::OUString aImplName( "com.sun.star.comp.scripting.DialogProvider" );
pImplName = &aImplName;
}
}
@@ -196,9 +196,9 @@ static ::rtl::OUString aResourceResolverPropName(RTL_CONSTASCII_USTRINGPARAM("Re
if ( !pNames )
{
static Sequence< ::rtl::OUString > aNames(3);
- aNames.getArray()[0] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.awt.DialogProvider" ) );
- aNames.getArray()[1] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.awt.DialogProvider2" ) );
- aNames.getArray()[2] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.awt.ContainerWindowProvider" ) );
+ aNames.getArray()[0] = ::rtl::OUString( "com.sun.star.awt.DialogProvider" );
+ aNames.getArray()[1] = ::rtl::OUString( "com.sun.star.awt.DialogProvider2" );
+ aNames.getArray()[2] = ::rtl::OUString( "com.sun.star.awt.ContainerWindowProvider" );
pNames = &aNames;
}
}
@@ -275,10 +275,10 @@ static ::rtl::OUString aResourceResolverPropName(RTL_CONSTASCII_USTRINGPARAM("Re
{
if ( !m_BasicInfo.get() )
// shouln't get here
- throw RuntimeException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("No information to create dialog" ) ), Reference< XInterface >() );
+ throw RuntimeException( ::rtl::OUString( "No information to create dialog" ), Reference< XInterface >() );
Reference< resource::XStringResourceManager > xStringResourceManager = getStringResourceFromDialogLibrary( m_BasicInfo->mxDlgLib );
- rtl::OUString aURL(RTL_CONSTASCII_USTRINGPARAM("" ));
+ rtl::OUString aURL("" );
Any aDialogSourceURL;
aDialogSourceURL <<= aURL;
Reference< XControlModel > xCtrlModel( createDialogModel( m_BasicInfo->mxInput, xStringResourceManager, aDialogSourceURL ), UNO_QUERY_THROW );
@@ -298,18 +298,18 @@ static ::rtl::OUString aResourceResolverPropName(RTL_CONSTASCII_USTRINGPARAM("Re
if ( !xSMgr.is() )
{
throw RuntimeException(
- ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DialogProviderImpl::getDialogModel: Couldn't instantiate MultiComponent factory" ) ),
+ ::rtl::OUString( "DialogProviderImpl::getDialogModel: Couldn't instantiate MultiComponent factory" ),
Reference< XInterface >() );
}
Reference< uri::XUriReferenceFactory > xFac (
- xSMgr->createInstanceWithContext( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
- "com.sun.star.uri.UriReferenceFactory")), m_xContext ) , UNO_QUERY );
+ xSMgr->createInstanceWithContext( rtl::OUString(
+ "com.sun.star.uri.UriReferenceFactory"), m_xContext ) , UNO_QUERY );
if ( !xFac.is() )
{
throw RuntimeException(
- ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DialogProviderImpl::getDialogModel(), could not instatiate UriReferenceFactory.")),
+ ::rtl::OUString("DialogProviderImpl::getDialogModel(), could not instatiate UriReferenceFactory."),
Reference< XInterface >() );
}
@@ -322,7 +322,7 @@ static ::rtl::OUString aResourceResolverPropName(RTL_CONSTASCII_USTRINGPARAM("Re
Reference< util::XMacroExpander > xMacroExpander(
m_xContext->getValueByName(
- ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/singletons/com.sun.star.util.theMacroExpander")) ),
+ ::rtl::OUString("/singletons/com.sun.star.util.theMacroExpander") ),
UNO_QUERY_THROW );
Reference< uri::XUriReference > uriRef;
@@ -331,7 +331,7 @@ static ::rtl::OUString aResourceResolverPropName(RTL_CONSTASCII_USTRINGPARAM("Re
uriRef = Reference< uri::XUriReference >( xFac->parse( aURL ), UNO_QUERY );
if ( !uriRef.is() )
{
- ::rtl::OUString errorMsg(RTL_CONSTASCII_USTRINGPARAM("DialogProviderImpl::getDialogModel: failed to parse URI: "));
+ ::rtl::OUString errorMsg("DialogProviderImpl::getDialogModel: failed to parse URI: ");
errorMsg += aURL;
throw IllegalArgumentException( errorMsg,
Reference< XInterface >(), 1 );
@@ -351,7 +351,7 @@ static ::rtl::OUString aResourceResolverPropName(RTL_CONSTASCII_USTRINGPARAM("Re
// Try any other URL with SimpleFileAccess
Reference< ucb::XSimpleFileAccess > xSFI =
Reference< ucb::XSimpleFileAccess >( xSMgr->createInstanceWithContext
- ( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.ucb.SimpleFileAccess")), m_xContext ), UNO_QUERY );
+ ( ::rtl::OUString("com.sun.star.ucb.SimpleFileAccess"), m_xContext ), UNO_QUERY );
try
{
@@ -372,7 +372,7 @@ static ::rtl::OUString aResourceResolverPropName(RTL_CONSTASCII_USTRINGPARAM("Re
sDlgName = sDescription.getToken( 0, (sal_Unicode)'.', nIndex );
::rtl::OUString sLocation = sfUri->getParameter(
- ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("location")) );
+ ::rtl::OUString("location") );
// get dialog library container
@@ -452,21 +452,21 @@ static ::rtl::OUString aResourceResolverPropName(RTL_CONSTASCII_USTRINGPARAM("Re
if ( !xISP.is() )
{
throw IllegalArgumentException(
- ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DialogProviderImpl::getDialogModel: dialog not found!" ) ),
+ ::rtl::OUString( "DialogProviderImpl::getDialogModel: dialog not found!" ),
Reference< XInterface >(), 1 );
}
}
else
{
throw IllegalArgumentException(
- ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DialogProviderImpl::getDialogModel: library not found!" ) ),
+ ::rtl::OUString( "DialogProviderImpl::getDialogModel: library not found!" ),
Reference< XInterface >(), 1 );
}
}
else
{
throw IllegalArgumentException(
- ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DialogProviderImpl::getDialog: library container not found!" ) ),
+ ::rtl::OUString( "DialogProviderImpl::getDialog: library container not found!" ),
Reference< XInterface >(), 1 );
}
@@ -515,7 +515,7 @@ static ::rtl::OUString aResourceResolverPropName(RTL_CONSTASCII_USTRINGPARAM("Re
if ( xSMgr.is() )
{
xDialogControl = Reference< XControl >( xSMgr->createInstanceWithContext(
- ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.awt.UnoControlDialog" ) ), m_xContext ), UNO_QUERY );
+ ::rtl::OUString( "com.sun.star.awt.UnoControlDialog" ), m_xContext ), UNO_QUERY );
if ( xDialogControl.is() )
{
@@ -547,7 +547,7 @@ static ::rtl::OUString aResourceResolverPropName(RTL_CONSTASCII_USTRINGPARAM("Re
// create a peer
Reference< XToolkit> xToolkit( xSMgr->createInstanceWithContext(
- ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.awt.Toolkit" ) ), m_xContext ), UNO_QUERY );
+ ::rtl::OUString( "com.sun.star.awt.Toolkit" ), m_xContext ), UNO_QUERY );
if ( xToolkit.is() )
xDialogControl->createPeer( xToolkit, xPeer );
}
@@ -609,13 +609,13 @@ static ::rtl::OUString aResourceResolverPropName(RTL_CONSTASCII_USTRINGPARAM("Re
if ( !xSMgr.is() )
{
throw RuntimeException(
- ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DialogProviderImpl::getIntrospectionAccess: Couldn't instantiate MultiComponent factory" ) ),
+ ::rtl::OUString( "DialogProviderImpl::getIntrospectionAccess: Couldn't instantiate MultiComponent factory" ),
Reference< XInterface >() );
}
// Get introspection service
Reference< XInterface > xI = xSMgr->createInstanceWithContext
- ( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.beans.Introspection")), m_xContext );
+ ( rtl::OUString("com.sun.star.beans.Introspection"), m_xContext );
if (xI.is())
xIntrospection = Reference< XIntrospection >::query( xI );
}
@@ -682,7 +682,7 @@ static ::rtl::OUString aResourceResolverPropName(RTL_CONSTASCII_USTRINGPARAM("Re
if ( !m_xModel.is() )
{
throw RuntimeException(
- ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DialogProviderImpl::initialize: invalid argument format!" ) ),
+ ::rtl::OUString( "DialogProviderImpl::initialize: invalid argument format!" ),
Reference< XInterface >() );
}
}
@@ -704,7 +704,7 @@ static ::rtl::OUString aResourceResolverPropName(RTL_CONSTASCII_USTRINGPARAM("Re
else if ( aArguments.getLength() > 4 )
{
throw RuntimeException(
- ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DialogProviderImpl::initialize: invalid number of arguments!" ) ),
+ ::rtl::OUString( "DialogProviderImpl::initialize: invalid number of arguments!" ),
Reference< XInterface >() );
}
}
@@ -713,8 +713,8 @@ static ::rtl::OUString aResourceResolverPropName(RTL_CONSTASCII_USTRINGPARAM("Re
// XDialogProvider
// -----------------------------------------------------------------------------
- static ::rtl::OUString aDecorationPropName(RTL_CONSTASCII_USTRINGPARAM("Decoration"));
- static ::rtl::OUString aTitlePropName(RTL_CONSTASCII_USTRINGPARAM("Title"));
+ static ::rtl::OUString aDecorationPropName("Decoration");
+ static ::rtl::OUString aTitlePropName("Title");
Reference < XControl > DialogProviderImpl::createDialogImpl(
const ::rtl::OUString& URL, const Reference< XInterface >& xHandler,
@@ -801,7 +801,7 @@ static ::rtl::OUString aResourceResolverPropName(RTL_CONSTASCII_USTRINGPARAM("Re
if( !xHandler.is() )
{
throw IllegalArgumentException(
- ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DialogProviderImpl::createDialogWithHandler: Invalid xHandler!" ) ),
+ ::rtl::OUString( "DialogProviderImpl::createDialogWithHandler: Invalid xHandler!" ),
Reference< XInterface >(), 1 );
}
Reference< XWindowPeer > xDummyPeer;
@@ -844,7 +844,7 @@ static ::rtl::OUString aResourceResolverPropName(RTL_CONSTASCII_USTRINGPARAM("Re
if( !xParent.is() )
{
throw IllegalArgumentException(
- ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DialogProviderImpl::createContainerWindow: Invalid xParent!" ) ),
+ ::rtl::OUString( "DialogProviderImpl::createContainerWindow: Invalid xParent!" ),
Reference< XInterface >(), 1 );
}
Reference < XControl > xControl = DialogProviderImpl::createDialogImpl( URL, xHandler, xParent, false );
diff --git a/scripting/source/protocolhandler/scripthandler.cxx b/scripting/source/protocolhandler/scripthandler.cxx
index 7b12e68..731929e 100644
--- a/scripting/source/protocolhandler/scripthandler.cxx
+++ b/scripting/source/protocolhandler/scripthandler.cxx
@@ -112,8 +112,8 @@ Reference< XDispatch > SAL_CALL ScriptProtocolHandler::queryDispatch(
// get scheme of url
Reference< uri::XUriReferenceFactory > xFac (
- m_xFactory->createInstance( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
- "com.sun.star.uri.UriReferenceFactory")) ) , UNO_QUERY );
+ m_xFactory->createInstance( rtl::OUString(
+ "com.sun.star.uri.UriReferenceFactory") ) , UNO_QUERY );
if ( xFac.is() )
{
Reference< uri::XUriReference > uriRef(
@@ -246,7 +246,7 @@ void SAL_CALL ScriptProtocolHandler::dispatchWithNotification(
{
aException = ::cppu::getCaughtException();
- ::rtl::OUString reason = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ScriptProtocolHandler::dispatch: caught " ) );
+ ::rtl::OUString reason = ::rtl::OUString( "ScriptProtocolHandler::dispatch: caught " );
invokeResult <<= reason.concat( aException.getValueTypeName() ).concat( e.Message );
@@ -255,9 +255,9 @@ void SAL_CALL ScriptProtocolHandler::dispatchWithNotification(
}
else
{
- ::rtl::OUString reason(RTL_CONSTASCII_USTRINGPARAM(
+ ::rtl::OUString reason(
"ScriptProtocolHandler::dispatchWithNotification failed, ScriptProtocolHandler not initialised"
- ));
+ );
invokeResult <<= reason;
}
@@ -395,13 +395,13 @@ void ScriptProtocolHandler::createScriptProvider()
Reference< XPropertySet > xProps( m_xFactory, UNO_QUERY_THROW );
::rtl::OUString dc(
- RTL_CONSTASCII_USTRINGPARAM( "DefaultContext" ) );
+ "DefaultContext" );
Reference< XComponentContext > xCtx(
xProps->getPropertyValue( dc ), UNO_QUERY_THROW );
- ::rtl::OUString tmspf(RTL_CONSTASCII_USTRINGPARAM(
- "/singletons/com.sun.star.script.provider.theMasterScriptProviderFactory"));
+ ::rtl::OUString tmspf(
+ "/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 075134e..2243248 100644
--- a/scripting/source/provider/ActiveMSPList.cxx
+++ b/scripting/source/provider/ActiveMSPList.cxx
@@ -55,9 +55,9 @@ namespace func_provider
ActiveMSPList::ActiveMSPList( const Reference< XComponentContext > & xContext ) : m_xContext( xContext )
{
- userDirString = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("user"));
- shareDirString = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("share"));
- bundledDirString = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("bundled"));
+ userDirString = ::rtl::OUString("user");
+ shareDirString = ::rtl::OUString("share");
+ bundledDirString = ::rtl::OUString("bundled");
}
ActiveMSPList::~ActiveMSPList()
@@ -67,7 +67,7 @@ ActiveMSPList::~ActiveMSPList()
Reference< provider::XScriptProvider >
ActiveMSPList::createNewMSP( const uno::Any& context )
{
- ::rtl::OUString serviceName(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.script.provider.MasterScriptProvider"));
+ ::rtl::OUString serviceName("com.sun.star.script.provider.MasterScriptProvider");
Sequence< Any > args( &context, 1 );
Reference< provider::XScriptProvider > msp(
@@ -294,7 +294,7 @@ ActiveMSPList::createNonDocMSPs()
return;
}
// do creation of user and share MSPs here
- ::rtl::OUString serviceName(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.script.provider.MasterScriptProvider"));
+ ::rtl::OUString serviceName("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 2c80650..7cfef1a 100644
--- a/scripting/source/provider/BrowseNodeFactoryImpl.cxx
+++ b/scripting/source/provider/BrowseNodeFactoryImpl.cxx
@@ -323,8 +323,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(RTL_CONSTASCII_USTRINGPARAM("user")) ) ), UNO_QUERY_THROW );
- locnBNs[ mspIndex++ ] = Reference< browse::XBrowseNode >( xFac->createScriptProvider( makeAny( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("share")) ) ), UNO_QUERY_THROW );
+ locnBNs[ mspIndex++ ] = Reference< browse::XBrowseNode >( xFac->createScriptProvider( makeAny( ::rtl::OUString("user") ) ), UNO_QUERY_THROW );
+ locnBNs[ mspIndex++ ] = Reference< browse::XBrowseNode >( xFac->createScriptProvider( makeAny( ::rtl::OUString("share") ) ), UNO_QUERY_THROW );
}
// TODO proper exception handling, should throw
catch( const Exception& e )
@@ -409,8 +409,7 @@ public:
Reference< lang::XMultiComponentFactory > xMFac( m_xCtx->getServiceManager(), UNO_QUERY_THROW );
Reference< reflection::XProxyFactory > xProxyFac(
xMFac->createInstanceWithContext(
- rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(
- "com.sun.star.reflection.ProxyFactory" ) ),
+ rtl::OUString( "com.sun.star.reflection.ProxyFactory" ),
m_xCtx ), UNO_QUERY_THROW );
m_xAggProxy = xProxyFac->createProxy( m_xWrappedBrowseNode );
}
@@ -568,7 +567,7 @@ public:
{
m_vNodes.push_back( new DefaultBrowseNode( xCtx, nodes[ i ] ) );
}
- m_Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Root"));
+ m_Name = ::rtl::OUString("Root");
}
~DefaultRootBrowseNode()
@@ -636,7 +635,7 @@ public:
virtual ::rtl::OUString SAL_CALL getName()
throw ( RuntimeException )
{
- return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Root"));
+ return ::rtl::OUString("Root");
}
virtual Sequence< Reference< browse::XBrowseNode > > SAL_CALL
@@ -734,8 +733,8 @@ Sequence< ::rtl::OUString > SAL_CALL
bnf_getSupportedServiceNames( )
SAL_THROW(())
{
- ::rtl::OUString str_name(RTL_CONSTASCII_USTRINGPARAM(
- "com.sun.star.script.browse.BrowseNodeFactory"));
+ ::rtl::OUString str_name(
+ "com.sun.star.script.browse.BrowseNodeFactory");
return Sequence< ::rtl::OUString >( &str_name, 1 );
}
@@ -744,8 +743,8 @@ bnf_getSupportedServiceNames( )
bnf_getImplementationName( )
SAL_THROW(())
{
- return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
- "com.sun.star.script.browse.BrowseNodeFactory" ));
+ return ::rtl::OUString(
+ "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 43d3114..6d351e6 100644
--- a/scripting/source/provider/MasterScriptProvider.cxx
+++ b/scripting/source/provider/MasterScriptProvider.cxx
@@ -163,9 +163,8 @@ throw ( Exception, RuntimeException )
if ( !xScripts.is() )
{
throw lang::IllegalArgumentException(
- ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(
- "The given document does not support embedding scripts into it, and cannot be associated with such a document."
- ) ),
+ ::rtl::OUString( "The given document does not support embedding scripts into it, and cannot be associated with such a document."
+ ),
*this,
1
);
@@ -270,11 +269,11 @@ throw ( provider::ScriptFrameworkErrorException,
// need to get the language from the string
Reference< uri::XUriReferenceFactory > xFac (
- m_xMgr->createInstanceWithContext( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
- "com.sun.star.uri.UriReferenceFactory")), m_xContext ) , UNO_QUERY );
+ m_xMgr->createInstanceWithContext( rtl::OUString(
+ "com.sun.star.uri.UriReferenceFactory"), m_xContext ) , UNO_QUERY );
if ( !xFac.is() )
{
- ::rtl::OUString message(RTL_CONSTASCII_USTRINGPARAM("Failed to instantiate UriReferenceFactory"));
+ ::rtl::OUString message("Failed to instantiate UriReferenceFactory");
throw provider::ScriptFrameworkErrorException(
message, Reference< XInterface >(),
scriptURI, ::rtl::OUString(),
@@ -296,8 +295,8 @@ throw ( provider::ScriptFrameworkErrorException,
provider::ScriptFrameworkErrorType::UNKNOWN );
}
- ::rtl::OUString langKey(RTL_CONSTASCII_USTRINGPARAM("language"));
- ::rtl::OUString locKey(RTL_CONSTASCII_USTRINGPARAM("location"));
+ ::rtl::OUString langKey("language");
+ ::rtl::OUString locKey("location");
if ( sfUri->hasParameter( langKey ) == sal_False ||
sfUri->hasParameter( locKey ) == sal_False ||
@@ -316,7 +315,7 @@ throw ( provider::ScriptFrameworkErrorException,
// if script us located in uno pkg
sal_Int32 index = -1;
- ::rtl::OUString pkgTag(RTL_CONSTASCII_USTRINGPARAM(":uno_packages"));
+ ::rtl::OUString pkgTag(":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
@@ -815,8 +814,8 @@ MasterScriptProvider::getAllProviders() throw ( css::uno::RuntimeException )
}
else
{
- ::rtl::OUString errorMsg(RTL_CONSTASCII_USTRINGPARAM(
- "MasterScriptProvider::getAllProviders, cache not initialised"));
+ ::rtl::OUString errorMsg(
+ "MasterScriptProvider::getAllProviders, cache not initialised");
throw RuntimeException( errorMsg.concat( errorMsg ),
Reference< XInterface >() );
}
@@ -827,8 +826,7 @@ MasterScriptProvider::getAllProviders() throw ( css::uno::RuntimeException )
::rtl::OUString SAL_CALL MasterScriptProvider::getImplementationName( )
throw( RuntimeException )
{
- return ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM (
- "com.sun.star.script.provider.MasterScriptProvider" ) );
+ return ::rtl::OUString( "com.sun.star.script.provider.MasterScriptProvider" );
}
//*************************************************************************
@@ -853,12 +851,9 @@ throw( RuntimeException )
{
::rtl::OUString names[3];
- names[0] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM (
- "com.sun.star.script.provider.MasterScriptProvider" ) );
- names[1] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM (
- "com.sun.star.script.browse.BrowseNode" ) );
- names[2] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM (
- "com.sun.star.script.provider.ScriptProvider" ) );
+ names[0] = ::rtl::OUString( "com.sun.star.script.provider.MasterScriptProvider" );
+ names[1] = ::rtl::OUString( "com.sun.star.script.browse.BrowseNode" );
+ names[2] = ::rtl::OUString( "com.sun.star.script.provider.ScriptProvider" );
return Sequence< ::rtl::OUString >( names, 3 );
}
@@ -888,12 +883,9 @@ Sequence< ::rtl::OUString > sp_getSupportedServiceNames( )
{
::rtl::OUString names[3];
- names[0] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM (
- "com.sun.star.script.provider.MasterScriptProvider" ) );
- names[1] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM (
- "com.sun.star.script.browse.BrowseNode" ) );
- names[2] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM (
- "com.sun.star.script.provider.ScriptProvider" ) );
+ names[0] = ::rtl::OUString( "com.sun.star.script.provider.MasterScriptProvider" );
+ names[1] = ::rtl::OUString( "com.sun.star.script.browse.BrowseNode" );
+ names[2] = ::rtl::OUString( "com.sun.star.script.provider.ScriptProvider" );
return Sequence< ::rtl::OUString >( names, 3 );
}
@@ -902,8 +894,7 @@ Sequence< ::rtl::OUString > sp_getSupportedServiceNames( )
::rtl::OUString sp_getImplementationName( )
SAL_THROW(())
{
- return ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM (
- "com.sun.star.script.provider.MasterScriptProvider" ) );
+ return ::rtl::OUString( "com.sun.star.script.provider.MasterScriptProvider" );
}
// ***** registration or ScriptingFrameworkURIHelper
@@ -918,8 +909,8 @@ Sequence< ::rtl::OUString > urihelper_getSupportedServiceNames( )
SAL_THROW(())
{
::rtl::OUString serviceNameList[] = {
- ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
- "com.sun.star.script.provider.ScriptURIHelper" )) };
+ ::rtl::OUString(
+ "com.sun.star.script.provider.ScriptURIHelper" ) };
Sequence< ::rtl::OUString > serviceNames = Sequence <
::rtl::OUString > ( serviceNameList, 1 );
@@ -930,8 +921,8 @@ Sequence< ::rtl::OUString > urihelper_getSupportedServiceNames( )
::rtl::OUString urihelper_getImplementationName( )
SAL_THROW(())
{
- return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
- "com.sun.star.script.provider.ScriptURIHelper"));
+ return ::rtl::OUString(
+ "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 dd0b10c..3799199 100644
--- a/scripting/source/provider/MasterScriptProviderFactory.cxx
+++ b/scripting/source/provider/MasterScriptProviderFactory.cxx
@@ -90,8 +90,8 @@ Sequence< ::rtl::OUString > SAL_CALL
mspf_getSupportedServiceNames( )
SAL_THROW(())
{
- ::rtl::OUString str_name(RTL_CONSTASCII_USTRINGPARAM(
- "com.sun.star.script.provider.MasterScriptProviderFactory"));
+ ::rtl::OUString str_name(
+ "com.sun.star.script.provider.MasterScriptProviderFactory");
return Sequence< ::rtl::OUString >( &str_name, 1 );
}
@@ -100,8 +100,8 @@ mspf_getSupportedServiceNames( )
mspf_getImplementationName( )
SAL_THROW(())
{
- return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
- "com.sun.star.script.provider.MasterScriptProviderFactory"));
+ return ::rtl::OUString(
+ "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 4e6390b..43fb05a 100644
--- a/scripting/source/provider/ProviderCache.cxx
+++ b/scripting/source/provider/ProviderCache.cxx
@@ -150,8 +150,7 @@ ProviderCache::populateCache() throw ( RuntimeException )
::osl::Guard< osl::Mutex > aGuard( m_mutex );
try
{
- ::rtl::OUString languageProviderName( RTL_CONSTASCII_USTRINGPARAM(
- "com.sun.star.script.provider.LanguageScriptProvider" ) );
+ ::rtl::OUString languageProviderName( "com.sun.star.script.provider.LanguageScriptProvider" );
Reference< container::XContentEnumerationAccess > xEnumAccess = Reference< container::XContentEnumerationAccess >( m_xMgr, UNO_QUERY_THROW );
Reference< container::XEnumeration > xEnum = xEnumAccess->createContentEnumeration ( languageProviderName );
@@ -166,8 +165,7 @@ ProviderCache::populateCache() throw ( RuntimeException )
if ( serviceNames.getLength() > 0 )
{
- ::rtl::OUString searchString( RTL_CONSTASCII_USTRINGPARAM (
- "com.sun.star.script.provider.ScriptProviderFor" ) );
+ ::rtl::OUString searchString( "com.sun.star.script.provider.ScriptProviderFor" );
for ( sal_Int32 index = 0; index < serviceNames.getLength(); index++ )
{
@@ -202,7 +200,7 @@ ProviderCache::createProvider( ProviderDetails& details ) throw ( RuntimeExcepti
}
catch ( const RuntimeException& e )
{
- ::rtl::OUString temp(RTL_CONSTASCII_USTRINGPARAM("ProviderCache::createProvider() Error creating provider from factory!!!\n"));
+ ::rtl::OUString temp("ProviderCache::createProvider() Error creating provider from factory!!!\n");
throw RuntimeException( temp.concat( e.Message ), Reference< XInterface >() );
}
diff --git a/scripting/source/provider/URIHelper.cxx b/scripting/source/provider/URIHelper.cxx
index c15d2f6..5fcfd5d 100644
--- a/scripting/source/provider/URIHelper.cxx
+++ b/scripting/source/provider/URIHelper.cxx
@@ -69,8 +69,8 @@ ScriptingFrameworkURIHelper::ScriptingFrameworkURIHelper(
{
m_xSimpleFileAccess = uno::Reference< ucb::XSimpleFileAccess >(
xContext->getServiceManager()->createInstanceWithContext(
- OUString(RTL_CONSTASCII_USTRINGPARAM(
- "com.sun.star.ucb.SimpleFileAccess")),
+ OUString(
+ "com.sun.star.ucb.SimpleFileAccess"),
xContext), uno::UNO_QUERY_THROW);
}
catch (uno::Exception&)
@@ -82,8 +82,8 @@ ScriptingFrameworkURIHelper::ScriptingFrameworkURIHelper(
{
m_xUriReferenceFactory = uno::Reference< uri::XUriReferenceFactory >(
xContext->getServiceManager()->createInstanceWithContext(
- OUString(RTL_CONSTASCII_USTRINGPARAM(
- "com.sun.star.uri.UriReferenceFactory")),
+ OUString(
+ "com.sun.star.uri.UriReferenceFactory"),
xContext ), uno::UNO_QUERY_THROW );
}
catch (uno::Exception&)
@@ -106,26 +106,26 @@ throw ( uno::Exception, uno::RuntimeException )
args[0].getValueType() != ::getCppuType((const OUString*)NULL) ||
args[1].getValueType() != ::getCppuType((const OUString*)NULL) )
{
- throw uno::RuntimeException( OUString(RTL_CONSTASCII_USTRINGPARAM(
- "ScriptingFrameworkURIHelper got invalid argument list" )),
+ throw uno::RuntimeException( OUString(
+ "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(RTL_CONSTASCII_USTRINGPARAM(
- "ScriptingFrameworkURIHelper error parsing args" )),
+ throw uno::RuntimeException( OUString(
+ "ScriptingFrameworkURIHelper error parsing args" ),
uno::Reference< uno::XInterface >() );
}
- SCRIPTS_PART = OUString(RTL_CONSTASCII_USTRINGPARAM("/Scripts/"));
+ SCRIPTS_PART = OUString("/Scripts/");
SCRIPTS_PART = SCRIPTS_PART.concat( m_sLanguage.toAsciiLowerCase() );
if ( !initBaseURI() )
{
- throw uno::RuntimeException( OUString(RTL_CONSTASCII_USTRINGPARAM(
- "ScriptingFrameworkURIHelper cannot find script directory")),
+ throw uno::RuntimeException( OUString(
+ "ScriptingFrameworkURIHelper cannot find script directory"),
uno::Reference< uno::XInterface >() );
}
}
@@ -138,31 +138,31 @@ ScriptingFrameworkURIHelper::initBaseURI()
if ( m_sLocation.equalsAscii(USER))
{
- test = OUString(RTL_CONSTASCII_USTRINGPARAM(USER));
- uri = OUString(RTL_CONSTASCII_USTRINGPARAM(USER_URI));
+ test = OUString(USER);
+ uri = OUString(USER_URI);
bAppendScriptsPart = true;
}
else if ( m_sLocation.equalsAscii(USER_UNO_PACKAGES))
{
- 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)));
+ test = OUString("uno_packages");
+ uri = OUString(USER_URI);
+ uri = uri.concat(OUString(USER_UNO_PACKAGES_DIR));
}
else if (m_sLocation.equalsAscii(SHARE))
{
- test = OUString(RTL_CONSTASCII_USTRINGPARAM(SHARE));
- uri = OUString(RTL_CONSTASCII_USTRINGPARAM(SHARE_URI));
+ test = OUString(SHARE);
+ uri = OUString(SHARE_URI);
bAppendScriptsPart = true;
}
else if (m_sLocation.equalsAscii(SHARE_UNO_PACKAGES))
{
- test = OUString(RTL_CONSTASCII_USTRINGPARAM("uno_packages"));
- uri = OUString(RTL_CONSTASCII_USTRINGPARAM(SHARE_UNO_PACKAGES_URI));
+ test = OUString("uno_packages");
+ uri = OUString(SHARE_UNO_PACKAGES_URI);
}
- else if (m_sLocation.indexOf(OUString(RTL_CONSTASCII_USTRINGPARAM(TDOC_SCHEME))) == 0)
+ else if (m_sLocation.indexOf(OUString(TDOC_SCHEME)) == 0)
{
m_sBaseURI = m_sLocation.concat( SCRIPTS_PART );
- m_sLocation = OUString(RTL_CONSTASCII_USTRINGPARAM( DOCUMENT ));
+ m_sLocation = OUString(DOCUMENT );
return true;
}
else
@@ -259,13 +259,13 @@ ScriptingFrameworkURIHelper::getStorageURI(const OUString& rScriptURI)
catch ( uno::Exception& )
{
throw lang::IllegalArgumentException(
- OUString(RTL_CONSTASCII_USTRINGPARAM("Script URI not valid")),
+ OUString("Script URI not valid"),
uno::Reference< uno::XInterface >(), 1 );
}
::rtl::OUStringBuffer buf(120);
buf.append(m_sBaseURI);
- buf.append(OUString(RTL_CONSTASCII_USTRINGPARAM("/")));
+ buf.append(OUString("/"));
buf.append(getLanguagePath(sLanguagePart));
OUString result = buf.makeStringAndClear();
@@ -284,16 +284,16 @@ OUString SAL_CALL
ScriptingFrameworkURIHelper::getImplementationName()
throw( uno::RuntimeException )
{
- return OUString(RTL_CONSTASCII_USTRINGPARAM(
- "com.sun.star.script.provider.ScriptURIHelper" ));
+ return OUString(
+ "com.sun.star.script.provider.ScriptURIHelper" );
}
sal_Bool SAL_CALL
ScriptingFrameworkURIHelper::supportsService( const OUString& serviceName )
throw( uno::RuntimeException )
{
- OUString m_sServiceName(RTL_CONSTASCII_USTRINGPARAM(
- "com.sun.star.script.provider.ScriptURIHelper" ));
+ OUString m_sServiceName(
+ "com.sun.star.script.provider.ScriptURIHelper" );
if ( serviceName.equals( m_sServiceName ) )
{
@@ -307,8 +307,8 @@ ScriptingFrameworkURIHelper::getSupportedServiceNames()
throw( uno::RuntimeException )
{
::rtl::OUString serviceNameList[] = {
- ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
- "com.sun.star.script.provider.ScriptURIHelper" )) };
+ ::rtl::OUString(
+ "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 6588c2f..c4b7e7c 100644
--- a/scripting/source/runtimemgr/ScriptNameResolverImpl.cxx
+++ b/scripting/source/runtimemgr/ScriptNameResolverImpl.cxx
@@ -52,10 +52,10 @@ namespace scripting_runtimemgr
{
const sal_Char* const LANGUAGE_TO_RESOLVE_ON[] = { "All" }; // should be configurable
-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" ));
+OUString nrs_implName(
+ "drafts.com.sun.star.script.framework.runtime.DefaultScriptNameResolver" );
+OUString nrs_serviceName(
+ "drafts.com.sun.star.script.framework.runtime.DefaultScriptNameResolver" );
Sequence< OUString > nrs_serviceNames = Sequence< OUString >( &nrs_serviceName, 1 );
const char* const SCRIPTSTORAGEMANAGER_SERVICE =
@@ -169,10 +169,10 @@ throw ( lang::IllegalArgumentException, script::CannotConvertException, RuntimeE
OSL_TRACE( "ScriptNameResolverImpl::resolve Starting..." );
- 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"));
+ OUString docString("location=document");
+ OUString userString("location=user");
+ OUString shareString("location=share");
+ OUString filesysString("location=filesystem");
// initialise vector with doc, user and share
@@ -219,8 +219,8 @@ throw ( lang::IllegalArgumentException, script::CannotConvertException, RuntimeE
}
Reference< XInterface > xInterface(
m_xMultiComFac->createInstanceWithContext(
- ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
- "com.sun.star.ucb.SimpleFileAccess" )),
+ ::rtl::OUString(
+ "com.sun.star.ucb.SimpleFileAccess" ),
m_xContext
),
UNO_SET_THROW
@@ -262,7 +262,7 @@ throw ( lang::IllegalArgumentException, script::CannotConvertException, RuntimeE
// b) an illegal location
// detect illegal location
- if ( scriptURI.indexOf( OUString(RTL_CONSTASCII_USTRINGPARAM("location=")) ) != -1 )
+ if ( scriptURI.indexOf( OUString("location=") ) != -1 )
{
OSL_TRACE(
"ScriptNameResolver::resolve, throwing IllegalArgException" );
@@ -416,7 +416,7 @@ SAL_THROW ( ( lang::IllegalArgumentException, css::security::AccessControlExcept
try
{
OUString permissionURI = docURI;
- OUString filesysString(RTL_CONSTASCII_USTRINGPARAM("location=filesystem"));
+ OUString filesysString("location=filesystem");
if ( scriptURI.indexOf( filesysString ) != -1 )
{
// in the case of filesys scripts we're checking whether the
@@ -511,7 +511,7 @@ const ::rtl::OUString & permissionURI ) SAL_THROW ( ( RuntimeException, css::sec
( sid != scriptingConstantsPool.SHARED_STORAGE_ID ) )
{
xScriptSecurity->checkPermission( permissionURI,
- OUString(RTL_CONSTASCII_USTRINGPARAM("execute")) );
+ OUString("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 );
@@ -550,7 +550,7 @@ throw( lang::IllegalArgumentException )
{
OUString filePath;
OUString fileName;
- OUString filesysString(RTL_CONSTASCII_USTRINGPARAM("location=filesystem"));
+ OUString filesysString("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
@@ -567,7 +567,7 @@ throw( lang::IllegalArgumentException )
endOfLocn - locationPos - filesysStrLen );
}
//file name shoul also be encoded so again ok to search for '&'
- OUString functionKey(RTL_CONSTASCII_USTRINGPARAM("function="));
+ OUString functionKey("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 6452911..aa8bcdf 100644
--- a/scripting/source/runtimemgr/ScriptRuntimeManager.cxx
+++ b/scripting/source/runtimemgr/ScriptRuntimeManager.cxx
@@ -54,10 +54,10 @@ using namespace ::drafts::com::sun::star::script::framework;
namespace scripting_runtimemgr
{
-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 OUString s_implName(
+ "drafts.com.sun.star.script.framework.runtime.ScriptRuntimeManager" );
+static OUString s_serviceName(
+ "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;
@@ -129,8 +129,8 @@ throw( RuntimeException )
{
Reference< XInterface > xInterface(
m_xMgr->createInstanceWithContext(
- OUString(RTL_CONSTASCII_USTRINGPARAM(
- "drafts.com.sun.star.script.framework.runtime.DefaultScriptNameResolver" )),
+ OUString(
+ "drafts.com.sun.star.script.framework.runtime.DefaultScriptNameResolver" ),
m_xContext
),
UNO_SET_THROW
@@ -211,8 +211,7 @@ Any SAL_CALL ScriptRuntimeManager::invoke(
aOutParamIndex, aOutParam );
// need to dispose of filesystem storage
- OUString filesysString(RTL_CONSTASCII_USTRINGPARAM(
- "location=filesystem" ));
+ OUString filesysString( "location=filesystem" );
if ( scriptURI.indexOf( filesysString ) != -1 )
{
Any a = m_xContext->getValueByName(
diff --git a/scripting/source/stringresource/stringresource.cxx b/scripting/source/stringresource/stringresource.cxx
index 6ecd09d..35b1fa9 100644
--- a/scripting/source/stringresource/stringresource.cxx
+++ b/scripting/source/stringresource/stringresource.cxx
@@ -86,13 +86,13 @@ namespace stringresource
static Sequence< ::rtl::OUString > getSupportedServiceNames_StringResourceImpl()
{
Sequence< ::rtl::OUString > names(1);
- names[0] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.resource.StringResource") );
+ names[0] = ::rtl::OUString( "com.sun.star.resource.StringResource" );
return names;
}
static ::rtl::OUString getImplementationName_StringResourceImpl()
{
- return ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.scripting.StringResource") );
+ return ::rtl::OUString( "com.sun.star.comp.scripting.StringResource" );
}
static Reference< XInterface > SAL_CALL create_StringResourceImpl(
@@ -206,7 +206,7 @@ void StringResourceImpl::removeModifyListener( const Reference< XModifyListener
}
if( !bSuccess )
{
- ::rtl::OUString errorMsg(RTL_CONSTASCII_USTRINGPARAM("StringResourceImpl: No entry for ResourceID: "));
+ ::rtl::OUString errorMsg("StringResourceImpl: No entry for ResourceID: ");
errorMsg.concat( ResourceID );
throw ::com::sun::star::resource::MissingResourceException( errorMsg, Reference< XInterface >() );
}
@@ -454,7 +454,7 @@ void StringResourceImpl::implRemoveId( const ::rtl::OUString& ResourceID, Locale
IdToStringMap::iterator it = rHashMap.find( ResourceID );
if( it == rHashMap.end() )
{
- ::rtl::OUString errorMsg(RTL_CONSTASCII_USTRINGPARAM("StringResourceImpl: No entries for ResourceID: "));
+ ::rtl::OUString errorMsg("StringResourceImpl: No entries for ResourceID: ");
errorMsg.concat( ResourceID );
throw ::com::sun::star::resource::MissingResourceException( errorMsg, Reference< XInterface >() );
}
@@ -489,7 +489,7 @@ void StringResourceImpl::newLocale( const Locale& locale )
if( getItemForLocale( locale, false ) != NULL )
{
- ::rtl::OUString errorMsg(RTL_CONSTASCII_USTRINGPARAM("StringResourceImpl: locale already exists"));
+ ::rtl::OUString errorMsg("StringResourceImpl: locale already exists");
throw ElementExistException( errorMsg, Reference< XInterface >() );
}
@@ -542,7 +542,7 @@ void StringResourceImpl::newLocale( const Locale& locale )
}
else
{
- ::rtl::OUString errorMsg(RTL_CONSTASCII_USTRINGPARAM("StringResourceImpl: Invalid locale"));
+ ::rtl::OUString errorMsg("StringResourceImpl: Invalid locale");
throw IllegalArgumentException( errorMsg, Reference< XInterface >(), 0 );
}
}
@@ -647,7 +647,7 @@ sal_Int32 StringResourceImpl::getUniqueNumericId( )
if( m_nNextUniqueNumericId < UNIQUE_NUMBER_NEEDS_INITIALISATION )
{
- ::rtl::OUString errorMsg(RTL_CONSTASCII_USTRINGPARAM("getUniqueNumericId: Extended sal_Int32 range"));
+ ::rtl::OUString errorMsg("getUniqueNumericId: Extended sal_Int32 range");
throw NoSupportException( errorMsg, Reference< XInterface >() );
}
return m_nNextUniqueNumericId;
@@ -682,7 +682,7 @@ LocaleItem* StringResourceImpl::getItemForLocale
if( pRetItem == NULL && bException )
{
- ::rtl::OUString errorMsg(RTL_CONSTASCII_USTRINGPARAM("StringResourceImpl: Invalid locale"));
+ ::rtl::OUString errorMsg("StringResourceImpl: Invalid locale");
throw IllegalArgumentException( errorMsg, Reference< XInterface >(), 0 );
}
return pRetItem;
@@ -773,7 +773,7 @@ Reference< XMultiComponentFactory > StringResourceImpl::getMultiComponentFactory
if( !xSMgr.is() )
{
throw RuntimeException(
- ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "StringResourceImpl::getMultiComponentFactory: Couldn't instantiate MultiComponentFactory" ) ),
+ ::rtl::OUString( "StringResourceImpl::getMultiComponentFactory: Couldn't instantiate MultiComponentFactory" ),
Reference< XInterface >() );
}
m_xMCF = xSMgr;
@@ -828,7 +828,7 @@ Sequence< ::rtl::OUString > StringResourcePersistenceImpl::getSupportedServiceNa
// XInitialization base functionality for derived classes
// -----------------------------------------------------------------------------
-static ::rtl::OUString aNameBaseDefaultStr(RTL_CONSTASCII_USTRINGPARAM("strings"));
+static ::rtl::OUString aNameBaseDefaultStr("strings");
void StringResourcePersistenceImpl::implInitializeCommonParameters
( const Sequence< Any >& aArguments )
@@ -837,7 +837,7 @@ void StringResourcePersistenceImpl::implInitializeCommonParameters
bool bReadOnlyOk = (aArguments[1] >>= m_bReadOnly);
if( !bReadOnlyOk )
{
- ::rtl::OUString errorMsg(RTL_CONSTASCII_USTRINGPARAM("XInitialization::initialize: Expected ReadOnly flag"));
+ ::rtl::OUString errorMsg("XInitialization::initialize: Expected ReadOnly flag");
throw IllegalArgumentException( errorMsg, Reference< XInterface >(), 1 );
}
@@ -845,14 +845,14 @@ void StringResourcePersistenceImpl::implInitializeCommonParameters
bool bLocaleOk = (aArguments[2] >>= aCurrentLocale);
if( !bLocaleOk )
{
- ::rtl::OUString errorMsg(RTL_CONSTASCII_USTRINGPARAM("XInitialization::initialize: Expected Locale"));
+ ::rtl::OUString errorMsg("XInitialization::initialize: Expected Locale");
throw IllegalArgumentException( errorMsg, Reference< XInterface >(), 2 );
}
bool bNameBaseOk = (aArguments[3] >>= m_aNameBase);
if( !bNameBaseOk )
{
- ::rtl::OUString errorMsg(RTL_CONSTASCII_USTRINGPARAM("XInitialization::initialize: Expected NameBase string"));
+ ::rtl::OUString errorMsg("XInitialization::initialize: Expected NameBase string");
throw IllegalArgumentException( errorMsg, Reference< XInterface >(), 3 );
}
if( m_aNameBase.isEmpty() )
@@ -861,7 +861,7 @@ void StringResourcePersistenceImpl::implInitializeCommonParameters
bool bCommentOk = (aArguments[4] >>= m_aComment);
if( !bCommentOk )
{
- ::rtl::OUString errorMsg(RTL_CONSTASCII_USTRINGPARAM("XInitialization::initialize: Expected Comment string"));
+ ::rtl::OUString errorMsg("XInitialization::initialize: Expected Comment string");
throw IllegalArgumentException( errorMsg, Reference< XInterface >(), 4 );
}
@@ -1041,7 +1041,7 @@ void StringResourcePersistenceImpl::implStoreAtStorage
if( pLocaleItem != NULL )
{
::rtl::OUString aStreamName = implGetFileNameForLocaleItem( pLocaleItem, m_aNameBase );
- aStreamName += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".properties"));
+ aStreamName += ::rtl::OUString(".properties");
try
{
@@ -1063,13 +1063,13 @@ void StringResourcePersistenceImpl::implStoreAtStorage
loadLocale( pLocaleItem ) )
{
::rtl::OUString aStreamName = implGetFileNameForLocaleItem( pLocaleItem, aNameBase );
- aStreamName += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".properties"));
+ aStreamName += ::rtl::OUString(".properties");
Reference< io::XStream > xElementStream =
Storage->openStreamElement( aStreamName, ElementModes::READWRITE );
- ::rtl::OUString aPropName(RTL_CONSTASCII_USTRINGPARAM("MediaType"));
- ::rtl::OUString aMime(RTL_CONSTASCII_USTRINGPARAM("text/plain"));
+ ::rtl::OUString aPropName("MediaType");
+ ::rtl::OUString aMime("text/plain");
uno::Reference< beans::XPropertySet > xProps( xElementStream, uno::UNO_QUERY );
OSL_ENSURE( xProps.is(), "The StorageStream must implement XPropertySet interface!\n" );
@@ -1077,7 +1077,7 @@ void StringResourcePersistenceImpl::implStoreAtStorage
{
xProps->setPropertyValue( aPropName, uno::makeAny( aMime ) );
- aPropName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("UseCommonStoragePasswordEncryption"));
+ aPropName = ::rtl::OUString("UseCommonStoragePasswordEncryption");
xProps->setPropertyValue( aPropName, uno::makeAny( sal_True ) );
}
@@ -1101,7 +1101,7 @@ void StringResourcePersistenceImpl::implStoreAtStorage
if( pLocaleItem != NULL )
{
::rtl::OUString aStreamName = implGetFileNameForLocaleItem( pLocaleItem, m_aNameBase );
- aStreamName += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".default"));
+ aStreamName += ::rtl::OUString(".default");
try
{
@@ -1120,13 +1120,13 @@ void StringResourcePersistenceImpl::implStoreAtStorage
if( m_pDefaultLocaleItem != NULL && (bStoreAll || m_bDefaultModified) )
{
::rtl::OUString aStreamName = implGetFileNameForLocaleItem( m_pDefaultLocaleItem, aNameBase );
- aStreamName += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".default"));
+ aStreamName += ::rtl::OUString(".default");
Reference< io::XStream > xElementStream =
Storage->openStreamElement( aStreamName, ElementModes::READWRITE );
- ::rtl::OUString aPropName(RTL_CONSTASCII_USTRINGPARAM("MediaType"));
- ::rtl::OUString aMime(RTL_CONSTASCII_USTRINGPARAM("text/plain"));
+ ::rtl::OUString aPropName("MediaType");
+ ::rtl::OUString aMime("text/plain");
// Only create stream without content
Reference< io::XOutputStream > xOutputStream = xElementStream->getOutputStream();
@@ -1150,7 +1150,7 @@ void StringResourcePersistenceImpl::storeToURL( const ::rtl::OUString& URL,
Reference< XMultiComponentFactory > xMCF = getMultiComponentFactory();
Reference< ucb::XSimpleFileAccess > xFileAccess;
xFileAccess = Reference< ucb::XSimpleFileAccess >( xMCF->createInstanceWithContext
- ( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.ucb.SimpleFileAccess")),
+ ( ::rtl::OUString("com.sun.star.ucb.SimpleFileAccess"),
m_xContext ), UNO_QUERY );
if( xFileAccess.is() && Handler.is() )
xFileAccess->setInteractionHandler( Handler );
@@ -1314,7 +1314,7 @@ BinaryOutput::BinaryOutput( Reference< XMultiComponentFactory > xMCF,
, m_xContext( xContext )
{
m_xTempFile = m_xMCF->createInstanceWithContext
- ( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.io.TempFile")), m_xContext );
+ ( ::rtl::OUString("com.sun.star.io.TempFile"), m_xContext );
if( m_xTempFile.is() )
m_xOutputStream = Reference< io::XOutputStream >( m_xTempFile, UNO_QUERY );
}
@@ -1542,7 +1542,7 @@ Reference< io::XInputStream > BinaryInput::getInputStreamForSection( sal_Int32 n
if( m_nCurPos + nSize <= m_nSize )
{
Reference< io::XOutputStream > xTempOut( m_xMCF->createInstanceWithContext
- ( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.io.TempFile")), m_xContext ), UNO_QUERY );
+ ( ::rtl::OUString("com.sun.star.io.TempFile"), m_xContext ), UNO_QUERY );
if( xTempOut.is() )
{
Sequence< sal_Int8 > aSection( m_pData + m_nCurPos, nSize );
@@ -1844,7 +1844,7 @@ bool StringResourcePersistenceImpl::implLoadLocale( LocaleItem* )
::rtl::OUString implGetNameScemeForLocaleItem( const LocaleItem* pLocaleItem )
{
- static ::rtl::OUString aUnder(RTL_CONSTASCII_USTRINGPARAM("_"));
+ static ::rtl::OUString aUnder("_");
OSL_ENSURE( pLocaleItem,
"StringResourcePersistenceImpl::implGetNameScemeForLocaleItem(): pLocaleItem == NULL" );
@@ -1888,9 +1888,9 @@ bool StringResourcePersistenceImpl::implLoadLocale( LocaleItem* )
INetURLObject aInetObj( aLocation );
aInetObj.insertName( aFileName, sal_True, INetURLObject::LAST_SEGMENT, sal_True, INetURLObject::ENCODE_ALL );
if( bDefaultFile )
- aInetObj.setExtension( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("default") ) );
+ aInetObj.setExtension( ::rtl::OUString( "default" ) );
else
- aInetObj.setExtension( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("properties") ) );
+ aInetObj.setExtension( ::rtl::OUString( "properties" ) );
::rtl::OUString aCompleteFileName = aInetObj.GetMainURL( INetURLObject::NO_DECODE );
return aCompleteFileName;
}
@@ -2015,7 +2015,7 @@ bool StringResourcePersistenceImpl::implReadPropertiesFile
bool bSuccess = false;
Reference< XMultiComponentFactory > xMCF = getMultiComponentFactory();
Reference< io::XTextInputStream > xTextInputStream( xMCF->createInstanceWithContext
- ( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.io.TextInputStream")), m_xContext ), UNO_QUERY );
+ ( ::rtl::OUString("com.sun.star.io.TextInputStream"), m_xContext ), UNO_QUERY );
if( xTextInputStream.is() )
{
@@ -2227,8 +2227,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_CONSTASCII_USTRINGPARAM("="));
- static ::rtl::OUString aLineFeedStr(RTL_CONSTASCII_USTRINGPARAM("\n"));
+ static ::rtl::OUString aAssignmentStr("=");
+ static ::rtl::OUString aLineFeedStr("\n");
if( !xOutputStream.is() || pLocaleItem == NULL )
return false;
@@ -2236,7 +2236,7 @@ bool StringResourcePersistenceImpl::implWritePropertiesFile( LocaleItem* pLocale
bool bSuccess = false;
Reference< XMultiComponentFactory > xMCF = getMultiComponentFactory();
Reference< io::XTextOutputStream > xTextOutputStream( xMCF->createInstanceWithContext
- ( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.io.TextOutputStream")), m_xContext ), UNO_QUERY );
+ ( ::rtl::OUString("com.sun.star.io.TextOutputStream"), m_xContext ), UNO_QUERY );
if( xTextOutputStream.is() )
{
@@ -2319,13 +2319,13 @@ bool StringResourcePersistenceImpl::implWritePropertiesFile( LocaleItem* pLocale
static Sequence< ::rtl::OUString > getSupportedServiceNames_StringResourceWithStorageImpl()
{
Sequence< ::rtl::OUString > names(1);
- names[0] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.resource.StringResourceWithStorage") );
+ names[0] = ::rtl::OUString( "com.sun.star.resource.StringResourceWithStorage" );
return names;
}
static ::rtl::OUString getImplementationName_StringResourceWithStorageImpl()
{
- return ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.scripting.StringResourceWithStorage") );
+ return ::rtl::OUString( "com.sun.star.comp.scripting.StringResourceWithStorage" );
}
static Reference< XInterface > SAL_CALL create_StringResourceWithStorageImpl(
@@ -2390,7 +2390,7 @@ void StringResourceWithStorageImpl::initialize( const Sequence< Any >& aArgument
if ( aArguments.getLength() != 5 )
{
throw RuntimeException(
- ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "StringResourceWithStorageImpl::initialize: invalid number of arguments!" ) ),
+ ::rtl::OUString( "StringResourceWithStorageImpl::initialize: invalid number of arguments!" ),
Reference< XInterface >() );
}
@@ -2400,7 +2400,7 @@ void StringResourceWithStorageImpl::initialize( const Sequence< Any >& aArgument
if( !bOk )
{
- ::rtl::OUString errorMsg(RTL_CONSTASCII_USTRINGPARAM("StringResourceWithStorageImpl::initialize: invalid storage"));
+ ::rtl::OUString errorMsg("StringResourceWithStorageImpl::initialize: invalid storage");
throw IllegalArgumentException( errorMsg, Reference< XInterface >(), 0 );
}
@@ -2627,7 +2627,7 @@ bool StringResourceWithStorageImpl::implLoadLocale( LocaleItem* pLocaleItem )
try
{
::rtl::OUString aStreamName = implGetFileNameForLocaleItem( pLocaleItem, m_aNameBase );
- aStreamName += ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(".properties") );
+ aStreamName += ::rtl::OUString( ".properties" );
Reference< io::XStream > xElementStream =
m_xStorage->openStreamElement( aStreamName, ElementModes::READ );
@@ -2657,13 +2657,13 @@ bool StringResourceWithStorageImpl::implLoadLocale( LocaleItem* pLocaleItem )
static Sequence< ::rtl::OUString > getSupportedServiceNames_StringResourceWithLocationImpl()
{
Sequence< ::rtl::OUString > names(1);
- names[0] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.resource.StringResourceWithLocation") );
+ names[0] = ::rtl::OUString( "com.sun.star.resource.StringResourceWithLocation" );
return names;
}
static ::rtl::OUString getImplementationName_StringResourceWithLocationImpl()
{
- return ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.scripting.StringResourceWithLocation") );
+ return ::rtl::OUString( "com.sun.star.comp.scripting.StringResourceWithLocation" );
}
static Reference< XInterface > SAL_CALL create_StringResourceWithLocationImpl(
@@ -2742,12 +2742,12 @@ void StringResourceWithLocationImpl::initialize( const Sequence< Any >& aArgumen
else
{
if( m_aLocation.getStr()[nLen - 1] != '/' )
- m_aLocation += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/"));
+ m_aLocation += ::rtl::OUString("/");
}
if( !bOk )
{
- ::rtl::OUString errorMsg(RTL_CONSTASCII_USTRINGPARAM("XInitialization::initialize: invalid URL"));
+ ::rtl::OUString errorMsg("XInitialization::initialize: invalid URL");
throw IllegalArgumentException( errorMsg, Reference< XInterface >(), 0 );
}
@@ -2755,7 +2755,7 @@ void StringResourceWithLocationImpl::initialize( const Sequence< Any >& aArgumen
bOk = (aArguments[5] >>= m_xInteractionHandler);
if( !bOk )
{
- ::rtl::OUString errorMsg(RTL_CONSTASCII_USTRINGPARAM("StringResourceWithStorageImpl::initialize: invalid type"));
+ ::rtl::OUString errorMsg("StringResourceWithStorageImpl::initialize: invalid type");
throw IllegalArgumentException( errorMsg, Reference< XInterface >(), 5 );
}
@@ -3021,7 +3021,7 @@ const Reference< ucb::XSimpleFileAccess > StringResourceWithLocationImpl::getFil
{
Reference< XMultiComponentFactory > xMCF = getMultiComponentFactory();
m_xSFI = Reference< ucb::XSimpleFileAccess >( xMCF->createInstanceWithContext
- ( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.ucb.SimpleFileAccess")), m_xContext ), UNO_QUERY );
+ ( ::rtl::OUString("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 66a8bb8..7c380aa 100644
--- a/scripting/source/vbaevents/eventhelper.cxx
+++ b/scripting/source/vbaevents/eventhelper.cxx
@@ -108,11 +108,11 @@ using namespace ::com::sun::star::script;
using namespace ::com::sun::star::uno;
using namespace ::ooo::vba;
-#define MAP_CHAR_LEN(x) ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(x))
+#define MAP_CHAR_LEN(x) ::rtl::OUString(x)
#define GET_TYPE(x) ::getCppuType((uno::Reference< x > *)0);
// Some constants
-const static rtl::OUString DELIM(RTL_CONSTASCII_USTRINGPARAM("::"));
+const static rtl::OUString DELIM("::");
const static sal_Int32 DELIMLEN = DELIM.getLength();
bool isKeyEventOk( awt::KeyEvent& evt, const Sequence< Any >& params )
@@ -409,8 +409,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(RTL_CONSTASCII_USTRINGPARAM(
- "VBAInterop" ));
+ evtDesc.ScriptType = rtl::OUString(
+ "VBAInterop" );
return true;
}
return false;
@@ -422,7 +422,7 @@ ScriptEventHelper::ScriptEventHelper( const Reference< XInterface >& xControl )
Reference < beans::XPropertySet > xProps(
::comphelper::getProcessServiceFactory(), UNO_QUERY_THROW );
m_xCtx.set( xProps->getPropertyValue( rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM( "DefaultContext" ))),
+ "DefaultContext" )),
uno::UNO_QUERY_THROW );
}
@@ -437,7 +437,7 @@ ScriptEventHelper::getEventListeners()
{
Reference< beans::XIntrospection > xIntrospection(
xMFac->createInstanceWithContext( rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.beans.Introspection" ) ), m_xCtx ), UNO_QUERY );
+ "com.sun.star.beans.Introspection" ), m_xCtx ), UNO_QUERY );
Reference< beans::XIntrospectionAccess > xIntrospectionAccess;
if ( xIntrospection.is() )
@@ -517,18 +517,18 @@ public:
virtual void SAL_CALL insertByName( const ::rtl::OUString&, const Any& ) throw (lang::IllegalArgumentException, container::ElementExistException, lang::WrappedTargetException, RuntimeException)
{
- throw RuntimeException( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ReadOnly container")), Reference< XInterface >() );
+ throw RuntimeException( rtl::OUString("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(RTL_CONSTASCII_USTRINGPARAM("ReadOnly container")), Reference< XInterface >() );
+ throw RuntimeException( rtl::OUString("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(RTL_CONSTASCII_USTRINGPARAM("ReadOnly container")), Reference< XInterface >() );
+ throw RuntimeException( rtl::OUString("ReadOnly container"), Reference< XInterface >() );
}
@@ -612,7 +612,7 @@ private:
typedef ::cppu::WeakImplHelper3< XScriptListener, util::XCloseListener, lang::XInitialization > EventListener_BASE;
#define EVENTLSTNR_PROPERTY_ID_MODEL 1
-#define EVENTLSTNR_PROPERTY_MODEL ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Model" ) )
+#define EVENTLSTNR_PROPERTY_MODEL ::rtl::OUString( "Model" )
class EventListener : public EventListener_BASE
,public ::comphelper::OMutexAndBroadcastHelper
@@ -694,7 +694,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(RTL_CONSTASCII_USTRINGPARAM("Standard"));
+ msProject = rtl::OUString("Standard");
}
void
@@ -716,7 +716,7 @@ EventListener::setShellFromModel()
try
{
uno::Reference< beans::XPropertySet > xProps( m_xModel, UNO_QUERY_THROW );
- uno::Reference< script::vba::XVBACompatibility > xVBAMode( xProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("BasicLibraries") ) ), uno::UNO_QUERY_THROW );
+ uno::Reference< script::vba::XVBACompatibility > xVBAMode( xProps->getPropertyValue( rtl::OUString( "BasicLibraries" ) ), uno::UNO_QUERY_THROW );
msProject = xVBAMode->getProjectName();
}
catch ( uno::Exception& ) {}
@@ -919,7 +919,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(RTL_CONSTASCII_USTRINGPARAM("VBAInterop"));
+ ::rtl::OUString("VBAInterop");
// let default handlers deal with non vba stuff
if ( !evt.ScriptType.equals( vbaInterOp ) )
@@ -929,7 +929,7 @@ EventListener::firing_Impl(const ScriptEvent& evt, Any* pRet ) throw(RuntimeExce
OSL_TRACE("evt.MethodName is %s", rtl::OUStringToOString( evt.MethodName, RTL_TEXTENCODING_UTF8 ).getStr() );
OSL_TRACE("Argument[0] is %s", rtl::OUStringToOString( comphelper::anyToString( evt.Arguments[0] ), RTL_TEXTENCODING_UTF8 ).getStr() );
OSL_TRACE("Getting Control");
- rtl::OUString sName = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("UserForm") );
+ rtl::OUString sName = rtl::OUString( "UserForm" );
OSL_TRACE("Getting Name");
uno::Reference< awt::XDialog > xDlg( aEvent.Source, uno::UNO_QUERY );
@@ -961,7 +961,7 @@ EventListener::firing_Impl(const ScriptEvent& evt, Any* pRet ) throw(RuntimeExce
uno::Reference< beans::XPropertySet > xProps;
OSL_TRACE("Getting properties");
xProps.set( xControl->getModel(), uno::UNO_QUERY_THROW );
- xProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Name") ) ) >>= sName;
+ xProps->getPropertyValue( rtl::OUString( "Name" ) ) >>= sName;
}
}
//dumpEvent( evt );
@@ -993,8 +993,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_CONSTASCII_USTRINGPARAM("Project"));
- sProject = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Standard"));
+ //rtl::OUString sMacroLoc("Project");
+ sProject = rtl::OUString("Standard");
if ( pBasicManager->GetName().Len() > 0 )
sProject = pBasicManager->GetName();
@@ -1006,8 +1006,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(RTL_CONSTASCII_USTRINGPARAM(".")) );
- sMacroLoc = sMacroLoc.concat( sScriptCode ).concat( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".")) );
+ sMacroLoc = sMacroLoc.concat( rtl::OUString(".") );
+ sMacroLoc = sMacroLoc.concat( sScriptCode ).concat( rtl::OUString(".") );
OSL_TRACE("sMacroLoc is %s", rtl::OUStringToOString( sMacroLoc, RTL_TEXTENCODING_UTF8 ).getStr() );
for ( ; txInfo != txInfo_end; ++txInfo )
@@ -1052,7 +1052,7 @@ EventListener::firing_Impl(const ScriptEvent& evt, Any* pRet ) throw(RuntimeExce
RTL_TEXTENCODING_UTF8 ).getStr() );
try
{
- uno::Any aDummyCaller = uno::makeAny( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Error")) );
+ uno::Any aDummyCaller = uno::makeAny( rtl::OUString("Error") );
if ( pRet )
ooo::vba::executeMacro( mpShell, url, aArguments, *pRet, aDummyCaller );
else
@@ -1118,7 +1118,7 @@ namespace evtlstner
::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
if ( !pImplName )
{
- static ::rtl::OUString aImplName( RTL_CONSTASCII_USTRINGPARAM( "ooo.vba.EventListener" ) );
+ static ::rtl::OUString aImplName( "ooo.vba.EventListener" );
pImplName = &aImplName;
}
}
@@ -1148,7 +1148,7 @@ namespace ooevtdescgen
::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
if ( !pImplName )
{
- static ::rtl::OUString aImplName( RTL_CONSTASCII_USTRINGPARAM( "ooo.vba.VBAToOOEventDesc" ) );
+ static ::rtl::OUString aImplName( "ooo.vba.VBAToOOEventDesc" );
pImplName = &aImplName;
}
}
diff --git a/scripting/source/vbaevents/vbamsformreturntypes.hxx b/scripting/source/vbaevents/vbamsformreturntypes.hxx
index 84deaed..e6cab6a 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(RTL_CONSTASCII_USTRINGPARAM("Value")); }
+ ::rtl::OUString SAL_CALL getDefaultPropertyName() throw (com::sun::star::uno::RuntimeException) { return ::rtl::OUString("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(RTL_CONSTASCII_USTRINGPARAM("Value")); }
+ ::rtl::OUString SAL_CALL getDefaultPropertyName() throw (com::sun::star::uno::RuntimeException) { return ::rtl::OUString("Value"); }
};
#endif
commit d9085f3b5f970b6c8efbf1192dd05caa02f4ba1f
Author: Norbert Thiebaud <nthiebaud at gmail.com>
Date: Sat Jun 2 19:49:52 2012 -0500
targeted string re-work
Change-Id: I33d07b10cd862d601604a557382a4ab66f67a1fd
diff --git a/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx b/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx
index 007c079..498cdfc 100644
--- a/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx
+++ b/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx
@@ -435,8 +435,8 @@ void GetFontWorkOutline( FWData& rFWData, const SdrObject* pCustomShape )
sal_Bool bSameLetterHeights = sal_False;
SdrCustomShapeGeometryItem& rGeometryItem = (SdrCustomShapeGeometryItem&)pCustomShape->GetMergedItem( SDRATTR_CUSTOMSHAPE_GEOMETRY );
- const rtl::OUString sTextPath( RTL_CONSTASCII_USTRINGPARAM ( "TextPath" ) );
- const rtl::OUString sSameLetterHeights( RTL_CONSTASCII_USTRINGPARAM ( "SameLetterHeights" ) );
+ const rtl::OUString sTextPath( "TextPath" );
+ const rtl::OUString sSameLetterHeights( "SameLetterHeights" );
com::sun::star::uno::Any* pAny = rGeometryItem.GetPropertyValueByName( sTextPath, sSameLetterHeights );
if ( pAny )
*pAny >>= bSameLetterHeights;
@@ -839,7 +839,7 @@ Reference < i18n::XBreakIterator > EnhancedCustomShapeFontWork::GetBreakIterator
if ( !mxBreakIterator.is() )
{
... etc. - the rest is truncated
More information about the Libreoffice-commits
mailing list