targeted string re-work

Change-Id: Ifa58823b593a545c66ef78ebe13e576127e60dc9
This commit is contained in:
Norbert Thiebaud
2012-06-02 14:42:22 -05:00
parent d760c4427a
commit 397fd0189a
5 changed files with 30 additions and 32 deletions

View File

@@ -93,7 +93,7 @@ sal_Bool FilterConfigCache::FilterConfigCacheEntry::CreateFilterName( const OUSt
if ( sFilterName.EqualsIgnoreCaseAscii( *pPtr ) )
bIsPixelFormat = sal_True;
}
rtl::OUString sTemp(RTL_CONSTASCII_USTRINGPARAM(SVLIBRARY("?")));
rtl::OUString sTemp(SVLIBRARY("?"));
sal_Int32 nIndex = sTemp.indexOf(static_cast<sal_Unicode>('?'));
sFilterName = sTemp.replaceAt(nIndex, 1, sFilterName);
}
@@ -127,8 +127,8 @@ String FilterConfigCache::FilterConfigCacheEntry::GetShortName()
Reference< XInterface > openConfig(const char* sPackage)
throw(RuntimeException)
{
static OUString TYPEPKG( RTL_CONSTASCII_USTRINGPARAM( "types" ) );
static OUString FILTERPKG( RTL_CONSTASCII_USTRINGPARAM( "filters" ) );
static OUString TYPEPKG( "types" );
static OUString FILTERPKG( "filters" );
Reference< XMultiServiceFactory > xSMGR(
comphelper::getProcessServiceFactory() );
@@ -137,7 +137,7 @@ Reference< XInterface > openConfig(const char* sPackage)
{
// get access to config API (not to file!)
Reference< XMultiServiceFactory > xConfigProvider( xSMGR->createInstance(
OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.configuration.ConfigurationProvider" ))), UNO_QUERY);
OUString( "com.sun.star.configuration.ConfigurationProvider" )), UNO_QUERY);
if (xConfigProvider.is())
{
@@ -145,16 +145,16 @@ Reference< XInterface > openConfig(const char* sPackage)
PropertyValue aParam ;
// define cfg path for open
aParam.Name = OUString( RTL_CONSTASCII_USTRINGPARAM( "nodepath" ));
aParam.Name = OUString( "nodepath" );
if (TYPEPKG.equalsIgnoreAsciiCaseAscii(sPackage))
aParam.Value <<= OUString( RTL_CONSTASCII_USTRINGPARAM( "/org.openoffice.TypeDetection.Types/Types" ));
aParam.Value <<= OUString( "/org.openoffice.TypeDetection.Types/Types" );
if (FILTERPKG.equalsIgnoreAsciiCaseAscii(sPackage))
aParam.Value <<= OUString( RTL_CONSTASCII_USTRINGPARAM( "/org.openoffice.TypeDetection.GraphicFilter/Filters" ));
aParam.Value <<= OUString( "/org.openoffice.TypeDetection.GraphicFilter/Filters" );
lParams[0] = makeAny(aParam);
// get access to file
xCfg = xConfigProvider->createInstanceWithArguments(
OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.configuration.ConfigurationAccess" )), lParams);
OUString( "com.sun.star.configuration.ConfigurationAccess" ), lParams);
}
}
catch(const RuntimeException&)
@@ -167,14 +167,14 @@ Reference< XInterface > openConfig(const char* sPackage)
void FilterConfigCache::ImplInit()
{
static OUString STYPE ( RTL_CONSTASCII_USTRINGPARAM( "Type" ) );
static OUString SUINAME ( RTL_CONSTASCII_USTRINGPARAM( "UIName" ) );
static OUString SUICOMPONENT ( RTL_CONSTASCII_USTRINGPARAM( "UIComponent" ) );
static OUString SFLAGS ( RTL_CONSTASCII_USTRINGPARAM( "Flags" ) );
static OUString SMEDIATYPE ( RTL_CONSTASCII_USTRINGPARAM( "MediaType" ) );
static OUString SEXTENSIONS ( RTL_CONSTASCII_USTRINGPARAM( "Extensions" ) );
static OUString SFORMATNAME ( RTL_CONSTASCII_USTRINGPARAM( "FormatName" ) );
static OUString SREALFILTERNAME ( RTL_CONSTASCII_USTRINGPARAM( "RealFilterName" ) );
static OUString STYPE ( "Type" );
static OUString SUINAME ( "UIName" );
static OUString SUICOMPONENT ( "UIComponent" );
static OUString SFLAGS ( "Flags" );
static OUString SMEDIATYPE ( "MediaType" );
static OUString SEXTENSIONS ( "Extensions" );
static OUString SFORMATNAME ( "FormatName" );
static OUString SREALFILTERNAME ( "RealFilterName" );
// get access to config
Reference< XNameAccess > xTypeAccess ( openConfig("types" ), UNO_QUERY );

View File

@@ -185,7 +185,7 @@ void GraphicDescriptor::implCreate( SvStream& rIStm, const ::rtl::OUString* pURL
::rtl::OUString GraphicDescriptor::getImplementationName_Static()
throw()
{
return ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.graphic.GraphicDescriptor" ) );
return ::rtl::OUString( "com.sun.star.comp.graphic.GraphicDescriptor" );
}
// ------------------------------------------------------------------------------
@@ -195,7 +195,7 @@ uno::Sequence< ::rtl::OUString > GraphicDescriptor::getSupportedServiceNames_Sta
{
uno::Sequence< ::rtl::OUString > aSeq( 1 );
aSeq.getArray()[ 0 ] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.graphic.GraphicDescriptor" ) );
aSeq.getArray()[ 0 ] = ::rtl::OUString( "com.sun.star.graphic.GraphicDescriptor" );
return aSeq;
}
@@ -395,7 +395,7 @@ void GraphicDescriptor::_getPropertyValues( const comphelper::PropertyMapEntry**
}
if( aMimeType.isEmpty() && ( mpGraphic->GetType() != GRAPHIC_NONE ) )
aMimeType = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( MIMETYPE_VCLGRAPHIC ));
aMimeType = ::rtl::OUString(MIMETYPE_VCLGRAPHIC );
}
else
aMimeType = maMimeType;

View File

@@ -282,13 +282,11 @@ namespace svt
// load the library implementing the factory
if ( !s_pFactory.get() )
{
const ::rtl::OUString sModuleName(RTL_CONSTASCII_USTRINGPARAM(
SVLIBRARY( "acc" )
));
const ::rtl::OUString sModuleName( SVLIBRARY( "acc" ));
s_hAccessibleImplementationModule = osl_loadModuleRelative( &thisModule, sModuleName.pData, 0 );
if ( s_hAccessibleImplementationModule != NULL )
{
const ::rtl::OUString sFactoryCreationFunc( RTL_CONSTASCII_USTRINGPARAM( "getSvtAccessibilityComponentFactory" ));
const ::rtl::OUString sFactoryCreationFunc( "getSvtAccessibilityComponentFactory" );
s_pAccessibleFactoryFunc = (GetSvtAccessibilityComponentFactory)
osl_getFunctionSymbol( s_hAccessibleImplementationModule, sFactoryCreationFunc.pData );

View File

@@ -111,7 +111,7 @@ namespace svt
OAddressBookSourceDialogUno::OAddressBookSourceDialogUno(const Reference< XMultiServiceFactory >& _rxORB)
:OGenericUnoDialog(_rxORB)
{
registerProperty(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(UNODIALOG_PROPERTY_ALIASES)), UNODIALOG_PROPERTY_ID_ALIASES, PropertyAttribute::READONLY,
registerProperty(::rtl::OUString(UNODIALOG_PROPERTY_ALIASES), UNODIALOG_PROPERTY_ID_ALIASES, PropertyAttribute::READONLY,
&m_aAliases, getCppuType(&m_aAliases));
}
@@ -137,7 +137,7 @@ namespace svt
//-------------------------------------------------------------------------
::rtl::OUString OAddressBookSourceDialogUno::getImplementationName_Static() throw(RuntimeException)
{
return ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.svtools.OAddressBookSourceDialogUno" ));
return ::rtl::OUString( "com.sun.star.comp.svtools.OAddressBookSourceDialogUno" );
}
//-------------------------------------------------------------------------
@@ -150,7 +150,7 @@ namespace svt
::comphelper::StringSequence OAddressBookSourceDialogUno::getSupportedServiceNames_Static() throw(RuntimeException)
{
::comphelper::StringSequence aSupported(1);
aSupported.getArray()[0] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.ui.AddressBookSourceDialog" ));
aSupported.getArray()[0] = ::rtl::OUString( "com.sun.star.ui.AddressBookSourceDialog" );
return aSupported;
}

View File

@@ -65,9 +65,9 @@ OGenericUnoDialog::OGenericUnoDialog(const Reference< XMultiServiceFactory >& _r
,m_bNeedInitialization( false )
,m_aContext( _rxORB )
{
registerProperty(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(UNODIALOG_PROPERTY_TITLE)), UNODIALOG_PROPERTY_ID_TITLE, PropertyAttribute::TRANSIENT,
registerProperty(::rtl::OUString(UNODIALOG_PROPERTY_TITLE), UNODIALOG_PROPERTY_ID_TITLE, PropertyAttribute::TRANSIENT,
&m_sTitle, getCppuType(&m_sTitle));
registerProperty(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(UNODIALOG_PROPERTY_PARENT)), UNODIALOG_PROPERTY_ID_PARENT, PropertyAttribute::TRANSIENT,
registerProperty(::rtl::OUString(UNODIALOG_PROPERTY_PARENT), UNODIALOG_PROPERTY_ID_PARENT, PropertyAttribute::TRANSIENT,
&m_xParent, getCppuType(&m_xParent));
}
@@ -82,9 +82,9 @@ OGenericUnoDialog::OGenericUnoDialog(const Reference< XComponentContext >& _rxCo
,m_bNeedInitialization( false )
,m_aContext(_rxContext)
{
registerProperty(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(UNODIALOG_PROPERTY_TITLE)), UNODIALOG_PROPERTY_ID_TITLE, PropertyAttribute::TRANSIENT,
registerProperty(::rtl::OUString(UNODIALOG_PROPERTY_TITLE), UNODIALOG_PROPERTY_ID_TITLE, PropertyAttribute::TRANSIENT,
&m_sTitle, getCppuType(&m_sTitle));
registerProperty(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(UNODIALOG_PROPERTY_PARENT)), UNODIALOG_PROPERTY_ID_PARENT, PropertyAttribute::TRANSIENT,
registerProperty(::rtl::OUString(UNODIALOG_PROPERTY_PARENT), UNODIALOG_PROPERTY_ID_PARENT, PropertyAttribute::TRANSIENT,
&m_xParent, getCppuType(&m_xParent));
}
@@ -180,7 +180,7 @@ void SAL_CALL OGenericUnoDialog::setTitle( const ::rtl::OUString& _rTitle ) thro
try
{
setPropertyValue(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(UNODIALOG_PROPERTY_TITLE)), makeAny(_rTitle));
setPropertyValue(::rtl::OUString(UNODIALOG_PROPERTY_TITLE), makeAny(_rTitle));
}
catch(RuntimeException&)
{
@@ -242,7 +242,7 @@ sal_Int16 SAL_CALL OGenericUnoDialog::execute( ) throw(RuntimeException)
if (m_bExecuting)
throw RuntimeException(
::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "already executing the dialog (recursive call)" ) ),
::rtl::OUString( "already executing the dialog (recursive call)" ),
*this
);