Add ad-hoc conversion for sound annotations.

This requires the sound annotation type I added 5 minutes ago in the development version of Poppler.

svn path=/trunk/KDE/kdegraphics/okular/; revision=796581
remotes/origin/KDE/4.1
Pino Toscano 18 years ago
parent 1177ac20ad
commit 38d2ab6bcc
  1. 13
      generators/poppler/annots.cpp

@ -19,6 +19,8 @@
Q_DECLARE_METATYPE( Poppler::Annotation* )
extern Okular::Sound* createSoundFromPopplerSound( const Poppler::SoundObject *popplerSound );
static void disposeAnnotation( const Okular::Annotation *ann )
{
Poppler::Annotation *popplerAnn = qvariant_cast< Poppler::Annotation * >( ann->nativeId() );
@ -44,6 +46,17 @@ Okular::Annotation* createAnnotationFromPopplerAnnotation( Poppler::Annotation *
f->setFileIconName( attachann->fileIconName() );
f->setEmbeddedFile( new PDFEmbeddedFile( attachann->embeddedFile() ) );
break;
}
case Poppler::Annotation::ASound:
{
Poppler::SoundAnnotation * soundann = static_cast< Poppler::SoundAnnotation * >( ann );
Okular::SoundAnnotation * s = new Okular::SoundAnnotation();
annotation = s;
s->setSoundIconName( soundann->soundIconName() );
s->setSound( createSoundFromPopplerSound( soundann->sound() ) );
break;
}
#endif

Loading…
Cancel
Save