"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/form/PDCheckBox.java" between
pdfbox-2.0.23-src.zip and pdfbox-2.0.24-src.zip

About: Apache PDFBox is a Java PDF library tool that allows creation of new PDF documents, manipulation of existing documents and the ability to extract content from documents.

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

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)