Kaydet (Commit) 4f4dcd52 authored tarafından Niklas Johansson's avatar Niklas Johansson Kaydeden (comit) Caolán McNamara

fdo#86844 - CONTEXT MENU: Remove hyperlink not accessible

At the moment Remove hyperlink is only shown when text is selected
together with a hyperlink but not when you right click directly on
a link. Let's reuse the logic from when edit hyperlink should be shown
and append it to the currently working case where text and link is
selected.

Change-Id: I2524f1c3037f3101d24e592eadf2e7d5d66ab4f9
Reviewed-on: https://gerrit.libreoffice.org/13926Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst d598c30d
...@@ -1674,7 +1674,9 @@ void SwTextShell::GetState( SfxItemSet &rSet ) ...@@ -1674,7 +1674,9 @@ void SwTextShell::GetState( SfxItemSet &rSet )
rSh.GetCurAttr(aSet); rSh.GetCurAttr(aSet);
// If a hyperlink is selected, either alone or along with other text... // If a hyperlink is selected, either alone or along with other text...
if(aSet.GetItemState( RES_TXTATR_INETFMT, true ) != SfxItemState::DONTCARE || rSh.HasReadonlySel()) if ((aSet.GetItemState(RES_TXTATR_INETFMT, true) < SfxItemState::SET &&
aSet.GetItemState(RES_TXTATR_INETFMT, true) != SfxItemState::DONTCARE) ||
rSh.HasReadonlySel())
{ {
rSet.DisableItem(nWhich); rSet.DisableItem(nWhich);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment