Changeset View
Changeset View
Standalone View
Standalone View
generators/poppler/generator_pdf.cpp
Show First 20 Lines • Show All 518 Lines • ▼ Show 20 Line(s) | 515 | { | |||
---|---|---|---|---|---|
519 | { | 519 | { | ||
520 | scripts << QStringLiteral( "getField(\"%1\").hidden = %2;" ).arg( target ).arg( l->isShowAction() ? QLatin1String( "false" ) : QLatin1String( "true" ) ); | 520 | scripts << QStringLiteral( "getField(\"%1\").hidden = %2;" ).arg( target ).arg( l->isShowAction() ? QLatin1String( "false" ) : QLatin1String( "true" ) ); | ||
521 | } | 521 | } | ||
522 | link = new Okular::ScriptAction( Okular::JavaScript, scripts.join( QLatin1Char( '\n' ) ) ); | 522 | link = new Okular::ScriptAction( Okular::JavaScript, scripts.join( QLatin1Char( '\n' ) ) ); | ||
523 | } | 523 | } | ||
524 | break; | 524 | break; | ||
525 | #endif | 525 | #endif | ||
526 | 526 | | |||
527 | #ifdef HAVE_POPPLER_0_50 | ||||
527 | case Poppler::Link::OCGState: | 528 | case Poppler::Link::OCGState: | ||
528 | Q_UNREACHABLE(); | 529 | Q_UNREACHABLE(); | ||
530 | #endif | ||||
529 | } | 531 | } | ||
530 | 532 | | |||
531 | #ifdef HAVE_POPPLER_0_64 | 533 | #ifdef HAVE_POPPLER_0_64 | ||
532 | if (link) | 534 | if (link) | ||
533 | { | 535 | { | ||
534 | QVector< Okular::Action * > nextActions; | 536 | QVector< Okular::Action * > nextActions; | ||
535 | for ( const Poppler::Link *nl : popplerLink->nextLinks() ) | 537 | for ( const Poppler::Link *nl : popplerLink->nextLinks() ) | ||
536 | { | 538 | { | ||
▲ Show 20 Lines • Show All 1432 Lines • ▼ Show 20 Line(s) | 1970 | case Poppler::FormField::FormButton: | |||
1969 | of = new PopplerFormFieldButton( static_cast<Poppler::FormFieldButton*>( f ) ); | 1971 | of = new PopplerFormFieldButton( static_cast<Poppler::FormFieldButton*>( f ) ); | ||
1970 | break; | 1972 | break; | ||
1971 | case Poppler::FormField::FormText: | 1973 | case Poppler::FormField::FormText: | ||
1972 | of = new PopplerFormFieldText( static_cast<Poppler::FormFieldText*>( f ) ); | 1974 | of = new PopplerFormFieldText( static_cast<Poppler::FormFieldText*>( f ) ); | ||
1973 | break; | 1975 | break; | ||
1974 | case Poppler::FormField::FormChoice: | 1976 | case Poppler::FormField::FormChoice: | ||
1975 | of = new PopplerFormFieldChoice( static_cast<Poppler::FormFieldChoice*>( f ) ); | 1977 | of = new PopplerFormFieldChoice( static_cast<Poppler::FormFieldChoice*>( f ) ); | ||
1976 | break; | 1978 | break; | ||
1979 | #ifdef HAVE_POPPLER_0_51 | ||||
1977 | case Poppler::FormField::FormSignature: { | 1980 | case Poppler::FormField::FormSignature: { | ||
1978 | of = new PopplerFormFieldSignature( static_cast<Poppler::FormFieldSignature*>( f ) ); | 1981 | of = new PopplerFormFieldSignature( static_cast<Poppler::FormFieldSignature*>( f ) ); | ||
1979 | break; | 1982 | break; | ||
1980 | } | 1983 | } | ||
1984 | #endif | ||||
1981 | default: ; | 1985 | default: ; | ||
1982 | } | 1986 | } | ||
1983 | if ( of ) | 1987 | if ( of ) | ||
1984 | // form field created, good - it will take care of the Poppler::FormField | 1988 | // form field created, good - it will take care of the Poppler::FormField | ||
1985 | okularFormFields.append( of ); | 1989 | okularFormFields.append( of ); | ||
1986 | else | 1990 | else | ||
1987 | // no form field available - delete the Poppler::FormField | 1991 | // no form field available - delete the Poppler::FormField | ||
1988 | delete f; | 1992 | delete f; | ||
▲ Show 20 Lines • Show All 87 Lines • Show Last 20 Lines |