Issue 121976

Summary: Inconsistent use of STRING_NOTFOUND with indexOf
Product: Writer Reporter: Pedro Giffuni <pfg>
Component: codeAssignee: AOO issues mailing list <issues>
Status: CONFIRMED --- QA Contact:
Severity: Minor    
Priority: P3 CC: issues
Version: 3.4.1   
Target Milestone: ---   
Hardware: All   
OS: All   
Issue Type: DEFECT Latest Confirmation in: ---
Developer Difficulty: ---

Description Pedro Giffuni 2013-03-29 17:42:53 UTC
The issue was found in LibreOffice by Christina Rossmanith:

IndexOf doesn't return STRING_NOTFOUND as a value.
Opengroking the filter code it seems like

main/filter/source/msfilter/escherex.cxx : lines 1393 and 1604

is trying to compare against STRING_NOTFOUND after calling IndexOf.

Replacing STRING_NOTFOUND with (-1) would be more appropriate in this case.