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

Merge remote-tracking branch 'origin/Applications/19.04'

parents f29f6727 d121461b
......@@ -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
......@@ -512,11 +512,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
......@@ -1970,12 +1968,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