|
|
|
|
@ -382,15 +382,26 @@ Okular::Annotation* createAnnotationFromPopplerAnnotation( Poppler::Annotation * |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
#ifndef HAVE_POPPLER_0_20 |
|
|
|
|
// Poppler <0.20 returns the inplaceText in contents
|
|
|
|
|
if ( annotation->subType() == Okular::Annotation::AText ) |
|
|
|
|
{ |
|
|
|
|
Okular::TextAnnotation * txtann = static_cast<Okular::TextAnnotation*>( annotation ); |
|
|
|
|
|
|
|
|
|
if ( txtann->textType() == Okular::TextAnnotation::InPlace ) |
|
|
|
|
{ |
|
|
|
|
#ifndef HAVE_POPPLER_0_20 |
|
|
|
|
// Poppler before 0.20 returns the inplaceText in contents
|
|
|
|
|
txtann->setInplaceText( txtann->contents() ); |
|
|
|
|
} |
|
|
|
|
#endif |
|
|
|
|
} |
|
|
|
|
else if ( txtann->textType() == Okular::TextAnnotation::Linked ) |
|
|
|
|
{ |
|
|
|
|
Poppler::TextAnnotation * ppl_txtann = static_cast<Poppler::TextAnnotation*>( ann ); |
|
|
|
|
|
|
|
|
|
// Poppler and Okular assume a different default icon name in XML
|
|
|
|
|
// We re-read it via getter, which always tells the right one
|
|
|
|
|
txtann->setTextIcon( ppl_txtann->textIcon() ); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// TODO clone style
|
|
|
|
|
// TODO clone window
|
|
|
|
|
|