summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2015-12-10 15:25:55 +0000
committerCaolán McNamara <caolanm@redhat.com>2015-12-10 15:27:07 +0000
commit3228b30f76b7d734a5bb5b825ee1cd517a893639 (patch)
tree1fd4b5c006d83989d858c37ef72043b76d605a59
parent33a230c4999ef151dd54177cada36886bd86f163 (diff)
check dynamic casts
Change-Id: Icc3eee0776fb385a5c750293811dec796458a26b (cherry picked from commit 54e95789adf05c6852db18b80a549b789a40d6d3)
-rw-r--r--lotuswordpro/source/filter/lwplayout.cxx12
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;
}