| @@ -1,13 +1,22 @@ | | | @@ -1,13 +1,22 @@ |
1 | $NetBSD: patch-ac,v 1.1 2011/02/12 10:00:08 tnn Exp $ | | 1 | $NetBSD: patch-ac,v 1.2 2011/02/12 14:18:35 drochner Exp $ |
2 | | | 2 | |
3 | --- src/PDFDocument.cxx.orig 2009-02-28 21:00:35.000000000 +0000 | | 3 | --- src/PDFDocument.cxx.orig 2009-02-28 21:00:35.000000000 +0000 |
4 | +++ src/PDFDocument.cxx | | 4 | +++ src/PDFDocument.cxx |
5 | @@ -686,7 +686,7 @@ PDFDocument::setTextSelection (DocumentR | | 5 | @@ -680,13 +680,13 @@ PDFDocument::setTextSelection (DocumentR |
| | | 6 | |
| | | 7 | //for get text we must exchange y coordinate, don't ask me where logic here. |
| | | 8 | PopplerRectangle textRect = { rect->getX1() / getZoom(), |
| | | 9 | - (pageHeight - rect->getY2() / getZoom()), |
| | | 10 | - rect->getX2() * getZoom() / getZoom(), |
| | | 11 | - (pageHeight - rect->getY1() / getZoom())}; |
| | | 12 | + rect->getY1() / getZoom(), |
| | | 13 | + rect->getX2() / getZoom(), |
| | | 14 | + rect->getY2() / getZoom()}; |
6 | repairEmpty(textRect); | | 15 | repairEmpty(textRect); |
7 | | | 16 | |
8 | #if defined (HAVE_POPPLER_0_6_0) | | 17 | #if defined (HAVE_POPPLER_0_6_0) |
9 | - gchar *text = poppler_page_get_text(page, POPPLER_SELECTION_GLYPH, | | 18 | - gchar *text = poppler_page_get_text(page, POPPLER_SELECTION_GLYPH, |
10 | + gchar *text = poppler_page_get_selected_text(page, POPPLER_SELECTION_GLYPH, | | 19 | + gchar *text = poppler_page_get_selected_text(page, POPPLER_SELECTION_GLYPH, |
11 | &textRect); | | 20 | &textRect); |
12 | #else // !HAVE_POPPLER_0_6_0 | | 21 | #else // !HAVE_POPPLER_0_6_0 |
13 | gchar *text = poppler_page_get_text(page, &textRect); | | 22 | gchar *text = poppler_page_get_text(page, &textRect); |