else
{
throw new IOException( "Uknown field type:" + fieldValue.getClass().getName() );
}
}
COSInteger ff = (COSInteger)fdfField.getDictionaryObject( COSName.getPDFName( "Ff" ) );
if( ff != null )
{
setFlags( (int)ff.intValue() );
}
else
{
//these are suppose to be ignored if the Ff is set.
COSInteger setFf = (COSInteger)fdfField.getDictionaryObject( COSName.getPDFName( "SetFf" ) );
if( setFf != null )
{
int setFfInt = (int)setFf.intValue();
docFlags = docFlags | setFfInt;
setFlags( docFlags );
}
COSInteger clrFf = (COSInteger)fdfField.getDictionaryObject( COSName.getPDFName( "ClrFf" ) );
if( clrFf != null )
{
//we have to clear the bits of the document fields for every bit that is
//set in this field.
//
//Example:
//docFf = 1011
//clrFf = 1101
//clrFfValue = 0010;
//newValue = 1011 & 0010 which is 0010
int clrFfValue = (int)clrFf.intValue();
clrFfValue ^= 0xFFFFFFFF;
docFlags = docFlags & clrFfValue;
setFlags( docFlags );
}
}
COSInteger f = (COSInteger)fdfField.getDictionaryObject( COSName.getPDFName( "F" ) );
if( f != null )
{
setAnnotationFlags( (int)f.intValue() );
}
else
{
//these are suppose to be ignored if the F is set.
COSInteger setF = (COSInteger)fdfField.getDictionaryObject( COSName.getPDFName( "SetF" ) );
if( setF != null )
{
annotFlags = annotFlags | (int)setF.intValue();
setAnnotationFlags( annotFlags );
}
COSInteger clrF = (COSInteger)fdfField.getDictionaryObject( COSName.getPDFName( "ClrF" ) );
if( clrF != null )
{
//we have to clear the bits of the document fields for every bit that is
//set in this field.
//
//Example:
//docF = 1011
//clrF = 1101
//clrFValue = 0010;
//newValue = 1011 & 0010 which is 0010
int clrFValue = (int)clrF.intValue();
clrFValue ^= 0xFFFFFFFFL;
annotFlags = annotFlags & clrFValue;
setAnnotationFlags( annotFlags );
}
}