summaryrefslogtreecommitdiff
path: root/sd/source/ui
diff options
context:
space:
mode:
Diffstat (limited to 'sd/source/ui')
-rw-r--r--sd/source/ui/annotations/annotationmanager.cxx5
-rw-r--r--sd/source/ui/func/fusel.cxx8
-rw-r--r--sd/source/ui/inc/DrawViewShell.hxx2
-rw-r--r--sd/source/ui/inc/annotationmanager.hxx6
4 files changed, 21 insertions, 0 deletions
diff --git a/sd/source/ui/annotations/annotationmanager.cxx b/sd/source/ui/annotations/annotationmanager.cxx
index 000ef254b23e..e547521bdb49 100644
--- a/sd/source/ui/annotations/annotationmanager.cxx
+++ b/sd/source/ui/annotations/annotationmanager.cxx
@@ -1288,6 +1288,11 @@ void AnnotationManager::GetAnnotationState(SfxItemSet& rItemSet)
mxImpl->GetAnnotationState(rItemSet);
}
+void AnnotationManager::SelectAnnotation(rtl::Reference<sdr::annotation::Annotation> const& xAnnotation)
+{
+ mxImpl->SelectAnnotation(xAnnotation);
}
+} // end sd
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sd/source/ui/func/fusel.cxx b/sd/source/ui/func/fusel.cxx
index 0b4def5bb2b0..efc1c6ea262d 100644
--- a/sd/source/ui/func/fusel.cxx
+++ b/sd/source/ui/func/fusel.cxx
@@ -51,6 +51,7 @@
#include <DrawViewShell.hxx>
#include <ToolBarManager.hxx>
#include <Client.hxx>
+#include <annotationmanager.hxx>
#include <svx/svdundo.hxx>
@@ -865,7 +866,14 @@ bool FuSelection::MouseButtonUp(const MouseEvent& rMEvt)
{
auto& pAnnotationData = pSingleObj->getAnnotationData();
if (pAnnotationData)
+ {
+ auto* pDrawViewShell = dynamic_cast<DrawViewShell*>(mpViewShell);
+ if (pDrawViewShell && pDrawViewShell->getAnnotationManagerPtr())
+ {
+ pDrawViewShell->getAnnotationManagerPtr()->SelectAnnotation(pAnnotationData->mxAnnotation);
+ }
pAnnotationData->openPopup();
+ }
return true;
}
diff --git a/sd/source/ui/inc/DrawViewShell.hxx b/sd/source/ui/inc/DrawViewShell.hxx
index ce1e7c74cea3..f18d7913294a 100644
--- a/sd/source/ui/inc/DrawViewShell.hxx
+++ b/sd/source/ui/inc/DrawViewShell.hxx
@@ -235,6 +235,8 @@ public:
void ExecuteAnnotation (SfxRequest const & rRequest);
void GetAnnotationState (SfxItemSet& rItemSet);
+ AnnotationManager* getAnnotationManagerPtr() { return mpAnnotationManager.get(); }
+
void StartRulerDrag (const Ruler& rRuler, const MouseEvent& rMEvt);
virtual bool PrepareClose( bool bUI = true ) override;
diff --git a/sd/source/ui/inc/annotationmanager.hxx b/sd/source/ui/inc/annotationmanager.hxx
index 6f47efd1fc06..25bf5503384e 100644
--- a/sd/source/ui/inc/annotationmanager.hxx
+++ b/sd/source/ui/inc/annotationmanager.hxx
@@ -24,6 +24,11 @@
class SfxRequest;
class SfxItemSet;
+namespace sdr::annotation
+{
+class Annotation;
+}
+
namespace sd
{
class ViewShellBase;
@@ -37,6 +42,7 @@ public:
void ExecuteAnnotation(SfxRequest const& rRequest);
void GetAnnotationState(SfxItemSet& rItemSet);
+ void SelectAnnotation(rtl::Reference<sdr::annotation::Annotation> const& xAnnotation);
private:
::rtl::Reference<AnnotationManagerImpl> mxImpl;