summaryrefslogtreecommitdiff
path: root/sw/source/ui/fmtui/tmpdlg.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/ui/fmtui/tmpdlg.cxx')
-rw-r--r--sw/source/ui/fmtui/tmpdlg.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/sw/source/ui/fmtui/tmpdlg.cxx b/sw/source/ui/fmtui/tmpdlg.cxx
index d344cd8ca3b5..5463e135a3f8 100644
--- a/sw/source/ui/fmtui/tmpdlg.cxx
+++ b/sw/source/ui/fmtui/tmpdlg.cxx
@@ -538,14 +538,14 @@ void SwTemplateDlg::PageCreated( sal_uInt16 nId, SfxTabPage &rPage )
aList.push_back( rCharFormatLB->GetEntry(j) );
aSet.Put( SfxStringListItem( SID_CHAR_FMT_LIST_BOX,&aList ) ) ;
- FieldUnit eMetric = ::GetDfltMetric(pDocShell->ISA(SwWebDocShell));
+ FieldUnit eMetric = ::GetDfltMetric(dynamic_cast< const SwWebDocShell *>( pDocShell ) != nullptr);
aSet.Put ( SfxAllEnumItem(SID_METRIC_ITEM, static_cast< sal_uInt16 >(eMetric)));
rPage.PageCreated(aSet);
}
else if (nId == m_nNumPosId)
{
SwDocShell* pDocShell = ::GetActiveWrtShell()->GetView().GetDocShell();
- FieldUnit eMetric = ::GetDfltMetric(0 != PTR_CAST(SwWebDocShell, pDocShell));
+ FieldUnit eMetric = ::GetDfltMetric(dynamic_cast<SwWebDocShell*>( pDocShell) != nullptr );
aSet.Put ( SfxAllEnumItem(SID_METRIC_ITEM, static_cast< sal_uInt16 >(eMetric)));
rPage.PageCreated(aSet);