summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorTomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>2024-06-07 12:15:28 +0900
committerTomaž Vajngerl <quikee@gmail.com>2024-06-11 12:49:15 +0200
commit7235eec702299190754af3a81186ac0aa82d5be3 (patch)
treed6c90b461918e9e84ff44e51caf926cb3c7008df /include
parent2dc9d587cb38145141a4821006a09606e6625c35 (diff)
annot: make annotation pop-up window working again
The code to open AnnotatationWindow was removed in the previous change as it needed to be changed to make it work with annotation (sdr) object. Change-Id: Ic75e4fca6b46359f29762bc4735a76204aeb90f3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168514 Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> Tested-by: Jenkins
Diffstat (limited to 'include')
-rw-r--r--include/svx/annotation/IAnnotationPopup.hxx37
-rw-r--r--include/svx/annotation/ObjectAnnotationData.hxx8
2 files changed, 45 insertions, 0 deletions
diff --git a/include/svx/annotation/IAnnotationPopup.hxx b/include/svx/annotation/IAnnotationPopup.hxx
new file mode 100644
index 000000000000..8a705ef1e935
--- /dev/null
+++ b/include/svx/annotation/IAnnotationPopup.hxx
@@ -0,0 +1,37 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#pragma once
+
+#include <svx/svxdllapi.h>
+
+#include <svx/annotation/Annotation.hxx>
+
+namespace sdr::annotation
+{
+class SVXCORE_DLLPUBLIC IAnnotationPopup
+{
+protected:
+ rtl::Reference<sdr::annotation::Annotation> mxAnnotation;
+
+public:
+ IAnnotationPopup(rtl::Reference<sdr::annotation::Annotation> const& pAnnotation)
+ : mxAnnotation(pAnnotation)
+ {
+ }
+
+ virtual ~IAnnotationPopup() {}
+
+ virtual void openPopup() = 0;
+ virtual void closePopup() = 0;
+};
+
+} // end sdr::annotation
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/annotation/ObjectAnnotationData.hxx b/include/svx/annotation/ObjectAnnotationData.hxx
index 44776638e64f..50a2f80c80ac 100644
--- a/include/svx/annotation/ObjectAnnotationData.hxx
+++ b/include/svx/annotation/ObjectAnnotationData.hxx
@@ -11,6 +11,7 @@
#include <svx/svxdllapi.h>
#include <svx/annotation/Annotation.hxx>
+#include <svx/annotation/IAnnotationPopup.hxx>
namespace sdr::annotation
{
@@ -20,6 +21,13 @@ class ObjectAnnotationData
public:
bool mbIsAnnotation : 1 = false;
rtl::Reference<sdr::annotation::Annotation> mxAnnotation;
+ std::unique_ptr<sdr::annotation::IAnnotationPopup> mpAnnotationPopup;
+
+ void openPopup()
+ {
+ if (mbIsAnnotation && mpAnnotationPopup)
+ mpAnnotationPopup->openPopup();
+ }
};
}