405 lines
17 KiB
Diff
405 lines
17 KiB
Diff
|
--- poppler-0.67.0/qt4/src/ArthurOutputDev.cc.orig 2018-08-08 10:13:17.127028046 +0200
|
||
|
+++ poppler-0.67.0/qt4/src/ArthurOutputDev.cc 2018-08-08 11:13:37.377483041 +0200
|
||
|
@@ -68,7 +68,7 @@
|
||
|
class SplashOutFontFileID: public SplashFontFileID {
|
||
|
public:
|
||
|
|
||
|
- SplashOutFontFileID(Ref *rA) { r = *rA; }
|
||
|
+ SplashOutFontFileID(const Ref *rA) { r = *rA; }
|
||
|
|
||
|
~SplashOutFontFileID() {}
|
||
|
|
||
|
--- poppler-0.67.0/qt4/src/poppler-annotation.cc.orig 2018-08-08 10:13:17.129028061 +0200
|
||
|
+++ poppler-0.67.0/qt4/src/poppler-annotation.cc 2018-08-08 10:44:58.038166746 +0200
|
||
|
@@ -534,7 +534,7 @@ QList<Annotation*> AnnotationPrivate::fi
|
||
|
MovieObject *movie = new MovieObject( movieann );
|
||
|
m->setMovie( movie );
|
||
|
// -> movieTitle
|
||
|
- GooString * movietitle = movieann->getTitle();
|
||
|
+ const GooString * movietitle = movieann->getTitle();
|
||
|
if ( movietitle )
|
||
|
m->setMovieTitle( QString::fromLatin1( movietitle->getCString() ) );
|
||
|
break;
|
||
|
@@ -554,7 +554,7 @@ QList<Annotation*> AnnotationPrivate::fi
|
||
|
s->setAction( static_cast<Poppler::LinkRendition *>(popplerLink) );
|
||
|
|
||
|
// -> screenTitle
|
||
|
- GooString * screentitle = screenann->getTitle();
|
||
|
+ const GooString * screentitle = screenann->getTitle();
|
||
|
if ( screentitle )
|
||
|
s->setScreenTitle( UnicodeParsedString( screentitle ) );
|
||
|
break;
|
||
|
--- poppler-0.67.0/qt4/src/poppler-document.cc.orig 2018-08-08 10:13:17.130028069 +0200
|
||
|
+++ poppler-0.67.0/qt4/src/poppler-document.cc 2018-08-08 11:14:58.301690615 +0200
|
||
|
@@ -605,7 +605,7 @@ namespace Poppler {
|
||
|
if ( !outline )
|
||
|
return NULL;
|
||
|
|
||
|
- GooList * items = outline->getItems();
|
||
|
+ const GooList * items = outline->getItems();
|
||
|
if ( !items || items->getLength() < 1 )
|
||
|
return NULL;
|
||
|
|
||
|
@@ -799,7 +799,7 @@ namespace Poppler {
|
||
|
return Document::NoForm; // make gcc happy
|
||
|
}
|
||
|
|
||
|
- QDateTime convertDate( char *dateString )
|
||
|
+ QDateTime convertDate( const char *dateString )
|
||
|
{
|
||
|
int year, mon, day, hour, min, sec, tzHours, tzMins;
|
||
|
char tz;
|
||
|
@@ -830,6 +830,12 @@ namespace Poppler {
|
||
|
return QDateTime();
|
||
|
}
|
||
|
|
||
|
+ QDateTime convertDate( char *dateString )
|
||
|
+ {
|
||
|
+ return convertDate( (const char *) dateString );
|
||
|
+ }
|
||
|
+
|
||
|
+
|
||
|
bool isCmsAvailable()
|
||
|
{
|
||
|
#if defined(USE_CMS)
|
||
|
--- poppler-0.67.0/qt4/src/poppler-embeddedfile.cc.orig 2018-08-08 10:13:17.130028069 +0200
|
||
|
+++ poppler-0.67.0/qt4/src/poppler-embeddedfile.cc 2018-08-08 10:50:42.645723179 +0200
|
||
|
@@ -68,13 +68,13 @@ EmbeddedFile::~EmbeddedFile()
|
||
|
|
||
|
QString EmbeddedFile::name() const
|
||
|
{
|
||
|
- GooString *goo = m_embeddedFile->filespec->getFileName();
|
||
|
+ const GooString *goo = m_embeddedFile->filespec->getFileName();
|
||
|
return goo ? UnicodeParsedString(goo) : QString();
|
||
|
}
|
||
|
|
||
|
QString EmbeddedFile::description() const
|
||
|
{
|
||
|
- GooString *goo = m_embeddedFile->filespec->getDescription();
|
||
|
+ const GooString *goo = m_embeddedFile->filespec->getDescription();
|
||
|
return goo ? UnicodeParsedString(goo) : QString();
|
||
|
}
|
||
|
|
||
|
@@ -85,25 +85,25 @@ int EmbeddedFile::size() const
|
||
|
|
||
|
QDateTime EmbeddedFile::modDate() const
|
||
|
{
|
||
|
- GooString *goo = m_embeddedFile->embFile() ? m_embeddedFile->embFile()->modDate() : NULL;
|
||
|
+ const GooString *goo = m_embeddedFile->embFile() ? m_embeddedFile->embFile()->modDate() : NULL;
|
||
|
return goo ? convertDate(goo->getCString()) : QDateTime();
|
||
|
}
|
||
|
|
||
|
QDateTime EmbeddedFile::createDate() const
|
||
|
{
|
||
|
- GooString *goo = m_embeddedFile->embFile() ? m_embeddedFile->embFile()->createDate() : NULL;
|
||
|
+ const GooString *goo = m_embeddedFile->embFile() ? m_embeddedFile->embFile()->createDate() : NULL;
|
||
|
return goo ? convertDate(goo->getCString()) : QDateTime();
|
||
|
}
|
||
|
|
||
|
QByteArray EmbeddedFile::checksum() const
|
||
|
{
|
||
|
- GooString *goo = m_embeddedFile->embFile() ? m_embeddedFile->embFile()->checksum() : NULL;
|
||
|
+ const GooString *goo = m_embeddedFile->embFile() ? m_embeddedFile->embFile()->checksum() : NULL;
|
||
|
return goo ? QByteArray::fromRawData(goo->getCString(), goo->getLength()) : QByteArray();
|
||
|
}
|
||
|
|
||
|
QString EmbeddedFile::mimeType() const
|
||
|
{
|
||
|
- GooString *goo = m_embeddedFile->embFile() ? m_embeddedFile->embFile()->mimeType() : NULL;
|
||
|
+ const GooString *goo = m_embeddedFile->embFile() ? m_embeddedFile->embFile()->mimeType() : NULL;
|
||
|
return goo ? QString(goo->getCString()) : QString();
|
||
|
}
|
||
|
|
||
|
--- poppler-0.67.0/qt4/src/poppler-form.cc.orig 2018-08-08 10:13:17.130028069 +0200
|
||
|
+++ poppler-0.67.0/qt4/src/poppler-form.cc 2018-08-08 10:51:46.240825862 +0200
|
||
|
@@ -104,7 +104,7 @@ int FormField::id() const
|
||
|
QString FormField::name() const
|
||
|
{
|
||
|
QString name;
|
||
|
- if (GooString *goo = m_formData->fm->getPartialName())
|
||
|
+ if (const GooString *goo = m_formData->fm->getPartialName())
|
||
|
{
|
||
|
name = QString::fromLatin1(goo->getCString());
|
||
|
}
|
||
|
@@ -114,7 +114,7 @@ QString FormField::name() const
|
||
|
QString FormField::fullyQualifiedName() const
|
||
|
{
|
||
|
QString name;
|
||
|
- if (GooString *goo = m_formData->fm->getFullyQualifiedName())
|
||
|
+ if (const GooString *goo = m_formData->fm->getFullyQualifiedName())
|
||
|
{
|
||
|
name = UnicodeParsedString(goo);
|
||
|
}
|
||
|
@@ -124,7 +124,7 @@ QString FormField::fullyQualifiedName()
|
||
|
QString FormField::uiName() const
|
||
|
{
|
||
|
QString name;
|
||
|
- if (GooString *goo = m_formData->fm->getAlternateUiName())
|
||
|
+ if (const GooString *goo = m_formData->fm->getAlternateUiName())
|
||
|
{
|
||
|
name = QString::fromLatin1(goo->getCString());
|
||
|
}
|
||
|
@@ -271,7 +271,7 @@ FormFieldText::TextType FormFieldText::t
|
||
|
|
||
|
QString FormFieldText::text() const
|
||
|
{
|
||
|
- GooString *goo = static_cast<FormWidgetText*>(m_formData->fm)->getContent();
|
||
|
+ const GooString *goo = static_cast<FormWidgetText*>(m_formData->fm)->getContent();
|
||
|
return UnicodeParsedString(goo);
|
||
|
}
|
||
|
|
||
|
--- poppler-0.67.0/qt4/src/poppler-link.cc.orig 2018-08-08 10:13:17.131028077 +0200
|
||
|
+++ poppler-0.67.0/qt4/src/poppler-link.cc 2018-08-08 10:59:12.395546232 +0200
|
||
|
@@ -232,7 +232,7 @@ class LinkMoviePrivate : public LinkPriv
|
||
|
: d( new LinkDestinationPrivate )
|
||
|
{
|
||
|
bool deleteDest = false;
|
||
|
- LinkDest *ld = data.ld;
|
||
|
+ const LinkDest *ld = data.ld;
|
||
|
|
||
|
if ( data.namedDest && !ld && !data.externalDest )
|
||
|
{
|
||
|
--- poppler-0.67.0/qt4/src/poppler-media.cc.orig 2018-08-08 10:13:17.131028077 +0200
|
||
|
+++ poppler-0.67.0/qt4/src/poppler-media.cc 2018-08-08 11:10:51.802056415 +0200
|
||
|
@@ -151,7 +151,7 @@ QSize
|
||
|
MediaRendition::size() const
|
||
|
{
|
||
|
Q_D( const MediaRendition );
|
||
|
- MediaParameters *mp = 0;
|
||
|
+ const MediaParameters *mp = 0;
|
||
|
|
||
|
if (d->rendition->getBEParameters())
|
||
|
mp = d->rendition->getBEParameters();
|
||
|
--- poppler-0.67.0/qt4/src/poppler-movie.cc.orig 2018-08-08 10:13:17.131028077 +0200
|
||
|
+++ poppler-0.67.0/qt4/src/poppler-movie.cc 2018-08-08 10:52:41.284914743 +0200
|
||
|
@@ -57,7 +57,7 @@ MovieObject::MovieObject( AnnotMovie *an
|
||
|
m_movieData->m_movieObj = ann->getMovie()->copy();
|
||
|
//TODO: copy poster image
|
||
|
|
||
|
- MovieActivationParameters *mp = m_movieData->m_movieObj->getActivationParameters();
|
||
|
+ const MovieActivationParameters *mp = m_movieData->m_movieObj->getActivationParameters();
|
||
|
int width, height;
|
||
|
m_movieData->m_movieObj->getFloatingWindowSize(&width, &height);
|
||
|
m_movieData->m_size = QSize(width, height);
|
||
|
@@ -73,7 +73,7 @@ MovieObject::~MovieObject()
|
||
|
|
||
|
QString MovieObject::url() const
|
||
|
{
|
||
|
- GooString * goo = m_movieData->m_movieObj->getFileName();
|
||
|
+ const GooString * goo = m_movieData->m_movieObj->getFileName();
|
||
|
return goo ? QString( goo->getCString() ) : QString();
|
||
|
}
|
||
|
|
||
|
--- poppler-0.67.0/qt4/src/poppler-optcontent.cc.orig 2018-08-08 10:13:17.131028077 +0200
|
||
|
+++ poppler-0.67.0/qt4/src/poppler-optcontent.cc 2018-08-08 10:53:34.222000220 +0200
|
||
|
@@ -213,7 +213,7 @@ namespace Poppler
|
||
|
} else if ( (orderItem.isArray()) && (orderItem.arrayGetLength() > 0) ) {
|
||
|
parseOrderArray(lastItem, orderItem.getArray());
|
||
|
} else if ( orderItem.isString() ) {
|
||
|
- GooString *label = orderItem.getString();
|
||
|
+ const GooString *label = orderItem.getString();
|
||
|
OptContentItem *header = new OptContentItem ( UnicodeParsedString ( label ) );
|
||
|
m_headerOptContentItems.append( header );
|
||
|
addChild( parentNode, header );
|
||
|
@@ -396,7 +396,7 @@ namespace Poppler
|
||
|
|
||
|
QSet<OptContentItem *> changedItems;
|
||
|
|
||
|
- GooList *statesList = popplerLinkOCGState->getStateList();
|
||
|
+ const GooList *statesList = popplerLinkOCGState->getStateList();
|
||
|
for (int i = 0; i < statesList->getLength(); ++i) {
|
||
|
::LinkOCGState::StateList *stateList = (::LinkOCGState::StateList*)statesList->get(i);
|
||
|
|
||
|
--- poppler-0.67.0/qt4/src/poppler-page.cc.orig 2018-08-08 10:13:17.132028085 +0200
|
||
|
+++ poppler-0.67.0/qt4/src/poppler-page.cc 2018-08-08 10:54:22.980078936 +0200
|
||
|
@@ -103,7 +103,7 @@ Link* PageData::convertLinkActionToLink(
|
||
|
case actionLaunch:
|
||
|
{
|
||
|
LinkLaunch * e = (LinkLaunch *)a;
|
||
|
- GooString * p = e->getParams();
|
||
|
+ const GooString * p = e->getParams();
|
||
|
popplerLink = new LinkExecute( linkArea, e->getFileName()->getCString(), p ? p->getCString() : 0 );
|
||
|
}
|
||
|
break;
|
||
|
--- poppler-0.67.0/qt4/src/poppler-private.cc.orig 2018-08-08 10:13:17.132028085 +0200
|
||
|
+++ poppler-0.67.0/qt4/src/poppler-private.cc 2018-08-08 11:03:25.964955666 +0200
|
||
|
@@ -73,7 +73,7 @@ namespace Debug {
|
||
|
(*Debug::debugFunction)(emsg, Debug::debugClosure);
|
||
|
}
|
||
|
|
||
|
- QString unicodeToQString(Unicode* u, int len) {
|
||
|
+ QString unicodeToQString(const Unicode* u, int len) {
|
||
|
if (!utf8Map)
|
||
|
{
|
||
|
GooString enc("UTF-8");
|
||
|
@@ -98,11 +98,11 @@ namespace Debug {
|
||
|
return QString::fromUtf8(convertedStr.getCString(), convertedStr.getLength());
|
||
|
}
|
||
|
|
||
|
- QString UnicodeParsedString(GooString *s1) {
|
||
|
+ QString UnicodeParsedString(const GooString *s1) {
|
||
|
if ( !s1 || s1->getLength() == 0 )
|
||
|
return QString();
|
||
|
|
||
|
- char *cString;
|
||
|
+ const char *cString;
|
||
|
int stringLength;
|
||
|
bool deleteCString;
|
||
|
if ( ( s1->getChar(0) & 0xff ) == 0xfe && ( s1->getLength() > 1 && ( s1->getChar(1) & 0xff ) == 0xff ) )
|
||
|
@@ -162,7 +162,7 @@ namespace Debug {
|
||
|
return QStringToUnicodeGooString(dt.toUTC().toString("yyyyMMddhhmmss+00'00'"));
|
||
|
}
|
||
|
|
||
|
- static void linkActionToTocItem( ::LinkAction * a, DocumentData * doc, QDomElement * e )
|
||
|
+ static void linkActionToTocItem( const ::LinkAction * a, DocumentData * doc, QDomElement * e )
|
||
|
{
|
||
|
if ( !a || !e )
|
||
|
return;
|
||
|
@@ -172,14 +172,14 @@ namespace Debug {
|
||
|
case actionGoTo:
|
||
|
{
|
||
|
// page number is contained/referenced in a LinkGoTo
|
||
|
- LinkGoTo * g = static_cast< LinkGoTo * >( a );
|
||
|
- LinkDest * destination = g->getDest();
|
||
|
+ const LinkGoTo * g = static_cast< const LinkGoTo * >( a );
|
||
|
+ const LinkDest * destination = g->getDest();
|
||
|
if ( !destination && g->getNamedDest() )
|
||
|
{
|
||
|
// no 'destination' but an internal 'named reference'. we could
|
||
|
// get the destination for the page now, but it's VERY time consuming,
|
||
|
// so better storing the reference and provide the viewport on demand
|
||
|
- GooString *s = g->getNamedDest();
|
||
|
+ const GooString *s = g->getNamedDest();
|
||
|
QChar *charArray = new QChar[s->getLength()];
|
||
|
for (int i = 0; i < s->getLength(); ++i) charArray[i] = QChar(s->getCString()[i]);
|
||
|
QString aux(charArray, s->getLength());
|
||
|
@@ -196,14 +196,14 @@ namespace Debug {
|
||
|
case actionGoToR:
|
||
|
{
|
||
|
// page number is contained/referenced in a LinkGoToR
|
||
|
- LinkGoToR * g = static_cast< LinkGoToR * >( a );
|
||
|
- LinkDest * destination = g->getDest();
|
||
|
+ const LinkGoToR * g = static_cast< const LinkGoToR * >( a );
|
||
|
+ const LinkDest * destination = g->getDest();
|
||
|
if ( !destination && g->getNamedDest() )
|
||
|
{
|
||
|
// no 'destination' but an internal 'named reference'. we could
|
||
|
// get the destination for the page now, but it's VERY time consuming,
|
||
|
// so better storing the reference and provide the viewport on demand
|
||
|
- GooString *s = g->getNamedDest();
|
||
|
+ const GooString *s = g->getNamedDest();
|
||
|
QChar *charArray = new QChar[s->getLength()];
|
||
|
for (int i = 0; i < s->getLength(); ++i) charArray[i] = QChar(s->getCString()[i]);
|
||
|
QString aux(charArray, s->getLength());
|
||
|
@@ -220,7 +220,7 @@ namespace Debug {
|
||
|
}
|
||
|
case actionURI:
|
||
|
{
|
||
|
- LinkURI * u = static_cast< LinkURI * >( a );
|
||
|
+ const LinkURI * u = static_cast< const LinkURI * >( a );
|
||
|
e->setAttribute( "DestinationURI", u->getURI()->getCString() );
|
||
|
}
|
||
|
default: ;
|
||
|
@@ -260,7 +260,7 @@ namespace Debug {
|
||
|
}
|
||
|
|
||
|
|
||
|
- void DocumentData::addTocChildren( QDomDocument * docSyn, QDomNode * parent, GooList * items )
|
||
|
+ void DocumentData::addTocChildren( QDomDocument * docSyn, QDomNode * parent, const GooList * items )
|
||
|
{
|
||
|
int numItems = items->getLength();
|
||
|
for ( int i = 0; i < numItems; ++i )
|
||
|
@@ -270,7 +270,7 @@ namespace Debug {
|
||
|
|
||
|
// 1. create element using outlineItem's title as tagName
|
||
|
QString name;
|
||
|
- Unicode * uniChar = outlineItem->getTitle();
|
||
|
+ const Unicode * uniChar = outlineItem->getTitle();
|
||
|
int titleLength = outlineItem->getTitleLength();
|
||
|
name = unicodeToQString(uniChar, titleLength);
|
||
|
if ( name.isEmpty() )
|
||
|
@@ -280,14 +280,14 @@ namespace Debug {
|
||
|
parent->appendChild( item );
|
||
|
|
||
|
// 2. find the page the link refers to
|
||
|
- ::LinkAction * a = outlineItem->getAction();
|
||
|
+ const ::LinkAction * a = outlineItem->getAction();
|
||
|
linkActionToTocItem( a, this, &item );
|
||
|
|
||
|
item.setAttribute( "Open", QVariant( (bool)outlineItem->isOpen() ).toString() );
|
||
|
|
||
|
// 3. recursively descend over children
|
||
|
outlineItem->open();
|
||
|
- GooList * children = outlineItem->getKids();
|
||
|
+ const GooList * children = outlineItem->getKids();
|
||
|
if ( children )
|
||
|
addTocChildren( docSyn, &item, children );
|
||
|
}
|
||
|
--- poppler-0.67.0/qt4/src/poppler-private.h.orig 2018-08-08 10:13:17.132028085 +0200
|
||
|
+++ poppler-0.67.0/qt4/src/poppler-private.h 2018-08-08 11:00:30.836672893 +0200
|
||
|
@@ -54,9 +54,9 @@ class FormWidget;
|
||
|
namespace Poppler {
|
||
|
|
||
|
/* borrowed from kpdf */
|
||
|
- QString unicodeToQString(Unicode* u, int len);
|
||
|
+ QString unicodeToQString(const Unicode* u, int len);
|
||
|
|
||
|
- QString UnicodeParsedString(GooString *s1);
|
||
|
+ QString UnicodeParsedString(const GooString *s1);
|
||
|
|
||
|
GooString *QStringToUnicodeGooString(const QString &s);
|
||
|
|
||
|
@@ -69,13 +69,13 @@ namespace Poppler {
|
||
|
class LinkDestinationData
|
||
|
{
|
||
|
public:
|
||
|
- LinkDestinationData( LinkDest *l, GooString *nd, Poppler::DocumentData *pdfdoc, bool external )
|
||
|
+ LinkDestinationData( const LinkDest *l, const GooString *nd, Poppler::DocumentData *pdfdoc, bool external )
|
||
|
: ld(l), namedDest(nd), doc(pdfdoc), externalDest(external)
|
||
|
{
|
||
|
}
|
||
|
|
||
|
- LinkDest *ld;
|
||
|
- GooString *namedDest;
|
||
|
+ const LinkDest *ld;
|
||
|
+ const GooString *namedDest;
|
||
|
Poppler::DocumentData *doc;
|
||
|
bool externalDest;
|
||
|
};
|
||
|
@@ -115,7 +115,7 @@ namespace Poppler {
|
||
|
|
||
|
~DocumentData();
|
||
|
|
||
|
- void addTocChildren( QDomDocument * docSyn, QDomNode * parent, GooList * items );
|
||
|
+ void addTocChildren( QDomDocument * docSyn, QDomNode * parent, const GooList * items );
|
||
|
|
||
|
void setPaperColor(const QColor &color)
|
||
|
{
|
||
|
--- poppler-0.67.0/qt4/src/poppler-qt4.h.orig 2018-08-08 10:13:17.133028093 +0200
|
||
|
+++ poppler-0.67.0/qt4/src/poppler-qt4.h 2018-08-08 10:29:23.807858790 +0200
|
||
|
@@ -1816,7 +1816,12 @@ height = dummy.height();
|
||
|
/**
|
||
|
Conversion from PDF date string format to QDateTime
|
||
|
*/
|
||
|
- POPPLER_QT4_EXPORT QDateTime convertDate( char *dateString );
|
||
|
+ POPPLER_QT4_EXPORT Q_DECL_DEPRECATED QDateTime convertDate( char *dateString );
|
||
|
+
|
||
|
+ /**
|
||
|
+ Conversion from PDF date string format to QDateTime
|
||
|
+ */
|
||
|
+ POPPLER_QT4_EXPORT QDateTime convertDate( const char *dateString );
|
||
|
|
||
|
/**
|
||
|
Whether the color management functions are available.
|
||
|
--- poppler-0.67.0/qt4/src/poppler-sound.cc.orig 2018-08-08 10:13:17.133028093 +0200
|
||
|
+++ poppler-0.67.0/qt4/src/poppler-sound.cc 2018-08-08 11:10:31.644004477 +0200
|
||
|
@@ -75,7 +75,7 @@ QString SoundObject::url() const
|
||
|
if ( m_soundData->m_type != SoundObject::External )
|
||
|
return QString();
|
||
|
|
||
|
- GooString * goo = m_soundData->m_soundObj->getFileName();
|
||
|
+ const GooString * goo = m_soundData->m_soundObj->getFileName();
|
||
|
return goo ? QString( goo->getCString() ) : QString();
|
||
|
}
|
||
|
|