[poppler] qt4/src
Pino Toscano
pino at kemper.freedesktop.org
Wed May 13 03:06:39 PDT 2009
qt4/src/poppler-link.cc | 10 ++++++++++
qt4/src/poppler-link.h | 7 +++++++
2 files changed, 17 insertions(+)
New commits:
commit fb0cb2add9443992f166acdf744fbec875faaabf
Author: Pino Toscano <pino at kde.org>
Date: Tue May 12 01:53:43 2009 +0200
[Qt4] Add LinkDestination::destinationName() that returns the name of the current destination.
diff --git a/qt4/src/poppler-link.cc b/qt4/src/poppler-link.cc
index 9d583cb..231c5e3 100644
--- a/qt4/src/poppler-link.cc
+++ b/qt4/src/poppler-link.cc
@@ -34,6 +34,7 @@ class LinkDestinationPrivate : public QSharedData
LinkDestinationPrivate();
LinkDestination::Kind kind; // destination type
+ QString name;
int pageNum; // page number
double left, bottom; // position
double right, top;
@@ -192,6 +193,10 @@ class LinkMoviePrivate : public LinkPrivate
bool deleteDest = false;
LinkDest *ld = data.ld;
+ if ( data.namedDest )
+ {
+ d->name = QString::fromLatin1( data.namedDest->getCString() );
+ }
if ( data.namedDest && !ld )
{
deleteDest = true;
@@ -332,6 +337,11 @@ class LinkMoviePrivate : public LinkPrivate
return s;
}
+ QString LinkDestination::destinationName() const
+ {
+ return d->name;
+ }
+
LinkDestination& LinkDestination::operator=(const LinkDestination &other)
{
if ( this == &other )
diff --git a/qt4/src/poppler-link.h b/qt4/src/poppler-link.h
index bca464c..6d42cbe 100644
--- a/qt4/src/poppler-link.h
+++ b/qt4/src/poppler-link.h
@@ -139,6 +139,13 @@ class POPPLER_QT4_EXPORT LinkDestination
QString toString() const;
/**
+ * Return the name of this destination.
+ *
+ * \since 0.12
+ */
+ QString destinationName() const;
+
+ /**
* Assignment operator.
*/
LinkDestination& operator=(const LinkDestination &other);
More information about the poppler
mailing list