summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKevin Hunter <hunteke@earlham.edu>2010-11-19 15:13:10 -0500
committerDavid Tardon <dtardon@redhat.com>2010-11-20 07:45:53 +0100
commit6fb8e13b45e018202fd62142bde7fc022e906ed7 (patch)
tree5e15dd03ab77e3f607164e864c5b74e73ccc955b
parentda041554995bb7e98e9564b3cf3252c4a50d4673 (diff)
EasyHack: RTL conversion from createFromAscii
-rw-r--r--comphelper/source/compare/AnyCompareFactory.cxx4
-rw-r--r--comphelper/source/eventattachermgr/eventattachermgr.cxx8
-rw-r--r--comphelper/source/misc/mediadescriptor.cxx12
-rw-r--r--comphelper/source/misc/mimeconfighelper.cxx72
-rw-r--r--comphelper/source/misc/numbers.cxx4
-rw-r--r--comphelper/source/misc/officerestartmanager.cxx2
-rw-r--r--comphelper/source/misc/regpathhelper.cxx2
-rw-r--r--comphelper/source/misc/sequenceashashmap.cxx8
-rw-r--r--comphelper/source/misc/storagehelper.cxx8
-rw-r--r--comphelper/source/misc/string.cxx2
-rw-r--r--comphelper/source/property/propertystatecontainer.cxx8
-rw-r--r--comphelper/test/uno_iterators/uno_iterators.cxx6
12 files changed, 68 insertions, 68 deletions
diff --git a/comphelper/source/compare/AnyCompareFactory.cxx b/comphelper/source/compare/AnyCompareFactory.cxx
index 04152c8156cf..787c68d97a18 100644
--- a/comphelper/source/compare/AnyCompareFactory.cxx
+++ b/comphelper/source/compare/AnyCompareFactory.cxx
@@ -65,7 +65,7 @@ public:
if ( xFactory.is() )
{
m_rCollator = Reference< XCollator >(
- xFactory->createInstanceWithContext( OUString::createFromAscii( "com.sun.star.i18n.Collator" ), xContext ),
+ xFactory->createInstanceWithContext( OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.i18n.Collator" )), xContext ),
UNO_QUERY );
m_rCollator->loadDefaultCollator( rLocale,
0 ); //???
@@ -133,7 +133,7 @@ Reference< XAnyCompare > SAL_CALL AnyCompareFactory::createAnyCompareByName( con
// for now only OUString properties compare is implemented
// so no check for the property name is done
- if( aPropertyName.equals( OUString::createFromAscii( "Title" ) ) )
+ if( aPropertyName.equals( OUString( RTL_CONSTASCII_USTRINGPARAM( "Title" )) ) )
return m_rAnyCompare;
return Reference< XAnyCompare >();
diff --git a/comphelper/source/eventattachermgr/eventattachermgr.cxx b/comphelper/source/eventattachermgr/eventattachermgr.cxx
index 0e37c7a02e5e..744a6436bda6 100644
--- a/comphelper/source/eventattachermgr/eventattachermgr.cxx
+++ b/comphelper/source/eventattachermgr/eventattachermgr.cxx
@@ -381,7 +381,7 @@ Reference< XEventAttacherManager > createEventAttacherManager( const Reference<
{
if ( rSMgr.is() )
{
- Reference< XInterface > xIFace( rSMgr->createInstance( OUString::createFromAscii("com.sun.star.beans.Introspection") ) );
+ Reference< XInterface > xIFace( rSMgr->createInstance( OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.beans.Introspection" )) ) );
if ( xIFace.is() )
{
Reference< XIntrospection > xIntrospection( xIFace, UNO_QUERY);
@@ -401,12 +401,12 @@ ImplEventAttacherManager::ImplEventAttacherManager( const Reference< XIntrospect
{
if ( rSMgr.is() )
{
- Reference< XInterface > xIFace( rSMgr->createInstance( OUString::createFromAscii("com.sun.star.script.EventAttacher") ) );
+ Reference< XInterface > xIFace( rSMgr->createInstance( OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.script.EventAttacher" )) ) );
if ( xIFace.is() )
{
xAttacher = Reference< XEventAttacher >::query( xIFace );
}
- xIFace = rSMgr->createInstance( OUString::createFromAscii("com.sun.star.script.Converter") );
+ xIFace = rSMgr->createInstance( OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.script.Converter" )) );
if ( xIFace.is() )
{
xConverter = Reference< XTypeConverter >::query( xIFace );
@@ -433,7 +433,7 @@ Reference< XIdlReflection > ImplEventAttacherManager::getReflection() throw( Exc
// Haben wir den Service schon? Sonst anlegen
if( !mxCoreReflection.is() )
{
- Reference< XInterface > xIFace( mxSMgr->createInstance( OUString::createFromAscii("com.sun.star.reflection.CoreReflection") ) );
+ Reference< XInterface > xIFace( mxSMgr->createInstance( OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.reflection.CoreReflection" )) ) );
mxCoreReflection = Reference< XIdlReflection >( xIFace, UNO_QUERY);
}
return mxCoreReflection;
diff --git a/comphelper/source/misc/mediadescriptor.cxx b/comphelper/source/misc/mediadescriptor.cxx
index 83f54ff027ea..a9be31ae2d1b 100644
--- a/comphelper/source/misc/mediadescriptor.cxx
+++ b/comphelper/source/misc/mediadescriptor.cxx
@@ -419,8 +419,8 @@ MediaDescriptor::MediaDescriptor(const css::uno::Sequence< css::beans::NamedValu
-----------------------------------------------*/
sal_Bool MediaDescriptor::isStreamReadOnly() const
{
- static ::rtl::OUString CONTENTSCHEME_FILE = ::rtl::OUString::createFromAscii("file");
- static ::rtl::OUString CONTENTPROP_ISREADONLY = ::rtl::OUString::createFromAscii("IsReadOnly");
+ static ::rtl::OUString CONTENTSCHEME_FILE( RTL_CONSTASCII_USTRINGPARAM( "file" ));
+ static ::rtl::OUString CONTENTPROP_ISREADONLY( RTL_CONSTASCII_USTRINGPARAM( "IsReadOnly" ));
static sal_Bool READONLY_FALLBACK = sal_False;
sal_Bool bReadOnly = READONLY_FALLBACK;
@@ -591,7 +591,7 @@ sal_Bool MediaDescriptor::impl_addInputStream( sal_Bool bLockFile )
::rtl::OUString sURL = getUnpackedValueOrDefault(MediaDescriptor::PROP_URL(), ::rtl::OUString());
if (!sURL.getLength())
throw css::uno::Exception(
- ::rtl::OUString::createFromAscii("Found no URL."),
+ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Found no URL." )),
css::uno::Reference< css::uno::XInterface >());
// Parse URL! Only the main part has to be used further. E.g. a jumpmark can make trouble
@@ -622,7 +622,7 @@ sal_Bool MediaDescriptor::impl_openStreamWithPostData( const css::uno::Reference
{
if ( !_rxPostData.is() )
throw css::lang::IllegalArgumentException(
- ::rtl::OUString::createFromAscii("Found invalid PostData."),
+ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Found invalid PostData." )),
css::uno::Reference< css::uno::XInterface >(), 1);
// PostData can't be used in read/write mode!
@@ -640,7 +640,7 @@ sal_Bool MediaDescriptor::impl_openStreamWithPostData( const css::uno::Reference
::rtl::OUString sMediaType = getUnpackedValueOrDefault(MediaDescriptor::PROP_MEDIATYPE(), ::rtl::OUString());
if (!sMediaType.getLength())
{
- sMediaType = ::rtl::OUString::createFromAscii("application/x-www-form-urlencoded");
+ sMediaType = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "application/x-www-form-urlencoded" ));
(*this)[MediaDescriptor::PROP_MEDIATYPE()] <<= sMediaType;
}
@@ -842,7 +842,7 @@ sal_Bool MediaDescriptor::impl_openStreamWithURL( const ::rtl::OUString& sURL, s
it parses the URL in another way. It's main part isnt enough
and it's complete part contains the jumpmark (fragment) parameter ...
*/
- static ::rtl::OUString SERVICENAME_URIREFERENCEFACTORY = ::rtl::OUString::createFromAscii("com.sun.star.uri.UriReferenceFactory");
+ static ::rtl::OUString SERVICENAME_URIREFERENCEFACTORY( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.uri.UriReferenceFactory" ));
try
{
diff --git a/comphelper/source/misc/mimeconfighelper.cxx b/comphelper/source/misc/mimeconfighelper.cxx
index a61e8a36a27c..fc3093f24525 100644
--- a/comphelper/source/misc/mimeconfighelper.cxx
+++ b/comphelper/source/misc/mimeconfighelper.cxx
@@ -59,7 +59,7 @@ MimeConfigurationHelper::MimeConfigurationHelper( const uno::Reference< lang::XM
for ( sal_Int32 nInd = 0; nInd < aClassID.getLength(); nInd++ )
{
if ( nInd == 4 || nInd == 6 || nInd == 8 || nInd == 10 )
- aResult += ::rtl::OUString::createFromAscii( "-" );
+ aResult += ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "-" ));
sal_Int32 nDigit1 = (sal_Int32)( (sal_uInt8)aClassID[nInd] / 16 );
sal_Int32 nDigit2 = (sal_uInt8)aClassID[nInd] % 16;
@@ -132,18 +132,18 @@ uno::Reference< container::XNameAccess > MimeConfigurationHelper::GetConfigurati
if ( !m_xConfigProvider.is() )
m_xConfigProvider = uno::Reference< lang::XMultiServiceFactory >(
m_xFactory->createInstance(
- ::rtl::OUString::createFromAscii( "com.sun.star.configuration.ConfigurationProvider" ) ),
+ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.configuration.ConfigurationProvider" )) ),
uno::UNO_QUERY_THROW );
uno::Sequence< uno::Any > aArgs( 1 );
beans::PropertyValue aPathProp;
- aPathProp.Name = ::rtl::OUString::createFromAscii( "nodepath" );
+ aPathProp.Name = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "nodepath" ));
aPathProp.Value <<= aPath;
aArgs[0] <<= aPathProp;
xConfig = uno::Reference< container::XNameAccess >(
m_xConfigProvider->createInstanceWithArguments(
- ::rtl::OUString::createFromAscii( "com.sun.star.configuration.ConfigurationAccess" ),
+ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.configuration.ConfigurationAccess" )),
aArgs ),
uno::UNO_QUERY );
}
@@ -160,7 +160,7 @@ uno::Reference< container::XNameAccess > MimeConfigurationHelper::GetObjConfigur
if ( !m_xObjectConfig.is() )
m_xObjectConfig = GetConfigurationByPath(
- ::rtl::OUString::createFromAscii( "/org.openoffice.Office.Embedding/Objects" ) );
+ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "/org.openoffice.Office.Embedding/Objects" )) );
return m_xObjectConfig;
}
@@ -172,7 +172,7 @@ uno::Reference< container::XNameAccess > MimeConfigurationHelper::GetVerbsConfig
if ( !m_xVerbsConfig.is() )
m_xVerbsConfig = GetConfigurationByPath(
- ::rtl::OUString::createFromAscii( "/org.openoffice.Office.Embedding/Verbs" ) );
+ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "/org.openoffice.Office.Embedding/Verbs" )) );
return m_xVerbsConfig;
}
@@ -184,7 +184,7 @@ uno::Reference< container::XNameAccess > MimeConfigurationHelper::GetMediaTypeCo
if ( !m_xMediaTypeConfig.is() )
m_xMediaTypeConfig = GetConfigurationByPath(
- ::rtl::OUString::createFromAscii( "/org.openoffice.Office.Embedding/MimeTypeClassIDRelations" ) );
+ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "/org.openoffice.Office.Embedding/MimeTypeClassIDRelations" )) );
return m_xMediaTypeConfig;
}
@@ -196,7 +196,7 @@ uno::Reference< container::XNameAccess > MimeConfigurationHelper::GetMediaTypeCo
try
{
uno::Reference< container::XNameAccess > xFilterFactory(
- m_xFactory->createInstance( ::rtl::OUString::createFromAscii( "com.sun.star.document.FilterFactory" ) ),
+ m_xFactory->createInstance( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.document.FilterFactory" )) ),
uno::UNO_QUERY_THROW );
uno::Any aFilterAnyData = xFilterFactory->getByName( aFilterName );
@@ -219,7 +219,7 @@ uno::Reference< container::XNameAccess > MimeConfigurationHelper::GetMediaTypeCo
{
uno::Reference< container::XContainerQuery > xTypeCFG(
m_xFactory->createInstance(
- ::rtl::OUString::createFromAscii( "com.sun.star.document.TypeDetection" ) ),
+ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.document.TypeDetection" )) ),
uno::UNO_QUERY );
if ( xTypeCFG.is() )
@@ -228,7 +228,7 @@ uno::Reference< container::XNameAccess > MimeConfigurationHelper::GetMediaTypeCo
{
// make query for all types matching the properties
uno::Sequence < beans::NamedValue > aSeq( 1 );
- aSeq[0].Name = ::rtl::OUString::createFromAscii( "MediaType" );
+ aSeq[0].Name = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "MediaType" ));
aSeq[0].Value <<= aMediaType;
uno::Reference < container::XEnumeration > xEnum = xTypeCFG->createSubSetEnumerationByProperties( aSeq );
@@ -271,10 +271,10 @@ sal_Bool MimeConfigurationHelper::GetVerbByShortcut( const ::rtl::OUString& aVer
if ( xVerbsConfig.is() && ( xVerbsConfig->getByName( aVerbShortcut ) >>= xVerbsProps ) && xVerbsProps.is() )
{
embed::VerbDescriptor aTempDescr;
- if ( ( xVerbsProps->getByName( ::rtl::OUString::createFromAscii( "VerbID" ) ) >>= aTempDescr.VerbID )
- && ( xVerbsProps->getByName( ::rtl::OUString::createFromAscii( "VerbUIName" ) ) >>= aTempDescr.VerbName )
- && ( xVerbsProps->getByName( ::rtl::OUString::createFromAscii( "VerbFlags" ) ) >>= aTempDescr.VerbFlags )
- && ( xVerbsProps->getByName( ::rtl::OUString::createFromAscii( "VerbAttributes" ) ) >>= aTempDescr.VerbAttributes ) )
+ if ( ( xVerbsProps->getByName( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "VerbID" )) ) >>= aTempDescr.VerbID )
+ && ( xVerbsProps->getByName( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "VerbUIName" )) ) >>= aTempDescr.VerbName )
+ && ( xVerbsProps->getByName( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "VerbFlags" )) ) >>= aTempDescr.VerbFlags )
+ && ( xVerbsProps->getByName( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "VerbAttributes" )) ) >>= aTempDescr.VerbAttributes ) )
{
aDescriptor = aTempDescr;
bResult = sal_True;
@@ -302,7 +302,7 @@ uno::Sequence< beans::NamedValue > MimeConfigurationHelper::GetObjPropsFromConfi
uno::Sequence< ::rtl::OUString > aObjPropNames = xObjectProps->getElementNames();
aResult.realloc( aObjPropNames.getLength() + 1 );
- aResult[0].Name = ::rtl::OUString::createFromAscii( "ClassID" );
+ aResult[0].Name = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ClassID" ));
aResult[0].Value <<= aClassID;
for ( sal_Int32 nInd = 0; nInd < aObjPropNames.getLength(); nInd++ )
@@ -366,9 +366,9 @@ uno::Sequence< beans::NamedValue > MimeConfigurationHelper::GetObjectPropsByStri
if ( ClassIDsEqual( aClassID, GetSequenceClassID( SO3_DUMMY_CLASSID ) ) )
{
aObjProps.realloc(2);
- aObjProps[0].Name = ::rtl::OUString::createFromAscii("ObjectFactory");
- aObjProps[0].Value <<= ::rtl::OUString::createFromAscii("com.sun.star.embed.OOoSpecialEmbeddedObjectFactory");
- aObjProps[1].Name = ::rtl::OUString::createFromAscii("ClassID");
+ aObjProps[0].Name = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ObjectFactory" ));
+ aObjProps[0].Value <<= ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.embed.OOoSpecialEmbeddedObjectFactory" ));
+ aObjProps[1].Name = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ClassID" ));
aObjProps[1].Value <<= aClassID;
return aObjProps;
}
@@ -399,9 +399,9 @@ uno::Sequence< beans::NamedValue > MimeConfigurationHelper::GetObjectPropsByClas
if ( ClassIDsEqual( aClassID, GetSequenceClassID( SO3_DUMMY_CLASSID ) ) )
{
aObjProps.realloc(2);
- aObjProps[0].Name = ::rtl::OUString::createFromAscii("ObjectFactory");
- aObjProps[0].Value <<= ::rtl::OUString::createFromAscii("com.sun.star.embed.OOoSpecialEmbeddedObjectFactory");
- aObjProps[1].Name = ::rtl::OUString::createFromAscii("ClassID");
+ aObjProps[0].Name = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ObjectFactory" ));
+ aObjProps[0].Value <<= ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.embed.OOoSpecialEmbeddedObjectFactory" ));
+ aObjProps[1].Name = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ClassID" ));
aObjProps[1].Value <<= aClassID;
}
@@ -466,7 +466,7 @@ uno::Sequence< beans::NamedValue > MimeConfigurationHelper::GetObjectPropsByDocu
if ( ( xObjConfig->getByName( aClassIDs[nInd] ) >>= xObjectProps ) && xObjectProps.is()
&& ( xObjectProps->getByName(
- ::rtl::OUString::createFromAscii( "ObjectDocumentServiceName" ) ) >>= aEntryDocName )
+ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ObjectDocumentServiceName" )) ) >>= aEntryDocName )
&& aEntryDocName.equals( aDocName ) )
{
return GetObjPropsFromConfigEntry( GetSequenceClassIDRepresentation( aClassIDs[nInd] ),
@@ -500,13 +500,13 @@ uno::Sequence< beans::NamedValue > MimeConfigurationHelper::GetObjectPropsByDocu
try
{
if ( xObjConfig.is() && ( xObjConfig->getByName( aStringClassID.toAsciiUpperCase() ) >>= xObjectProps ) && xObjectProps.is() )
- xObjectProps->getByName( ::rtl::OUString::createFromAscii( "ObjectFactory" ) ) >>= aResult;
+ xObjectProps->getByName( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ObjectFactory" )) ) >>= aResult;
}
catch( uno::Exception& )
{
uno::Sequence< sal_Int8 > aClassID = GetSequenceClassIDRepresentation( aStringClassID );
if ( ClassIDsEqual( aClassID, GetSequenceClassID( SO3_DUMMY_CLASSID ) ) )
- return ::rtl::OUString::createFromAscii("com.sun.star.embed.OOoSpecialEmbeddedObjectFactory");
+ return ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.embed.OOoSpecialEmbeddedObjectFactory" ));
}
}
@@ -533,10 +533,10 @@ uno::Sequence< beans::NamedValue > MimeConfigurationHelper::GetObjectPropsByDocu
if ( ( xObjConfig->getByName( aClassIDs[nInd] ) >>= xObjectProps ) && xObjectProps.is()
&& ( xObjectProps->getByName(
- ::rtl::OUString::createFromAscii( "ObjectDocumentServiceName" ) ) >>= aEntryDocName )
+ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ObjectDocumentServiceName" )) ) >>= aEntryDocName )
&& aEntryDocName.equals( aDocName ) )
{
- xObjectProps->getByName( ::rtl::OUString::createFromAscii( "ObjectFactory" ) ) >>= aResult;
+ xObjectProps->getByName( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ObjectFactory" )) ) >>= aResult;
break;
}
}
@@ -581,7 +581,7 @@ uno::Sequence< beans::NamedValue > MimeConfigurationHelper::GetObjectPropsByDocu
// filter name is not specified, so type detection should be done
uno::Reference< document::XTypeDetection > xTypeDetection(
- m_xFactory->createInstance( ::rtl::OUString::createFromAscii( "com.sun.star.document.TypeDetection" ) ),
+ m_xFactory->createInstance( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.document.TypeDetection" )) ),
uno::UNO_QUERY );
if ( !xTypeDetection.is() )
@@ -602,7 +602,7 @@ uno::Sequence< beans::NamedValue > MimeConfigurationHelper::GetObjectPropsByDocu
{
sal_Int32 nOldLen = aMediaDescr.getLength();
aMediaDescr.realloc( nOldLen + 1 );
- aMediaDescr[nOldLen].Name = ::rtl::OUString::createFromAscii( "FilterName" );
+ aMediaDescr[nOldLen].Name = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "FilterName" ));
aMediaDescr[ nOldLen ].Value <<= aFilterName;
}
@@ -619,7 +619,7 @@ uno::Sequence< beans::NamedValue > MimeConfigurationHelper::GetObjectPropsByDocu
{
sal_Int32 nOldLen = aMediaDescr.getLength();
aMediaDescr.realloc( nOldLen + 1 );
- aMediaDescr[nOldLen].Name = ::rtl::OUString::createFromAscii( "FilterName" );
+ aMediaDescr[nOldLen].Name = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "FilterName" ));
aMediaDescr[ nOldLen ].Value = aTypes[nInd].Value;
break;
}
@@ -659,7 +659,7 @@ uno::Sequence< beans::NamedValue > MimeConfigurationHelper::GetObjectPropsByDocu
{
sal_Int32 nOldLen = aMediaDescr.getLength();
aMediaDescr.realloc( nOldLen + 1 );
- aMediaDescr[nOldLen].Name = ::rtl::OUString::createFromAscii( "DocumentService" );
+ aMediaDescr[nOldLen].Name = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DocumentService" ));
aMediaDescr[nOldLen].Value <<= aDocName;
}
@@ -675,7 +675,7 @@ sal_Bool MimeConfigurationHelper::AddFilterNameCheckOwnFile(
try
{
uno::Reference< container::XNameAccess > xFilterFactory(
- m_xFactory->createInstance( ::rtl::OUString::createFromAscii( "com.sun.star.document.FilterFactory" ) ),
+ m_xFactory->createInstance( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.document.FilterFactory" )) ),
uno::UNO_QUERY_THROW );
uno::Any aFilterAnyData = xFilterFactory->getByName( aFilterName );
@@ -710,13 +710,13 @@ sal_Bool MimeConfigurationHelper::AddFilterNameCheckOwnFile(
try
{
uno::Reference< container::XContainerQuery > xFilterQuery(
- m_xFactory->createInstance( ::rtl::OUString::createFromAscii( "com.sun.star.document.FilterFactory" ) ),
+ m_xFactory->createInstance( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.document.FilterFactory" )) ),
uno::UNO_QUERY_THROW );
uno::Sequence< beans::NamedValue > aSearchRequest( 2 );
- aSearchRequest[0].Name = ::rtl::OUString::createFromAscii( "DocumentService" );
+ aSearchRequest[0].Name = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DocumentService" ));
aSearchRequest[0].Value <<= aServiceName;
- aSearchRequest[1].Name = ::rtl::OUString::createFromAscii( "FileFormatVersion" );
+ aSearchRequest[1].Name = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "FileFormatVersion" ));
aSearchRequest[1].Value <<= nVersion;
uno::Sequence< beans::PropertyValue > aFilterProps;
@@ -731,7 +731,7 @@ sal_Bool MimeConfigurationHelper::AddFilterNameCheckOwnFile(
if ( xFilterEnum->nextElement() >>= aProps )
{
SequenceAsHashMap aPropsHM( aProps );
- sal_Int32 nFlags = aPropsHM.getUnpackedValueOrDefault( ::rtl::OUString::createFromAscii( "Flags" ),
+ sal_Int32 nFlags = aPropsHM.getUnpackedValueOrDefault( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Flags" )),
(sal_Int32)0 );
// that should be import, export, own filter and not a template filter ( TemplatePath flag )
@@ -740,7 +740,7 @@ sal_Bool MimeConfigurationHelper::AddFilterNameCheckOwnFile(
// if there are more than one filter the preffered one should be used
// if there is no preffered filter the first one will be used
if ( !aResult.getLength() || ( nFlags & 0x10000000L ) )
- aResult = aPropsHM.getUnpackedValueOrDefault( ::rtl::OUString::createFromAscii( "Name" ),
+ aResult = aPropsHM.getUnpackedValueOrDefault( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Name" )),
::rtl::OUString() );
if ( nFlags & 0x10000000L )
break; // the preffered filter was found
diff --git a/comphelper/source/misc/numbers.cxx b/comphelper/source/misc/numbers.cxx
index a011964b91fa..d86bef05f21a 100644
--- a/comphelper/source/misc/numbers.cxx
+++ b/comphelper/source/misc/numbers.cxx
@@ -53,7 +53,7 @@ sal_Int16 getNumberFormatType(const staruno::Reference<starutil::XNumberFormats>
{
staruno::Reference<starbeans::XPropertySet> xFormat(xFormats->getByKey(nKey));
if (xFormat.is())
- xFormat->getPropertyValue(rtl::OUString::createFromAscii("Type")) >>= nReturn;
+ xFormat->getPropertyValue(rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Type" ))) >>= nReturn;
}
catch(...)
{
@@ -83,7 +83,7 @@ staruno::Any getNumberFormatDecimals(const staruno::Reference<starutil::XNumberF
staruno::Reference<starbeans::XPropertySet> xFormat( xFormats->getByKey(nKey));
if (xFormat.is())
{
- static ::rtl::OUString PROPERTY_DECIMALS = ::rtl::OUString::createFromAscii("Decimals");
+ static ::rtl::OUString PROPERTY_DECIMALS( RTL_CONSTASCII_USTRINGPARAM( "Decimals" ));
return xFormat->getPropertyValue(PROPERTY_DECIMALS);
}
}
diff --git a/comphelper/source/misc/officerestartmanager.cxx b/comphelper/source/misc/officerestartmanager.cxx
index 6c1f38b15ff9..20af7275ca4d 100644
--- a/comphelper/source/misc/officerestartmanager.cxx
+++ b/comphelper/source/misc/officerestartmanager.cxx
@@ -104,7 +104,7 @@ void SAL_CALL OOfficeRestartManager::requestRestart( const uno::Reference< task:
uno::Reference< awt::XRequestCallback > xRequestCallback(
xFactory->createInstanceWithContext(
- ::rtl::OUString::createFromAscii("com.sun.star.awt.AsyncCallback"),
+ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.awt.AsyncCallback" )),
m_xContext ),
uno::UNO_QUERY_THROW );
diff --git a/comphelper/source/misc/regpathhelper.cxx b/comphelper/source/misc/regpathhelper.cxx
index 898d1224b091..5c39ef684dc7 100644
--- a/comphelper/source/misc/regpathhelper.cxx
+++ b/comphelper/source/misc/regpathhelper.cxx
@@ -72,7 +72,7 @@ static sal_Bool retrievePortalUserDir( OUString *pDirectory )
{
if ( !osl_getCommandArg(--nArgs, &sArg.pData) )
{
- if ( sArg.indexOf(OUString::createFromAscii("-userid")) == 0 )
+ if ( sArg.indexOf(OUString( RTL_CONSTASCII_USTRINGPARAM( "-userid" ))) == 0 )
{
bIsPortalUser = sal_True;
diff --git a/comphelper/source/misc/sequenceashashmap.cxx b/comphelper/source/misc/sequenceashashmap.cxx
index c1b9cd9463b4..d119f10a3a0d 100644
--- a/comphelper/source/misc/sequenceashashmap.cxx
+++ b/comphelper/source/misc/sequenceashashmap.cxx
@@ -115,7 +115,7 @@ void SequenceAsHashMap::operator<<(const css::uno::Any& aSource)
}
throw css::beans::IllegalTypeException(
- ::rtl::OUString::createFromAscii("Any contains wrong type."),
+ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Any contains wrong type." )),
css::uno::Reference< css::uno::XInterface >());
}
@@ -135,7 +135,7 @@ void SequenceAsHashMap::operator<<(const css::uno::Sequence< css::uno::Any >& lS
(!lP.Value.hasValue())
)
throw css::beans::IllegalTypeException(
- ::rtl::OUString::createFromAscii("PropertyValue struct contains no usefull informations."),
+ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PropertyValue struct contains no usefull informations." )),
css::uno::Reference< css::uno::XInterface >());
(*this)[lP.Name] = lP.Value;
continue;
@@ -149,7 +149,7 @@ void SequenceAsHashMap::operator<<(const css::uno::Sequence< css::uno::Any >& lS
(!lN.Value.hasValue())
)
throw css::beans::IllegalTypeException(
- ::rtl::OUString::createFromAscii("NamedValue struct contains no usefull informations."),
+ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "NamedValue struct contains no usefull informations." )),
css::uno::Reference< css::uno::XInterface >());
(*this)[lN.Name] = lN.Value;
continue;
@@ -158,7 +158,7 @@ void SequenceAsHashMap::operator<<(const css::uno::Sequence< css::uno::Any >& lS
// ignore VOID Any ... but reject wrong filled ones!
if (lSource[i].hasValue())
throw css::beans::IllegalTypeException(
- ::rtl::OUString::createFromAscii("Any contains wrong type."),
+ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Any contains wrong type." )),
css::uno::Reference< css::uno::XInterface >());
}
}
diff --git a/comphelper/source/misc/storagehelper.cxx b/comphelper/source/misc/storagehelper.cxx
index 1503e08bf6b0..4d14069be369 100644
--- a/comphelper/source/misc/storagehelper.cxx
+++ b/comphelper/source/misc/storagehelper.cxx
@@ -58,7 +58,7 @@ uno::Reference< lang::XSingleServiceFactory > OStorageHelper::GetStorageFactory(
throw uno::RuntimeException();
uno::Reference < lang::XSingleServiceFactory > xStorageFactory(
- xFactory->createInstance ( ::rtl::OUString::createFromAscii( "com.sun.star.embed.StorageFactory" ) ),
+ xFactory->createInstance ( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.embed.StorageFactory" )) ),
uno::UNO_QUERY );
if ( !xStorageFactory.is() )
@@ -77,7 +77,7 @@ uno::Reference< lang::XSingleServiceFactory > OStorageHelper::GetFileSystemStora
throw uno::RuntimeException();
uno::Reference < lang::XSingleServiceFactory > xStorageFactory(
- xFactory->createInstance ( ::rtl::OUString::createFromAscii( "com.sun.star.embed.FileSystemStorageFactory" ) ),
+ xFactory->createInstance ( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.embed.FileSystemStorageFactory" )) ),
uno::UNO_QUERY );
if ( !xStorageFactory.is() )
@@ -223,7 +223,7 @@ uno::Reference< io::XInputStream > OStorageHelper::GetInputStreamFromURL(
throw uno::RuntimeException();
uno::Reference < ::com::sun::star::ucb::XSimpleFileAccess > xTempAccess(
- xFactory->createInstance ( ::rtl::OUString::createFromAscii( "com.sun.star.ucb.SimpleFileAccess" ) ),
+ xFactory->createInstance ( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.ucb.SimpleFileAccess" )) ),
uno::UNO_QUERY );
if ( !xTempAccess.is() )
@@ -257,7 +257,7 @@ sal_Int32 OStorageHelper::GetXStorageFormat(
uno::Reference< beans::XPropertySet > xStorProps( xStorage, uno::UNO_QUERY_THROW );
::rtl::OUString aMediaType;
- xStorProps->getPropertyValue( ::rtl::OUString::createFromAscii( "MediaType" ) ) >>= aMediaType;
+ xStorProps->getPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "MediaType" )) ) >>= aMediaType;
sal_Int32 nResult = 0;
diff --git a/comphelper/source/misc/string.cxx b/comphelper/source/misc/string.cxx
index 61e0eff9e0d7..66cb8f984182 100644
--- a/comphelper/source/misc/string.cxx
+++ b/comphelper/source/misc/string.cxx
@@ -101,7 +101,7 @@ rtl::OUString searchAndReplaceAsciiL(
::comphelper::intersperse(
::comphelper::stl_begin(i_rSeq), ::comphelper::stl_end(i_rSeq),
::comphelper::OUStringBufferAppender(buf),
- ::rtl::OUString::createFromAscii(", "));
+ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ", " )));
return buf.makeStringAndClear();
}
diff --git a/comphelper/source/property/propertystatecontainer.cxx b/comphelper/source/property/propertystatecontainer.cxx
index 833cf0f3da34..7722e4302aa6 100644
--- a/comphelper/source/property/propertystatecontainer.cxx
+++ b/comphelper/source/property/propertystatecontainer.cxx
@@ -248,7 +248,7 @@ namespace comphelper
:OPropertyStateContainer( GetBroadcastHelper() )
{
registerProperty(
- ::rtl::OUString::createFromAscii( "StringProperty" ),
+ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "StringProperty" )),
1,
PropertyAttribute::BOUND,
&m_sStringProperty,
@@ -256,7 +256,7 @@ namespace comphelper
);
registerProperty(
- ::rtl::OUString::createFromAscii( "InterfaceProperty" ),
+ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "InterfaceProperty" )),
2,
PropertyAttribute::BOUND,
&m_xInterfaceProperty,
@@ -264,7 +264,7 @@ namespace comphelper
);
registerMayBeVoidProperty(
- ::rtl::OUString::createFromAscii( "IntProperty" ),
+ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "IntProperty" )),
3,
PropertyAttribute::BOUND,
&m_aMayBeVoidProperty,
@@ -272,7 +272,7 @@ namespace comphelper
);
registerPropertyNoMember(
- ::rtl::OUString::createFromAscii( "OtherInterfaceProperty" ),
+ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "OtherInterfaceProperty" )),
4,
PropertyAttribute::BOUND | PropertyAttribute::MAYBEVOID,
::getCppuType( static_cast< Reference< XInterface >* >( NULL ) ),
diff --git a/comphelper/test/uno_iterators/uno_iterators.cxx b/comphelper/test/uno_iterators/uno_iterators.cxx
index c2106068ff46..b1021fe8493a 100644
--- a/comphelper/test/uno_iterators/uno_iterators.cxx
+++ b/comphelper/test/uno_iterators/uno_iterators.cxx
@@ -135,7 +135,7 @@ void stl_conversions()
// convert to stl::vector, modify in vector, copy back, print
cout << "vector conversion" << endl;
vector<OUString> vec(stl_s.begin(), stl_s.end());
- vec[2] = OUString::createFromAscii("changed in vector");
+ vec[2] = OUString( RTL_CONSTASCII_USTRINGPARAM( "changed in vector" ));
copy(vec.begin(), vec.end(), stl_s.begin());
print_sequence(s);
@@ -143,7 +143,7 @@ void stl_conversions()
cout << "list conversion" << endl;
list<OUString> l(stl_s.begin(), stl_s.end());
l.pop_back();
- l.push_back(OUString::createFromAscii("changed in list"));
+ l.push_back(OUString( RTL_CONSTASCII_USTRINGPARAM( "changed in list" )));
copy(l.begin(), l.end(), stl_s.begin());
print_sequence(s);
}
@@ -174,7 +174,7 @@ void stl_compare()
StlUnoSequence<OUString> stl_s2 = StlUnoSequence<OUString>::createInstance(s2);
if (stl_s1 == stl_s2)
cout << "sequences are equal." << endl;
- s2[9] = OUString::createFromAscii("ZZZZZ");
+ s2[9] = OUString( RTL_CONSTASCII_USTRINGPARAM( "ZZZZZ" ));
if(stl_s1 < stl_s2)
cout << "first sequence is smaller." << endl;
}