[PATCH] indexOf returns -1 not STRING_NOTFOUND

Christina Roßmanith (via_Code_Review) gerrit at gerrit.libreoffice.org
Thu Mar 28 15:02:20 PDT 2013


Hi,

I have submitted a patch for review:

    https://gerrit.libreoffice.org/3115

To pull it, you can do:

    git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/15/3115/1

indexOf returns -1 not STRING_NOTFOUND

Change-Id: I2fed196572a0a5f5b006d1d653968729d6d75583
---
M filter/source/msfilter/escherex.cxx
1 file changed, 2 insertions(+), 2 deletions(-)



diff --git a/filter/source/msfilter/escherex.cxx b/filter/source/msfilter/escherex.cxx
index f3944cf..0f99932 100644
--- a/filter/source/msfilter/escherex.cxx
+++ b/filter/source/msfilter/escherex.cxx
@@ -1208,7 +1208,7 @@
     OUString aVndUrl( "vnd.sun.star.GraphicObject:" );
     OUString aBmpUrl( rBitmapUrl );
     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
         nIndex = nIndex + aVndUrl.getLength();
@@ -1376,7 +1376,7 @@
         {
             OUString aVndUrl( "vnd.sun.star.GraphicObject:" );
             sal_Int32 nIndex = aGraphicUrl.indexOf( aVndUrl, 0 );
-            if ( nIndex != STRING_NOTFOUND )
+            if ( nIndex != -1 )
             {
                 nIndex = nIndex + aVndUrl.getLength();
                 if ( aGraphicUrl.getLength() > nIndex  )

-- 
To view, visit https://gerrit.libreoffice.org/3115
To unsubscribe, visit https://gerrit.libreoffice.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2fed196572a0a5f5b006d1d653968729d6d75583
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: Christina Roßmanith <ChrRossmanith at web.de>



More information about the LibreOffice mailing list