summaryrefslogtreecommitdiff
path: root/sc/source
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2016-01-12 15:34:29 +0100
committerStephan Bergmann <sbergman@redhat.com>2016-01-12 15:34:29 +0100
commit24af10f6c1aaff9fd25e969dd010f798618f2813 (patch)
tree64185488ab4f5b23a19d9a1377fc9a211eca6359 /sc/source
parent9d310b03e1ae6729144e149c0b25f94a54db7c33 (diff)
Revert "Stick to exact-type check"
This reverts commit 791ad3e170bcb5a2daedac77932dc9822f7f1092, as discussed on IRC: <sberg> os_cib, ^ or was that intentional? <os_cib> sberg: There was no reason for an exact type check. Afterwards the pointer is static_casted to an SdrRectObj anyway. <sberg> os_cib, but how is that "Afterwards..." part relevant for what the if() should actually check? <os_cib> sberg: The detective function puts some object types into a certain drawing layer (polygons, circles and rectangles). It won't find any other object type in that layer.
Diffstat (limited to 'sc/source')
-rw-r--r--sc/source/core/tool/detfunc.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/sc/source/core/tool/detfunc.cxx b/sc/source/core/tool/detfunc.cxx
index a045c36d071e..11810e3cb018 100644
--- a/sc/source/core/tool/detfunc.cxx
+++ b/sc/source/core/tool/detfunc.cxx
@@ -742,7 +742,7 @@ void ScDetectiveFunc::DeleteBox( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nR
while (pObject)
{
if ( pObject->GetLayer() == SC_LAYER_INTERN &&
- typeid(*pObject) == typeid(SdrRectObj) )
+ dynamic_cast< const SdrRectObj* >(pObject) != nullptr )
{
aObjRect = static_cast<SdrRectObj*>(pObject)->GetLogicRect();
aObjRect.Justify();