[Libreoffice-commits] core.git: sc/source
Stephan Bergmann (via logerrit)
logerrit at kemper.freedesktop.org
Thu Dec 3 12:42:53 UTC 2020
sc/source/core/data/drwlayer.cxx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit 520a2819fa6030ec11175d82dd42cfcdb2e92634
Author: Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Thu Dec 3 10:54:18 2020 +0100
Commit: Stephan Bergmann <sbergman at redhat.com>
CommitDate: Thu Dec 3 13:42:20 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.henschel at t-online.de>
Reviewed-by: Stephan Bergmann <sbergman at redhat.com>
Tested-by: Jenkins
diff --git a/sc/source/core/data/drwlayer.cxx b/sc/source/core/data/drwlayer.cxx
index eb329379398a..b372967806ce 100644
--- a/sc/source/core/data/drwlayer.cxx
+++ b/sc/source/core/data/drwlayer.cxx
@@ -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<SdrObjCustomShape*>(&rObj)->TakeUnrotatedSnapRect(aObjRect2);
+ static_cast<SdrMeasureObj*>(&rObj)->TakeUnrotatedSnapRect(aObjRect2);
}
else
aObjRect2 = rObj.GetLogicRect();
More information about the Libreoffice-commits
mailing list