summaryrefslogtreecommitdiff
path: root/svtools
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-06-08 16:28:33 +0200
committerStephan Bergmann <sbergman@redhat.com>2015-06-08 16:28:33 +0200
commit95f03f49940f88ebd49a02e1d133cf83259eef47 (patch)
treea9c91e5f9719f2b5668bd2ffda66eae691194888 /svtools
parent58f60b5108c584aa44f353f2fcbd07b81d474e48 (diff)
loplugin:cstylecast: deal with remaining pointer casts
Change-Id: I0df3b3737e02e6467fc9d71bc948a58797582173
Diffstat (limited to 'svtools')
-rw-r--r--svtools/source/contnr/imivctl1.cxx2
-rw-r--r--svtools/source/contnr/svimpbox.cxx6
-rw-r--r--svtools/source/contnr/treelistbox.cxx2
-rw-r--r--svtools/source/control/accessibleruler.cxx2
-rw-r--r--svtools/source/control/ctrltool.cxx8
-rw-r--r--svtools/source/control/tabbar.cxx4
-rw-r--r--svtools/source/control/valueacc.cxx2
-rw-r--r--svtools/source/svhtml/htmlkywd.cxx16
-rw-r--r--svtools/source/svrtf/rtfkeywd.cxx4
-rw-r--r--svtools/source/uno/popupmenucontrollerbase.cxx2
-rw-r--r--svtools/source/uno/popupwindowcontroller.cxx4
-rw-r--r--svtools/source/uno/svtxgridcontrol.cxx4
-rw-r--r--svtools/source/uno/unoiface.cxx8
-rw-r--r--svtools/source/uno/unoimap.cxx10
14 files changed, 37 insertions, 37 deletions
diff --git a/svtools/source/contnr/imivctl1.cxx b/svtools/source/contnr/imivctl1.cxx
index 636e9fb7fc76..17c529573bc8 100644
--- a/svtools/source/contnr/imivctl1.cxx
+++ b/svtools/source/contnr/imivctl1.cxx
@@ -3504,7 +3504,7 @@ bool SvxIconChoiceCtrl_Impl::RequestHelp( const HelpEvent& rHEvt )
sHelpText = sQuickHelpText;
else
sHelpText = aEntryText;
- Help::ShowQuickHelp( (vcl::Window*)pView, aOptTextRect, sHelpText, QuickHelpFlags::Left | QuickHelpFlags::VCenter );
+ Help::ShowQuickHelp( static_cast<vcl::Window*>(pView), aOptTextRect, sHelpText, QuickHelpFlags::Left | QuickHelpFlags::VCenter );
}
return true;
diff --git a/svtools/source/contnr/svimpbox.cxx b/svtools/source/contnr/svimpbox.cxx
index 5d87161e696b..45f03f4e7317 100644
--- a/svtools/source/contnr/svimpbox.cxx
+++ b/svtools/source/contnr/svimpbox.cxx
@@ -51,7 +51,7 @@ SvImpLBox::SvImpLBox( SvTreeListBox* pLBView, SvTreeList* pLBTree, WinBits nWinS
, aHorSBar(VclPtr<ScrollBar>::Create(pLBView, WB_DRAG | WB_HSCROLL))
, aScrBarBox(VclPtr<ScrollBarBox>::Create(pLBView))
, aOutputSize(0, 0)
- , aSelEng(pLBView, (FunctionSet*)0)
+ , aSelEng(pLBView, nullptr)
, aFctSet(this, &aSelEng, pLBView)
, nNextVerVisSize(0)
, nExtendedWinBits(0)
@@ -61,7 +61,7 @@ SvImpLBox::SvImpLBox( SvTreeListBox* pLBView, SvTreeList* pLBTree, WinBits nWinS
osl_atomic_increment(&s_nImageRefCount);
pView = pLBView;
pTree = pLBTree;
- aSelEng.SetFunctionSet( (FunctionSet*)&aFctSet );
+ aSelEng.SetFunctionSet( static_cast<FunctionSet*>(&aFctSet) );
aSelEng.ExpandSelectionOnMouseMove( false );
SetStyle( nWinStyle );
SetSelectionMode( SINGLE_SELECTION );
@@ -3331,7 +3331,7 @@ void SvImpLBox::NotifyTabsChanged()
if( GetUpdateMode() && !(nFlags & F_IGNORE_CHANGED_TABS ) &&
nCurUserEvent == 0 )
{
- nCurUserEvent = Application::PostUserEvent(LINK(this,SvImpLBox,MyUserEvent),(void*)0);
+ nCurUserEvent = Application::PostUserEvent(LINK(this,SvImpLBox,MyUserEvent),nullptr);
}
}
diff --git a/svtools/source/contnr/treelistbox.cxx b/svtools/source/contnr/treelistbox.cxx
index c698fe23ec6a..afcd5375439c 100644
--- a/svtools/source/contnr/treelistbox.cxx
+++ b/svtools/source/contnr/treelistbox.cxx
@@ -2026,7 +2026,7 @@ void SvTreeListBox::CheckButtonHdl()
{
aCheckButtonHdl.Call( this );
if ( pCheckButtonData )
- pImp->CallEventListeners( VCLEVENT_CHECKBOX_TOGGLE, (void*)pCheckButtonData->GetActEntry() );
+ pImp->CallEventListeners( VCLEVENT_CHECKBOX_TOGGLE, static_cast<void*>(pCheckButtonData->GetActEntry()) );
}
diff --git a/svtools/source/control/accessibleruler.cxx b/svtools/source/control/accessibleruler.cxx
index 942c7b3ab7dd..bec4a321ad45 100644
--- a/svtools/source/control/accessibleruler.cxx
+++ b/svtools/source/control/accessibleruler.cxx
@@ -165,7 +165,7 @@ sal_Int32 SAL_CALL SvtRulerAccessible::getAccessibleIndexInParent() throw( Runti
for( sal_Int32 i = 0 ; i < nChildCount ; ++i )
{
uno::Reference< XAccessible > xChild( xParentContext->getAccessibleChild( i ) );
- if( xChild.get() == ( XAccessible* ) this )
+ if( xChild.get() == static_cast<XAccessible*>(this) )
return i;
}
}
diff --git a/svtools/source/control/ctrltool.cxx b/svtools/source/control/ctrltool.cxx
index a39c169c5802..e5bdc8d79e71 100644
--- a/svtools/source/control/ctrltool.cxx
+++ b/svtools/source/control/ctrltool.cxx
@@ -302,7 +302,7 @@ void FontList::ImplInsertFonts( OutputDevice* pDevice, bool bAll,
(pNewInfo->GetCharSet() == eSystemEncoding) )
{
ImplFontListFontInfo* pTemp2 = pTemp->mpNext;
- *((vcl::FontInfo*)pTemp) = *((vcl::FontInfo*)pNewInfo);
+ *static_cast<vcl::FontInfo*>(pTemp) = *static_cast<vcl::FontInfo*>(pNewInfo);
pTemp->mpNext = pTemp2;
}
delete pNewInfo;
@@ -708,15 +708,15 @@ sal_Handle FontList::GetFirstFontInfo(const OUString& rName) const
{
ImplFontListNameInfo* pData = ImplFindByName( rName );
if ( !pData )
- return (sal_Handle)NULL;
+ return nullptr;
else
- return (sal_Handle)pData->mpFirst;
+ return static_cast<sal_Handle>(pData->mpFirst);
}
sal_Handle FontList::GetNextFontInfo( sal_Handle hFontInfo )
{
ImplFontListFontInfo* pInfo = static_cast<ImplFontListFontInfo*>(hFontInfo);
- return (sal_Handle)(pInfo->mpNext);
+ return static_cast<sal_Handle>(pInfo->mpNext);
}
const vcl::FontInfo& FontList::GetFontInfo( sal_Handle hFontInfo )
diff --git a/svtools/source/control/tabbar.cxx b/svtools/source/control/tabbar.cxx
index d84695a53889..e1790af39ff5 100644
--- a/svtools/source/control/tabbar.cxx
+++ b/svtools/source/control/tabbar.cxx
@@ -290,7 +290,7 @@ void ImplTabButton::Command(const CommandEvent& rCommandEvent)
if (rCommandEvent.GetCommand() == CommandEventId::ContextMenu)
{
TabBar* pParent = GetParent();
- pParent->maScrollAreaContextHdl.Call((void*)&rCommandEvent);
+ pParent->maScrollAreaContextHdl.Call(const_cast<CommandEvent *>(&rCommandEvent));
}
PushButton::Command(rCommandEvent);
}
@@ -1811,7 +1811,7 @@ void TabBar::MovePage(sal_uInt16 nPageId, sal_uInt16 nNewPos)
if (IsReallyVisible() && IsUpdateMode())
Invalidate();
- CallEventListeners( VCLEVENT_TABBAR_PAGEMOVED, (void*) &aPair );
+ CallEventListeners( VCLEVENT_TABBAR_PAGEMOVED, static_cast<void*>(&aPair) );
}
}
diff --git a/svtools/source/control/valueacc.cxx b/svtools/source/control/valueacc.cxx
index c6aa67b65e20..0421a5f9c212 100644
--- a/svtools/source/control/valueacc.cxx
+++ b/svtools/source/control/valueacc.cxx
@@ -312,7 +312,7 @@ uno::Reference< accessibility::XAccessibleRelationSet > SAL_CALL ValueSetAcc::ge
ThrowIfDisposed();
SolarMutexGuard g;
uno::Reference< accessibility::XAccessibleRelationSet > xRelSet;
- vcl::Window* pWindow = (vcl::Window*)mpParent;
+ vcl::Window* pWindow = static_cast<vcl::Window*>(mpParent);
if ( pWindow )
{
utl::AccessibleRelationSetHelper* pRelationSet = new utl::AccessibleRelationSetHelper;
diff --git a/svtools/source/svhtml/htmlkywd.cxx b/svtools/source/svhtml/htmlkywd.cxx
index 49780bfcfa9d..17927fb618e7 100644
--- a/svtools/source/svhtml/htmlkywd.cxx
+++ b/svtools/source/svhtml/htmlkywd.cxx
@@ -191,7 +191,7 @@ int GetHTMLToken( const OUString& rName )
{
if( !bSortKeyWords )
{
- qsort( (void*) aHTMLTokenTab,
+ qsort( static_cast<void*>(aHTMLTokenTab),
sizeof( aHTMLTokenTab ) / sizeof( HTML_TokenEntry ),
sizeof( HTML_TokenEntry ),
HTMLKeyCompare );
@@ -209,7 +209,7 @@ int GetHTMLToken( const OUString& rName )
aSrch.nToken = -1;
pFound = bsearch( &aSrch,
- (void*) aHTMLTokenTab,
+ static_cast<void*>(aHTMLTokenTab),
sizeof( aHTMLTokenTab ) / sizeof( HTML_TokenEntry ),
sizeof( HTML_TokenEntry ),
HTMLKeyCompare );
@@ -528,7 +528,7 @@ sal_Unicode GetHTMLCharName( const OUString& rName )
{
if( !bSortCharKeyWords )
{
- qsort( (void*) aHTMLCharNameTab,
+ qsort( static_cast<void*>(aHTMLCharNameTab),
sizeof( aHTMLCharNameTab ) / sizeof( HTML_CharEntry ),
sizeof( HTML_CharEntry ),
HTMLCharNameCompare );
@@ -542,7 +542,7 @@ sal_Unicode GetHTMLCharName( const OUString& rName )
aSrch.cChar = USHRT_MAX;
if( 0 != ( pFound = bsearch( &aSrch,
- (void*) aHTMLCharNameTab,
+ static_cast<void*>(aHTMLCharNameTab),
sizeof( aHTMLCharNameTab) / sizeof( HTML_CharEntry ),
sizeof( HTML_CharEntry ),
HTMLCharNameCompare )))
@@ -711,7 +711,7 @@ int GetHTMLOption( const OUString& rName )
{
if( !bSortOptionKeyWords )
{
- qsort( (void*) aHTMLOptionTab,
+ qsort( static_cast<void*>(aHTMLOptionTab),
sizeof( aHTMLOptionTab ) / sizeof( HTML_TokenEntry ),
sizeof( HTML_TokenEntry ),
HTMLKeyCompare );
@@ -725,7 +725,7 @@ int GetHTMLOption( const OUString& rName )
aSrch.nToken = -1;
if( 0 != ( pFound = bsearch( &aSrch,
- (void*) aHTMLOptionTab,
+ static_cast<void*>(aHTMLOptionTab),
sizeof( aHTMLOptionTab ) / sizeof( HTML_TokenEntry ),
sizeof( HTML_TokenEntry ),
HTMLKeyCompare )))
@@ -927,7 +927,7 @@ sal_uInt32 GetHTMLColor( const OUString& rName )
{
if( !bSortColorKeyWords )
{
- qsort( (void*) aHTMLColorNameTab,
+ qsort( static_cast<void*>(aHTMLColorNameTab),
sizeof( aHTMLColorNameTab ) / sizeof( HTML_ColorEntry ),
sizeof( HTML_ColorEntry ),
HTMLColorNameCompare );
@@ -943,7 +943,7 @@ sal_uInt32 GetHTMLColor( const OUString& rName )
aSrch.nColor = HTML_NO_COLOR;
if( 0 != ( pFound = bsearch( &aSrch,
- (void*) aHTMLColorNameTab,
+ static_cast<void*>(aHTMLColorNameTab),
sizeof( aHTMLColorNameTab) / sizeof( HTML_ColorEntry ),
sizeof( HTML_ColorEntry ),
HTMLColorNameCompare )))
diff --git a/svtools/source/svrtf/rtfkeywd.cxx b/svtools/source/svrtf/rtfkeywd.cxx
index b64a25fa5111..93f0092e15df 100644
--- a/svtools/source/svrtf/rtfkeywd.cxx
+++ b/svtools/source/svrtf/rtfkeywd.cxx
@@ -1209,7 +1209,7 @@ int GetRTFToken( const OUString& rSearch )
{
if( !bSortKeyWords )
{
- qsort( (void*) aRTFTokenTab,
+ qsort( static_cast<void*>(aRTFTokenTab),
sizeof( aRTFTokenTab ) / sizeof( RTF_TokenEntry ),
sizeof( RTF_TokenEntry ),
RTFKeyCompare );
@@ -1223,7 +1223,7 @@ int GetRTFToken( const OUString& rSearch )
aSrch.nToken = -1;
if( 0 != ( pFound = bsearch( &aSrch,
- (void*) aRTFTokenTab,
+ static_cast<void*>(aRTFTokenTab),
sizeof( aRTFTokenTab ) / sizeof( RTF_TokenEntry ),
sizeof( RTF_TokenEntry ),
RTFKeyCompare )))
diff --git a/svtools/source/uno/popupmenucontrollerbase.cxx b/svtools/source/uno/popupmenucontrollerbase.cxx
index 993ee1276bb9..d19263d776ab 100644
--- a/svtools/source/uno/popupmenucontrollerbase.cxx
+++ b/svtools/source/uno/popupmenucontrollerbase.cxx
@@ -353,7 +353,7 @@ void SAL_CALL PopupMenuControllerBase::setPopupMenu( const Reference< awt::XPopu
SolarMutexGuard aSolarMutexGuard;
m_xPopupMenu = xPopupMenu;
- m_xPopupMenu->addMenuListener( Reference< awt::XMenuListener >( (OWeakObject*)this, UNO_QUERY ));
+ m_xPopupMenu->addMenuListener( Reference< awt::XMenuListener >( static_cast<OWeakObject*>(this), UNO_QUERY ));
Reference< XDispatchProvider > xDispatchProvider( m_xFrame, UNO_QUERY );
diff --git a/svtools/source/uno/popupwindowcontroller.cxx b/svtools/source/uno/popupwindowcontroller.cxx
index 39ceb320d424..1446885b51be 100644
--- a/svtools/source/uno/popupwindowcontroller.cxx
+++ b/svtools/source/uno/popupwindowcontroller.cxx
@@ -94,7 +94,7 @@ IMPL_LINK( PopupWindowControllerImpl, WindowEventListener, VclSimpleEvent*, pEve
if( mpPopupWindow )
{
if( mpToolBox )
- mpToolBox->CallEventListeners( VCLEVENT_DROPDOWN_OPEN, (void*)mpPopupWindow );
+ mpToolBox->CallEventListeners( VCLEVENT_DROPDOWN_OPEN, static_cast<void*>(mpPopupWindow) );
mpPopupWindow->CallEventListeners( VCLEVENT_WINDOW_GETFOCUS, 0 );
svtools::ToolbarMenu* pToolbarMenu = dynamic_cast< svtools::ToolbarMenu* >( mpPopupWindow.get() );
@@ -110,7 +110,7 @@ IMPL_LINK( PopupWindowControllerImpl, WindowEventListener, VclSimpleEvent*, pEve
{
mpPopupWindow->CallEventListeners( VCLEVENT_WINDOW_LOSEFOCUS, 0 );
if( mpToolBox )
- mpToolBox->CallEventListeners( VCLEVENT_DROPDOWN_CLOSE, (void*)mpPopupWindow );
+ mpToolBox->CallEventListeners( VCLEVENT_DROPDOWN_CLOSE, static_cast<void*>(mpPopupWindow) );
}
break;
}
diff --git a/svtools/source/uno/svtxgridcontrol.cxx b/svtools/source/uno/svtxgridcontrol.cxx
index b1fb0a2e0cbd..e81c40860fc9 100644
--- a/svtools/source/uno/svtxgridcontrol.cxx
+++ b/svtools/source/uno/svtxgridcontrol.cxx
@@ -770,7 +770,7 @@ sal_Bool SAL_CALL SVTXGridControl::isRowSelected( ::sal_Int32 index ) throw (Run
void SVTXGridControl::dispose() throw(RuntimeException, std::exception)
{
EventObject aObj;
- aObj.Source = (::cppu::OWeakObject*)this;
+ aObj.Source = static_cast<cppu::OWeakObject*>(this);
m_aSelectionListeners.disposeAndClear( aObj );
VCLXWindow::dispose();
}
@@ -876,7 +876,7 @@ void SVTXGridControl::ImplCallItemListeners()
if ( m_aSelectionListeners.getLength() )
{
GridSelectionEvent aEvent;
- aEvent.Source = (::cppu::OWeakObject*)this;
+ aEvent.Source = static_cast<cppu::OWeakObject*>(this);
sal_Int32 const nSelectedRowCount( pTable->GetSelectedRowCount() );
aEvent.SelectedRowIndexes.realloc( nSelectedRowCount );
diff --git a/svtools/source/uno/unoiface.cxx b/svtools/source/uno/unoiface.cxx
index 55d0a483ca0d..31b26ce5ba60 100644
--- a/svtools/source/uno/unoiface.cxx
+++ b/svtools/source/uno/unoiface.cxx
@@ -114,7 +114,7 @@ SAL_DLLPUBLIC_EXPORT vcl::Window* CreateWindow( VCLXWindow** ppNewComp, const ::
static_cast<CalendarField*>(pWindow)->EnableEmptyFieldValue( true );
SVTXDateField * newComp = new SVTXDateField;
*ppNewComp = newComp;
- newComp->SetFormatter( (FormatterBase*)static_cast<DateField*>(pWindow) );
+ newComp->SetFormatter( static_cast<FormatterBase*>(static_cast<DateField*>(pWindow)) );
}
else if (aServiceName.equalsIgnoreAsciiCase("roadmap") )
{
@@ -396,7 +396,7 @@ void VCLXMultiLineEdit::ProcessWindowEvent( const VclWindowEvent& rVclWindowEven
if ( maTextListeners.getLength() )
{
::com::sun::star::awt::TextEvent aEvent;
- aEvent.Source = (::cppu::OWeakObject*)this;
+ aEvent.Source = static_cast<cppu::OWeakObject*>(this);
maTextListeners.textChanged( aEvent );
}
}
@@ -725,7 +725,7 @@ sal_Int16 VCLXFileControl::getMaxTextLen() throw(::com::sun::star::uno::RuntimeE
IMPL_LINK_NOARG(VCLXFileControl, ModifyHdl)
{
::com::sun::star::awt::TextEvent aEvent;
- aEvent.Source = (::cppu::OWeakObject*)this;
+ aEvent.Source = static_cast<cppu::OWeakObject*>(this);
maTextListeners.textChanged( aEvent );
return 1;
@@ -1368,7 +1368,7 @@ void SVTXFormattedField::NotifyTextListeners()
if ( GetTextListeners().getLength() )
{
::com::sun::star::awt::TextEvent aEvent;
- aEvent.Source = (::cppu::OWeakObject*)this;
+ aEvent.Source = static_cast<cppu::OWeakObject*>(this);
GetTextListeners().textChanged( aEvent );
}
}
diff --git a/svtools/source/uno/unoimap.cxx b/svtools/source/uno/unoimap.cxx
index bb0dd936fb86..f74ee95c20ee 100644
--- a/svtools/source/uno/unoimap.cxx
+++ b/svtools/source/uno/unoimap.cxx
@@ -738,27 +738,27 @@ bool SvUnoImageMap::fillImageMap( ImageMap& rMap ) const
Reference< XInterface > SvUnoImageMapRectangleObject_createInstance( const SvEventDescription* pSupportedMacroItems )
{
- return (XWeak*)new SvUnoImageMapObject( IMAP_OBJ_RECTANGLE, pSupportedMacroItems );
+ return static_cast<XWeak*>(new SvUnoImageMapObject( IMAP_OBJ_RECTANGLE, pSupportedMacroItems ));
}
Reference< XInterface > SvUnoImageMapCircleObject_createInstance( const SvEventDescription* pSupportedMacroItems )
{
- return (XWeak*)new SvUnoImageMapObject( IMAP_OBJ_CIRCLE, pSupportedMacroItems );
+ return static_cast<XWeak*>(new SvUnoImageMapObject( IMAP_OBJ_CIRCLE, pSupportedMacroItems ));
}
Reference< XInterface > SvUnoImageMapPolygonObject_createInstance( const SvEventDescription* pSupportedMacroItems )
{
- return (XWeak*)new SvUnoImageMapObject( IMAP_OBJ_POLYGON, pSupportedMacroItems );
+ return static_cast<XWeak*>(new SvUnoImageMapObject( IMAP_OBJ_POLYGON, pSupportedMacroItems ));
}
Reference< XInterface > SvUnoImageMap_createInstance( const SvEventDescription* pSupportedMacroItems )
{
- return (XWeak*)new SvUnoImageMap( pSupportedMacroItems );
+ return static_cast<XWeak*>(new SvUnoImageMap( pSupportedMacroItems ));
}
Reference< XInterface > SvUnoImageMap_createInstance( const ImageMap& rMap, const SvEventDescription* pSupportedMacroItems )
{
- return (XWeak*)new SvUnoImageMap( rMap, pSupportedMacroItems );
+ return static_cast<XWeak*>(new SvUnoImageMap( rMap, pSupportedMacroItems ));
}
bool SvUnoImageMap_fillImageMap( Reference< XInterface > xImageMap, ImageMap& rMap )