summaryrefslogtreecommitdiff
path: root/basctl
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2014-10-21 09:12:47 +0200
committerNoel Grandin <noel@peralex.com>2014-10-23 12:36:14 +0200
commit50a8c89f36b3b8f2d029a0bedc1ed9362807321d (patch)
treec555ceefd72054d7af227427355dfac8baabe467 /basctl
parentcb414252b8d5fcff516291ed4b9db75933e5331a (diff)
loplugin: cstylecast
Change-Id: I9134aff4f2e6bff43ebb78c605e0ff521eac6ffc
Diffstat (limited to 'basctl')
-rw-r--r--basctl/source/basicide/basicbox.cxx2
-rw-r--r--basctl/source/basicide/baside2.cxx8
-rw-r--r--basctl/source/basicide/baside2b.cxx16
-rw-r--r--basctl/source/basicide/baside3.cxx2
-rw-r--r--basctl/source/basicide/basides1.cxx22
-rw-r--r--basctl/source/basicide/basides2.cxx4
-rw-r--r--basctl/source/basicide/basobj2.cxx6
-rw-r--r--basctl/source/basicide/basobj3.cxx4
-rw-r--r--basctl/source/basicide/iderdll.cxx2
-rw-r--r--basctl/source/basicide/macrodlg.cxx8
-rw-r--r--basctl/source/basicide/moduldl2.cxx2
-rw-r--r--basctl/source/dlged/dlged.cxx4
-rw-r--r--basctl/source/dlged/dlgedobj.cxx2
-rw-r--r--basctl/source/dlged/managelang.cxx2
14 files changed, 42 insertions, 42 deletions
diff --git a/basctl/source/basicide/basicbox.cxx b/basctl/source/basicide/basicbox.cxx
index 04044942b832..79a60e89a212 100644
--- a/basctl/source/basicide/basicbox.cxx
+++ b/basctl/source/basicide/basicbox.cxx
@@ -61,7 +61,7 @@ LibBoxControl::~LibBoxControl()
void LibBoxControl::StateChanged( sal_uInt16, SfxItemState eState, const SfxPoolItem* pState )
{
- LibBox* pBox = (LibBox*)GetToolBox().GetItemWindow(GetId());
+ LibBox* pBox = static_cast<LibBox*>(GetToolBox().GetItemWindow(GetId()));
DBG_ASSERT( pBox, "Box not found" );
if ( !pBox )
diff --git a/basctl/source/basicide/baside2.cxx b/basctl/source/basicide/baside2.cxx
index 97a31e140aa3..564b0f025d89 100644
--- a/basctl/source/basicide/baside2.cxx
+++ b/basctl/source/basicide/baside2.cxx
@@ -341,7 +341,7 @@ bool ModulWindow::BasicExecute()
// first Macro, else blind "Main" (ExtSearch?)
for ( sal_uInt16 nMacro = 0; nMacro < xModule->GetMethods()->Count(); nMacro++ )
{
- SbMethod* pM = (SbMethod*)xModule->GetMethods()->Get( nMacro );
+ SbMethod* pM = static_cast<SbMethod*>(xModule->GetMethods()->Get( nMacro ));
DBG_ASSERT( pM, "Method?" );
pM->GetLineRange( nStart, nEnd );
if ( nCurMethodStart >= nStart && nCurMethodStart <= nEnd )
@@ -544,7 +544,7 @@ bool ModulWindow::ToggleBreakPoint( sal_uLong nLine )
{
for ( sal_uInt16 nMethod = 0; nMethod < xModule->GetMethods()->Count(); nMethod++ )
{
- SbMethod* pMethod = (SbMethod*)xModule->GetMethods()->Get( nMethod );
+ SbMethod* pMethod = static_cast<SbMethod*>(xModule->GetMethods()->Get( nMethod ));
DBG_ASSERT( pMethod, "Methode nicht gefunden! (NULL)" );
pMethod->SetDebugFlags( pMethod->GetDebugFlags() | SbDEBUG_BREAK );
}
@@ -744,7 +744,7 @@ void ModulWindow::EditMacro( const OUString& rMacroName )
if ( !aStatus.bError )
{
sal_uInt16 nStart, nEnd;
- SbMethod* pMethod = (SbMethod*)xModule->Find( rMacroName, SbxCLASS_METHOD );
+ SbMethod* pMethod = static_cast<SbMethod*>(xModule->Find( rMacroName, SbxCLASS_METHOD ));
if ( pMethod )
{
pMethod->GetLineRange( nStart, nEnd );
@@ -1311,7 +1311,7 @@ void ModulWindow::BasicStarted()
rList.SetBreakPointsInBasic( xModule );
for ( sal_uInt16 nMethod = 0; nMethod < xModule->GetMethods()->Count(); nMethod++ )
{
- SbMethod* pMethod = (SbMethod*)xModule->GetMethods()->Get( nMethod );
+ SbMethod* pMethod = static_cast<SbMethod*>(xModule->GetMethods()->Get( nMethod ));
DBG_ASSERT( pMethod, "Methode nicht gefunden! (NULL)" );
pMethod->SetDebugFlags( pMethod->GetDebugFlags() | SbDEBUG_BREAK );
}
diff --git a/basctl/source/basicide/baside2b.cxx b/basctl/source/basicide/baside2b.cxx
index 9b34fc328760..134a5c067a06 100644
--- a/basctl/source/basicide/baside2b.cxx
+++ b/basctl/source/basicide/baside2b.cxx
@@ -2653,16 +2653,16 @@ void CodeCompleteListBox::InsertSelectedEntry()
GetParentEditView()->SetSelection( pCodeCompleteWindow->pParent->GetLastHighlightPortionTextSelection() );
GetParentEditView()->DeleteSelected();
- if( !((OUString) GetEntry( GetSelectEntryPos() )).isEmpty() )
+ if( !GetEntry( GetSelectEntryPos() ).isEmpty() )
{//if the user selected something
- GetParentEditView()->InsertText( (OUString) GetEntry(GetSelectEntryPos()), false );
+ GetParentEditView()->InsertText( GetEntry(GetSelectEntryPos()), false );
}
}
else
{
- if( !((OUString) GetEntry( GetSelectEntryPos() )).isEmpty() )
+ if( !GetEntry( GetSelectEntryPos() ).isEmpty() )
{//if the user selected something
- GetParentEditView()->InsertText( (OUString) GetEntry(GetSelectEntryPos()), false );
+ GetParentEditView()->InsertText( GetEntry(GetSelectEntryPos()), false );
}
}
HideAndRestoreFocus();
@@ -2672,7 +2672,7 @@ void CodeCompleteListBox::SetMatchingEntries()
{
for(sal_uInt16 i=0; i< GetEntryCount(); ++i)
{
- OUString sEntry = (OUString) GetEntry(i);
+ OUString sEntry = GetEntry(i);
if( sEntry.startsWithIgnoreAsciiCase( aFuncBuffer.toString() ) )
{
SelectEntry(sEntry);
@@ -2729,7 +2729,7 @@ void CodeCompleteListBox::KeyInput( const KeyEvent& rKeyEvt )
nInd = 0;
for( sal_Int32 i = nInd; i != GetEntryCount(); ++i )
{
- OUString sEntry = (OUString) GetEntry(i);
+ OUString sEntry = GetEntry(i);
if( sEntry.startsWithIgnoreAsciiCase( aFuncBuffer.toString() )
&& (aFuncBuffer.toString() != sTypedText) && (i != nInd) )
{
@@ -2758,7 +2758,7 @@ void CodeCompleteListBox::KeyInput( const KeyEvent& rKeyEvt )
TextSelection aSel( GetParentEditView()->GetSelection() );
TextPaM aEnd( GetParentEditView()->CursorEndOfLine(pCodeCompleteWindow->GetTextSelection().GetEnd()) );
GetParentEditView()->SetSelection(TextSelection(pCodeCompleteWindow->GetTextSelection().GetStart(), aEnd ) );
- OUString aTabInsertedStr( ((OUString)GetParentEditView()->GetSelected()) );
+ OUString aTabInsertedStr( GetParentEditView()->GetSelected() );
GetParentEditView()->SetSelection( aSel );
if( !aTabInsertedStr.isEmpty() && aTabInsertedStr != aFuncBuffer.toString() )
@@ -2836,7 +2836,7 @@ void CodeCompleteWindow::ResizeAndPositionListBox()
OUString aLongestEntry = pListBox->GetEntry( 0 );// grab the longest one: max search
for( sal_Int32 i=1; i< pListBox->GetEntryCount(); ++i )
{
- if( ((OUString) pListBox->GetEntry( i )).getLength() > aLongestEntry.getLength() )
+ if( pListBox->GetEntry( i ).getLength() > aLongestEntry.getLength() )
aLongestEntry = pListBox->GetEntry( i );
}
// get column/line count
diff --git a/basctl/source/basicide/baside3.cxx b/basctl/source/basicide/baside3.cxx
index e294a3b825ff..bd238ba52ac8 100644
--- a/basctl/source/basicide/baside3.cxx
+++ b/basctl/source/basicide/baside3.cxx
@@ -483,7 +483,7 @@ void DialogWindow::ExecuteCommand( SfxRequest& rReq )
const SfxItemSet* pArgs = rReq.GetArgs();
DBG_ASSERT( pArgs, "Nix Args" );
- const SfxAllEnumItem& rItem = (SfxAllEnumItem&)pArgs->Get( SID_CHOOSE_CONTROLS );
+ const SfxAllEnumItem& rItem = static_cast<const SfxAllEnumItem&>(pArgs->Get( SID_CHOOSE_CONTROLS ));
switch( rItem.GetValue() )
{
case SVX_SNAP_PUSHBUTTON:
diff --git a/basctl/source/basicide/basides1.cxx b/basctl/source/basicide/basides1.cxx
index 4b2582ee66ff..98d0159f3925 100644
--- a/basctl/source/basicide/basides1.cxx
+++ b/basctl/source/basicide/basides1.cxx
@@ -262,7 +262,7 @@ void Shell::ExecuteGlobal( SfxRequest& rReq )
{
if ( rReq.GetArgs() )
{
- const SfxUInt16Item &rTabId = (const SfxUInt16Item&)rReq.GetArgs()->Get(SID_BASICIDE_ARG_TABID );
+ const SfxUInt16Item &rTabId = static_cast<const SfxUInt16Item&>(rReq.GetArgs()->Get(SID_BASICIDE_ARG_TABID ));
Organize( rTabId.GetValue() );
}
else
@@ -278,7 +278,7 @@ void Shell::ExecuteGlobal( SfxRequest& rReq )
case SID_BASICIDE_EDITMACRO:
{
DBG_ASSERT( rReq.GetArgs(), "arguments expected" );
- const SfxMacroInfoItem& rInfo = (const SfxMacroInfoItem&)rReq.GetArgs()->Get(SID_BASICIDE_ARG_MACROINFO );
+ const SfxMacroInfoItem& rInfo = static_cast<const SfxMacroInfoItem&>(rReq.GetArgs()->Get(SID_BASICIDE_ARG_MACROINFO ));
BasicManager* pBasMgr = (BasicManager*)rInfo.GetBasicManager();
DBG_ASSERT( pBasMgr, "Nichts selektiert im Basic-Baum ?" );
@@ -316,7 +316,7 @@ void Shell::ExecuteGlobal( SfxRequest& rReq )
pModule = pBasic->FindModule( aModName );
}
else
- pModule = (SbModule*) pBasic->GetModules()->Get(0);
+ pModule = static_cast<SbModule*>( pBasic->GetModules()->Get(0) );
}
DBG_ASSERT( pModule, "Kein Modul!" );
if ( pModule && !pModule->GetMethods()->Find( rInfo.GetMethod(), SbxCLASS_METHOD ) )
@@ -345,8 +345,8 @@ void Shell::ExecuteGlobal( SfxRequest& rReq )
case SID_BASICIDE_NAMECHANGEDONTAB:
{
DBG_ASSERT( rReq.GetArgs(), "arguments expected" );
- const SfxUInt16Item &rTabId = (const SfxUInt16Item&)rReq.GetArgs()->Get(SID_BASICIDE_ARG_TABID );
- const SfxStringItem &rModName = (const SfxStringItem&)rReq.GetArgs()->Get(SID_BASICIDE_ARG_MODULENAME );
+ const SfxUInt16Item &rTabId = static_cast<const SfxUInt16Item&>(rReq.GetArgs()->Get(SID_BASICIDE_ARG_TABID ));
+ const SfxStringItem &rModName = static_cast<const SfxStringItem&>(rReq.GetArgs()->Get(SID_BASICIDE_ARG_MODULENAME ));
if ( aWindowTable.find( rTabId.GetValue() ) != aWindowTable.end() )
{
BaseWindow* pWin = aWindowTable[ rTabId.GetValue() ];
@@ -397,7 +397,7 @@ void Shell::ExecuteGlobal( SfxRequest& rReq )
case SID_BASICIDE_UPDATEMODULESOURCE:
{
DBG_ASSERT( rReq.GetArgs(), "arguments expected" );
- const SfxMacroInfoItem& rInfo = (const SfxMacroInfoItem&)rReq.GetArgs()->Get(SID_BASICIDE_ARG_MACROINFO );
+ const SfxMacroInfoItem& rInfo = static_cast<const SfxMacroInfoItem&>(rReq.GetArgs()->Get(SID_BASICIDE_ARG_MACROINFO ));
BasicManager* pBasMgr = (BasicManager*)rInfo.GetBasicManager();
DBG_ASSERT( pBasMgr, "Store source: Kein BasMgr?" );
ScriptDocument aDocument( ScriptDocument::getDocumentForBasicManager( pBasMgr ) );
@@ -432,10 +432,10 @@ void Shell::ExecuteGlobal( SfxRequest& rReq )
case SID_BASICIDE_LIBLOADED:
{
DBG_ASSERT( rReq.GetArgs(), "arguments expected" );
- const SfxUsrAnyItem& rShellItem = (const SfxUsrAnyItem&)rReq.GetArgs()->Get( SID_BASICIDE_ARG_DOCUMENT_MODEL );
+ const SfxUsrAnyItem& rShellItem = static_cast<const SfxUsrAnyItem&>(rReq.GetArgs()->Get( SID_BASICIDE_ARG_DOCUMENT_MODEL ));
uno::Reference< frame::XModel > xModel( rShellItem.GetValue(), UNO_QUERY );
ScriptDocument aDocument( xModel.is() ? ScriptDocument( xModel ) : ScriptDocument::getApplicationScriptDocument() );
- const SfxStringItem& rLibNameItem = (const SfxStringItem&)rReq.GetArgs()->Get( SID_BASICIDE_ARG_LIBNAME );
+ const SfxStringItem& rLibNameItem = static_cast<const SfxStringItem&>(rReq.GetArgs()->Get( SID_BASICIDE_ARG_LIBNAME ));
OUString aLibName( rLibNameItem.GetValue() );
if ( nSlot == SID_BASICIDE_LIBSELECTED )
@@ -509,7 +509,7 @@ void Shell::ExecuteGlobal( SfxRequest& rReq )
case SID_BASICIDE_SBXINSERTED:
{
DBG_ASSERT( rReq.GetArgs(), "arguments expected" );
- const SbxItem& rSbxItem = (const SbxItem&)rReq.GetArgs()->Get(SID_BASICIDE_ARG_SBX );
+ const SbxItem& rSbxItem = static_cast<const SbxItem&>(rReq.GetArgs()->Get(SID_BASICIDE_ARG_SBX ));
ScriptDocument aDocument( rSbxItem.GetDocument() );
OUString aLibName( rSbxItem.GetLibName() );
OUString aName( rSbxItem.GetName() );
@@ -525,7 +525,7 @@ void Shell::ExecuteGlobal( SfxRequest& rReq )
case SID_BASICIDE_SBXDELETED:
{
DBG_ASSERT( rReq.GetArgs(), "arguments expected" );
- const SbxItem& rSbxItem = (const SbxItem&)rReq.GetArgs()->Get(SID_BASICIDE_ARG_SBX );
+ const SbxItem& rSbxItem = static_cast<const SbxItem&>(rReq.GetArgs()->Get(SID_BASICIDE_ARG_SBX ));
ScriptDocument aDocument( rSbxItem.GetDocument() );
BaseWindow* pWin = FindWindow( aDocument, rSbxItem.GetLibName(), rSbxItem.GetName(), rSbxItem.GetType(), true );
if ( pWin )
@@ -535,7 +535,7 @@ void Shell::ExecuteGlobal( SfxRequest& rReq )
case SID_BASICIDE_SHOWSBX:
{
DBG_ASSERT( rReq.GetArgs(), "arguments expected" );
- const SbxItem& rSbxItem = (const SbxItem&)rReq.GetArgs()->Get(SID_BASICIDE_ARG_SBX );
+ const SbxItem& rSbxItem = static_cast<const SbxItem&>(rReq.GetArgs()->Get(SID_BASICIDE_ARG_SBX ));
ScriptDocument aDocument( rSbxItem.GetDocument() );
OUString aLibName( rSbxItem.GetLibName() );
OUString aName( rSbxItem.GetName() );
diff --git a/basctl/source/basicide/basides2.cxx b/basctl/source/basicide/basides2.cxx
index 8912b7f79cb7..27d7743ab933 100644
--- a/basctl/source/basicide/basides2.cxx
+++ b/basctl/source/basicide/basides2.cxx
@@ -89,7 +89,7 @@ SfxPrinter* Shell::GetPrinter( bool bCreate )
{
if ( pCurWin )
{
- DocShell* pDocShell = (DocShell*)GetViewFrame()->GetObjectShell();
+ DocShell* pDocShell = static_cast<DocShell*>(GetViewFrame()->GetObjectShell());
DBG_ASSERT( pDocShell, "DocShell ?!" );
return pDocShell->GetPrinter( bCreate );
}
@@ -99,7 +99,7 @@ SfxPrinter* Shell::GetPrinter( bool bCreate )
sal_uInt16 Shell::SetPrinter( SfxPrinter *pNewPrinter, sal_uInt16 nDiffFlags, bool )
{
(void)nDiffFlags;
- DocShell* pDocShell = (DocShell*)GetViewFrame()->GetObjectShell();
+ DocShell* pDocShell = static_cast<DocShell*>(GetViewFrame()->GetObjectShell());
DBG_ASSERT( pDocShell, "DocShell ?!" );
pDocShell->SetPrinter( pNewPrinter );
return 0;
diff --git a/basctl/source/basicide/basobj2.cxx b/basctl/source/basicide/basobj2.cxx
index 32933e3b9bad..5645fb8a68f2 100644
--- a/basctl/source/basicide/basobj2.cxx
+++ b/basctl/source/basicide/basobj2.cxx
@@ -404,7 +404,7 @@ Sequence< OUString > GetMethodNames( const ScriptDocument& rDocument, const OUSt
sal_uInt16 nRealCount = nCount;
for ( sal_uInt16 i = 0; i < nCount; i++ )
{
- SbMethod* pMethod = (SbMethod*)pMod->GetMethods()->Get( i );
+ SbMethod* pMethod = static_cast<SbMethod*>(pMod->GetMethods()->Get( i ));
if( pMethod->IsHidden() )
--nRealCount;
}
@@ -413,7 +413,7 @@ Sequence< OUString > GetMethodNames( const ScriptDocument& rDocument, const OUSt
sal_uInt16 iTarget = 0;
for ( sal_uInt16 i = 0 ; i < nCount; ++i )
{
- SbMethod* pMethod = (SbMethod*)pMod->GetMethods()->Get( i );
+ SbMethod* pMethod = static_cast<SbMethod*>(pMod->GetMethods()->Get( i ));
if( pMethod->IsHidden() )
continue;
SAL_WARN_IF( !pMethod, "basctl.basicide","Method not found! (NULL)" );
@@ -452,7 +452,7 @@ bool HasMethod (
SbxArray* pMethods = pMod->GetMethods();
if ( pMethods )
{
- SbMethod* pMethod = (SbMethod*)pMethods->Find( rMethName, SbxCLASS_METHOD );
+ SbMethod* pMethod = static_cast<SbMethod*>(pMethods->Find( rMethName, SbxCLASS_METHOD ));
if ( pMethod && !pMethod->IsHidden() )
bHasMethod = true;
}
diff --git a/basctl/source/basicide/basobj3.cxx b/basctl/source/basicide/basobj3.cxx
index 11553841b4b6..9c42afc8be2e 100644
--- a/basctl/source/basicide/basobj3.cxx
+++ b/basctl/source/basicide/basobj3.cxx
@@ -141,7 +141,7 @@ SbMethod* CreateMacro( SbModule* pModule, const OUString& rMacroName )
}
}
- SbMethod* pMethod = (SbMethod*)pModule->GetMethods()->Find( aMacroName, SbxCLASS_METHOD );
+ SbMethod* pMethod = static_cast<SbMethod*>(pModule->GetMethods()->Find( aMacroName, SbxCLASS_METHOD ));
if( pDispatcher )
{
@@ -237,7 +237,7 @@ StarBASIC* FindBasic( const SbxVariable* pVar )
SbxVariable const* pSbx = pVar;
while (pSbx && !dynamic_cast<StarBASIC const*>(pSbx))
pSbx = pSbx->GetParent();
- return (StarBASIC*)pSbx;
+ return const_cast<StarBASIC*>(static_cast<const StarBASIC*>(pSbx));
}
BasicManager* FindBasicManager( StarBASIC* pLib )
diff --git a/basctl/source/basicide/iderdll.cxx b/basctl/source/basicide/iderdll.cxx
index 4e2b604d4bd9..a38919649875 100644
--- a/basctl/source/basicide/iderdll.cxx
+++ b/basctl/source/basicide/iderdll.cxx
@@ -181,7 +181,7 @@ ExtraData::~ExtraData ()
void ExtraData::SetSearchItem (const SvxSearchItem& rItem)
{
- pSearchItem.reset((SvxSearchItem*)rItem.Clone());
+ pSearchItem.reset(static_cast<SvxSearchItem*>(rItem.Clone()));
}
IMPL_LINK(ExtraData, GlobalBasicBreakHdl, StarBASIC *, pBasic )
diff --git a/basctl/source/basicide/macrodlg.cxx b/basctl/source/basicide/macrodlg.cxx
index 5079378544e2..82b010565cbd 100644
--- a/basctl/source/basicide/macrodlg.cxx
+++ b/basctl/source/basicide/macrodlg.cxx
@@ -268,7 +268,7 @@ SbMethod* MacroChooser::GetMacro()
if ( pEntry )
{
OUString aMacroName( m_pMacroBox->GetEntryText( pEntry ) );
- pMethod = (SbMethod*)pModule->GetMethods()->Find( aMacroName, SbxCLASS_METHOD );
+ pMethod = static_cast<SbMethod*>(pModule->GetMethods()->Find( aMacroName, SbxCLASS_METHOD ));
}
}
return pMethod;
@@ -361,7 +361,7 @@ SbMethod* MacroChooser::CreateMacro()
pModule = pBasic->FindModule( aModName );
}
else if ( pBasic->GetModules()->Count() )
- pModule = (SbModule*)pBasic->GetModules()->Get( 0 );
+ pModule = static_cast<SbModule*>(pBasic->GetModules()->Get( 0 ));
if ( !pModule )
{
@@ -513,7 +513,7 @@ IMPL_LINK( MacroChooser, BasicSelectHdl, SvTreeListBox *, pBox )
size_t nMacroCount = pModule->GetMethods()->Count();
for ( size_t iMeth = 0; iMeth < nMacroCount; iMeth++ )
{
- SbMethod* pMethod = (SbMethod*)pModule->GetMethods()->Get( iMeth );
+ SbMethod* pMethod = static_cast<SbMethod*>(pModule->GetMethods()->Get( iMeth ));
if( pMethod->IsHidden() )
continue;
DBG_ASSERT( pMethod, "Methode nicht gefunden! (NULL)" );
@@ -615,7 +615,7 @@ IMPL_LINK( MacroChooser, ButtonHdl, Button *, pButton )
{
SbMethod* pMethod = GetMacro();
SbModule* pModule = pMethod ? pMethod->GetModule() : NULL;
- StarBASIC* pBasic = pModule ? (StarBASIC*)pModule->GetParent() : NULL;
+ StarBASIC* pBasic = pModule ? static_cast<StarBASIC*>(pModule->GetParent()) : NULL;
BasicManager* pBasMgr = pBasic ? FindBasicManager(pBasic) : NULL;
if ( pBasMgr )
{
diff --git a/basctl/source/basicide/moduldl2.cxx b/basctl/source/basicide/moduldl2.cxx
index e6e81877466d..125ea6066c24 100644
--- a/basctl/source/basicide/moduldl2.cxx
+++ b/basctl/source/basicide/moduldl2.cxx
@@ -254,7 +254,7 @@ void CheckBox::InitEntry(SvTreeListEntry* pEntry, const OUString& rTxt,
sal_uInt16 nCount = pEntry->ItemCount();
for ( sal_uInt16 nCol = 1; nCol < nCount; ++nCol )
{
- SvLBoxString* pCol = (SvLBoxString*)pEntry->GetItem( nCol );
+ SvLBoxString* pCol = static_cast<SvLBoxString*>(pEntry->GetItem( nCol ));
LibLBoxString* pStr = new LibLBoxString( pEntry, 0, pCol->GetText() );
pEntry->ReplaceItem( pStr, nCol );
}
diff --git a/basctl/source/dlged/dlged.cxx b/basctl/source/dlged/dlged.cxx
index 791c9c20e7ac..a7988d75cce0 100644
--- a/basctl/source/dlged/dlged.cxx
+++ b/basctl/source/dlged/dlged.cxx
@@ -358,7 +358,7 @@ void DlgEditor::SetDialog( uno::Reference< container::XNameContainer > xUnoContr
pDlgEdForm = new DlgEdForm(*this);
uno::Reference< awt::XControlModel > xDlgMod( m_xUnoControlDialogModel , uno::UNO_QUERY );
pDlgEdForm->SetUnoControlModel(xDlgMod);
- ((DlgEdPage*)pDlgEdModel->GetPage(0))->SetDlgEdForm( pDlgEdForm );
+ static_cast<DlgEdPage*>(pDlgEdModel->GetPage(0))->SetDlgEdForm( pDlgEdForm );
pDlgEdModel->GetPage(0)->InsertObject( pDlgEdForm );
AdjustPageSize();
pDlgEdForm->SetRectFromProps();
@@ -418,7 +418,7 @@ void DlgEditor::SetDialog( uno::Reference< container::XNameContainer > xUnoContr
void DlgEditor::ResetDialog ()
{
DlgEdForm* pOldDlgEdForm = pDlgEdForm;
- DlgEdPage* pPage = (DlgEdPage*)pDlgEdModel->GetPage(0);
+ DlgEdPage* pPage = static_cast<DlgEdPage*>(pDlgEdModel->GetPage(0));
SdrPageView* pPgView = pDlgEdView->GetSdrPageView();
bool bWasMarked = pDlgEdView->IsObjMarked( pOldDlgEdForm );
pDlgEdView->UnmarkAll();
diff --git a/basctl/source/dlged/dlgedobj.cxx b/basctl/source/dlged/dlgedobj.cxx
index aaf54b51bbc8..51f91cafe456 100644
--- a/basctl/source/dlged/dlgedobj.cxx
+++ b/basctl/source/dlged/dlgedobj.cxx
@@ -970,7 +970,7 @@ bool DlgEdObj::EndCreate(SdrDragStat& rStat, SdrCreateCmd eCmd)
void DlgEdObj::SetDefaults()
{
// set parent form
- pDlgEdForm = ((DlgEdPage*)GetPage())->GetDlgEdForm();
+ pDlgEdForm = static_cast<DlgEdPage*>(GetPage())->GetDlgEdForm();
if ( pDlgEdForm )
{
diff --git a/basctl/source/dlged/managelang.cxx b/basctl/source/dlged/managelang.cxx
index 55d1527fc0e7..41ac41484bed 100644
--- a/basctl/source/dlged/managelang.cxx
+++ b/basctl/source/dlged/managelang.cxx
@@ -291,7 +291,7 @@ Sequence< Locale > SetDefaultLanguageDialog::GetLocales() const
{
if ( m_pCheckLangLB->IsChecked(i) )
{
- LanguageType eType = LanguageType( (sal_uLong)m_pCheckLangLB->GetEntryData(i) );
+ LanguageType eType = LanguageType( reinterpret_cast<sal_uLong>(m_pCheckLangLB->GetEntryData(i)) );
aLocaleSeq[j++] = LanguageTag::convertToLocale( eType );
}
}