summaryrefslogtreecommitdiff
path: root/print/epdfview/patches/patch-ac
blob: 17401df1988dd96e1ec42d39eb746de5143b7427 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
$NetBSD: patch-ac,v 1.3 2011/04/18 17:10:23 drochner Exp $

--- src/PDFDocument.cxx.orig	2009-02-28 21:00:35.000000000 +0000
+++ src/PDFDocument.cxx
@@ -324,7 +324,7 @@ PDFDocument::loadMetadata (void)
     gchar *format = NULL;
     gchar *keywords = NULL;
     PopplerPageLayout layout = POPPLER_PAGE_LAYOUT_UNSET;
-    gchar *linearized = NULL;
+    gboolean linearized = 0;
     GTime modDate;
     PopplerPageMode mode = POPPLER_PAGE_MODE_UNSET;
     gchar *producer = NULL;
@@ -680,13 +680,13 @@ PDFDocument::setTextSelection (DocumentR
 
     //for get text we must exchange y coordinate, don't ask me where logic here.
     PopplerRectangle textRect = { rect->getX1() / getZoom(),
-                                  (pageHeight - rect->getY2() / getZoom()),
-                                  rect->getX2() * getZoom() / getZoom(),
-                                  (pageHeight - rect->getY1() / getZoom())};
+                                  rect->getY1() / getZoom(),
+                                  rect->getX2() / getZoom(),
+                                  rect->getY2() / getZoom()};
     repairEmpty(textRect);
 
 #if defined (HAVE_POPPLER_0_6_0)
-    gchar *text = poppler_page_get_text(page, POPPLER_SELECTION_GLYPH,
+    gchar *text = poppler_page_get_selected_text(page, POPPLER_SELECTION_GLYPH,
             &textRect);
 #else // !HAVE_POPPLER_0_6_0
     gchar *text = poppler_page_get_text(page, &textRect);