summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSamuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>2019-08-12 12:53:38 +0200
committerSamuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>2019-08-12 16:02:08 +0200
commitcae4b4951f061a67fab779493e6992d9097f4a4d (patch)
tree7dd65245047343ef64e6502a453b174526fef8e4
parentloplugin:staticconstfield (diff)
downloadcore-cae4b4951f061a67fab779493e6992d9097f4a4d.tar.gz
core-cae4b4951f061a67fab779493e6992d9097f4a4d.zip
tdf#120734 Only enable "Remove hyperlink" when hyperlink selected
Change-Id: I4a4b7fc8adb86f6af4660e7d987a7703945c40d4 Reviewed-on: https://gerrit.libreoffice.org/77349 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
-rw-r--r--sw/source/uibase/shells/textsh1.cxx17
1 files changed, 1 insertions, 16 deletions
diff --git a/sw/source/uibase/shells/textsh1.cxx b/sw/source/uibase/shells/textsh1.cxx
index 841ca6e315f7..3f9e753f55fa 100644
--- a/sw/source/uibase/shells/textsh1.cxx
+++ b/sw/source/uibase/shells/textsh1.cxx
@@ -1748,6 +1748,7 @@ void SwTextShell::GetState( SfxItemSet &rSet )
break;
case SID_EDIT_HYPERLINK:
+ case SID_REMOVE_HYPERLINK:
case SID_COPY_HYPERLINK_LOCATION:
{
SfxItemSet aSet(GetPool(),
@@ -1760,22 +1761,6 @@ void SwTextShell::GetState( SfxItemSet &rSet )
}
}
break;
- case SID_REMOVE_HYPERLINK:
- {
- SfxItemSet aSet(GetPool(),
- svl::Items<RES_TXTATR_INETFMT,
- RES_TXTATR_INETFMT>{});
- rSh.GetCurAttr(aSet);
-
- // If a hyperlink is selected, either alone or along with other text...
- if ((aSet.GetItemState(RES_TXTATR_INETFMT) < SfxItemState::SET &&
- aSet.GetItemState(RES_TXTATR_INETFMT) != SfxItemState::DONTCARE) ||
- rSh.HasReadonlySel())
- {
- rSet.DisableItem(nWhich);
- }
- }
- break;
case SID_TRANSLITERATE_HALFWIDTH:
case SID_TRANSLITERATE_FULLWIDTH:
case SID_TRANSLITERATE_HIRAGANA: