diff options
author | Tor Andersson <tor.andersson@artifex.com> | 2017-11-07 11:51:40 +0100 |
---|---|---|
committer | Tor Andersson <tor.andersson@artifex.com> | 2017-11-08 17:57:09 +0100 |
commit | a0f531e2492bd6d19edab9ca2e9f19f2284b0796 (patch) | |
tree | 0f8fcd1ab547df519dff0302fe88fe90214a9bbb /source/fitz/stext-device.c | |
parent | 44397fc9cbc795ec5acabcc4da1b08608431313b (diff) | |
download | mupdf-a0f531e2492bd6d19edab9ca2e9f19f2284b0796.tar.xz |
Select and copy structured text by lines.
Diffstat (limited to 'source/fitz/stext-device.c')
-rw-r--r-- | source/fitz/stext-device.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/source/fitz/stext-device.c b/source/fitz/stext-device.c index cae3c583..cd657acc 100644 --- a/source/fitz/stext-device.c +++ b/source/fitz/stext-device.c @@ -643,14 +643,13 @@ fz_stext_close_device(fz_context *ctx, fz_device *dev) for (block = page->first_block; block; block = block->next) { - if (block->type == FZ_STEXT_BLOCK_TEXT) + if (block->type != FZ_STEXT_BLOCK_TEXT) + continue; + for (line = block->u.t.first_line; line; line = line->next) { - for (line = block->u.t.first_line; line; line = line->next) - { - for (ch = line->first_char; ch; ch = ch->next) - fz_union_rect(&line->bbox, &ch->bbox); - fz_union_rect(&block->bbox, &line->bbox); - } + for (ch = line->first_char; ch; ch = ch->next) + fz_union_rect(&line->bbox, &ch->bbox); + fz_union_rect(&block->bbox, &line->bbox); } } |