diff options
author | Nelson Benítez León <nbenitezl@gmail.com> | 2021-02-08 14:06:15 -0400 |
---|---|---|
committer | Albert Astals Cid <tsdgeos@yahoo.es> | 2021-02-14 11:02:41 +0000 |
commit | d6cccfb8d814d89c51c9e65563be2e475f46212b (patch) | |
tree | 1d7876f158200ad77358193785760257e13c0d9b | |
parent | e7fa274dd7c0bd5e66a3b68329d7d56541bb839b (diff) |
TextSelectionDumper: Fix getText() for space after word
Fix TextSelectionDumper::getText() (which is
currently only used by the glib frontend) to
not default to add a space after word in the
case the word is explicitly set to not carry
that space by means of the 'spaceAfter' TextWord
field.
Fixes issue #1042
-rw-r--r-- | poppler/TextOutputDev.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/poppler/TextOutputDev.cc b/poppler/TextOutputDev.cc index 451b4cb6..10a3b5f3 100644 --- a/poppler/TextOutputDev.cc +++ b/poppler/TextOutputDev.cc @@ -4420,7 +4420,7 @@ GooString *TextSelectionDumper::getText() TextWordSelection *sel = (*lineWords)[j]; page->dumpFragment(sel->word->text + sel->begin, sel->end - sel->begin, uMap, text); - if (j < lineWords->size() - 1) + if (j < lineWords->size() - 1 && sel->word->spaceAfter) text->append(space, spaceLen); } if (i < nLines - 1) |