summaryrefslogtreecommitdiff
path: root/svx/source/unodraw/unoshape.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 /svx/source/unodraw/unoshape.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 'svx/source/unodraw/unoshape.cxx')
-rw-r--r--svx/source/unodraw/unoshape.cxx24
1 files changed, 24 insertions, 0 deletions
diff --git a/svx/source/unodraw/unoshape.cxx b/svx/source/unodraw/unoshape.cxx
index 934c72c85cfb..5c3807817a6f 100644
--- a/svx/source/unodraw/unoshape.cxx
+++ b/svx/source/unodraw/unoshape.cxx
@@ -3184,6 +3184,7 @@ constexpr OUString sUNO_service_drawing_PolyLineShape = u"com.sun.star.drawi
constexpr OUString sUNO_service_drawing_OpenBezierShape = u"com.sun.star.drawing.OpenBezierShape"_ustr;
constexpr OUString sUNO_service_drawing_ClosedBezierShape = u"com.sun.star.drawing.ClosedBezierShape"_ustr;
constexpr OUString sUNO_service_drawing_TextShape = u"com.sun.star.drawing.TextShape"_ustr;
+constexpr OUString sUNO_service_drawing_AnnotationShape = u"com.sun.star.drawing.AnnotationShape"_ustr;
constexpr OUString sUNO_service_drawing_GraphicObjectShape = u"com.sun.star.drawing.GraphicObjectShape"_ustr;
constexpr OUString sUNO_service_drawing_OLE2Shape = u"com.sun.star.drawing.OLE2Shape"_ustr;
constexpr OUString sUNO_service_drawing_PageShape = u"com.sun.star.drawing.PageShape"_ustr;
@@ -3442,6 +3443,29 @@ uno::Sequence< OUString > SvxShape::_getSupportedServiceNames()
sUNO_service_drawing_RotationDescriptor };
return aSvxShape_TextServices;
}
+ case SdrObjKind::Annotation:
+ {
+ static const uno::Sequence<OUString> aSvxShape_AnnotationServices = {
+ sUNO_service_drawing_AnnotationShape,
+
+ sUNO_service_drawing_Shape,
+ sUNO_service_drawing_FillProperties,
+ sUNO_service_drawing_LineProperties,
+
+ sUNO_service_drawing_Text,
+ sUNO_service_drawing_TextProperties,
+ sUNO_service_style_ParagraphProperties,
+ sUNO_service_style_ParagraphPropertiesComplex,
+ sUNO_service_style_ParagraphPropertiesAsian,
+ sUNO_service_style_CharacterProperties,
+ sUNO_service_style_CharacterPropertiesComplex,
+ sUNO_service_style_CharacterPropertiesAsian,
+
+ sUNO_service_drawing_ShadowProperties,
+ sUNO_service_drawing_RotationDescriptor
+ };
+ return aSvxShape_AnnotationServices;
+ }
case SdrObjKind::Graphic:
{