From df645a2bd8a9b5463c74f261268f0d2de7245ccc Mon Sep 17 00:00:00 2001 From: Christophe JAILLET Date: Sat, 14 Jul 2012 18:00:06 +0200 Subject: There is not need to allocate memory just for getting the 'indexOf' a literal within a OUString. Change-Id: I01ca30c68228f81b3d313dfca5b975448f3c4fc7 --- reportdesign/source/core/api/ReportDefinition.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'reportdesign') diff --git a/reportdesign/source/core/api/ReportDefinition.cxx b/reportdesign/source/core/api/ReportDefinition.cxx index 6e7976715e39..1e8433ba1329 100644 --- a/reportdesign/source/core/api/ReportDefinition.cxx +++ b/reportdesign/source/core/api/ReportDefinition.cxx @@ -2234,7 +2234,7 @@ uno::Reference< uno::XInterface > SAL_CALL OReportDefinition::createInstanceWith ::connectivity::checkDisposed(ReportDefinitionBase::rBHelper.bDisposed); uno::Reference< uno::XInterface > xRet; - if ( aServiceSpecifier.indexOf( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.document.ImportEmbeddedObjectResolver"))) == 0 ) + if ( aServiceSpecifier.indexOf( "com.sun.star.document.ImportEmbeddedObjectResolver") == 0 ) { uno::Reference< embed::XStorage > xStorage; const uno::Any* pIter = _aArgs.getConstArray(); @@ -2257,7 +2257,7 @@ uno::Reference< uno::XInterface > SAL_CALL OReportDefinition::createInstance( co ::osl::MutexGuard aGuard(m_aMutex); ::connectivity::checkDisposed(ReportDefinitionBase::rBHelper.bDisposed); uno::Reference< drawing::XShape > xShape; - if ( aServiceSpecifier.indexOf( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.report.")) ) == 0 ) + if ( aServiceSpecifier.indexOf( "com.sun.star.report." ) == 0 ) { if ( aServiceSpecifier == SERVICE_SHAPE ) xShape.set(SvxUnoDrawMSFactory::createInstance( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.CustomShape")) ),uno::UNO_QUERY_THROW); @@ -2269,7 +2269,7 @@ uno::Reference< uno::XInterface > SAL_CALL OReportDefinition::createInstance( co else xShape.set(SvxUnoDrawMSFactory::createInstance( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.OLE2Shape")) ),uno::UNO_QUERY_THROW); } - else if ( aServiceSpecifier.indexOf( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.form.component.")) ) == 0 ) + else if ( aServiceSpecifier.indexOf( "com.sun.star.form.component." ) == 0 ) { xShape.set(m_aProps->m_xContext->getServiceManager()->createInstanceWithContext(aServiceSpecifier,m_aProps->m_xContext),uno::UNO_QUERY); } -- cgit