diff options
author | Tibor Nagy <nagy.tibor2@nisz.hu> | 2020-09-11 10:57:44 +0200 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2020-09-11 12:32:36 +0200 |
commit | f10ec80efd4d3437dae40748189e2ca942dc5754 (patch) | |
tree | a932c53b27a754a4a78903dfb14fc878b140518a | |
parent | bcf1917a0934417226d2357b514df398129a7fab (diff) |
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.kaganski@collabora.com>
-rw-r--r-- | sw/source/core/layout/anchoreddrawobject.cxx | 12 |
1 files changed, 9 insertions, 3 deletions
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) |