From 7934ac9e3da16cdfa3e6ed481acaa3bdbc6dbfed Mon Sep 17 00:00:00 2001 From: Michael Vrhel Date: Tue, 4 Jun 2013 11:55:51 -0700 Subject: 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. --- fitz/doc_document.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'fitz') 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); -- cgit v1.2.3