Bug 52569

Summary: [PATCH] DConRef (0x51) record implementation
Product: POI Reporter: Niklas Rehfeld <niklas.rehfeld>
Component: HSSFAssignee: POI Developers List <dev>
Status: RESOLVED FIXED    
Severity: normal    
Priority: P2    
Version: 3.8-dev   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Attachments: DConRefRecord and TestDConRefRecord classes
changes to RecordFactory, BiffViewer and AllRecordTests to use new classes

Description Niklas Rehfeld 2012-02-01 00:15:58 UTC
This patch contains an implementation of DConRef record (SID = 0x51), which holds data sources for PivotTables and other data consolidation. 

The patch contains two new files:
* DConRefRecord.java which extends StandardRecord and implements the DConRef structure 
* TestDConRefRecord.java which contains the unit tests for the new class.

Also there are very minor changes to the following files, so they make use of the new class: 
* RecordFactory.java 
* AllRecordTests.java 
* BiffViewer.java

The DConRef implementation does not support changing the record, as I wasn't confident that it wouldn't break anything else when you change it. 

The patch passes all existing unit tests as well as the new ones. 

The patch was created manually, as the patch.xml method kept missing out one of the changed files for some reason.

Please let me know of any problems with this patch, as this is my first time contributing to this project.
Comment 1 Niklas Rehfeld 2012-02-01 00:17:25 UTC
Created attachment 28244 [details]
DConRefRecord and TestDConRefRecord classes

The new classes that implement DConRefRecord and its associated unit tests.
Comment 2 Niklas Rehfeld 2012-02-01 00:19:30 UTC
Created attachment 28246 [details]
changes to RecordFactory, BiffViewer and AllRecordTests to use new classes

patch contains some small changes to RecordFactory.java (register SID 0x051 to create DConRefRecord) BiffViewer (same) and AllRecordTests (use TestDConRefRecord tests)
Comment 3 Yegor Kozlov 2012-02-07 09:01:25 UTC
Thanks for the patch, applied in r1241380

Regards,
Yegor