[poppler] Branch 'poppler-0.22' - glib/poppler-page.cc
Carlos Garcia Campos
carlosgc at kemper.freedesktop.org
Sun Mar 24 04:58:55 PDT 2013
glib/poppler-page.cc | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
New commits:
commit 75378557f409a5a2305ea0fb42c56184c74ba887
Author: Carlos Garcia Campos <carlosgc at gnome.org>
Date: Sun Mar 24 12:53:29 2013 +0100
glib: Always start from the beginning when starting a new search on a page
And start from previous match when searching the next one on the same
page. This allows to search for the same string multiple times on the
same page.
https://bugs.freedesktop.org/show_bug.cgi?id=59972
diff --git a/glib/poppler-page.cc b/glib/poppler-page.cc
index b88c70b..631edb5 100644
--- a/glib/poppler-page.cc
+++ b/glib/poppler-page.cc
@@ -877,6 +877,7 @@ poppler_page_find_text_with_options (PopplerPage *page,
double height;
TextPage *text_dev;
gboolean backwards;
+ gboolean start_at_last = FALSE;
g_return_val_if_fail (POPPLER_IS_PAGE (page), NULL);
g_return_val_if_fail (text != NULL, NULL);
@@ -893,7 +894,8 @@ poppler_page_find_text_with_options (PopplerPage *page,
while (text_dev->findText (ucs4, ucs4_len,
gFalse, gTrue, // startAtTop, stopAtBottom
- gTrue, gFalse, // startAtLast, stopAtLast
+ start_at_last,
+ gFalse, //stopAtLast
options & POPPLER_FIND_CASE_SENSITIVE,
backwards,
options & POPPLER_FIND_WHOLE_WORDS_ONLY,
@@ -905,6 +907,7 @@ poppler_page_find_text_with_options (PopplerPage *page,
match->x2 = xMax;
match->y2 = height - yMin;
matches = g_list_prepend (matches, match);
+ start_at_last = TRUE;
}
g_free (ucs4);
More information about the poppler
mailing list