diff options
author | Matteo Casalin <matteo.casalin@yahoo.com> | 2019-01-26 00:27:11 +0100 |
---|---|---|
committer | Matteo Casalin <matteo.casalin@yahoo.com> | 2019-02-08 19:37:25 +0100 |
commit | db6e0348a3c5d41e6a5d38a7902645e8e3c22b4a (patch) | |
tree | 71af489fe1034a6c47046f55933a10112f85fc4e /vcl | |
parent | 88895d7451ad095510d5dbe6c760b6fbccd95b05 (diff) |
getToken+comparison+copy ==> startsWith
Change-Id: I3d243cecc21b0364b2ceac1f64cbfa1764c3ddf1
Reviewed-on: https://gerrit.libreoffice.org/66938
Tested-by: Jenkins
Reviewed-by: Matteo Casalin <matteo.casalin@yahoo.com>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/graphic/UnoGraphicProvider.cxx | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/vcl/source/graphic/UnoGraphicProvider.cxx b/vcl/source/graphic/UnoGraphicProvider.cxx index c89e83004bf0..0da9c020155d 100644 --- a/vcl/source/graphic/UnoGraphicProvider.cxx +++ b/vcl/source/graphic/UnoGraphicProvider.cxx @@ -151,11 +151,10 @@ uno::Reference< ::graphic::XGraphic > GraphicProvider::implLoadMemory( const OUS uno::Reference< ::graphic::XGraphic > GraphicProvider::implLoadRepositoryImage( const OUString& rResourceURL ) { uno::Reference< ::graphic::XGraphic > xRet; - sal_Int32 nIndex = 0; - if( rResourceURL.getToken( 0, '/', nIndex ) == "private:graphicrepository" ) + OUString sPathName; + if( rResourceURL.startsWith("private:graphicrepository/", &sPathName) ) { - OUString sPathName( rResourceURL.copy( nIndex ) ); BitmapEx aBitmap; if ( vcl::ImageRepository::loadImage( sPathName, aBitmap ) ) { @@ -169,11 +168,10 @@ uno::Reference< ::graphic::XGraphic > GraphicProvider::implLoadRepositoryImage( uno::Reference< ::graphic::XGraphic > GraphicProvider::implLoadStandardImage( const OUString& rResourceURL ) { uno::Reference< ::graphic::XGraphic > xRet; - sal_Int32 nIndex = 0; - if( rResourceURL.getToken( 0, '/', nIndex ) == "private:standardimage" ) + OUString sImageName; + if( rResourceURL.startsWith("private:standardimage/", &sImageName) ) { - OUString sImageName( rResourceURL.copy( nIndex ) ); if ( sImageName == "info" ) { xRet = Graphic(GetStandardInfoBoxImage().GetBitmapEx()).GetXGraphic(); |