| 38 | } |
| 39 | |
| 40 | Okular::EmbeddedFile *embeddedFileFromAnnotation(Okular::Annotation *annotation) |
| 41 | { |
| 42 | if (annotation->subType() == Okular::Annotation::AFileAttachment) { |
| 43 | const Okular::FileAttachmentAnnotation *fileAttachAnnot = static_cast<Okular::FileAttachmentAnnotation *>(annotation); |
| 44 | return fileAttachAnnot->embeddedFile(); |
| 45 | } else if (annotation->subType() == Okular::Annotation::ARichMedia) { |
| 46 | const Okular::RichMediaAnnotation *richMediaAnnot = static_cast<Okular::RichMediaAnnotation *>(annotation); |
| 47 | return richMediaAnnot->embeddedFile(); |
| 48 | } else { |
| 49 | return nullptr; |
| 50 | } |
| 51 | } |
| 52 | |
| 53 | } |
| 54 |
no test coverage detected