diff options
author | Noel Grandin <noel@peralex.com> | 2014-09-29 10:26:14 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2014-09-30 10:33:26 +0200 |
commit | 7561a0f9a2df9231596576af9f8b78f4f3621270 (patch) | |
tree | 80f6e1e2ebacd81a4fe6cc09492c8cafa7c1f115 | |
parent | b8ea41a98ded7dc2eae22f05ad427b6958702d0b (diff) |
loplugin: cstylecast
Change-Id: Ie5cbad7ee18b0ecbca5df97808431be577449c32
Signed-off-by: Stephan Bergmann <sbergman@redhat.com>
9 files changed, 20 insertions, 20 deletions
diff --git a/accessibility/source/extended/AccessibleBrowseBox.cxx b/accessibility/source/extended/AccessibleBrowseBox.cxx index 1215c78867a5..fbb8a02c57ed 100644 --- a/accessibility/source/extended/AccessibleBrowseBox.cxx +++ b/accessibility/source/extended/AccessibleBrowseBox.cxx @@ -76,7 +76,7 @@ AccessibleBrowseBox::AccessibleBrowseBox( void AccessibleBrowseBox::setCreator( const Reference< XAccessible >& _rxCreator ) { #if OSL_DEBUG_LEVEL > 0 - Reference< XAccessible > xCreator = (Reference< XAccessible >)m_pImpl->m_aCreator; + Reference< XAccessible > xCreator(m_pImpl->m_aCreator); OSL_ENSURE( !xCreator.is(), "accessibility/extended/AccessibleBrowseBox::setCreator: creator already set!" ); #endif m_pImpl->m_aCreator = _rxCreator; @@ -250,7 +250,7 @@ AccessibleBrowseBox::implGetHeaderBar( AccessibleBrowseBoxObjType eObjType ) if( !pxMember->is() ) { AccessibleBrowseBoxHeaderBar* pHeaderBar = new AccessibleBrowseBoxHeaderBar( - (Reference< XAccessible >)m_pImpl->m_aCreator, *mpBrowseBox, eObjType ); + m_pImpl->m_aCreator, *mpBrowseBox, eObjType ); if ( BBTYPE_COLUMNHEADERBAR == eObjType) m_pImpl->m_pColumnHeaderBar = pHeaderBar; @@ -286,7 +286,7 @@ AccessibleBrowseBox::implGetFixedChild( sal_Int32 nChildIndex ) AccessibleBrowseBoxTable* AccessibleBrowseBox::createAccessibleTable() { - Reference< XAccessible > xCreator = (Reference< XAccessible >)m_pImpl->m_aCreator; + Reference< XAccessible > xCreator(m_pImpl->m_aCreator); OSL_ENSURE( xCreator.is(), "accessibility/extended/AccessibleBrowseBox::createAccessibleTable: my creator died - how this?" ); return new AccessibleBrowseBoxTable( xCreator, *mpBrowseBox ); } diff --git a/accessibility/source/extended/AccessibleGridControl.cxx b/accessibility/source/extended/AccessibleGridControl.cxx index 23f2f9c70b0a..1f927ad08b26 100644 --- a/accessibility/source/extended/AccessibleGridControl.cxx +++ b/accessibility/source/extended/AccessibleGridControl.cxx @@ -275,7 +275,7 @@ AccessibleGridControl::implGetHeaderBar( AccessibleTableControlObjType eObjType if( !pxMember->is() ) { AccessibleGridControlHeader* pHeaderBar = new AccessibleGridControlHeader( - (Reference< XAccessible >)m_pImpl->m_aCreator, m_aTable, eObjType ); + m_pImpl->m_aCreator, m_aTable, eObjType ); if ( TCTYPE_COLUMNHEADERBAR == eObjType) m_pImpl->m_pColumnHeaderBar = pHeaderBar; @@ -310,8 +310,8 @@ AccessibleGridControl::implGetFixedChild( sal_Int32 nChildIndex ) AccessibleGridControlTable* AccessibleGridControl::createAccessibleTable() { - Reference< XAccessible > xCreator = (Reference< XAccessible >)m_pImpl->m_aCreator; - OSL_ENSURE( xCreator.is(), "accessibility/extended/AccessibleGirdControl::createAccessibleTable: my creator died - how this?" ); + Reference< XAccessible > xCreator(m_pImpl->m_aCreator); + OSL_ENSURE( xCreator.is(), "accessibility/extended/AccessibleGirdControl::createAccessibleTable: my creator died - how this?" ); return new AccessibleGridControlTable( xCreator, m_aTable, TCTYPE_TABLE ); } diff --git a/accessibility/source/extended/AccessibleToolPanelDeckTabBar.cxx b/accessibility/source/extended/AccessibleToolPanelDeckTabBar.cxx index 658c5e9dc92c..855419267baa 100644 --- a/accessibility/source/extended/AccessibleToolPanelDeckTabBar.cxx +++ b/accessibility/source/extended/AccessibleToolPanelDeckTabBar.cxx @@ -196,7 +196,7 @@ namespace accessibility { ENSURE_OR_RETURN_VOID( i_nPosition <= m_aChildren.size(), "AccessibleToolPanelTabBar_Impl::PanelInserted: illegal position (or invalid cache!)" ); (void)i_pPanel; - m_aChildren.insert( m_aChildren.begin() + i_nPosition, (Reference< XAccessible >)NULL ); + m_aChildren.insert( m_aChildren.begin() + i_nPosition, Reference< XAccessible >() ); m_rAntiImpl.NotifyAccessibleEvent( AccessibleEventId::CHILD, Any(), makeAny( getAccessiblePanelItem( i_nPosition ) ) ); } diff --git a/accessibility/source/extended/accessibleeditbrowseboxcell.cxx b/accessibility/source/extended/accessibleeditbrowseboxcell.cxx index d5c38782314c..96ee02c62385 100644 --- a/accessibility/source/extended/accessibleeditbrowseboxcell.cxx +++ b/accessibility/source/extended/accessibleeditbrowseboxcell.cxx @@ -198,7 +198,7 @@ namespace accessibility void SAL_CALL EditBrowseBoxTableCellAccess::disposing() { // dispose our context, if it still alive - Reference< XComponent > xMyContext( (Reference< XAccessibleContext >)m_aContext, UNO_QUERY ); + Reference< XComponent > xMyContext( m_aContext.get(), UNO_QUERY ); if ( xMyContext.is() ) { try diff --git a/accessibility/source/extended/accessiblelistboxentry.cxx b/accessibility/source/extended/accessiblelistboxentry.cxx index f45000be66ff..06de24abb0ec 100644 --- a/accessibility/source/extended/accessiblelistboxentry.cxx +++ b/accessibility/source/extended/accessiblelistboxentry.cxx @@ -327,7 +327,7 @@ namespace accessibility Reference< XAccessible > AccessibleListBoxEntry::implGetParentAccessible( ) const { - Reference< XAccessible > xParent = (Reference< XAccessible >)m_aParent; + Reference< XAccessible > xParent(m_aParent); if ( !xParent.is() ) { OSL_ENSURE( m_aEntryPath.size(), "AccessibleListBoxEntry::getAccessibleParent: invalid path!" ); diff --git a/accessibility/source/extended/accessibletabbarbase.cxx b/accessibility/source/extended/accessibletabbarbase.cxx index 01ff84ebdea2..18c6ae50b1a3 100644 --- a/accessibility/source/extended/accessibletabbarbase.cxx +++ b/accessibility/source/extended/accessibletabbarbase.cxx @@ -53,7 +53,7 @@ IMPL_LINK( AccessibleTabBarBase, WindowEventListener, VclSimpleEvent*, pEvent ) OSL_ENSURE( pEventWindow, "AccessibleTabBarBase::WindowEventListener: no window!" ); if( ( pWinEvent->GetId() == VCLEVENT_TABBAR_PAGEREMOVED ) && - ( (sal_uInt16)(sal_IntPtr) pWinEvent->GetData() == TabBar::PAGE_NOT_FOUND ) && + ( (sal_uInt16)reinterpret_cast<sal_IntPtr>(pWinEvent->GetData()) == TabBar::PAGE_NOT_FOUND ) && ( dynamic_cast< AccessibleTabBarPageList *> (this) != NULL ) ) { return 0; diff --git a/accessibility/source/extended/accessibletabbarpagelist.cxx b/accessibility/source/extended/accessibletabbarpagelist.cxx index 67400bdf95bd..88aa8e82eccc 100644 --- a/accessibility/source/extended/accessibletabbarpagelist.cxx +++ b/accessibility/source/extended/accessibletabbarpagelist.cxx @@ -243,7 +243,7 @@ namespace accessibility { if ( m_pTabBar ) { - sal_uInt16 nPageId = (sal_uInt16)(sal_IntPtr) rVclWindowEvent.GetData(); + sal_uInt16 nPageId = (sal_uInt16)reinterpret_cast<sal_IntPtr>(rVclWindowEvent.GetData()); sal_uInt16 nPagePos = m_pTabBar->GetPagePos( nPageId ); UpdateEnabled( nPagePos, true ); } @@ -253,7 +253,7 @@ namespace accessibility { if ( m_pTabBar ) { - sal_uInt16 nPageId = (sal_uInt16)(sal_IntPtr) rVclWindowEvent.GetData(); + sal_uInt16 nPageId = (sal_uInt16)reinterpret_cast<sal_IntPtr>(rVclWindowEvent.GetData()); sal_uInt16 nPagePos = m_pTabBar->GetPagePos( nPageId ); UpdateEnabled( nPagePos, false ); } @@ -268,7 +268,7 @@ namespace accessibility { if ( m_pTabBar ) { - sal_uInt16 nPageId = (sal_uInt16)(sal_IntPtr) rVclWindowEvent.GetData(); + sal_uInt16 nPageId = (sal_uInt16)reinterpret_cast<sal_IntPtr>(rVclWindowEvent.GetData()); sal_uInt16 nPagePos = m_pTabBar->GetPagePos( nPageId ); UpdateSelected( nPagePos, true ); } @@ -278,7 +278,7 @@ namespace accessibility { if ( m_pTabBar ) { - sal_uInt16 nPageId = (sal_uInt16)(sal_IntPtr) rVclWindowEvent.GetData(); + sal_uInt16 nPageId = (sal_uInt16)reinterpret_cast<sal_IntPtr>(rVclWindowEvent.GetData()); sal_uInt16 nPagePos = m_pTabBar->GetPagePos( nPageId ); UpdateSelected( nPagePos, false ); } @@ -288,7 +288,7 @@ namespace accessibility { if ( m_pTabBar ) { - sal_uInt16 nPageId = (sal_uInt16)(sal_IntPtr) rVclWindowEvent.GetData(); + sal_uInt16 nPageId = (sal_uInt16)reinterpret_cast<sal_IntPtr>(rVclWindowEvent.GetData()); sal_uInt16 nPagePos = m_pTabBar->GetPagePos( nPageId ); InsertChild( nPagePos ); } @@ -298,7 +298,7 @@ namespace accessibility { if ( m_pTabBar ) { - sal_uInt16 nPageId = (sal_uInt16)(sal_IntPtr) rVclWindowEvent.GetData(); + sal_uInt16 nPageId = (sal_uInt16)reinterpret_cast<sal_IntPtr>(rVclWindowEvent.GetData()); if ( nPageId == TabBar::PAGE_NOT_FOUND ) { @@ -333,7 +333,7 @@ namespace accessibility break; case VCLEVENT_TABBAR_PAGETEXTCHANGED: { - sal_uInt16 nPageId = (sal_uInt16)(sal_IntPtr) rVclWindowEvent.GetData(); + sal_uInt16 nPageId = (sal_uInt16)reinterpret_cast<sal_IntPtr>(rVclWindowEvent.GetData()); sal_uInt16 nPagePos = m_pTabBar->GetPagePos( nPageId ); UpdatePageText( nPagePos ); } diff --git a/accessibility/source/extended/textwindowaccessibility.cxx b/accessibility/source/extended/textwindowaccessibility.cxx index 9e53b48808b0..bb58ae68d5e2 100644 --- a/accessibility/source/extended/textwindowaccessibility.cxx +++ b/accessibility/source/extended/textwindowaccessibility.cxx @@ -1020,7 +1020,7 @@ Document::retrieveCharacterAttributes( //character font name aAttribs[i].Name = "CharFontName"; aAttribs[i].Handle = -1; - aAttribs[i].Value = css::uno::makeAny( (::rtl::OUString)aFont.GetName() ); + aAttribs[i].Value = css::uno::makeAny( aFont.GetName() ); aAttribs[i].State = css::beans::PropertyState_DIRECT_VALUE; i++; diff --git a/accessibility/source/standard/vclxaccessiblecheckbox.cxx b/accessibility/source/standard/vclxaccessiblecheckbox.cxx index bdaf8593d5b7..327510ee1d1c 100644 --- a/accessibility/source/standard/vclxaccessiblecheckbox.cxx +++ b/accessibility/source/standard/vclxaccessiblecheckbox.cxx @@ -198,7 +198,7 @@ sal_Bool VCLXAccessibleCheckBox::doAccessibleAction ( sal_Int32 nIndex ) throw ( if ( nIndex < 0 || nIndex >= getAccessibleActionCount() ) throw IndexOutOfBoundsException(); - CheckBox* pCheckBox = (CheckBox*) GetWindow(); + CheckBox* pCheckBox = static_cast<CheckBox*>(GetWindow()); VCLXCheckBox* pVCLXCheckBox = static_cast< VCLXCheckBox* >( GetVCLXWindow() ); if ( pCheckBox && pVCLXCheckBox ) { @@ -328,7 +328,7 @@ Any VCLXAccessibleCheckBox::getMaximumValue( ) throw (RuntimeException, std::ex Any aValue; - CheckBox* pCheckBox = (CheckBox*) GetWindow(); + CheckBox* pCheckBox = static_cast<CheckBox*>(GetWindow()); if ( pCheckBox && pCheckBox->IsTriStateEnabled() ) aValue <<= (sal_Int32) 2; else |