summaryrefslogtreecommitdiff
path: root/sd/source/ui/view/drviews2.cxx
diff options
context:
space:
mode:
authorSamuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>2019-08-06 13:59:50 +0200
committerSamuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>2019-08-06 14:46:31 +0200
commit37fc9f51a8de11d40632e8cda17ccf1fa4b1f503 (patch)
treedb54c6843b2e7261b035d7be6e91ff92d351eebd /sd/source/ui/view/drviews2.cxx
parenta9cde2557242a0c343d99533f3ee032599c66f42 (diff)
Add missing hyperlink context menu entries to sd
* Impress: Add "Copy Hyperlink location" * Draw: Add "Copy Hyperlink location", "Edit hyperlink", "Remove Hyperlink" Change-Id: I1357285f8d5fa31419275c9d65cef61d2accf326 Reviewed-on: https://gerrit.libreoffice.org/77020 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Diffstat (limited to 'sd/source/ui/view/drviews2.cxx')
-rw-r--r--sd/source/ui/view/drviews2.cxx20
1 files changed, 20 insertions, 0 deletions
diff --git a/sd/source/ui/view/drviews2.cxx b/sd/source/ui/view/drviews2.cxx
index 63d5c5709d7b..036862ed0229 100644
--- a/sd/source/ui/view/drviews2.cxx
+++ b/sd/source/ui/view/drviews2.cxx
@@ -102,6 +102,7 @@
#include <vcl/graph.hxx>
#include <vcl/svapp.hxx>
+#include <vcl/unohelp2.hxx>
#include <vcl/waitobj.hxx>
#include <vcl/weld.hxx>
@@ -2164,6 +2165,25 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
}
break;
+ case SID_COPY_HYPERLINK_LOCATION:
+ {
+ OutlinerView* pOutView = mpDrawView->GetTextEditOutlinerView();
+ if ( pOutView )
+ {
+ const SvxFieldData* pField = pOutView->GetFieldAtCursor();
+ if (const SvxURLField* pURLField = dynamic_cast<const SvxURLField*>(pField))
+ {
+ uno::Reference<datatransfer::clipboard::XClipboard> xClipboard
+ = pOutView->GetWindow()->GetClipboard();
+ vcl::unohelper::TextDataObject::CopyStringTo(pURLField->GetURL(), xClipboard);
+ }
+ }
+
+ Cancel();
+ rReq.Done ();
+ }
+ break;
+
case SID_HYPERLINK_SETLINK:
{
const SfxItemSet* pReqArgs = rReq.GetArgs();