You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by bu...@apache.org on 2008/11/21 18:58:55 UTC

DO NOT REPLY [Bug 46266] New: moveCell corrupts the row against further edits

https://issues.apache.org/bugzilla/show_bug.cgi?id=46266

           Summary: moveCell corrupts the row against further edits
           Product: POI
           Version: 3.2-FINAL
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: normal
          Priority: P2
         Component: HSSF
        AssignedTo: dev@poi.apache.org
        ReportedBy: brian@bazaarvoice.com


Created an attachment (id=22913)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=22913)
Example java class which domainstrates the bug.

There appears to be a bug in the way that Row.moveCell() is implemented.  After
moving cells, if you attempt to reuse an index that had previously been moved,
other data in the worksheet becomes corrupted.

I've attached a sample java program to demonstrate this.  The example does the
following steps:
 1. Create a worksheet with a single row
 2. Create 10 cells in indexes 0 to 9
 3. Move all of those cells one to the right so that
     a. Index 0 is blank
     b. Indexes 1 to 10 are not populated
 4. Create a new cell at index 0
 5. Write out the results to disk.

The resulting file has a problem at index 1.  The file which results is blank
at index 1.

I've reproduced this in both 3.2 and 3.5-beta3


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


DO NOT REPLY [Bug 46266] moveCell corrupts the row against further edits

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=46266





--- Comment #1 from Joe Pollard <jo...@gmail.com>  2009-06-23 13:42:54 PST ---
Created an attachment (id=23862)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=23862)
A patch to address this behavior

I was able to address this bug, and get the OP's test case to work with this
patch.

Thanks!
-Joe

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


DO NOT REPLY [Bug 46266] moveCell corrupts the row against further edits

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=46266


Kent Martin <ke...@texashealth.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |kentmartin@texashealth.org




-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


DO NOT REPLY [Bug 46266] moveCell corrupts the row against further edits

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=46266





--- Comment #2 from Kent Martin <ke...@texashealth.org>  2009-07-17 14:47:10 PST ---
Joe's patch does indeed work.  However, formulas are not updated.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org