sw/source/uibase/shells/drwtxtex.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
New commits: commit cad293c26215855578eb218d7154ec8300960969 Author: Justin Luth <justin_l...@sil.org> AuthorDate: Tue Nov 23 10:23:37 2021 +0200 Commit: Adolfo Jayme Barrientos <fit...@ubuntu.com> CommitDate: Wed Nov 24 03:03:09 2021 +0100 tdf#131150 sw menu: use nSlotId=0 to avoid adding to set This fixes a regression in LO 6.4 caused by commit 86cb2a1f98c0585d2121e6ae34fe62f072ef9a63 Not surprisingly, adding a new condition that multiple other items match on caused a regression. bFlag is always set to false at the top of the loop. In the above commit, bFlag was not set to true, and so thus it would always be false. So just set the SlotId to 0 to avoid rSet.Put - like so many other cases already do. Change-Id: I02e9ca9d8dd75db519e801ad0e86fc8d541ae20a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125688 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <samuel.mehrbr...@allotropia.de> Reviewed-by: Justin Luth <jl...@mail.com> (cherry picked from commit 87fafdb9dc045735e235cbba2ef37198043422c7) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125707 Reviewed-by: Adolfo Jayme Barrientos <fit...@ubuntu.com> diff --git a/sw/source/uibase/shells/drwtxtex.cxx b/sw/source/uibase/shells/drwtxtex.cxx index 770b46d7e7ba..8ac84122ff41 100644 --- a/sw/source/uibase/shells/drwtxtex.cxx +++ b/sw/source/uibase/shells/drwtxtex.cxx @@ -953,6 +953,7 @@ void SwDrawTextShell::GetState(SfxItemSet& rSet) { if (!URLFieldHelper::IsCursorAtURLField(pOLV)) rSet.DisableItem(nWhich); + nSlotId = 0; } break; default: @@ -960,7 +961,7 @@ void SwDrawTextShell::GetState(SfxItemSet& rSet) break; } - if (nSlotId && bFlag) + if (nSlotId) rSet.Put(SfxBoolItem(nWhich, bFlag)); nWhich = aIter.NextWhich();