| line | stmt | bran | cond | sub | pod | time | code | 
| 1 |  |  |  |  |  |  | package SWISH::Filters::ppt2txt; | 
| 2 | 1 |  |  | 1 |  | 907 | use strict; | 
|  | 1 |  |  |  |  | 3 |  | 
|  | 1 |  |  |  |  | 40 |  | 
| 3 | 1 |  |  | 1 |  | 6 | use vars qw( $VERSION @ISA ); | 
|  | 1 |  |  |  |  | 2 |  | 
|  | 1 |  |  |  |  | 211 |  | 
| 4 |  |  |  |  |  |  | $VERSION = '0.190'; | 
| 5 |  |  |  |  |  |  | @ISA = ('SWISH::Filters::Base'); | 
| 6 |  |  |  |  |  |  |  | 
| 7 |  |  |  |  |  |  | sub new { | 
| 8 | 1 |  |  | 1 | 0 | 20 | my $class = shift; | 
| 9 | 1 |  |  |  |  | 9 | my $self  = bless { | 
| 10 |  |  |  |  |  |  | mimetypes => [qr!application/vnd.ms-powerpoint!], | 
| 11 |  |  |  |  |  |  | priority => 45,    # lower than html filter | 
| 12 |  |  |  |  |  |  | }, $class; | 
| 13 |  |  |  |  |  |  |  | 
| 14 |  |  |  |  |  |  | # check for helpers | 
| 15 | 1 |  |  |  |  | 6 | return $self->set_programs('catppt'); | 
| 16 |  |  |  |  |  |  |  | 
| 17 |  |  |  |  |  |  | } | 
| 18 |  |  |  |  |  |  |  | 
| 19 |  |  |  |  |  |  | sub filter { | 
| 20 | 0 |  |  | 0 | 1 |  | my ( $self, $doc ) = @_; | 
| 21 |  |  |  |  |  |  |  | 
| 22 | 0 |  | 0 |  |  |  | my $content = $self->run_catppt( $doc->fetch_filename ) || return; | 
| 23 |  |  |  |  |  |  |  | 
| 24 |  |  |  |  |  |  | # update the document's content type | 
| 25 | 0 |  |  |  |  |  | $doc->set_content_type('text/plain'); | 
| 26 |  |  |  |  |  |  |  | 
| 27 |  |  |  |  |  |  | # return the document | 
| 28 | 0 |  |  |  |  |  | return \$content; | 
| 29 |  |  |  |  |  |  | } | 
| 30 |  |  |  |  |  |  | 1; | 
| 31 |  |  |  |  |  |  |  | 
| 32 |  |  |  |  |  |  | __END__ |