sc/source/core/data/drwlayer.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
New commits: commit bb3ffb40af7f191248f3ee823a95ee40c5c3bb6c Author: Stephan Bergmann <sberg...@redhat.com> AuthorDate: Thu Dec 3 10:54:18 2020 +0100 Commit: Stephan Bergmann <sberg...@redhat.com> CommitDate: Thu Dec 3 19:50:01 2020 +0100 Fix wrong downcast ...that was presumably a typo in d0921aa753c43600272865602df3c7c2a8f13196 "tdf#137576 Improve cell anchored measure line in Calc". As seen during CppunitTest_sc_shapetest (<https://ci.libreoffice.org/job/lo_ubsan/1846/>): > /sc/source/core/data/drwlayer.cxx:2234:9: runtime error: downcast of address 0x616000395480 which does not point to an object of type 'SdrObjCustomShape' > 0x616000395480: note: object is of type 'SdrMeasureObj' > 29 02 00 36 f0 e2 c2 8f ba 2a 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 > ^~~~~~~~~~~~~~~~~~~~~~~ > vptr for 'SdrMeasureObj' > #0 0x2aba6ae92f02 in ScDrawLayer::SetCellAnchoredFromPosition(SdrObject&, ScDocument const&, short, bool) /sc/source/core/data/drwlayer.cxx:2234:9 > #1 0x2aba618db69b in sc_apitest::ScShapeTest::testTdf137576_LogicRectInDefaultMeasureline() /sc/qa/unit/scshapetest.cxx:164:5 Change-Id: I7e44ef6abb5704a3aa5841564ce989ff69960f30 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107149 Reviewed-by: Regina Henschel <rb.hensc...@t-online.de> Reviewed-by: Stephan Bergmann <sberg...@redhat.com> Tested-by: Jenkins (cherry picked from commit 520a2819fa6030ec11175d82dd42cfcdb2e92634) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107110 diff --git a/sc/source/core/data/drwlayer.cxx b/sc/source/core/data/drwlayer.cxx index 033602c4e43b..f041c5d776b6 100644 --- a/sc/source/core/data/drwlayer.cxx +++ b/sc/source/core/data/drwlayer.cxx @@ -2233,7 +2233,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<SdrObjCustomShape*>(&rObj)->TakeUnrotatedSnapRect(aObjRect2); + static_cast<SdrMeasureObj*>(&rObj)->TakeUnrotatedSnapRect(aObjRect2); } else aObjRect2 = rObj.GetLogicRect(); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits