[Libreoffice-commits] core.git: Branch 'libreoffice-5-0' - sw/source

Michael Stahl mstahl at redhat.com
Fri Oct 30 04:20:12 PDT 2015


 sw/source/core/text/itratr.cxx |   14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

New commits:
commit ae846d08b1a18d4cd8f7d59774b3f6686e383280
Author: Michael Stahl <mstahl at redhat.com>
Date:   Wed Oct 28 14:15:01 2015 +0100

    tdf#94871: sw: fix a frame formatting regression that affects help
    
    The early return must also be taken if the anchor is neither AT_CHAR nor
    AT_PARA.
    
    (regression from a219bbb62f974020fac0799143fbc51c385bb460)
    
    Change-Id: I4eccb1f80401ba620ef87342f40c1a896918f3d3
    (cherry picked from commit 9092f96c63c05833ee5319935da1078afe216b55)
    Reviewed-on: https://gerrit.libreoffice.org/19649
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>

diff --git a/sw/source/core/text/itratr.cxx b/sw/source/core/text/itratr.cxx
index 3201e7f..28f8feb 100644
--- a/sw/source/core/text/itratr.cxx
+++ b/sw/source/core/text/itratr.cxx
@@ -434,15 +434,17 @@ static void lcl_MinMaxNode( SwFrameFormat* pNd, SwMinMaxNodeArgs* pIn )
 {
     const SwFormatAnchor& rFormatA = pNd->GetAnchor();
 
-    if ((FLY_AT_PARA == rFormatA.GetAnchorId()) ||
-        (FLY_AT_CHAR == rFormatA.GetAnchorId()))
+    if ((FLY_AT_PARA != rFormatA.GetAnchorId()) &&
+        (FLY_AT_CHAR != rFormatA.GetAnchorId()))
     {
-        const SwPosition *pPos = rFormatA.GetContentAnchor();
-        OSL_ENSURE(pPos && pIn, "Unexpected NULL arguments");
-        if (!pPos || !pIn || pIn->nIndx != pPos->nNode.GetIndex())
-            return;
+        return;
     }
 
+    const SwPosition *pPos = rFormatA.GetContentAnchor();
+    OSL_ENSURE(pPos && pIn, "Unexpected NULL arguments");
+    if (!pPos || !pIn || pIn->nIndx != pPos->nNode.GetIndex())
+        return;
+
     long nMin, nMax;
     SwHTMLTableLayout *pLayout = 0;
     const bool bIsDrawFrameFormat = pNd->Which()==RES_DRAWFRMFMT;


More information about the Libreoffice-commits mailing list