<changes>
<release version="3.7-SNAPSHOT" date="2010-??-??">
+ <action dev="POI-DEVELOPERS" type="fix">44916 - Allow access to the HSSFPatriarch from HSSFSheet once created</action>
<action dev="POI-DEVELOPERS" type="add">48779 - Allow you to get straight from a CellStyle to a Color, irrespective of if the Color is indexed or inline-defined</action>
<action dev="POI-DEVELOPERS" type="add">48924 - Allow access of the HWPF DateAndTime underlying date values</action>
<action dev="POI-DEVELOPERS" type="add">48926 - Initial support for the HWPF revision marks authors list</action>
private final TreeMap<Integer, HSSFRow> _rows;
protected final InternalWorkbook _book;
protected final HSSFWorkbook _workbook;
+ private HSSFPatriarch _patriarch;
private int _firstrow;
private int _lastrow;
_sheet.aggregateDrawingRecords(_book.getDrawingManager(), true);
EscherAggregate agg = (EscherAggregate) _sheet.findFirstRecordBySid(EscherAggregate.sid);
- HSSFPatriarch patriarch = new HSSFPatriarch(this, agg);
+ _patriarch = new HSSFPatriarch(this, agg);
agg.clear(); // Initially the behaviour will be to clear out any existing shapes in the sheet when
// creating a new patriarch.
- agg.setPatriarch(patriarch);
- return patriarch;
+ agg.setPatriarch(_patriarch);
+ return _patriarch;
}
/**
* start from scratch!
*/
public HSSFPatriarch getDrawingPatriarch() {
+ if(_patriarch != null) return _patriarch;
+
EscherAggregate agg = getDrawingEscherAggregate();
if(agg == null) return null;
- HSSFPatriarch patriarch = new HSSFPatriarch(this, agg);
- agg.setPatriarch(patriarch);
+ _patriarch = new HSSFPatriarch(this, agg);
+ agg.setPatriarch(_patriarch);
// Have it process the records into high level objects
// as best it can do (this step may eat anything
agg.convertRecordsToUserModel();
// Return what we could cope with
- return patriarch;
+ return _patriarch;
}
/**