summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
Diffstat (limited to 'sd')
-rw-r--r--sd/sdi/_drvwsh.sdi5
-rw-r--r--sd/source/ui/view/drviews2.cxx15
-rw-r--r--sd/source/ui/view/drviewsf.cxx21
-rw-r--r--sd/uiconfig/simpress/popupmenu/drawtext.xml1
4 files changed, 37 insertions, 5 deletions
diff --git a/sd/sdi/_drvwsh.sdi b/sd/sdi/_drvwsh.sdi
index 93a30e6757dc..8dfdf71023de 100644
--- a/sd/sdi/_drvwsh.sdi
+++ b/sd/sdi/_drvwsh.sdi
@@ -1522,6 +1522,11 @@ interface DrawView
ExecMethod = FuTemporary ;
StateMethod = GetAttrState ;
]
+ SID_REMOVE_HYPERLINK // ole : no, status : ?
+ [
+ ExecMethod = FuTemporary ;
+ StateMethod = GetAttrState ;
+ ]
SID_RULER_PAGE_POS // ole : no, status : ?
[
ExecMethod = ExecRuler ;
diff --git a/sd/source/ui/view/drviews2.cxx b/sd/source/ui/view/drviews2.cxx
index 007f3723b882..b6933d934182 100644
--- a/sd/source/ui/view/drviews2.cxx
+++ b/sd/source/ui/view/drviews2.cxx
@@ -1145,18 +1145,24 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
rReq.Done ();
break;
- case SID_SET_DEFAULT:
+ case SID_REMOVE_HYPERLINK:
{
- std::unique_ptr<SfxItemSet> pSet;
-
if (mpDrawView->IsTextEdit())
{
- ::Outliner* pOutl = mpDrawView->GetTextEditOutliner();
+ Outliner* pOutl = mpDrawView->GetTextEditOutliner();
if (pOutl)
{
pOutl->RemoveFields(checkSvxFieldData<SvxURLField>);
}
+ }
+ }
+ break;
+ case SID_SET_DEFAULT:
+ {
+ std::unique_ptr<SfxItemSet> pSet;
+ if (mpDrawView->IsTextEdit())
+ {
pSet.reset(new SfxItemSet( GetPool(), svl::Items<EE_ITEMS_START, EE_ITEMS_END>{} ));
mpDrawView->SetAttributes( *pSet, true );
}
@@ -1213,7 +1219,6 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
if( nLevel == 1 )
// text frame listens on StyleSheet of level1
pObj->NbcSetStyleSheet(pSheet, false);
-
}
}
}
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;
diff --git a/sd/uiconfig/simpress/popupmenu/drawtext.xml b/sd/uiconfig/simpress/popupmenu/drawtext.xml
index a8567fe4d272..23281741dd87 100644
--- a/sd/uiconfig/simpress/popupmenu/drawtext.xml
+++ b/sd/uiconfig/simpress/popupmenu/drawtext.xml
@@ -19,6 +19,7 @@
<menu:menuitem menu:id=".uno:OutlineBullet"/>
<menu:menuseparator/>
<menu:menuitem menu:id=".uno:OpenHyperlinkOnCursor"/>
+ <menu:menuitem menu:id=".uno:RemoveHyperlink"/>
<menu:menuitem menu:id=".uno:ThesaurusFromContext"/>
<menu:menuseparator/>
<menu:menuitem menu:id=".uno:SetDefault"/>