diff options
Diffstat (limited to 'sw/source/uibase/shells/drwtxtsh.cxx')
-rw-r--r-- | sw/source/uibase/shells/drwtxtsh.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sw/source/uibase/shells/drwtxtsh.cxx b/sw/source/uibase/shells/drwtxtsh.cxx index df42de322d73..f42477ab59de 100644 --- a/sw/source/uibase/shells/drwtxtsh.cxx +++ b/sw/source/uibase/shells/drwtxtsh.cxx @@ -182,7 +182,7 @@ bool SwDrawTextShell::IsTextEdit() void SwDrawTextShell::ExecFontWork(SfxRequest& rReq) { SwWrtShell &rSh = GetShell(); - FieldUnit eMetric = ::GetDfltMetric(0 != PTR_CAST(SwWebView, &rSh.GetView())); + FieldUnit eMetric = ::GetDfltMetric( dynamic_cast<SwWebView*>( &rSh.GetView()) != nullptr ); SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, static_cast< sal_uInt16 >(eMetric)) ); SfxViewFrame* pVFrame = GetView().GetViewFrame(); if ( rReq.GetArgs() ) @@ -706,7 +706,7 @@ void SwDrawTextShell::InsertSymbol(SfxRequest& rReq) sSym = static_cast<const SfxStringItem*>(pItem)->GetValue(); const SfxPoolItem* pFtItem = NULL; pArgs->GetItemState( GetPool().GetWhich(SID_ATTR_SPECIALCHAR), false, &pFtItem); - const SfxStringItem* pFontItem = PTR_CAST( SfxStringItem, pFtItem ); + const SfxStringItem* pFontItem = dynamic_cast<const SfxStringItem*>( pFtItem ); if ( pFontItem ) sFontName = pFontItem->GetValue(); } |