[Libreoffice-commits] core.git: sw/source
Samuel Mehrbrodt (via logerrit)
logerrit at kemper.freedesktop.org
Fri Nov 8 08:34:15 UTC 2019
sw/source/uibase/shells/textsh1.cxx | 17 ++++++++++++++++-
1 file changed, 16 insertions(+), 1 deletion(-)
New commits:
commit a70d007ad6fef6820154c394d802e66491dc1576
Author: Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
AuthorDate: Wed Nov 6 12:02:06 2019 +0100
Commit: Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
CommitDate: Fri Nov 8 09:33:13 2019 +0100
Revert "tdf#120734 Only enable "Remove hyperlink" when hyperlink selected"
This reverts commit cae4b4951f061a67fab779493e6992d9097f4a4d.
Change-Id: I06f6a828e2766058b90dde14e8efbe5759867084
Reviewed-on: https://gerrit.libreoffice.org/82228
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
diff --git a/sw/source/uibase/shells/textsh1.cxx b/sw/source/uibase/shells/textsh1.cxx
index cf45dc26e513..9f7dee3aeb2b 100644
--- a/sw/source/uibase/shells/textsh1.cxx
+++ b/sw/source/uibase/shells/textsh1.cxx
@@ -1793,7 +1793,6 @@ void SwTextShell::GetState( SfxItemSet &rSet )
break;
case SID_EDIT_HYPERLINK:
- case SID_REMOVE_HYPERLINK:
case SID_COPY_HYPERLINK_LOCATION:
{
SfxItemSet aSet(GetPool(),
@@ -1806,6 +1805,22 @@ 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:
More information about the Libreoffice-commits
mailing list