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, ...@@ -72,13 +72,13 @@ SdrHHCWrapper::SdrHHCWrapper( SwView* pVw,
Size aSize( 1, 1 ); Size aSize( 1, 1 );
SetPaperSize( aSize ); SetPaperSize( aSize );
pOutlView = new OutlinerView( this, &(pView->GetEditWin()) ); pOutlView.reset( new OutlinerView( this, &(pView->GetEditWin()) ) );
pOutlView->GetOutliner()->SetRefDevice(pView->GetWrtShell().getIDocumentDeviceAccess().getPrinter( false )); pOutlView->GetOutliner()->SetRefDevice(pView->GetWrtShell().getIDocumentDeviceAccess().getPrinter( false ));
// Hack: all SdrTextObj attributes should be transferred to EditEngine // Hack: all SdrTextObj attributes should be transferred to EditEngine
pOutlView->SetBackgroundColor( COL_WHITE ); pOutlView->SetBackgroundColor( COL_WHITE );
InsertView( pOutlView ); InsertView( pOutlView.get() );
Point aPoint( 0, 0 ); Point aPoint( 0, 0 );
tools::Rectangle aRect( aPoint, aSize ); tools::Rectangle aRect( aPoint, aSize );
pOutlView->SetOutputArea( aRect ); pOutlView->SetOutputArea( aRect );
...@@ -96,8 +96,8 @@ SdrHHCWrapper::~SdrHHCWrapper() ...@@ -96,8 +96,8 @@ SdrHHCWrapper::~SdrHHCWrapper()
SetUpdateMode(false); SetUpdateMode(false);
pOutlView->SetOutputArea( tools::Rectangle( Point(), Size(1, 1) ) ); pOutlView->SetOutputArea( tools::Rectangle( Point(), Size(1, 1) ) );
} }
RemoveView( pOutlView ); RemoveView( pOutlView.get() );
delete pOutlView; pOutlView.reset();
} }
void SdrHHCWrapper::StartTextConversion() void SdrHHCWrapper::StartTextConversion()
...@@ -156,7 +156,7 @@ bool SdrHHCWrapper::ConvertNextDocument() ...@@ -156,7 +156,7 @@ bool SdrHHCWrapper::ConvertNextDocument()
SetUpdateMode(true); SetUpdateMode(true);
pView->GetWrtShell().MakeVisible(pTextObj->GetLogicRect()); 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 else
SetUpdateMode(false); SetUpdateMode(false);
......
...@@ -31,7 +31,7 @@ class SdrHHCWrapper : public SdrOutliner ...@@ -31,7 +31,7 @@ class SdrHHCWrapper : public SdrOutliner
SwView* pView; SwView* pView;
SdrTextObj* pTextObj; SdrTextObj* pTextObj;
OutlinerView* pOutlView; std::unique_ptr<OutlinerView> pOutlView;
sal_Int32 nOptions; sal_Int32 nOptions;
sal_uInt16 nDocIndex; sal_uInt16 nDocIndex;
LanguageType nSourceLang; 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