[Libreoffice-commits] core.git: Branch 'libreoffice-5-1' - lotuswordpro/source
Caolán McNamara
caolanm at redhat.com
Thu Dec 10 07:27:48 PST 2015
lotuswordpro/source/filter/lwplayout.cxx | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
New commits:
commit 3228b30f76b7d734a5bb5b825ee1cd517a893639
Author: Caolán McNamara <caolanm at redhat.com>
Date: Thu Dec 10 15:25:55 2015 +0000
check dynamic casts
Change-Id: Icc3eee0776fb385a5c750293811dec796458a26b
(cherry picked from commit 54e95789adf05c6852db18b80a549b789a40d6d3)
diff --git a/lotuswordpro/source/filter/lwplayout.cxx b/lotuswordpro/source/filter/lwplayout.cxx
index d5d17973..cf3742d 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;
}
More information about the Libreoffice-commits
mailing list