[Libreoffice-commits] core.git: sw/source

Michael Stahl (via logerrit) logerrit at kemper.freedesktop.org
Thu May 28 08:25:10 UTC 2020


 sw/source/core/layout/sectfrm.cxx |   10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

New commits:
commit 52e9262a4fb8f9c361fb079edb644cb30bb4cfee
Author:     Michael Stahl <Michael.Stahl at cib.de>
AuthorDate: Wed May 27 13:44:03 2020 +0200
Commit:     Michael Stahl <michael.stahl at cib.de>
CommitDate: Thu May 28 10:24:33 2020 +0200

    sw: convert some assert in sectfrm.cxx
    
    Change-Id: Idf0d21ea9f0ae655584b8353140ebca4889e7fb2
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94945
    Reviewed-by: Michael Stahl <michael.stahl at cib.de>
    Tested-by: Jenkins

diff --git a/sw/source/core/layout/sectfrm.cxx b/sw/source/core/layout/sectfrm.cxx
index 2ad9d79e5d1d..de9a62430822 100644
--- a/sw/source/core/layout/sectfrm.cxx
+++ b/sw/source/core/layout/sectfrm.cxx
@@ -2466,9 +2466,8 @@ SwFrame* SwFrame::GetIndPrev_() const
         const SwFrame* pCol = GetUpper()->GetUpper()->GetPrev();
         while( pCol )
         {
-            OSL_ENSURE( pCol->IsColumnFrame(), "GetIndPrev(): ColumnFrame expected" );
-            OSL_ENSURE( pCol->GetLower() && pCol->GetLower()->IsBodyFrame(),
-                    "GetIndPrev(): Where's the body?");
+            assert(pCol->IsColumnFrame());
+            assert(pCol->GetLower() && pCol->GetLower()->IsBodyFrame());
             if( static_cast<const SwLayoutFrame*>(static_cast<const SwLayoutFrame*>(pCol)->Lower())->Lower() )
                 return nullptr;
             pCol = pCol->GetPrev();
@@ -2496,9 +2495,8 @@ SwFrame* SwFrame::GetIndNext_()
         SwFrame* pCol = GetUpper()->GetUpper()->GetNext();
         while( pCol )
         {
-            OSL_ENSURE( pCol->IsColumnFrame(), "GetIndNext(): ColumnFrame expected" );
-            OSL_ENSURE( pCol->GetLower() && pCol->GetLower()->IsBodyFrame(),
-                    "GetIndNext(): Where's the body?");
+            assert(pCol->IsColumnFrame());
+            assert(pCol->GetLower() && pCol->GetLower()->IsBodyFrame());
             if( static_cast<SwLayoutFrame*>(static_cast<SwLayoutFrame*>(pCol)->Lower())->Lower() )
                 return nullptr;
             pCol = pCol->GetNext();


More information about the Libreoffice-commits mailing list