summaryrefslogtreecommitdiff
path: root/sd/source/ui/unoidl/unopage.cxx
diff options
context:
space:
mode:
authorTomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>2024-06-06 10:52:35 +0900
committerTomaž Vajngerl <quikee@gmail.com>2024-06-11 12:48:48 +0200
commite17c56bfc7930d3c14c3ff4cfd59828e8dcc0229 (patch)
treeec27fbffbe482aea2e90e98a7dd269092d43fdf1 /sd/source/ui/unoidl/unopage.cxx
parent4c179c1e62778274e7604b3317300f6df809cd80 (diff)
annot: new Annotation sdr object, replacing annotation tags
Previously the annotations are shown as annotation (smart) tags, which just mark in the document the existence of an annotation at a certain position. For PDF support the annotations can be more complex, so they can show many forms of vector graphic, ink, bitmaps, text boxes,... and for this a normal tag is not enough. This change moves the annotations from simple tag to use the sdr objects, so any SdrObject can be created as an annotation. The previous tag annotations are using SdrObject (actually SdrRect) subclass AnnotationObject and the code that previouslly worked with the tag annotations has been adapted. The (PDFium based) PDF import has been changed to use subclasses of the SdrObjects for the PDF annotations. Change-Id: I4746b85b5b679499e470987e61ed356397e56bf9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168485 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'sd/source/ui/unoidl/unopage.cxx')
-rw-r--r--sd/source/ui/unoidl/unopage.cxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/sd/source/ui/unoidl/unopage.cxx b/sd/source/ui/unoidl/unopage.cxx
index 6e0f2ad52b13..8f89dc0def6a 100644
--- a/sd/source/ui/unoidl/unopage.cxx
+++ b/sd/source/ui/unoidl/unopage.cxx
@@ -2529,7 +2529,9 @@ Reference< XAnnotation > SAL_CALL SdGenericDrawPage::createAndInsertAnnotation()
if( !GetPage() )
throw DisposedException();
- return GetPage()->createAnnotation();
+ auto xAnnotation = GetPage()->createAnnotation();
+ GetPage()->addAnnotation(xAnnotation);
+ return xAnnotation;
}
void SAL_CALL SdGenericDrawPage::removeAnnotation(const Reference< XAnnotation > & annotation)