summaryrefslogtreecommitdiff
path: root/sd/source/ui/view/drviewsf.cxx
diff options
context:
space:
mode:
authorSamuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>2019-06-18 13:43:27 +0200
committerSamuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>2019-06-18 16:21:32 +0200
commit533dec5a3ddaff7ec176609edcff2cde4464747a (patch)
treebe1ff13b77e99baeb37950adbead9c9a98552172 /sd/source/ui/view/drviewsf.cxx
parent76478f9938a5f6d96ac65b3b633280024b60baed (diff)
tdf#111707 Add 'Remove Hyperlink' to context menu in Impress
"Clear formatting" no longer removes the hyperlink, as now there is a dedicated context menu entry for this. Change-Id: Ic47795b9ecb238470f853da527c648f6edb94c09 Reviewed-on: https://gerrit.libreoffice.org/74272 Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org> Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Diffstat (limited to 'sd/source/ui/view/drviewsf.cxx')
-rw-r--r--sd/source/ui/view/drviewsf.cxx21
1 files changed, 21 insertions, 0 deletions
diff --git a/sd/source/ui/view/drviewsf.cxx b/sd/source/ui/view/drviewsf.cxx
index 7c48e20a95d8..0d5081cbfd17 100644
--- a/sd/source/ui/view/drviewsf.cxx
+++ b/sd/source/ui/view/drviewsf.cxx
@@ -482,6 +482,27 @@ void DrawViewShell::GetAttrState( SfxItemSet& rSet )
}
break;
+ case SID_REMOVE_HYPERLINK:
+ {
+ OutlinerView* pOLV = mpDrawView->GetTextEditOutlinerView();
+ if (pOLV)
+ {
+ bool bField = false;
+ const SvxFieldItem* pFieldItem = pOLV->GetFieldUnderMousePointer();
+ if (!pFieldItem)
+ pFieldItem = pOLV->GetFieldAtSelection();
+ if (pFieldItem)
+ {
+ const SvxFieldData* pField = pFieldItem->GetField();
+ if (dynamic_cast<const SvxURLField*>(pField))
+ bField = true;
+ }
+ if (!bField)
+ rSet.DisableItem(nWhich);
+ }
+ }
+ break;
+
case SID_STYLE_WATERCAN:
{
std::unique_ptr<SfxPoolItem> pItem;