summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorSamuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>2019-12-04 15:19:00 +0100
committerSamuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>2019-12-05 15:59:50 +0100
commitf31c3ebb60e4678eb09e377b638b368531df47dc (patch)
tree2855d383a670d1dbc0c6c2ba5323e1e8d0357e7f /sd
parentc9a6d4bee737c3c39fc61d265dba0460b09c906f (diff)
tdf#128666 Only enable hyperlink actions when just the field is selected
Change-Id: I984df967877a47fb9f89c3626737348a87d3ffa5 Reviewed-on: https://gerrit.libreoffice.org/84418 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Diffstat (limited to 'sd')
-rw-r--r--sd/source/ui/view/drviews2.cxx3
-rw-r--r--sd/source/ui/view/drviews7.cxx15
-rw-r--r--sd/source/ui/view/drviewsf.cxx2
3 files changed, 5 insertions, 15 deletions
diff --git a/sd/source/ui/view/drviews2.cxx b/sd/source/ui/view/drviews2.cxx
index 233d4a108135..12a2b8919be6 100644
--- a/sd/source/ui/view/drviews2.cxx
+++ b/sd/source/ui/view/drviews2.cxx
@@ -1195,8 +1195,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
OutlinerView* pOutView = mpDrawView->GetTextEditOutlinerView();
if (pOutView)
pOutView->SelectFieldAtCursor();
- URLFieldHelper::RemoveURLField(mpDrawView->GetTextEditOutliner(),
- mpDrawView->GetTextEditOutlinerView());
+ URLFieldHelper::RemoveURLField(pOutView->GetEditView());
}
}
Cancel();
diff --git a/sd/source/ui/view/drviews7.cxx b/sd/source/ui/view/drviews7.cxx
index 7372d2327ff0..0874a587a3a1 100644
--- a/sd/source/ui/view/drviews7.cxx
+++ b/sd/source/ui/view/drviews7.cxx
@@ -33,6 +33,7 @@
#include <editeng/flditem.hxx>
#include <editeng/outlobj.hxx>
#include <editeng/sizeitem.hxx>
+#include <editeng/urlfieldhelper.hxx>
#include <officecfg/Office/Impress.hxx>
#include <svx/svxids.hrc>
#include <svx/svdpagv.hxx>
@@ -1449,18 +1450,8 @@ void DrawViewShell::GetMenuState( SfxItemSet &rSet )
if( mpDrawView->IsTextEdit() )
{
OutlinerView* pOLV = mpDrawView->GetTextEditOutlinerView();
- if (pOLV)
- {
- const SvxFieldItem* pFieldItem = pOLV->GetFieldUnderMousePointer();
- if (!pFieldItem)
- pFieldItem = pOLV->GetFieldAtSelection();
- if (pFieldItem)
- {
- const SvxFieldData* pField = pFieldItem->GetField();
- if (dynamic_cast<const SvxURLField*>(pField))
- bDisableEditHyperlink = false;
- }
- }
+ if (pOLV && URLFieldHelper::IsCursorAtURLField(pOLV->GetEditView()))
+ bDisableEditHyperlink = false;
}
else
{
diff --git a/sd/source/ui/view/drviewsf.cxx b/sd/source/ui/view/drviewsf.cxx
index 5977fb697140..1b46491c65c8 100644
--- a/sd/source/ui/view/drviewsf.cxx
+++ b/sd/source/ui/view/drviewsf.cxx
@@ -511,7 +511,7 @@ void DrawViewShell::GetAttrState( SfxItemSet& rSet )
case SID_REMOVE_HYPERLINK:
{
- if (!URLFieldHelper::IsCursorAtURLField(mpDrawView->GetTextEditOutlinerView()))
+ if (!URLFieldHelper::IsCursorAtURLField(mpDrawView->GetTextEditOutlinerView()->GetEditView()))
rSet.DisableItem(nWhich);
}
break;