Fix getText() for space after word
Resolves: RHEL-165202
This commit is contained in:
parent
c0853e3bf9
commit
58ed9ca440
27
poppler-21.01.0-space-after.patch
Normal file
27
poppler-21.01.0-space-after.patch
Normal file
@ -0,0 +1,27 @@
|
||||
From d6cccfb8d814d89c51c9e65563be2e475f46212b Mon Sep 17 00:00:00 2001
|
||||
From: Nelson Benítez León <nbenitezl@gmail.com>
|
||||
Date: Mon, 8 Feb 2021 14:06:15 -0400
|
||||
Subject: 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
|
||||
|
||||
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)
|
||||
@ -3,7 +3,7 @@
|
||||
Summary: PDF rendering library
|
||||
Name: poppler
|
||||
Version: 21.01.0
|
||||
Release: 24%{?dist}
|
||||
Release: 25%{?dist}
|
||||
License: (GPLv2 or GPLv3) and GPLv2+ and LGPLv2+ and MIT
|
||||
URL: http://poppler.freedesktop.org/
|
||||
Source0: http://poppler.freedesktop.org/poppler-%{version}.tar.xz
|
||||
@ -60,6 +60,9 @@ Patch15: poppler-21.01.0-check-bitmap-in-combine.patch
|
||||
# https://issues.redhat.com/browse/RHEL-126070
|
||||
Patch16: poppler-21.01.0-fix-pdfsig-man-page.patch
|
||||
|
||||
# https://issues.redhat.com/browse/RHEL-165202
|
||||
Patch17: poppler-21.01.0-space-after.patch
|
||||
|
||||
BuildRequires: make
|
||||
BuildRequires: cmake
|
||||
BuildRequires: gcc-c++
|
||||
@ -253,6 +256,10 @@ test "$(pkg-config --modversion poppler-qt5)" = "%{version}"
|
||||
%{_mandir}/man1/*
|
||||
|
||||
%changelog
|
||||
* Mon May 11 2026 Marek Kasik <mkasik@redhat.com> - 21.01.0-25
|
||||
- Fix getText() for space after word
|
||||
- Resolves: RHEL-165202
|
||||
|
||||
* Mon Dec 22 2025 Marek Kasik <mkasik@redhat.com> - 21.01.0-24
|
||||
- Fix pdfsig's man page
|
||||
- Resolves: RHEL-126070
|
||||
|
||||
Loading…
Reference in New Issue
Block a user