diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-07-11 11:04:35 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-07-11 14:13:03 +0200 |
commit | 7de833a626cea8cd741ba1d971fea6f0c3a2660b (patch) | |
tree | 2750dbed735b4df7a9e82add532df49049cc52e8 /xmloff | |
parent | 6f9f9491bdef676f969898bd653db9905d14f5e8 (diff) |
simplify calls OUString::copy in foo.copy(x, foo.getLength() - x)
Change-Id: I20318c77dcc3bc2a64336541ef5a3f412bfd9483
Reviewed-on: https://gerrit.libreoffice.org/39803
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'xmloff')
-rw-r--r-- | xmloff/source/chart/SchXMLChartContext.cxx | 2 | ||||
-rw-r--r-- | xmloff/source/draw/animationimport.cxx | 4 | ||||
-rw-r--r-- | xmloff/source/draw/shapeexport.cxx | 4 |
3 files changed, 5 insertions, 5 deletions
diff --git a/xmloff/source/chart/SchXMLChartContext.cxx b/xmloff/source/chart/SchXMLChartContext.cxx index e5db0423c011..69c76d5ab9ea 100644 --- a/xmloff/source/chart/SchXMLChartContext.cxx +++ b/xmloff/source/chart/SchXMLChartContext.cxx @@ -193,7 +193,7 @@ uno::Sequence< sal_Int32 > lcl_getNumberSequenceFromString( const OUString& rStr if( nLastPos != 0 && rStr.getLength() > nLastPos ) { - aVec.push_back( rStr.copy( nLastPos, (rStr.getLength() - nLastPos) ).toInt32() ); + aVec.push_back( rStr.copy( nLastPos ).toInt32() ); } const sal_Int32 nVecSize = aVec.size(); diff --git a/xmloff/source/draw/animationimport.cxx b/xmloff/source/draw/animationimport.cxx index 6393d3e1acce..d99066d71ccc 100644 --- a/xmloff/source/draw/animationimport.cxx +++ b/xmloff/source/draw/animationimport.cxx @@ -411,7 +411,7 @@ Any AnimationsImportHelperImpl::convertValue( XMLTokenEnum eAttributeName, const { ValuePair aPair; aPair.First = convertValue( eAttributeName, rValue.copy( 0, nCommaPos ) ); - aPair.Second = convertValue( eAttributeName, rValue.copy( nCommaPos+1, rValue.getLength() - nCommaPos - 1 ) ); + aPair.Second = convertValue( eAttributeName, rValue.copy( nCommaPos+1 ) ); return makeAny( aPair ); } else @@ -607,7 +607,7 @@ Sequence< TimeFilterPair > AnimationsImportHelperImpl::convertTimeFilter( const if( nPos >= 0 ) { pValues->Time = aToken.copy( 0, nPos ).toDouble(); - pValues->Progress = aToken.copy( nPos+1, aToken.getLength() - nPos - 1 ).toDouble(); + pValues->Progress = aToken.copy( nPos+1 ).toDouble(); } pValues++; } diff --git a/xmloff/source/draw/shapeexport.cxx b/xmloff/source/draw/shapeexport.cxx index 8a63acc1ca26..1ca5437cdbad 100644 --- a/xmloff/source/draw/shapeexport.cxx +++ b/xmloff/source/draw/shapeexport.cxx @@ -2290,10 +2290,10 @@ void XMLShapeExport::ImpExportGraphicObjectShape( { bIsEmbeddedImageWithExistingStreamInPackage = true; - OUString sRequestedName( aStreamURL.copy( sPackageURL.getLength(), aStreamURL.getLength() - sPackageURL.getLength() ) ); + OUString sRequestedName = aStreamURL.copy( sPackageURL.getLength() ); sal_Int32 nLastIndex = sRequestedName.lastIndexOf( '/' ) + 1; if ( ( nLastIndex > 0 ) && ( nLastIndex < sRequestedName.getLength() ) ) - sRequestedName = sRequestedName.copy( nLastIndex, sRequestedName.getLength() - nLastIndex ); + sRequestedName = sRequestedName.copy( nLastIndex ); nLastIndex = sRequestedName.lastIndexOf( '.' ); if ( nLastIndex >= 0 ) sRequestedName = sRequestedName.copy( 0, nLastIndex ); |