Changeset View
Changeset View
Standalone View
Standalone View
generators/poppler/formfields.cpp
Show First 20 Lines • Show All 363 Lines • ▼ Show 20 Line(s) | 363 | { | |||
---|---|---|---|---|---|
364 | return Qt::AlignTop | m_field->textAlignment(); | 364 | return Qt::AlignTop | m_field->textAlignment(); | ||
365 | } | 365 | } | ||
366 | 366 | | |||
367 | bool PopplerFormFieldChoice::canBeSpellChecked() const | 367 | bool PopplerFormFieldChoice::canBeSpellChecked() const | ||
368 | { | 368 | { | ||
369 | return m_field->canBeSpellChecked(); | 369 | return m_field->canBeSpellChecked(); | ||
370 | } | 370 | } | ||
371 | 371 | | |||
372 | #ifndef HAVE_POPPLER_0_51 | 372 | #ifdef HAVE_POPPLER_0_51 | ||
373 | | ||||
374 | class DummySignatureInfo : public Okular::SignatureInfo | | |||
375 | { | | |||
376 | }; | | |||
377 | | ||||
378 | #endif | | |||
379 | | ||||
380 | | ||||
381 | PopplerFormFieldSignature::PopplerFormFieldSignature( Poppler::FormFieldSignature * field ) | 373 | PopplerFormFieldSignature::PopplerFormFieldSignature( Poppler::FormFieldSignature * field ) | ||
382 | : Okular::FormFieldSignature(), m_field( field ) | 374 | : Okular::FormFieldSignature(), m_field( field ) | ||
383 | { | 375 | { | ||
384 | m_rect = Okular::NormalizedRect::fromQRectF( m_field->rect() ); | 376 | m_rect = Okular::NormalizedRect::fromQRectF( m_field->rect() ); | ||
385 | m_id = m_field->id(); | 377 | m_id = m_field->id(); | ||
386 | #ifdef HAVE_POPPLER_0_51 | | |||
387 | m_info = new PopplerSignatureInfo( m_field->validate( Poppler::FormFieldSignature::ValidateVerifyCertificate ) ); | 378 | m_info = new PopplerSignatureInfo( m_field->validate( Poppler::FormFieldSignature::ValidateVerifyCertificate ) ); | ||
388 | #else | | |||
389 | m_info = new DummySignatureInfo(); | | |||
390 | #endif | | |||
391 | SET_ACTIONS | 379 | SET_ACTIONS | ||
392 | } | 380 | } | ||
393 | 381 | | |||
394 | PopplerFormFieldSignature::~PopplerFormFieldSignature() | 382 | PopplerFormFieldSignature::~PopplerFormFieldSignature() | ||
395 | { | 383 | { | ||
396 | delete m_field; | 384 | delete m_field; | ||
397 | delete m_info; | 385 | delete m_info; | ||
398 | } | 386 | } | ||
▲ Show 20 Lines • Show All 46 Lines • ▼ Show 20 Line(s) | 432 | #else | |||
445 | return Okular::FormFieldSignature::UnknownType; | 433 | return Okular::FormFieldSignature::UnknownType; | ||
446 | #endif | 434 | #endif | ||
447 | } | 435 | } | ||
448 | 436 | | |||
449 | const Okular::SignatureInfo &PopplerFormFieldSignature::signatureInfo() const | 437 | const Okular::SignatureInfo &PopplerFormFieldSignature::signatureInfo() const | ||
450 | { | 438 | { | ||
451 | return *m_info; | 439 | return *m_info; | ||
452 | } | 440 | } | ||
441 | #endif |