summaryrefslogtreecommitdiff
path: root/sd/inc
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/inc
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/inc')
-rw-r--r--sd/inc/Annotation.hxx26
1 files changed, 1 insertions, 25 deletions
diff --git a/sd/inc/Annotation.hxx b/sd/inc/Annotation.hxx
index aba2d27d77b7..8d9f34501e0d 100644
--- a/sd/inc/Annotation.hxx
+++ b/sd/inc/Annotation.hxx
@@ -46,17 +46,10 @@ namespace sd
{
rtl::Reference<sdr::annotation::Annotation> createAnnotation(SdPage* pPage);
+rtl::Reference<sdr::annotation::Annotation> createAnnotationAndAddToPage(SdPage* pPage);
std::unique_ptr<SdrUndoAction> CreateUndoInsertOrRemoveAnnotation(rtl::Reference<sdr::annotation::Annotation>& xAnnotation, bool bInsert);
-struct SD_DLLPUBLIC CustomAnnotationMarker
-{
- Color maLineColor;
- Color maFillColor;
- float mnLineWidth;
- std::vector<basegfx::B2DPolygon> maPolygons;
-};
-
class SAL_DLLPUBLIC_RTTI Annotation final : public sdr::annotation::Annotation
{
public:
@@ -90,25 +83,8 @@ public:
void createChangeUndo();
- void createCustomAnnotationMarker()
- {
- m_pCustomAnnotationMarker = std::make_unique<CustomAnnotationMarker>();
- }
-
- CustomAnnotationMarker& getCustomAnnotationMarker()
- {
- return *m_pCustomAnnotationMarker;
- }
-
- bool hasCustomAnnotationMarker() const
- {
- return bool(m_pCustomAnnotationMarker);
- }
-
private:
void createChangeUndoImpl(std::unique_lock<std::mutex>& g);
-
- std::unique_ptr<CustomAnnotationMarker> m_pCustomAnnotationMarker;
};
}