qt5/src/poppler-annotation-helper.h |  118 ------------------------------------
 1 file changed, 118 deletions(-)

New commits:
commit 4c42f03f26dc9ceb31bcd8bf7c290f3bc87fd862
Author: Albert Astals Cid <aa...@kde.org>
Date:   Wed Oct 30 23:01:40 2019 +0100

    qt5: remove a bunch of unused internal functions

diff --git a/qt5/src/poppler-annotation-helper.h 
b/qt5/src/poppler-annotation-helper.h
index b1f61bb0..d1d222c6 100644
--- a/qt5/src/poppler-annotation-helper.h
+++ b/qt5/src/poppler-annotation-helper.h
@@ -41,129 +41,11 @@ namespace Poppler {
 class XPDFReader
 {
     public:
-        // find named symbol and parse it
-        static inline void lookupName( Dict *, char *, QString & dest );
-        static inline void lookupString( Dict *, char *, QString & dest );
-        static inline void lookupBool( Dict *, char *, bool & dest );
-        static inline void lookupInt( Dict *, char *, int & dest );
-        static inline void lookupNum( Dict *, char *, double & dest );
-        static inline int lookupNumArray( Dict *, char *, double * dest, int 
len );
-        static inline void lookupColor( Dict *, char *, QColor & color );
-        static inline void lookupIntRef( Dict *, char *, int & dest );
-        static inline void lookupDate( Dict *, char *, QDateTime & dest );
         // transform from user coords to normalized ones using the matrix M
         static inline void transform( double * M, double x, double y, QPointF 
&res );
         static inline void invTransform( const double * M, const QPointF p, 
double &x, double &y );
 };
 
-void XPDFReader::lookupName( Dict * dict, char * type, QString & dest )
-{
-    Object nameObj = dict->lookup( type );
-    if ( nameObj.isNull() )
-        return;
-    if ( nameObj.isName() )
-        dest = nameObj.getName();
-    else
-        qDebug() << type << " is not Name." << endl;
-}
-
-void XPDFReader::lookupString( Dict * dict, char * type, QString & dest )
-{
-    Object stringObj = dict->lookup( type );
-    if ( stringObj.isNull() )
-        return;
-    if ( stringObj.isString() )
-        dest = stringObj.getString()->c_str();
-    else
-        qDebug() << type << " is not String." << endl;
-}
-
-void XPDFReader::lookupBool( Dict * dict, char * type, bool & dest )
-{
-    Object boolObj = dict->lookup( type );
-    if ( boolObj.isNull() )
-        return;
-    if ( boolObj.isBool() )
-        dest = boolObj.getBool() == true;
-    else
-        qDebug() << type << " is not Bool." << endl;
-}
-
-void XPDFReader::lookupInt( Dict * dict, char * type, int & dest )
-{
-    Object intObj = dict->lookup( type );
-    if ( intObj.isNull() )
-        return;
-    if ( intObj.isInt() )
-        dest = intObj.getInt();
-    else
-        qDebug() << type << " is not Int." << endl;
-}
-
-void XPDFReader::lookupNum( Dict * dict, char * type, double & dest )
-{
-    Object numObj = dict->lookup( type );
-    if ( numObj.isNull() )
-        return;
-    if ( numObj.isNum() )
-        dest = numObj.getNum();
-    else
-        qDebug() << type << " is not Num." << endl;
-}
-
-int XPDFReader::lookupNumArray( Dict * dict, char * type, double * dest, int 
len )
-{
-    Object arrObj = dict->lookup( type );
-    if ( arrObj.isNull() )
-        return 0;
-    if ( arrObj.isArray() )
-    {
-        len = qMin( len, arrObj.arrayGetLength() );
-        for ( int i = 0; i < len; i++ )
-        {
-            Object numObj = arrObj.arrayGet( i );
-            dest[i] = numObj.getNum();
-        }
-    }
-    else
-    {
-        len = 0;
-        qDebug() << type << "is not Array." << endl;
-    }
-    return len;
-}
-
-void XPDFReader::lookupColor( Dict * dict, char * type, QColor & dest )
-{
-    double c[3];
-    if ( XPDFReader::lookupNumArray( dict, type, c, 3 ) == 3 )
-        dest = QColor( (int)(c[0]*255.0), (int)(c[1]*255.0), 
(int)(c[2]*255.0));
-}
-
-void XPDFReader::lookupIntRef( Dict * dict, char * type, int & dest )
-{
-    const Object &refObj = dict->lookupNF( type );
-    if ( refObj.isNull() )
-        return;
-    if ( refObj.isRef() )
-        dest = refObj.getRefNum();
-    else
-        qDebug() << type << " is not Ref." << endl;
-}
-
-void XPDFReader::lookupDate( Dict * dict, char * type, QDateTime & dest )
-{
-    Object dateObj = dict->lookup( type );
-    if ( dateObj.isNull() )
-        return;
-    if ( dateObj.isString() )
-    {
-        dest = convertDate( dateObj.getString()->c_str() );
-    }
-    else
-        qDebug() << type << " is not Date" << endl;
-}
-
 void XPDFReader::transform( double * M, double x, double y, QPointF &res )
 {
     res.setX( M[0] * x + M[2] * y + M[4] );
_______________________________________________
poppler mailing list
poppler@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/poppler

Reply via email to