summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2014-10-20 11:52:06 +0200
committerNoel Grandin <noel@peralex.com>2014-10-20 13:33:58 +0200
commit3bb30a68e0604b3006f367fdb4c0a797846c23bc (patch)
treec5f5d11d9a0656c92ff7196984ca9238df2e89ee
parentefa7f1a549ebf2580d50f6f0bb96e294a5fce670 (diff)
loplugin: cstylecast
Change-Id: If50022b55a558c4124d71acbbe0ef5eb48801d0b
-rw-r--r--include/svx/imapdlg.hxx2
-rw-r--r--svx/source/dialog/hdft.cxx68
-rw-r--r--svx/source/dialog/imapdlg.cxx2
-rw-r--r--svx/source/dialog/imapwnd.cxx34
-rw-r--r--svx/source/dialog/optgrid.cxx8
-rw-r--r--svx/source/dialog/rubydialog.cxx4
-rw-r--r--svx/source/dialog/rulritem.cxx38
-rw-r--r--svx/source/dialog/srchctrl.cxx4
-rw-r--r--svx/source/dialog/srchdlg.cxx52
-rw-r--r--svx/source/dialog/svxgrahicitem.cxx2
-rw-r--r--svx/source/dialog/txencbox.cxx6
-rw-r--r--svx/source/engine3d/float3d.cxx94
-rw-r--r--svx/source/form/filtnav.cxx26
-rw-r--r--svx/source/form/fmPropBrw.cxx4
-rw-r--r--svx/source/form/fmsrcimp.cxx4
-rw-r--r--svx/source/form/tabwin.cxx4
-rw-r--r--svx/source/form/tbxform.cxx6
-rw-r--r--svx/source/inc/filtnav.hxx2
-rw-r--r--svx/source/items/algitem.cxx8
-rw-r--r--svx/source/items/hlnkitem.cxx4
-rw-r--r--svx/source/items/numinf.cxx2
-rw-r--r--svx/source/items/ofaitem.cxx2
-rw-r--r--svx/source/items/pageitem.cxx2
-rw-r--r--svx/source/items/viewlayoutitem.cxx2
-rw-r--r--svx/source/items/zoomslideritem.cxx2
-rw-r--r--svx/source/mnuctrls/fntctl.cxx2
-rw-r--r--svx/source/mnuctrls/fntszctl.cxx6
-rw-r--r--svx/source/sidebar/SelectionAnalyzer.cxx4
-rw-r--r--svx/source/sidebar/area/AreaPropertyPanel.cxx44
-rw-r--r--svx/source/sidebar/line/LinePropertyPanel.cxx12
-rw-r--r--svx/source/sidebar/line/LineWidthControl.cxx18
-rw-r--r--svx/source/sidebar/nbdtmg.cxx149
-rw-r--r--svx/source/sidebar/paragraph/ParaPropertyPanel.cxx16
-rw-r--r--svx/source/sidebar/possize/PosSizePropertyPanel.cxx4
-rw-r--r--svx/source/sidebar/text/TextPropertyPanel.cxx6
-rw-r--r--svx/source/sidebar/text/TextUnderlineControl.cxx22
-rw-r--r--svx/source/sidebar/tools/ColorControl.cxx2
-rw-r--r--svx/source/stbctrls/insctrl.cxx2
-rw-r--r--svx/source/stbctrls/modctrl.cxx2
-rw-r--r--svx/source/stbctrls/pszctrl.cxx8
-rw-r--r--svx/source/stbctrls/selctrl.cxx2
-rw-r--r--svx/source/stbctrls/xmlsecctrl.cxx2
-rw-r--r--svx/source/stbctrls/zoomctrl.cxx4
-rw-r--r--svx/source/table/tablertfexporter.cxx6
-rw-r--r--svx/source/table/tablertfimporter.cxx4
-rw-r--r--svx/source/tbxctrls/colrctrl.cxx6
-rw-r--r--svx/source/tbxctrls/grafctrl.cxx40
-rw-r--r--svx/source/tbxctrls/itemwin.cxx4
-rw-r--r--svx/source/tbxctrls/lboxctrl.cxx4
-rw-r--r--svx/source/tbxctrls/linectrl.cxx24
-rw-r--r--svx/source/tbxctrls/tbunosearchcontrollers.cxx18
-rw-r--r--svx/source/unodraw/UnoNamespaceMap.cxx2
-rw-r--r--svx/source/unodraw/unopool.cxx4
53 files changed, 400 insertions, 399 deletions
diff --git a/include/svx/imapdlg.hxx b/include/svx/imapdlg.hxx
index 76bc59fe4c53..5530488c95ef 100644
--- a/include/svx/imapdlg.hxx
+++ b/include/svx/imapdlg.hxx
@@ -162,7 +162,7 @@ public:
|*
\************************************************************************/
-#define SVXIMAPDLG() ( (SvxIMapDlg*) ( SfxViewFrame::Current()->GetChildWindow( \
+#define SVXIMAPDLG() ( static_cast<SvxIMapDlg*>( SfxViewFrame::Current()->GetChildWindow( \
SvxIMapDlgChildWindow::GetChildWindowId() )-> \
GetWindow() ) )
diff --git a/svx/source/dialog/hdft.cxx b/svx/source/dialog/hdft.cxx
index 108a77a3c7bb..7c93eea15835 100644
--- a/svx/source/dialog/hdft.cxx
+++ b/svx/source/dialog/hdft.cxx
@@ -280,13 +280,13 @@ bool SvxHFPage::FillItemSet( SfxItemSet* rSet )
aSet.Put( SfxBoolItem( nWSharedFirst, m_pCntSharedFirstBox->IsChecked() ) );
if(m_pDynSpacingCB->IsVisible() && SFX_WHICH_MAX > nWDynSpacing)
{
- boost::scoped_ptr<SfxBoolItem> pBoolItem((SfxBoolItem*)pPool->GetDefaultItem(nWDynSpacing).Clone());
+ boost::scoped_ptr<SfxBoolItem> pBoolItem(static_cast<SfxBoolItem*>(pPool->GetDefaultItem(nWDynSpacing).Clone()));
pBoolItem->SetValue(m_pDynSpacingCB->IsChecked());
aSet.Put(*pBoolItem);
}
// Size
- SvxSizeItem aSizeItem( (const SvxSizeItem&)rOldSet.Get( nWSize ) );
+ SvxSizeItem aSizeItem( const_cast<SvxSizeItem&>( static_cast<const SvxSizeItem&>(rOldSet.Get( nWSize )) ));
Size aSize( aSizeItem.GetSize() );
long nDist = GetCoreValue( *m_pDistEdit, eUnit );
long nH = GetCoreValue( *m_pHeightEdit, eUnit );
@@ -386,29 +386,29 @@ void SvxHFPage::Reset( const SfxItemSet* rSet )
{
const SfxItemSet& rHeaderSet = pSetItem->GetItemSet();
const SfxBoolItem& rHeaderOn =
- (const SfxBoolItem&)rHeaderSet.Get(GetWhich(SID_ATTR_PAGE_ON));
+ static_cast<const SfxBoolItem&>(rHeaderSet.Get(GetWhich(SID_ATTR_PAGE_ON)));
m_pTurnOnBox->Check(rHeaderOn.GetValue());
if ( rHeaderOn.GetValue() )
{
const SfxBoolItem& rDynamic =
- (const SfxBoolItem&)rHeaderSet.Get( GetWhich( SID_ATTR_PAGE_DYNAMIC ) );
+ static_cast<const SfxBoolItem&>(rHeaderSet.Get( GetWhich( SID_ATTR_PAGE_DYNAMIC ) ));
const SfxBoolItem& rShared =
- (const SfxBoolItem&)rHeaderSet.Get( GetWhich( SID_ATTR_PAGE_SHARED ) );
+ static_cast<const SfxBoolItem&>(rHeaderSet.Get( GetWhich( SID_ATTR_PAGE_SHARED ) ));
const SfxBoolItem* pSharedFirst = 0;
if (rHeaderSet.HasItem(GetWhich(SID_ATTR_PAGE_SHARED_FIRST)))
- pSharedFirst = (const SfxBoolItem*)&rHeaderSet.Get( GetWhich( SID_ATTR_PAGE_SHARED_FIRST ) );
+ pSharedFirst = static_cast<const SfxBoolItem*>(&rHeaderSet.Get( GetWhich( SID_ATTR_PAGE_SHARED_FIRST ) ));
const SvxSizeItem& rSize =
- (const SvxSizeItem&)rHeaderSet.Get( GetWhich( SID_ATTR_PAGE_SIZE ) );
+ static_cast<const SvxSizeItem&>(rHeaderSet.Get( GetWhich( SID_ATTR_PAGE_SIZE ) ));
const SvxULSpaceItem& rUL =
- (const SvxULSpaceItem&)rHeaderSet.Get( GetWhich( SID_ATTR_ULSPACE ) );
+ static_cast<const SvxULSpaceItem&>(rHeaderSet.Get( GetWhich( SID_ATTR_ULSPACE ) ));
const SvxLRSpaceItem& rLR =
- (const SvxLRSpaceItem&)rHeaderSet.Get( GetWhich( SID_ATTR_LRSPACE ) );
+ static_cast<const SvxLRSpaceItem&>(rHeaderSet.Get( GetWhich( SID_ATTR_LRSPACE ) ));
if(m_pDynSpacingCB->IsVisible())
{
const SfxBoolItem& rDynSpacing =
- (const SfxBoolItem&)rHeaderSet.Get(GetWhich(SID_ATTR_HDFT_DYNAMIC_SPACING));
+ static_cast<const SfxBoolItem&>(rHeaderSet.Get(GetWhich(SID_ATTR_HDFT_DYNAMIC_SPACING)));
m_pDynSpacingCB->Check(rDynSpacing.GetValue());
}
@@ -470,7 +470,7 @@ void SvxHFPage::Reset( const SfxItemSet* rSet )
0 != (pItem = pShell->GetItem(SID_HTML_MODE))))
{
sal_uInt16 nHtmlMode = 0;
- nHtmlMode = ((SfxUInt16Item*)pItem)->GetValue();
+ nHtmlMode = static_cast<const SfxUInt16Item*>(pItem)->GetValue();
if(nHtmlMode & HTMLMODE_ON)
{
m_pCntSharedBox->Hide();
@@ -646,7 +646,7 @@ IMPL_LINK_NOARG(SvxHFPage, BackgroundHdl)
{
// If a SfxItemSet from the SetItem for SID_ATTR_PAGE_HEADERSET or
// SID_ATTR_PAGE_FOOTERSET exists, use it's content
- pBBSet->Put(((SvxSetItem*)pItem)->GetItemSet());
+ pBBSet->Put(static_cast<const SvxSetItem*>(pItem)->GetItemSet());
}
else
{
@@ -734,7 +734,7 @@ IMPL_LINK_NOARG(SvxHFPage, BackgroundHdl)
if(pBBSet->GetItemState(nWhich) == SfxItemState::SET)
{
- const SvxBoxItem& rItem = (const SvxBoxItem&)pBBSet->Get(nWhich);
+ const SvxBoxItem& rItem = static_cast<const SvxBoxItem&>(pBBSet->Get(nWhich));
if(nId == SID_ATTR_PAGE_HEADERSET)
m_pBspWin->SetHdBorder(rItem);
@@ -812,7 +812,7 @@ void SvxHFPage::ResetBackground_Impl( const SfxItemSet& rSet )
if(rTmpSet.GetItemState(nWhich) == SfxItemState::SET)
{
const SvxBoxItem& rItem =
- (const SvxBoxItem&)rTmpSet.Get(nWhich);
+ static_cast<const SvxBoxItem&>(rTmpSet.Get(nWhich));
m_pBspWin->SetHdBorder(rItem);
}
}
@@ -900,7 +900,7 @@ void SvxHFPage::ActivatePage( const SfxItemSet& rSet )
if ( pItem )
{
// Set left and right margins
- const SvxLRSpaceItem& rLRSpace = (const SvxLRSpaceItem&)*pItem;
+ const SvxLRSpaceItem& rLRSpace = static_cast<const SvxLRSpaceItem&>(*pItem);
m_pBspWin->SetLeft( rLRSpace.GetLeft() );
m_pBspWin->SetRight( rLRSpace.GetRight() );
@@ -916,7 +916,7 @@ void SvxHFPage::ActivatePage( const SfxItemSet& rSet )
if ( pItem )
{
// Set top and bottom margins
- const SvxULSpaceItem& rULSpace = (const SvxULSpaceItem&)*pItem;
+ const SvxULSpaceItem& rULSpace = static_cast<const SvxULSpaceItem&>(*pItem);
m_pBspWin->SetTop( rULSpace.GetUpper() );
m_pBspWin->SetBottom( rULSpace.GetLower() );
@@ -931,7 +931,7 @@ void SvxHFPage::ActivatePage( const SfxItemSet& rSet )
pItem = GetItem( rSet, SID_ATTR_PAGE );
if ( pItem )
- nUsage = ( (const SvxPageItem*)pItem )->GetPageUsage();
+ nUsage = static_cast<const SvxPageItem*>(pItem)->GetPageUsage();
m_pBspWin->SetUsage( nUsage );
@@ -947,7 +947,7 @@ void SvxHFPage::ActivatePage( const SfxItemSet& rSet )
if ( pItem )
{
// Orientation and Size from the PageItem
- const SvxSizeItem& rSize = (const SvxSizeItem&)*pItem;
+ const SvxSizeItem& rSize = static_cast<const SvxSizeItem&>(*pItem);
// if the size is already swapped (Landscape)
m_pBspWin->SetSize( rSize.GetSize() );
}
@@ -961,16 +961,16 @@ void SvxHFPage::ActivatePage( const SfxItemSet& rSet )
{
const SfxItemSet& rHeaderSet = pSetItem->GetItemSet();
const SfxBoolItem& rHeaderOn =
- (const SfxBoolItem&)rHeaderSet.Get( GetWhich( SID_ATTR_PAGE_ON ) );
+ static_cast<const SfxBoolItem&>(rHeaderSet.Get( GetWhich( SID_ATTR_PAGE_ON ) ));
if ( rHeaderOn.GetValue() )
{
- const SvxSizeItem& rSize = (const SvxSizeItem&)
- rHeaderSet.Get( GetWhich( SID_ATTR_PAGE_SIZE ) );
- const SvxULSpaceItem& rUL = (const SvxULSpaceItem&)
- rHeaderSet.Get( GetWhich(SID_ATTR_ULSPACE ) );
- const SvxLRSpaceItem& rLR = (const SvxLRSpaceItem&)
- rHeaderSet.Get( GetWhich( SID_ATTR_LRSPACE ) );
+ const SvxSizeItem& rSize = static_cast<const SvxSizeItem&>(
+ rHeaderSet.Get( GetWhich( SID_ATTR_PAGE_SIZE ) ));
+ const SvxULSpaceItem& rUL = static_cast<const SvxULSpaceItem&>(
+ rHeaderSet.Get( GetWhich(SID_ATTR_ULSPACE ) ));
+ const SvxLRSpaceItem& rLR = static_cast<const SvxLRSpaceItem&>(
+ rHeaderSet.Get( GetWhich( SID_ATTR_LRSPACE ) ));
long nDist = rUL.GetLower();
m_pBspWin->SetHdHeight( rSize.GetSize().Height() - nDist );
@@ -1001,16 +1001,16 @@ void SvxHFPage::ActivatePage( const SfxItemSet& rSet )
{
const SfxItemSet& rFooterSet = pSetItem->GetItemSet();
const SfxBoolItem& rFooterOn =
- (const SfxBoolItem&)rFooterSet.Get( GetWhich( SID_ATTR_PAGE_ON ) );
+ static_cast<const SfxBoolItem&>(rFooterSet.Get( GetWhich( SID_ATTR_PAGE_ON ) ));
if ( rFooterOn.GetValue() )
{
- const SvxSizeItem& rSize = (const SvxSizeItem&)
- rFooterSet.Get( GetWhich( SID_ATTR_PAGE_SIZE ) );
- const SvxULSpaceItem& rUL = (const SvxULSpaceItem&)
- rFooterSet.Get( GetWhich( SID_ATTR_ULSPACE ) );
- const SvxLRSpaceItem& rLR = (const SvxLRSpaceItem&)
- rFooterSet.Get( GetWhich( SID_ATTR_LRSPACE ) );
+ const SvxSizeItem& rSize = static_cast<const SvxSizeItem&>(
+ rFooterSet.Get( GetWhich( SID_ATTR_PAGE_SIZE ) ));
+ const SvxULSpaceItem& rUL = static_cast<const SvxULSpaceItem&>(
+ rFooterSet.Get( GetWhich( SID_ATTR_ULSPACE ) ));
+ const SvxLRSpaceItem& rLR = static_cast<const SvxLRSpaceItem&>(
+ rFooterSet.Get( GetWhich( SID_ATTR_LRSPACE ) ));
long nDist = rUL.GetUpper();
m_pBspWin->SetFtHeight( rSize.GetSize().Height() - nDist );
@@ -1039,7 +1039,7 @@ void SvxHFPage::ActivatePage( const SfxItemSet& rSet )
if ( pItem && pItem->ISA(SfxBoolItem) )
{
m_pBspWin->SetTable( true );
- m_pBspWin->SetHorz( ( (SfxBoolItem*)pItem )->GetValue() );
+ m_pBspWin->SetHorz( static_cast<const SfxBoolItem*>(pItem)->GetValue() );
}
pItem = GetItem( rSet, SID_ATTR_PAGE_EXT2 );
@@ -1047,7 +1047,7 @@ void SvxHFPage::ActivatePage( const SfxItemSet& rSet )
if ( pItem && pItem->ISA(SfxBoolItem) )
{
m_pBspWin->SetTable( true );
- m_pBspWin->SetVert( ( (SfxBoolItem*)pItem )->GetValue() );
+ m_pBspWin->SetVert( static_cast<const SfxBoolItem*>(pItem)->GetValue() );
}
ResetBackground_Impl( rSet );
RangeHdl( 0 );
diff --git a/svx/source/dialog/imapdlg.cxx b/svx/source/dialog/imapdlg.cxx
index 5c247de2944b..abcc7685f790 100644
--- a/svx/source/dialog/imapdlg.cxx
+++ b/svx/source/dialog/imapdlg.cxx
@@ -99,7 +99,7 @@ SvxIMapDlgChildWindow::SvxIMapDlgChildWindow( vcl::Window* _pParent, sal_uInt16
SfxChildWindow( _pParent, nId )
{
pWindow = new SvxIMapDlg( pBindings, this, _pParent );
- SvxIMapDlg* pDlg = (SvxIMapDlg*) pWindow;
+ SvxIMapDlg* pDlg = static_cast<SvxIMapDlg*>(pWindow);
if ( pInfo->nFlags & SFX_CHILDWIN_ZOOMIN )
pDlg->RollUp();
diff --git a/svx/source/dialog/imapwnd.cxx b/svx/source/dialog/imapwnd.cxx
index 0d7f66ae6384..6502ff66c11f 100644
--- a/svx/source/dialog/imapwnd.cxx
+++ b/svx/source/dialog/imapwnd.cxx
@@ -158,7 +158,7 @@ const ImageMap& IMapWindow::GetImageMap()
for ( size_t i = nCount; i; )
{
--i;
- aIMap.InsertIMapObject( *( ( (IMapUserData*) pPage->GetObj( i )->GetUserData( 0 ) )->GetObject() ) );
+ aIMap.InsertIMapObject( *( static_cast<IMapUserData*>( pPage->GetObj( i )->GetUserData( 0 ) )->GetObject() ) );
}
}
@@ -191,7 +191,7 @@ SdrObject* IMapWindow::CreateObj( const IMapObject* pIMapObj )
{
case( IMAP_OBJ_RECTANGLE ):
{
- IMapRectangleObject* pIMapRectObj = (IMapRectangleObject*) pIMapObj;
+ const IMapRectangleObject* pIMapRectObj = static_cast<const IMapRectangleObject*>(pIMapObj);
Rectangle aDrawRect( pIMapRectObj->GetRectangle( false ) );
// clipped on CanvasPane
@@ -204,7 +204,7 @@ SdrObject* IMapWindow::CreateObj( const IMapObject* pIMapObj )
case( IMAP_OBJ_CIRCLE ):
{
- IMapCircleObject* pIMapCircleObj = (IMapCircleObject*) pIMapObj;
+ const IMapCircleObject* pIMapCircleObj = static_cast<const IMapCircleObject*>(pIMapObj);
const Point aCenter( pIMapCircleObj->GetCenter( false ) );
const long nRadius = pIMapCircleObj->GetRadius( false );
const Point aOffset( nRadius, nRadius );
@@ -220,7 +220,7 @@ SdrObject* IMapWindow::CreateObj( const IMapObject* pIMapObj )
case( IMAP_OBJ_POLYGON ):
{
- IMapPolygonObject* pIMapPolyObj = (IMapPolygonObject*) pIMapObj;
+ const IMapPolygonObject* pIMapPolyObj = static_cast<const IMapPolygonObject*>(pIMapObj);
// If it actually is an ellipse, then another ellipse is created again
if ( pIMapPolyObj->HasExtraEllipse() )
@@ -298,7 +298,7 @@ void IMapWindow::SdrObjCreated( const SdrObject& rObj )
{
case( OBJ_RECT ):
{
- SdrRectObj* pRectObj = (SdrRectObj*) &rObj;
+ SdrRectObj* pRectObj = const_cast<SdrRectObj*>(static_cast<const SdrRectObj*>(&rObj));
IMapRectangleObject* pObj = new IMapRectangleObject( pRectObj->GetLogicRect(), "", "", "", "", "", true, false );
pRectObj->AppendUserData( new IMapUserData( IMapObjectPtr(pObj) ) );
@@ -307,8 +307,8 @@ void IMapWindow::SdrObjCreated( const SdrObject& rObj )
case( OBJ_CIRC ):
{
- SdrCircObj* pCircObj = (SdrCircObj*) &rObj;
- SdrPathObj* pPathObj = (SdrPathObj*) pCircObj->ConvertToPolyObj( false, false );
+ SdrCircObj* pCircObj = const_cast<SdrCircObj*>( static_cast<const SdrCircObj*>(&rObj) );
+ SdrPathObj* pPathObj = static_cast<SdrPathObj*>( pCircObj->ConvertToPolyObj( false, false ) );
Polygon aPoly(pPathObj->GetPathPoly().getB2DPolygon(0L));
delete pPathObj;
@@ -323,7 +323,7 @@ void IMapWindow::SdrObjCreated( const SdrObject& rObj )
case( OBJ_PATHPOLY ):
case( OBJ_PATHFILL ):
{
- SdrPathObj* pPathObj = (SdrPathObj*) &rObj;
+ SdrPathObj* pPathObj = const_cast<SdrPathObj*>( static_cast<const SdrPathObj*>(&rObj) );
const basegfx::B2DPolyPolygon& rXPolyPoly = pPathObj->GetPathPoly();
if ( rXPolyPoly.count() )
@@ -342,7 +342,7 @@ void IMapWindow::SdrObjCreated( const SdrObject& rObj )
void IMapWindow::SdrObjChanged( const SdrObject& rObj )
{
- IMapUserData* pUserData = (IMapUserData*) rObj.GetUserData( 0 );
+ IMapUserData* pUserData = static_cast<IMapUserData*>( rObj.GetUserData( 0 ) );
if ( pUserData )
{
@@ -366,15 +366,15 @@ void IMapWindow::SdrObjChanged( const SdrObject& rObj )
{
case( OBJ_RECT ):
{
- pUserData->ReplaceObject( IMapObjectPtr(new IMapRectangleObject( ( (const SdrRectObj&) rObj ).GetLogicRect(),
+ pUserData->ReplaceObject( IMapObjectPtr(new IMapRectangleObject( static_cast<const SdrRectObj&>(rObj).GetLogicRect(),
aURL, aAltText, aDesc, aTarget, "", bActive, false ) ) );
}
break;
case( OBJ_CIRC ):
{
- const SdrCircObj& rCircObj = (const SdrCircObj&) rObj;
- SdrPathObj* pPathObj = (SdrPathObj*) rCircObj.ConvertToPolyObj( false, false );
+ const SdrCircObj& rCircObj = static_cast<const SdrCircObj&>(rObj);
+ SdrPathObj* pPathObj = static_cast<SdrPathObj*>( rCircObj.ConvertToPolyObj( false, false ) );
Polygon aPoly(pPathObj->GetPathPoly().getB2DPolygon(0L));
IMapPolygonObject* pObj = new IMapPolygonObject( aPoly, aURL, aAltText, aDesc, aTarget, "", bActive, false );
@@ -391,7 +391,7 @@ void IMapWindow::SdrObjChanged( const SdrObject& rObj )
case( OBJ_PATHPOLY ):
case( OBJ_PATHFILL ):
{
- const SdrPathObj& rPathObj = (const SdrPathObj&) rObj;
+ const SdrPathObj& rPathObj = static_cast<const SdrPathObj&>(rObj);
const basegfx::B2DPolyPolygon& rXPolyPoly = rPathObj.GetPathPoly();
if ( rXPolyPoly.count() )
@@ -455,7 +455,7 @@ IMapObject* IMapWindow::GetIMapObj( const SdrObject* pSdrObj ) const
if ( pSdrObj )
{
- IMapUserData* pUserData = (IMapUserData*) pSdrObj->GetUserData( 0 );
+ IMapUserData* pUserData = static_cast<IMapUserData*>( pSdrObj->GetUserData( 0 ) );
if ( pUserData )
pIMapObj = pUserData->GetObject().get();
@@ -657,7 +657,7 @@ void IMapWindow::DoMacroAssign()
if ( pMacroDlg && pMacroDlg->Execute() == RET_OK )
{
const SfxItemSet* pOutSet = pMacroDlg->GetOutputItemSet();
- pIMapObj->SetMacroTable( ((const SvxMacroItem& )pOutSet->Get( SID_ATTR_MACROITEM )).GetMacroTable() );
+ pIMapObj->SetMacroTable( static_cast<const SvxMacroItem& >(pOutSet->Get( SID_ATTR_MACROITEM )).GetMacroTable() );
pModel->SetChanged( true );
UpdateInfo( false );
}
@@ -788,7 +788,7 @@ void IMapWindow::CreateDefaultObject()
aInnerPoly.append(basegfx::B2DPoint(aNewObjectRectangle.RightCenter().X(), aNewObjectRectangle.RightCenter().Y()));
aInnerPoly.append(basegfx::B2DPoint(aNewObjectRectangle.BottomRight().X(), aNewObjectRectangle.BottomRight().Y()));
aInnerPoly.setClosed(true);
- ((SdrPathObj*)pObj)->SetPathPoly(basegfx::B2DPolyPolygon(aInnerPoly));
+ static_cast<SdrPathObj*>(pObj)->SetPathPoly(basegfx::B2DPolyPolygon(aInnerPoly));
break;
}
case OBJ_FREEFILL:
@@ -797,7 +797,7 @@ void IMapWindow::CreateDefaultObject()
sal_Int32 nWdt(aNewObjectRectangle.GetWidth() / 2);
sal_Int32 nHgt(aNewObjectRectangle.GetHeight() / 2);
basegfx::B2DPolygon aInnerPoly(XPolygon(aNewObjectRectangle.Center(), nWdt, nHgt).getB2DPolygon());
- ((SdrPathObj*)pObj)->SetPathPoly(basegfx::B2DPolyPolygon(aInnerPoly));
+ static_cast<SdrPathObj*>(pObj)->SetPathPoly(basegfx::B2DPolyPolygon(aInnerPoly));
break;
}
diff --git a/svx/source/dialog/optgrid.cxx b/svx/source/dialog/optgrid.cxx
index bd178f8a82f7..5d36cad714ac 100644
--- a/svx/source/dialog/optgrid.cxx
+++ b/svx/source/dialog/optgrid.cxx
@@ -88,7 +88,7 @@ bool SvxGridItem::operator==( const SfxPoolItem& rAttr ) const
{
DBG_ASSERT( SfxPoolItem::operator==(rAttr), "different types ");
- const SvxGridItem& rItem = (const SvxGridItem&) rAttr;
+ const SvxGridItem& rItem = static_cast<const SvxGridItem&>(rAttr);
return ( bUseGridsnap == rItem.bUseGridsnap &&
bSynchronize == rItem.bSynchronize &&
@@ -214,7 +214,7 @@ void SvxGridTabPage::Reset( const SfxItemSet* rSet )
if( SfxItemState::SET == rSet->GetItemState( SID_ATTR_GRID_OPTIONS , false,
(const SfxPoolItem**)&pAttr ))
{
- const SvxGridItem* pGridAttr = (SvxGridItem*)pAttr;
+ const SvxGridItem* pGridAttr = static_cast<const SvxGridItem*>(pAttr);
pCbxUseGridsnap->Check( pGridAttr->bUseGridsnap );
pCbxSynchronize->Check( pGridAttr->bSynchronize );
pCbxGridVisible->Check( pGridAttr->bGridVisible );
@@ -240,7 +240,7 @@ void SvxGridTabPage::ActivatePage( const SfxItemSet& rSet )
if( SfxItemState::SET == rSet.GetItemState( SID_ATTR_GRID_OPTIONS , false,
(const SfxPoolItem**)&pAttr ))
{
- const SvxGridItem* pGridAttr = (SvxGridItem*) pAttr;
+ const SvxGridItem* pGridAttr = static_cast<const SvxGridItem*>(pAttr);
pCbxUseGridsnap->Check( pGridAttr->bUseGridsnap );
ChangeGridsnapHdl_Impl( pCbxUseGridsnap );
@@ -251,7 +251,7 @@ void SvxGridTabPage::ActivatePage( const SfxItemSet& rSet )
if( SfxItemState::SET == rSet.GetItemState( SID_ATTR_METRIC , false,
(const SfxPoolItem**)&pAttr ))
{
- const SfxUInt16Item* pItem = (SfxUInt16Item*) pAttr;
+ const SfxUInt16Item* pItem = static_cast<const SfxUInt16Item*>(pAttr);
FieldUnit eFUnit = (FieldUnit)(long)pItem->GetValue();
diff --git a/svx/source/dialog/rubydialog.cxx b/svx/source/dialog/rubydialog.cxx
index e70c51681306..8bc89cf2631b 100644
--- a/svx/source/dialog/rubydialog.cxx
+++ b/svx/source/dialog/rubydialog.cxx
@@ -291,7 +291,7 @@ void SvxRubyDialog::Activate()
SfxModelessDialog::Activate();
SfxPoolItem* pState = 0;
SfxItemState eState = pBindings->QueryState( SID_STYLE_DESIGNER, pState );
- bool bEnable = (eState < SfxItemState::DEFAULT) || !pState || !((SfxBoolItem*)pState)->GetValue();
+ bool bEnable = (eState < SfxItemState::DEFAULT) || !pState || !static_cast<SfxBoolItem*>(pState)->GetValue();
delete pState;
m_pStylistPB->Enable(bEnable);
//get selection from current view frame
@@ -565,7 +565,7 @@ IMPL_LINK_NOARG(SvxRubyDialog, StylistHdl_Impl)
{
SfxPoolItem* pState = 0;
SfxItemState eState = pBindings->QueryState( SID_STYLE_DESIGNER, pState );
- if(eState <= SfxItemState::SET || !pState || !((SfxBoolItem*)pState)->GetValue())
+ if(eState <= SfxItemState::SET || !pState || !static_cast<SfxBoolItem*>(pState)->GetValue())
{
pBindings->GetDispatcher()->Execute( SID_STYLE_DESIGNER,
SfxCallMode::ASYNCHRON |
diff --git a/svx/source/dialog/rulritem.cxx b/svx/source/dialog/rulritem.cxx
index a94085bd9f45..949dfbf86894 100644
--- a/svx/source/dialog/rulritem.cxx
+++ b/svx/source/dialog/rulritem.cxx
@@ -35,8 +35,8 @@ TYPEINIT1(SvxObjectItem, SfxPoolItem);
bool SvxLongLRSpaceItem::operator==( const SfxPoolItem& rCmp) const
{
return SfxPoolItem::operator==(rCmp) &&
- mlLeft == ((const SvxLongLRSpaceItem &)rCmp).mlLeft &&
- mlRight == ((const SvxLongLRSpaceItem &)rCmp).mlRight;
+ mlLeft == static_cast<const SvxLongLRSpaceItem &>(rCmp).mlLeft &&
+ mlRight == static_cast<const SvxLongLRSpaceItem &>(rCmp).mlRight;
}
OUString SvxLongLRSpaceItem::GetValueText() const
@@ -169,8 +169,8 @@ void SvxLongLRSpaceItem::SetRight(long lArgRight)
bool SvxLongULSpaceItem::operator==( const SfxPoolItem& rCmp) const
{
return SfxPoolItem::operator==(rCmp) &&
- mlLeft == ((const SvxLongULSpaceItem&)rCmp).mlLeft &&
- mlRight == ((const SvxLongULSpaceItem&)rCmp).mlRight;
+ mlLeft == static_cast<const SvxLongULSpaceItem&>(rCmp).mlLeft &&
+ mlRight == static_cast<const SvxLongULSpaceItem&>(rCmp).mlRight;
}
@@ -302,9 +302,9 @@ void SvxLongULSpaceItem::SetLower(long lArgRight)
bool SvxPagePosSizeItem::operator==( const SfxPoolItem& rCmp) const
{
return SfxPoolItem::operator==(rCmp) &&
- aPos == ((const SvxPagePosSizeItem &)rCmp).aPos &&
- lWidth == ((const SvxPagePosSizeItem &)rCmp).lWidth &&
- lHeight == ((const SvxPagePosSizeItem &)rCmp).lHeight;
+ aPos == static_cast<const SvxPagePosSizeItem &>(rCmp).aPos &&
+ lWidth == static_cast<const SvxPagePosSizeItem &>(rCmp).lWidth &&
+ lHeight == static_cast<const SvxPagePosSizeItem &>(rCmp).lHeight;
}
bool SvxPagePosSizeItem::QueryValue( ::com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId ) const
@@ -420,17 +420,17 @@ SvxPagePosSizeItem::SvxPagePosSizeItem() :
bool SvxColumnItem::operator==(const SfxPoolItem& rCmp) const
{
if(!SfxPoolItem::operator==(rCmp) ||
- nActColumn != ((const SvxColumnItem&)rCmp).nActColumn ||
- nLeft != ((const SvxColumnItem&)rCmp).nLeft ||
- nRight != ((const SvxColumnItem&)rCmp).nRight ||
- bTable != ((const SvxColumnItem&)rCmp).bTable ||
- Count() != ((const SvxColumnItem&)rCmp).Count())
+ nActColumn != static_cast<const SvxColumnItem&>(rCmp).nActColumn ||
+ nLeft != static_cast<const SvxColumnItem&>(rCmp).nLeft ||
+ nRight != static_cast<const SvxColumnItem&>(rCmp).nRight ||
+ bTable != static_cast<const SvxColumnItem&>(rCmp).bTable ||
+ Count() != static_cast<const SvxColumnItem&>(rCmp).Count())
return false;
- const sal_uInt16 nCount = ((const SvxColumnItem&)rCmp).Count();
+ const sal_uInt16 nCount = static_cast<const SvxColumnItem&>(rCmp).Count();
for(sal_uInt16 i = 0; i < nCount;++i)
{
- if( (*this)[i] != ((const SvxColumnItem&)rCmp)[i] )
+ if( (*this)[i] != static_cast<const SvxColumnItem&>(rCmp)[i] )
return false;
}
return true;
@@ -706,11 +706,11 @@ bool SvxColumnItem::IsConsistent() const
bool SvxObjectItem::operator==( const SfxPoolItem& rCmp ) const
{
return SfxPoolItem::operator==(rCmp) &&
- nStartX == ((const SvxObjectItem&)rCmp).nStartX &&
- nEndX == ((const SvxObjectItem&)rCmp).nEndX &&
- nStartY == ((const SvxObjectItem&)rCmp).nStartY &&
- nEndY == ((const SvxObjectItem&)rCmp).nEndY &&
- bLimits == ((const SvxObjectItem&)rCmp).bLimits;
+ nStartX == static_cast<const SvxObjectItem&>(rCmp).nStartX &&
+ nEndX == static_cast<const SvxObjectItem&>(rCmp).nEndX &&
+ nStartY == static_cast<const SvxObjectItem&>(rCmp).nStartY &&
+ nEndY == static_cast<const SvxObjectItem&>(rCmp).nEndY &&
+ bLimits == static_cast<const SvxObjectItem&>(rCmp).bLimits;
}
OUString SvxObjectItem::GetValueText() const
diff --git a/svx/source/dialog/srchctrl.cxx b/svx/source/dialog/srchctrl.cxx
index 16f76437a265..e26a85a8bff3 100644
--- a/svx/source/dialog/srchctrl.cxx
+++ b/svx/source/dialog/srchctrl.cxx
@@ -55,13 +55,13 @@ void SvxSearchController::StateChanged( sal_uInt16 nSID, SfxItemState eState,
else if ( SID_SEARCH_OPTIONS == nSID )
{
DBG_ASSERT( pState->ISA(SfxUInt16Item), "wrong item type" );
- sal_uInt16 nFlags = (sal_uInt16)( (SfxUInt16Item*)pState )->GetValue();
+ sal_uInt16 nFlags = (sal_uInt16) static_cast<const SfxUInt16Item*>(pState)->GetValue();
rSrchDlg.EnableControls_Impl( nFlags );
}
else if ( SID_SEARCH_ITEM == nSID )
{
DBG_ASSERT( pState->ISA(SvxSearchItem), "wrong item type" );
- rSrchDlg.SetItem_Impl( (const SvxSearchItem*)pState );
+ rSrchDlg.SetItem_Impl( static_cast<const SvxSearchItem*>(pState) );
}
}
else if ( SID_SEARCH_OPTIONS == nSID || SID_SEARCH_ITEM == nSID )
diff --git a/svx/source/dialog/srchdlg.cxx b/svx/source/dialog/srchdlg.cxx
index d5230e38f4c9..a3067620122c 100644
--- a/svx/source/dialog/srchdlg.cxx
+++ b/svx/source/dialog/srchdlg.cxx
@@ -134,8 +134,8 @@ struct SearchDlg_Impl
void ListToStrArr_Impl( sal_uInt16 nId, std::vector<OUString>& rStrLst, ComboBox& rCBox )
{
- SfxStringListItem* pSrchItem =
- (SfxStringListItem*)SfxGetpApp()->GetItem( nId );
+ const SfxStringListItem* pSrchItem =
+ static_cast<const SfxStringListItem*>(SfxGetpApp()->GetItem( nId ));
if (pSrchItem)
{
@@ -389,13 +389,13 @@ void SvxSearchDialog::Construct_Impl()
// Get attribute sets only once in construtor()
const SfxPoolItem* ppArgs[] = { pSearchItem, 0 };
const SvxSetItem* pSrchSetItem =
- (const SvxSetItem*) rBindings.GetDispatcher()->Execute( FID_SEARCH_SEARCHSET, SfxCallMode::SLOT, ppArgs );
+ static_cast<const SvxSetItem*>( rBindings.GetDispatcher()->Execute( FID_SEARCH_SEARCHSET, SfxCallMode::SLOT, ppArgs ) );
if ( pSrchSetItem )
InitAttrList_Impl( &pSrchSetItem->GetItemSet(), 0 );
const SvxSetItem* pReplSetItem =
- (const SvxSetItem*)rBindings.GetDispatcher()->Execute( FID_SEARCH_REPLACESET, SfxCallMode::SLOT, ppArgs );
+ static_cast<const SvxSetItem*>( rBindings.GetDispatcher()->Execute( FID_SEARCH_REPLACESET, SfxCallMode::SLOT, ppArgs ) );
if ( pReplSetItem )
InitAttrList_Impl( 0, &pReplSetItem->GetItemSet() );
@@ -822,13 +822,13 @@ void SvxSearchDialog::Init_Impl( bool bSearchPattern )
// Get attribute sets, if it not has been done already
const SfxPoolItem* ppArgs[] = { pSearchItem, 0 };
const SvxSetItem* pSrchSetItem =
- (const SvxSetItem*)rBindings.GetDispatcher()->Execute( FID_SEARCH_SEARCHSET, SfxCallMode::SLOT, ppArgs );
+ static_cast<const SvxSetItem*>(rBindings.GetDispatcher()->Execute( FID_SEARCH_SEARCHSET, SfxCallMode::SLOT, ppArgs ));
if ( pSrchSetItem )
InitAttrList_Impl( &pSrchSetItem->GetItemSet(), 0 );
const SvxSetItem* pReplSetItem =
- (const SvxSetItem*)rBindings.GetDispatcher()->Execute( FID_SEARCH_REPLACESET, SfxCallMode::SLOT, ppArgs );
+ static_cast<const SvxSetItem*>( rBindings.GetDispatcher()->Execute( FID_SEARCH_REPLACESET, SfxCallMode::SLOT, ppArgs ) );
if ( pReplSetItem )
InitAttrList_Impl( 0, &pReplSetItem->GetItemSet() );
@@ -1753,7 +1753,7 @@ void SvxSearchDialog::SetItem_Impl( const SvxSearchItem* pItem )
if ( pItem )
{
delete pSearchItem;
- pSearchItem = (SvxSearchItem*)pItem->Clone();
+ pSearchItem = static_cast<SvxSearchItem*>(pItem->Clone());
Init_Impl( pSearchItem->GetPattern() &&
( !pSearchList || !pSearchList->Count() ) );
}
@@ -1792,9 +1792,9 @@ IMPL_LINK( SvxSearchDialog, FocusHdl_Impl, Control *, pCtrl )
}
bSet = true;
- ( (ComboBox*)pCtrl )->SetSelection( Selection( SELECTION_MIN, SELECTION_MAX ) );
+ static_cast<ComboBox*>(pCtrl)->SetSelection( Selection( SELECTION_MIN, SELECTION_MAX ) );
- ModifyHdl_Impl( (ComboBox*)pCtrl );
+ ModifyHdl_Impl( static_cast<ComboBox*>(pCtrl) );
if (bFormat && nTxtLen)
m_pLayoutBtn->SetText(aLayoutStr);
@@ -2098,37 +2098,37 @@ void SvxSearchDialog::PaintAttrText_Impl()
void SvxSearchDialog::SetModifyFlag_Impl( const Control* pCtrl )
{
- if ( m_pSearchLB == (ComboBox*)pCtrl )
+ if ( m_pSearchLB == static_cast<const ComboBox*>(pCtrl) )
nModifyFlag |= MODIFY_SEARCH;
- else if ( m_pReplaceLB == (ComboBox*)pCtrl )
+ else if ( m_pReplaceLB == static_cast<const ComboBox*>(pCtrl) )
nModifyFlag |= MODIFY_REPLACE;
- else if ( m_pWordBtn == (CheckBox*)pCtrl )
+ else if ( m_pWordBtn == static_cast<const CheckBox*>(pCtrl) )
nModifyFlag |= MODIFY_WORD;
- else if ( m_pMatchCaseCB == (CheckBox*)pCtrl )
+ else if ( m_pMatchCaseCB == static_cast<const CheckBox*>(pCtrl) )
nModifyFlag |= MODIFY_EXACT;
- else if ( m_pBackwardsBtn == (CheckBox*)pCtrl )
+ else if ( m_pBackwardsBtn == static_cast<const CheckBox*>(pCtrl) )
nModifyFlag |= MODIFY_BACKWARDS;
- else if ( m_pNotesBtn == (CheckBox*)pCtrl )
+ else if ( m_pNotesBtn == static_cast<const CheckBox*>(pCtrl) )
nModifyFlag |= MODIFY_NOTES;
- else if ( m_pSelectionBtn == (CheckBox*)pCtrl )
+ else if ( m_pSelectionBtn == static_cast<const CheckBox*>(pCtrl) )
nModifyFlag |= MODIFY_SELECTION;
- else if ( m_pRegExpBtn == (CheckBox*)pCtrl )
+ else if ( m_pRegExpBtn == static_cast<const CheckBox*>(pCtrl) )
nModifyFlag |= MODIFY_REGEXP;
- else if ( m_pLayoutBtn == (CheckBox*)pCtrl )
+ else if ( m_pLayoutBtn == static_cast<const CheckBox*>(pCtrl) )
nModifyFlag |= MODIFY_LAYOUT;
- else if ( m_pSimilarityBox == (CheckBox*)pCtrl )
+ else if ( m_pSimilarityBox == static_cast<const CheckBox*>(pCtrl) )
nModifyFlag |= MODIFY_SIMILARITY;
- else if ( m_pCalcSearchInLB == (ListBox*)pCtrl )
+ else if ( m_pCalcSearchInLB == static_cast<const ListBox*>(pCtrl) )
{
nModifyFlag |= MODIFY_FORMULAS;
nModifyFlag |= MODIFY_VALUES;
nModifyFlag |= MODIFY_CALC_NOTES;
}
- else if ( m_pRowsBtn == (RadioButton*)pCtrl )
+ else if ( m_pRowsBtn == static_cast<const RadioButton*>(pCtrl) )
nModifyFlag |= MODIFY_ROWS;
- else if ( m_pColumnsBtn == (RadioButton*)pCtrl )
+ else if ( m_pColumnsBtn == static_cast<const RadioButton*>(pCtrl) )
nModifyFlag |= MODIFY_COLUMNS;
- else if ( m_pAllSheetsCB == (CheckBox*)pCtrl )
+ else if ( m_pAllSheetsCB == static_cast<const CheckBox*>(pCtrl) )
nModifyFlag |= MODIFY_ALLTABLES;
}
@@ -2257,7 +2257,7 @@ static vcl::Window* lcl_GetSearchLabelWindow()
return 0;
css::uno::Reference< css::awt::XWindow > xWindow(
xUIElement->getRealInterface(), css::uno::UNO_QUERY_THROW);
- ToolBox* pToolBox = (ToolBox*) VCLUnoHelper::GetWindow(xWindow);
+ ToolBox* pToolBox = static_cast<ToolBox*>( VCLUnoHelper::GetWindow(xWindow) );
for (size_t i = 0; pToolBox && i < pToolBox->GetItemCount(); ++i)
if (pToolBox->GetItemCommand(i) == ".uno:SearchLabel")
return pToolBox->GetItemWindow(i);
@@ -2284,8 +2284,8 @@ void SvxSearchDialogWrapper::SetSearchLabel(const SearchLabel& rSL)
pSearchLabel->Show();
}
}
- if (SvxSearchDialogWrapper *pWrp = (SvxSearchDialogWrapper*) SfxViewFrame::Current()->
- GetChildWindow( SvxSearchDialogWrapper::GetChildWindowId() ))
+ if (SvxSearchDialogWrapper *pWrp = static_cast<SvxSearchDialogWrapper*>( SfxViewFrame::Current()->
+ GetChildWindow( SvxSearchDialogWrapper::GetChildWindowId() )))
pWrp->getDialog()->SetSearchLabel(sStr);
}
diff --git a/svx/source/dialog/svxgrahicitem.cxx b/svx/source/dialog/svxgrahicitem.cxx
index f845495a93b6..ff040edd7095 100644
--- a/svx/source/dialog/svxgrahicitem.cxx
+++ b/svx/source/dialog/svxgrahicitem.cxx
@@ -31,7 +31,7 @@ SvxGraphicItem::SvxGraphicItem( const SvxGraphicItem& rItem)
bool SvxGraphicItem::operator==( const SfxPoolItem& rItem) const
{
- return ((SvxGraphicItem&)rItem).aGraphic == aGraphic;
+ return static_cast<const SvxGraphicItem&>(rItem).aGraphic == aGraphic;
}
SfxPoolItem* SvxGraphicItem::Clone( SfxItemPool * ) const
diff --git a/svx/source/dialog/txencbox.cxx b/svx/source/dialog/txencbox.cxx
index cfa119d50aa1..1f453d57f5d2 100644
--- a/svx/source/dialog/txencbox.cxx
+++ b/svx/source/dialog/txencbox.cxx
@@ -69,7 +69,7 @@ sal_Int32 SvxTextEncodingBox::EncodingToPos_Impl( rtl_TextEncoding nEnc ) const
sal_Int32 nCount = GetEntryCount();
for ( sal_Int32 i=0; i<nCount; i++ )
{
- if ( nEnc == rtl_TextEncoding( (sal_uIntPtr)GetEntryData(i) ) )
+ if ( nEnc == rtl_TextEncoding( reinterpret_cast<sal_uIntPtr>(GetEntryData(i)) ) )
return i;
}
return LISTBOX_ENTRY_NOTFOUND;
@@ -201,7 +201,7 @@ void SvxTextEncodingBox::InsertTextEncoding( const rtl_TextEncoding nEnc,
const OUString& rEntry, sal_Int32 nPos )
{
sal_Int32 nAt = InsertEntry( rEntry, nPos );
- SetEntryData( nAt, (void*)(sal_uIntPtr)nEnc );
+ SetEntryData( nAt, reinterpret_cast<void*>(nEnc) );
}
@@ -222,7 +222,7 @@ rtl_TextEncoding SvxTextEncodingBox::GetSelectTextEncoding() const
sal_Int32 nPos = GetSelectEntryPos();
if ( nPos != LISTBOX_ENTRY_NOTFOUND )
- return rtl_TextEncoding( (sal_uIntPtr)GetEntryData(nPos) );
+ return rtl_TextEncoding( reinterpret_cast<sal_uIntPtr>(GetEntryData(nPos)) );
else
return RTL_TEXTENCODING_DONTKNOW;
}
diff --git a/svx/source/engine3d/float3d.cxx b/svx/source/engine3d/float3d.cxx
index d95fbd82171d..6030a40bff4f 100644
--- a/svx/source/engine3d/float3d.cxx
+++ b/svx/source/engine3d/float3d.cxx
@@ -520,7 +520,7 @@ void Svx3DWin::Update( SfxItemSet& rAttrs )
SfxItemState eState = rAttrs.GetItemState( SID_ATTR_3D_INTERN, false, &pItem );
if( SfxItemState::SET == eState )
{
- sal_uInt32 nState = ( ( const SfxUInt32Item* )pItem )->GetValue();
+ sal_uInt32 nState = static_cast<const SfxUInt32Item*>(pItem)->GetValue();
bool bExtrude = ( nState & 2 );
bool bSphere = ( nState & 4 );
bool bCube = ( nState & 8 );
@@ -601,7 +601,7 @@ void Svx3DWin::Update( SfxItemSet& rAttrs )
eState = rAttrs.GetItemState(XATTR_FILLSTYLE);
if(eState != SfxItemState::DONTCARE)
{
- drawing::FillStyle eXFS = (drawing::FillStyle)((const XFillStyleItem&)rAttrs.Get(XATTR_FILLSTYLE)).GetValue();
+ drawing::FillStyle eXFS = (drawing::FillStyle)static_cast<const XFillStyleItem&>(rAttrs.Get(XATTR_FILLSTYLE)).GetValue();
bBitmap = (eXFS == drawing::FillStyle_BITMAP || eXFS == drawing::FillStyle_GRADIENT || eXFS == drawing::FillStyle_HATCH);
}
@@ -632,7 +632,7 @@ void Svx3DWin::Update( SfxItemSet& rAttrs )
eState = rAttrs.GetItemState(SDRATTR_3DOBJ_HORZ_SEGS);
if(eState != SfxItemState::DONTCARE)
{
- sal_uInt32 nValue = ((const SfxUInt32Item&)rAttrs.Get(SDRATTR_3DOBJ_HORZ_SEGS)).GetValue();
+ sal_uInt32 nValue = static_cast<const SfxUInt32Item&>(rAttrs.Get(SDRATTR_3DOBJ_HORZ_SEGS)).GetValue();
if(nValue != (sal_uInt32 )aNumHorizontal.GetValue())
{
aNumHorizontal.SetValue( nValue );
@@ -657,7 +657,7 @@ void Svx3DWin::Update( SfxItemSet& rAttrs )
eState = rAttrs.GetItemState(SDRATTR_3DOBJ_VERT_SEGS);
if( eState != SfxItemState::DONTCARE )
{
- sal_uInt32 nValue = ((const SfxUInt32Item&)rAttrs.Get(SDRATTR_3DOBJ_VERT_SEGS)).GetValue();
+ sal_uInt32 nValue = static_cast<const SfxUInt32Item&>(rAttrs.Get(SDRATTR_3DOBJ_VERT_SEGS)).GetValue();
if( nValue != (sal_uInt32) aNumVertical.GetValue() )
{
aNumVertical.SetValue( nValue );
@@ -682,7 +682,7 @@ void Svx3DWin::Update( SfxItemSet& rAttrs )
eState = rAttrs.GetItemState(SDRATTR_3DOBJ_DEPTH);
if( eState != SfxItemState::DONTCARE )
{
- sal_uInt32 nValue = ((const SfxUInt32Item&)rAttrs.Get(SDRATTR_3DOBJ_DEPTH)).GetValue();
+ sal_uInt32 nValue = static_cast<const SfxUInt32Item&>(rAttrs.Get(SDRATTR_3DOBJ_DEPTH)).GetValue();
sal_uInt32 nValue2 = GetCoreValue( aMtrDepth, ePoolUnit );
if( nValue != nValue2 )
{
@@ -709,7 +709,7 @@ void Svx3DWin::Update( SfxItemSet& rAttrs )
eState = rAttrs.GetItemState(SDRATTR_3DOBJ_DOUBLE_SIDED);
if( eState != SfxItemState::DONTCARE )
{
- bool bValue = ((const SfxBoolItem&)rAttrs.Get(SDRATTR_3DOBJ_DOUBLE_SIDED)).GetValue();
+ bool bValue = static_cast<const SfxBoolItem&>(rAttrs.Get(SDRATTR_3DOBJ_DOUBLE_SIDED)).GetValue();
if( bValue != aBtnDoubleSided.IsChecked() )
{
aBtnDoubleSided.Check( bValue );
@@ -733,7 +733,7 @@ void Svx3DWin::Update( SfxItemSet& rAttrs )
eState = rAttrs.GetItemState(SDRATTR_3DOBJ_PERCENT_DIAGONAL);
if( eState != SfxItemState::DONTCARE )
{
- sal_uInt16 nValue = ((const SfxUInt16Item&)rAttrs.Get(SDRATTR_3DOBJ_PERCENT_DIAGONAL)).GetValue();
+ sal_uInt16 nValue = static_cast<const SfxUInt16Item&>(rAttrs.Get(SDRATTR_3DOBJ_PERCENT_DIAGONAL)).GetValue();
if( nValue != aMtrPercentDiagonal.GetValue() )
{
aMtrPercentDiagonal.SetValue( nValue );
@@ -758,7 +758,7 @@ void Svx3DWin::Update( SfxItemSet& rAttrs )
eState = rAttrs.GetItemState(SDRATTR_3DOBJ_BACKSCALE);
if( eState != SfxItemState::DONTCARE )
{
- sal_uInt16 nValue = ((const SfxUInt16Item&)rAttrs.Get(SDRATTR_3DOBJ_BACKSCALE)).GetValue();
+ sal_uInt16 nValue = static_cast<const SfxUInt16Item&>(rAttrs.Get(SDRATTR_3DOBJ_BACKSCALE)).GetValue();
if( nValue != aMtrBackscale.GetValue() )
{
aMtrBackscale.SetValue( nValue );
@@ -783,7 +783,7 @@ void Svx3DWin::Update( SfxItemSet& rAttrs )
eState = rAttrs.GetItemState(SDRATTR_3DOBJ_END_ANGLE);
if( eState != SfxItemState::DONTCARE )
{
- sal_Int32 nValue = ((const SfxUInt32Item&)rAttrs.Get(SDRATTR_3DOBJ_END_ANGLE)).GetValue();
+ sal_Int32 nValue = static_cast<const SfxUInt32Item&>(rAttrs.Get(SDRATTR_3DOBJ_END_ANGLE)).GetValue();
if( nValue != aMtrEndAngle.GetValue() )
{
aMtrEndAngle.SetValue( nValue );
@@ -804,7 +804,7 @@ void Svx3DWin::Update( SfxItemSet& rAttrs )
eState = rAttrs.GetItemState(SDRATTR_3DOBJ_NORMALS_KIND);
if( eState != SfxItemState::DONTCARE )
{
- sal_uInt16 nValue = ((const Svx3DNormalsKindItem&)rAttrs.Get(SDRATTR_3DOBJ_NORMALS_KIND)).GetValue();
+ sal_uInt16 nValue = static_cast<const Svx3DNormalsKindItem&>(rAttrs.Get(SDRATTR_3DOBJ_NORMALS_KIND)).GetValue();
if( ( !aBtnNormalsObj.IsChecked() && nValue == 0 ) ||
( !aBtnNormalsFlat.IsChecked() && nValue == 1 ) ||
@@ -833,7 +833,7 @@ void Svx3DWin::Update( SfxItemSet& rAttrs )
eState = rAttrs.GetItemState(SDRATTR_3DOBJ_NORMALS_INVERT);
if( eState != SfxItemState::DONTCARE )
{
- bool bValue = ((const SfxBoolItem&)rAttrs.Get(SDRATTR_3DOBJ_NORMALS_INVERT)).GetValue();
+ bool bValue = static_cast<const SfxBoolItem&>(rAttrs.Get(SDRATTR_3DOBJ_NORMALS_INVERT)).GetValue();
if( bValue != aBtnNormalsInvert.IsChecked() )
{
aBtnNormalsInvert.Check( bValue );
@@ -855,7 +855,7 @@ void Svx3DWin::Update( SfxItemSet& rAttrs )
eState = rAttrs.GetItemState(SDRATTR_3DSCENE_TWO_SIDED_LIGHTING);
if( eState != SfxItemState::DONTCARE )
{
- bool bValue = ((const SfxBoolItem&)rAttrs.Get(SDRATTR_3DSCENE_TWO_SIDED_LIGHTING)).GetValue();
+ bool bValue = static_cast<const SfxBoolItem&>(rAttrs.Get(SDRATTR_3DSCENE_TWO_SIDED_LIGHTING)).GetValue();
if( bValue != aBtnTwoSidedLighting.IsChecked() )
{
aBtnTwoSidedLighting.Check( bValue );
@@ -878,7 +878,7 @@ void Svx3DWin::Update( SfxItemSet& rAttrs )
eState = rAttrs.GetItemState(SDRATTR_3DSCENE_SHADE_MODE);
if( eState != SfxItemState::DONTCARE )
{
- sal_uInt16 nValue = ((const Svx3DShadeModeItem&)rAttrs.Get(SDRATTR_3DSCENE_SHADE_MODE)).GetValue();
+ sal_uInt16 nValue = static_cast<const Svx3DShadeModeItem&>(rAttrs.Get(SDRATTR_3DSCENE_SHADE_MODE)).GetValue();
if( nValue != aLbShademode.GetSelectEntryPos() )
{
aLbShademode.SelectEntryPos( nValue );
@@ -898,7 +898,7 @@ void Svx3DWin::Update( SfxItemSet& rAttrs )
eState = rAttrs.GetItemState(SDRATTR_3DOBJ_SHADOW_3D);
if( eState != SfxItemState::DONTCARE )
{
- bool bValue = ((const SfxBoolItem&)rAttrs.Get(SDRATTR_3DOBJ_SHADOW_3D)).GetValue();
+ bool bValue = static_cast<const SfxBoolItem&>(rAttrs.Get(SDRATTR_3DOBJ_SHADOW_3D)).GetValue();
if( bValue != aBtnShadow3d.IsChecked() )
{
aBtnShadow3d.Check( bValue );
@@ -922,7 +922,7 @@ void Svx3DWin::Update( SfxItemSet& rAttrs )
eState = rAttrs.GetItemState(SDRATTR_3DSCENE_SHADOW_SLANT);
if( eState != SfxItemState::DONTCARE )
{
- sal_uInt16 nValue = ((const SfxUInt16Item&)rAttrs.Get(SDRATTR_3DSCENE_SHADOW_SLANT)).GetValue();
+ sal_uInt16 nValue = static_cast<const SfxUInt16Item&>(rAttrs.Get(SDRATTR_3DSCENE_SHADOW_SLANT)).GetValue();
if( nValue != aMtrSlant.GetValue() )
{
aMtrSlant.SetValue( nValue );
@@ -942,7 +942,7 @@ void Svx3DWin::Update( SfxItemSet& rAttrs )
eState = rAttrs.GetItemState(SDRATTR_3DSCENE_DISTANCE);
if( eState != SfxItemState::DONTCARE )
{
- sal_uInt32 nValue = ((const SfxUInt32Item&)rAttrs.Get(SDRATTR_3DSCENE_DISTANCE)).GetValue();
+ sal_uInt32 nValue = static_cast<const SfxUInt32Item&>(rAttrs.Get(SDRATTR_3DSCENE_DISTANCE)).GetValue();
sal_uInt32 nValue2 = GetCoreValue( aMtrDistance, ePoolUnit );
if( nValue != nValue2 )
{
@@ -966,7 +966,7 @@ void Svx3DWin::Update( SfxItemSet& rAttrs )
eState = rAttrs.GetItemState(SDRATTR_3DSCENE_FOCAL_LENGTH);
if( eState != SfxItemState::DONTCARE )
{
- sal_uInt32 nValue = ((const SfxUInt32Item&)rAttrs.Get(SDRATTR_3DSCENE_FOCAL_LENGTH)).GetValue();
+ sal_uInt32 nValue = static_cast<const SfxUInt32Item&>(rAttrs.Get(SDRATTR_3DSCENE_FOCAL_LENGTH)).GetValue();
sal_uInt32 nValue2 = GetCoreValue( aMtrFocalLength, ePoolUnit );
if( nValue != nValue2 )
{
@@ -993,7 +993,7 @@ void Svx3DWin::Update( SfxItemSet& rAttrs )
eState = rAttrs.GetItemState(SDRATTR_3DSCENE_LIGHTCOLOR_1);
if( eState != SfxItemState::DONTCARE )
{
- aColor = ((const SvxColorItem&)rAttrs.Get(SDRATTR_3DSCENE_LIGHTCOLOR_1)).GetValue();
+ aColor = static_cast<const SvxColorItem&>(rAttrs.Get(SDRATTR_3DSCENE_LIGHTCOLOR_1)).GetValue();
ColorLB* pLb = &aLbLight1;
if( aColor != pLb->GetSelectEntryColor() )
{
@@ -1013,7 +1013,7 @@ void Svx3DWin::Update( SfxItemSet& rAttrs )
eState = rAttrs.GetItemState(SDRATTR_3DSCENE_LIGHTON_1);
if( eState != SfxItemState::DONTCARE )
{
- bool bOn = ((const SfxBoolItem&)rAttrs.Get(SDRATTR_3DSCENE_LIGHTON_1)).GetValue();
+ bool bOn = static_cast<const SfxBoolItem&>(rAttrs.Get(SDRATTR_3DSCENE_LIGHTON_1)).GetValue();
if( ( bOn && !GetUILightState( aBtnLight1 )) ||
( !bOn && GetUILightState( aBtnLight1 )) )
{
@@ -1042,7 +1042,7 @@ void Svx3DWin::Update( SfxItemSet& rAttrs )
eState = rAttrs.GetItemState(SDRATTR_3DSCENE_LIGHTCOLOR_2);
if( eState != SfxItemState::DONTCARE )
{
- aColor = ((const SvxColorItem&)rAttrs.Get(SDRATTR_3DSCENE_LIGHTCOLOR_2)).GetValue();
+ aColor = static_cast<const SvxColorItem&>(rAttrs.Get(SDRATTR_3DSCENE_LIGHTCOLOR_2)).GetValue();
ColorLB* pLb = &aLbLight2;
if( aColor != pLb->GetSelectEntryColor() )
{
@@ -1062,7 +1062,7 @@ void Svx3DWin::Update( SfxItemSet& rAttrs )
eState = rAttrs.GetItemState(SDRATTR_3DSCENE_LIGHTON_2);
if( eState != SfxItemState::DONTCARE )
{
- bool bOn = ((const SfxBoolItem&)rAttrs.Get(SDRATTR_3DSCENE_LIGHTON_2)).GetValue();
+ bool bOn = static_cast<const SfxBoolItem&>(rAttrs.Get(SDRATTR_3DSCENE_LIGHTON_2)).GetValue();
if( ( bOn && !GetUILightState( aBtnLight2 )) ||
( !bOn && GetUILightState( aBtnLight2 )) )
{
@@ -1091,7 +1091,7 @@ void Svx3DWin::Update( SfxItemSet& rAttrs )
eState = rAttrs.GetItemState(SDRATTR_3DSCENE_LIGHTCOLOR_3);
if( eState != SfxItemState::DONTCARE )
{
- aColor = ((const SvxColorItem&)rAttrs.Get(SDRATTR_3DSCENE_LIGHTCOLOR_3)).GetValue();
+ aColor = static_cast<const SvxColorItem&>(rAttrs.Get(SDRATTR_3DSCENE_LIGHTCOLOR_3)).GetValue();
ColorLB* pLb = &aLbLight3;
if( aColor != pLb->GetSelectEntryColor() )
{
@@ -1111,7 +1111,7 @@ void Svx3DWin::Update( SfxItemSet& rAttrs )
eState = rAttrs.GetItemState(SDRATTR_3DSCENE_LIGHTON_3);
if( eState != SfxItemState::DONTCARE )
{
- bool bOn = ((const SfxBoolItem&)rAttrs.Get(SDRATTR_3DSCENE_LIGHTON_3)).GetValue();
+ bool bOn = static_cast<const SfxBoolItem&>(rAttrs.Get(SDRATTR_3DSCENE_LIGHTON_3)).GetValue();
if( ( bOn && !GetUILightState( aBtnLight3)) ||
( !bOn && GetUILightState( aBtnLight3)) )
{
@@ -1140,7 +1140,7 @@ void Svx3DWin::Update( SfxItemSet& rAttrs )
eState = rAttrs.GetItemState(SDRATTR_3DSCENE_LIGHTCOLOR_4);
if( eState != SfxItemState::DONTCARE )
{
- aColor = ((const SvxColorItem&)rAttrs.Get(SDRATTR_3DSCENE_LIGHTCOLOR_4)).GetValue();
+ aColor = static_cast<const SvxColorItem&>(rAttrs.Get(SDRATTR_3DSCENE_LIGHTCOLOR_4)).GetValue();
ColorLB* pLb = &aLbLight4;
if( aColor != pLb->GetSelectEntryColor() )
{
@@ -1160,7 +1160,7 @@ void Svx3DWin::Update( SfxItemSet& rAttrs )
eState = rAttrs.GetItemState(SDRATTR_3DSCENE_LIGHTON_4);
if( eState != SfxItemState::DONTCARE )
{
- bool bOn = ((const SfxBoolItem&)rAttrs.Get(SDRATTR_3DSCENE_LIGHTON_4)).GetValue();
+ bool bOn = static_cast<const SfxBoolItem&>(rAttrs.Get(SDRATTR_3DSCENE_LIGHTON_4)).GetValue();
if( ( bOn && !GetUILightState( aBtnLight4 )) ||
( !bOn && GetUILightState( aBtnLight4 )) )
{
@@ -1189,7 +1189,7 @@ void Svx3DWin::Update( SfxItemSet& rAttrs )
eState = rAttrs.GetItemState(SDRATTR_3DSCENE_LIGHTCOLOR_5);
if( eState != SfxItemState::DONTCARE )
{
- aColor = ((const SvxColorItem&)rAttrs.Get(SDRATTR_3DSCENE_LIGHTCOLOR_5)).GetValue();
+ aColor = static_cast<const SvxColorItem&>(rAttrs.Get(SDRATTR_3DSCENE_LIGHTCOLOR_5)).GetValue();
ColorLB* pLb = &aLbLight5;
if( aColor != pLb->GetSelectEntryColor() )
{
@@ -1209,7 +1209,7 @@ void Svx3DWin::Update( SfxItemSet& rAttrs )
eState = rAttrs.GetItemState(SDRATTR_3DSCENE_LIGHTON_5);
if( eState != SfxItemState::DONTCARE )
{
- bool bOn = ((const SfxBoolItem&)rAttrs.Get(SDRATTR_3DSCENE_LIGHTON_5)).GetValue();
+ bool bOn = static_cast<const SfxBoolItem&>(rAttrs.Get(SDRATTR_3DSCENE_LIGHTON_5)).GetValue();
if( ( bOn && !GetUILightState( aBtnLight5 )) ||
( !bOn && GetUILightState( aBtnLight5 )) )
{
@@ -1238,7 +1238,7 @@ void Svx3DWin::Update( SfxItemSet& rAttrs )
eState = rAttrs.GetItemState(SDRATTR_3DSCENE_LIGHTCOLOR_6);
if( eState != SfxItemState::DONTCARE )
{
- aColor = ((const SvxColorItem&)rAttrs.Get(SDRATTR_3DSCENE_LIGHTCOLOR_6)).GetValue();
+ aColor = static_cast<const SvxColorItem&>(rAttrs.Get(SDRATTR_3DSCENE_LIGHTCOLOR_6)).GetValue();
ColorLB* pLb = &aLbLight6;
if( aColor != pLb->GetSelectEntryColor() )
{
@@ -1258,7 +1258,7 @@ void Svx3DWin::Update( SfxItemSet& rAttrs )
eState = rAttrs.GetItemState(SDRATTR_3DSCENE_LIGHTON_6);
if( eState != SfxItemState::DONTCARE )
{
- bool bOn = ((const SfxBoolItem&)rAttrs.Get(SDRATTR_3DSCENE_LIGHTON_6)).GetValue();
+ bool bOn = static_cast<const SfxBoolItem&>(rAttrs.Get(SDRATTR_3DSCENE_LIGHTON_6)).GetValue();
if( ( bOn && !GetUILightState( aBtnLight6 )) ||
( !bOn && GetUILightState( aBtnLight6 )) )
{
@@ -1287,7 +1287,7 @@ void Svx3DWin::Update( SfxItemSet& rAttrs )
eState = rAttrs.GetItemState(SDRATTR_3DSCENE_LIGHTCOLOR_7);
if( eState != SfxItemState::DONTCARE )
{
- aColor = ((const SvxColorItem&)rAttrs.Get(SDRATTR_3DSCENE_LIGHTCOLOR_7)).GetValue();
+ aColor = static_cast<const SvxColorItem&>(rAttrs.Get(SDRATTR_3DSCENE_LIGHTCOLOR_7)).GetValue();
ColorLB* pLb = &aLbLight7;
if( aColor != pLb->GetSelectEntryColor() )
{
@@ -1307,7 +1307,7 @@ void Svx3DWin::Update( SfxItemSet& rAttrs )
eState = rAttrs.GetItemState(SDRATTR_3DSCENE_LIGHTON_7);
if( eState != SfxItemState::DONTCARE )
{
- bool bOn = ((const SfxBoolItem&)rAttrs.Get(SDRATTR_3DSCENE_LIGHTON_7)).GetValue();
+ bool bOn = static_cast<const SfxBoolItem&>(rAttrs.Get(SDRATTR_3DSCENE_LIGHTON_7)).GetValue();
if( ( bOn && !GetUILightState( aBtnLight7 )) ||
( !bOn && GetUILightState( aBtnLight7 )) )
{
@@ -1336,7 +1336,7 @@ void Svx3DWin::Update( SfxItemSet& rAttrs )
eState = rAttrs.GetItemState(SDRATTR_3DSCENE_LIGHTCOLOR_8);
if( eState != SfxItemState::DONTCARE )
{
- aColor = ((const SvxColorItem&)rAttrs.Get(SDRATTR_3DSCENE_LIGHTCOLOR_8)).GetValue();
+ aColor = static_cast<const SvxColorItem&>(rAttrs.Get(SDRATTR_3DSCENE_LIGHTCOLOR_8)).GetValue();
ColorLB* pLb = &aLbLight8;
if( aColor != pLb->GetSelectEntryColor() )
{
@@ -1356,7 +1356,7 @@ void Svx3DWin::Update( SfxItemSet& rAttrs )
eState = rAttrs.GetItemState(SDRATTR_3DSCENE_LIGHTON_8);
if( eState != SfxItemState::DONTCARE )
{
- bool bOn = ((const SfxBoolItem&)rAttrs.Get(SDRATTR_3DSCENE_LIGHTON_8)).GetValue();
+ bool bOn = static_cast<const SfxBoolItem&>(rAttrs.Get(SDRATTR_3DSCENE_LIGHTON_8)).GetValue();
if( ( bOn && !GetUILightState( aBtnLight8 )) ||
( !bOn && GetUILightState( aBtnLight8 )) )
{
@@ -1385,7 +1385,7 @@ void Svx3DWin::Update( SfxItemSet& rAttrs )
eState = rAttrs.GetItemState(SDRATTR_3DSCENE_AMBIENTCOLOR);
if( eState != SfxItemState::DONTCARE )
{
- aColor = ((const SvxColorItem&)rAttrs.Get(SDRATTR_3DSCENE_AMBIENTCOLOR)).GetValue();
+ aColor = static_cast<const SvxColorItem&>(rAttrs.Get(SDRATTR_3DSCENE_AMBIENTCOLOR)).GetValue();
ColorLB* pLb = &aLbAmbientlight;
if( aColor != pLb->GetSelectEntryColor() )
{
@@ -1410,7 +1410,7 @@ void Svx3DWin::Update( SfxItemSet& rAttrs )
eState = rAttrs.GetItemState(SDRATTR_3DOBJ_TEXTURE_KIND);
if( eState != SfxItemState::DONTCARE )
{
- sal_uInt16 nValue = ((const Svx3DTextureKindItem&)rAttrs.Get(SDRATTR_3DOBJ_TEXTURE_KIND)).GetValue();
+ sal_uInt16 nValue = static_cast<const Svx3DTextureKindItem&>(rAttrs.Get(SDRATTR_3DOBJ_TEXTURE_KIND)).GetValue();
if( ( !aBtnTexLuminance.IsChecked() && nValue == 1 ) ||
( !aBtnTexColor.IsChecked() && nValue == 3 ) )
@@ -1435,7 +1435,7 @@ void Svx3DWin::Update( SfxItemSet& rAttrs )
eState = rAttrs.GetItemState(SDRATTR_3DOBJ_TEXTURE_MODE);
if( eState != SfxItemState::DONTCARE )
{
- sal_uInt16 nValue = ((const Svx3DTextureModeItem&)rAttrs.Get(SDRATTR_3DOBJ_TEXTURE_MODE)).GetValue();
+ sal_uInt16 nValue = static_cast<const Svx3DTextureModeItem&>(rAttrs.Get(SDRATTR_3DOBJ_TEXTURE_MODE)).GetValue();
if( ( !aBtnTexReplace.IsChecked() && nValue == 1 ) ||
( !aBtnTexModulate.IsChecked() && nValue == 2 ) )
@@ -1460,7 +1460,7 @@ void Svx3DWin::Update( SfxItemSet& rAttrs )
eState = rAttrs.GetItemState(SDRATTR_3DOBJ_TEXTURE_PROJ_X);
if( eState != SfxItemState::DONTCARE )
{
- sal_uInt16 nValue = ((const Svx3DTextureProjectionXItem&)rAttrs.Get(SDRATTR_3DOBJ_TEXTURE_PROJ_X)).GetValue();
+ sal_uInt16 nValue = static_cast<const Svx3DTextureProjectionXItem&>(rAttrs.Get(SDRATTR_3DOBJ_TEXTURE_PROJ_X)).GetValue();
if( ( !aBtnTexObjectX.IsChecked() && nValue == 0 ) ||
( !aBtnTexParallelX.IsChecked() && nValue == 1 ) ||
@@ -1489,7 +1489,7 @@ void Svx3DWin::Update( SfxItemSet& rAttrs )
eState = rAttrs.GetItemState(SDRATTR_3DOBJ_TEXTURE_PROJ_Y);
if( eState != SfxItemState::DONTCARE )
{
- sal_uInt16 nValue = ((const Svx3DTextureProjectionYItem&)rAttrs.Get(SDRATTR_3DOBJ_TEXTURE_PROJ_Y)).GetValue();
+ sal_uInt16 nValue = static_cast<const Svx3DTextureProjectionYItem&>(rAttrs.Get(SDRATTR_3DOBJ_TEXTURE_PROJ_Y)).GetValue();
if( ( !aBtnTexObjectY.IsChecked() && nValue == 0 ) ||
( !aBtnTexParallelY.IsChecked() && nValue == 1 ) ||
@@ -1518,7 +1518,7 @@ void Svx3DWin::Update( SfxItemSet& rAttrs )
eState = rAttrs.GetItemState(SDRATTR_3DOBJ_TEXTURE_FILTER);
if( eState != SfxItemState::DONTCARE )
{
- bool bValue = ((const SfxBoolItem&)rAttrs.Get(SDRATTR_3DOBJ_TEXTURE_FILTER)).GetValue();
+ bool bValue = static_cast<const SfxBoolItem&>(rAttrs.Get(SDRATTR_3DOBJ_TEXTURE_FILTER)).GetValue();
if( bValue != aBtnTexFilter.IsChecked() )
{
aBtnTexFilter.Check( bValue );
@@ -1545,7 +1545,7 @@ void Svx3DWin::Update( SfxItemSet& rAttrs )
eState = rAttrs.GetItemState(XATTR_FILLCOLOR);
if( eState != SfxItemState::DONTCARE )
{
- aColor = ((const XFillColorItem&)rAttrs.Get(XATTR_FILLCOLOR)).GetColorValue();
+ aColor = static_cast<const XFillColorItem&>(rAttrs.Get(XATTR_FILLCOLOR)).GetColorValue();
ColorLB* pLb = &aLbMatColor;
if( aColor != pLb->GetSelectEntryColor() )
{
@@ -1566,7 +1566,7 @@ void Svx3DWin::Update( SfxItemSet& rAttrs )
eState = rAttrs.GetItemState(SDRATTR_3DOBJ_MAT_EMISSION);
if( eState != SfxItemState::DONTCARE )
{
- aColor = ((const SvxColorItem&)rAttrs.Get(SDRATTR_3DOBJ_MAT_EMISSION)).GetValue();
+ aColor = static_cast<const SvxColorItem&>(rAttrs.Get(SDRATTR_3DOBJ_MAT_EMISSION)).GetValue();
ColorLB* pLb = &aLbMatEmission;
if( aColor != pLb->GetSelectEntryColor() )
{
@@ -1587,7 +1587,7 @@ void Svx3DWin::Update( SfxItemSet& rAttrs )
eState = rAttrs.GetItemState(SDRATTR_3DOBJ_MAT_SPECULAR);
if( eState != SfxItemState::DONTCARE )
{
- aColor = ((const SvxColorItem&)rAttrs.Get(SDRATTR_3DOBJ_MAT_SPECULAR)).GetValue();
+ aColor = static_cast<const SvxColorItem&>(rAttrs.Get(SDRATTR_3DOBJ_MAT_SPECULAR)).GetValue();
ColorLB* pLb = &aLbMatSpecular;
if( aColor != pLb->GetSelectEntryColor() )
{
@@ -1608,7 +1608,7 @@ void Svx3DWin::Update( SfxItemSet& rAttrs )
eState = rAttrs.GetItemState(SDRATTR_3DOBJ_MAT_SPECULAR_INTENSITY);
if( eState != SfxItemState::DONTCARE )
{
- sal_uInt16 nValue = ((const SfxUInt16Item&)rAttrs.Get(SDRATTR_3DOBJ_MAT_SPECULAR_INTENSITY)).GetValue();
+ sal_uInt16 nValue = static_cast<const SfxUInt16Item&>(rAttrs.Get(SDRATTR_3DOBJ_MAT_SPECULAR_INTENSITY)).GetValue();
if( nValue != aMtrMatSpecularIntensity.GetValue() )
{
aMtrMatSpecularIntensity.SetValue( nValue );
@@ -1630,7 +1630,7 @@ void Svx3DWin::Update( SfxItemSet& rAttrs )
eState = rAttrs.GetItemState(SDRATTR_3DSCENE_PERSPECTIVE);
if( eState != SfxItemState::DONTCARE )
{
- ProjectionType ePT = (ProjectionType)((const Svx3DPerspectiveItem&)rAttrs.Get(SDRATTR_3DSCENE_PERSPECTIVE)).GetValue();
+ ProjectionType ePT = (ProjectionType)static_cast<const Svx3DPerspectiveItem&>(rAttrs.Get(SDRATTR_3DSCENE_PERSPECTIVE)).GetValue();
if( ( !aBtnPerspective.IsChecked() && ePT == PR_PERSPECTIVE ) ||
( aBtnPerspective.IsChecked() && ePT == PR_PARALLEL ) )
{
@@ -2651,7 +2651,7 @@ IMPL_LINK( Svx3DWin, ClickHdl, PushButton *, pBtn )
if( pBtn->IsChecked() )
{
- SetUILightState( *(ImageButton*)pBtn, !GetUILightState( *(ImageButton*)pBtn ) );
+ SetUILightState( *static_cast<ImageButton*>(pBtn), !GetUILightState( *static_cast<ImageButton*>(pBtn) ) );
}
else
{
@@ -2698,7 +2698,7 @@ IMPL_LINK( Svx3DWin, ClickHdl, PushButton *, pBtn )
aLbLight8.Hide();
}
}
- bool bEnable = GetUILightState( *(ImageButton*)pBtn );
+ bool bEnable = GetUILightState( *static_cast<ImageButton*>(pBtn) );
aBtnLightColor.Enable( bEnable );
pLb->Enable( bEnable );
@@ -2939,7 +2939,7 @@ void Svx3DWin::ClickLight(PushButton& rBtn)
ColorLB* pLb = GetLbByButton( &rBtn );
Color aColor( pLb->GetSelectEntryColor() );
SfxItemSet aLightItemSet(aCtlLightPreview.GetSvx3DLightControl().Get3DAttributes());
- const bool bOnOff(GetUILightState( (const ImageButton&)rBtn ));
+ const bool bOnOff(GetUILightState( static_cast<const ImageButton&>(rBtn) ));
switch(nLightSource)
{
diff --git a/svx/source/form/filtnav.cxx b/svx/source/form/filtnav.cxx
index 72b815a9a1c7..ae552aa64761 100644
--- a/svx/source/form/filtnav.cxx
+++ b/svx/source/form/filtnav.cxx
@@ -792,7 +792,7 @@ void FmFilterModel::Remove(FmFilterData* pData)
sal_Int32 nPos = i - rItems.begin();
if (pData->ISA(FmFilterItems))
{
- FmFormItem* pFormItem = (FmFormItem*)pParent;
+ FmFormItem* pFormItem = static_cast<FmFormItem*>(pParent);
try
{
@@ -802,7 +802,7 @@ void FmFilterModel::Remove(FmFilterData* pData)
if ( bEmptyLastTerm )
{
// remove all children (by setting an empty predicate expression)
- ::std::vector< FmFilterData* >& rChildren = ((FmFilterItems*)pData)->GetChildren();
+ ::std::vector< FmFilterData* >& rChildren = static_cast<FmFilterItems*>(pData)->GetChildren();
while ( !rChildren.empty() )
{
::std::vector< FmFilterData* >::iterator removePos = rChildren.end() - 1;
@@ -937,7 +937,7 @@ void FmFilterModel::SetCurrentItems(FmFilterItems* pCurrent)
// search for the condition
if (pCurrent)
{
- FmFormItem* pFormItem = (FmFormItem*)pCurrent->GetParent();
+ FmFormItem* pFormItem = static_cast<FmFormItem*>(pCurrent->GetParent());
::std::vector<FmFilterData*>& rItems = pFormItem->GetChildren();
::std::vector<FmFilterData*>::const_iterator i = ::std::find(rItems.begin(), rItems.end(), pCurrent);
@@ -1025,7 +1025,7 @@ void FmFilterItemsString::Paint(
const Point& rPos, SvTreeListBox& rDev, const SvViewDataEntry* /*pView*/, const SvTreeListEntry* pEntry)
{
FmFilterItems* pRow = (FmFilterItems*)pEntry->GetUserData();
- FmFormItem* pForm = (FmFormItem*)pRow->GetParent();
+ FmFormItem* pForm = static_cast<FmFormItem*>(pRow->GetParent());
// current filter is significant painted
const bool bIsCurrentFilter = pForm->GetChildren()[ pForm->GetFilterController()->getActiveTerm() ] == pRow;
@@ -1443,21 +1443,21 @@ bool FmFilterNavigator::Select( SvTreeListEntry* pEntry, bool bSelect )
{
FmFormItem* pFormItem = NULL;
if (((FmFilterData*)pEntry->GetUserData())->ISA(FmFilterItem))
- pFormItem = (FmFormItem*)((FmFilterItem*)pEntry->GetUserData())->GetParent()->GetParent();
+ pFormItem = static_cast<FmFormItem*>(static_cast<FmFilterItem*>(pEntry->GetUserData())->GetParent()->GetParent());
else if (((FmFilterData*)pEntry->GetUserData())->ISA(FmFilterItems))
- pFormItem = (FmFormItem*)((FmFilterItem*)pEntry->GetUserData())->GetParent()->GetParent();
+ pFormItem = static_cast<FmFormItem*>(static_cast<FmFilterItem*>(pEntry->GetUserData())->GetParent()->GetParent());
else if (((FmFilterData*)pEntry->GetUserData())->ISA(FmFormItem))
pFormItem = (FmFormItem*)pEntry->GetUserData();
if (pFormItem)
{
// will the controller be exchanged?
- if (((FmFilterData*)pEntry->GetUserData())->ISA(FmFilterItem))
- m_pModel->SetCurrentItems((FmFilterItems*)((FmFilterItem*)pEntry->GetUserData())->GetParent());
- else if (((FmFilterData*)pEntry->GetUserData())->ISA(FmFilterItems))
+ if (static_cast<FmFilterData*>(pEntry->GetUserData())->ISA(FmFilterItem))
+ m_pModel->SetCurrentItems(static_cast<FmFilterItems*>(static_cast<FmFilterItem*>(pEntry->GetUserData())->GetParent()));
+ else if (static_cast<FmFilterData*>(pEntry->GetUserData())->ISA(FmFilterItems))
m_pModel->SetCurrentItems((FmFilterItems*)pEntry->GetUserData());
- else if (((FmFilterData*)pEntry->GetUserData())->ISA(FmFormItem))
- m_pModel->SetCurrentController(((FmFormItem*)pEntry->GetUserData())->GetController());
+ else if (static_cast<FmFilterData*>(pEntry->GetUserData())->ISA(FmFormItem))
+ m_pModel->SetCurrentController(static_cast<FmFormItem*>(pEntry->GetUserData())->GetController());
}
}
return true;
@@ -1912,7 +1912,7 @@ void FmFilterNavigatorWin::StateChanged( sal_uInt16 nSID, SfxItemState eState, c
if( eState >= SfxItemState::DEFAULT )
{
- FmFormShell* pShell = PTR_CAST( FmFormShell,((SfxObjectItem*)pState)->GetShell() );
+ FmFormShell* pShell = PTR_CAST( FmFormShell, static_cast<const SfxObjectItem*>(pState)->GetShell() );
UpdateContent( pShell );
}
else
@@ -1997,7 +1997,7 @@ FmFilterNavigatorWinMgr::FmFilterNavigatorWinMgr( vcl::Window *_pParent, sal_uIn
{
pWindow = new FmFilterNavigatorWin( _pBindings, this, _pParent );
eChildAlignment = SFX_ALIGN_NOALIGNMENT;
- ((SfxDockingWindow*)pWindow)->Initialize( _pInfo );
+ static_cast<SfxDockingWindow*>(pWindow)->Initialize( _pInfo );
}
diff --git a/svx/source/form/fmPropBrw.cxx b/svx/source/form/fmPropBrw.cxx
index 19685b5accfc..d28b67dabf7a 100644
--- a/svx/source/form/fmPropBrw.cxx
+++ b/svx/source/form/fmPropBrw.cxx
@@ -85,7 +85,7 @@ FmPropBrwMgr::FmPropBrwMgr( vcl::Window* _pParent, sal_uInt16 _nId,
{
pWindow = new FmPropBrw( ::comphelper::getProcessComponentContext(), _pBindings, this, _pParent, _pInfo );
eChildAlignment = SFX_ALIGN_NOALIGNMENT;
- ((SfxFloatingWindow*)pWindow)->Initialize( _pInfo );
+ static_cast<SfxFloatingWindow*>(pWindow)->Initialize( _pInfo );
}
@@ -629,7 +629,7 @@ void FmPropBrw::StateChanged(sal_uInt16 nSID, SfxItemState eState, const SfxPool
{
if (eState >= SfxItemState::DEFAULT)
{
- FmFormShell* pShell = PTR_CAST(FmFormShell,((SfxObjectItem*)pState)->GetShell());
+ FmFormShell* pShell = PTR_CAST(FmFormShell, static_cast<const SfxObjectItem*>(pState)->GetShell());
InterfaceBag aSelection;
if ( pShell )
pShell->GetImpl()->getCurrentSelection( aSelection );
diff --git a/svx/source/form/fmsrcimp.cxx b/svx/source/form/fmsrcimp.cxx
index 32e0116c3031..4c9f2fa4cde2 100644
--- a/svx/source/form/fmsrcimp.cxx
+++ b/svx/source/form/fmsrcimp.cxx
@@ -145,7 +145,7 @@ void FmRecordCountListener::NotifyCurrentCount()
if (m_lnkWhoWantsToKnow.IsSet())
{
DBG_ASSERT(m_xListening.is(), "FmRecordCountListener::NotifyCurrentCount : I have no propset ... !?");
- void* pTheCount = (void*)(sal_IntPtr)::comphelper::getINT32(m_xListening->getPropertyValue(FM_PROP_ROWCOUNT));
+ void* pTheCount = reinterpret_cast<void*>(::comphelper::getINT32(m_xListening->getPropertyValue(FM_PROP_ROWCOUNT)));
m_lnkWhoWantsToKnow.Call(pTheCount);
}
}
@@ -1111,7 +1111,7 @@ IMPL_LINK(FmSearchEngine, OnNewRecordCount, void*, pCounterAsVoid)
return 0L;
FmSearchProgress aProgress;
- aProgress.nCurrentRecord = (sal_uIntPtr)pCounterAsVoid;
+ aProgress.nCurrentRecord = reinterpret_cast<sal_uIntPtr>(pCounterAsVoid);
aProgress.aSearchState = FmSearchProgress::STATE_PROGRESS_COUNTING;
m_aProgressHandler.Call(&aProgress);
diff --git a/svx/source/form/tabwin.cxx b/svx/source/form/tabwin.cxx
index 8f0d11bf6124..111ab2b5d684 100644
--- a/svx/source/form/tabwin.cxx
+++ b/svx/source/form/tabwin.cxx
@@ -282,7 +282,7 @@ void FmFieldWin::StateChanged(sal_uInt16 nSID, SfxItemState eState, const SfxPoo
if (eState >= SfxItemState::DEFAULT)
{
- FmFormShell* pShell = PTR_CAST(FmFormShell,((SfxObjectItem*)pState)->GetShell());
+ FmFormShell* pShell = PTR_CAST(FmFormShell, static_cast<const SfxObjectItem*>(pState)->GetShell());
UpdateContent(pShell);
}
else
@@ -418,7 +418,7 @@ FmFieldWinMgr::FmFieldWinMgr(vcl::Window* _pParent, sal_uInt16 _nId,
pWindow = new FmFieldWin(_pBindings, this, _pParent);
SetHideNotDelete(true);
eChildAlignment = SFX_ALIGN_NOALIGNMENT;
- ((SfxFloatingWindow*)pWindow)->Initialize( _pInfo );
+ static_cast<SfxFloatingWindow*>(pWindow)->Initialize( _pInfo );
}
diff --git a/svx/source/form/tbxform.cxx b/svx/source/form/tbxform.cxx
index 06ce8aa30902..f72ad7ce9b8b 100644
--- a/svx/source/form/tbxform.cxx
+++ b/svx/source/form/tbxform.cxx
@@ -157,7 +157,7 @@ void SvxFmTbxCtlConfig::StateChanged(sal_uInt16 nSID, SfxItemState eState, const
{
sal_uInt16 nSlot = 0;
if (eState >= SfxItemState::DEFAULT)
- nSlot = ((SfxUInt16Item*)pState)->GetValue();
+ nSlot = static_cast<const SfxUInt16Item*>(pState)->GetValue();
switch( nSlot )
{
@@ -253,7 +253,7 @@ void SvxFmTbxCtlAbsRec::StateChanged( sal_uInt16 nSID, SfxItemState eState, cons
{
sal_uInt16 nId = GetId();
ToolBox* pToolBox = &GetToolBox();
- SvxFmAbsRecWin* pWin = (SvxFmAbsRecWin*)( pToolBox->GetItemWindow(nId) );
+ SvxFmAbsRecWin* pWin = static_cast<SvxFmAbsRecWin*>( pToolBox->GetItemWindow(nId) );
assert(pWin && "Control not found!");
@@ -370,7 +370,7 @@ void SvxFmTbxCtlRecTotal::StateChanged( sal_uInt16 nSID, SfxItemState eState, co
OUString aText;
if (pState)
- aText = ((SfxStringItem*)pState)->GetValue();
+ aText = static_cast<const SfxStringItem*>(pState)->GetValue();
else
aText = "?";
diff --git a/svx/source/inc/filtnav.hxx b/svx/source/inc/filtnav.hxx
index 13dde0681aaa..3bde69e3f28f 100644
--- a/svx/source/inc/filtnav.hxx
+++ b/svx/source/inc/filtnav.hxx
@@ -176,7 +176,7 @@ public:
void Append(FmFilterItems* pItems, FmFilterItem* pFilterItem);
void SetTextForItem(FmFilterItem* pItem, const OUString& rText);
- FmFormItem* GetCurrentForm() const {return m_pCurrentItems ? (FmFormItem*)m_pCurrentItems->GetParent() : NULL;}
+ FmFormItem* GetCurrentForm() const {return m_pCurrentItems ? static_cast<FmFormItem*>(m_pCurrentItems->GetParent()) : NULL;}
FmFilterItems* GetCurrentItems() const {return m_pCurrentItems;}
void SetCurrentItems(FmFilterItems* pCurrent);
diff --git a/svx/source/items/algitem.cxx b/svx/source/items/algitem.cxx
index 0c9f16d27fb7..a9de3e273a0d 100644
--- a/svx/source/items/algitem.cxx
+++ b/svx/source/items/algitem.cxx
@@ -267,10 +267,10 @@ bool SvxMarginItem::operator==( const SfxPoolItem& rItem ) const
{
DBG_ASSERT( SfxPoolItem::operator==( rItem ), "unequal type" );
- return ( ( nLeftMargin == ( (SvxMarginItem&)rItem ).nLeftMargin ) &&
- ( nTopMargin == ( (SvxMarginItem&)rItem ).nTopMargin ) &&
- ( nRightMargin == ( (SvxMarginItem&)rItem ).nRightMargin ) &&
- ( nBottomMargin == ( (SvxMarginItem&)rItem ).nBottomMargin ) );
+ return ( ( nLeftMargin == static_cast<const SvxMarginItem&>(rItem).nLeftMargin ) &&
+ ( nTopMargin == static_cast<const SvxMarginItem&>(rItem).nTopMargin ) &&
+ ( nRightMargin == static_cast<const SvxMarginItem&>(rItem).nRightMargin ) &&
+ ( nBottomMargin == static_cast<const SvxMarginItem&>(rItem).nBottomMargin ) );
}
diff --git a/svx/source/items/hlnkitem.cxx b/svx/source/items/hlnkitem.cxx
index d75ad8edb42e..08d68167b8fb 100644
--- a/svx/source/items/hlnkitem.cxx
+++ b/svx/source/items/hlnkitem.cxx
@@ -231,7 +231,7 @@ bool SvxHyperlinkItem::operator==( const SfxPoolItem& rAttr ) const
{
DBG_ASSERT( SfxPoolItem::operator==(rAttr), "unterschiedliche Typen" );
- const SvxHyperlinkItem& rItem = (const SvxHyperlinkItem&) rAttr;
+ const SvxHyperlinkItem& rItem = static_cast<const SvxHyperlinkItem&>(rAttr);
bool bRet = ( sName == rItem.sName &&
sURL == rItem.sURL &&
@@ -242,7 +242,7 @@ bool SvxHyperlinkItem::operator==( const SfxPoolItem& rAttr ) const
if (!bRet)
return false;
- const SvxMacroTableDtor* pOther = ((SvxHyperlinkItem&)rAttr).pMacroTable;
+ const SvxMacroTableDtor* pOther = static_cast<const SvxHyperlinkItem&>(rAttr).pMacroTable;
if( !pMacroTable )
return ( !pOther || pOther->empty() );
if( !pOther )
diff --git a/svx/source/items/numinf.cxx b/svx/source/items/numinf.cxx
index d9847b84487e..36665d3789d5 100644
--- a/svx/source/items/numinf.cxx
+++ b/svx/source/items/numinf.cxx
@@ -133,7 +133,7 @@ bool SvxNumberInfoItem::operator==( const SfxPoolItem& rItem ) const
{
DBG_ASSERT( SfxPoolItem::operator==( rItem ), "unequal which or type" );
- SvxNumberInfoItem& rOther = (SvxNumberInfoItem&)rItem;
+ const SvxNumberInfoItem& rOther = static_cast<const SvxNumberInfoItem&>(rItem);
bool bEqual = false;
diff --git a/svx/source/items/ofaitem.cxx b/svx/source/items/ofaitem.cxx
index 6b33715e77b1..5b911ad8965d 100644
--- a/svx/source/items/ofaitem.cxx
+++ b/svx/source/items/ofaitem.cxx
@@ -32,7 +32,7 @@ OfaPtrItem::OfaPtrItem( const OfaPtrItem& rItem)
bool OfaPtrItem::operator==( const SfxPoolItem& rItem) const
{
- return ((OfaPtrItem&)rItem).pPtr == pPtr;
+ return static_cast<const OfaPtrItem&>(rItem).pPtr == pPtr;
}
SfxPoolItem* OfaPtrItem::Clone( SfxItemPool * ) const
diff --git a/svx/source/items/pageitem.cxx b/svx/source/items/pageitem.cxx
index 409388609d8f..f44e9e1ebd25 100644
--- a/svx/source/items/pageitem.cxx
+++ b/svx/source/items/pageitem.cxx
@@ -62,7 +62,7 @@ SfxPoolItem* SvxPageItem::Clone( SfxItemPool * ) const
bool SvxPageItem::operator==( const SfxPoolItem& rAttr ) const
{
DBG_ASSERT( SfxPoolItem::operator==(rAttr), "unequal types" );
- const SvxPageItem& rItem = (SvxPageItem&)rAttr;
+ const SvxPageItem& rItem = static_cast<const SvxPageItem&>(rAttr);
return ( eNumType == rItem.eNumType &&
bLandscape == rItem.bLandscape &&
eUse == rItem.eUse );
diff --git a/svx/source/items/viewlayoutitem.cxx b/svx/source/items/viewlayoutitem.cxx
index 9ad73c117caa..4d93c6b3c0dd 100644
--- a/svx/source/items/viewlayoutitem.cxx
+++ b/svx/source/items/viewlayoutitem.cxx
@@ -85,7 +85,7 @@ bool SvxViewLayoutItem::operator==( const SfxPoolItem& rAttr ) const
{
DBG_ASSERT( SfxPoolItem::operator==(rAttr), "unequal types" );
- SvxViewLayoutItem& rItem = (SvxViewLayoutItem&)rAttr;
+ const SvxViewLayoutItem& rItem = static_cast<const SvxViewLayoutItem&>(rAttr);
return ( GetValue() == rItem.GetValue() &&
mbBookMode == rItem.IsBookMode() );
diff --git a/svx/source/items/zoomslideritem.cxx b/svx/source/items/zoomslideritem.cxx
index d690f2ae8c0c..f1e04af71c29 100644
--- a/svx/source/items/zoomslideritem.cxx
+++ b/svx/source/items/zoomslideritem.cxx
@@ -82,7 +82,7 @@ bool SvxZoomSliderItem::operator==( const SfxPoolItem& rAttr ) const
{
DBG_ASSERT( SfxPoolItem::operator==(rAttr), "unequal types" );
- SvxZoomSliderItem& rItem = (SvxZoomSliderItem&)rAttr;
+ const SvxZoomSliderItem& rItem = static_cast<const SvxZoomSliderItem&>(rAttr);
return ( GetValue() == rItem.GetValue() && maValues == rItem.maValues &&
mnMinZoom == rItem.mnMinZoom && mnMaxZoom == rItem.mnMaxZoom );
diff --git a/svx/source/mnuctrls/fntctl.cxx b/svx/source/mnuctrls/fntctl.cxx
index a9d35b5ce49c..d1f68db799ee 100644
--- a/svx/source/mnuctrls/fntctl.cxx
+++ b/svx/source/mnuctrls/fntctl.cxx
@@ -69,7 +69,7 @@ void SvxFontMenuControl::FillMenu()
if ( pDoc )
{
const SvxFontListItem* pFonts =
- (const SvxFontListItem*)pDoc->GetItem( SID_ATTR_CHAR_FONTLIST );
+ static_cast<const SvxFontListItem*>(pDoc->GetItem( SID_ATTR_CHAR_FONTLIST ));
const FontList* pList = pFonts ? pFonts->GetFontList(): 0;
DBG_ASSERT( pList, "Kein Fonts gefunden" );
pMenu->Fill( pList );
diff --git a/svx/source/mnuctrls/fntszctl.cxx b/svx/source/mnuctrls/fntszctl.cxx
index c3d992e97552..ae0c13c5bc57 100644
--- a/svx/source/mnuctrls/fntszctl.cxx
+++ b/svx/source/mnuctrls/fntszctl.cxx
@@ -117,8 +117,8 @@ void SvxFontSizeMenuControl::StateChanged(
if ( pDoc )
{
- const SvxFontListItem* pFonts = (const SvxFontListItem*)
- pDoc->GetItem( SID_ATTR_CHAR_FONTLIST );
+ const SvxFontListItem* pFonts = static_cast<const SvxFontListItem*>(
+ pDoc->GetItem( SID_ATTR_CHAR_FONTLIST ));
const FontList* pList = pFonts ? pFonts->GetFontList(): 0;
if ( pList )
@@ -141,7 +141,7 @@ void SvxFontSizeMenuControl::StateChanged(
{
// daf"ur von der Shell eine Fontliste besorgen
const SvxFontListItem* pFonts =
- (const SvxFontListItem*)pSh->GetItem( SID_ATTR_CHAR_FONTLIST );
+ static_cast<const SvxFontListItem*>(pSh->GetItem( SID_ATTR_CHAR_FONTLIST ));
const FontList* pList = pFonts ? pFonts->GetFontList(): NULL;
if ( pList )
pMenu->Fill( pList->GetFontName(0), pList );
diff --git a/svx/source/sidebar/SelectionAnalyzer.cxx b/svx/source/sidebar/SelectionAnalyzer.cxx
index d4985f74bcee..f46350d2b08f 100644
--- a/svx/source/sidebar/SelectionAnalyzer.cxx
+++ b/svx/source/sidebar/SelectionAnalyzer.cxx
@@ -44,7 +44,7 @@ EnumContext::Context SelectionAnalyzer::GetContextForSelection_SC (const SdrMark
case 1:
{
SdrObject* pObj = rMarkList.GetMark(0)->GetMarkedSdrObj();
- if ( pObj->ISA(SdrTextObj) && ((SdrTextObj*)pObj)->IsInEditMode() )
+ if ( pObj->ISA(SdrTextObj) && static_cast<SdrTextObj*>(pObj)->IsInEditMode() )
{
eContext = EnumContext::Context_DrawText;
}
@@ -126,7 +126,7 @@ EnumContext::Context SelectionAnalyzer::GetContextForSelection_SD (
case 1:
{
SdrObject* pObj = rMarkList.GetMark(0)->GetMarkedSdrObj();
- if (pObj->ISA(SdrTextObj) && ((SdrTextObj*)pObj)->IsInEditMode())
+ if (pObj->ISA(SdrTextObj) && static_cast<SdrTextObj*>(pObj)->IsInEditMode())
{
if (pObj->GetObjIdentifier() == OBJ_TABLE)
{
diff --git a/svx/source/sidebar/area/AreaPropertyPanel.cxx b/svx/source/sidebar/area/AreaPropertyPanel.cxx
index 189d5e9551c4..9ab67b106d18 100644
--- a/svx/source/sidebar/area/AreaPropertyPanel.cxx
+++ b/svx/source/sidebar/area/AreaPropertyPanel.cxx
@@ -254,7 +254,7 @@ IMPL_LINK( AreaPropertyPanel, SelectFillTypeHdl, ListBox *, pToolBox )
{
if(!mpLbFillAttr->GetEntryCount())
{
- const SvxGradientListItem aItem(*(const SvxGradientListItem*)(pSh->GetItem(SID_GRADIENT_LIST)));
+ const SvxGradientListItem aItem(*static_cast<const SvxGradientListItem*>(pSh->GetItem(SID_GRADIENT_LIST)));
mpLbFillAttr->Enable();
mpLbFillAttr->Clear();
mpLbFillAttr->Fill(aItem.GetGradientList());
@@ -264,7 +264,7 @@ IMPL_LINK( AreaPropertyPanel, SelectFillTypeHdl, ListBox *, pToolBox )
if(LISTBOX_ENTRY_NOTFOUND != mnLastPosGradient)
{
- const SvxGradientListItem aItem(*(const SvxGradientListItem*)(pSh->GetItem(SID_GRADIENT_LIST)));
+ const SvxGradientListItem aItem(*static_cast<const SvxGradientListItem*>(pSh->GetItem(SID_GRADIENT_LIST)));
if(mnLastPosGradient < aItem.GetGradientList()->Count())
{
@@ -293,7 +293,7 @@ IMPL_LINK( AreaPropertyPanel, SelectFillTypeHdl, ListBox *, pToolBox )
{
if(!mpLbFillAttr->GetEntryCount())
{
- const SvxHatchListItem aItem( *(const SvxHatchListItem*)(pSh->GetItem(SID_HATCH_LIST)));
+ const SvxHatchListItem aItem( *static_cast<const SvxHatchListItem*>(pSh->GetItem(SID_HATCH_LIST)));
mpLbFillAttr->Enable();
mpLbFillAttr->Clear();
mpLbFillAttr->Fill(aItem.GetHatchList());
@@ -303,7 +303,7 @@ IMPL_LINK( AreaPropertyPanel, SelectFillTypeHdl, ListBox *, pToolBox )
if(LISTBOX_ENTRY_NOTFOUND != mnLastPosHatch)
{
- const SvxHatchListItem aItem(*(const SvxHatchListItem*)(pSh->GetItem(SID_HATCH_LIST)));
+ const SvxHatchListItem aItem(*static_cast<const SvxHatchListItem*>(pSh->GetItem(SID_HATCH_LIST)));
if(mnLastPosHatch < aItem.GetHatchList()->Count())
{
@@ -332,7 +332,7 @@ IMPL_LINK( AreaPropertyPanel, SelectFillTypeHdl, ListBox *, pToolBox )
{
if(!mpLbFillAttr->GetEntryCount())
{
- const SvxBitmapListItem aItem( *(const SvxBitmapListItem*)(pSh->GetItem(SID_BITMAP_LIST)));
+ const SvxBitmapListItem aItem( *static_cast<const SvxBitmapListItem*>(pSh->GetItem(SID_BITMAP_LIST)));
mpLbFillAttr->Enable();
mpLbFillAttr->Clear();
mpLbFillAttr->Fill(aItem.GetBitmapList());
@@ -342,7 +342,7 @@ IMPL_LINK( AreaPropertyPanel, SelectFillTypeHdl, ListBox *, pToolBox )
if(LISTBOX_ENTRY_NOTFOUND != mnLastPosBitmap)
{
- const SvxBitmapListItem aItem(*(const SvxBitmapListItem*)(pSh->GetItem(SID_BITMAP_LIST)));
+ const SvxBitmapListItem aItem(*static_cast<const SvxBitmapListItem*>(pSh->GetItem(SID_BITMAP_LIST)));
if(mnLastPosBitmap < aItem.GetBitmapList()->Count())
{
@@ -414,7 +414,7 @@ IMPL_LINK( AreaPropertyPanel, SelectFillAttrHdl, ListBox*, pToolBox )
if(LISTBOX_ENTRY_NOTFOUND != nPos && pSh && pSh->GetItem(SID_GRADIENT_LIST))
{
- const SvxGradientListItem aItem(*(const SvxGradientListItem*)(pSh->GetItem(SID_GRADIENT_LIST)));
+ const SvxGradientListItem aItem(*static_cast<const SvxGradientListItem*>(pSh->GetItem(SID_GRADIENT_LIST)));
if(nPos < aItem.GetGradientList()->Count())
{
@@ -445,7 +445,7 @@ IMPL_LINK( AreaPropertyPanel, SelectFillAttrHdl, ListBox*, pToolBox )
if(LISTBOX_ENTRY_NOTFOUND != nPos && pSh && pSh->GetItem(SID_HATCH_LIST))
{
- const SvxHatchListItem aItem(*(const SvxHatchListItem*)(pSh->GetItem(SID_HATCH_LIST)));
+ const SvxHatchListItem aItem(*static_cast<const SvxHatchListItem*>(pSh->GetItem(SID_HATCH_LIST)));
if(nPos < aItem.GetHatchList()->Count())
{
@@ -476,7 +476,7 @@ IMPL_LINK( AreaPropertyPanel, SelectFillAttrHdl, ListBox*, pToolBox )
if(LISTBOX_ENTRY_NOTFOUND != nPos && pSh && pSh->GetItem(SID_BITMAP_LIST))
{
- const SvxBitmapListItem aItem(*(const SvxBitmapListItem*)(pSh->GetItem(SID_BITMAP_LIST)));
+ const SvxBitmapListItem aItem(*static_cast<const SvxBitmapListItem*>(pSh->GetItem(SID_BITMAP_LIST)));
if(nPos < aItem.GetBitmapList()->Count())
{
@@ -755,7 +755,7 @@ void AreaPropertyPanel::NotifyItemUpdate(
if(pItem && (!mpTransparanceItem || *pItem != *mpTransparanceItem))
{
- mpTransparanceItem.reset((SfxUInt16Item*)pItem->Clone());
+ mpTransparanceItem.reset(static_cast<SfxUInt16Item*>(pItem->Clone()));
}
else
{
@@ -777,7 +777,7 @@ void AreaPropertyPanel::NotifyItemUpdate(
if(pItem && (!mpFloatTransparenceItem || *pItem != *mpFloatTransparenceItem))
{
- mpFloatTransparenceItem.reset((XFillFloatTransparenceItem*)pItem->Clone());
+ mpFloatTransparenceItem.reset(static_cast<XFillFloatTransparenceItem*>(pItem->Clone()));
}
else
{
@@ -849,7 +849,7 @@ void AreaPropertyPanel::NotifyItemUpdate(
{
if(SfxItemState::DEFAULT == eState)
{
- mpColorItem.reset(pState ? (XFillColorItem*)pState->Clone() : 0);
+ mpColorItem.reset(pState ? static_cast<XFillColorItem*>(pState->Clone()) : 0);
}
if(mpStyleItem && drawing::FillStyle_SOLID == (drawing::FillStyle)mpStyleItem->GetValue())
@@ -882,7 +882,7 @@ void AreaPropertyPanel::NotifyItemUpdate(
{
if(SfxItemState::DEFAULT == eState)
{
- mpFillGradientItem.reset(pState ? (XFillGradientItem*)pState->Clone() : 0);
+ mpFillGradientItem.reset(pState ? static_cast<XFillGradientItem*>(pState->Clone()) : 0);
}
if(mpStyleItem && drawing::FillStyle_GRADIENT == (drawing::FillStyle)mpStyleItem->GetValue())
@@ -911,7 +911,7 @@ void AreaPropertyPanel::NotifyItemUpdate(
{
if(SfxItemState::DEFAULT == eState)
{
- mpHatchItem.reset(pState ? (XFillHatchItem*)pState->Clone() : 0);
+ mpHatchItem.reset(pState ? static_cast<XFillHatchItem*>(pState->Clone()) : 0);
}
if(mpStyleItem && drawing::FillStyle_HATCH == (drawing::FillStyle)mpStyleItem->GetValue())
@@ -940,7 +940,7 @@ void AreaPropertyPanel::NotifyItemUpdate(
{
if(SfxItemState::DEFAULT == eState)
{
- mpBitmapItem.reset(pState ? (XFillBitmapItem*)pState->Clone() : 0);
+ mpBitmapItem.reset(pState ? static_cast<XFillBitmapItem*>(pState->Clone()) : 0);
}
if(mpStyleItem && drawing::FillStyle_BITMAP == (drawing::FillStyle)mpStyleItem->GetValue())
@@ -975,7 +975,7 @@ void AreaPropertyPanel::NotifyItemUpdate(
{
const Color aColor = mpColorItem->GetColorValue();
const SfxObjectShell* pSh = SfxObjectShell::Current();
- const SvxColorListItem aItem(*(const SvxColorListItem*)(pSh->GetItem(SID_COLOR_TABLE)));
+ const SvxColorListItem aItem(*static_cast<const SvxColorListItem*>(pSh->GetItem(SID_COLOR_TABLE)));
mpLbFillAttr->Clear();
mpLbFillAttr->Enable();
@@ -1000,7 +1000,7 @@ void AreaPropertyPanel::NotifyItemUpdate(
{
const OUString aString( mpFillGradientItem->GetName() );
const SfxObjectShell* pSh = SfxObjectShell::Current();
- const SvxGradientListItem aItem( *(const SvxGradientListItem*)(pSh->GetItem(SID_GRADIENT_LIST)));
+ const SvxGradientListItem aItem( *static_cast<const SvxGradientListItem*>(pSh->GetItem(SID_GRADIENT_LIST)));
mpLbFillAttr->Clear();
mpLbFillAttr->Enable();
@@ -1025,7 +1025,7 @@ void AreaPropertyPanel::NotifyItemUpdate(
{
const OUString aString( mpHatchItem->GetName() );
const SfxObjectShell* pSh = SfxObjectShell::Current();
- const SvxHatchListItem aItem(*(const SvxHatchListItem*)(pSh->GetItem(SID_HATCH_LIST)));
+ const SvxHatchListItem aItem(*static_cast<const SvxHatchListItem*>(pSh->GetItem(SID_HATCH_LIST)));
mpLbFillAttr->Clear();
mpLbFillAttr->Enable();
@@ -1050,7 +1050,7 @@ void AreaPropertyPanel::NotifyItemUpdate(
{
const OUString aString( mpBitmapItem->GetName() );
const SfxObjectShell* pSh = SfxObjectShell::Current();
- const SvxBitmapListItem aItem(*(const SvxBitmapListItem*)(pSh->GetItem(SID_BITMAP_LIST)));
+ const SvxBitmapListItem aItem(*static_cast<const SvxBitmapListItem*>(pSh->GetItem(SID_BITMAP_LIST)));
mpLbFillAttr->Clear();
mpLbFillAttr->Enable();
@@ -1109,7 +1109,7 @@ void AreaPropertyPanel::Update()
if(pSh && pSh->GetItem(SID_GRADIENT_LIST))
{
- const SvxGradientListItem aItem(*(const SvxGradientListItem*)(pSh->GetItem(SID_GRADIENT_LIST)));
+ const SvxGradientListItem aItem(*static_cast<const SvxGradientListItem*>(pSh->GetItem(SID_GRADIENT_LIST)));
mpLbFillAttr->Enable();
mpLbFillAttr->Clear();
mpLbFillAttr->Fill(aItem.GetGradientList());
@@ -1138,7 +1138,7 @@ void AreaPropertyPanel::Update()
if(pSh && pSh->GetItem(SID_HATCH_LIST))
{
- const SvxHatchListItem aItem(*(const SvxHatchListItem*)(pSh->GetItem(SID_HATCH_LIST)));
+ const SvxHatchListItem aItem(*static_cast<const SvxHatchListItem*>(pSh->GetItem(SID_HATCH_LIST)));
mpLbFillAttr->Enable();
mpLbFillAttr->Clear();
mpLbFillAttr->Fill(aItem.GetHatchList());
@@ -1167,7 +1167,7 @@ void AreaPropertyPanel::Update()
if(pSh && pSh->GetItem(SID_BITMAP_LIST))
{
- const SvxBitmapListItem aItem(*(const SvxBitmapListItem*)(pSh->GetItem(SID_BITMAP_LIST)));
+ const SvxBitmapListItem aItem(*static_cast<const SvxBitmapListItem*>(pSh->GetItem(SID_BITMAP_LIST)));
mpLbFillAttr->Enable();
mpLbFillAttr->Clear();
mpLbFillAttr->Fill(aItem.GetBitmapList());
diff --git a/svx/source/sidebar/line/LinePropertyPanel.cxx b/svx/source/sidebar/line/LinePropertyPanel.cxx
index c46c772af852..4b4a312e70a3 100644
--- a/svx/source/sidebar/line/LinePropertyPanel.cxx
+++ b/svx/source/sidebar/line/LinePropertyPanel.cxx
@@ -396,7 +396,7 @@ void LinePropertyPanel::NotifyItemUpdate(
if(pItem)
{
- mpStyleItem.reset(pState ? (XLineStyleItem*)pItem->Clone() : 0);
+ mpStyleItem.reset(pState ? static_cast<XLineStyleItem*>(pItem->Clone()) : 0);
}
}
else // if(nSID == SID_ATTR_LINE_DASH)
@@ -405,7 +405,7 @@ void LinePropertyPanel::NotifyItemUpdate(
if(pItem)
{
- mpDashItem.reset(pState ? (XLineDashItem*)pItem->Clone() : 0);
+ mpDashItem.reset(pState ? static_cast<XLineDashItem*>(pItem->Clone()) : 0);
}
}
}
@@ -502,7 +502,7 @@ void LinePropertyPanel::NotifyItemUpdate(
if(pItem)
{
- mpStartItem.reset((XLineStartItem*)pItem->Clone());
+ mpStartItem.reset(static_cast<XLineStartItem*>(pItem->Clone()));
SelectEndStyle(true);
break;
}
@@ -531,7 +531,7 @@ void LinePropertyPanel::NotifyItemUpdate(
if(pItem)
{
- mpEndItem.reset((XLineEndItem*)pItem->Clone());
+ mpEndItem.reset(static_cast<XLineEndItem*>(pItem->Clone()));
SelectEndStyle(false);
break;
}
@@ -977,7 +977,7 @@ void LinePropertyPanel::FillLineEndList()
if ( pSh && pSh->GetItem( SID_LINEEND_LIST ) )
{
mpLBStart->Enable();
- SvxLineEndListItem aItem( *(const SvxLineEndListItem*)(pSh->GetItem( SID_LINEEND_LIST ) ) );
+ SvxLineEndListItem aItem( *static_cast<const SvxLineEndListItem*>(pSh->GetItem( SID_LINEEND_LIST ) ) );
mxLineEndList = aItem.GetLineEndList();
if (mxLineEndList.is())
@@ -1003,7 +1003,7 @@ void LinePropertyPanel::FillLineStyleList()
if ( pSh && pSh->GetItem( SID_DASH_LIST ) )
{
mpLBStyle->Enable();
- SvxDashListItem aItem( *(const SvxDashListItem*)(pSh->GetItem( SID_DASH_LIST ) ) );
+ SvxDashListItem aItem( *static_cast<const SvxDashListItem*>(pSh->GetItem( SID_DASH_LIST ) ) );
mxLineStyleList = aItem.GetDashList();
if (mxLineStyleList.is())
diff --git a/svx/source/sidebar/line/LineWidthControl.cxx b/svx/source/sidebar/line/LineWidthControl.cxx
index 97f518d3f2ac..4683044459b9 100644
--- a/svx/source/sidebar/line/LineWidthControl.cxx
+++ b/svx/source/sidebar/line/LineWidthControl.cxx
@@ -160,14 +160,14 @@ void LineWidthControl::Initialize()
maVSWidth.SetItemText(i, rStr[i-1]);
}
maVSWidth.SetUnit(rStr);
- maVSWidth.SetItemData(1,(void*)5);
- maVSWidth.SetItemData(2,(void*)8);
- maVSWidth.SetItemData(3,(void*)10);
- maVSWidth.SetItemData(4,(void*)15);
- maVSWidth.SetItemData(5,(void*)23);
- maVSWidth.SetItemData(6,(void*)30);
- maVSWidth.SetItemData(7,(void*)45);
- maVSWidth.SetItemData(8,(void*)60);
+ maVSWidth.SetItemData(1, reinterpret_cast<void*>(5));
+ maVSWidth.SetItemData(2, reinterpret_cast<void*>(8));
+ maVSWidth.SetItemData(3, reinterpret_cast<void*>(10));
+ maVSWidth.SetItemData(4, reinterpret_cast<void*>(15));
+ maVSWidth.SetItemData(5, reinterpret_cast<void*>(23));
+ maVSWidth.SetItemData(6, reinterpret_cast<void*>(30));
+ maVSWidth.SetItemData(7, reinterpret_cast<void*>(45));
+ maVSWidth.SetItemData(8, reinterpret_cast<void*>(60));
maVSWidth.SetImage(maIMGCusGray);
maVSWidth.SetSelItem(0);
@@ -271,7 +271,7 @@ IMPL_LINK(LineWidthControl, VSSelectHdl, void *, pControl)
sal_uInt16 iPos = maVSWidth.GetSelectItemId();
if(iPos >= 1 && iPos <= 8)
{
- sal_IntPtr nVal = LogicToLogic((sal_IntPtr)maVSWidth.GetItemData( iPos ) , MAP_POINT, (MapUnit)meMapUnit);
+ sal_IntPtr nVal = LogicToLogic(reinterpret_cast<sal_IntPtr>(maVSWidth.GetItemData( iPos )), MAP_POINT, (MapUnit)meMapUnit);
nVal = maMFWidth.Denormalize(nVal);
XLineWidthItem aWidthItem( nVal );
mpBindings->GetDispatcher()->Execute(SID_ATTR_LINE_WIDTH, SfxCallMode::RECORD, &aWidthItem, 0L);
diff --git a/svx/source/sidebar/nbdtmg.cxx b/svx/source/sidebar/nbdtmg.cxx
index d52be9e1ee2e..b7a63e7634d4 100644
--- a/svx/source/sidebar/nbdtmg.cxx
+++ b/svx/source/sidebar/nbdtmg.cxx
@@ -818,24 +818,25 @@ MixBulletsTypeMgr::MixBulletsTypeMgr(const MixBulletsTypeMgr& aTypeMgr):
pActualBullets[i]->nIndex = aTypeMgr.pActualBullets[i]->nIndex; //index in the tab page display
pActualBullets[i]->nIndexDefault = aTypeMgr.pActualBullets[i]->nIndexDefault;
pActualBullets[i]->pBullets = new BulletsSettings_Impl(eNBType::BULLETS) ;
- ((BulletsSettings_Impl*)(pActualBullets[i]->pBullets))->cBulletChar = ((BulletsSettings_Impl*)(aTypeMgr.pActualBullets[i]->pBullets))->cBulletChar;
- ((BulletsSettings_Impl*)(pActualBullets[i]->pBullets))->aFont = ((BulletsSettings_Impl*)(aTypeMgr.pActualBullets[i]->pBullets))->aFont;
- ((BulletsSettings_Impl*)(pActualBullets[i]->pBullets))->sDescription = ((BulletsSettings_Impl*)(aTypeMgr.pActualBullets[i]->pBullets))->sDescription;
- ((BulletsSettings_Impl*)(pActualBullets[i]->pBullets))->bIsCustomized = ((BulletsSettings_Impl*)(aTypeMgr.pActualBullets[i]->pBullets))->bIsCustomized;
- ((BulletsSettings_Impl*)(pActualBullets[i]->pBullets))->eType = ((BulletsSettings_Impl*)(aTypeMgr.pActualBullets[i]->pBullets))->eType;
- }else if ( aTypeMgr.pActualBullets[i]->eType == eNBType::GRAPHICBULLETS )
+ static_cast<BulletsSettings_Impl*>(pActualBullets[i]->pBullets)->cBulletChar = static_cast<BulletsSettings_Impl*>(aTypeMgr.pActualBullets[i]->pBullets)->cBulletChar;
+ static_cast<BulletsSettings_Impl*>(pActualBullets[i]->pBullets)->aFont = static_cast<BulletsSettings_Impl*>(aTypeMgr.pActualBullets[i]->pBullets)->aFont;
+ static_cast<BulletsSettings_Impl*>(pActualBullets[i]->pBullets)->sDescription = static_cast<BulletsSettings_Impl*>(aTypeMgr.pActualBullets[i]->pBullets)->sDescription;
+ static_cast<BulletsSettings_Impl*>(pActualBullets[i]->pBullets)->bIsCustomized = static_cast<BulletsSettings_Impl*>(aTypeMgr.pActualBullets[i]->pBullets)->bIsCustomized;
+ static_cast<BulletsSettings_Impl*>(pActualBullets[i]->pBullets)->eType = static_cast<BulletsSettings_Impl*>(aTypeMgr.pActualBullets[i]->pBullets)->eType;
+ }
+ else if ( aTypeMgr.pActualBullets[i]->eType == eNBType::GRAPHICBULLETS )
{
pActualBullets[i]->eType = aTypeMgr.pActualBullets[i]->eType;
pActualBullets[i]->nIndex = aTypeMgr.pActualBullets[i]->nIndex; //index in the tab page display
pActualBullets[i]->nIndexDefault = aTypeMgr.pActualBullets[i]->nIndexDefault;
pActualBullets[i]->pBullets = new GrfBulDataRelation(eNBType::GRAPHICBULLETS) ;
- ((GrfBulDataRelation*)(pActualBullets[i]->pBullets))->sGrfName = ((GrfBulDataRelation*)(aTypeMgr.pActualBullets[i]->pBullets))->sGrfName;
- ((GrfBulDataRelation*)(pActualBullets[i]->pBullets))->sDescription = ((GrfBulDataRelation*)(aTypeMgr.pActualBullets[i]->pBullets))->sDescription;
- ((GrfBulDataRelation*)(pActualBullets[i]->pBullets))->bIsCustomized = ((GrfBulDataRelation*)(aTypeMgr.pActualBullets[i]->pBullets))->bIsCustomized;
- ((GrfBulDataRelation*)(pActualBullets[i]->pBullets))->eType = ((GrfBulDataRelation*)(aTypeMgr.pActualBullets[i]->pBullets))->eType;
- if ( ((GrfBulDataRelation*)(aTypeMgr.pActualBullets[i]->pBullets))->bIsCustomized && ((GrfBulDataRelation*)(aTypeMgr.pActualBullets[i]->pBullets))->pGrfObj != NULL)
+ static_cast<GrfBulDataRelation*>(pActualBullets[i]->pBullets)->sGrfName = static_cast<GrfBulDataRelation*>(aTypeMgr.pActualBullets[i]->pBullets)->sGrfName;
+ static_cast<GrfBulDataRelation*>(pActualBullets[i]->pBullets)->sDescription = static_cast<GrfBulDataRelation*>(aTypeMgr.pActualBullets[i]->pBullets)->sDescription;
+ static_cast<GrfBulDataRelation*>(pActualBullets[i]->pBullets)->bIsCustomized = static_cast<GrfBulDataRelation*>(aTypeMgr.pActualBullets[i]->pBullets)->bIsCustomized;
+ static_cast<GrfBulDataRelation*>(pActualBullets[i]->pBullets)->eType = static_cast<GrfBulDataRelation*>(aTypeMgr.pActualBullets[i]->pBullets)->eType;
+ if ( static_cast<GrfBulDataRelation*>(aTypeMgr.pActualBullets[i]->pBullets)->bIsCustomized && static_cast<GrfBulDataRelation*>(aTypeMgr.pActualBullets[i]->pBullets)->pGrfObj != NULL)
{
- ((GrfBulDataRelation*)(pActualBullets[i]->pBullets))->pGrfObj = ((GrfBulDataRelation*)(aTypeMgr.pActualBullets[i]->pBullets))->pGrfObj;
+ static_cast<GrfBulDataRelation*>(pActualBullets[i]->pBullets)->pGrfObj = static_cast<GrfBulDataRelation*>(aTypeMgr.pActualBullets[i]->pBullets)->pGrfObj;
}
}
}
@@ -851,11 +852,11 @@ void MixBulletsTypeMgr::Init()
pActualBullets[0]->nIndex = 0+1; //index in the tab page display,decrease 1 to the index within arr
pActualBullets[0]->nIndexDefault = 2; //index in the tab page display,decrease 1 to the index within arr
pActualBullets[0]->pBullets = new BulletsSettings_Impl(eNBType::BULLETS) ;
- ((BulletsSettings_Impl*)(pActualBullets[0]->pBullets))->cBulletChar = rBTMgr.GetBulChar(pActualBullets[0]->nIndexDefault-1);
- ((BulletsSettings_Impl*)(pActualBullets[0]->pBullets))->aFont = rBTMgr.GetBulCharFont(pActualBullets[0]->nIndexDefault-1);
- ((BulletsSettings_Impl*)(pActualBullets[0]->pBullets))->sDescription = rBTMgr.GetDescription(pActualBullets[0]->nIndexDefault-1);
- ((BulletsSettings_Impl*)(pActualBullets[0]->pBullets))->bIsCustomized = rBTMgr.IsCustomized(pActualBullets[0]->nIndexDefault-1);
- ((BulletsSettings_Impl*)(pActualBullets[0]->pBullets))->eType = eNBType::BULLETS;
+ static_cast<BulletsSettings_Impl*>(pActualBullets[0]->pBullets)->cBulletChar = rBTMgr.GetBulChar(pActualBullets[0]->nIndexDefault-1);
+ static_cast<BulletsSettings_Impl*>(pActualBullets[0]->pBullets)->aFont = rBTMgr.GetBulCharFont(pActualBullets[0]->nIndexDefault-1);
+ static_cast<BulletsSettings_Impl*>(pActualBullets[0]->pBullets)->sDescription = rBTMgr.GetDescription(pActualBullets[0]->nIndexDefault-1);
+ static_cast<BulletsSettings_Impl*>(pActualBullets[0]->pBullets)->bIsCustomized = rBTMgr.IsCustomized(pActualBullets[0]->nIndexDefault-1);
+ static_cast<BulletsSettings_Impl*>(pActualBullets[0]->pBullets)->eType = eNBType::BULLETS;
//Index 2
pActualBullets[1] = new MixBulletsSettings_Impl(eNBType::BULLETS);
@@ -863,11 +864,11 @@ void MixBulletsTypeMgr::Init()
pActualBullets[1]->nIndex = 1+1; //index in the tab page display,decrease 1 to the index within arr
pActualBullets[1]->nIndexDefault = 3; //index in the tab page display,decrease 1 to the index within arr
pActualBullets[1]->pBullets = new BulletsSettings_Impl(eNBType::BULLETS) ;
- ((BulletsSettings_Impl*)(pActualBullets[1]->pBullets))->cBulletChar = rBTMgr.GetBulChar(pActualBullets[1]->nIndexDefault-1);
- ((BulletsSettings_Impl*)(pActualBullets[1]->pBullets))->aFont = rBTMgr.GetBulCharFont(pActualBullets[1]->nIndexDefault-1);
- ((BulletsSettings_Impl*)(pActualBullets[1]->pBullets))->sDescription = rBTMgr.GetDescription(pActualBullets[1]->nIndexDefault-1);
- ((BulletsSettings_Impl*)(pActualBullets[1]->pBullets))->bIsCustomized = rBTMgr.IsCustomized(pActualBullets[1]->nIndexDefault-1);
- ((BulletsSettings_Impl*)(pActualBullets[1]->pBullets))->eType = eNBType::BULLETS;
+ static_cast<BulletsSettings_Impl*>(pActualBullets[1]->pBullets)->cBulletChar = rBTMgr.GetBulChar(pActualBullets[1]->nIndexDefault-1);
+ static_cast<BulletsSettings_Impl*>(pActualBullets[1]->pBullets)->aFont = rBTMgr.GetBulCharFont(pActualBullets[1]->nIndexDefault-1);
+ static_cast<BulletsSettings_Impl*>(pActualBullets[1]->pBullets)->sDescription = rBTMgr.GetDescription(pActualBullets[1]->nIndexDefault-1);
+ static_cast<BulletsSettings_Impl*>(pActualBullets[1]->pBullets)->bIsCustomized = rBTMgr.IsCustomized(pActualBullets[1]->nIndexDefault-1);
+ static_cast<BulletsSettings_Impl*>(pActualBullets[1]->pBullets)->eType = eNBType::BULLETS;
//Index 3
pActualBullets[2] = new MixBulletsSettings_Impl(eNBType::BULLETS);
@@ -875,11 +876,11 @@ void MixBulletsTypeMgr::Init()
pActualBullets[2]->nIndex = 2+1; //index in the tab page display,decrease 1 to the index within arr
pActualBullets[2]->nIndexDefault = 4; //index in the tab page display,decrease 1 to the index within arr
pActualBullets[2]->pBullets = new BulletsSettings_Impl(eNBType::BULLETS) ;
- ((BulletsSettings_Impl*)(pActualBullets[2]->pBullets))->cBulletChar = rBTMgr.GetBulChar(pActualBullets[2]->nIndexDefault-1);
- ((BulletsSettings_Impl*)(pActualBullets[2]->pBullets))->aFont = rBTMgr.GetBulCharFont(pActualBullets[2]->nIndexDefault-1);
- ((BulletsSettings_Impl*)(pActualBullets[2]->pBullets))->sDescription = rBTMgr.GetDescription(pActualBullets[2]->nIndexDefault-1);
- ((BulletsSettings_Impl*)(pActualBullets[2]->pBullets))->bIsCustomized = rBTMgr.IsCustomized(pActualBullets[2]->nIndexDefault-1);
- ((BulletsSettings_Impl*)(pActualBullets[2]->pBullets))->eType = eNBType::BULLETS;
+ static_cast<BulletsSettings_Impl*>(pActualBullets[2]->pBullets)->cBulletChar = rBTMgr.GetBulChar(pActualBullets[2]->nIndexDefault-1);
+ static_cast<BulletsSettings_Impl*>(pActualBullets[2]->pBullets)->aFont = rBTMgr.GetBulCharFont(pActualBullets[2]->nIndexDefault-1);
+ static_cast<BulletsSettings_Impl*>(pActualBullets[2]->pBullets)->sDescription = rBTMgr.GetDescription(pActualBullets[2]->nIndexDefault-1);
+ static_cast<BulletsSettings_Impl*>(pActualBullets[2]->pBullets)->bIsCustomized = rBTMgr.IsCustomized(pActualBullets[2]->nIndexDefault-1);
+ static_cast<BulletsSettings_Impl*>(pActualBullets[2]->pBullets)->eType = eNBType::BULLETS;
//Index 4
pActualBullets[3] = new MixBulletsSettings_Impl(eNBType::BULLETS);
@@ -887,11 +888,11 @@ void MixBulletsTypeMgr::Init()
pActualBullets[3]->nIndex = 3+1; //index in the tab page display,decrease 1 to the index within arr
pActualBullets[3]->nIndexDefault = 5; //index in the tab page display,decrease 1 to the index within arr
pActualBullets[3]->pBullets = new BulletsSettings_Impl(eNBType::BULLETS) ;
- ((BulletsSettings_Impl*)(pActualBullets[3]->pBullets))->cBulletChar = rBTMgr.GetBulChar(pActualBullets[3]->nIndexDefault-1);
- ((BulletsSettings_Impl*)(pActualBullets[3]->pBullets))->aFont = rBTMgr.GetBulCharFont(pActualBullets[3]->nIndexDefault-1);
- ((BulletsSettings_Impl*)(pActualBullets[3]->pBullets))->sDescription = rBTMgr.GetDescription(pActualBullets[3]->nIndexDefault-1);
- ((BulletsSettings_Impl*)(pActualBullets[3]->pBullets))->bIsCustomized = rBTMgr.IsCustomized(pActualBullets[3]->nIndexDefault-1);
- ((BulletsSettings_Impl*)(pActualBullets[3]->pBullets))->eType = eNBType::BULLETS;
+ static_cast<BulletsSettings_Impl*>(pActualBullets[3]->pBullets)->cBulletChar = rBTMgr.GetBulChar(pActualBullets[3]->nIndexDefault-1);
+ static_cast<BulletsSettings_Impl*>(pActualBullets[3]->pBullets)->aFont = rBTMgr.GetBulCharFont(pActualBullets[3]->nIndexDefault-1);
+ static_cast<BulletsSettings_Impl*>(pActualBullets[3]->pBullets)->sDescription = rBTMgr.GetDescription(pActualBullets[3]->nIndexDefault-1);
+ static_cast<BulletsSettings_Impl*>(pActualBullets[3]->pBullets)->bIsCustomized = rBTMgr.IsCustomized(pActualBullets[3]->nIndexDefault-1);
+ static_cast<BulletsSettings_Impl*>(pActualBullets[3]->pBullets)->eType = eNBType::BULLETS;
//Index 5
pActualBullets[4] = new MixBulletsSettings_Impl(eNBType::BULLETS);
@@ -899,11 +900,11 @@ void MixBulletsTypeMgr::Init()
pActualBullets[4]->nIndex = 4+1; //index in the tab page display,decrease 1 to the index within arr
pActualBullets[4]->nIndexDefault = 6; //index in the tab page display,decrease 1 to the index within arr
pActualBullets[4]->pBullets = new BulletsSettings_Impl(eNBType::BULLETS) ;
- ((BulletsSettings_Impl*)(pActualBullets[4]->pBullets))->cBulletChar = rBTMgr.GetBulChar(pActualBullets[4]->nIndexDefault-1);
- ((BulletsSettings_Impl*)(pActualBullets[4]->pBullets))->aFont = rBTMgr.GetBulCharFont(pActualBullets[4]->nIndexDefault-1);
- ((BulletsSettings_Impl*)(pActualBullets[4]->pBullets))->sDescription = rBTMgr.GetDescription(pActualBullets[4]->nIndexDefault-1);
- ((BulletsSettings_Impl*)(pActualBullets[4]->pBullets))->bIsCustomized = rBTMgr.IsCustomized(pActualBullets[4]->nIndexDefault-1);
- ((BulletsSettings_Impl*)(pActualBullets[4]->pBullets))->eType = eNBType::BULLETS;
+ static_cast<BulletsSettings_Impl*>(pActualBullets[4]->pBullets)->cBulletChar = rBTMgr.GetBulChar(pActualBullets[4]->nIndexDefault-1);
+ static_cast<BulletsSettings_Impl*>(pActualBullets[4]->pBullets)->aFont = rBTMgr.GetBulCharFont(pActualBullets[4]->nIndexDefault-1);
+ static_cast<BulletsSettings_Impl*>(pActualBullets[4]->pBullets)->sDescription = rBTMgr.GetDescription(pActualBullets[4]->nIndexDefault-1);
+ static_cast<BulletsSettings_Impl*>(pActualBullets[4]->pBullets)->bIsCustomized = rBTMgr.IsCustomized(pActualBullets[4]->nIndexDefault-1);
+ static_cast<BulletsSettings_Impl*>(pActualBullets[4]->pBullets)->eType = eNBType::BULLETS;
//Index 6
pActualBullets[5] = new MixBulletsSettings_Impl(eNBType::BULLETS);
@@ -911,11 +912,11 @@ void MixBulletsTypeMgr::Init()
pActualBullets[5]->nIndex = 5+1; //index in the tab page display,decrease 1 to the index within arr
pActualBullets[5]->nIndexDefault = 8; //index in the tab page display,decrease 1 to the index within arr
pActualBullets[5]->pBullets = new BulletsSettings_Impl(eNBType::BULLETS) ;
- ((BulletsSettings_Impl*)(pActualBullets[5]->pBullets))->cBulletChar = rBTMgr.GetBulChar(pActualBullets[5]->nIndexDefault-1);
- ((BulletsSettings_Impl*)(pActualBullets[5]->pBullets))->aFont = rBTMgr.GetBulCharFont(pActualBullets[5]->nIndexDefault-1);
- ((BulletsSettings_Impl*)(pActualBullets[5]->pBullets))->sDescription = rBTMgr.GetDescription(pActualBullets[5]->nIndexDefault-1);
- ((BulletsSettings_Impl*)(pActualBullets[5]->pBullets))->bIsCustomized = rBTMgr.IsCustomized(pActualBullets[5]->nIndexDefault-1);
- ((BulletsSettings_Impl*)(pActualBullets[5]->pBullets))->eType = eNBType::BULLETS;
+ static_cast<BulletsSettings_Impl*>(pActualBullets[5]->pBullets)->cBulletChar = rBTMgr.GetBulChar(pActualBullets[5]->nIndexDefault-1);
+ static_cast<BulletsSettings_Impl*>(pActualBullets[5]->pBullets)->aFont = rBTMgr.GetBulCharFont(pActualBullets[5]->nIndexDefault-1);
+ static_cast<BulletsSettings_Impl*>(pActualBullets[5]->pBullets)->sDescription = rBTMgr.GetDescription(pActualBullets[5]->nIndexDefault-1);
+ static_cast<BulletsSettings_Impl*>(pActualBullets[5]->pBullets)->bIsCustomized = rBTMgr.IsCustomized(pActualBullets[5]->nIndexDefault-1);
+ static_cast<BulletsSettings_Impl*>(pActualBullets[5]->pBullets)->eType = eNBType::BULLETS;
}
GraphyicBulletsTypeMgr& rGrfTMgr = GraphyicBulletsTypeMgr::GetInstance();
@@ -926,10 +927,10 @@ void MixBulletsTypeMgr::Init()
pActualBullets[6]->nIndex = 6+1; //index in the tab page display,decrease 1 to the index within arr
pActualBullets[6]->nIndexDefault = 9; //index in the tab page display,decrease 1 to the index within arr
pActualBullets[6]->pBullets = new GrfBulDataRelation(eNBType::GRAPHICBULLETS) ;
- ((GrfBulDataRelation*)(pActualBullets[6]->pBullets))->sGrfName = rGrfTMgr.GetGrfName(pActualBullets[6]->nIndexDefault);
- ((GrfBulDataRelation*)(pActualBullets[6]->pBullets))->sDescription = rGrfTMgr.GetDescription(pActualBullets[6]->nIndexDefault);
- ((GrfBulDataRelation*)(pActualBullets[6]->pBullets))->bIsCustomized = rGrfTMgr.IsCustomized(pActualBullets[6]->nIndexDefault);
- ((GrfBulDataRelation*)(pActualBullets[6]->pBullets))->eType = eNBType::GRAPHICBULLETS;
+ static_cast<GrfBulDataRelation*>(pActualBullets[6]->pBullets)->sGrfName = rGrfTMgr.GetGrfName(pActualBullets[6]->nIndexDefault);
+ static_cast<GrfBulDataRelation*>(pActualBullets[6]->pBullets)->sDescription = rGrfTMgr.GetDescription(pActualBullets[6]->nIndexDefault);
+ static_cast<GrfBulDataRelation*>(pActualBullets[6]->pBullets)->bIsCustomized = rGrfTMgr.IsCustomized(pActualBullets[6]->nIndexDefault);
+ static_cast<GrfBulDataRelation*>(pActualBullets[6]->pBullets)->eType = eNBType::GRAPHICBULLETS;
//Index 8
pActualBullets[7] = new MixBulletsSettings_Impl(eNBType::GRAPHICBULLETS);
@@ -937,10 +938,10 @@ void MixBulletsTypeMgr::Init()
pActualBullets[7]->nIndex = 7+1; //index in the tab page display,decrease 1 to the index within arr
pActualBullets[7]->nIndexDefault = 23; //index in the tab page display,decrease 1 to the index within arr
pActualBullets[7]->pBullets = new GrfBulDataRelation(eNBType::GRAPHICBULLETS) ;
- ((GrfBulDataRelation*)(pActualBullets[7]->pBullets))->sGrfName = rGrfTMgr.GetGrfName(pActualBullets[7]->nIndexDefault);
- ((GrfBulDataRelation*)(pActualBullets[7]->pBullets))->sDescription = rGrfTMgr.GetDescription(pActualBullets[7]->nIndexDefault);
- ((GrfBulDataRelation*)(pActualBullets[7]->pBullets))->bIsCustomized = rGrfTMgr.IsCustomized(pActualBullets[7]->nIndexDefault);
- ((GrfBulDataRelation*)(pActualBullets[7]->pBullets))->eType = eNBType::GRAPHICBULLETS;
+ static_cast<GrfBulDataRelation*>(pActualBullets[7]->pBullets)->sGrfName = rGrfTMgr.GetGrfName(pActualBullets[7]->nIndexDefault);
+ static_cast<GrfBulDataRelation*>(pActualBullets[7]->pBullets)->sDescription = rGrfTMgr.GetDescription(pActualBullets[7]->nIndexDefault);
+ static_cast<GrfBulDataRelation*>(pActualBullets[7]->pBullets)->bIsCustomized = rGrfTMgr.IsCustomized(pActualBullets[7]->nIndexDefault);
+ static_cast<GrfBulDataRelation*>(pActualBullets[7]->pBullets)->eType = eNBType::GRAPHICBULLETS;
}
}
@@ -966,9 +967,9 @@ sal_uInt16 MixBulletsTypeMgr::GetNBOIndexForNumRule(SvxNumRule& aNum,sal_uInt16
{
if ( pActualBullets[i]->eType == eNBType::BULLETS )
{
- if ( (cChar == ((BulletsSettings_Impl*)(pActualBullets[i]->pBullets))->cBulletChar||
- (cChar == 9830 && 57356 == ((BulletsSettings_Impl*)(pActualBullets[i]->pBullets))->cBulletChar) ||
- (cChar == 9632 && 57354 == ((BulletsSettings_Impl*)(pActualBullets[i]->pBullets))->cBulletChar)))//&&
+ if ( (cChar == static_cast<BulletsSettings_Impl*>(pActualBullets[i]->pBullets)->cBulletChar||
+ (cChar == 9830 && 57356 == static_cast<BulletsSettings_Impl*>(pActualBullets[i]->pBullets)->cBulletChar) ||
+ (cChar == 9632 && 57354 == static_cast<BulletsSettings_Impl*>(pActualBullets[i]->pBullets)->cBulletChar)))//&&
{
return pActualBullets[i]->nIndex;
}
@@ -988,7 +989,7 @@ sal_uInt16 MixBulletsTypeMgr::GetNBOIndexForNumRule(SvxNumRule& aNum,sal_uInt16
{
if ( pActualBullets[i]->eType == eNBType::GRAPHICBULLETS )
{
- GrfBulDataRelation* pEntry = (GrfBulDataRelation*) (pActualBullets[i]->pBullets);
+ GrfBulDataRelation* pEntry = static_cast<GrfBulDataRelation*>(pActualBullets[i]->pBullets);
//sal_Bool bExist = sal_False;
if ( pEntry && pActualBullets[i]->nIndexDefault == (sal_uInt16)0xFFFF && pEntry->pGrfObj)
{
@@ -1032,7 +1033,7 @@ bool MixBulletsTypeMgr::RelplaceNumRule(SvxNumRule& aNum,sal_uInt16 nIndex,sal_u
{
sal_Unicode cChar = aFmt.GetBulletChar();
const vcl::Font* pFont = aFmt.GetBulletFont();
- BulletsSettings_Impl* pEntry = (BulletsSettings_Impl*) (pActualBullets[nIndex]->pBullets);
+ BulletsSettings_Impl* pEntry = static_cast<BulletsSettings_Impl*>(pActualBullets[nIndex]->pBullets);
pEntry->cBulletChar = cChar;
pEntry->aFont = pFont?*pFont:lcl_GetDefaultBulletFont();
pEntry->bIsCustomized = true;
@@ -1054,7 +1055,7 @@ bool MixBulletsTypeMgr::RelplaceNumRule(SvxNumRule& aNum,sal_uInt16 nIndex,sal_u
if ( pGrf )
{
const OUString aGrfName = pBrsh->GetGraphicLink();
- GrfBulDataRelation* pEntry = (GrfBulDataRelation*) (pActualBullets[nIndex]->pBullets);
+ GrfBulDataRelation* pEntry = static_cast<GrfBulDataRelation*>(pActualBullets[nIndex]->pBullets);
if ( !aGrfName.isEmpty() )
pEntry->sGrfName = aGrfName;
GraphyicBulletsTypeMgr& rGrfTMgr = GraphyicBulletsTypeMgr::GetInstance();
@@ -1087,15 +1088,15 @@ bool MixBulletsTypeMgr::RelplaceNumRule(SvxNumRule& aNum,sal_uInt16 nIndex,sal_u
pActualBullets[nIndex]->eType = eNBType::BULLETS;
pActualBullets[nIndex]->nIndex = nIndex+1; //index in the tab page display,decrease 1 to the index within arr
pActualBullets[nIndex]->pBullets = new BulletsSettings_Impl(eNBType::BULLETS) ;
- ((BulletsSettings_Impl*)(pActualBullets[nIndex]->pBullets))->cBulletChar = cChar;
- ((BulletsSettings_Impl*)(pActualBullets[nIndex]->pBullets))->aFont = pFont?*pFont:lcl_GetDefaultBulletFont();
- ((BulletsSettings_Impl*)(pActualBullets[nIndex]->pBullets))->bIsCustomized = true;
- ((BulletsSettings_Impl*)(pActualBullets[nIndex]->pBullets))->eType = eNBType::BULLETS;
+ static_cast<BulletsSettings_Impl*>(pActualBullets[nIndex]->pBullets)->cBulletChar = cChar;
+ static_cast<BulletsSettings_Impl*>(pActualBullets[nIndex]->pBullets)->aFont = pFont?*pFont:lcl_GetDefaultBulletFont();
+ static_cast<BulletsSettings_Impl*>(pActualBullets[nIndex]->pBullets)->bIsCustomized = true;
+ static_cast<BulletsSettings_Impl*>(pActualBullets[nIndex]->pBullets)->eType = eNBType::BULLETS;
pActualBullets[nIndex]->nIndexDefault = (sal_uInt16)0xFFFF;
OUString aStrFromRES = SVX_RESSTR( RID_SVXSTR_NUMBULLET_CUSTOM_BULLET_DESCRIPTION);
OUString sNUM = OUString::number( nIndex + 1 );
aStrFromRES = aStrFromRES.replaceFirst("%LIST_NUM",sNUM);
- ((BulletsSettings_Impl*)(pActualBullets[nIndex]->pBullets))->sDescription = aStrFromRES;
+ static_cast<BulletsSettings_Impl*>(pActualBullets[nIndex]->pBullets)->sDescription = aStrFromRES;
}else if ( (eNumType&(~LINK_TOKEN)) == SVX_NUM_BITMAP )
{
const SvxBrushItem* pBrsh = aFmt.GetBrush();
@@ -1114,24 +1115,24 @@ bool MixBulletsTypeMgr::RelplaceNumRule(SvxNumRule& aNum,sal_uInt16 nIndex,sal_u
pActualBullets[nIndex]->nIndex = nIndex+1; //index in the tab page display,decrease 1 to the index within arr
pActualBullets[nIndex]->pBullets = new GrfBulDataRelation(eNBType::GRAPHICBULLETS) ;
if (!aGrfName.isEmpty())
- ((GrfBulDataRelation*)(pActualBullets[nIndex]->pBullets))->sGrfName = aGrfName;
- ((GrfBulDataRelation*)(pActualBullets[nIndex]->pBullets))->bIsCustomized = true;
- ((GrfBulDataRelation*)(pActualBullets[nIndex]->pBullets))->eType = eNBType::GRAPHICBULLETS;
+ static_cast<GrfBulDataRelation*>(pActualBullets[nIndex]->pBullets)->sGrfName = aGrfName;
+ static_cast<GrfBulDataRelation*>(pActualBullets[nIndex]->pBullets)->bIsCustomized = true;
+ static_cast<GrfBulDataRelation*>(pActualBullets[nIndex]->pBullets)->eType = eNBType::GRAPHICBULLETS;
GraphyicBulletsTypeMgr& rGrfTMgr = GraphyicBulletsTypeMgr::GetInstance();
{
pActualBullets[nIndex]->nIndexDefault = (sal_uInt16)0xFFFF;
OUString aStrFromRES = SVX_RESSTR( RID_SVXSTR_NUMBULLET_CUSTOM_BULLET_DESCRIPTION);
OUString sNUM = OUString::number( nIndex + 1 );
aStrFromRES = aStrFromRES.replaceFirst("%LIST_NUM",sNUM);
- ((GrfBulDataRelation*)(pActualBullets[nIndex]->pBullets))->sDescription = aStrFromRES;
- ((GrfBulDataRelation*)(pActualBullets[nIndex]->pBullets))->pGrfObj = new Graphic(*pGrf);
- ((GrfBulDataRelation*)(pActualBullets[nIndex]->pBullets))->pGrfObj = new Graphic(*pGrf);
+ static_cast<GrfBulDataRelation*>(pActualBullets[nIndex]->pBullets)->sDescription = aStrFromRES;
+ static_cast<GrfBulDataRelation*>(pActualBullets[nIndex]->pBullets)->pGrfObj = new Graphic(*pGrf);
+ static_cast<GrfBulDataRelation*>(pActualBullets[nIndex]->pBullets)->pGrfObj = new Graphic(*pGrf);
Size aTmpSize = aFmt.GetGraphicSize();
aTmpSize = OutputDevice::LogicToLogic(aTmpSize,(MapUnit)GetMapUnit(),MAP_100TH_MM);
sal_uInt16 nDIndex = rGrfTMgr.GetNBOIndexForNumRule(aNum,mLevel);
if (nDIndex!=(sal_uInt16)0xFFFF)
aTmpSize=Size(0,0);
- ((GrfBulDataRelation*)(pActualBullets[nIndex]->pBullets))->aSize = aTmpSize;
+ static_cast<GrfBulDataRelation*>(pActualBullets[nIndex]->pBullets)->aSize = aTmpSize;
}
}
}
@@ -1140,12 +1141,12 @@ bool MixBulletsTypeMgr::RelplaceNumRule(SvxNumRule& aNum,sal_uInt16 nIndex,sal_u
ApplyNumRule(aTmpRule1,nIndex,mLevel,true);
if (GetNBOIndexForNumRule(aTmpRule1,mLevel,nIndex)==nIndex+1) {
if (pActualBullets[nIndex]->eType == eNBType::BULLETS) {
- BulletsSettings_Impl* pEntry = (BulletsSettings_Impl*) (pActualBullets[nIndex]->pBullets);
+ BulletsSettings_Impl* pEntry = static_cast<BulletsSettings_Impl*>(pActualBullets[nIndex]->pBullets);
pEntry->bIsCustomized = false;
pEntry->sDescription = GetDescription(nIndex,true);
}
if (pActualBullets[nIndex]->eType == eNBType::GRAPHICBULLETS) {
- GrfBulDataRelation* pEntry = (GrfBulDataRelation*) (pActualBullets[nIndex]->pBullets);
+ GrfBulDataRelation* pEntry = static_cast<GrfBulDataRelation*>(pActualBullets[nIndex]->pBullets);
pEntry->bIsCustomized = false;
pEntry->sDescription = GetDescription(nIndex,true);
}
@@ -1165,10 +1166,10 @@ bool MixBulletsTypeMgr::ApplyNumRule(SvxNumRule& aNum, sal_uInt16 nIndex, sal_uI
if ( pCurrentBullets->eType == eNBType::BULLETS )
{
sal_Unicode cChar;
- cChar = ((BulletsSettings_Impl*)(pCurrentBullets->pBullets))->cBulletChar;
+ cChar = static_cast<BulletsSettings_Impl*>(pCurrentBullets->pBullets)->cBulletChar;
//vcl::Font& rActBulletFont = lcl_GetDefaultBulletFont();
- vcl::Font rActBulletFont = ((BulletsSettings_Impl*)(pCurrentBullets->pBullets))->aFont;
+ vcl::Font rActBulletFont = static_cast<BulletsSettings_Impl*>(pCurrentBullets->pBullets)->aFont;
sal_uInt16 nMask = 1;
OUString sBulletCharFmtName = GetBulCharFmtName();
for(sal_uInt16 i = 0; i < aNum.GetLevelCount(); i++)
@@ -1192,7 +1193,7 @@ bool MixBulletsTypeMgr::ApplyNumRule(SvxNumRule& aNum, sal_uInt16 nIndex, sal_uI
}else if ( pCurrentBullets->eType == eNBType::GRAPHICBULLETS )
{
OUString sGrfName;
- GrfBulDataRelation* pEntry = (GrfBulDataRelation*) (pCurrentBullets->pBullets);
+ GrfBulDataRelation* pEntry = static_cast<GrfBulDataRelation*>(pCurrentBullets->pBullets);
sGrfName= pEntry->sGrfName;
sal_uInt16 nMask = 1;
@@ -1754,7 +1755,7 @@ bool OutlineTypeMgr::ApplyNumRule(SvxNumRule& aNum, sal_uInt16 nIndex, sal_uInt1
if(!pList)
{
SfxObjectShell* pCurDocShell = SfxObjectShell::Current();
- const SvxFontListItem* pFontListItem = (const SvxFontListItem* )pCurDocShell->GetItem( SID_ATTR_CHAR_FONTLIST );
+ const SvxFontListItem* pFontListItem = static_cast<const SvxFontListItem*>( pCurDocShell->GetItem( SID_ATTR_CHAR_FONTLIST ) );
pList = pFontListItem ? pFontListItem->GetFontList() : 0;
}
if(pList && pList->IsAvailable( pLevelSettings->sBulletFont ) )
diff --git a/svx/source/sidebar/paragraph/ParaPropertyPanel.cxx b/svx/source/sidebar/paragraph/ParaPropertyPanel.cxx
index 98badcf54e75..017800c82e94 100644
--- a/svx/source/sidebar/paragraph/ParaPropertyPanel.cxx
+++ b/svx/source/sidebar/paragraph/ParaPropertyPanel.cxx
@@ -415,7 +415,7 @@ void ParaPropertyPanel::ParaBKGStateChanged(sal_uInt16 /*nSID*/, SfxItemState eS
{
if( eState >= SfxItemState::DEFAULT && pState->ISA(SvxColorItem))
{
- const SvxColorItem* pItem = (const SvxColorItem*)pState;
+ const SvxColorItem* pItem = static_cast<const SvxColorItem*>(pState);
maColor = pItem->GetValue();
mbColorAvailable = true;
mpColorUpdater->Update(maColor);
@@ -746,7 +746,7 @@ void ParaPropertyPanel::StateChangedIndentImpl( sal_uInt16 /*nSID*/, SfxItemStat
const sal_uInt16 nIdHangingIndent2 = mpTbxIndent_IncDec->GetItemId(UNO_HANGINGINDENT2);
if( pState && eState >= SfxItemState::DEFAULT )
{
- SvxLRSpaceItem* pSpace = ( SvxLRSpaceItem*)pState;
+ const SvxLRSpaceItem* pSpace = static_cast<const SvxLRSpaceItem*>(pState);
maTxtLeft = pSpace->GetTxtLeft();
maTxtLeft = OutputDevice::LogicToLogic( maTxtLeft, (MapUnit)m_eLRSpaceUnit, MAP_100TH_MM );
maTxtLeft = OutputDevice::LogicToLogic( maTxtLeft, MAP_100TH_MM, (MapUnit)(SFX_MAPUNIT_TWIP) );
@@ -858,7 +858,7 @@ void ParaPropertyPanel::StateChangedLnSPImpl( sal_uInt16 /*nSID*/, SfxItemState
{
if(mpLnSPItem)
delete mpLnSPItem;
- mpLnSPItem = ( SvxLineSpacingItem *)pState->Clone();
+ mpLnSPItem = static_cast<SvxLineSpacingItem *>(pState->Clone());
}
}
@@ -869,7 +869,7 @@ void ParaPropertyPanel::StateChangedULImpl( sal_uInt16 /*nSID*/, SfxItemState eS
if( pState && eState >= SfxItemState::DEFAULT )
{
- SvxULSpaceItem* pOldItem = (SvxULSpaceItem*)pState;
+ const SvxULSpaceItem* pOldItem = static_cast<const SvxULSpaceItem*>(pState);
maUpper = pOldItem->GetUpper();
maUpper = OutputDevice::LogicToLogic( maUpper, (MapUnit)m_eULSpaceUnit, MAP_100TH_MM );
@@ -957,7 +957,7 @@ void ParaPropertyPanel::StateChangeBulletNumImpl( sal_uInt16 nSID, SfxItemState
{
if ( (eState >= SfxItemState::DEFAULT) && (pState->ISA(SfxBoolItem)) )
{
- const SfxBoolItem* pItem= (const SfxBoolItem*)pState;
+ const SfxBoolItem* pItem = static_cast<const SfxBoolItem*>(pState);
const bool aBool = pItem->GetValue();
const sal_uInt16 nIdNumber = mpTBxNumBullet->GetItemId(UNO_DEFAULTNUMBERING);
@@ -985,7 +985,7 @@ void ParaPropertyPanel::StateChangeBulletNumRuleImpl( sal_uInt16 nSID, SfxItemSt
{
sal_uInt16 nValue = (sal_uInt16)0xFFFF;
{
- const SfxUInt16Item* pIt = (const SfxUInt16Item*)pState;
+ const SfxUInt16Item* pIt = static_cast<const SfxUInt16Item*>(pState);
if ( pIt )
nValue = pIt->GetValue();
}
@@ -1007,7 +1007,7 @@ FieldUnit ParaPropertyPanel::GetCurrentUnit( SfxItemState eState, const SfxPoolI
FieldUnit eUnit = FUNIT_NONE;
if ( pState && eState >= SfxItemState::DEFAULT )
- eUnit = (FieldUnit)( (const SfxUInt16Item*)pState )->GetValue();
+ eUnit = (FieldUnit) static_cast<const SfxUInt16Item*>(pState)->GetValue();
else
{
SfxViewFrame* pFrame = SfxViewFrame::Current();
@@ -1021,7 +1021,7 @@ FieldUnit ParaPropertyPanel::GetCurrentUnit( SfxItemState eState, const SfxPoolI
{
const SfxPoolItem* pItem = pModule->GetItem( SID_ATTR_METRIC );
if ( pItem )
- eUnit = (FieldUnit)( (SfxUInt16Item*)pItem )->GetValue();
+ eUnit = (FieldUnit) static_cast<const SfxUInt16Item*>(pItem)->GetValue();
}
else
{
diff --git a/svx/source/sidebar/possize/PosSizePropertyPanel.cxx b/svx/source/sidebar/possize/PosSizePropertyPanel.cxx
index 44ce50c1dbc8..be0a12d84a5e 100644
--- a/svx/source/sidebar/possize/PosSizePropertyPanel.cxx
+++ b/svx/source/sidebar/possize/PosSizePropertyPanel.cxx
@@ -1040,7 +1040,7 @@ FieldUnit PosSizePropertyPanel::GetCurrentUnit( SfxItemState eState, const SfxPo
if ( pState && eState >= SfxItemState::DEFAULT )
{
- eUnit = (FieldUnit)( (const SfxUInt16Item*)pState )->GetValue();
+ eUnit = (FieldUnit) static_cast<const SfxUInt16Item*>(pState)->GetValue();
}
else
{
@@ -1055,7 +1055,7 @@ FieldUnit PosSizePropertyPanel::GetCurrentUnit( SfxItemState eState, const SfxPo
{
const SfxPoolItem* pItem = pModule->GetItem( SID_ATTR_METRIC );
if ( pItem )
- eUnit = (FieldUnit)( (SfxUInt16Item*)pItem )->GetValue();
+ eUnit = (FieldUnit) static_cast<const SfxUInt16Item*>(pItem)->GetValue();
}
else
{
diff --git a/svx/source/sidebar/text/TextPropertyPanel.cxx b/svx/source/sidebar/text/TextPropertyPanel.cxx
index 288ccbfcb720..44d8a2cb65b3 100644
--- a/svx/source/sidebar/text/TextPropertyPanel.cxx
+++ b/svx/source/sidebar/text/TextPropertyPanel.cxx
@@ -241,7 +241,7 @@ void TextPropertyPanel::NotifyItemUpdate (
case SID_ATTR_CHAR_FONTHEIGHT:
{
if ( eState >= SfxItemState::DEFAULT && pState->ISA(SvxFontHeightItem) )
- mpHeightItem = (SvxFontHeightItem*)pState;
+ mpHeightItem = const_cast<SvxFontHeightItem*>(static_cast<const SvxFontHeightItem*>(pState));
else
mpHeightItem = NULL;
}
@@ -250,7 +250,7 @@ void TextPropertyPanel::NotifyItemUpdate (
{
if( eState >= SfxItemState::DEFAULT && pState->ISA(SvxUnderlineItem) )
{
- const SvxUnderlineItem* pItem = (const SvxUnderlineItem*)pState;
+ const SvxUnderlineItem* pItem = static_cast<const SvxUnderlineItem*>(pState);
meUnderline = (FontUnderline)pItem->GetValue();
meUnderlineColor = pItem->GetColor();
}
@@ -266,7 +266,7 @@ void TextPropertyPanel::NotifyItemUpdate (
if(pState->ISA(SvxKerningItem))
{
- const SvxKerningItem* pKerningItem = (const SvxKerningItem*)pState;
+ const SvxKerningItem* pKerningItem = static_cast<const SvxKerningItem*>(pState);
mlKerning = (long)pKerningItem->GetValue();
mbKernAvailable = true;
}
diff --git a/svx/source/sidebar/text/TextUnderlineControl.cxx b/svx/source/sidebar/text/TextUnderlineControl.cxx
index cc62e5b5e74b..c90ec5407739 100644
--- a/svx/source/sidebar/text/TextUnderlineControl.cxx
+++ b/svx/source/sidebar/text/TextUnderlineControl.cxx
@@ -84,34 +84,34 @@ void TextUnderlineControl::initial()
maVSUnderline.SetText( SVX_RESSTR(STR_WITHOUT) );
maVSUnderline.InsertItem(1, maIMGSingle, SVX_RESSTR(STR_SINGLE));
- maVSUnderline.SetItemData(1, (void*)(sal_uInt64)UNDERLINE_SINGLE);
+ maVSUnderline.SetItemData(1, reinterpret_cast<void*>(UNDERLINE_SINGLE));
maVSUnderline.InsertItem(2, maIMGDouble, SVX_RESSTR(STR_DOUBLE));
- maVSUnderline.SetItemData(2, (void*)(sal_uInt64)UNDERLINE_DOUBLE);
+ maVSUnderline.SetItemData(2, reinterpret_cast<void*>(UNDERLINE_DOUBLE));
maVSUnderline.InsertItem(3, maIMGBold, SVX_RESSTR(STR_BOLD));
- maVSUnderline.SetItemData(3,(void*)(sal_uInt64)UNDERLINE_BOLD);
+ maVSUnderline.SetItemData(3, reinterpret_cast<void*>(UNDERLINE_BOLD));
maVSUnderline.InsertItem(4, maIMGDot, SVX_RESSTR(STR_DOT));
- maVSUnderline.SetItemData(4,(void*)(sal_uInt64)UNDERLINE_DOTTED);
+ maVSUnderline.SetItemData(4, reinterpret_cast<void*>(UNDERLINE_DOTTED));
maVSUnderline.InsertItem(5, maIMGDotBold, SVX_RESSTR(STR_DOT_BOLD));
- maVSUnderline.SetItemData(5,(void*)(sal_uInt64)UNDERLINE_BOLDDOTTED);
+ maVSUnderline.SetItemData(5, reinterpret_cast<void*>(UNDERLINE_BOLDDOTTED));
maVSUnderline.InsertItem(6, maIMGDash, SVX_RESSTR(STR_DASH));
- maVSUnderline.SetItemData(6,(void*)(sal_uInt64)UNDERLINE_DASH);
+ maVSUnderline.SetItemData(6, reinterpret_cast<void*>(UNDERLINE_DASH));
maVSUnderline.InsertItem(7, maIMGDashLong, SVX_RESSTR(STR_DASH_LONG));
- maVSUnderline.SetItemData(7,(void*)(sal_uInt64)UNDERLINE_LONGDASH);
+ maVSUnderline.SetItemData(7, reinterpret_cast<void*>(UNDERLINE_LONGDASH));
maVSUnderline.InsertItem(8, maIMGDashDot, SVX_RESSTR(STR_DASH_DOT));
- maVSUnderline.SetItemData(8,(void*)(sal_uInt64)UNDERLINE_DASHDOT);
+ maVSUnderline.SetItemData(8, reinterpret_cast<void*>(UNDERLINE_DASHDOT));
maVSUnderline.InsertItem(9, maIMGDashDotDot, SVX_RESSTR(STR_DASH_DOT_DOT));
- maVSUnderline.SetItemData(9,(void*)(sal_uInt64)UNDERLINE_DASHDOTDOT);
+ maVSUnderline.SetItemData(9, reinterpret_cast<void*>(UNDERLINE_DASHDOTDOT));
maVSUnderline.InsertItem(10, maIMGWave, SVX_RESSTR(STR_WAVE));
- maVSUnderline.SetItemData(10,(void*)(sal_uInt64)UNDERLINE_WAVE);
+ maVSUnderline.SetItemData(10, reinterpret_cast<void*>(UNDERLINE_WAVE));
maVSUnderline.SetColCount( 1 );
aLink = LINK( this, TextUnderlineControl, VSSelectHdl ) ;
@@ -207,7 +207,7 @@ IMPL_LINK(TextUnderlineControl, VSSelectHdl, void *, pControl)
const sal_uInt16 iPos = maVSUnderline.GetSelectItemId();
const FontUnderline eUnderline = ( iPos == 0 )
? UNDERLINE_NONE
- : (FontUnderline)(sal_uInt64)maVSUnderline.GetItemData( iPos );
+ : static_cast<FontUnderline>(reinterpret_cast<sal_uInt64>(maVSUnderline.GetItemData( iPos )));
SvxUnderlineItem aLineItem(eUnderline, SID_ATTR_CHAR_UNDERLINE);
diff --git a/svx/source/sidebar/tools/ColorControl.cxx b/svx/source/sidebar/tools/ColorControl.cxx
index affabdac5387..68f8ce08cbde 100644
--- a/svx/source/sidebar/tools/ColorControl.cxx
+++ b/svx/source/sidebar/tools/ColorControl.cxx
@@ -68,7 +68,7 @@ namespace {
const SfxPoolItem* pItem = pDocSh->GetItem(SID_COLOR_TABLE);
if (pItem != NULL)
{
- XColorListRef xTable = ((SvxColorListItem*)pItem)->GetColorList();
+ XColorListRef xTable = static_cast<const SvxColorListItem*>(pItem)->GetColorList();
if (xTable.is())
return xTable;
}
diff --git a/svx/source/stbctrls/insctrl.cxx b/svx/source/stbctrls/insctrl.cxx
index 32f328e12792..4d477ec969b3 100644
--- a/svx/source/stbctrls/insctrl.cxx
+++ b/svx/source/stbctrls/insctrl.cxx
@@ -54,7 +54,7 @@ void SvxInsertStatusBarControl::StateChanged( sal_uInt16 , SfxItemState eState,
else
{
DBG_ASSERT( pState->ISA( SfxBoolItem ), "invalid item type" );
- SfxBoolItem* pItem = (SfxBoolItem*)pState;
+ const SfxBoolItem* pItem = static_cast<const SfxBoolItem*>(pState);
bInsert = pItem->GetValue();
if ( bInsert )
diff --git a/svx/source/stbctrls/modctrl.cxx b/svx/source/stbctrls/modctrl.cxx
index 8ee08e46e9d6..84da501f1a79 100644
--- a/svx/source/stbctrls/modctrl.cxx
+++ b/svx/source/stbctrls/modctrl.cxx
@@ -94,7 +94,7 @@ void SvxModifyControl::StateChanged( sal_uInt16, SfxItemState eState,
return;
DBG_ASSERT( pState->ISA( SfxBoolItem ), "invalid item type" );
- SfxBoolItem* pItem = (SfxBoolItem*)pState;
+ const SfxBoolItem* pItem = static_cast<const SfxBoolItem*>(pState);
mpImpl->maTimer.Stop();
bool modified = pItem->GetValue();
diff --git a/svx/source/stbctrls/pszctrl.cxx b/svx/source/stbctrls/pszctrl.cxx
index f99dc07411e1..ddb1f0998947 100644
--- a/svx/source/stbctrls/pszctrl.cxx
+++ b/svx/source/stbctrls/pszctrl.cxx
@@ -239,7 +239,7 @@ void SvxPosSizeStatusBarControl::StateChanged( sal_uInt16 nSID, SfxItemState eSt
{
pImp->bHasMenu = true;
if ( pState && pState->ISA(SfxUInt16Item) )
- pImp->nFunction = ((const SfxUInt16Item*)pState)->GetValue();
+ pImp->nFunction = static_cast<const SfxUInt16Item*>(pState)->GetValue();
}
else
pImp->bHasMenu = false;
@@ -263,21 +263,21 @@ void SvxPosSizeStatusBarControl::StateChanged( sal_uInt16 nSID, SfxItemState eSt
else if ( pState->ISA( SfxPointItem ) )
{
// show position
- pImp->aPos = ( (SfxPointItem*)pState )->GetValue();
+ pImp->aPos = static_cast<const SfxPointItem*>(pState)->GetValue();
pImp->bPos = true;
pImp->bTable = false;
}
else if ( pState->ISA( SvxSizeItem ) )
{
// show size
- pImp->aSize = ( (SvxSizeItem*)pState )->GetSize();
+ pImp->aSize = static_cast<const SvxSizeItem*>(pState)->GetSize();
pImp->bSize = true;
pImp->bTable = false;
}
else if ( pState->ISA( SfxStringItem ) )
{
// show string (table cel or different)
- pImp->aStr = ( (SfxStringItem*)pState )->GetValue();
+ pImp->aStr = static_cast<const SfxStringItem*>(pState)->GetValue();
pImp->bTable = true;
pImp->bPos = false;
pImp->bSize = false;
diff --git a/svx/source/stbctrls/selctrl.cxx b/svx/source/stbctrls/selctrl.cxx
index 878153efae97..14715a27451c 100644
--- a/svx/source/stbctrls/selctrl.cxx
+++ b/svx/source/stbctrls/selctrl.cxx
@@ -96,7 +96,7 @@ void SvxSelectionModeControl::StateChanged( sal_uInt16, SfxItemState eState,
if ( SfxItemState::DEFAULT == eState )
{
DBG_ASSERT( pState->ISA( SfxUInt16Item ), "invalid item type" );
- SfxUInt16Item* pItem = (SfxUInt16Item*)pState;
+ const SfxUInt16Item* pItem = static_cast<const SfxUInt16Item*>(pState);
mnState = pItem->GetValue();
SelectionTypePopup aPop( mnState );
diff --git a/svx/source/stbctrls/xmlsecctrl.cxx b/svx/source/stbctrls/xmlsecctrl.cxx
index cb6e953f52cb..4a83066f7f06 100644
--- a/svx/source/stbctrls/xmlsecctrl.cxx
+++ b/svx/source/stbctrls/xmlsecctrl.cxx
@@ -91,7 +91,7 @@ void XmlSecStatusBarControl::StateChanged( sal_uInt16, SfxItemState eState, cons
}
else if( pState->ISA( SfxUInt16Item ) )
{
- mpImpl->mnState = ( ( SfxUInt16Item* ) pState )->GetValue();
+ mpImpl->mnState = static_cast<const SfxUInt16Item*>(pState)->GetValue();
}
else
{
diff --git a/svx/source/stbctrls/zoomctrl.cxx b/svx/source/stbctrls/zoomctrl.cxx
index e333eadce0e7..01a69242eb81 100644
--- a/svx/source/stbctrls/zoomctrl.cxx
+++ b/svx/source/stbctrls/zoomctrl.cxx
@@ -115,7 +115,7 @@ void SvxZoomStatusBarControl::StateChanged( sal_uInt16, SfxItemState eState,
}
else if ( pState->ISA( SfxUInt16Item) )
{
- const SfxUInt16Item* pItem = (const SfxUInt16Item*)pState;
+ const SfxUInt16Item* pItem = static_cast<const SfxUInt16Item*>(pState);
nZoom = pItem->GetValue();
OUString aStr(unicode::formatPercent(nZoom, Application::GetSettings().GetUILanguageTag()));
@@ -123,7 +123,7 @@ void SvxZoomStatusBarControl::StateChanged( sal_uInt16, SfxItemState eState,
if ( pState->ISA(SvxZoomItem) )
{
- nValueSet = ((const SvxZoomItem*)pState)->GetValueSet();
+ nValueSet = static_cast<const SvxZoomItem*>(pState)->GetValueSet();
}
else
{
diff --git a/svx/source/table/tablertfexporter.cxx b/svx/source/table/tablertfexporter.cxx
index 7e38ffa5e79d..582cf9b6bcdf 100644
--- a/svx/source/table/tablertfexporter.cxx
+++ b/svx/source/table/tablertfexporter.cxx
@@ -203,9 +203,9 @@ void SdrTableRtfExporter::WriteCell( sal_Int32 nCol, sal_Int32 nRow )
const SfxItemSet& rCellSet = xCell->GetItemSet();
- const SvxWeightItem& rWeightItem = (const SvxWeightItem&) rCellSet.Get( EE_CHAR_WEIGHT );
- const SvxPostureItem& rPostureItem = (const SvxPostureItem&) rCellSet.Get( EE_CHAR_ITALIC );
- const SvxUnderlineItem& rUnderlineItem = (const SvxUnderlineItem&) rCellSet.Get( EE_CHAR_UNDERLINE );
+ const SvxWeightItem& rWeightItem = static_cast<const SvxWeightItem&> ( rCellSet.Get( EE_CHAR_WEIGHT ) );
+ const SvxPostureItem& rPostureItem = static_cast<const SvxPostureItem&> ( rCellSet.Get( EE_CHAR_ITALIC ) );
+ const SvxUnderlineItem& rUnderlineItem = static_cast<const SvxUnderlineItem&>( rCellSet.Get( EE_CHAR_UNDERLINE ) );
const sal_Char* pChar;
diff --git a/svx/source/table/tablertfimporter.cxx b/svx/source/table/tablertfimporter.cxx
index 69c9150e8239..fe7bf94abb25 100644
--- a/svx/source/table/tablertfimporter.cxx
+++ b/svx/source/table/tablertfimporter.cxx
@@ -174,7 +174,7 @@ IMPL_LINK( SdrTableRTFParser, RTFImportHdl, ImportInfo*, pInfo )
break;
case RTFIMP_START:
{
- SvxRTFParser* pParser = (SvxRTFParser*) pInfo->pParser;
+ SvxRTFParser* pParser = static_cast<SvxRTFParser*>(pInfo->pParser);
pParser->SetAttrPool( &mrItemPool );
RTFPardAttrMapIds& rMap = pParser->GetPardMap();
rMap.nBox = SDRATTR_TABLE_BORDER;
@@ -415,7 +415,7 @@ void SdrTableRTFParser::ProcToken( ImportInfo* pInfo )
// ((SvxRTFParser*)pInfo->pParser)->ReadBackgroundAttr(pInfo->nToken, mpInsDefault->maItemSet, sal_True );
break;
case RTF_BRDRDEF:
- ((SvxRTFParser*)pInfo->pParser)->ReadBorderAttr(pInfo->nToken, mpInsDefault->maItemSet, sal_True );
+ static_cast<SvxRTFParser*>(pInfo->pParser)->ReadBorderAttr(pInfo->nToken, mpInsDefault->maItemSet, sal_True );
break;
}
}
diff --git a/svx/source/tbxctrls/colrctrl.cxx b/svx/source/tbxctrls/colrctrl.cxx
index 6a19284d9166..4022c808fe73 100644
--- a/svx/source/tbxctrls/colrctrl.cxx
+++ b/svx/source/tbxctrls/colrctrl.cxx
@@ -223,7 +223,7 @@ SvxColorDockingWindow::SvxColorDockingWindow
const SfxPoolItem* pItem = pDocSh->GetItem( SID_COLOR_TABLE );
if( pItem )
{
- pColorList = ( (SvxColorListItem*) pItem )->GetColorList();
+ pColorList = static_cast<const SvxColorListItem*>(pItem)->GetColorList();
FillValueSet();
}
}
@@ -252,7 +252,7 @@ void SvxColorDockingWindow::Notify( SfxBroadcaster& , const SfxHint& rHint )
&& ( pPoolItemHint->GetObject()->ISA( SvxColorListItem ) ) )
{
// Die Liste der Farben hat sich geaendert
- pColorList = ( (SvxColorListItem*) pPoolItemHint->GetObject() )->GetColorList();
+ pColorList = static_cast<SvxColorListItem*>( pPoolItemHint->GetObject() )->GetColorList();
FillValueSet();
}
}
@@ -406,7 +406,7 @@ IMPL_LINK_NOARG(SvxColorDockingWindow, SelectHdl)
if ( aAttrSet.GetItemState( XATTR_LINESTYLE ) != SfxItemState::DONTCARE )
{
XLineStyle eXLS = (XLineStyle)
- ( (const XLineStyleItem&)aAttrSet.Get( XATTR_LINESTYLE ) ).GetValue();
+ static_cast<const XLineStyleItem&>(aAttrSet.Get( XATTR_LINESTYLE ) ).GetValue();
if ( eXLS == XLINE_NONE )
{
XLineStyleItem aXLineStyleItem( XLINE_SOLID );
diff --git a/svx/source/tbxctrls/grafctrl.cxx b/svx/source/tbxctrls/grafctrl.cxx
index fbbede43306e..e0da7a2c6f30 100644
--- a/svx/source/tbxctrls/grafctrl.cxx
+++ b/svx/source/tbxctrls/grafctrl.cxx
@@ -60,7 +60,7 @@ using namespace ::com::sun::star::lang;
#include <svx/svxdlg.hxx>
#define SYMBOL_TO_FIELD_OFFSET 4
-#define ITEMVALUE(ItemSet,Id,Cast) ((const Cast&)(ItemSet).Get(Id)).GetValue()
+#define ITEMVALUE(ItemSet,Id,Cast) static_cast<const Cast&>((ItemSet).Get(Id)).GetValue()
#define TOOLBOX_NAME OUString( "colorbar" )
TYPEINIT1_AUTOFACTORY( TbxImageItem, SfxUInt16Item );
@@ -78,7 +78,7 @@ SfxPoolItem* TbxImageItem::Clone( SfxItemPool* ) const
bool TbxImageItem::operator==( const SfxPoolItem& rItem ) const
{
- return( ( (TbxImageItem&) rItem ).GetValue() == GetValue() );
+ return static_cast<const TbxImageItem&>(rItem).GetValue() == GetValue();
}
class ImplGrafMetricField : public MetricField
@@ -190,11 +190,11 @@ void ImplGrafMetricField::Update( const SfxPoolItem* pItem )
long nValue;
if ( maCommand == ".uno:GrafTransparence" )
- nValue = ( (SfxUInt16Item*) pItem )->GetValue();
+ nValue = static_cast<const SfxUInt16Item*>( pItem )->GetValue();
else if ( maCommand == ".uno:GrafGamma" )
- nValue = ( (SfxUInt32Item*) pItem )->GetValue();
+ nValue = static_cast<const SfxUInt32Item*>( pItem )->GetValue();
else
- nValue = ( (SfxInt16Item*) pItem )->GetValue();
+ nValue = static_cast<const SfxInt16Item*>( pItem )->GetValue();
SetValue( nValue );
}
@@ -420,7 +420,7 @@ void ImplGrafModeControl::ImplReleaseFocus()
void ImplGrafModeControl::Update( const SfxPoolItem* pItem )
{
if( pItem )
- SelectEntryPos( ((SfxUInt16Item*)pItem)->GetValue() );
+ SelectEntryPos( static_cast<const SfxUInt16Item*>(pItem)->GetValue() );
else
SetNoSelection();
}
@@ -470,7 +470,7 @@ SvxGrafToolBoxControl::~SvxGrafToolBoxControl()
void SvxGrafToolBoxControl::StateChanged( sal_uInt16, SfxItemState eState, const SfxPoolItem* pState )
{
- ImplGrafControl* pCtrl = (ImplGrafControl*) GetToolBox().GetItemWindow( GetId() );
+ ImplGrafControl* pCtrl = static_cast<ImplGrafControl*>( GetToolBox().GetItemWindow( GetId() ) );
DBG_ASSERT( pCtrl, "Control not found" );
if( eState == SfxItemState::DISABLED )
@@ -557,7 +557,7 @@ SvxGrafModeToolBoxControl::~SvxGrafModeToolBoxControl()
void SvxGrafModeToolBoxControl::StateChanged( sal_uInt16, SfxItemState eState, const SfxPoolItem* pState )
{
- ImplGrafModeControl* pCtrl = (ImplGrafModeControl*) GetToolBox().GetItemWindow( GetId() );
+ ImplGrafModeControl* pCtrl = static_cast<ImplGrafModeControl*>( GetToolBox().GetItemWindow( GetId() ) );
DBG_ASSERT( pCtrl, "Control not found" );
if( eState == SfxItemState::DISABLED )
@@ -607,7 +607,7 @@ void SvxGrafAttrHelper::ExecuteGrafAttr( SfxRequest& rReq, SdrView& rView )
{
if( pItem )
{
- aSet.Put( SdrGrafRedItem( ((SfxInt16Item*)pItem)->GetValue() ));
+ aSet.Put( SdrGrafRedItem( static_cast<const SfxInt16Item*>(pItem)->GetValue() ));
if( bUndo )
aUndoStr += SVX_RESSTR( RID_SVXSTR_UNDO_GRAFRED );
}
@@ -618,7 +618,7 @@ void SvxGrafAttrHelper::ExecuteGrafAttr( SfxRequest& rReq, SdrView& rView )
{
if( pItem )
{
- aSet.Put( SdrGrafGreenItem( ((SfxInt16Item*)pItem)->GetValue() ));
+ aSet.Put( SdrGrafGreenItem( static_cast<const SfxInt16Item*>(pItem)->GetValue() ));
if( bUndo )
aUndoStr += SVX_RESSTR( RID_SVXSTR_UNDO_GRAFGREEN );
}
@@ -629,7 +629,7 @@ void SvxGrafAttrHelper::ExecuteGrafAttr( SfxRequest& rReq, SdrView& rView )
{
if( pItem )
{
- aSet.Put( SdrGrafBlueItem( ((SfxInt16Item*)pItem)->GetValue() ));
+ aSet.Put( SdrGrafBlueItem( static_cast<const SfxInt16Item*>(pItem)->GetValue() ));
if( bUndo )
aUndoStr += SVX_RESSTR( RID_SVXSTR_UNDO_GRAFBLUE );
}
@@ -640,7 +640,7 @@ void SvxGrafAttrHelper::ExecuteGrafAttr( SfxRequest& rReq, SdrView& rView )
{
if( pItem )
{
- aSet.Put( SdrGrafLuminanceItem( ((SfxInt16Item*)pItem)->GetValue() ));
+ aSet.Put( SdrGrafLuminanceItem( static_cast<const SfxInt16Item*>(pItem)->GetValue() ));
if( bUndo )
aUndoStr += SVX_RESSTR( RID_SVXSTR_UNDO_GRAFLUMINANCE );
}
@@ -651,7 +651,7 @@ void SvxGrafAttrHelper::ExecuteGrafAttr( SfxRequest& rReq, SdrView& rView )
{
if( pItem )
{
- aSet.Put( SdrGrafContrastItem( ((SfxInt16Item*)pItem)->GetValue() ));
+ aSet.Put( SdrGrafContrastItem( static_cast<const SfxInt16Item*>(pItem)->GetValue() ));
if( bUndo )
aUndoStr += SVX_RESSTR( RID_SVXSTR_UNDO_GRAFCONTRAST );
}
@@ -662,7 +662,7 @@ void SvxGrafAttrHelper::ExecuteGrafAttr( SfxRequest& rReq, SdrView& rView )
{
if( pItem )
{
- aSet.Put( SdrGrafGamma100Item( ((SfxUInt32Item*)pItem)->GetValue() ));
+ aSet.Put( SdrGrafGamma100Item( static_cast<const SfxUInt32Item*>(pItem)->GetValue() ));
if( bUndo )
aUndoStr += SVX_RESSTR( RID_SVXSTR_UNDO_GRAFGAMMA );
}
@@ -673,7 +673,7 @@ void SvxGrafAttrHelper::ExecuteGrafAttr( SfxRequest& rReq, SdrView& rView )
{
if( pItem )
{
- aSet.Put( SdrGrafTransparenceItem( ((SfxUInt16Item*)pItem)->GetValue() ));
+ aSet.Put( SdrGrafTransparenceItem( static_cast<const SfxUInt16Item*>(pItem)->GetValue() ));
if( bUndo )
aUndoStr += SVX_RESSTR( RID_SVXSTR_UNDO_GRAFTRANSPARENCY );
}
@@ -684,7 +684,7 @@ void SvxGrafAttrHelper::ExecuteGrafAttr( SfxRequest& rReq, SdrView& rView )
{
if( pItem )
{
- aSet.Put( SdrGrafModeItem( (GraphicDrawMode) ((SfxUInt16Item*)pItem)->GetValue() ));
+ aSet.Put( SdrGrafModeItem( (GraphicDrawMode) static_cast<const SfxUInt16Item*>(pItem)->GetValue() ));
if( bUndo )
aUndoStr += SVX_RESSTR( RID_SVXSTR_UNDO_GRAFMODE );
}
@@ -697,7 +697,7 @@ void SvxGrafAttrHelper::ExecuteGrafAttr( SfxRequest& rReq, SdrView& rView )
if( 0 < rMarkList.GetMarkCount() )
{
- SdrGrafObj* pObj = (SdrGrafObj*) rMarkList.GetMark( 0 )->GetMarkedSdrObj();
+ SdrGrafObj* pObj = static_cast<SdrGrafObj*>( rMarkList.GetMark( 0 )->GetMarkedSdrObj() );
if( pObj && pObj->ISA( SdrGrafObj ) &&
( pObj->GetGraphicType() != GRAPHIC_NONE ) &&
@@ -725,7 +725,7 @@ void SvxGrafAttrHelper::ExecuteGrafAttr( SfxRequest& rReq, SdrView& rView )
aCropDlgAttr.Put( SvxSizeItem( SID_ATTR_GRAF_FRMSIZE, OutputDevice::LogicToLogic(
pObj->GetLogicRect().GetSize(), aMap100, aMapTwip ) ) );
- const SdrGrafCropItem& rCrop = (const SdrGrafCropItem&) aGrfAttr.Get( SDRATTR_GRAFCROP );
+ const SdrGrafCropItem& rCrop = static_cast<const SdrGrafCropItem&>( aGrfAttr.Get( SDRATTR_GRAFCROP ) );
Size aLTSize( OutputDevice::LogicToLogic(
Size( rCrop.GetLeft(), rCrop.GetTop() ), aMap100, aMapTwip ) );
Size aRBSize( OutputDevice::LogicToLogic(
@@ -759,7 +759,7 @@ void SvxGrafAttrHelper::ExecuteGrafAttr( SfxRequest& rReq, SdrView& rView )
// set crop attributes
if( SfxItemState::SET <= pOutAttr->GetItemState( SDRATTR_GRAFCROP ) )
{
- const SdrGrafCropItem& rNewCrop = (const SdrGrafCropItem&) pOutAttr->Get( SDRATTR_GRAFCROP );
+ const SdrGrafCropItem& rNewCrop = static_cast<const SdrGrafCropItem&>( pOutAttr->Get( SDRATTR_GRAFCROP ) );
aLTSize = OutputDevice::LogicToLogic( Size( rNewCrop.GetLeft(), rNewCrop.GetTop() ), aMapTwip, aMap100 );
aRBSize = OutputDevice::LogicToLogic( Size( rNewCrop.GetRight(), rNewCrop.GetBottom() ), aMapTwip, aMap100 );
@@ -770,7 +770,7 @@ void SvxGrafAttrHelper::ExecuteGrafAttr( SfxRequest& rReq, SdrView& rView )
if( SfxItemState::SET <= pOutAttr->GetItemState( SID_ATTR_GRAF_FRMSIZE ) )
{
Point aNewOrigin( pObj->GetLogicRect().TopLeft() );
- const Size& rGrfSize = ( (const SvxSizeItem&) pOutAttr->Get( SID_ATTR_GRAF_FRMSIZE ) ).GetSize();
+ const Size& rGrfSize = static_cast<const SvxSizeItem&>( pOutAttr->Get( SID_ATTR_GRAF_FRMSIZE ) ).GetSize();
Size aNewGrfSize( OutputDevice::LogicToLogic( rGrfSize, aMapTwip, aMap100 ) );
Size aOldGrfSize( pObj->GetLogicRect().GetSize() );
diff --git a/svx/source/tbxctrls/itemwin.cxx b/svx/source/tbxctrls/itemwin.cxx
index f6541949abb8..e5a7fb50571c 100644
--- a/svx/source/tbxctrls/itemwin.cxx
+++ b/svx/source/tbxctrls/itemwin.cxx
@@ -119,7 +119,7 @@ void SvxLineBox::Select()
{
// LineDashItem will only be sent if it also has a dash.
// Notify cares!
- SvxDashListItem aItem( *(const SvxDashListItem*)(
+ SvxDashListItem aItem( *static_cast<const SvxDashListItem*>(
SfxObjectShell::Current()->GetItem( SID_DASH_LIST ) ) );
XLineDashItem aLineDashItem( GetSelectEntry(),
aItem.GetDashList()->GetDash( nPos - 2 )->GetDash() );
@@ -248,7 +248,7 @@ void SvxLineBox::FillControl()
if( mpSh )
{
- const SvxDashListItem* pItem = (const SvxDashListItem*)( mpSh->GetItem( SID_DASH_LIST ) );
+ const SvxDashListItem* pItem = static_cast<const SvxDashListItem*>( mpSh->GetItem( SID_DASH_LIST ) );
if ( pItem )
Fill( pItem->GetDashList() );
}
diff --git a/svx/source/tbxctrls/lboxctrl.cxx b/svx/source/tbxctrls/lboxctrl.cxx
index f6b1f7f7de31..66512d5352fb 100644
--- a/svx/source/tbxctrls/lboxctrl.cxx
+++ b/svx/source/tbxctrls/lboxctrl.cxx
@@ -248,7 +248,7 @@ void SvxUndoRedoControl::StateChanged(
}
else if ( pState && pState->ISA( SfxStringItem ) )
{
- SfxStringItem& rItem = *(SfxStringItem *)pState;
+ const SfxStringItem& rItem = *static_cast<const SfxStringItem *>(pState);
ToolBox& rBox = GetToolBox();
OUString aQuickHelpText = MnemonicGenerator::EraseAllMnemonicChars( rItem.GetValue() );
rBox.SetQuickHelpText( GetId(), aQuickHelpText );
@@ -261,7 +261,7 @@ void SvxUndoRedoControl::StateChanged(
if ( pState && pState->ISA( SfxStringListItem ) )
{
- SfxStringListItem &rItem = *(SfxStringListItem *)pState;
+ const SfxStringListItem &rItem = *static_cast<const SfxStringListItem *>(pState);
const std::vector<OUString> &aLst = rItem.GetList();
for( long nI = 0, nEnd = aLst.size(); nI < nEnd; ++nI )
diff --git a/svx/source/tbxctrls/linectrl.cxx b/svx/source/tbxctrls/linectrl.cxx
index 40dd2cdfc4b5..85ead36b464f 100644
--- a/svx/source/tbxctrls/linectrl.cxx
+++ b/svx/source/tbxctrls/linectrl.cxx
@@ -76,7 +76,7 @@ void SvxLineStyleToolBoxControl::StateChanged (
sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState )
{
- SvxLineBox* pBox = (SvxLineBox*)GetToolBox().GetItemWindow( GetId() );
+ SvxLineBox* pBox = static_cast<SvxLineBox*>( GetToolBox().GetItemWindow( GetId() ) );
DBG_ASSERT( pBox, "Window not found!" );
if( eState == SfxItemState::DISABLED )
@@ -93,12 +93,12 @@ void SvxLineStyleToolBoxControl::StateChanged (
if( nSID == SID_ATTR_LINE_STYLE )
{
delete pStyleItem;
- pStyleItem = (XLineStyleItem*)pState->Clone();
+ pStyleItem = static_cast<XLineStyleItem*>(pState->Clone());
}
else if( nSID == SID_ATTR_LINE_DASH )
{
delete pDashItem;
- pDashItem = (XLineDashItem*)pState->Clone();
+ pDashItem = static_cast<XLineDashItem*>(pState->Clone());
}
bUpdate = true;
@@ -120,7 +120,7 @@ void SvxLineStyleToolBoxControl::Update( const SfxPoolItem* pState )
{
bUpdate = false;
- SvxLineBox* pBox = (SvxLineBox*)GetToolBox().GetItemWindow( GetId() );
+ SvxLineBox* pBox = static_cast<SvxLineBox*>(GetToolBox().GetItemWindow( GetId() ));
DBG_ASSERT( pBox, "Window not found!" );
// Since the timer can strike unexpectedly, it may happen that
@@ -168,14 +168,14 @@ void SvxLineStyleToolBoxControl::Update( const SfxPoolItem* pState )
if ( pState && ( pState->ISA( SvxDashListItem ) ) )
{
// The list of line styles has changed
- SvxLineBox* pBox = (SvxLineBox*)GetToolBox().GetItemWindow( GetId() );
+ SvxLineBox* pBox = static_cast<SvxLineBox*>(GetToolBox().GetItemWindow( GetId() ));
DBG_ASSERT( pBox, "Window not found!" );
OUString aString( pBox->GetSelectEntry() );
pBox->Clear();
pBox->InsertEntry( SVX_RESSTR(RID_SVXSTR_INVISIBLE) );
pBox->InsertEntry( SVX_RESSTR(RID_SVXSTR_SOLID) );
- pBox->Fill( ((SvxDashListItem*)pState )->GetDashList() );
+ pBox->Fill( static_cast<const SvxDashListItem*>(pState)->GetDashList() );
pBox->SelectEntry( aString );
}
}
@@ -205,8 +205,8 @@ SvxLineWidthToolBoxControl::~SvxLineWidthToolBoxControl()
void SvxLineWidthToolBoxControl::StateChanged(
sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState )
{
- SvxMetricField* pFld = (SvxMetricField*)
- GetToolBox().GetItemWindow( GetId() );
+ SvxMetricField* pFld = static_cast<SvxMetricField*>(
+ GetToolBox().GetItemWindow( GetId() ));
DBG_ASSERT( pFld, "Window not found" );
if ( nSID == SID_ATTR_METRIC )
@@ -233,7 +233,7 @@ void SvxLineWidthToolBoxControl::StateChanged(
SfxMapUnit eUnit = SFX_MAPUNIT_100TH_MM; // CD!!! GetCoreMetric();
pFld->SetCoreUnit( eUnit );
- pFld->Update( (const XLineWidthItem*)pState );
+ pFld->Update( static_cast<const XLineWidthItem*>(pState) );
}
else
pFld->Update( NULL );
@@ -300,11 +300,11 @@ void SvxLineEndWindow::implInit()
{
pItem = pDocSh->GetItem( SID_LINEEND_LIST );
if( pItem )
- pLineEndList = ( (SvxLineEndListItem*) pItem )->GetLineEndList();
+ pLineEndList = static_cast<const SvxLineEndListItem*>( pItem )->GetLineEndList();
pItem = pDocSh->GetItem( SID_ATTR_LINEEND_WIDTH_DEFAULT );
if( pItem )
- nLineEndWidth = ( (SfxUInt16Item*) pItem )->GetValue();
+ nLineEndWidth = static_cast<const SfxUInt16Item*>( pItem )->GetValue();
}
DBG_ASSERT( pLineEndList.is(), "LineEndList not found" );
@@ -537,7 +537,7 @@ void SvxLineEndWindow::StateChanged(
// The list of line ends (LineEndList) has changed
if ( pState && pState->ISA( SvxLineEndListItem ))
{
- pLineEndList = ((SvxLineEndListItem*)pState)->GetLineEndList();
+ pLineEndList = static_cast<const SvxLineEndListItem*>(pState)->GetLineEndList();
DBG_ASSERT( pLineEndList.is(), "LineEndList not found" );
aLineEndSet.Clear();
diff --git a/svx/source/tbxctrls/tbunosearchcontrollers.cxx b/svx/source/tbxctrls/tbunosearchcontrollers.cxx
index d595b3c45a52..e95d68a5ef8d 100644
--- a/svx/source/tbxctrls/tbunosearchcontrollers.cxx
+++ b/svx/source/tbxctrls/tbunosearchcontrollers.cxx
@@ -91,7 +91,7 @@ void impl_executeSearch( const css::uno::Reference< css::uno::XComponentContext
sFindText = pItemWin->GetText();
} else if ( sItemCommand == COMMAND_MATCHCASE )
{
- CheckBox* pItemWin = (CheckBox*) pToolBox->GetItemWindow(i);
+ CheckBox* pItemWin = static_cast<CheckBox*>( pToolBox->GetItemWindow(i) );
if (pItemWin)
aMatchCase = pItemWin->IsChecked();
}
@@ -234,7 +234,7 @@ bool FindTextFieldControl::PreNotify( NotifyEvent& rNEvt )
Remember_Impl(GetText());
vcl::Window* pWindow = GetParent();
- ToolBox* pToolBox = (ToolBox*)pWindow;
+ ToolBox* pToolBox = static_cast<ToolBox*>(pWindow);
impl_executeSearch( m_xContext, m_xFrame, pToolBox, bShift);
nRet = true;
@@ -423,7 +423,7 @@ void SAL_CALL FindTextToolbarController::initialize( const css::uno::Sequence< :
svt::ToolboxController::initialize(aArguments);
vcl::Window* pWindow = VCLUnoHelper::GetWindow( getParent() );
- ToolBox* pToolBox = (ToolBox*)pWindow;
+ ToolBox* pToolBox = static_cast<ToolBox*>(pWindow);
if ( pToolBox )
{
sal_uInt16 nItemCount = pToolBox->GetItemCount();
@@ -454,7 +454,7 @@ css::uno::Reference< css::awt::XWindow > SAL_CALL FindTextToolbarController::cre
vcl::Window* pParent = VCLUnoHelper::GetWindow( xParent );
if ( pParent )
{
- ToolBox* pToolbar = ( ToolBox* )pParent;
+ ToolBox* pToolbar = static_cast<ToolBox*>(pParent);
m_pFindTextFieldControl = new FindTextFieldControl( pToolbar, WinBits( WB_DROPDOWN | WB_VSCROLL), m_xFrame, m_xContext );
Size aSize(250, m_pFindTextFieldControl->GetTextHeight() + 200);
@@ -485,7 +485,7 @@ IMPL_LINK_NOARG(FindTextToolbarController, EditModifyHdl)
{
// enable or disable item DownSearch/UpSearch of findbar
vcl::Window* pWindow = VCLUnoHelper::GetWindow( getParent() );
- ToolBox* pToolBox = (ToolBox*)pWindow;
+ ToolBox* pToolBox = static_cast<ToolBox*>(pWindow);
if ( pToolBox && m_pFindTextFieldControl )
{
if (!m_pFindTextFieldControl->GetText().isEmpty())
@@ -583,7 +583,7 @@ void SAL_CALL UpDownSearchToolboxController::execute( sal_Int16 /*KeyModifier*/
throw css::lang::DisposedException();
vcl::Window* pWindow = VCLUnoHelper::GetWindow( getParent() );
- ToolBox* pToolBox = (ToolBox*)pWindow;
+ ToolBox* pToolBox = static_cast<ToolBox*>(pWindow);
impl_executeSearch(m_xContext, m_xFrame, pToolBox, meType == UP );
@@ -678,7 +678,7 @@ css::uno::Reference< css::awt::XWindow > SAL_CALL MatchCaseToolboxController::cr
vcl::Window* pParent = VCLUnoHelper::GetWindow( xParent );
if ( pParent )
{
- ToolBox* pToolbar = (ToolBox* )pParent;
+ ToolBox* pToolbar = static_cast<ToolBox*>(pParent);
m_pMatchCaseControl = new CheckBox( pToolbar, 0 );
m_pMatchCaseControl->SetText( SVX_RESSTR( RID_SVXSTR_FINDBAR_MATCHCASE ) );
Size aSize( m_pMatchCaseControl->GetOptimalSize() );
@@ -768,7 +768,7 @@ void SAL_CALL FindAllToolboxController::execute( sal_Int16 /*KeyModifier*/ ) thr
throw css::lang::DisposedException();
vcl::Window* pWindow = VCLUnoHelper::GetWindow( getParent() );
- ToolBox* pToolBox = (ToolBox*)pWindow;
+ ToolBox* pToolBox = static_cast<ToolBox*>(pWindow);
impl_executeSearch(m_xContext, m_xFrame, pToolBox, false, true);
}
@@ -1064,7 +1064,7 @@ void SAL_CALL FindbarDispatcher::dispatch( const css::util::URL& aURL, const css
css::uno::Reference< css::awt::XWindow > xWindow(xUIElement->getRealInterface(), css::uno::UNO_QUERY);
vcl::Window* pWindow = VCLUnoHelper::GetWindow( xWindow );
- ToolBox* pToolBox = (ToolBox*)pWindow;
+ ToolBox* pToolBox = static_cast<ToolBox*>(pWindow);
if ( pToolBox )
{
sal_uInt16 nItemCount = pToolBox->GetItemCount();
diff --git a/svx/source/unodraw/UnoNamespaceMap.cxx b/svx/source/unodraw/UnoNamespaceMap.cxx
index a0486428aeb2..a3b135350db5 100644
--- a/svx/source/unodraw/UnoNamespaceMap.cxx
+++ b/svx/source/unodraw/UnoNamespaceMap.cxx
@@ -170,7 +170,7 @@ bool NamespaceIteratorImpl::next( OUString& rPrefix, OUString& rURL )
mnItem++;
// get that item and see if there namespaces inside
- const SvXMLAttrContainerItem *pUnknown = (const SvXMLAttrContainerItem *)pItem;
+ const SvXMLAttrContainerItem *pUnknown = static_cast<const SvXMLAttrContainerItem *>(pItem);
if( (pUnknown->GetAttrCount() > 0) )
{
mpCurrentAttr = pUnknown;
diff --git a/svx/source/unodraw/unopool.cxx b/svx/source/unodraw/unopool.cxx
index 9afeabb6b69a..3fa5535e97ce 100644
--- a/svx/source/unodraw/unopool.cxx
+++ b/svx/source/unodraw/unopool.cxx
@@ -100,8 +100,8 @@ void SvxUnoDrawPool::getAny( SfxItemPool* pPool, const comphelper::PropertyMapEn
{
case OWN_ATTR_FILLBMP_MODE:
{
- XFillBmpStretchItem* pStretchItem = (XFillBmpStretchItem*)&pPool->GetDefaultItem(XATTR_FILLBMP_STRETCH);
- XFillBmpTileItem* pTileItem = (XFillBmpTileItem*)&pPool->GetDefaultItem(XATTR_FILLBMP_TILE);
+ const XFillBmpStretchItem* pStretchItem = static_cast<const XFillBmpStretchItem*>(&pPool->GetDefaultItem(XATTR_FILLBMP_STRETCH));
+ const XFillBmpTileItem* pTileItem = static_cast<const XFillBmpTileItem*>(&pPool->GetDefaultItem(XATTR_FILLBMP_TILE));
if( pTileItem && pTileItem->GetValue() )
{
rValue <<= drawing::BitmapMode_REPEAT;