summaryrefslogtreecommitdiff
path: root/svx/source/tbxctrls
diff options
context:
space:
mode:
authorOliver Specht <oliver.specht@cib.de>2015-09-29 15:35:28 +0200
committerOliver Specht <oliver.specht@cib.de>2015-10-01 08:32:26 +0000
commit85f93697defd9a812a0cda0bc4e9364e28c0339e (patch)
tree0c43827cda0e18b03c3d28599b696bcab3a8069a /svx/source/tbxctrls
parentc1e0a697a70872ef1b6deaf5222538899554221b (diff)
tdf#94559: third step to remove rtti.hxx
replaced use of PTR_CAST, IS_TYPE, ISA in oox, reportdesign, svl, svtools, svx, tools Change-Id: I1f85ff92267a0668eba625fa61b4f07feb8f3d4e Reviewed-on: https://gerrit.libreoffice.org/19002 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Oliver Specht <oliver.specht@cib.de>
Diffstat (limited to 'svx/source/tbxctrls')
-rw-r--r--svx/source/tbxctrls/colrctrl.cxx2
-rw-r--r--svx/source/tbxctrls/grafctrl.cxx2
-rw-r--r--svx/source/tbxctrls/layctrl.cxx2
-rw-r--r--svx/source/tbxctrls/lboxctrl.cxx4
-rw-r--r--svx/source/tbxctrls/linectrl.cxx6
-rw-r--r--svx/source/tbxctrls/tbcontrl.cxx24
6 files changed, 20 insertions, 20 deletions
diff --git a/svx/source/tbxctrls/colrctrl.cxx b/svx/source/tbxctrls/colrctrl.cxx
index 16756ad67021..65aad3fe12c9 100644
--- a/svx/source/tbxctrls/colrctrl.cxx
+++ b/svx/source/tbxctrls/colrctrl.cxx
@@ -255,7 +255,7 @@ void SvxColorDockingWindow::Notify( SfxBroadcaster& , const SfxHint& rHint )
{
const SfxPoolItemHint* pPoolItemHint = dynamic_cast<const SfxPoolItemHint*>(&rHint);
if ( pPoolItemHint
- && ( pPoolItemHint->GetObject()->ISA( SvxColorListItem ) ) )
+ && ( dynamic_cast<const SvxColorListItem*>(pPoolItemHint->GetObject()) != nullptr ) )
{
// Die Liste der Farben hat sich geaendert
pColorList = static_cast<SvxColorListItem*>( pPoolItemHint->GetObject() )->GetColorList();
diff --git a/svx/source/tbxctrls/grafctrl.cxx b/svx/source/tbxctrls/grafctrl.cxx
index 4c157868cda7..22bd35f338ae 100644
--- a/svx/source/tbxctrls/grafctrl.cxx
+++ b/svx/source/tbxctrls/grafctrl.cxx
@@ -666,7 +666,7 @@ void SvxGrafAttrHelper::ExecuteGrafAttr( SfxRequest& rReq, SdrView& rView )
{
SdrGrafObj* pObj = static_cast<SdrGrafObj*>( rMarkList.GetMark( 0 )->GetMarkedSdrObj() );
- if( pObj && pObj->ISA( SdrGrafObj ) &&
+ if( pObj && dynamic_cast<const SdrGrafObj*>( pObj) != nullptr &&
( pObj->GetGraphicType() != GRAPHIC_NONE ) &&
( pObj->GetGraphicType() != GRAPHIC_DEFAULT ) )
{
diff --git a/svx/source/tbxctrls/layctrl.cxx b/svx/source/tbxctrls/layctrl.cxx
index bfa401734dd8..a557ac8b1ed9 100644
--- a/svx/source/tbxctrls/layctrl.cxx
+++ b/svx/source/tbxctrls/layctrl.cxx
@@ -725,7 +725,7 @@ VclPtr<SfxPopupWindow> SvxTableToolBoxControl::CreatePopupWindow()
void SvxTableToolBoxControl::StateChanged( sal_uInt16, SfxItemState eState, const SfxPoolItem* pState )
{
- if ( pState && pState->ISA(SfxUInt16Item) )
+ if ( pState && dynamic_cast<const SfxUInt16Item* >(pState) != nullptr )
{
sal_Int16 nValue = static_cast< const SfxUInt16Item* >( pState )->GetValue();
bEnabled = ( nValue != 0 );
diff --git a/svx/source/tbxctrls/lboxctrl.cxx b/svx/source/tbxctrls/lboxctrl.cxx
index 53ac64e6950b..8b0159bce12f 100644
--- a/svx/source/tbxctrls/lboxctrl.cxx
+++ b/svx/source/tbxctrls/lboxctrl.cxx
@@ -242,7 +242,7 @@ void SvxUndoRedoControl::StateChanged(
ToolBox& rBox = GetToolBox();
rBox.SetQuickHelpText( GetId(), aDefaultText );
}
- else if ( pState && pState->ISA( SfxStringItem ) )
+ else if ( pState && dynamic_cast<const SfxStringItem*>( pState) != nullptr )
{
const SfxStringItem& rItem = *static_cast<const SfxStringItem *>(pState);
ToolBox& rBox = GetToolBox();
@@ -255,7 +255,7 @@ void SvxUndoRedoControl::StateChanged(
{
aUndoRedoList.clear();
- if ( pState && pState->ISA( SfxStringListItem ) )
+ if ( pState && dynamic_cast<const SfxStringListItem*>( pState) != nullptr )
{
const SfxStringListItem &rItem = *static_cast<const SfxStringListItem *>(pState);
diff --git a/svx/source/tbxctrls/linectrl.cxx b/svx/source/tbxctrls/linectrl.cxx
index bbaec33c5a38..56c80ee2133a 100644
--- a/svx/source/tbxctrls/linectrl.cxx
+++ b/svx/source/tbxctrls/linectrl.cxx
@@ -166,7 +166,7 @@ void SvxLineStyleToolBoxControl::Update( const SfxPoolItem* pState )
}
}
- if ( pState && ( pState->ISA( SvxDashListItem ) ) )
+ if ( pState && ( dynamic_cast<const SvxDashListItem*>( pState) != nullptr ) )
{
// The list of line styles has changed
SvxLineBox* pBox = static_cast<SvxLineBox*>(GetToolBox().GetItemWindow( GetId() ));
@@ -227,7 +227,7 @@ void SvxLineWidthToolBoxControl::StateChanged(
if ( eState == SfxItemState::DEFAULT )
{
- DBG_ASSERT( pState->ISA(XLineWidthItem), "wrong ItemType" );
+ DBG_ASSERT( dynamic_cast<const XLineWidthItem*>( pState) != nullptr, "wrong ItemType" );
// Core-Unit handed over to MetricField
// Should not happen in CreateItemWin ()!
@@ -531,7 +531,7 @@ void SvxLineEndWindow::StateChanged(
if ( nSID == SID_LINEEND_LIST )
{
// The list of line ends (LineEndList) has changed
- if ( pState && pState->ISA( SvxLineEndListItem ))
+ if ( pState && dynamic_cast<const SvxLineEndListItem*>( pState) != nullptr)
{
pLineEndList = static_cast<const SvxLineEndListItem*>(pState)->GetLineEndList();
DBG_ASSERT( pLineEndList.is(), "LineEndList not found" );
diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx
index 11fde489fb97..5a60b1c9ecfb 100644
--- a/svx/source/tbxctrls/tbcontrl.cxx
+++ b/svx/source/tbxctrls/tbcontrl.cxx
@@ -1458,13 +1458,13 @@ void SvxColorWindow_Impl::StateChanged( sal_uInt16 nSID, SfxItemState eState, co
}
else if ( SfxItemState::DEFAULT <= eState && pState )
{
- if ( pState->ISA( SvxColorItem ) )
+ if ( dynamic_cast<const SvxColorItem*>( pState) != nullptr )
aColor = static_cast<const SvxColorItem*>(pState)->GetValue();
- else if ( pState->ISA( XLineColorItem ) )
+ else if ( dynamic_cast<const XLineColorItem*>( pState) != nullptr )
aColor = static_cast<const XLineColorItem*>(pState)->GetColorValue();
- else if ( pState->ISA( XFillColorItem ) )
+ else if ( dynamic_cast<const XFillColorItem*>( pState) != nullptr )
aColor = static_cast<const XFillColorItem*>(pState)->GetColorValue();
- else if ( pState->ISA( SvxBackgroundColorItem ) )
+ else if ( dynamic_cast<const SvxBackgroundColorItem*>( pState) != nullptr )
aColor = static_cast<const SvxBackgroundColorItem*>(pState)->GetValue();
}
@@ -1498,11 +1498,11 @@ void BorderColorStatus::StateChanged( sal_uInt16 nSID, SfxItemState eState, cons
{
if ( SfxItemState::DEFAULT <= eState && pState )
{
- if ( nSID == SID_FRAME_LINECOLOR && pState->ISA( SvxColorItem ) )
+ if ( nSID == SID_FRAME_LINECOLOR && dynamic_cast<const SvxColorItem*>( pState) != nullptr )
{
maColor = static_cast< const SvxColorItem* >(pState)->GetValue();
}
- else if ( pState->ISA( SvxLineItem ) )
+ else if ( dynamic_cast<const SvxLineItem*>( pState) != nullptr )
{
const SvxBorderLine* pLine = static_cast< const SvxLineItem* >(pState)->GetLine();
Color aColor ( COL_TRANSPARENT );
@@ -1786,7 +1786,7 @@ void SvxFrameWindow_Impl::StateChanged(
{
if ( pState && nSID == SID_BORDER_REDUCED_MODE)
{
- const SfxBoolItem* pItem = PTR_CAST( SfxBoolItem, pState );
+ const SfxBoolItem* pItem = dynamic_cast<const SfxBoolItem*>( pState );
if ( pItem )
{
@@ -1979,7 +1979,7 @@ void SfxStyleControllerItem_Impl::StateChanged(
if ( SfxItemState::DEFAULT == eState )
{
const SfxTemplateItem* pStateItem =
- PTR_CAST( SfxTemplateItem, pState );
+ dynamic_cast<const SfxTemplateItem*>( pState );
DBG_ASSERT( pStateItem != NULL, "SfxTemplateItem expected" );
rControl.SetFamilyState( nIdx, pStateItem );
}
@@ -2694,11 +2694,11 @@ void SvxColorToolBoxControl::StateChanged(
}
else if ( SfxItemState::DEFAULT <= eState && pState )
{
- if ( pState->ISA( SvxColorItem ) )
+ if ( dynamic_cast<const SvxColorItem*>( pState) != nullptr )
aColor = static_cast< const SvxColorItem* >(pState)->GetValue();
- else if ( pState->ISA( XLineColorItem ) )
+ else if ( dynamic_cast<const XLineColorItem*>( pState) != nullptr )
aColor = static_cast< const XLineColorItem* >(pState)->GetColorValue();
- else if ( pState->ISA( XFillColorItem ) )
+ else if ( dynamic_cast<const XFillColorItem*>( pState) != nullptr )
aColor = static_cast< const XFillColorItem* >(pState)->GetColorValue();
}
m_xBtnUpdater->Update( aColor );
@@ -2895,7 +2895,7 @@ SvxSimpleUndoRedoController::~SvxSimpleUndoRedoController()
void SvxSimpleUndoRedoController::StateChanged( sal_uInt16, SfxItemState eState, const SfxPoolItem* pState )
{
- const SfxStringItem* pItem = PTR_CAST( SfxStringItem, pState );
+ const SfxStringItem* pItem = dynamic_cast<const SfxStringItem*>( pState );
ToolBox& rBox = GetToolBox();
if ( pItem && eState != SfxItemState::DISABLED )
{