summaryrefslogtreecommitdiff
path: root/accessibility/source
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2014-10-01 13:24:01 +0200
committerNoel Grandin <noel@peralex.com>2014-10-02 07:37:18 +0200
commit6edb52ebaf5d2c932a185a44f943a062ee649cfe (patch)
tree20e15afa0b2602bb975848b1814b06a90d24a4cf /accessibility/source
parentdbff5f5c6b66ed6c5c9b77245fd294800cd6c4b6 (diff)
loplugin: cstylecast
Change-Id: Ib36c0f4f8afa0bcaafa0836182e90a9f1d8aff75
Diffstat (limited to 'accessibility/source')
-rw-r--r--accessibility/source/extended/accessibletablistboxtable.cxx4
-rw-r--r--accessibility/source/helper/characterattributeshelper.cxx4
-rw-r--r--accessibility/source/standard/accessiblemenubasecomponent.cxx4
-rw-r--r--accessibility/source/standard/vclxaccessiblebutton.cxx10
-rw-r--r--accessibility/source/standard/vclxaccessiblemenubar.cxx6
-rw-r--r--accessibility/source/standard/vclxaccessiblestatusbar.cxx10
-rw-r--r--accessibility/source/standard/vclxaccessibletabcontrol.cxx10
-rw-r--r--accessibility/source/standard/vclxaccessibletoolbox.cxx14
8 files changed, 31 insertions, 31 deletions
diff --git a/accessibility/source/extended/accessibletablistboxtable.cxx b/accessibility/source/extended/accessibletablistboxtable.cxx
index e2ebfccf8ebc..95cf2a6d63b0 100644
--- a/accessibility/source/extended/accessibletablistboxtable.cxx
+++ b/accessibility/source/extended/accessibletablistboxtable.cxx
@@ -256,8 +256,8 @@ namespace accessibility
OSL_ENSURE( pEvent && pEvent->ISA( VclWindowEvent ), "Unknown WindowEvent!" );
if ( pEvent && pEvent->ISA( VclWindowEvent ) )
{
- OSL_ENSURE( ( (VclWindowEvent*)pEvent )->GetWindow() && m_pTabListBox, "no event window" );
- ProcessWindowEvent( *(VclWindowEvent*)pEvent );
+ OSL_ENSURE( static_cast<VclWindowEvent*>( pEvent )->GetWindow() && m_pTabListBox, "no event window" );
+ ProcessWindowEvent( *static_cast<VclWindowEvent*>(pEvent) );
}
return 0;
}
diff --git a/accessibility/source/helper/characterattributeshelper.cxx b/accessibility/source/helper/characterattributeshelper.cxx
index df7e241f187b..cf8cf794c2d5 100644
--- a/accessibility/source/helper/characterattributeshelper.cxx
+++ b/accessibility/source/helper/characterattributeshelper.cxx
@@ -30,9 +30,9 @@ CharacterAttributesHelper::CharacterAttributesHelper( const vcl::Font& rFont, sa
m_aAttributeMap.insert( AttributeMap::value_type( OUString( "CharColor" ), makeAny( (sal_Int32) nColor ) ) );
m_aAttributeMap.insert( AttributeMap::value_type( OUString( "CharFontCharSet" ), makeAny( (sal_Int16) rFont.GetCharSet() ) ) );
m_aAttributeMap.insert( AttributeMap::value_type( OUString( "CharFontFamily" ), makeAny( (sal_Int16) rFont.GetFamily() ) ) );
- m_aAttributeMap.insert( AttributeMap::value_type( OUString( "CharFontName" ), makeAny( (OUString) rFont.GetName() ) ) );
+ m_aAttributeMap.insert( AttributeMap::value_type( OUString( "CharFontName" ), makeAny( rFont.GetName() ) ) );
m_aAttributeMap.insert( AttributeMap::value_type( OUString( "CharFontPitch" ), makeAny( (sal_Int16) rFont.GetPitch() ) ) );
- m_aAttributeMap.insert( AttributeMap::value_type( OUString( "CharFontStyleName" ), makeAny( (OUString) rFont.GetStyleName() ) ) );
+ m_aAttributeMap.insert( AttributeMap::value_type( OUString( "CharFontStyleName" ), makeAny( rFont.GetStyleName() ) ) );
m_aAttributeMap.insert( AttributeMap::value_type( OUString( "CharHeight" ), makeAny( (sal_Int16) rFont.GetSize().Height() ) ) );
m_aAttributeMap.insert( AttributeMap::value_type( OUString( "CharScaleWidth" ), makeAny( (sal_Int16) rFont.GetSize().Width() ) ) );
m_aAttributeMap.insert( AttributeMap::value_type( OUString( "CharStrikeout" ), makeAny( (sal_Int16) rFont.GetStrikeout() ) ) );
diff --git a/accessibility/source/standard/accessiblemenubasecomponent.cxx b/accessibility/source/standard/accessiblemenubasecomponent.cxx
index 945758e27572..8e29d651b392 100644
--- a/accessibility/source/standard/accessiblemenubasecomponent.cxx
+++ b/accessibility/source/standard/accessiblemenubasecomponent.cxx
@@ -571,8 +571,8 @@ IMPL_LINK( OAccessibleMenuBaseComponent, MenuEventListener, VclSimpleEvent*, pEv
OSL_ENSURE( pEvent && pEvent->ISA( VclMenuEvent ), "OAccessibleMenuBaseComponent - Unknown MenuEvent!" );
if ( pEvent && pEvent->ISA( VclMenuEvent ) )
{
- OSL_ENSURE( ((VclMenuEvent*)pEvent)->GetMenu(), "OAccessibleMenuBaseComponent - Menu?" );
- ProcessMenuEvent( *(VclMenuEvent*)pEvent );
+ OSL_ENSURE( static_cast<VclMenuEvent*>(pEvent)->GetMenu(), "OAccessibleMenuBaseComponent - Menu?" );
+ ProcessMenuEvent( *static_cast<VclMenuEvent*>(pEvent) );
}
return 0;
}
diff --git a/accessibility/source/standard/vclxaccessiblebutton.cxx b/accessibility/source/standard/vclxaccessiblebutton.cxx
index 4e9c9f20a910..622565a8d6f3 100644
--- a/accessibility/source/standard/vclxaccessiblebutton.cxx
+++ b/accessibility/source/standard/vclxaccessiblebutton.cxx
@@ -65,7 +65,7 @@ void VCLXAccessibleButton::ProcessWindowEvent( const VclWindowEvent& rVclWindowE
Any aOldValue;
Any aNewValue;
- PushButton* pButton = (PushButton*) GetWindow();
+ PushButton* pButton = static_cast<PushButton*>( GetWindow() );
if ( pButton && pButton->GetState() == TRISTATE_TRUE )
aNewValue <<= AccessibleStateType::CHECKED;
else
@@ -85,7 +85,7 @@ void VCLXAccessibleButton::FillAccessibleStateSet( utl::AccessibleStateSetHelper
{
VCLXAccessibleTextComponent::FillAccessibleStateSet( rStateSet );
- PushButton* pButton = (PushButton*) GetWindow();
+ PushButton* pButton = static_cast<PushButton*>( GetWindow() );
if ( pButton )
{
rStateSet.AddState( AccessibleStateType::FOCUSABLE );
@@ -196,7 +196,7 @@ sal_Bool VCLXAccessibleButton::doAccessibleAction ( sal_Int32 nIndex ) throw (In
if ( nIndex < 0 || nIndex >= getAccessibleActionCount() )
throw IndexOutOfBoundsException();
- PushButton* pButton = (PushButton*) GetWindow();
+ PushButton* pButton = static_cast<PushButton*>( GetWindow() );
if ( pButton )
pButton->Click();
@@ -264,7 +264,7 @@ Any VCLXAccessibleButton::getCurrentValue( ) throw (RuntimeException, std::exce
Any aValue;
- PushButton* pButton = (PushButton*) GetWindow();
+ PushButton* pButton = static_cast<PushButton*>( GetWindow() );
if ( pButton )
aValue <<= (sal_Int32) pButton->IsPressed();
@@ -279,7 +279,7 @@ sal_Bool VCLXAccessibleButton::setCurrentValue( const Any& aNumber ) throw (Runt
bool bReturn = false;
- PushButton* pButton = (PushButton*) GetWindow();
+ PushButton* pButton = static_cast<PushButton*>( GetWindow() );
if ( pButton )
{
sal_Int32 nValue = 0;
diff --git a/accessibility/source/standard/vclxaccessiblemenubar.cxx b/accessibility/source/standard/vclxaccessiblemenubar.cxx
index fc541ab388d1..3313f93bf616 100644
--- a/accessibility/source/standard/vclxaccessiblemenubar.cxx
+++ b/accessibility/source/standard/vclxaccessiblemenubar.cxx
@@ -78,10 +78,10 @@ IMPL_LINK( VCLXAccessibleMenuBar, WindowEventListener, VclSimpleEvent*, pEvent )
OSL_ENSURE( pEvent && pEvent->ISA( VclWindowEvent ), "VCLXAccessibleMenuBar::WindowEventListener: unknown window event!" );
if ( pEvent && pEvent->ISA( VclWindowEvent ) )
{
- OSL_ENSURE( ((VclWindowEvent*)pEvent)->GetWindow(), "VCLXAccessibleMenuBar::WindowEventListener: no window!" );
- if ( !((VclWindowEvent*)pEvent)->GetWindow()->IsAccessibilityEventsSuppressed() || ( pEvent->GetId() == VCLEVENT_OBJECT_DYING ) )
+ OSL_ENSURE( static_cast<VclWindowEvent*>(pEvent)->GetWindow(), "VCLXAccessibleMenuBar::WindowEventListener: no window!" );
+ if ( !static_cast<VclWindowEvent*>(pEvent)->GetWindow()->IsAccessibilityEventsSuppressed() || ( pEvent->GetId() == VCLEVENT_OBJECT_DYING ) )
{
- ProcessWindowEvent( *(VclWindowEvent*)pEvent );
+ ProcessWindowEvent( *static_cast<VclWindowEvent*>(pEvent) );
}
}
return 0;
diff --git a/accessibility/source/standard/vclxaccessiblestatusbar.cxx b/accessibility/source/standard/vclxaccessiblestatusbar.cxx
index 31f800450b28..921c7075f7f1 100644
--- a/accessibility/source/standard/vclxaccessiblestatusbar.cxx
+++ b/accessibility/source/standard/vclxaccessiblestatusbar.cxx
@@ -160,7 +160,7 @@ void VCLXAccessibleStatusBar::ProcessWindowEvent( const VclWindowEvent& rVclWind
{
if ( m_pStatusBar )
{
- sal_uInt16 nItemId = (sal_uInt16)(sal_IntPtr) rVclWindowEvent.GetData();
+ sal_uInt16 nItemId = (sal_uInt16)reinterpret_cast<sal_IntPtr>(rVclWindowEvent.GetData());
sal_uInt16 nItemPos = m_pStatusBar->GetItemPos( nItemId );
InsertChild( nItemPos );
}
@@ -170,7 +170,7 @@ void VCLXAccessibleStatusBar::ProcessWindowEvent( const VclWindowEvent& rVclWind
{
if ( m_pStatusBar )
{
- sal_uInt16 nItemId = (sal_uInt16)(sal_IntPtr) rVclWindowEvent.GetData();
+ sal_uInt16 nItemId = (sal_uInt16)reinterpret_cast<sal_IntPtr>(rVclWindowEvent.GetData());
for ( sal_Int32 i = 0, nCount = getAccessibleChildCount(); i < nCount; ++i )
{
Reference< XAccessible > xChild( getAccessibleChild( i ) );
@@ -198,7 +198,7 @@ void VCLXAccessibleStatusBar::ProcessWindowEvent( const VclWindowEvent& rVclWind
{
if ( m_pStatusBar )
{
- sal_uInt16 nItemId = (sal_uInt16)(sal_IntPtr) rVclWindowEvent.GetData();
+ sal_uInt16 nItemId = (sal_uInt16)reinterpret_cast<sal_IntPtr>(rVclWindowEvent.GetData());
sal_uInt16 nItemPos = m_pStatusBar->GetItemPos( nItemId );
UpdateShowing( nItemPos, rVclWindowEvent.GetId() == VCLEVENT_STATUSBAR_SHOWITEM );
}
@@ -215,7 +215,7 @@ void VCLXAccessibleStatusBar::ProcessWindowEvent( const VclWindowEvent& rVclWind
{
if ( m_pStatusBar )
{
- sal_uInt16 nItemId = (sal_uInt16)(sal_IntPtr) rVclWindowEvent.GetData();
+ sal_uInt16 nItemId = (sal_uInt16)reinterpret_cast<sal_IntPtr>(rVclWindowEvent.GetData());
sal_uInt16 nItemPos = m_pStatusBar->GetItemPos( nItemId );
UpdateItemName( nItemPos );
}
@@ -225,7 +225,7 @@ void VCLXAccessibleStatusBar::ProcessWindowEvent( const VclWindowEvent& rVclWind
{
if ( m_pStatusBar )
{
- sal_uInt16 nItemId = (sal_uInt16)(sal_IntPtr) rVclWindowEvent.GetData();
+ sal_uInt16 nItemId = (sal_uInt16)reinterpret_cast<sal_IntPtr>(rVclWindowEvent.GetData());
sal_uInt16 nItemPos = m_pStatusBar->GetItemPos( nItemId );
UpdateItemText( nItemPos );
}
diff --git a/accessibility/source/standard/vclxaccessibletabcontrol.cxx b/accessibility/source/standard/vclxaccessibletabcontrol.cxx
index 3a40f68778d1..268a6f335d80 100644
--- a/accessibility/source/standard/vclxaccessibletabcontrol.cxx
+++ b/accessibility/source/standard/vclxaccessibletabcontrol.cxx
@@ -176,7 +176,7 @@ void VCLXAccessibleTabControl::ProcessWindowEvent( const VclWindowEvent& rVclWin
{
if ( m_pTabControl )
{
- sal_uInt16 nPageId = (sal_uInt16)(sal_IntPtr) rVclWindowEvent.GetData();
+ sal_uInt16 nPageId = (sal_uInt16)reinterpret_cast<sal_IntPtr>(rVclWindowEvent.GetData());
sal_uInt16 nPagePos = m_pTabControl->GetPagePos( nPageId );
UpdateFocused();
UpdateSelected( nPagePos, rVclWindowEvent.GetId() == VCLEVENT_TABPAGE_ACTIVATE );
@@ -187,7 +187,7 @@ void VCLXAccessibleTabControl::ProcessWindowEvent( const VclWindowEvent& rVclWin
{
if ( m_pTabControl )
{
- sal_uInt16 nPageId = (sal_uInt16)(sal_IntPtr) rVclWindowEvent.GetData();
+ sal_uInt16 nPageId = (sal_uInt16)reinterpret_cast<sal_IntPtr>(rVclWindowEvent.GetData());
sal_uInt16 nPagePos = m_pTabControl->GetPagePos( nPageId );
UpdatePageText( nPagePos );
}
@@ -197,7 +197,7 @@ void VCLXAccessibleTabControl::ProcessWindowEvent( const VclWindowEvent& rVclWin
{
if ( m_pTabControl )
{
- sal_uInt16 nPageId = (sal_uInt16)(sal_IntPtr) rVclWindowEvent.GetData();
+ sal_uInt16 nPageId = (sal_uInt16)reinterpret_cast<sal_IntPtr>(rVclWindowEvent.GetData());
sal_uInt16 nPagePos = m_pTabControl->GetPagePos( nPageId );
InsertChild( nPagePos );
}
@@ -207,7 +207,7 @@ void VCLXAccessibleTabControl::ProcessWindowEvent( const VclWindowEvent& rVclWin
{
if ( m_pTabControl )
{
- sal_uInt16 nPageId = (sal_uInt16)(sal_IntPtr) rVclWindowEvent.GetData();
+ sal_uInt16 nPageId = (sal_uInt16)reinterpret_cast<sal_IntPtr>(rVclWindowEvent.GetData());
for ( sal_Int32 i = 0, nCount = getAccessibleChildCount(); i < nCount; ++i )
{
Reference< XAccessible > xChild( getAccessibleChild( i ) );
@@ -278,7 +278,7 @@ void VCLXAccessibleTabControl::ProcessWindowChildEvent( const VclWindowEvent& rV
{
sal_uInt16 nPageId = m_pTabControl->GetPageId( (sal_uInt16)i );
TabPage* pTabPage = m_pTabControl->GetTabPage( nPageId );
- if ( pTabPage == (TabPage*) pChild )
+ if ( pTabPage == static_cast<TabPage*>(pChild) )
UpdateTabPage( i, rVclWindowEvent.GetId() == VCLEVENT_WINDOW_SHOW );
}
}
diff --git a/accessibility/source/standard/vclxaccessibletoolbox.cxx b/accessibility/source/standard/vclxaccessibletoolbox.cxx
index 003eaa517211..188e7772d920 100644
--- a/accessibility/source/standard/vclxaccessibletoolbox.cxx
+++ b/accessibility/source/standard/vclxaccessibletoolbox.cxx
@@ -530,8 +530,8 @@ void VCLXAccessibleToolBox::ProcessWindowEvent( const VclWindowEvent& rVclWindow
{
if ( rVclWindowEvent.GetData() )
{
- UpdateChecked_Impl( (sal_Int32)(sal_IntPtr)rVclWindowEvent.GetData() );
- UpdateIndeterminate_Impl( (sal_Int32)(sal_IntPtr)rVclWindowEvent.GetData() );
+ UpdateChecked_Impl( (sal_Int32)reinterpret_cast<sal_IntPtr>(rVclWindowEvent.GetData()) );
+ UpdateIndeterminate_Impl( (sal_Int32)reinterpret_cast<sal_IntPtr>(rVclWindowEvent.GetData()) );
}
else if( pToolBox->GetItemPos(pToolBox->GetCurItemId()) != TOOLBOX_ITEM_NOTFOUND )
{
@@ -562,11 +562,11 @@ void VCLXAccessibleToolBox::ProcessWindowEvent( const VclWindowEvent& rVclWindow
break;
case VCLEVENT_TOOLBOX_HIGHLIGHTOFF:
- ReleaseFocus_Impl( (sal_Int32)(sal_IntPtr)rVclWindowEvent.GetData() );
+ ReleaseFocus_Impl( (sal_Int32)reinterpret_cast<sal_IntPtr>(rVclWindowEvent.GetData()) );
break;
case VCLEVENT_TOOLBOX_ITEMADDED :
- UpdateItem_Impl( (sal_Int32)(sal_IntPtr)rVclWindowEvent.GetData(), true );
+ UpdateItem_Impl( (sal_Int32)reinterpret_cast<sal_IntPtr>(rVclWindowEvent.GetData()), true );
break;
case VCLEVENT_TOOLBOX_ITEMREMOVED :
@@ -578,7 +578,7 @@ void VCLXAccessibleToolBox::ProcessWindowEvent( const VclWindowEvent& rVclWindow
case VCLEVENT_TOOLBOX_ITEMWINDOWCHANGED:
{
- sal_Int32 nPos = (sal_Int32)(sal_IntPtr)rVclWindowEvent.GetData();
+ sal_Int32 nPos = (sal_Int32)reinterpret_cast<sal_IntPtr>(rVclWindowEvent.GetData());
ToolBoxItemsMap::iterator aAccessiblePos( m_aAccessibleChildren.find( nPos ) );
if ( m_aAccessibleChildren.end() != aAccessiblePos )
{
@@ -592,13 +592,13 @@ void VCLXAccessibleToolBox::ProcessWindowEvent( const VclWindowEvent& rVclWindow
break;
}
case VCLEVENT_TOOLBOX_ITEMTEXTCHANGED :
- UpdateItemName_Impl( (sal_Int32)(sal_IntPtr)rVclWindowEvent.GetData() );
+ UpdateItemName_Impl( (sal_Int32)reinterpret_cast<sal_IntPtr>(rVclWindowEvent.GetData()) );
break;
case VCLEVENT_TOOLBOX_ITEMENABLED :
case VCLEVENT_TOOLBOX_ITEMDISABLED :
{
- UpdateItemEnabled_Impl( (sal_Int32)(sal_IntPtr)rVclWindowEvent.GetData() );
+ UpdateItemEnabled_Impl( (sal_Int32)reinterpret_cast<sal_IntPtr>(rVclWindowEvent.GetData()) );
break;
}