[Libreoffice-commits] core.git: sc/source
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Thu Dec 3 16:41:01 UTC 2020
sc/source/core/data/drwlayer.cxx | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
New commits:
commit 60ae45f5846f69857c46b74d153fea1ef14d3c4d
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Thu Dec 3 14:52:22 2020 +0000
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Thu Dec 3 17:40:24 2020 +0100
cid#1470396 Unchecked dynamic_cast
a static_cast should be sufficient here after the GetObjIdentifier() ==
OBJ_MEASURE check
Change-Id: Idaded0a08fd908f3fa62acfe0d6efd98e8b1503a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107169
Tested-by: Jenkins
Tested-by: Caolán McNamara <caolanm at redhat.com>
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/sc/source/core/data/drwlayer.cxx b/sc/source/core/data/drwlayer.cxx
index b372967806ce..5d8f50d14be1 100644
--- a/sc/source/core/data/drwlayer.cxx
+++ b/sc/source/core/data/drwlayer.cxx
@@ -934,7 +934,7 @@ void ScDrawLayer::InitializeCellAnchoredObj(SdrObject* pObj, ScDrawObjData& rDat
{
// Measure lines might have got wrong start and end anchor from XML import. Recreate
// anchor from start and end point.
- SdrMeasureObj* pMeasureObj = dynamic_cast<SdrMeasureObj*>(pObj);
+ SdrMeasureObj* pMeasureObj = static_cast<SdrMeasureObj*>(pObj);
// tdf#137576. The logic rectangle has likely no current values here, but only the
// 1cm x 1cm default size. The call of TakeUnrotatedSnapRect is currently (LO 7.2)
// the only way to force a recalc of the logic rectangle.
@@ -2231,7 +2231,7 @@ void ScDrawLayer::SetCellAnchoredFromPosition( SdrObject &rObj, const ScDocument
{
// tdf#137576. A SdrMeasureObj might have a wrong logic rect here. TakeUnrotatedSnapRect
// calculates the current unrotated snap rectangle, sets logic rectangle and returns it.
- static_cast<SdrMeasureObj*>(&rObj)->TakeUnrotatedSnapRect(aObjRect2);
+ static_cast<SdrMeasureObj&>(rObj).TakeUnrotatedSnapRect(aObjRect2);
}
else
aObjRect2 = rObj.GetLogicRect();
More information about the Libreoffice-commits
mailing list