Commit d121461b authored by Albert Astals Cid's avatar Albert Astals Cid

Revert "Fix build with poppler < 0.51"

This reverts commit 32786e6b.
parent 32786e6b
......@@ -369,13 +369,25 @@ bool PopplerFormFieldChoice::canBeSpellChecked() const
return m_field->canBeSpellChecked();
}
#ifdef HAVE_POPPLER_0_51
#ifndef HAVE_POPPLER_0_51
class DummySignatureInfo : public Okular::SignatureInfo
{
};
#endif
PopplerFormFieldSignature::PopplerFormFieldSignature( Poppler::FormFieldSignature * field )
: Okular::FormFieldSignature(), m_field( field )
{
m_rect = Okular::NormalizedRect::fromQRectF( m_field->rect() );
m_id = m_field->id();
#ifdef HAVE_POPPLER_0_51
m_info = new PopplerSignatureInfo( m_field->validate( Poppler::FormFieldSignature::ValidateVerifyCertificate ) );
#else
m_info = new DummySignatureInfo();
#endif
SET_ACTIONS
}
......@@ -438,4 +450,3 @@ const Okular::SignatureInfo &PopplerFormFieldSignature::signatureInfo() const
{
return *m_info;
}
#endif
......@@ -111,7 +111,6 @@ class PopplerFormFieldChoice : public Okular::FormFieldChoice
};
#ifdef HAVE_POPPLER_0_51
class PopplerSignatureInfo;
class PopplerFormFieldSignature : public Okular::FormFieldSignature
{
......@@ -137,6 +136,5 @@ class PopplerFormFieldSignature : public Okular::FormFieldSignature
Okular::NormalizedRect m_rect;
int m_id;
};
#endif
#endif
......@@ -523,11 +523,9 @@ Okular::Action* createLinkFromPopplerLink(const Poppler::Link *popplerLink, bool
}
break;
#endif
#ifdef HAVE_POPPLER_0_50
case Poppler::Link::OCGState:
Q_UNREACHABLE();
#endif
}
#ifdef HAVE_POPPLER_0_64
......@@ -1976,12 +1974,10 @@ void PDFGenerator::addFormFields( Poppler::Page * popplerPage, Okular::Page * pa
case Poppler::FormField::FormChoice:
of = new PopplerFormFieldChoice( static_cast<Poppler::FormFieldChoice*>( f ) );
break;
#ifdef HAVE_POPPLER_0_51
case Poppler::FormField::FormSignature: {
of = new PopplerFormFieldSignature( static_cast<Poppler::FormFieldSignature*>( f ) );
break;
}
#endif
default: ;
}
if ( of )
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment