Kaydet (Commit) f998aec8 authored tarafından Chr. Rossmanith's avatar Chr. Rossmanith Kaydeden (comit) Eike Rathke

indexOf returns -1 not STRING_NOTFOUND

Change-Id: I2fed196572a0a5f5b006d1d653968729d6d75583
Reviewed-on: https://gerrit.libreoffice.org/3115Reviewed-by: 's avatarEike Rathke <erack@redhat.com>
Tested-by: 's avatarEike Rathke <erack@redhat.com>
üst d2670fae
...@@ -1208,7 +1208,7 @@ sal_Bool EscherPropertyContainer::CreateEmbeddedBitmapProperties( ...@@ -1208,7 +1208,7 @@ sal_Bool EscherPropertyContainer::CreateEmbeddedBitmapProperties(
OUString aVndUrl( "vnd.sun.star.GraphicObject:" ); OUString aVndUrl( "vnd.sun.star.GraphicObject:" );
OUString aBmpUrl( rBitmapUrl ); OUString aBmpUrl( rBitmapUrl );
sal_Int32 nIndex = aBmpUrl.indexOf( aVndUrl, 0 ); sal_Int32 nIndex = aBmpUrl.indexOf( aVndUrl, 0 );
if( nIndex != STRING_NOTFOUND ) if( nIndex != -1 )
{ {
// note: += ist not defined for xub_StrLen -> conversion to int and back to xub_StrLen // note: += ist not defined for xub_StrLen -> conversion to int and back to xub_StrLen
nIndex = nIndex + aVndUrl.getLength(); nIndex = nIndex + aVndUrl.getLength();
...@@ -1376,7 +1376,7 @@ sal_Bool EscherPropertyContainer::CreateGraphicProperties( ...@@ -1376,7 +1376,7 @@ sal_Bool EscherPropertyContainer::CreateGraphicProperties(
{ {
OUString aVndUrl( "vnd.sun.star.GraphicObject:" ); OUString aVndUrl( "vnd.sun.star.GraphicObject:" );
sal_Int32 nIndex = aGraphicUrl.indexOf( aVndUrl, 0 ); sal_Int32 nIndex = aGraphicUrl.indexOf( aVndUrl, 0 );
if ( nIndex != STRING_NOTFOUND ) if ( nIndex != -1 )
{ {
nIndex = nIndex + aVndUrl.getLength(); nIndex = nIndex + aVndUrl.getLength();
if ( aGraphicUrl.getLength() > nIndex ) if ( aGraphicUrl.getLength() > nIndex )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment