PDCheckBox.java (pdfbox-2.0.23-src) | : | PDCheckBox.java (pdfbox-2.0.24-src) | ||
---|---|---|---|---|
skipping to change at line 105 | skipping to change at line 105 | |||
* 'Off' is the default</p> | * 'Off' is the default</p> | |||
* | * | |||
* @return the value setting the check box to the On state. | * @return the value setting the check box to the On state. | |||
* If an empty string is returned there is no appearance definition . | * If an empty string is returned there is no appearance definition . | |||
*/ | */ | |||
public String getOnValue() | public String getOnValue() | |||
{ | { | |||
PDAnnotationWidget widget = this.getWidgets().get(0); | PDAnnotationWidget widget = this.getWidgets().get(0); | |||
PDAppearanceDictionary apDictionary = widget.getAppearance(); | PDAppearanceDictionary apDictionary = widget.getAppearance(); | |||
String onValue = ""; | ||||
if (apDictionary != null) | if (apDictionary != null) | |||
{ | { | |||
PDAppearanceEntry normalAppearance = apDictionary.getNormalAppearanc e(); | PDAppearanceEntry normalAppearance = apDictionary.getNormalAppearanc e(); | |||
if (normalAppearance != null) | if (normalAppearance != null) | |||
{ | { | |||
Set<COSName> entries = normalAppearance.getSubDictionary().keySe t(); | Set<COSName> entries = normalAppearance.getSubDictionary().keySe t(); | |||
for (COSName entry : entries) | for (COSName entry : entries) | |||
{ | { | |||
if (COSName.Off.compareTo(entry) != 0) | if (COSName.Off.compareTo(entry) != 0) | |||
{ | { | |||
onValue = entry.getName(); | return entry.getName(); | |||
} | } | |||
} | } | |||
} | } | |||
} | } | |||
return onValue; | return ""; | |||
} | } | |||
} | } | |||
End of changes. 3 change blocks. | ||||
3 lines changed or deleted | 2 lines changed or added |