sw/source/core/layout/anchoreddrawobject.cxx |   12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

New commits:
commit f10ec80efd4d3437dae40748189e2ca942dc5754
Author:     Tibor Nagy <nagy.tib...@nisz.hu>
AuthorDate: Fri Sep 11 10:57:44 2020 +0200
Commit:     Mike Kaganski <mike.kagan...@collabora.com>
CommitDate: Fri Sep 11 12:32:36 2020 +0200

    Clean-up of commit I29af97001954ad353a386164b68cd22f6230e3e5
    
    Change-Id: I1963a5d899da2d122e60c4d87ca32aba4fb1f32a
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102449
    Tested-by: Jenkins
    Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com>

diff --git a/sw/source/core/layout/anchoreddrawobject.cxx 
b/sw/source/core/layout/anchoreddrawobject.cxx
index 0d7a8658b46e..81f5e6aa495b 100644
--- a/sw/source/core/layout/anchoreddrawobject.cxx
+++ b/sw/source/core/layout/anchoreddrawobject.cxx
@@ -682,9 +682,15 @@ SwRect SwAnchoredDrawObject::GetObjBoundRect() const
             nTargetWidth = nWidth * (*GetDrawObj( )->GetRelativeWidth());
         }
 
-        auto pObjCustomShape = dynamic_cast<const 
SdrObjCustomShape*>(GetDrawObj());
-        long nTargetHeight = aCurrObjRect.GetHeight( );
-        if ( GetDrawObj( )->GetRelativeHeight( ) && (!pObjCustomShape || 
!pObjCustomShape->IsAutoGrowHeight()) )
+        bool bCheck = GetDrawObj()->GetRelativeHeight();
+        if (bCheck)
+        {
+            auto pObjCustomShape = dynamic_cast<const 
SdrObjCustomShape*>(GetDrawObj());
+            bCheck = !pObjCustomShape || !pObjCustomShape->IsAutoGrowHeight();
+        }
+
+        long nTargetHeight = aCurrObjRect.GetHeight();
+        if (bCheck)
         {
             long nHeight = 0;
             if (GetDrawObj()->GetRelativeHeightRelation() == 
text::RelOrientation::FRAME)
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to