mirror of https://github.com/apache/poi.git
add LINK_TYPE_SECONDARY_CATEGORIES, which appears to be a valid type (0x03) based on HSSFChart.insertData
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1738762 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
6e22add129
commit
4ae65e6253
|
@ -40,6 +40,7 @@ public final class LinkedDataRecord extends StandardRecord implements Cloneable
|
|||
public final static byte LINK_TYPE_TITLE_OR_TEXT = 0;
|
||||
public final static byte LINK_TYPE_VALUES = 1;
|
||||
public final static byte LINK_TYPE_CATEGORIES = 2;
|
||||
public final static byte LINK_TYPE_SECONDARY_CATEGORIES = 3;
|
||||
private byte field_2_referenceType;
|
||||
public final static byte REFERENCE_TYPE_DEFAULT_CATEGORIES = 0;
|
||||
public final static byte REFERENCE_TYPE_DIRECT = 1;
|
||||
|
@ -121,9 +122,10 @@ public final class LinkedDataRecord extends StandardRecord implements Cloneable
|
|||
* Get the link type field for the LinkedData record.
|
||||
*
|
||||
* @return One of
|
||||
* LINK_TYPE_TITLE_OR_TEXT
|
||||
* LINK_TYPE_VALUES
|
||||
* LINK_TYPE_CATEGORIES
|
||||
* {@link #LINK_TYPE_TITLE_OR_TEXT},
|
||||
* {@link #LINK_TYPE_VALUES},
|
||||
* {@link #LINK_TYPE_CATEGORIES}, or
|
||||
* {@link #LINK_TYPE_SECONDARY_CATEGORIES}
|
||||
*/
|
||||
public byte getLinkType()
|
||||
{
|
||||
|
@ -135,9 +137,10 @@ public final class LinkedDataRecord extends StandardRecord implements Cloneable
|
|||
*
|
||||
* @param field_1_linkType
|
||||
* One of
|
||||
* LINK_TYPE_TITLE_OR_TEXT
|
||||
* LINK_TYPE_VALUES
|
||||
* LINK_TYPE_CATEGORIES
|
||||
* {@link #LINK_TYPE_TITLE_OR_TEXT},
|
||||
* {@link #LINK_TYPE_VALUES},
|
||||
* {@link #LINK_TYPE_CATEGORIES}, or
|
||||
* {@link #LINK_TYPE_SECONDARY_CATEGORIES}
|
||||
*/
|
||||
public void setLinkType(byte field_1_linkType)
|
||||
{
|
||||
|
@ -148,11 +151,11 @@ public final class LinkedDataRecord extends StandardRecord implements Cloneable
|
|||
* Get the reference type field for the LinkedData record.
|
||||
*
|
||||
* @return One of
|
||||
* REFERENCE_TYPE_DEFAULT_CATEGORIES
|
||||
* REFERENCE_TYPE_DIRECT
|
||||
* REFERENCE_TYPE_WORKSHEET
|
||||
* REFERENCE_TYPE_NOT_USED
|
||||
* REFERENCE_TYPE_ERROR_REPORTED
|
||||
* {@link #REFERENCE_TYPE_DEFAULT_CATEGORIES}
|
||||
* {@link #REFERENCE_TYPE_DIRECT}
|
||||
* {@link #REFERENCE_TYPE_WORKSHEET}
|
||||
* {@link #REFERENCE_TYPE_NOT_USED}
|
||||
* {@link #REFERENCE_TYPE_ERROR_REPORTED}
|
||||
*/
|
||||
public byte getReferenceType()
|
||||
{
|
||||
|
@ -164,11 +167,11 @@ public final class LinkedDataRecord extends StandardRecord implements Cloneable
|
|||
*
|
||||
* @param field_2_referenceType
|
||||
* One of
|
||||
* REFERENCE_TYPE_DEFAULT_CATEGORIES
|
||||
* REFERENCE_TYPE_DIRECT
|
||||
* REFERENCE_TYPE_WORKSHEET
|
||||
* REFERENCE_TYPE_NOT_USED
|
||||
* REFERENCE_TYPE_ERROR_REPORTED
|
||||
* {@link #REFERENCE_TYPE_DEFAULT_CATEGORIES}
|
||||
* {@link #REFERENCE_TYPE_DIRECT}
|
||||
* {@link #REFERENCE_TYPE_WORKSHEET}
|
||||
* {@link #REFERENCE_TYPE_NOT_USED}
|
||||
* {@link #REFERENCE_TYPE_ERROR_REPORTED}
|
||||
*/
|
||||
public void setReferenceType(byte field_2_referenceType)
|
||||
{
|
||||
|
|
|
@ -1005,14 +1005,21 @@ public final class HSSFChart {
|
|||
|
||||
/* package */ void insertData(LinkedDataRecord data){
|
||||
switch(data.getLinkType()){
|
||||
case 0: dataName = data;
|
||||
break;
|
||||
case 1: dataValues = data;
|
||||
break;
|
||||
case 2: dataCategoryLabels = data;
|
||||
break;
|
||||
case 3: dataSecondaryCategoryLabels = data;
|
||||
break;
|
||||
|
||||
case LinkedDataRecord.LINK_TYPE_TITLE_OR_TEXT:
|
||||
dataName = data;
|
||||
break;
|
||||
case LinkedDataRecord.LINK_TYPE_VALUES:
|
||||
dataValues = data;
|
||||
break;
|
||||
case LinkedDataRecord.LINK_TYPE_CATEGORIES:
|
||||
dataCategoryLabels = data;
|
||||
break;
|
||||
case LinkedDataRecord.LINK_TYPE_SECONDARY_CATEGORIES:
|
||||
dataSecondaryCategoryLabels = data;
|
||||
break;
|
||||
default:
|
||||
throw new IllegalStateException("Invalid link type: " + data.getLinkType());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue