summaryrefslogtreecommitdiff
path: root/svx/source/unodraw
diff options
context:
space:
mode:
authorLionel Elie Mamane <lionel@mamane.lu>2013-11-08 03:08:10 +0100
committerLionel Elie Mamane <lionel@mamane.lu>2013-11-08 03:09:54 +0100
commit3cc85b071fdcf75adf8bcb3d59984940395c81e1 (patch)
treeda7f165a6eda2bf8d966f3cd3cd21fb7af50cfc2 /svx/source/unodraw
parente7fad6da680631f82684d4f248ab77d53caa4189 (diff)
earlier failure in debug mode
in the case that mpObj.get() is not a SdrOle2Obj* Change-Id: Idff7324242062665c137685096cd82284e24f0d9
Diffstat (limited to 'svx/source/unodraw')
-rw-r--r--svx/source/unodraw/unoshap4.cxx9
1 files changed, 8 insertions, 1 deletions
diff --git a/svx/source/unodraw/unoshap4.cxx b/svx/source/unodraw/unoshap4.cxx
index 768896d9da36..d26546f89d48 100644
--- a/svx/source/unodraw/unoshap4.cxx
+++ b/svx/source/unodraw/unoshap4.cxx
@@ -174,7 +174,14 @@ bool SvxOle2Shape::setPropertyValueImpl( const OUString& rName, const SfxItemPro
OUString aPersistName;
if( rValue >>= aPersistName )
{
- static_cast<SdrOle2Obj*>(mpObj.get())->SetPersistName( aPersistName );
+ SdrOle2Obj *pOle;
+#if OSL_DEBUG_LEVEL > 0
+ pOle = dynamic_cast<SdrOle2Obj*>(mpObj.get());
+ assert(pOle);
+#else
+ pOle = static_cast<SdrOle2Obj*>(mpObj.get());
+#endif
+ pOle->SetPersistName( aPersistName );
return true;
}
break;