summaryrefslogtreecommitdiff
path: root/xps
diff options
context:
space:
mode:
authorTor Andersson <tor.andersson@artifex.com>2012-01-12 02:07:36 +0100
committerTor Andersson <tor.andersson@artifex.com>2012-01-12 02:07:36 +0100
commit8d4b3276bef40e712382794c8724398d90f116fb (patch)
tree8f8e85119fdfa58bbe50b6121b9e8570fc0a10fb /xps
parent413ec18a295a1fb140c18c2cf7a275d7f2ff9735 (diff)
downloadmupdf-8d4b3276bef40e712382794c8724398d90f116fb.tar.xz
Check the abort cookie in XPS.
Diffstat (limited to 'xps')
-rw-r--r--xps/xps_common.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/xps/xps_common.c b/xps/xps_common.c
index 745d1be1..32ea3fdc 100644
--- a/xps/xps_common.c
+++ b/xps/xps_common.c
@@ -12,6 +12,8 @@ static inline int unhex(int a)
void
xps_parse_brush(xps_document *doc, fz_matrix ctm, fz_rect area, char *base_uri, xps_resource *dict, xml_element *node)
{
+ if (doc->cookie && doc->cookie->abort)
+ return;
/* SolidColorBrushes are handled in a special case and will never show up here */
if (!strcmp(xml_tag(node), "ImageBrush"))
xps_parse_image_brush(doc, ctm, area, base_uri, dict, node);
@@ -28,6 +30,8 @@ xps_parse_brush(xps_document *doc, fz_matrix ctm, fz_rect area, char *base_uri,
void
xps_parse_element(xps_document *doc, fz_matrix ctm, fz_rect area, char *base_uri, xps_resource *dict, xml_element *node)
{
+ if (doc->cookie && doc->cookie->abort)
+ return;
if (!strcmp(xml_tag(node), "Path"))
xps_parse_path(doc, ctm, base_uri, dict, node);
if (!strcmp(xml_tag(node), "Glyphs"))