| 3447 | } |
| 3448 | |
| 3449 | bool Document::canModifyPageAnnotation(const Annotation *annotation) const |
| 3450 | { |
| 3451 | if (!annotation || (annotation->flags() & Annotation::DenyWrite)) { |
| 3452 | return false; |
| 3453 | } |
| 3454 | |
| 3455 | if (!isAllowed(Okular::AllowNotes)) { |
| 3456 | return false; |
| 3457 | } |
| 3458 | |
| 3459 | if ((annotation->flags() & Annotation::External) && !d->canModifyExternalAnnotations()) { |
| 3460 | return false; |
| 3461 | } |
| 3462 | |
| 3463 | switch (annotation->subType()) { |
| 3464 | case Annotation::AText: |
| 3465 | case Annotation::ALine: |
| 3466 | case Annotation::AGeom: |
| 3467 | case Annotation::AHighlight: |
| 3468 | case Annotation::AStamp: |
| 3469 | case Annotation::AInk: |
| 3470 | return true; |
| 3471 | case Annotation::AWidget: |
| 3472 | #if HAVE_NEW_SIGNATURE_API |
| 3473 | return dynamic_cast<const SignatureAnnotation *>(annotation); |
| 3474 | #endif |
| 3475 | return false; |
| 3476 | default: |
| 3477 | return false; |
| 3478 | } |
| 3479 | } |
| 3480 | |
| 3481 | void Document::prepareToModifyAnnotationProperties(Annotation *annotation) |
| 3482 | { |
no test coverage detected