diff options
Diffstat (limited to 'reportdesign/source')
4 files changed, 8 insertions, 8 deletions
diff --git a/reportdesign/source/core/api/ReportDefinition.cxx b/reportdesign/source/core/api/ReportDefinition.cxx index 680172fec877..fe362340f98c 100644 --- a/reportdesign/source/core/api/ReportDefinition.cxx +++ b/reportdesign/source/core/api/ReportDefinition.cxx @@ -2197,7 +2197,7 @@ uno::Reference< uno::XInterface > SAL_CALL OReportDefinition::createInstanceWith ::connectivity::checkDisposed(ReportDefinitionBase::rBHelper.bDisposed); uno::Reference< uno::XInterface > xRet; - if ( aServiceSpecifier.indexOf( "com.sun.star.document.ImportEmbeddedObjectResolver") == 0 ) + if ( aServiceSpecifier.startsWith( "com.sun.star.document.ImportEmbeddedObjectResolver") ) { uno::Reference< embed::XStorage > xStorage; const uno::Any* pIter = _aArgs.getConstArray(); @@ -2220,7 +2220,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( "com.sun.star.report." ) == 0 ) + if ( aServiceSpecifier.startsWith( "com.sun.star.report." ) ) { if ( aServiceSpecifier == SERVICE_SHAPE ) xShape.set(SvxUnoDrawMSFactory::createInstance("com.sun.star.drawing.CustomShape"),uno::UNO_QUERY_THROW); @@ -2232,7 +2232,7 @@ uno::Reference< uno::XInterface > SAL_CALL OReportDefinition::createInstance( co else xShape.set(SvxUnoDrawMSFactory::createInstance("com.sun.star.drawing.OLE2Shape"),uno::UNO_QUERY_THROW); } - else if ( aServiceSpecifier.indexOf( "com.sun.star.form.component." ) == 0 ) + else if ( aServiceSpecifier.startsWith( "com.sun.star.form.component." ) ) { xShape.set(m_aProps->m_xContext->getServiceManager()->createInstanceWithContext(aServiceSpecifier,m_aProps->m_xContext),uno::UNO_QUERY); } diff --git a/reportdesign/source/core/misc/reportformula.cxx b/reportdesign/source/core/misc/reportformula.cxx index 94158d8d00eb..689c5d9581cd 100644 --- a/reportdesign/source/core/misc/reportformula.cxx +++ b/reportdesign/source/core/misc/reportformula.cxx @@ -67,7 +67,7 @@ namespace rptui { case Expression: { - if ( _rFieldOrExpression.indexOf( lcl_getExpressionPrefix() ) == 0 ) + if ( _rFieldOrExpression.startsWith( lcl_getExpressionPrefix() ) ) m_sCompleteFormula = _rFieldOrExpression; else m_sCompleteFormula = lcl_getExpressionPrefix() + _rFieldOrExpression; @@ -102,7 +102,7 @@ namespace rptui sal_Int32 nPrefixLen( -1 ); // is it an ordinary expression? - if ( m_sCompleteFormula.indexOf( lcl_getExpressionPrefix( &nPrefixLen ) ) == 0 ) + if ( m_sCompleteFormula.startsWith( lcl_getExpressionPrefix( &nPrefixLen ) ) ) { m_eType = Expression; m_sUndecoratedContent = m_sCompleteFormula.copy( nPrefixLen ); @@ -110,7 +110,7 @@ namespace rptui } /// does it refer to a field? - if ( m_sCompleteFormula.indexOf( lcl_getFieldPrefix( &nPrefixLen ) ) == 0 ) + if ( m_sCompleteFormula.startsWith( lcl_getFieldPrefix( &nPrefixLen ) ) ) { if ( ( m_sCompleteFormula.getLength() >= nPrefixLen + 2 ) && ( m_sCompleteFormula[ nPrefixLen ] == '[' ) diff --git a/reportdesign/source/filter/xml/xmlExport.cxx b/reportdesign/source/filter/xml/xmlExport.cxx index c76a4e34e200..8ab0b4303ec1 100644 --- a/reportdesign/source/filter/xml/xmlExport.cxx +++ b/reportdesign/source/filter/xml/xmlExport.cxx @@ -1458,7 +1458,7 @@ void ORptExport::exportParagraph(const Reference< XReportControlModel >& _xRepor else { - if ( sToken.indexOf('"') == 0 && sToken.lastIndexOf('"') == sToken.getLength()-1 ) + if ( sToken.startsWith("\"") && sToken.endsWith("\"") ) sToken = sToken.copy(1,sToken.getLength()-2); bool bPrevCharIsSpace = false; diff --git a/reportdesign/source/ui/report/ReportController.cxx b/reportdesign/source/ui/report/ReportController.cxx index be3ab4919291..ef35d1ca1b6c 100644 --- a/reportdesign/source/ui/report/ReportController.cxx +++ b/reportdesign/source/ui/report/ReportController.cxx @@ -2719,7 +2719,7 @@ uno::Any SAL_CALL OReportController::getViewData(void) throw( uno::RuntimeExcept const FeatureState aFeatureState = GetState( nCommandIDs[i] ); OUString sCommandURL( getURLForId( nCommandIDs[i] ).Main ); - OSL_ENSURE( sCommandURL.indexOfAsciiL( ".uno:", 5 ) == 0, "OReportController::getViewData: illegal command URL!" ); + OSL_ENSURE( sCommandURL.startsWith( ".uno:" ), "OReportController::getViewData: illegal command URL!" ); sCommandURL = sCommandURL.copy( 5 ); Any aCommandState; |