diff options
Diffstat (limited to 'sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx')
-rw-r--r-- | sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx b/sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx index 99f26ebd23c2..a2b4f6c8d20a 100644 --- a/sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx +++ b/sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx @@ -772,9 +772,9 @@ bool SwSpellDialogChildWindow::FindNextDrawTextError_Impl(SwWrtShell& rSh) aTmpOutliner.SetPaperSize( pTextObj->GetLogicRect().GetSize() ); aTmpOutliner.SetSpeller( xSpell ); - OutlinerView* pOutlView = new OutlinerView( &aTmpOutliner, &(rView.GetEditWin()) ); + std::unique_ptr<OutlinerView> pOutlView( new OutlinerView( &aTmpOutliner, &(rView.GetEditWin()) ) ); pOutlView->GetOutliner()->SetRefDevice( rSh.getIDocumentDeviceAccess().getPrinter( false ) ); - aTmpOutliner.InsertView( pOutlView ); + aTmpOutliner.InsertView( pOutlView.get() ); Point aPt; Size aSize(1,1); Rectangle aRect( aPt, aSize ); @@ -782,8 +782,7 @@ bool SwSpellDialogChildWindow::FindNextDrawTextError_Impl(SwWrtShell& rSh) aTmpOutliner.SetText( *pParaObj ); aTmpOutliner.ClearModifyFlag(); bHasSpellError = EE_SPELL_OK != aTmpOutliner.HasSpellErrors(); - aTmpOutliner.RemoveView( pOutlView ); - delete pOutlView; + aTmpOutliner.RemoveView( pOutlView.get() ); } if(bHasSpellError) { |