[poppler] qt4/src qt5/src
Albert Astals Cid
aacid at kemper.freedesktop.org
Wed Mar 2 23:45:06 UTC 2016
qt4/src/poppler-link.cc | 32 +++++++++++++++++---------------
qt5/src/poppler-link.cc | 28 +++++++++++++++-------------
2 files changed, 32 insertions(+), 28 deletions(-)
New commits:
commit a80a036269eb18daf0ec69c23a8bc71fb4852acb
Author: Albert Astals Cid <aacid at kde.org>
Date: Thu Mar 3 00:44:27 2016 +0100
Qt: Only check the link page for local links
diff --git a/qt4/src/poppler-link.cc b/qt4/src/poppler-link.cc
index 199e2db..b810c55 100644
--- a/qt4/src/poppler-link.cc
+++ b/qt4/src/poppler-link.cc
@@ -1,5 +1,5 @@
/* poppler-link.cc: qt interface to poppler
- * Copyright (C) 2006-2007, Albert Astals Cid
+ * Copyright (C) 2006-2007, 2016, Albert Astals Cid
* Copyright (C) 2007-2008, Pino Toscano <pino at kde.org>
* Copyright (C) 2010 Hib Eris <hib at hiberis.nl>
* Copyright (C) 2012, Tobias Koenig <tokoe at kdab.com>
@@ -289,21 +289,23 @@ class LinkMoviePrivate : public LinkPrivate
d->changeZoom = ld->getChangeZoom();
int leftAux = 0, topAux = 0, rightAux = 0, bottomAux = 0;
-
- ::Page *page;
- if (d->pageNum > 0 &&
- d->pageNum <= data.doc->doc->getNumPages() &&
- (page = data.doc->doc->getPage( d->pageNum )))
- {
- cvtUserToDev( page, left, top, &leftAux, &topAux );
- cvtUserToDev( page, right, bottom, &rightAux, &bottomAux );
-
- d->left = leftAux / (double)page->getCropWidth();
- d->top = topAux / (double)page->getCropHeight();
- d->right = rightAux/ (double)page->getCropWidth();
- d->bottom = bottomAux / (double)page->getCropHeight();
+
+ if (!data.externalDest) {
+ ::Page *page;
+ if (d->pageNum > 0 &&
+ d->pageNum <= data.doc->doc->getNumPages() &&
+ (page = data.doc->doc->getPage( d->pageNum )))
+ {
+ cvtUserToDev( page, left, top, &leftAux, &topAux );
+ cvtUserToDev( page, right, bottom, &rightAux, &bottomAux );
+
+ d->left = leftAux / (double)page->getCropWidth();
+ d->top = topAux / (double)page->getCropHeight();
+ d->right = rightAux/ (double)page->getCropWidth();
+ d->bottom = bottomAux / (double)page->getCropHeight();
+ }
+ else d->pageNum = 0;
}
- else d->pageNum = 0;
if (deleteDest) delete ld;
}
diff --git a/qt5/src/poppler-link.cc b/qt5/src/poppler-link.cc
index ca6e6eb..2da5aee 100644
--- a/qt5/src/poppler-link.cc
+++ b/qt5/src/poppler-link.cc
@@ -290,20 +290,22 @@ class LinkMoviePrivate : public LinkPrivate
int leftAux = 0, topAux = 0, rightAux = 0, bottomAux = 0;
- ::Page *page;
- if (d->pageNum > 0 &&
- d->pageNum <= data.doc->doc->getNumPages() &&
- (page = data.doc->doc->getPage( d->pageNum )))
- {
- cvtUserToDev( page, left, top, &leftAux, &topAux );
- cvtUserToDev( page, right, bottom, &rightAux, &bottomAux );
-
- d->left = leftAux / (double)page->getCropWidth();
- d->top = topAux / (double)page->getCropHeight();
- d->right = rightAux/ (double)page->getCropWidth();
- d->bottom = bottomAux / (double)page->getCropHeight();
+ if (!data.externalDest) {
+ ::Page *page;
+ if (d->pageNum > 0 &&
+ d->pageNum <= data.doc->doc->getNumPages() &&
+ (page = data.doc->doc->getPage( d->pageNum )))
+ {
+ cvtUserToDev( page, left, top, &leftAux, &topAux );
+ cvtUserToDev( page, right, bottom, &rightAux, &bottomAux );
+
+ d->left = leftAux / (double)page->getCropWidth();
+ d->top = topAux / (double)page->getCropHeight();
+ d->right = rightAux/ (double)page->getCropWidth();
+ d->bottom = bottomAux / (double)page->getCropHeight();
+ }
+ else d->pageNum = 0;
}
- else d->pageNum = 0;
if (deleteDest) delete ld;
}
More information about the poppler
mailing list