sw/source/uibase/shells/textsh1.cxx |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 9a16cef6f40e59d92d1bb297f40d78dfb2bb6345
Author:     Justin Luth <justin.l...@collabora.com>
AuthorDate: Thu Jan 5 08:50:08 2023 -0500
Commit:     Justin Luth <jl...@mail.com>
CommitDate: Fri Jan 6 00:31:22 2023 +0000

    tdf#115965 sw RemoveBullet: do not light-up button when NumRule
    
    Sure, most of the time it was "off" when there was either a
    bullet or a number list. However, when the selection had
    both a bullet and a number list/level, then it would light up.
    So just make it simple. If there is a numrule in the selection,
    then it shouldn't be "on".
    
    There is still one obscure case it lights up funny.
    If more than one list is selected, and the selection ends
    on a non-numbered paragraph, then RemoveBullet
    will still light up - as if there is no numbering in the selection.
    
    Change-Id: I5c37d53206918068b2994fde9774541ea988a623
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145095
    Tested-by: Jenkins
    Reviewed-by: Justin Luth <jl...@mail.com>

diff --git a/sw/source/uibase/shells/textsh1.cxx 
b/sw/source/uibase/shells/textsh1.cxx
index cf07ca3e2c74..adf0496e513a 100644
--- a/sw/source/uibase/shells/textsh1.cxx
+++ b/sw/source/uibase/shells/textsh1.cxx
@@ -2287,8 +2287,8 @@ void SwTextShell::GetState( SfxItemSet &rSet )
             break;
 
             case FN_NUM_BULLET_OFF:
-                
rSet.Put(SfxBoolItem(FN_NUM_BULLET_OFF,(!rSh.SelectionHasBullet() &&
-                    !rSh.SelectionHasNumber())));
+                rSet.Put(SfxBoolItem(FN_NUM_BULLET_OFF, 
!rSh.GetNumRuleAtCurrCursorPos() &&
+                                     !rSh.GetNumRuleAtCurrentSelection()));
             break;
 
             case FN_BUL_NUM_RULE_INDEX:

Reply via email to