View | Details | Raw Unified | Return to bug 61749
Collapse All | Expand All

(-)src/java/org/apache/poi/hssf/model/LinkTable.java (-1 / +1 lines)
Lines 459-465 Link Here
459
459
460
    private static int getSheetIndex(String[] sheetNames, String sheetName) {
460
    private static int getSheetIndex(String[] sheetNames, String sheetName) {
461
        for (int i = 0; i < sheetNames.length; i++) {
461
        for (int i = 0; i < sheetNames.length; i++) {
462
            if (sheetNames[i].equals(sheetName)) {
462
            if (sheetNames[i].equalsIgnoreCase(sheetName)) {
463
                return i;
463
                return i;
464
            }
464
            }
465
465
(-)src/java/org/apache/poi/ss/formula/ptg/ExternSheetNameResolver.java (-2 / +2 lines)
Lines 45-51 Link Here
45
            }
45
            }
46
            if (externalSheet instanceof ExternalSheetRange) {
46
            if (externalSheet instanceof ExternalSheetRange) {
47
                ExternalSheetRange r = (ExternalSheetRange)externalSheet;
47
                ExternalSheetRange r = (ExternalSheetRange)externalSheet;
48
                if (! r.getFirstSheetName().equals(r.getLastSheetName())) {
48
                if (! r.getFirstSheetName().equalsIgnoreCase(r.getLastSheetName())) {
49
                    sb.append(':');
49
                    sb.append(':');
50
                    SheetNameFormatter.appendFormat(sb, r.getLastSheetName());
50
                    SheetNameFormatter.appendFormat(sb, r.getLastSheetName());
51
                }
51
                }
Lines 59-65 Link Here
59
                sb.append("#REF"); // note - '!' added just once below
59
                sb.append("#REF"); // note - '!' added just once below
60
            } else {
60
            } else {
61
                SheetNameFormatter.appendFormat(sb, firstSheetName);
61
                SheetNameFormatter.appendFormat(sb, firstSheetName);
62
                if (! firstSheetName.equals(lastSheetName)) {
62
                if (! firstSheetName.equalsIgnoreCase(lastSheetName)) {
63
                    sb.append(':');
63
                    sb.append(':');
64
                    sb.append(lastSheetName);
64
                    sb.append(lastSheetName);
65
                }
65
                }
(-)src/java/org/apache/poi/ss/util/CellReference.java (-2 / +2 lines)
Lines 560-566 Link Here
560
                && _isColAbs == cr._isColAbs
560
                && _isColAbs == cr._isColAbs
561
                && ((_sheetName == null)
561
                && ((_sheetName == null)
562
                        ? (cr._sheetName == null)
562
                        ? (cr._sheetName == null)
563
                        : _sheetName.equals(cr._sheetName));
563
                        : _sheetName.equalsIgnoreCase(cr._sheetName));
564
    }
564
    }
565
565
566
    @Override
566
    @Override
Lines 570-576 Link Here
570
        result = 31 * result + _colIndex;
570
        result = 31 * result + _colIndex;
571
        result = 31 * result + (_isRowAbs ? 1 : 0);
571
        result = 31 * result + (_isRowAbs ? 1 : 0);
572
        result = 31 * result + (_isColAbs ? 1 : 0);
572
        result = 31 * result + (_isColAbs ? 1 : 0);
573
        result = 31 * result + (_sheetName == null ? 0 : _sheetName.hashCode());
573
        result = 31 * result + (_sheetName == null ? 0 : _sheetName.toLowerCase(Locale.ROOT).hashCode());
574
        return result;
574
        return result;
575
    }
575
    }
576
}
576
}
(-)src/ooxml/java/org/apache/poi/xssf/usermodel/BaseXSSFEvaluationWorkbook.java (-1 / +1 lines)
Lines 308-314 Link Here
308
            workbookName = null;
308
            workbookName = null;
309
        }
309
        }
310
        
310
        
311
        if (lastSheetName == null || firstSheetName.equals(lastSheetName)) {
311
        if (lastSheetName == null || firstSheetName.equalsIgnoreCase(lastSheetName)) {
312
            return new ExternalSheet(workbookName, firstSheetName);
312
            return new ExternalSheet(workbookName, firstSheetName);
313
        } else {
313
        } else {
314
            return new ExternalSheetRange(workbookName, firstSheetName, lastSheetName);
314
            return new ExternalSheetRange(workbookName, firstSheetName, lastSheetName);
(-)src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFWorkbook.java (-2 / +2 lines)
Lines 857-863 Link Here
857
            String sheetName = XSSFRelation.WORKSHEET.getFileName(sheetNumber);
857
            String sheetName = XSSFRelation.WORKSHEET.getFileName(sheetNumber);
858
            for(POIXMLDocumentPart relation : getRelations()) {
858
            for(POIXMLDocumentPart relation : getRelations()) {
859
                if(relation.getPackagePart() != null && 
859
                if(relation.getPackagePart() != null && 
860
                        sheetName.equals(relation.getPackagePart().getPartName().getName())) {
860
                        sheetName.equalsIgnoreCase(relation.getPackagePart().getPartName().getName())) {
861
                    // name is taken => try next one
861
                    // name is taken => try next one
862
                    sheetNumber++;
862
                    sheetNumber++;
863
                    continue outerloop;
863
                    continue outerloop;
Lines 1595-1601 Link Here
1595
        WorkbookUtil.validateSheetName(sheetname);
1595
        WorkbookUtil.validateSheetName(sheetname);
1596
1596
1597
        // Do nothing if no change
1597
        // Do nothing if no change
1598
        if (sheetname.equals(oldSheetName)) {
1598
        if (sheetname.equalsIgnoreCase(oldSheetName)) {
1599
            return;
1599
            return;
1600
        }
1600
        }
1601
        
1601
        

Return to bug 61749