summaryrefslogtreecommitdiff
path: root/sd/inc/Annotation.hxx
diff options
context:
space:
mode:
authorTomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>2024-04-18 14:54:52 +0900
committerTomaž Vajngerl <quikee@gmail.com>2024-04-25 07:17:51 +0200
commita938ed2be520426ce7949c4fd30a6e7e31d7c279 (patch)
treea5e1ec446830a11323cdfdfcccc05e29c97aa88a /sd/inc/Annotation.hxx
parentb2b84dfa1d4f5da32f3335c59d618d385173a170 (diff)
annot: added Annotation impl. to svx, moved some thing from sd
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 <quikee@gmail.com>
Diffstat (limited to 'sd/inc/Annotation.hxx')
-rw-r--r--sd/inc/Annotation.hxx18
1 files changed, 4 insertions, 14 deletions
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 <com/sun/star/office/XAnnotation.hpp>
#include <comphelper/compbase.hxx>
#include <cppuhelper/propertysetmixin.hxx>
+#include <svx/annotation/Annotation.hxx>
#include "sdpage.hxx"
#include "textapi.hxx"
@@ -67,19 +68,16 @@ struct SD_DLLPUBLIC CustomAnnotationMarker
};
class SAL_DLLPUBLIC_RTTI Annotation final :
- public ::comphelper::WeakComponentImplHelper<css::office::XAnnotation>,
- public ::cppu::PropertySetMixin<css::office::XAnnotation>
+ public sdr::annotation::Annotation,
+ public ::comphelper::WeakComponentImplHelper<css::office::XAnnotation>,
+ public ::cppu::PropertySetMixin<css::office::XAnnotation>
{
public:
explicit Annotation( const css::uno::Reference<css::uno::XComponentContext>& 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<std::mutex>& 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<TextApiObject> m_TextRange;
-
std::unique_ptr<CustomAnnotationMarker> m_pCustomAnnotationMarker;
- bool m_bIsFreeText;
};
}