diff options
author | Nelson Benítez León <nbenitezl@gmail.com> | 2022-04-23 18:14:37 -0400 |
---|---|---|
committer | Nelson Benítez León <nbenitezl@gmail.com> | 2022-04-26 20:24:38 -0400 |
commit | 8ce9069f5dff8636373c546f33495908a963777e (patch) | |
tree | 3594472ccb5a4e6225d70b22c2adf95f1ce2f43a /poppler/TextOutputDev.cc | |
parent | 309004931712476b0ee751fc60224a87c14daf56 (diff) |
fix multiline find_text() bug in two column docs
Fix for a bug in double column documents where some
single line matches are wrongly returned as being
multiline matches.
Includes test case for the bug.
Diffstat (limited to 'poppler/TextOutputDev.cc')
-rw-r--r-- | poppler/TextOutputDev.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/poppler/TextOutputDev.cc b/poppler/TextOutputDev.cc index 23e0a7ae..4a37b29f 100644 --- a/poppler/TextOutputDev.cc +++ b/poppler/TextOutputDev.cc @@ -4146,6 +4146,12 @@ bool TextPage::findText(const Unicode *s, int len, bool startAtTop, bool stopAtB continueMatch->x2 = xMax2; continueMatch->y2 = yMin2; } + } else if (continueMatch && continueMatch->x1 != std::numeric_limits<double>::max()) { + if (ignoredHyphen) { + *ignoredHyphen = false; + } + + continueMatch->x1 = std::numeric_limits<double>::max(); } } } |