Bug 56549 - [PATCH] Cell missings from table
Summary: [PATCH] Cell missings from table
Alias: None
Product: POI
Classification: Unclassified
Component: HWPF (show other bugs)
Version: unspecified
Hardware: PC All
: P2 regression (vote)
Target Milestone: ---
Assignee: POI Developers List
Keywords: PatchAvailable
Depends on:
Reported: 2014-05-20 13:54 UTC by Jk
Modified: 2016-03-12 17:03 UTC (History)
0 users


Note You need to log in before you can comment on or make changes to this bug.
Description Jk 2014-05-20 13:54:56 UTC
in file apachePoi\src\scratchpad\src\org\apache\poi\hwpf\model\TextPieceTable.java

in next function 
    public int[][] getCharIndexRanges( int startBytePosInclusive,
            int endBytePosExclusive )
        List<int[]> result = new LinkedList<int[]>();
        for ( TextPiece textPiece : _textPiecesFCOrder )
            final int tpStart = textPiece.getPieceDescriptor()
            final int tpEnd = textPiece.getPieceDescriptor().getFilePosition()
                    + textPiece.bytesLength();
            if ( (startBytePosInclusive >= tpEnd) )

//HERE YOU HAVE ">" - it's wrong that's why sometimes the property "being end of row" have not the last cell, but second counting from end. Can send you example if i can see any react from you.
Comment 1 Dominik Stadler 2016-03-12 17:03:02 UTC
This is now applied via r1734718, thanks for the suggested fix.