sw/source/core/access/accfrmobjmap.hxx |   10 ----------
 sw/source/core/access/accmap.cxx       |   20 ++++++++------------
 2 files changed, 8 insertions(+), 22 deletions(-)

New commits:
commit dbab729bca8f5d6e9a14df6c58a1a4593edbcebe
Author:     Michael Weghorn <m.wegh...@posteo.de>
AuthorDate: Fri Apr 25 08:55:43 2025 +0200
Commit:     Michael Weghorn <m.wegh...@posteo.de>
CommitDate: Fri Apr 25 13:45:30 2025 +0200

    sw a11y: Use range-based for
    
    Change-Id: I05314d7852e1d5856ca7b10bffd7254e36b659d7
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/184608
    Tested-by: Jenkins
    Reviewed-by: Michael Weghorn <m.wegh...@posteo.de>

diff --git a/sw/source/core/access/accmap.cxx b/sw/source/core/access/accmap.cxx
index 028e1d0c30aa..f19ca7e30c02 100644
--- a/sw/source/core/access/accmap.cxx
+++ b/sw/source/core/access/accmap.cxx
@@ -3040,8 +3040,7 @@ void SwAccessibleMap::InvalidateTextSelectionOfAllParas()
     // also in the current ones.
     if ( mpSelectedParas )
     {
-        SwAccessibleSelectedParas_Impl::iterator aIter = 
mpSelectedParas->begin();
-        for ( ; aIter != mpSelectedParas->end(); ++aIter )
+        for (const auto& rIter : *mpSelectedParas)
         {
             bool bSubmitEvent( false );
             if ( !pPrevSelectedParas )
@@ -3051,15 +3050,13 @@ void 
SwAccessibleMap::InvalidateTextSelectionOfAllParas()
             }
             else
             {
-                SwAccessibleSelectedParas_Impl::iterator aPrevSelected =
-                                        pPrevSelectedParas->find( 
(*aIter).first );
+                SwAccessibleSelectedParas_Impl::iterator aPrevSelected
+                    = pPrevSelectedParas->find(rIter.first);
                 if ( aPrevSelected != pPrevSelectedParas->end() )
                 {
                     // check, if selection has changed
-                    if ( (*aIter).second.nStartOfSelection !=
-                                    (*aPrevSelected).second.nStartOfSelection 
||
-                         (*aIter).second.nEndOfSelection !=
-                                    (*aPrevSelected).second.nEndOfSelection )
+                    if (rIter.second.nStartOfSelection != 
(*aPrevSelected).second.nStartOfSelection
+                        || rIter.second.nEndOfSelection != 
(*aPrevSelected).second.nEndOfSelection)
                     {
                         // changed selection
                         bSubmitEvent = true;
@@ -3075,7 +3072,7 @@ void SwAccessibleMap::InvalidateTextSelectionOfAllParas()
 
             if ( bSubmitEvent )
             {
-                rtl::Reference < SwAccessibleContext > xAcc( (*aIter).first );
+                rtl::Reference<SwAccessibleContext> xAcc(rIter.first);
                 if ( xAcc.is() && xAcc->GetFrame() )
                 {
                     const SwTextFrame* pTextFrame = 
xAcc->GetFrame()->DynCastTextFrame();
@@ -3095,10 +3092,9 @@ void SwAccessibleMap::InvalidateTextSelectionOfAllParas()
     if ( !pPrevSelectedParas )
         return;
 
-    SwAccessibleSelectedParas_Impl::iterator aIter = 
pPrevSelectedParas->begin();
-    for ( ; aIter != pPrevSelectedParas->end(); ++aIter )
+    for (const auto& rIter : *pPrevSelectedParas)
     {
-        rtl::Reference < SwAccessibleContext > xAcc( (*aIter).first );
+        rtl::Reference<SwAccessibleContext> xAcc(rIter.first);
         if ( xAcc.is() && xAcc->GetFrame() )
         {
             const SwTextFrame* pTextFrame = 
xAcc->GetFrame()->DynCastTextFrame();
commit d8ec0cba9b064c8f3ca81fe41e30c7107dd175de
Author:     Michael Weghorn <m.wegh...@posteo.de>
AuthorDate: Fri Apr 25 08:17:19 2025 +0200
Commit:     Michael Weghorn <m.wegh...@posteo.de>
CommitDate: Fri Apr 25 13:45:25 2025 +0200

    sw a11y: Drop commented out code
    
    Commented out since it was added in
    
        commit 76c549eb01dcb7b5bf28a271ce00e386f3d388ba
        Author: Steve Yin <stev...@apache.org>
        Date:   Fri Nov 29 13:03:27 2013 +0000
    
            Integrate branch of IAccessible2
    
    At first glance, this also looks like it might
    rather be relevant for the SwAccessibleChildMap
    below, not the SwAccessibleChildMapKey in which
    the comment is located. (?)
    
    Change-Id: I04139845c27118cc564b01e873b6e3d1d6df7751
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/184607
    Tested-by: Jenkins
    Reviewed-by: Michael Weghorn <m.wegh...@posteo.de>

diff --git a/sw/source/core/access/accfrmobjmap.hxx 
b/sw/source/core/access/accfrmobjmap.hxx
index 79466980939f..452eb94cea3b 100644
--- a/sw/source/core/access/accfrmobjmap.hxx
+++ b/sw/source/core/access/accfrmobjmap.hxx
@@ -54,16 +54,6 @@ public:
             return r1.m_eLayerId < r2.m_eLayerId;
     }
 
-    /* MT: Need to get this position parameter stuff in dev300 somehow...
-    //This methods are used to insert an object to the map, adding a position 
parameter.
-    std::pair< iterator, bool > insert( sal_uInt32 nOrd, Point nPos,
-                                          const SwFrameOrObj& rLower );
-    std::pair< iterator, bool > insert( const SdrObject *pObj,
-                                          const SwFrameOrObj& rLower,
-                                          const SwDoc *pDoc,
-                                          Point nPos);
-    */
-
 private:
     LayerId m_eLayerId;
     sal_uInt32 m_nOrdNum;

Reply via email to