sw/source/core/edit/edtab.cxx |   20 +++++++++-----------
 1 file changed, 9 insertions(+), 11 deletions(-)

New commits:
commit 10c2e1f4a2158f629892356f569de01e7fea20f7
Author:     Justin Luth <jl...@mail.com>
AuthorDate: Mon May 8 11:38:30 2023 -0400
Commit:     Justin Luth <jl...@mail.com>
CommitDate: Tue May 9 15:24:07 2023 +0200

    NFC sw edtab.cxx: remove do ... while (false) without break
    
    Since original import in 2000, the clause was while(false)
    (although at that point it still had a commented out condition).
    The next change to this function remove the commented out stuff,
    leaving only a pointless do while bracket
    that has no early exit uses.
    
    Change-Id: I4e0c083a52677c3116e6d008a860b1473418d1f5
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151549
    Tested-by: Jenkins
    Reviewed-by: Justin Luth <jl...@mail.com>

diff --git a/sw/source/core/edit/edtab.cxx b/sw/source/core/edit/edtab.cxx
index 303149770208..b011a182b3ca 100644
--- a/sw/source/core/edit/edtab.cxx
+++ b/sw/source/core/edit/edtab.cxx
@@ -304,17 +304,15 @@ bool SwEditShell::GetTableBoxFormulaAttrs( SfxItemSet& 
rSet ) const
         ::GetTableSelCrs( *this, aBoxes );
     else
     {
-        do {
-            SwFrame *pFrame = GetCurrFrame();
-            do {
-                pFrame = pFrame->GetUpper();
-            } while ( pFrame && !pFrame->IsCellFrame() );
-            if ( pFrame )
-            {
-                SwTableBox *pBox = 
const_cast<SwTableBox*>(static_cast<SwCellFrame*>(pFrame)->GetTabBox());
-                aBoxes.insert( pBox );
-            }
-        } while( false );
+        SwFrame* pFrame = GetCurrFrame()->GetUpper();
+        while (pFrame && !pFrame->IsCellFrame())
+            pFrame = pFrame->GetUpper();
+
+        if (pFrame)
+        {
+            auto pBox = 
const_cast<SwTableBox*>(static_cast<SwCellFrame*>(pFrame)->GetTabBox());
+            aBoxes.insert(pBox);
+        }
     }
 
     for (size_t n = 0; n < aBoxes.size(); ++n)

Reply via email to