diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-12-10 15:25:55 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-12-10 15:26:45 +0000 |
commit | 54e95789adf05c6852db18b80a549b789a40d6d3 (patch) | |
tree | 0fd34affc3adaa5dab1203a89291138323d69122 | |
parent | cf029192e4ac9ce0e24ddfd880f5f9d557cf9c28 (diff) |
check dynamic casts
Change-Id: Icc3eee0776fb385a5c750293811dec796458a26b
-rw-r--r-- | lotuswordpro/source/filter/lwplayout.cxx | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lotuswordpro/source/filter/lwplayout.cxx b/lotuswordpro/source/filter/lwplayout.cxx index d5d1797343ae..cf3742d1315e 100644 --- a/lotuswordpro/source/filter/lwplayout.cxx +++ b/lotuswordpro/source/filter/lwplayout.cxx @@ -903,7 +903,7 @@ sal_uInt16 LwpMiddleLayout::GetScaleMode() return GetLayoutScale()->GetScaleMode(); rtl::Reference<LwpObject> xBase(GetBasedOnStyle()); if (xBase.is()) - return dynamic_cast<LwpMiddleLayout*>(xBase.get())->GetScaleMode(); + return dynamic_cast<LwpMiddleLayout&>(*xBase.get()).GetScaleMode(); else return (LwpLayoutScale::FIT_IN_FRAME | LwpLayoutScale::MAINTAIN_ASPECT_RATIO); } @@ -915,7 +915,7 @@ sal_uInt16 LwpMiddleLayout::GetScaleTile() ? 1 : 0; rtl::Reference<LwpObject> xBase(GetBasedOnStyle()); if (xBase.is()) - return dynamic_cast<LwpMiddleLayout*>(xBase.get())->GetScaleTile(); + return dynamic_cast<LwpMiddleLayout&>(*xBase.get()).GetScaleTile(); else return 0; } @@ -927,7 +927,7 @@ sal_uInt16 LwpMiddleLayout::GetScaleCenter() ? 1 : 0; rtl::Reference<LwpObject> xBase(GetBasedOnStyle()); if (xBase.is()) - return dynamic_cast<LwpMiddleLayout*>(xBase.get())->GetScaleCenter(); + return dynamic_cast<LwpMiddleLayout&>(*xBase.get()).GetScaleCenter(); else return 0; } @@ -938,7 +938,7 @@ sal_uInt32 LwpMiddleLayout::GetScalePercentage() return GetLayoutScale()->GetScalePercentage()/10;//m_nScalePercentage 1000 = 100% rtl::Reference<LwpObject> xBase(GetBasedOnStyle()); if (xBase.is()) - return dynamic_cast<LwpMiddleLayout*>(xBase.get())->GetScalePercentage(); + return dynamic_cast<LwpMiddleLayout&>(*xBase.get()).GetScalePercentage(); else return 100; } @@ -949,7 +949,7 @@ double LwpMiddleLayout::GetScaleWidth() return LwpTools::ConvertFromUnits(GetLayoutScale()->GetScaleWidth()); rtl::Reference<LwpObject> xBase(GetBasedOnStyle()); if (xBase.is()) - return dynamic_cast<LwpMiddleLayout*>(xBase.get())->GetScaleWidth(); + return dynamic_cast<LwpMiddleLayout&>(*xBase.get()).GetScaleWidth(); else return 0; } @@ -960,7 +960,7 @@ double LwpMiddleLayout::GetScaleHeight() return LwpTools::ConvertFromUnits(GetLayoutScale()->GetScaleHeight()); rtl::Reference<LwpObject> xBase(GetBasedOnStyle()); if (xBase.is()) - return dynamic_cast<LwpMiddleLayout*>(xBase.get())->GetScaleHeight(); + return dynamic_cast<LwpMiddleLayout&>(*xBase.get()).GetScaleHeight(); else return 0; } |