summaryrefslogtreecommitdiff
path: root/sd/source/ui/view/drviewsf.cxx
diff options
context:
space:
mode:
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;