sw/source/core/access/acccontext.cxx |   16 +++-------------
 1 file changed, 3 insertions(+), 13 deletions(-)

New commits:
commit f910df50341fbc0620fe2b73a4b3b350861716b0
Author:     Michael Weghorn <m.wegh...@posteo.de>
AuthorDate: Tue Apr 29 15:00:27 2025 +0200
Commit:     Michael Weghorn <m.wegh...@posteo.de>
CommitDate: Tue Apr 29 23:07:28 2025 +0200

    sw a11y: Simplify nested if/else
    
    Change-Id: I77ba2f0e52427982527745e30d786d19e324446e
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/184775
    Tested-by: Jenkins
    Reviewed-by: Michael Weghorn <m.wegh...@posteo.de>

diff --git a/sw/source/core/access/acccontext.cxx 
b/sw/source/core/access/acccontext.cxx
index 92126437b8cb..9e85b88652dd 100644
--- a/sw/source/core/access/acccontext.cxx
+++ b/sw/source/core/access/acccontext.cxx
@@ -117,21 +117,11 @@ void SwAccessibleContext::ChildrenScrolled( const SwFrame 
*pFrame,
             if( aBox.Overlaps( rNewVisArea ) )
             {
                 if( aBox.Overlaps( rOldVisArea ) )
-                {
                     eAction = Action::SCROLLED_WITHIN;
-                }
+                else if (bVisibleChildrenOnly && 
!rLower.AlwaysIncludeAsChild())
+                    eAction = Action::SCROLLED_IN;
                 else
-                {
-                    if ( bVisibleChildrenOnly &&
-                         !rLower.AlwaysIncludeAsChild() )
-                    {
-                        eAction = Action::SCROLLED_IN;
-                    }
-                    else
-                    {
-                        eAction = Action::SCROLLED;
-                    }
-                }
+                    eAction = Action::SCROLLED;
             }
             else if( aBox.Overlaps( rOldVisArea ) )
             {

Reply via email to