summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--vbahelper/source/msforms/vbacontrol.cxx4
-rw-r--r--vbahelper/source/msforms/vbatextbox.cxx2
-rw-r--r--vbahelper/source/vbahelper/vbaapplicationbase.cxx10
-rw-r--r--vbahelper/source/vbahelper/vbahelper.cxx2
-rw-r--r--vbahelper/source/vbahelper/vbashape.cxx2
-rw-r--r--vbahelper/source/vbahelper/vbatextframe.cxx8
6 files changed, 14 insertions, 14 deletions
diff --git a/vbahelper/source/msforms/vbacontrol.cxx b/vbahelper/source/msforms/vbacontrol.cxx
index e45f05f6f896..0db919760dc6 100644
--- a/vbahelper/source/msforms/vbacontrol.cxx
+++ b/vbahelper/source/msforms/vbacontrol.cxx
@@ -722,8 +722,8 @@ sal_Int32 ScVbaControl::getBackColor()
void ScVbaControl::setBackColor( sal_Int32 nBackColor )
{
- if ( ( (sal_uInt32)nBackColor >= (sal_uInt32)0x80000000 ) &&
- ( (sal_uInt32)nBackColor <= (sal_uInt32)0x80000000 + SAL_N_ELEMENTS(nSysCols) ) )
+ if ( ( static_cast<sal_uInt32>(nBackColor) >= sal_uInt32(0x80000000) ) &&
+ ( static_cast<sal_uInt32>(nBackColor) <= sal_uInt32(0x80000000) + SAL_N_ELEMENTS(nSysCols) ) )
{
nBackColor = nSysCols[ nBackColor & 0x0FF];
}
diff --git a/vbahelper/source/msforms/vbatextbox.cxx b/vbahelper/source/msforms/vbatextbox.cxx
index b8ef93550c16..bb6e7e973100 100644
--- a/vbahelper/source/msforms/vbatextbox.cxx
+++ b/vbahelper/source/msforms/vbatextbox.cxx
@@ -78,7 +78,7 @@ ScVbaTextBox::getMaxLength()
aValue = m_xProps->getPropertyValue( "MaxTextLen" );
sal_Int16 nMaxLength = 0;
aValue >>= nMaxLength;
- return (sal_Int32)nMaxLength;
+ return static_cast<sal_Int32>(nMaxLength);
}
void SAL_CALL
diff --git a/vbahelper/source/vbahelper/vbaapplicationbase.cxx b/vbahelper/source/vbahelper/vbaapplicationbase.cxx
index 60056ef40b6a..753a389e5bb6 100644
--- a/vbahelper/source/vbahelper/vbaapplicationbase.cxx
+++ b/vbahelper/source/vbahelper/vbaapplicationbase.cxx
@@ -85,7 +85,7 @@ public:
nDiffDays += 2; // Change VisualBasic: 1.Jan.1900 == 2
long nDiffSeconds = aTimeNow.GetHour() * 3600 + aTimeNow.GetMin() * 60 + aTimeNow.GetSec();
- return (double)nDiffDays + ((double)nDiffSeconds)/(double)(24*3600);
+ return static_cast<double>(nDiffDays) + static_cast<double>(nDiffSeconds)/double(24*3600);
}
static sal_Int32 GetTimerMiliseconds( double nFrom, double nTo )
@@ -96,7 +96,7 @@ public:
else
nResult = 50;
- return (sal_Int32) nResult;
+ return static_cast<sal_Int32>(nResult);
}
void Start( const ::rtl::Reference< VbaApplicationBase >& xBase, const OUString& aFunction, double nFrom, double nTo )
@@ -140,9 +140,9 @@ struct VbaTimerInfoHash
{
size_t operator()( const VbaTimerInfo& rTimerInfo ) const
{
- return (size_t)rTimerInfo.first.hashCode()
- + (size_t)rtl_str_hashCode_WithLength( reinterpret_cast<char const *>(&rTimerInfo.second.first), sizeof( double ) )
- + (size_t)rtl_str_hashCode_WithLength( reinterpret_cast<char const *>(&rTimerInfo.second.second), sizeof( double ) );
+ return static_cast<size_t>(rTimerInfo.first.hashCode())
+ + static_cast<size_t>(rtl_str_hashCode_WithLength( reinterpret_cast<char const *>(&rTimerInfo.second.first), sizeof( double ) ))
+ + static_cast<size_t>(rtl_str_hashCode_WithLength( reinterpret_cast<char const *>(&rTimerInfo.second.second), sizeof( double ) ));
}
};
diff --git a/vbahelper/source/vbahelper/vbahelper.cxx b/vbahelper/source/vbahelper/vbahelper.cxx
index 82cd2bf197c0..8226768fb888 100644
--- a/vbahelper/source/vbahelper/vbahelper.cxx
+++ b/vbahelper/source/vbahelper/vbahelper.cxx
@@ -401,7 +401,7 @@ void PrintOutHelper( SfxViewShell const * pViewShell, const uno::Any& From, cons
}
}
else
- pDispatcher->Execute( (sal_uInt16)SID_PRINTDOC, SfxCallMode::SYNCHRON, aArgs );
+ pDispatcher->Execute( sal_uInt16(SID_PRINTDOC), SfxCallMode::SYNCHRON, aArgs );
}
diff --git a/vbahelper/source/vbahelper/vbashape.cxx b/vbahelper/source/vbahelper/vbashape.cxx
index e7aed451efe2..57b76b61d238 100644
--- a/vbahelper/source/vbahelper/vbashape.cxx
+++ b/vbahelper/source/vbahelper/vbashape.cxx
@@ -421,7 +421,7 @@ ScVbaShape::ZOrder( sal_Int32 ZOrderCmd )
m_xPropertySet->setPropertyValue( "ZOrder" , uno::makeAny( SAL_MAX_INT32 ) );
break;
case office::MsoZOrderCmd::msoSendToBack:
- m_xPropertySet->setPropertyValue( "ZOrder" , uno::makeAny( (sal_Int32)0 ) );
+ m_xPropertySet->setPropertyValue( "ZOrder" , uno::makeAny( sal_Int32(0) ) );
break;
case office::MsoZOrderCmd::msoBringForward:
nOrderPosition += 1;
diff --git a/vbahelper/source/vbahelper/vbatextframe.cxx b/vbahelper/source/vbahelper/vbatextframe.cxx
index 865ebeba3fe7..9b4810e04b91 100644
--- a/vbahelper/source/vbahelper/vbatextframe.cxx
+++ b/vbahelper/source/vbahelper/vbatextframe.cxx
@@ -78,7 +78,7 @@ float SAL_CALL
VbaTextFrame::getMarginBottom()
{
sal_Int32 nMargin = getMargin( "TextLowerDistance" );
- float fMargin = (float)Millimeter::getInPoints( nMargin );
+ float fMargin = static_cast<float>(Millimeter::getInPoints( nMargin ));
return fMargin;
}
@@ -92,7 +92,7 @@ float SAL_CALL
VbaTextFrame::getMarginTop()
{
sal_Int32 nMargin = getMargin( "TextUpperDistance" );
- float fMargin = (float)Millimeter::getInPoints( nMargin );
+ float fMargin = static_cast<float>(Millimeter::getInPoints( nMargin ));
return fMargin;
}
@@ -106,7 +106,7 @@ float SAL_CALL
VbaTextFrame::getMarginLeft()
{
sal_Int32 nMargin = getMargin( "TextLeftDistance" );
- float fMargin = (float)Millimeter::getInPoints( nMargin );
+ float fMargin = static_cast<float>(Millimeter::getInPoints( nMargin ));
return fMargin;
}
@@ -120,7 +120,7 @@ float SAL_CALL
VbaTextFrame::getMarginRight()
{
sal_Int32 nMargin = getMargin( "TextRightDistance" );
- float fMargin = (float)Millimeter::getInPoints( nMargin );
+ float fMargin = static_cast<float>(Millimeter::getInPoints( nMargin ));
return fMargin;
}