diff options
Diffstat (limited to 'svtools/source')
-rw-r--r-- | svtools/source/control/inettbc.cxx | 6 | ||||
-rw-r--r-- | svtools/source/graphic/grfmgr.cxx | 2 | ||||
-rw-r--r-- | svtools/source/misc/imageresourceaccess.cxx | 10 | ||||
-rw-r--r-- | svtools/source/uno/popupmenucontrollerbase.cxx | 2 |
4 files changed, 10 insertions, 10 deletions
diff --git a/svtools/source/control/inettbc.cxx b/svtools/source/control/inettbc.cxx index ec9de0deba67..f87f783765ab 100644 --- a/svtools/source/control/inettbc.cxx +++ b/svtools/source/control/inettbc.cxx @@ -312,7 +312,7 @@ void SvtMatchContext_Impl::ReadFolder( const OUString& rURL, sal_Bool bPureHomePath = sal_False; #ifdef UNX - bPureHomePath = aText.indexOf( '~' ) == 0 && aText.indexOf( '/' ) == -1; + bPureHomePath = aText.startsWith( "~" ) && aText.indexOf( '/' ) == -1; #endif sal_Bool bExectMatch = bPureHomePath @@ -484,7 +484,7 @@ OUString SvtURLBox::ParseSmart( OUString aText, OUString aBaseURL, const OUStrin INetProtocol eBaseProt = INetURLObject::CompareProtocolScheme( aBaseURL ); // if a base URL is set the string may be parsed relative - if( aText.indexOf( '/' ) == 0 ) + if( aText.startsWith( "/" ) ) { // text starting with slashes means absolute file URLs OUString aTemp = INetURLObject::GetScheme( eBaseProt ); @@ -1296,7 +1296,7 @@ sal_Bool SvtURLBox_Impl::TildeParsing( ) { #ifdef UNX - if( aText.indexOf( '~' ) == 0 ) + if( aText.startsWith( "~" ) ) { OUString aParseTilde; sal_Bool bTrailingSlash = sal_True; // use trailing slash diff --git a/svtools/source/graphic/grfmgr.cxx b/svtools/source/graphic/grfmgr.cxx index 96408bfc33d6..89b6eadb768b 100644 --- a/svtools/source/graphic/grfmgr.cxx +++ b/svtools/source/graphic/grfmgr.cxx @@ -1147,7 +1147,7 @@ SvStream& operator<<( SvStream& rOStm, const GraphicObject& rGraphicObj ) GraphicObject GraphicObject::CreateGraphicObjectFromURL( const OUString &rURL ) { const OUString aURL( rURL ), aPrefix( UNO_NAME_GRAPHOBJ_URLPREFIX ); - if( aURL.indexOf( aPrefix ) == 0 ) + if( aURL.startsWith( aPrefix ) ) { // graphic manager url OString aUniqueID(OUStringToOString(rURL.copy(sizeof(UNO_NAME_GRAPHOBJ_URLPREFIX) - 1), RTL_TEXTENCODING_UTF8)); diff --git a/svtools/source/misc/imageresourceaccess.cxx b/svtools/source/misc/imageresourceaccess.cxx index 40df75d7e98f..fe6e4740222e 100644 --- a/svtools/source/misc/imageresourceaccess.cxx +++ b/svtools/source/misc/imageresourceaccess.cxx @@ -126,11 +126,11 @@ namespace svt //-------------------------------------------------------------------- bool GraphicAccess::isSupportedURL( const OUString& _rURL ) { - if ( ( _rURL.indexOfAsciiL( RTL_CONSTASCII_STRINGPARAM( "private:resource/" ) ) == 0 ) - || ( _rURL.indexOfAsciiL( RTL_CONSTASCII_STRINGPARAM( "private:graphicrepository/" ) ) == 0 ) - || ( _rURL.indexOfAsciiL( RTL_CONSTASCII_STRINGPARAM( "private:standardimage/" ) ) == 0 ) - || ( _rURL.indexOfAsciiL( RTL_CONSTASCII_STRINGPARAM( "vnd.sun.star.GraphicObject:" ) ) == 0 ) - || ( _rURL.indexOfAsciiL( RTL_CONSTASCII_STRINGPARAM( "vnd.sun.star.extension://" ) ) == 0 ) + if ( _rURL.startsWith( "private:resource/" ) + || _rURL.startsWith( "private:graphicrepository/" ) + || _rURL.startsWith( "private:standardimage/" ) + || _rURL.startsWith( "vnd.sun.star.GraphicObject:" ) + || _rURL.startsWith( "vnd.sun.star.extension://" ) ) return true; return false; diff --git a/svtools/source/uno/popupmenucontrollerbase.cxx b/svtools/source/uno/popupmenucontrollerbase.cxx index 06953fbfa8e9..961d5596ede4 100644 --- a/svtools/source/uno/popupmenucontrollerbase.cxx +++ b/svtools/source/uno/popupmenucontrollerbase.cxx @@ -262,7 +262,7 @@ throw( ::com::sun::star::uno::RuntimeException ) rBHelper.addListener( ::getCppuType( &xControl ), xControl ); aLock.reset(); - if ( aURL.Complete.indexOf( m_aBaseURL ) == 0 ) + if ( aURL.Complete.startsWith( m_aBaseURL ) ) bStatusUpdate = true; aLock.clear(); |