summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Andersson <tor.andersson@artifex.com>2017-03-03 17:43:55 +0100
committerTor Andersson <tor.andersson@artifex.com>2017-03-15 09:47:01 +0100
commit07ec723092058672698d068ec498581dd0bc9505 (patch)
tree5c95909dd784a1fc1fa0e5187c997fa55298de8e
parent1d267afe7b13af8835f3b2f4de44972282f96911 (diff)
downloadmupdf-07ec723092058672698d068ec498581dd0bc9505.tar.xz
Add PDF_ANNOT_UNKNOWN enum.
-rw-r--r--include/mupdf/pdf/annot.h3
-rw-r--r--platform/java/src/com/artifex/mupdf/fitz/PDFAnnotation.java1
-rw-r--r--source/pdf/pdf-annot-edit.c2
3 files changed, 4 insertions, 2 deletions
diff --git a/include/mupdf/pdf/annot.h b/include/mupdf/pdf/annot.h
index 49ae9246..f8806728 100644
--- a/include/mupdf/pdf/annot.h
+++ b/include/mupdf/pdf/annot.h
@@ -27,7 +27,8 @@ typedef enum
PDF_ANNOT_PRINTER_MARK,
PDF_ANNOT_TRAP_NET,
PDF_ANNOT_WATERMARK,
- PDF_ANNOT_3D
+ PDF_ANNOT_3D,
+ PDF_ANNOT_UNKNOWN = -1
} fz_annot_type;
const char *pdf_string_from_annot_type(fz_annot_type type);
diff --git a/platform/java/src/com/artifex/mupdf/fitz/PDFAnnotation.java b/platform/java/src/com/artifex/mupdf/fitz/PDFAnnotation.java
index 5f001a2c..0a74ece2 100644
--- a/platform/java/src/com/artifex/mupdf/fitz/PDFAnnotation.java
+++ b/platform/java/src/com/artifex/mupdf/fitz/PDFAnnotation.java
@@ -30,6 +30,7 @@ public class PDFAnnotation extends Annotation
public static final int TYPE_TRAP_NET = 22;
public static final int TYPE_WATERMARK = 23;
public static final int TYPE_3D = 24;
+ public static final int TYPE_UNKNOWN = -1;
public native int getType();
public native int getFlags();
diff --git a/source/pdf/pdf-annot-edit.c b/source/pdf/pdf-annot-edit.c
index fc6629c1..04ba658e 100644
--- a/source/pdf/pdf-annot-edit.c
+++ b/source/pdf/pdf-annot-edit.c
@@ -62,7 +62,7 @@ int pdf_annot_type_from_string(const char *subtype)
if (!strcmp("TrapNet", subtype)) return PDF_ANNOT_TRAP_NET;
if (!strcmp("Watermark", subtype)) return PDF_ANNOT_WATERMARK;
if (!strcmp("3D", subtype)) return PDF_ANNOT_3D;
- return -1;
+ return PDF_ANNOT_UNKNOWN;
}
pdf_annot *