diff options
Diffstat (limited to 'sw/source/uibase/uiview/srcview.cxx')
-rw-r--r-- | sw/source/uibase/uiview/srcview.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sw/source/uibase/uiview/srcview.cxx b/sw/source/uibase/uiview/srcview.cxx index c928c89e9213..784f6331f1ea 100644 --- a/sw/source/uibase/uiview/srcview.cxx +++ b/sw/source/uibase/uiview/srcview.cxx @@ -229,7 +229,7 @@ SwSrcView::SwSrcView(SfxViewFrame* pViewFrame, SfxViewShell*) : SwSrcView::~SwSrcView() { SwDocShell* pDocShell = GetDocShell(); - OSL_ENSURE(PTR_CAST(SwWebDocShell, pDocShell), "Why no WebDocShell?"); + OSL_ENSURE(dynamic_cast<SwWebDocShell*>( pDocShell), "Why no WebDocShell?" ); const TextSelection& rSel = aEditWin->GetTextView()->GetSelection(); static_cast<SwWebDocShell*>(pDocShell)->SetSourcePara( static_cast< sal_uInt16 >( rSel.GetStart().GetPara() ) ); @@ -276,7 +276,7 @@ void SwSrcView::Init() SwDocShell* SwSrcView::GetDocShell() { SfxObjectShell* pObjShell = GetViewFrame()->GetObjectShell(); - return PTR_CAST(SwDocShell, pObjShell); + return dynamic_cast<SwDocShell*>( pObjShell ); } void SwSrcView::SaveContent(const OUString& rTmpFile) @@ -871,7 +871,7 @@ void SwSrcView::Load(SwDocShell* pDocShell) pDocShell->SetModified();// The flag will be reset in between times. // Disable AutoLoad pDocShell->SetAutoLoad(INetURLObject(), 0, false); - OSL_ENSURE(PTR_CAST(SwWebDocShell, pDocShell), "Why no WebDocShell?"); + OSL_ENSURE(dynamic_cast<SwWebDocShell*>( pDocShell), "Why no WebDocShell?" ); sal_uInt16 nLine = static_cast<SwWebDocShell*>(pDocShell)->GetSourcePara(); aEditWin->SetStartLine(nLine); aEditWin->GetTextEngine()->ResetUndo(); |