From a938ed2be520426ce7949c4fd30a6e7e31d7c279 Mon Sep 17 00:00:00 2001 From: Tomaž Vajngerl Date: Thu, 18 Apr 2024 14:54:52 +0900 Subject: annot: added Annotation impl. to svx, moved some thing from sd MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This is an attempt to move the sd::Annotation to the common code in the svx module. This will need to be done in multiple steps so the first one is to introduce sdr::annotation::Annotation class in svx module, which is derived by sd::Annotation. Non-problematic functionality and members are also moved to the svx Annotation. Change-Id: Id20466b3780514ab63a9df8923b879098870ebb6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166492 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl --- sd/inc/Annotation.hxx | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) (limited to 'sd/inc/Annotation.hxx') diff --git a/sd/inc/Annotation.hxx b/sd/inc/Annotation.hxx index 965cbded3719..558271dbc04e 100644 --- a/sd/inc/Annotation.hxx +++ b/sd/inc/Annotation.hxx @@ -26,6 +26,7 @@ #include #include #include +#include #include "sdpage.hxx" #include "textapi.hxx" @@ -67,19 +68,16 @@ struct SD_DLLPUBLIC CustomAnnotationMarker }; class SAL_DLLPUBLIC_RTTI Annotation final : - public ::comphelper::WeakComponentImplHelper, - public ::cppu::PropertySetMixin + public sdr::annotation::Annotation, + public ::comphelper::WeakComponentImplHelper, + public ::cppu::PropertySetMixin { public: explicit Annotation( const css::uno::Reference& context, SdPage* pPage ); Annotation(const Annotation&) = delete; Annotation& operator=(const Annotation&) = delete; - static sal_uInt32 m_nLastId; - SdPage* GetPage() const { return mpPage; } - SdrModel* GetModel() { return (mpPage != nullptr) ? &mpPage->getSdrModelFromSdrPage() : nullptr; } - sal_uInt32 GetId() const { return m_nId; } // XInterface: virtual css::uno::Any SAL_CALL queryInterface(css::uno::Type const & type) override; @@ -141,17 +139,9 @@ private: void createChangeUndoImpl(std::unique_lock& g); - sal_uInt32 m_nId; SdPage* mpPage; - css::geometry::RealPoint2D m_Position; - css::geometry::RealSize2D m_Size; - OUString m_Author; - OUString m_Initials; - css::util::DateTime m_DateTime; rtl::Reference m_TextRange; - std::unique_ptr m_pCustomAnnotationMarker; - bool m_bIsFreeText; }; } -- cgit