summaryrefslogtreecommitdiff
path: root/toolkit/source/awt
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2018-01-12 20:13:22 +0100
committerStephan Bergmann <sbergman@redhat.com>2018-01-12 20:13:22 +0100
commit75ca2d04abc96f88ee63852e070f84984f27ad3f (patch)
tree39be302f78a5c274df2d721cb1a3072644e7a964 /toolkit/source/awt
parent8456c2ba408b3bed160d3e5f050738301b225bd5 (diff)
More loplugin:cstylecast: toolkit
auto-rewrite with <https://gerrit.libreoffice.org/#/c/47798/> "Enable loplugin:cstylecast for some more cases" plus solenv/clang-format/reformat-formatted-files Change-Id: Iaee0fee0cbc6e5311342b83d847cb89bd1056973
Diffstat (limited to 'toolkit/source/awt')
-rw-r--r--toolkit/source/awt/scrollabledialog.cxx2
-rw-r--r--toolkit/source/awt/vclxaccessiblecomponent.cxx4
-rw-r--r--toolkit/source/awt/vclxcontainer.cxx2
-rw-r--r--toolkit/source/awt/vclxgraphics.cxx18
-rw-r--r--toolkit/source/awt/vclxmenu.cxx8
-rw-r--r--toolkit/source/awt/vclxspinbutton.cxx3
-rw-r--r--toolkit/source/awt/vclxtoolkit.cxx2
-rw-r--r--toolkit/source/awt/vclxtopwindow.cxx2
-rw-r--r--toolkit/source/awt/vclxwindow.cxx28
-rw-r--r--toolkit/source/awt/vclxwindow1.cxx2
-rw-r--r--toolkit/source/awt/vclxwindows.cxx64
11 files changed, 67 insertions, 68 deletions
diff --git a/toolkit/source/awt/scrollabledialog.cxx b/toolkit/source/awt/scrollabledialog.cxx
index 230d53e14471..0a808114a17f 100644
--- a/toolkit/source/awt/scrollabledialog.cxx
+++ b/toolkit/source/awt/scrollabledialog.cxx
@@ -112,7 +112,7 @@ void ScrollableDialog::lcl_Scroll( long nX, long nY )
IMPL_LINK( ScrollableDialog, ScrollBarHdl, ScrollBar*, pSB, void )
{
- sal_uInt16 nPos = (sal_uInt16) pSB->GetThumbPos();
+ sal_uInt16 nPos = static_cast<sal_uInt16>(pSB->GetThumbPos());
if( pSB == maVScrollBar.get() )
lcl_Scroll(mnScrollPos.X(), nPos );
else if( pSB == maHScrollBar.get() )
diff --git a/toolkit/source/awt/vclxaccessiblecomponent.cxx b/toolkit/source/awt/vclxaccessiblecomponent.cxx
index fde43fd16a89..a94714d51096 100644
--- a/toolkit/source/awt/vclxaccessiblecomponent.cxx
+++ b/toolkit/source/awt/vclxaccessiblecomponent.cxx
@@ -503,7 +503,7 @@ uno::Reference< accessibility::XAccessible > VCLXAccessibleComponent::getAccessi
uno::Reference< accessibility::XAccessible > xAcc;
if ( GetWindow() )
{
- vcl::Window* pChild = GetWindow()->GetAccessibleChildWindow( (sal_uInt16)i );
+ vcl::Window* pChild = GetWindow()->GetAccessibleChildWindow( static_cast<sal_uInt16>(i) );
if ( pChild )
xAcc = pChild->GetAccessible();
}
@@ -735,7 +735,7 @@ sal_Int32 SAL_CALL VCLXAccessibleComponent::getForeground( )
aFont = pWindow->GetFont();
nColor = aFont.GetColor().GetColor();
// COL_AUTO is not very meaningful for AT
- if ( nColor == (sal_Int32)COL_AUTO)
+ if ( nColor == sal_Int32(COL_AUTO))
nColor = pWindow->GetTextColor().GetColor();
}
}
diff --git a/toolkit/source/awt/vclxcontainer.cxx b/toolkit/source/awt/vclxcontainer.cxx
index 3e86c74d1c50..27be3f5e6c98 100644
--- a/toolkit/source/awt/vclxcontainer.cxx
+++ b/toolkit/source/awt/vclxcontainer.cxx
@@ -128,7 +128,7 @@ void VCLXContainer::setTabOrder( const css::uno::Sequence< css::uno::Reference<
SolarMutexGuard aGuard;
sal_uInt32 nCount = Components.getLength();
- DBG_ASSERT( nCount == (sal_uInt32)Tabs.getLength(), "setTabOrder: TabCount != ComponentCount" );
+ DBG_ASSERT( nCount == static_cast<sal_uInt32>(Tabs.getLength()), "setTabOrder: TabCount != ComponentCount" );
const css::uno::Reference< css::awt::XWindow > * pComps = Components.getConstArray();
const css::uno::Any* pTabs = Tabs.getConstArray();
diff --git a/toolkit/source/awt/vclxgraphics.cxx b/toolkit/source/awt/vclxgraphics.cxx
index 6d8559b25820..a250142a5952 100644
--- a/toolkit/source/awt/vclxgraphics.cxx
+++ b/toolkit/source/awt/vclxgraphics.cxx
@@ -192,28 +192,28 @@ void VCLXGraphics::setTextColor( sal_Int32 nColor )
{
SolarMutexGuard aGuard;
- maTextColor = Color( (sal_uInt32)nColor );
+ maTextColor = Color( static_cast<sal_uInt32>(nColor) );
}
void VCLXGraphics::setTextFillColor( sal_Int32 nColor )
{
SolarMutexGuard aGuard;
- maTextFillColor = Color( (sal_uInt32)nColor );
+ maTextFillColor = Color( static_cast<sal_uInt32>(nColor) );
}
void VCLXGraphics::setLineColor( sal_Int32 nColor )
{
SolarMutexGuard aGuard;
- maLineColor = Color( (sal_uInt32)nColor );
+ maLineColor = Color( static_cast<sal_uInt32>(nColor) );
}
void VCLXGraphics::setFillColor( sal_Int32 nColor )
{
SolarMutexGuard aGuard;
- maFillColor = Color( (sal_uInt32)nColor );
+ maFillColor = Color( static_cast<sal_uInt32>(nColor) );
}
void VCLXGraphics::setRasterOp( awt::RasterOperation eROP )
@@ -310,14 +310,14 @@ void VCLXGraphics::draw( const uno::Reference< awt::XDisplayBitmap >& rxBitmapHa
if(nDestWidth != nSourceWidth)
{
- float zoomX = (float)nDestWidth / (float)nSourceWidth;
- aSz.Width() = (long) ((float)aSz.Width() * zoomX);
+ float zoomX = static_cast<float>(nDestWidth) / static_cast<float>(nSourceWidth);
+ aSz.Width() = static_cast<long>(static_cast<float>(aSz.Width()) * zoomX);
}
if(nDestHeight != nSourceHeight)
{
- float zoomY = (float)nDestHeight / (float)nSourceHeight;
- aSz.Height() = (long) ((float)aSz.Height() * zoomY);
+ float zoomY = static_cast<float>(nDestHeight) / static_cast<float>(nSourceHeight);
+ aSz.Height() = static_cast<long>(static_cast<float>(aSz.Height()) * zoomY);
}
if(nSourceX || nSourceY || aSz.Width() != nSourceWidth || aSz.Height() != nSourceHeight)
@@ -400,7 +400,7 @@ void VCLXGraphics::drawPolyPolygon( const uno::Sequence< uno::Sequence< sal_Int3
if( mpOutputDevice )
{
InitOutputDevice( InitOutDevFlags::COLORS );
- sal_uInt16 nPolys = (sal_uInt16) DataX.getLength();
+ sal_uInt16 nPolys = static_cast<sal_uInt16>(DataX.getLength());
tools::PolyPolygon aPolyPoly( nPolys );
for ( sal_uInt16 n = 0; n < nPolys; n++ )
aPolyPoly[n] = VCLUnoHelper::CreatePolygon( DataX.getConstArray()[n], DataY.getConstArray()[n] );
diff --git a/toolkit/source/awt/vclxmenu.cxx b/toolkit/source/awt/vclxmenu.cxx
index 93e78e301e2c..741f38dffdaa 100644
--- a/toolkit/source/awt/vclxmenu.cxx
+++ b/toolkit/source/awt/vclxmenu.cxx
@@ -322,11 +322,11 @@ void VCLXMenu::removeItem(
if (!mpMenu)
return;
- sal_Int32 nItemCount = (sal_Int32)mpMenu->GetItemCount();
+ sal_Int32 nItemCount = static_cast<sal_Int32>(mpMenu->GetItemCount());
if ( ( nCount > 0 ) && ( nPos >= 0 ) && ( nPos < nItemCount ) && ( nItemCount > 0 ))
{
sal_Int16 nP = sal::static_int_cast< sal_Int16 >(
- std::min( (int)(nPos+nCount), (int)nItemCount ));
+ std::min( static_cast<int>(nPos+nCount), static_cast<int>(nItemCount) ));
while( nP-nPos > 0 )
mpMenu->RemoveItem( --nP );
}
@@ -603,7 +603,7 @@ namespace
{
css::awt::KeyEvent aAWTKey;
aAWTKey.Modifiers = 0;
- aAWTKey.KeyCode = (sal_Int16)aVCLKey.GetCode();
+ aAWTKey.KeyCode = static_cast<sal_Int16>(aVCLKey.GetCode());
if (aVCLKey.IsShift())
aAWTKey.Modifiers |= css::awt::KeyModifier::SHIFT;
@@ -623,7 +623,7 @@ namespace
bool bMod1 = ((aAWTKey.Modifiers & css::awt::KeyModifier::MOD1 ) == css::awt::KeyModifier::MOD1 );
bool bMod2 = ((aAWTKey.Modifiers & css::awt::KeyModifier::MOD2 ) == css::awt::KeyModifier::MOD2 );
bool bMod3 = ((aAWTKey.Modifiers & css::awt::KeyModifier::MOD3 ) == css::awt::KeyModifier::MOD3 );
- sal_uInt16 nKey = (sal_uInt16)aAWTKey.KeyCode;
+ sal_uInt16 nKey = static_cast<sal_uInt16>(aAWTKey.KeyCode);
return vcl::KeyCode(nKey, bShift, bMod1, bMod2, bMod3);
}
diff --git a/toolkit/source/awt/vclxspinbutton.cxx b/toolkit/source/awt/vclxspinbutton.cxx
index a6aef4795ba4..2288524e8496 100644
--- a/toolkit/source/awt/vclxspinbutton.cxx
+++ b/toolkit/source/awt/vclxspinbutton.cxx
@@ -311,8 +311,7 @@ namespace toolkit
break;
case BASEPROPERTY_ORIENTATION:
- aReturn <<= (sal_Int32)
- ( ( 0 != ( GetWindow()->GetStyle() & WB_HSCROLL ) )
+ aReturn <<= static_cast<sal_Int32>( ( 0 != ( GetWindow()->GetStyle() & WB_HSCROLL ) )
? ScrollBarOrientation::HORIZONTAL
: ScrollBarOrientation::VERTICAL
);
diff --git a/toolkit/source/awt/vclxtoolkit.cxx b/toolkit/source/awt/vclxtoolkit.cxx
index 744306d01ec9..2dc9dd02eccb 100644
--- a/toolkit/source/awt/vclxtoolkit.cxx
+++ b/toolkit/source/awt/vclxtoolkit.cxx
@@ -1329,7 +1329,7 @@ css::uno::Sequence< css::uno::Reference< css::awt::XWindowPeer > > VCLXToolkit::
if ( aDescr.ParentIndex == -1 )
aDescr.Parent = nullptr;
- else if ( ( aDescr.ParentIndex >= 0 ) && ( aDescr.ParentIndex < (short)n ) )
+ else if ( ( aDescr.ParentIndex >= 0 ) && ( aDescr.ParentIndex < static_cast<short>(n) ) )
aDescr.Parent = aSeq.getConstArray()[aDescr.ParentIndex];
aSeq.getArray()[n] = createWindow( aDescr );
}
diff --git a/toolkit/source/awt/vclxtopwindow.cxx b/toolkit/source/awt/vclxtopwindow.cxx
index 17d79d7bfecd..69330da50fa6 100644
--- a/toolkit/source/awt/vclxtopwindow.cxx
+++ b/toolkit/source/awt/vclxtopwindow.cxx
@@ -227,7 +227,7 @@ void SAL_CALL VCLXTopWindow_Base::setDisplay( ::sal_Int32 _display )
{
SolarMutexGuard aGuard;
- if ( ( _display < 0 ) || ( _display >= (sal_Int32)Application::GetScreenCount() ) )
+ if ( ( _display < 0 ) || ( _display >= static_cast<sal_Int32>(Application::GetScreenCount()) ) )
throw IndexOutOfBoundsException();
SystemWindow* pWindow = dynamic_cast< SystemWindow* >( GetWindowImpl() );
diff --git a/toolkit/source/awt/vclxwindow.cxx b/toolkit/source/awt/vclxwindow.cxx
index f0a3cd605588..fb1fdb11a1cb 100644
--- a/toolkit/source/awt/vclxwindow.cxx
+++ b/toolkit/source/awt/vclxwindow.cxx
@@ -1137,7 +1137,7 @@ void VCLXWindow::setBackground( sal_Int32 nColor )
if ( GetWindow() )
{
- Color aColor( (sal_uInt32)nColor );
+ Color aColor( static_cast<sal_uInt32>(nColor) );
GetWindow()->SetBackground( aColor );
GetWindow()->SetControlBackground( aColor );
@@ -1211,7 +1211,7 @@ void VCLXWindow::setForeground( sal_Int32 nColor )
if ( GetWindow() )
{
- Color aColor( (sal_uInt32)nColor );
+ Color aColor( static_cast<sal_uInt32>(nColor) );
GetWindow()->SetControlForeground( aColor );
}
}
@@ -1282,7 +1282,7 @@ void VCLXWindow::PushPropertyIds( std::vector< sal_uInt16 > &rIds,
for ( int nId = nFirstId; nId != BASEPROPERTY_NOTFOUND;
nId = va_arg( pVarArgs, int ) )
- rIds.push_back( (sal_uInt16) nId );
+ rIds.push_back( static_cast<sal_uInt16>(nId) );
va_end( pVarArgs );
}
@@ -2001,10 +2001,10 @@ css::uno::Any VCLXWindow::getProperty( const OUString& PropertyName )
}
break;
case BASEPROPERTY_BACKGROUNDCOLOR:
- aProp <<= (sal_Int32) GetWindow()->GetControlBackground().GetColor();
+ aProp <<= static_cast<sal_Int32>(GetWindow()->GetControlBackground().GetColor());
break;
case BASEPROPERTY_DISPLAYBACKGROUNDCOLOR:
- aProp <<= (sal_Int32) GetWindow()->GetDisplayBackground().GetColor().GetColor();
+ aProp <<= static_cast<sal_Int32>(GetWindow()->GetDisplayBackground().GetColor().GetColor());
break;
case BASEPROPERTY_FONTRELIEF:
aProp <<= (sal_Int16) GetWindow()->GetControlFont().GetRelief();
@@ -2013,16 +2013,16 @@ css::uno::Any VCLXWindow::getProperty( const OUString& PropertyName )
aProp <<= (sal_Int16) GetWindow()->GetControlFont().GetEmphasisMark();
break;
case BASEPROPERTY_TEXTCOLOR:
- aProp <<= (sal_Int32) GetWindow()->GetControlForeground().GetColor();
+ aProp <<= static_cast<sal_Int32>(GetWindow()->GetControlForeground().GetColor());
break;
case BASEPROPERTY_TEXTLINECOLOR:
- aProp <<= (sal_Int32) GetWindow()->GetTextLineColor().GetColor();
+ aProp <<= static_cast<sal_Int32>(GetWindow()->GetTextLineColor().GetColor());
break;
case BASEPROPERTY_FILLCOLOR:
- aProp <<= (sal_Int32) GetWindow()->GetFillColor().GetColor();
+ aProp <<= static_cast<sal_Int32>(GetWindow()->GetFillColor().GetColor());
break;
case BASEPROPERTY_LINECOLOR:
- aProp <<= (sal_Int32) GetWindow()->GetLineColor().GetColor();
+ aProp <<= static_cast<sal_Int32>(GetWindow()->GetLineColor().GetColor());
break;
case BASEPROPERTY_BORDER:
{
@@ -2064,11 +2064,11 @@ css::uno::Any VCLXWindow::getProperty( const OUString& PropertyName )
{
WinBits nStyle = GetWindow()->GetStyle();
if ( nStyle & WB_LEFT )
- aProp <<= (sal_Int16) PROPERTY_ALIGN_LEFT;
+ aProp <<= sal_Int16(PROPERTY_ALIGN_LEFT);
else if ( nStyle & WB_CENTER )
- aProp <<= (sal_Int16) PROPERTY_ALIGN_CENTER;
+ aProp <<= sal_Int16(PROPERTY_ALIGN_CENTER);
else if ( nStyle & WB_RIGHT )
- aProp <<= (sal_Int16) PROPERTY_ALIGN_RIGHT;
+ aProp <<= sal_Int16(PROPERTY_ALIGN_RIGHT);
}
break;
default: break;
@@ -2119,11 +2119,11 @@ css::uno::Any VCLXWindow::getProperty( const OUString& PropertyName )
break;
case BASEPROPERTY_SYMBOL_COLOR:
- aProp <<= (sal_Int32)GetWindow()->GetSettings().GetStyleSettings().GetButtonTextColor().GetColor();
+ aProp <<= static_cast<sal_Int32>(GetWindow()->GetSettings().GetStyleSettings().GetButtonTextColor().GetColor());
break;
case BASEPROPERTY_BORDERCOLOR:
- aProp <<= (sal_Int32)GetWindow()->GetSettings().GetStyleSettings().GetMonoColor().GetColor();
+ aProp <<= static_cast<sal_Int32>(GetWindow()->GetSettings().GetStyleSettings().GetMonoColor().GetColor());
break;
}
}
diff --git a/toolkit/source/awt/vclxwindow1.cxx b/toolkit/source/awt/vclxwindow1.cxx
index 613fbb0b1fe8..f774ab13ab51 100644
--- a/toolkit/source/awt/vclxwindow1.cxx
+++ b/toolkit/source/awt/vclxwindow1.cxx
@@ -86,7 +86,7 @@ void VCLXWindow::SetSystemParent_Impl( const css::uno::Any& rHandle )
#elif defined( IOS )
// Nothing
#elif defined( UNX )
- aSysParentData.aWindow = (long)nHandle;
+ aSysParentData.aWindow = static_cast<long>(nHandle);
aSysParentData.bXEmbedSupport = bXEmbed;
#endif
diff --git a/toolkit/source/awt/vclxwindows.cxx b/toolkit/source/awt/vclxwindows.cxx
index 41ca3c429955..70bea4148914 100644
--- a/toolkit/source/awt/vclxwindows.cxx
+++ b/toolkit/source/awt/vclxwindows.cxx
@@ -131,19 +131,19 @@ namespace toolkit
sal_Int32 nWhiteLuminance = Color( COL_WHITE ).GetLuminance();
Color aLightShadow( nBackgroundColor );
- aLightShadow.IncreaseLuminance( (sal_uInt8)( ( nWhiteLuminance - nBackgroundLuminance ) * 2 / 3 ) );
+ aLightShadow.IncreaseLuminance( static_cast<sal_uInt8>( ( nWhiteLuminance - nBackgroundLuminance ) * 2 / 3 ) );
aStyleSettings.SetLightBorderColor( aLightShadow );
Color aLight( nBackgroundColor );
- aLight.IncreaseLuminance( (sal_uInt8)( ( nWhiteLuminance - nBackgroundLuminance ) * 1 / 3 ) );
+ aLight.IncreaseLuminance( static_cast<sal_uInt8>( ( nWhiteLuminance - nBackgroundLuminance ) * 1 / 3 ) );
aStyleSettings.SetLightColor( aLight );
Color aShadow( nBackgroundColor );
- aShadow.DecreaseLuminance( (sal_uInt8)( nBackgroundLuminance * 1 / 3 ) );
+ aShadow.DecreaseLuminance( static_cast<sal_uInt8>( nBackgroundLuminance * 1 / 3 ) );
aStyleSettings.SetShadowColor( aShadow );
Color aDarkShadow( nBackgroundColor );
- aDarkShadow.DecreaseLuminance( (sal_uInt8)( nBackgroundLuminance * 2 / 3 ) );
+ aDarkShadow.DecreaseLuminance( static_cast<sal_uInt8>( nBackgroundLuminance * 2 / 3 ) );
aStyleSettings.SetDarkShadowColor( aDarkShadow );
}
@@ -195,9 +195,9 @@ namespace toolkit
StyleSettings aStyleSettings = _pWindow->GetSettings().GetStyleSettings();
if ( aStyleSettings.GetOptions() & StyleSettingsOptions::Mono )
- aEffect <<= (sal_Int16)FLAT;
+ aEffect <<= sal_Int16(FLAT);
else
- aEffect <<= (sal_Int16)LOOK3D;
+ aEffect <<= sal_Int16(LOOK3D);
return aEffect;
}
}
@@ -557,7 +557,7 @@ css::uno::Any VCLXButton::getProperty( const OUString& PropertyName )
{
if ( GetWindow()->GetType() == WindowType::PUSHBUTTON )
{
- aProp <<= (sal_Int16)static_cast<PushButton*>(pButton.get())->GetState();
+ aProp <<= static_cast<sal_Int16>(static_cast<PushButton*>(pButton.get())->GetState());
}
}
break;
@@ -998,7 +998,7 @@ css::uno::Any VCLXCheckBox::getProperty( const OUString& PropertyName )
aProp <<= pCheckBox->IsTriStateEnabled();
break;
case BASEPROPERTY_STATE:
- aProp <<= (sal_Int16)pCheckBox->GetState();
+ aProp <<= static_cast<sal_Int16>(pCheckBox->GetState());
break;
default:
{
@@ -1173,7 +1173,7 @@ css::uno::Any VCLXRadioButton::getProperty( const OUString& PropertyName )
aProp = ::toolkit::getVisualEffect( pButton );
break;
case BASEPROPERTY_STATE:
- aProp <<= (sal_Int16) ( pButton->IsChecked() ? 1 : 0 );
+ aProp <<= static_cast<sal_Int16>( pButton->IsChecked() ? 1 : 0 );
break;
case BASEPROPERTY_AUTOTOGGLE:
aProp <<= pButton->IsRadioCheckEnabled();
@@ -1937,7 +1937,7 @@ css::uno::Any VCLXListBox::getProperty( const OUString& PropertyName )
break;
case BASEPROPERTY_LINECOUNT:
{
- aProp <<= (sal_Int16) pListBox->GetDropDownLineCount();
+ aProp <<= static_cast<sal_Int16>(pListBox->GetDropDownLineCount());
}
break;
case BASEPROPERTY_STRINGITEMLIST:
@@ -3991,10 +3991,10 @@ css::uno::Any VCLXEdit::getProperty( const OUString& PropertyName )
aProp <<= pEdit->IsReadOnly();
break;
case BASEPROPERTY_ECHOCHAR:
- aProp <<= (sal_Int16) pEdit->GetEchoChar();
+ aProp <<= static_cast<sal_Int16>(pEdit->GetEchoChar());
break;
case BASEPROPERTY_MAXTEXTLEN:
- aProp <<= (sal_Int16) pEdit->GetMaxTextLen();
+ aProp <<= static_cast<sal_Int16>(pEdit->GetMaxTextLen());
break;
default:
{
@@ -4356,7 +4356,7 @@ css::uno::Any VCLXComboBox::getProperty( const OUString& PropertyName )
{
case BASEPROPERTY_LINECOUNT:
{
- aProp <<= (sal_Int16) pComboBox->GetDropDownLineCount();
+ aProp <<= static_cast<sal_Int16>(pComboBox->GetDropDownLineCount());
}
break;
case BASEPROPERTY_AUTOCOMPLETE:
@@ -5426,7 +5426,7 @@ void VCLXNumericField::setValue( double Value )
// (e.g., input 105 using 2 digits returns 1,05)
// Thus, to set a value of 1,05, insert 105 and 2 digits
pNumericFormatter->SetValue(
- (long)ImplCalcLongValue( Value, pNumericFormatter->GetDecimalDigits() ) );
+ static_cast<long>(ImplCalcLongValue( Value, pNumericFormatter->GetDecimalDigits() )) );
// #107218# Call same listeners like VCL would do after user interaction
VclPtr< Edit > pEdit = GetAs< Edit >();
@@ -5446,7 +5446,7 @@ double VCLXNumericField::getValue()
NumericFormatter* pNumericFormatter = static_cast<NumericFormatter*>(GetFormatter());
return pNumericFormatter
- ? ImplCalcDoubleValue( (double)pNumericFormatter->GetValue(), pNumericFormatter->GetDecimalDigits() )
+ ? ImplCalcDoubleValue( static_cast<double>(pNumericFormatter->GetValue()), pNumericFormatter->GetDecimalDigits() )
: 0;
}
@@ -5457,7 +5457,7 @@ void VCLXNumericField::setMin( double Value )
NumericFormatter* pNumericFormatter = static_cast<NumericFormatter*>(GetFormatter());
if ( pNumericFormatter )
pNumericFormatter->SetMin(
- (long)ImplCalcLongValue( Value, pNumericFormatter->GetDecimalDigits() ) );
+ static_cast<long>(ImplCalcLongValue( Value, pNumericFormatter->GetDecimalDigits() )) );
}
double VCLXNumericField::getMin()
@@ -5466,7 +5466,7 @@ double VCLXNumericField::getMin()
NumericFormatter* pNumericFormatter = static_cast<NumericFormatter*>(GetFormatter());
return pNumericFormatter
- ? ImplCalcDoubleValue( (double)pNumericFormatter->GetMin(), pNumericFormatter->GetDecimalDigits() )
+ ? ImplCalcDoubleValue( static_cast<double>(pNumericFormatter->GetMin()), pNumericFormatter->GetDecimalDigits() )
: 0;
}
@@ -5477,7 +5477,7 @@ void VCLXNumericField::setMax( double Value )
NumericFormatter* pNumericFormatter = static_cast<NumericFormatter*>(GetFormatter());
if ( pNumericFormatter )
pNumericFormatter->SetMax(
- (long)ImplCalcLongValue( Value, pNumericFormatter->GetDecimalDigits() ) );
+ static_cast<long>(ImplCalcLongValue( Value, pNumericFormatter->GetDecimalDigits() )) );
}
double VCLXNumericField::getMax()
@@ -5486,7 +5486,7 @@ double VCLXNumericField::getMax()
NumericFormatter* pNumericFormatter = static_cast<NumericFormatter*>(GetFormatter());
return pNumericFormatter
- ? ImplCalcDoubleValue( (double)pNumericFormatter->GetMax(), pNumericFormatter->GetDecimalDigits() )
+ ? ImplCalcDoubleValue( static_cast<double>(pNumericFormatter->GetMax()), pNumericFormatter->GetDecimalDigits() )
: 0;
}
@@ -5497,7 +5497,7 @@ void VCLXNumericField::setFirst( double Value )
VclPtr< NumericField > pNumericField = GetAs< NumericField >();
if ( pNumericField )
pNumericField->SetFirst(
- (long)ImplCalcLongValue( Value, pNumericField->GetDecimalDigits() ) );
+ static_cast<long>(ImplCalcLongValue( Value, pNumericField->GetDecimalDigits() )) );
}
double VCLXNumericField::getFirst()
@@ -5506,7 +5506,7 @@ double VCLXNumericField::getFirst()
VclPtr< NumericField > pNumericField = GetAs< NumericField >();
return pNumericField
- ? ImplCalcDoubleValue( (double)pNumericField->GetFirst(), pNumericField->GetDecimalDigits() )
+ ? ImplCalcDoubleValue( static_cast<double>(pNumericField->GetFirst()), pNumericField->GetDecimalDigits() )
: 0;
}
@@ -5517,7 +5517,7 @@ void VCLXNumericField::setLast( double Value )
VclPtr< NumericField > pNumericField = GetAs< NumericField >();
if ( pNumericField )
pNumericField->SetLast(
- (long)ImplCalcLongValue( Value, pNumericField->GetDecimalDigits() ) );
+ static_cast<long>(ImplCalcLongValue( Value, pNumericField->GetDecimalDigits() )) );
}
double VCLXNumericField::getLast()
@@ -5526,7 +5526,7 @@ double VCLXNumericField::getLast()
VclPtr< NumericField > pNumericField = GetAs< NumericField >();
return pNumericField
- ? ImplCalcDoubleValue( (double)pNumericField->GetLast(), pNumericField->GetDecimalDigits() )
+ ? ImplCalcDoubleValue( static_cast<double>(pNumericField->GetLast()), pNumericField->GetDecimalDigits() )
: 0;
}
@@ -5548,7 +5548,7 @@ void VCLXNumericField::setSpinSize( double Value )
VclPtr< NumericField > pNumericField = GetAs< NumericField >();
if ( pNumericField )
pNumericField->SetSpinSize(
- (long)ImplCalcLongValue( Value, pNumericField->GetDecimalDigits() ) );
+ static_cast<long>(ImplCalcLongValue( Value, pNumericField->GetDecimalDigits() )) );
}
double VCLXNumericField::getSpinSize()
@@ -5557,7 +5557,7 @@ double VCLXNumericField::getSpinSize()
VclPtr< NumericField > pNumericField = GetAs< NumericField >();
return pNumericField
- ? ImplCalcDoubleValue( (double)pNumericField->GetSpinSize(), pNumericField->GetDecimalDigits() )
+ ? ImplCalcDoubleValue( static_cast<double>(pNumericField->GetSpinSize()), pNumericField->GetDecimalDigits() )
: 0;
}
@@ -5930,7 +5930,7 @@ css::uno::Any VCLXMetricField::getProperty( const OUString& PropertyName )
aProp <<= GetAs< NumericField >()->IsUseThousandSep();
break;
case BASEPROPERTY_UNIT:
- aProp <<= (sal_uInt16) (GetAs< MetricField >()->GetUnit());
+ aProp <<= static_cast<sal_uInt16>(GetAs< MetricField >()->GetUnit());
break;
case BASEPROPERTY_CUSTOMUNITTEXT:
aProp <<= GetAs< MetricField >()->GetCustomUnitText();
@@ -6040,7 +6040,7 @@ double VCLXCurrencyField::getValue()
LongCurrencyFormatter* pCurrencyFormatter = static_cast<LongCurrencyFormatter*>(GetFormatter());
return pCurrencyFormatter
- ? ImplCalcDoubleValue( (double)pCurrencyFormatter->GetValue(), pCurrencyFormatter->GetDecimalDigits() )
+ ? ImplCalcDoubleValue( static_cast<double>(pCurrencyFormatter->GetValue()), pCurrencyFormatter->GetDecimalDigits() )
: 0;
}
@@ -6060,7 +6060,7 @@ double VCLXCurrencyField::getMin()
LongCurrencyFormatter* pCurrencyFormatter = static_cast<LongCurrencyFormatter*>(GetFormatter());
return pCurrencyFormatter
- ? ImplCalcDoubleValue( (double)pCurrencyFormatter->GetMin(), pCurrencyFormatter->GetDecimalDigits() )
+ ? ImplCalcDoubleValue( static_cast<double>(pCurrencyFormatter->GetMin()), pCurrencyFormatter->GetDecimalDigits() )
: 0;
}
@@ -6080,7 +6080,7 @@ double VCLXCurrencyField::getMax()
LongCurrencyFormatter* pCurrencyFormatter = static_cast<LongCurrencyFormatter*>(GetFormatter());
return pCurrencyFormatter
- ? ImplCalcDoubleValue( (double)pCurrencyFormatter->GetMax(), pCurrencyFormatter->GetDecimalDigits() )
+ ? ImplCalcDoubleValue( static_cast<double>(pCurrencyFormatter->GetMax()), pCurrencyFormatter->GetDecimalDigits() )
: 0;
}
@@ -6100,7 +6100,7 @@ double VCLXCurrencyField::getFirst()
VclPtr< LongCurrencyField > pCurrencyField = GetAs< LongCurrencyField >();
return pCurrencyField
- ? ImplCalcDoubleValue( (double)pCurrencyField->GetFirst(), pCurrencyField->GetDecimalDigits() )
+ ? ImplCalcDoubleValue( static_cast<double>(pCurrencyField->GetFirst()), pCurrencyField->GetDecimalDigits() )
: 0;
}
@@ -6120,7 +6120,7 @@ double VCLXCurrencyField::getLast()
VclPtr< LongCurrencyField > pCurrencyField = GetAs< LongCurrencyField >();
return pCurrencyField
- ? ImplCalcDoubleValue( (double)pCurrencyField->GetLast(), pCurrencyField->GetDecimalDigits() )
+ ? ImplCalcDoubleValue( static_cast<double>(pCurrencyField->GetLast()), pCurrencyField->GetDecimalDigits() )
: 0;
}
@@ -6140,7 +6140,7 @@ double VCLXCurrencyField::getSpinSize()
VclPtr< LongCurrencyField > pCurrencyField = GetAs< LongCurrencyField >();
return pCurrencyField
- ? ImplCalcDoubleValue( (double)pCurrencyField->GetSpinSize(), pCurrencyField->GetDecimalDigits() )
+ ? ImplCalcDoubleValue( static_cast<double>(pCurrencyField->GetSpinSize()), pCurrencyField->GetDecimalDigits() )
: 0;
}