summaryrefslogtreecommitdiff
path: root/lotuswordpro
diff options
context:
space:
mode:
authorChristian Lohmaier <lohmaier+LibreOffice@googlemail.com>2011-05-16 22:44:28 +0200
committerChristian Lohmaier <lohmaier+LibreOffice@googlemail.com>2011-05-16 22:44:28 +0200
commit632922d451b72e0b8ba2336f79139002df41e656 (patch)
tree5c40dd21ac27cfe4e6724517aa34a50695d5831c /lotuswordpro
parentbdc6b3c6da58a7fd4386e36577345ada1a86def1 (diff)
WaE - add explicit casting (decimal-types → integer types)
Diffstat (limited to 'lotuswordpro')
-rw-r--r--lotuswordpro/source/filter/lwpgrfobj.cxx8
-rw-r--r--lotuswordpro/source/filter/lwpsdwgrouploaderv0102.cxx8
2 files changed, 8 insertions, 8 deletions
diff --git a/lotuswordpro/source/filter/lwpgrfobj.cxx b/lotuswordpro/source/filter/lwpgrfobj.cxx
index 9d344447d035..73b436fa3f09 100644
--- a/lotuswordpro/source/filter/lwpgrfobj.cxx
+++ b/lotuswordpro/source/filter/lwpgrfobj.cxx
@@ -316,11 +316,11 @@ void LwpGraphicObject::GetRect(sal_Int32& nLeft, sal_Int32& nTop, sal_Int32& nRi
double fHeight = 0;
GetGrafScaledSize(fWidth, fHeight);
- sal_Int32 nWidth = fWidth * UNITS_PER_INCH /CM_PER_INCH;
- sal_Int32 nHeight = fHeight * UNITS_PER_INCH /CM_PER_INCH;
+ sal_Int32 nWidth = static_cast<sal_Int32>(fWidth * UNITS_PER_INCH /CM_PER_INCH);
+ sal_Int32 nHeight = static_cast<sal_Int32>(fHeight * UNITS_PER_INCH /CM_PER_INCH);
- nLeft = pLayout->GetMarginsValue(MARGIN_LEFT) * UNITS_PER_INCH /CM_PER_INCH;
- nTop = pLayout->GetMarginsValue(MARGIN_TOP)* UNITS_PER_INCH /CM_PER_INCH;
+ nLeft = static_cast<sal_Int32>(pLayout->GetMarginsValue(MARGIN_LEFT) * UNITS_PER_INCH /CM_PER_INCH);
+ nTop = static_cast<sal_Int32>(pLayout->GetMarginsValue(MARGIN_TOP) * UNITS_PER_INCH /CM_PER_INCH);
nRight = nLeft+nWidth;
nBottom = nTop+nHeight;
}
diff --git a/lotuswordpro/source/filter/lwpsdwgrouploaderv0102.cxx b/lotuswordpro/source/filter/lwpsdwgrouploaderv0102.cxx
index 8514f9b71c53..044db9d9f994 100644
--- a/lotuswordpro/source/filter/lwpsdwgrouploaderv0102.cxx
+++ b/lotuswordpro/source/filter/lwpsdwgrouploaderv0102.cxx
@@ -205,10 +205,10 @@ void LwpSdwGroupLoaderV0102::BeginDrawObjects(std::vector <XFFrame*>* pDrawObjVe
// placement: centered
if (pMyFrameLayout->GetScaleCenter())
{
- Rectangle aBoundRect(left*m_aTransformData.fScaleX + fLeftMargin,
- top*m_aTransformData.fScaleY + fTopMargin,
- right * m_aTransformData.fScaleX,
- bottom * m_aTransformData.fScaleY);
+ Rectangle aBoundRect(static_cast<long>(left*m_aTransformData.fScaleX + fLeftMargin),
+ static_cast<long>(top * m_aTransformData.fScaleY + fTopMargin),
+ static_cast<long>(right * m_aTransformData.fScaleX),
+ static_cast<long>(bottom * m_aTransformData.fScaleY));
Point aCenter = aBoundRect.Center();
double fNewCenterX = (double(left)/TWIPS_PER_CM + fFrameWidth/*-fOffsetX*/) / 2;