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

Caolán McNamara caolanm at redhat.com
Wed Feb 21 17:22:25 UTC 2018


 sw/source/core/layout/ftnfrm.cxx |   13 +++++--------
 1 file changed, 5 insertions(+), 8 deletions(-)

New commits:
commit 34627ad7d03f93b89689b2e48a3985574d10f965
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue Feb 20 21:14:08 2018 +0000

    forcepoint #3
    
    Thanks to Antti Levomäki and Christian Jalio from Forcepoint.
    
    Change-Id: I5681f9123a21fee100a2eda1e8284e559ede51b4
    Reviewed-on: https://gerrit.libreoffice.org/50064
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/sw/source/core/layout/ftnfrm.cxx b/sw/source/core/layout/ftnfrm.cxx
index e8eddce278c1..206e9deac04e 100644
--- a/sw/source/core/layout/ftnfrm.cxx
+++ b/sw/source/core/layout/ftnfrm.cxx
@@ -792,14 +792,11 @@ bool SwFrame::IsFootnoteAllowed() const
     if ( !IsInDocBody() )
         return false;
 
-    if ( IsInTab() )
-    {
-        // no footnotes in repeated headlines
-        const SwTabFrame *pTab = const_cast<SwFrame*>(this)->ImplFindTabFrame();
-        assert(pTab);
-        if ( pTab->IsFollow() )
-            return !pTab->IsInHeadline( *this );
-    }
+    // no footnotes in repeated headlines
+    const SwTabFrame *pTab = IsInTab() ? const_cast<SwFrame*>(this)->ImplFindTabFrame() : nullptr;
+    if (pTab && pTab->IsFollow())
+        return !pTab->IsInHeadline( *this );
+
     return true;
 }
 


More information about the Libreoffice-commits mailing list