[Libreoffice-commits] core.git: sc/source
Stephan Bergmann
sbergman at redhat.com
Tue Jan 12 05:44:36 PST 2016
sc/source/core/tool/detfunc.cxx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit 791ad3e170bcb5a2daedac77932dc9822f7f1092
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Tue Jan 12 14:40:20 2016 +0100
Stick to exact-type check
fa91dd31f39a24329d288d4e1cda28db3a16af0d "5th step to remove tools/rtti.hxx" had
changed this from an exact-type check
pObject->Type() == TYPE(SdrRectObj)
to a type-or-subtype-of check
dynamic_cast< const SdrRectObj* >(pObject) != nullptr
but SdrRectObject is not a final class (SdrCaptionObj, SdrCircObj, ... derive
from it).
Change-Id: Ia820ee5475fbaf7a00ab0093d949c3cbd3406f83
diff --git a/sc/source/core/tool/detfunc.cxx b/sc/source/core/tool/detfunc.cxx
index 11810e3..a045c36 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 &&
- dynamic_cast< const SdrRectObj* >(pObject) != nullptr )
+ typeid(*pObject) == typeid(SdrRectObj) )
{
aObjRect = static_cast<SdrRectObj*>(pObject)->GetLogicRect();
aObjRect.Justify();
More information about the Libreoffice-commits
mailing list