Commit 03147a15 authored by Pino Toscano's avatar Pino Toscano

convert the movie objects and annotations from the poppler equivalents i added about 10 minutes ago

(thus available in the next poppler version, 0.9.0)

svn path=/trunk/KDE/kdegraphics/okular/; revision=851147
parent 052fff3a
......@@ -20,6 +20,9 @@
Q_DECLARE_METATYPE( Poppler::Annotation* )
extern Okular::Sound* createSoundFromPopplerSound( const Poppler::SoundObject *popplerSound );
#ifdef HAVE_POPPLER_0_9
extern Okular::Movie* createMovieFromPopplerMovie( const Poppler::MovieObject *popplerMovie );
#endif
static void disposeAnnotation( const Okular::Annotation *ann )
{
......@@ -57,6 +60,16 @@ Okular::Annotation* createAnnotationFromPopplerAnnotation( Poppler::Annotation *
s->setSoundIconName( soundann->soundIconName() );
s->setSound( createSoundFromPopplerSound( soundann->sound() ) );
break;
}
case Poppler::Annotation::AMovie:
{
Poppler::MovieAnnotation * movieann = static_cast< Poppler::MovieAnnotation * >( ann );
Okular::MovieAnnotation * m = new Okular::MovieAnnotation();
annotation = m;
m->setMovie( createMovieFromPopplerMovie( movieann->movie() ) );
break;
}
#endif
......
......@@ -33,6 +33,7 @@
#include <okular/core/action.h>
#include <okular/core/page.h>
#include <okular/core/annotations.h>
#include <okular/core/movie.h>
#include <okular/core/pagetransition.h>
#include <okular/core/sound.h>
#include <okular/core/sourcereference.h>
......@@ -138,6 +139,16 @@ Okular::Sound* createSoundFromPopplerSound( const Poppler::SoundObject *popplerS
return sound;
}
#ifdef HAVE_POPPLER_0_9
Okular::Movie* createMovieFromPopplerMovie( const Poppler::MovieObject *popplerMovie )
{
Okular::Movie *movie = new Okular::Movie( popplerMovie->url() );
movie->setSize( popplerMovie->size() );
movie->setRotation( (Okular::Rotation)( popplerMovie->rotation() / 90 ) );
return movie;
}
#endif
Okular::Action* createLinkFromPopplerLink(const Poppler::Link *popplerLink)
{
Okular::Action *link = 0;
......
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