summaryrefslogtreecommitdiff
path: root/sd/source
diff options
context:
space:
mode:
authorJustin Luth <jluth@mail.com>2023-11-06 13:41:05 -0500
committerJustin Luth <jluth@mail.com>2023-11-15 20:04:37 +0100
commitaaca48eb12357fa5cf23054fe77554bcfff74e95 (patch)
tree154941e21bee456ccc8a23f6a5f5d5cf9bc18755 /sd/source
parent023a2de2a8ef4bdcd9877e60f8739366de3a763c (diff)
tdf#158031 editeng SID_COPY_HYPERLINK: use AlsoCheckBeforeCursor
This patch depends on prior patches for this bug report. This fixes nothing being copied if the mouse was right-clicked over that second half of the hyperlink (since a "smart" positioning set the cursor after the field instead of before it). Change-Id: I6c933224cd8d36f48f4e1f0aafaa1f45555e46d3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159015 Reviewed-by: Justin Luth <jluth@mail.com> Tested-by: Jenkins
Diffstat (limited to 'sd/source')
-rw-r--r--sd/source/ui/view/drviews2.cxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/sd/source/ui/view/drviews2.cxx b/sd/source/ui/view/drviews2.cxx
index b49e7bfc497a..fab59b59f00a 100644
--- a/sd/source/ui/view/drviews2.cxx
+++ b/sd/source/ui/view/drviews2.cxx
@@ -2280,7 +2280,9 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
OutlinerView* pOutView = mpDrawView->GetTextEditOutlinerView();
if ( pOutView )
{
- const SvxFieldData* pField = pOutView->GetFieldAtCursor();
+ const SvxFieldItem* pFieldItem
+ = pOutView->GetFieldAtSelection(/*AlsoCheckBeforeCursor=*/true);
+ const SvxFieldData* pField = pFieldItem ? pFieldItem->GetField() : nullptr;
if (const SvxURLField* pURLField = dynamic_cast<const SvxURLField*>(pField))
{
uno::Reference<datatransfer::clipboard::XClipboard> xClipboard