summaryrefslogtreecommitdiff
path: root/sc/source/ui/view/formatsh.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sc/source/ui/view/formatsh.cxx')
-rw-r--r--sc/source/ui/view/formatsh.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/sc/source/ui/view/formatsh.cxx b/sc/source/ui/view/formatsh.cxx
index ccd622d709da..aab5d7c962eb 100644
--- a/sc/source/ui/view/formatsh.cxx
+++ b/sc/source/ui/view/formatsh.cxx
@@ -456,7 +456,7 @@ void ScFormatShell::ExecuteStyle( SfxRequest& rReq )
if ( SfxItemState::SET ==
pArgs->GetItemState( nSlotId, true, &pItem ) )
{
- const SfxStringItem* pStrItem = PTR_CAST(SfxStringItem,pItem);
+ const SfxStringItem* pStrItem = dynamic_cast< const SfxStringItem *>( pItem );
if ( pStrItem )
{
aStyleName = pStrItem->GetValue();
@@ -1419,12 +1419,12 @@ void ScFormatShell::ExecuteTextAttr( SfxRequest& rReq )
{
const SfxPoolItem& rUnderline = pSet->Get( ATTR_FONT_UNDERLINE );
- if( rUnderline.ISA(SvxUnderlineItem) )
+ if( dynamic_cast<const SvxUnderlineItem*>( &rUnderline) != nullptr )
{
pTabViewShell->ApplyAttr( rUnderline );
pNewSet->Put( rUnderline,rUnderline.Which() );
}
- else if ( rUnderline.ISA(SvxTextLineItem) )
+ else if ( dynamic_cast<const SvxTextLineItem*>( &rUnderline) != nullptr )
{
// #i106580# also allow SvxTextLineItem (base class of SvxUnderlineItem)
const SvxTextLineItem& rTextLineItem = static_cast<const SvxTextLineItem&>(rUnderline);