summaryrefslogtreecommitdiff
path: root/testing/resources/calculate.pdf
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2018-02-26 18:19:14 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-02-26 18:19:14 +0000
commit9141116074f9209f617d9607e747c8947c952c46 (patch)
tree357fd20af9fac3fee0c8bd1dc76f58bb51acdbae /testing/resources/calculate.pdf
parent1dbea185e70973739d58b11b0e46bd361d6cf0d5 (diff)
downloadpdfium-9141116074f9209f617d9607e747c8947c952c46.tar.xz
Fixup AFSimple_Calculate indexing bug
The refactoring in [1] introduced a bug where we pulled the wrong array index to get the array of fields to use in the AFSimple_Calculate method. This caused the calculation to not be performed as the fields could not be found. This CL fixes up the index and adds a test to verify we use AFSimple_Calucate to sum two fields. 1- https://pdfium-review.googlesource.com/c/pdfium/+/16670 Bug: chromium:811913 Change-Id: I2abb9fe4fe2d6969ce1876736faadf252ef90575 Reviewed-on: https://pdfium-review.googlesource.com/27670 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Diffstat (limited to 'testing/resources/calculate.pdf')
-rw-r--r--testing/resources/calculate.pdf127
1 files changed, 127 insertions, 0 deletions
diff --git a/testing/resources/calculate.pdf b/testing/resources/calculate.pdf
new file mode 100644
index 0000000000..8b2b9441d7
--- /dev/null
+++ b/testing/resources/calculate.pdf
@@ -0,0 +1,127 @@
+%PDF-1.7
+% ò¤ô
+1 0 obj <<
+ /AcroForm 11 0 R
+ /Pages 5 0 R
+ /Type /Catalog
+>>
+endobj
+
+11 0 obj <<
+ /Fields [57 0 R 61 0 R]
+>>
+endobj
+
+5 0 obj <<
+ /Count 1
+ /Type /Pages
+ /Kids [12 0 R]
+>>
+endobj
+
+12 0 obj <<
+ /CropBox [0.0 0.0 720.0 540.0]
+ /Annots [57 0 R 61 0 R]
+ /Parent 5 0 R
+ /MediaBox[0.0 0.0 720.0 540.0]
+ /TrimBox[0.0 0.0 720.0 540.0]
+ /Type /Page
+>>
+endobj
+
+57 0 obj <<
+ /Rect [142.13 307.409 208.842 331.442]
+ /Subtype /Widget
+ /F 4
+ /P 12 0 R
+ /Q 2
+ /T (Calc1_A)
+ /V (5)
+ /DV (5)
+ /FT /Tx
+ /Type /Annot
+>>
+endobj
+
+61 0 obj <<
+ /Rect [290.306 307.409 357.793 331.442]
+ /Subtype /Widget
+ /F 4
+ /P 12 0 R
+ /Q 2
+ /T (Calc1_B)
+ /V (2)
+ /DV (2)
+ /FT /Tx
+ /Type /Annot
+>>
+endobj
+
+xref
+0 62
+0000000000 65535 f
+0000000015 00000 n
+0000000000 65535 f
+0000000000 65535 f
+0000000000 65535 f
+0000000137 00000 n
+0000000000 65535 f
+0000000000 65535 f
+0000000000 65535 f
+0000000000 65535 f
+0000000000 65535 f
+0000000088 00000 n
+0000000202 00000 n
+0000000000 65535 f
+0000000000 65535 f
+0000000000 65535 f
+0000000000 65535 f
+0000000000 65535 f
+0000000000 65535 f
+0000000000 65535 f
+0000000000 65535 f
+0000000000 65535 f
+0000000000 65535 f
+0000000000 65535 f
+0000000000 65535 f
+0000000000 65535 f
+0000000000 65535 f
+0000000000 65535 f
+0000000000 65535 f
+0000000000 65535 f
+0000000000 65535 f
+0000000000 65535 f
+0000000000 65535 f
+0000000000 65535 f
+0000000000 65535 f
+0000000000 65535 f
+0000000000 65535 f
+0000000000 65535 f
+0000000000 65535 f
+0000000000 65535 f
+0000000000 65535 f
+0000000000 65535 f
+0000000000 65535 f
+0000000000 65535 f
+0000000000 65535 f
+0000000000 65535 f
+0000000000 65535 f
+0000000000 65535 f
+0000000000 65535 f
+0000000000 65535 f
+0000000000 65535 f
+0000000000 65535 f
+0000000000 65535 f
+0000000000 65535 f
+0000000000 65535 f
+0000000000 65535 f
+0000000000 65535 f
+0000000379 00000 n
+0000000000 65535 f
+0000000000 65535 f
+0000000000 65535 f
+0000000547 00000 n
+trailer<< /Root 1 0 R /Size 62 >>
+startxref
+716
+%%EOF