diff options
author | Michael Vrhel <michael.vrhel@artifex.com> | 2013-06-04 11:55:51 -0700 |
---|---|---|
committer | Robin Watts <robin.watts@artifex.com> | 2013-06-05 13:16:44 +0100 |
commit | 7934ac9e3da16cdfa3e6ed481acaa3bdbc6dbfed (patch) | |
tree | 1c0702d68024337b477baf2ed4d3aa7cf9dcc5da /fitz | |
parent | 9ea054c75c09165cb9f17fe810a19d0ed55e6d68 (diff) | |
download | mupdf-7934ac9e3da16cdfa3e6ed481acaa3bdbc6dbfed.tar.xz |
Change in doc_document.c to account for oxps type. Also error catching when file fails to open.
Removal of null checks for object freeing in interface to mupdf.
Diffstat (limited to 'fitz')
-rw-r--r-- | fitz/doc_document.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fitz/doc_document.c b/fitz/doc_document.c index a23aef27..af70ddbc 100644 --- a/fitz/doc_document.c +++ b/fitz/doc_document.c @@ -38,7 +38,7 @@ fz_open_document_with_stream(fz_context *ctx, const char *magic, fz_stream *stre if (ext) { - if (!fz_strcasecmp(ext, ".xps") || !fz_strcasecmp(ext, ".rels")) + if (!fz_strcasecmp(ext, ".xps") || !fz_strcasecmp(ext, ".rels") || !fz_strcasecmp(ext, ".oxps")) return (fz_document*) xps_open_document_with_stream(ctx, stream); if (!fz_strcasecmp(ext, ".cbz") || !fz_strcasecmp(ext, ".zip")) return (fz_document*) cbz_open_document_with_stream(ctx, stream); @@ -53,7 +53,7 @@ fz_open_document_with_stream(fz_context *ctx, const char *magic, fz_stream *stre if (!strcmp(magic, "cbz") || !strcmp(magic, "application/x-cbz")) return (fz_document*) cbz_open_document_with_stream(ctx, stream); - if (!strcmp(magic, "xps") || !strcmp(magic, "application/vnd.ms-xpsdocument")) + if (!strcmp(magic, "xps") || !strcmp(magic, "oxps") || !strcmp(magic, "application/vnd.ms-xpsdocument")) return (fz_document*) xps_open_document_with_stream(ctx, stream); if (!strcmp(magic, "pdf") || !strcmp(magic, "application/pdf")) return (fz_document*) pdf_open_document_with_stream(ctx, stream); |