diff options
author | Noel Grandin <noel@peralex.com> | 2014-09-29 09:44:47 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2014-09-29 12:50:36 +0200 |
commit | 00bd4571560bdbfbe4753d93513e55d58014228b (patch) | |
tree | f96e53fb1b50b0540ed695b6608da4c4191cea61 /toolkit/source/awt/vclxtoolkit.cxx | |
parent | 65b69c44fca13de5bd5fe33eb9b607780ab4b75f (diff) |
loplugin: cstylecast
Change-Id: I20358c271e32b4af11d3258c950bde836596933a
Diffstat (limited to 'toolkit/source/awt/vclxtoolkit.cxx')
-rw-r--r-- | toolkit/source/awt/vclxtoolkit.cxx | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/toolkit/source/awt/vclxtoolkit.cxx b/toolkit/source/awt/vclxtoolkit.cxx index 4e57b33418ae..94fe04a65af4 100644 --- a/toolkit/source/awt/vclxtoolkit.cxx +++ b/toolkit/source/awt/vclxtoolkit.cxx @@ -746,7 +746,9 @@ void SAL_CALL VCLXToolkit::disposing() ByteBufferWrapper *bbw = (ByteBufferWrapper *) (intptr_t) addressOfMemoryBufferForSharedArrayWrapper; pV->SetOutputSizePixelScaleOffsetAndBuffer( Size( Width, Height ), Fraction(ScaleNumerator, ScaleDenominator), Point( XOffset, YOffset), basebmp::RawMemorySharedArray( bbw->pointer(), *bbw )); #else - pV->SetOutputSizePixelScaleOffsetAndBuffer( Size( Width, Height ), Fraction(ScaleNumerator, ScaleDenominator), Point( XOffset, YOffset), basebmp::RawMemorySharedArray( (sal_uInt8*) (sal_uIntPtr) addressOfMemoryBufferForSharedArrayWrapper )); + pV->SetOutputSizePixelScaleOffsetAndBuffer( Size( Width, Height ), + Fraction(ScaleNumerator, ScaleDenominator), Point( XOffset, YOffset), + basebmp::RawMemorySharedArray( reinterpret_cast<sal_uInt8*>( addressOfMemoryBufferForSharedArrayWrapper ))); #endif } else { pV->SetOutputSizePixel( Size( Width, Height ) ); @@ -827,7 +829,7 @@ vcl::Window* VCLXToolkit::ImplCreateWindow( VCLXWindow** ppNewComp, break; case WINDOW_COMBOBOX: pNewWindow = new ComboBox( pParent, nWinBits|WB_AUTOHSCROLL ); - ((ComboBox*)pNewWindow)->EnableAutoSize( false ); + static_cast<ComboBox*>(pNewWindow)->EnableAutoSize( false ); *ppNewComp = new VCLXComboBox; break; case WINDOW_CURRENCYBOX: @@ -837,7 +839,7 @@ vcl::Window* VCLXToolkit::ImplCreateWindow( VCLXWindow** ppNewComp, pNewWindow = new CurrencyField( pParent, nWinBits ); static_cast<CurrencyField*>(pNewWindow)->EnableEmptyFieldValue( true ); *ppNewComp = new VCLXNumericField; - ((VCLXFormattedSpinField*)*ppNewComp)->SetFormatter( (FormatterBase*)(CurrencyField*)pNewWindow ); + static_cast<VCLXFormattedSpinField*>(*ppNewComp)->SetFormatter( (FormatterBase*)static_cast<CurrencyField*>(pNewWindow) ); break; case WINDOW_DATEBOX: pNewWindow = new DateBox( pParent, nWinBits ); @@ -846,7 +848,7 @@ vcl::Window* VCLXToolkit::ImplCreateWindow( VCLXWindow** ppNewComp, pNewWindow = new DateField( pParent, nWinBits ); static_cast<DateField*>(pNewWindow)->EnableEmptyFieldValue( true ); *ppNewComp = new VCLXDateField; - ((VCLXFormattedSpinField*)*ppNewComp)->SetFormatter( (FormatterBase*)(DateField*)pNewWindow ); + static_cast<VCLXFormattedSpinField*>(*ppNewComp)->SetFormatter( (FormatterBase*)static_cast<DateField*>(pNewWindow) ); break; case WINDOW_DOCKINGAREA: pNewWindow = new DockingAreaWindow( pParent ); @@ -902,7 +904,7 @@ vcl::Window* VCLXToolkit::ImplCreateWindow( VCLXWindow** ppNewComp, break; case WINDOW_LISTBOX: pNewWindow = new ListBox( pParent, nWinBits|WB_SIMPLEMODE|WB_AUTOHSCROLL ); - ((ListBox*)pNewWindow)->EnableAutoSize( false ); + static_cast<ListBox*>(pNewWindow)->EnableAutoSize( false ); *ppNewComp = new VCLXListBox; break; case WINDOW_LONGCURRENCYBOX: @@ -911,7 +913,7 @@ vcl::Window* VCLXToolkit::ImplCreateWindow( VCLXWindow** ppNewComp, case WINDOW_LONGCURRENCYFIELD: pNewWindow = new LongCurrencyField( pParent, nWinBits ); *ppNewComp = new VCLXCurrencyField; - ((VCLXFormattedSpinField*)*ppNewComp)->SetFormatter( (FormatterBase*)(LongCurrencyField*)pNewWindow ); + static_cast<VCLXFormattedSpinField*>(*ppNewComp)->SetFormatter( (FormatterBase*)static_cast<LongCurrencyField*>(pNewWindow) ); break; case WINDOW_MENUBUTTON: pNewWindow = new MenuButton( pParent, nWinBits ); @@ -927,7 +929,7 @@ vcl::Window* VCLXToolkit::ImplCreateWindow( VCLXWindow** ppNewComp, case WINDOW_METRICFIELD: pNewWindow = new MetricField( pParent, nWinBits ); *ppNewComp = new VCLXMetricField; - ((VCLXFormattedSpinField*)*ppNewComp)->SetFormatter( (FormatterBase*)(MetricField*)pNewWindow ); + static_cast<VCLXFormattedSpinField*>(*ppNewComp)->SetFormatter( (FormatterBase*)static_cast<MetricField*>(pNewWindow) ); break; case WINDOW_DIALOG: case WINDOW_MODALDIALOG: @@ -962,7 +964,7 @@ vcl::Window* VCLXToolkit::ImplCreateWindow( VCLXWindow** ppNewComp, pNewWindow = new NumericField( pParent, nWinBits ); static_cast<NumericField*>(pNewWindow)->EnableEmptyFieldValue( true ); *ppNewComp = new VCLXNumericField; - ((VCLXFormattedSpinField*)*ppNewComp)->SetFormatter( (FormatterBase*)(NumericField*)pNewWindow ); + static_cast<VCLXFormattedSpinField*>(*ppNewComp)->SetFormatter( (FormatterBase*)static_cast<NumericField*>(pNewWindow) ); break; case WINDOW_OKBUTTON: pNewWindow = new OKButton( pParent, nWinBits ); @@ -974,7 +976,7 @@ vcl::Window* VCLXToolkit::ImplCreateWindow( VCLXWindow** ppNewComp, case WINDOW_PATTERNFIELD: pNewWindow = new PatternField( pParent, nWinBits ); *ppNewComp = new VCLXPatternField; - ((VCLXFormattedSpinField*)*ppNewComp)->SetFormatter( (FormatterBase*)(PatternField*)pNewWindow ); + static_cast<VCLXFormattedSpinField*>(*ppNewComp)->SetFormatter( (FormatterBase*)static_cast<PatternField*>(pNewWindow) ); break; case WINDOW_PUSHBUTTON: pNewWindow = new PushButton( pParent, nWinBits ); @@ -1047,7 +1049,7 @@ vcl::Window* VCLXToolkit::ImplCreateWindow( VCLXWindow** ppNewComp, pNewWindow = new TimeField( pParent, nWinBits ); static_cast<TimeField*>(pNewWindow)->EnableEmptyFieldValue( true ); *ppNewComp = new VCLXTimeField; - ((VCLXFormattedSpinField*)*ppNewComp)->SetFormatter( (FormatterBase*)(TimeField*)pNewWindow ); + static_cast<VCLXFormattedSpinField*>(*ppNewComp)->SetFormatter( (FormatterBase*)static_cast<TimeField*>(pNewWindow) ); break; case WINDOW_TOOLBOX: pNewWindow = new ToolBox( pParent, nWinBits ); |