Kaydet (Commit) df0175c7 authored tarafından Noel Grandin's avatar Noel Grandin

loplugin:useuniqueptr in SdrHHCWrapper

Change-Id: I1695dcf5af4f51e118b0286229e00896b09ec0bd
Reviewed-on: https://gerrit.libreoffice.org/57941
Tested-by: Jenkins
Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst f154ed6d
......@@ -72,13 +72,13 @@ SdrHHCWrapper::SdrHHCWrapper( SwView* pVw,
Size aSize( 1, 1 );
SetPaperSize( aSize );
pOutlView = new OutlinerView( this, &(pView->GetEditWin()) );
pOutlView.reset( new OutlinerView( this, &(pView->GetEditWin()) ) );
pOutlView->GetOutliner()->SetRefDevice(pView->GetWrtShell().getIDocumentDeviceAccess().getPrinter( false ));
// Hack: all SdrTextObj attributes should be transferred to EditEngine
pOutlView->SetBackgroundColor( COL_WHITE );
InsertView( pOutlView );
InsertView( pOutlView.get() );
Point aPoint( 0, 0 );
tools::Rectangle aRect( aPoint, aSize );
pOutlView->SetOutputArea( aRect );
......@@ -96,8 +96,8 @@ SdrHHCWrapper::~SdrHHCWrapper()
SetUpdateMode(false);
pOutlView->SetOutputArea( tools::Rectangle( Point(), Size(1, 1) ) );
}
RemoveView( pOutlView );
delete pOutlView;
RemoveView( pOutlView.get() );
pOutlView.reset();
}
void SdrHHCWrapper::StartTextConversion()
......@@ -156,7 +156,7 @@ bool SdrHHCWrapper::ConvertNextDocument()
SetUpdateMode(true);
pView->GetWrtShell().MakeVisible(pTextObj->GetLogicRect());
pSdrView->SdrBeginTextEdit(pTextObj, pPV, &pView->GetEditWin(), false, this, pOutlView, true, true);
pSdrView->SdrBeginTextEdit(pTextObj, pPV, &pView->GetEditWin(), false, this, pOutlView.get(), true, true);
}
else
SetUpdateMode(false);
......
......@@ -31,7 +31,7 @@ class SdrHHCWrapper : public SdrOutliner
SwView* pView;
SdrTextObj* pTextObj;
OutlinerView* pOutlView;
std::unique_ptr<OutlinerView> pOutlView;
sal_Int32 nOptions;
sal_uInt16 nDocIndex;
LanguageType nSourceLang;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment