summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2020-12-03 10:54:18 +0100
committerStephan Bergmann <sbergman@redhat.com>2020-12-03 13:42:20 +0100
commit520a2819fa6030ec11175d82dd42cfcdb2e92634 (patch)
tree0827a8ba9e1b23f4dc2298cf243d68f71ec5bdd6 /sc
parent80646f9ab79573a1575952ac44a9450c383c0180 (diff)
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@t-online.de> Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Jenkins
Diffstat (limited to 'sc')
-rw-r--r--sc/source/core/data/drwlayer.cxx2
1 files changed, 1 insertions, 1 deletions
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();