Merge pull request #17003 from Snuffleupagus/issue-17000
Restore the `collectFields` parameter in the Annotation code (issue 17000)
This commit is contained in:
		
						commit
						988222d7de
					
				@ -127,6 +127,7 @@ class AnnotationFactory {
 | 
				
			|||||||
      ref,
 | 
					      ref,
 | 
				
			||||||
      annotationGlobals,
 | 
					      annotationGlobals,
 | 
				
			||||||
      idFactory,
 | 
					      idFactory,
 | 
				
			||||||
 | 
					      collectFields,
 | 
				
			||||||
      pageIndex,
 | 
					      pageIndex,
 | 
				
			||||||
      pageRef,
 | 
					      pageRef,
 | 
				
			||||||
    ]);
 | 
					    ]);
 | 
				
			||||||
@ -140,6 +141,7 @@ class AnnotationFactory {
 | 
				
			|||||||
    ref,
 | 
					    ref,
 | 
				
			||||||
    annotationGlobals,
 | 
					    annotationGlobals,
 | 
				
			||||||
    idFactory,
 | 
					    idFactory,
 | 
				
			||||||
 | 
					    collectFields = false,
 | 
				
			||||||
    pageIndex = null,
 | 
					    pageIndex = null,
 | 
				
			||||||
    pageRef = null
 | 
					    pageRef = null
 | 
				
			||||||
  ) {
 | 
					  ) {
 | 
				
			||||||
@ -164,8 +166,9 @@ class AnnotationFactory {
 | 
				
			|||||||
      subtype,
 | 
					      subtype,
 | 
				
			||||||
      id,
 | 
					      id,
 | 
				
			||||||
      annotationGlobals,
 | 
					      annotationGlobals,
 | 
				
			||||||
 | 
					      collectFields,
 | 
				
			||||||
      needAppearances:
 | 
					      needAppearances:
 | 
				
			||||||
        pageIndex === null && acroForm.get("NeedAppearances") === true,
 | 
					        !collectFields && acroForm.get("NeedAppearances") === true,
 | 
				
			||||||
      pageIndex,
 | 
					      pageIndex,
 | 
				
			||||||
      evaluatorOptions: pdfManager.evaluatorOptions,
 | 
					      evaluatorOptions: pdfManager.evaluatorOptions,
 | 
				
			||||||
      pageRef,
 | 
					      pageRef,
 | 
				
			||||||
@ -244,7 +247,7 @@ class AnnotationFactory {
 | 
				
			|||||||
        return new FileAttachmentAnnotation(parameters);
 | 
					        return new FileAttachmentAnnotation(parameters);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      default:
 | 
					      default:
 | 
				
			||||||
        if (pageIndex === null) {
 | 
					        if (!collectFields) {
 | 
				
			||||||
          if (!subtype) {
 | 
					          if (!subtype) {
 | 
				
			||||||
            warn("Annotation is missing the required /Subtype.");
 | 
					            warn("Annotation is missing the required /Subtype.");
 | 
				
			||||||
          } else {
 | 
					          } else {
 | 
				
			||||||
@ -647,7 +650,7 @@ class Annotation {
 | 
				
			|||||||
      noHTML: isLocked && isContentLocked,
 | 
					      noHTML: isLocked && isContentLocked,
 | 
				
			||||||
    };
 | 
					    };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if (params.pageIndex !== null) {
 | 
					    if (params.collectFields) {
 | 
				
			||||||
      // Fields can act as container for other fields and have
 | 
					      // Fields can act as container for other fields and have
 | 
				
			||||||
      // some actions even if no Annotation inherit from them.
 | 
					      // some actions even if no Annotation inherit from them.
 | 
				
			||||||
      // Those fields can be referenced by CO (calculation order).
 | 
					      // Those fields can be referenced by CO (calculation order).
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user