summaryrefslogtreecommitdiff
path: root/svtools/source/control
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2014-09-26 15:19:06 +0200
committerNoel Grandin <noel@peralex.com>2014-09-29 12:50:35 +0200
commit0ecf6afbd104b53836c7a4d45fbc2a6ce1e356e0 (patch)
treea1253c850347f9df39254fe9cf82b6ebf39d73f0 /svtools/source/control
parentc353caee1c86476d98cd483f963f63c4195975f4 (diff)
loplugin: cstylecast
Change-Id: Iea517d2287bded4a702c73dfdd1f182023425d67
Diffstat (limited to 'svtools/source/control')
-rw-r--r--svtools/source/control/ctrlbox.cxx6
-rw-r--r--svtools/source/control/headbar.cxx4
-rw-r--r--svtools/source/control/tabbar.cxx12
-rw-r--r--svtools/source/control/toolbarmenu.cxx6
-rw-r--r--svtools/source/control/toolbarmenuacc.cxx6
5 files changed, 17 insertions, 17 deletions
diff --git a/svtools/source/control/ctrlbox.cxx b/svtools/source/control/ctrlbox.cxx
index a51de50c1963..c83db0b4a1d5 100644
--- a/svtools/source/control/ctrlbox.cxx
+++ b/svtools/source/control/ctrlbox.cxx
@@ -1692,7 +1692,7 @@ void FontSizeBox::Fill( const vcl::FontInfo* pInfo, const FontList* pList )
OUString aSizeName = aFontSizeNames.GetIndexName( i );
sal_IntPtr nSize = aFontSizeNames.GetIndexSize( i );
ComboBox::InsertEntry( aSizeName, nPos );
- ComboBox::SetEntryData( nPos, (void*)(-nSize) ); // mark as special
+ ComboBox::SetEntryData( nPos, reinterpret_cast<void*>(-nSize) ); // mark as special
nPos++;
}
}
@@ -1706,7 +1706,7 @@ void FontSizeBox::Fill( const vcl::FontInfo* pInfo, const FontList* pList )
if ( !aSizeName.isEmpty() )
{
ComboBox::InsertEntry( aSizeName, nPos );
- ComboBox::SetEntryData( nPos, (void*)(-(*pTempAry)) ); // mark as special
+ ComboBox::SetEntryData( nPos, reinterpret_cast<void*>(-(*pTempAry)) ); // mark as special
nPos++;
}
pTempAry++;
@@ -1719,7 +1719,7 @@ void FontSizeBox::Fill( const vcl::FontInfo* pInfo, const FontList* pList )
while ( *pTempAry )
{
InsertValue( *pTempAry, FUNIT_NONE, nPos );
- ComboBox::SetEntryData( nPos, (void*)(*pTempAry) );
+ ComboBox::SetEntryData( nPos, reinterpret_cast<void*>(*pTempAry) );
nPos++;
pTempAry++;
}
diff --git a/svtools/source/control/headbar.cxx b/svtools/source/control/headbar.cxx
index 5f513e6e0220..0e305155723a 100644
--- a/svtools/source/control/headbar.cxx
+++ b/svtools/source/control/headbar.cxx
@@ -303,7 +303,7 @@ void HeaderBar::ImplDrawItem( OutputDevice* pDev,
const Rectangle* pRect,
sal_uLong )
{
- vcl::Window *const pWin = (pDev->GetOutDevType()==OUTDEV_WINDOW) ? (vcl::Window*) pDev : NULL;
+ vcl::Window *const pWin = (pDev->GetOutDevType()==OUTDEV_WINDOW) ? static_cast<vcl::Window*>(pDev) : NULL;
ImplControlValue aControlValue(0);
Rectangle aCtrlRegion;
ControlState nState(0);
@@ -1553,7 +1553,7 @@ void HeaderBar::SetAccessible( ::com::sun::star::uno::Reference< ::com::sun::sta
if ( !xPeer.is() && bCreate )
{
::com::sun::star::awt::XWindowPeer* mxPeer = new VCLXHeaderBar(this);
- m_pVCLXHeaderBar = (VCLXHeaderBar*)(mxPeer);
+ m_pVCLXHeaderBar = static_cast<VCLXHeaderBar*>(mxPeer);
SetComponentInterface(mxPeer);
return mxPeer;
}
diff --git a/svtools/source/control/tabbar.cxx b/svtools/source/control/tabbar.cxx
index 7dd15b0d55e1..cf7fafc6dcb2 100644
--- a/svtools/source/control/tabbar.cxx
+++ b/svtools/source/control/tabbar.cxx
@@ -95,7 +95,7 @@ public:
ImplTabButton( TabBar* pParent, WinBits nWinStyle = 0 ) :
PushButton( pParent, nWinStyle | WB_RECTSTYLE | WB_SMALLSTYLE | WB_NOLIGHTBORDER | WB_NOPOINTERFOCUS ) {}
- TabBar* GetParent() const { return (TabBar*)Window::GetParent(); }
+ TabBar* GetParent() const { return static_cast<TabBar*>(Window::GetParent()); }
virtual bool PreNotify( NotifyEvent& rNEvt ) SAL_OVERRIDE;
@@ -147,7 +147,7 @@ class ImplTabSizer : public vcl::Window
public:
ImplTabSizer( TabBar* pParent, WinBits nWinStyle = 0 );
- TabBar* GetParent() const { return (TabBar*)Window::GetParent(); }
+ TabBar* GetParent() const { return static_cast<TabBar*>(Window::GetParent()); }
private:
void ImplTrack( const Point& rScreenPos );
@@ -254,7 +254,7 @@ private:
public:
TabBarEdit( TabBar* pParent, WinBits nWinStyle = 0 );
- TabBar* GetParent() const { return (TabBar*)Window::GetParent(); }
+ TabBar* GetParent() const { return static_cast<TabBar*>(Window::GetParent()); }
void SetPostEvent() { mbPostEvt = true; }
void ResetPostEvent() { mbPostEvt = false; }
@@ -284,7 +284,7 @@ bool TabBarEdit::PreNotify( NotifyEvent& rNEvt )
{
if ( !mbPostEvt )
{
- if ( PostUserEvent( LINK( this, TabBarEdit, ImplEndEditHdl ), (void*)sal_False ) )
+ if ( PostUserEvent( LINK( this, TabBarEdit, ImplEndEditHdl ), reinterpret_cast<void*>(sal_False) ) )
mbPostEvt = true;
}
return true;
@@ -293,7 +293,7 @@ bool TabBarEdit::PreNotify( NotifyEvent& rNEvt )
{
if ( !mbPostEvt )
{
- if ( PostUserEvent( LINK( this, TabBarEdit, ImplEndEditHdl ), (void*)sal_True ) )
+ if ( PostUserEvent( LINK( this, TabBarEdit, ImplEndEditHdl ), reinterpret_cast<void*>(sal_True) ) )
mbPostEvt = true;
}
return true;
@@ -310,7 +310,7 @@ void TabBarEdit::LoseFocus()
{
if ( !mbPostEvt )
{
- if ( PostUserEvent( LINK( this, TabBarEdit, ImplEndEditHdl ), (void*)sal_False ) )
+ if ( PostUserEvent( LINK( this, TabBarEdit, ImplEndEditHdl ), reinterpret_cast<void*>(sal_False) ) )
mbPostEvt = true;
}
diff --git a/svtools/source/control/toolbarmenu.cxx b/svtools/source/control/toolbarmenu.cxx
index fb03917624d5..b28a9e4953e9 100644
--- a/svtools/source/control/toolbarmenu.cxx
+++ b/svtools/source/control/toolbarmenu.cxx
@@ -53,7 +53,7 @@ static vcl::Window* GetTopMostParentSystemWindow( vcl::Window* pWindow )
while ( pWindow )
{
if ( pWindow->IsSystemWindow() )
- pTopMostSysWin = (SystemWindow*)pWindow;
+ pTopMostSysWin = static_cast<SystemWindow*>(pWindow);
pWindow = pWindow->GetParent();
}
pWindow = pTopMostSysWin;
@@ -464,7 +464,7 @@ void ToolbarMenu::implInit(const Reference< XFrame >& rFrame)
vcl::Window* pWindow = GetTopMostParentSystemWindow( this );
if ( pWindow )
- ((SystemWindow *)pWindow)->GetTaskPaneList()->AddWindow( this );
+ static_cast<SystemWindow*>(pWindow)->GetTaskPaneList()->AddWindow( this );
}
@@ -473,7 +473,7 @@ ToolbarMenu::~ToolbarMenu()
{
vcl::Window* pWindow = GetTopMostParentSystemWindow( this );
if ( pWindow )
- ((SystemWindow *)pWindow)->GetTaskPaneList()->RemoveWindow( this );
+ static_cast<SystemWindow*>(pWindow)->GetTaskPaneList()->RemoveWindow( this );
if ( mpImpl->mxStatusListener.is() )
{
diff --git a/svtools/source/control/toolbarmenuacc.cxx b/svtools/source/control/toolbarmenuacc.cxx
index 2464694faa0c..8aab2122293b 100644
--- a/svtools/source/control/toolbarmenuacc.cxx
+++ b/svtools/source/control/toolbarmenuacc.cxx
@@ -71,10 +71,10 @@ IMPL_LINK( ToolbarMenuAcc, WindowEventListener, VclSimpleEvent*, pEvent )
*/
if ( mpParent && pEvent && pEvent->ISA( VclWindowEvent ) && (pEvent->GetId() != VCLEVENT_WINDOW_ENDPOPUPMODE) )
{
- DBG_ASSERT( ((VclWindowEvent*)pEvent)->GetWindow(), "Window???" );
- if( !((VclWindowEvent*)pEvent)->GetWindow()->IsAccessibilityEventsSuppressed() || ( pEvent->GetId() == VCLEVENT_OBJECT_DYING ) )
+ DBG_ASSERT( static_cast<VclWindowEvent*>(pEvent)->GetWindow(), "Window???" );
+ if( !static_cast<VclWindowEvent*>(pEvent)->GetWindow()->IsAccessibilityEventsSuppressed() || ( pEvent->GetId() == VCLEVENT_OBJECT_DYING ) )
{
- ProcessWindowEvent( *(VclWindowEvent*)pEvent );
+ ProcessWindowEvent( *static_cast<VclWindowEvent*>(pEvent) );
}
}
return 0;