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

loplugin:useuniqueptr in SwColumnPage

Change-Id: I36cd9ba0c64073ae09d8ab8e2119d1404cbb02f1
Reviewed-on: https://gerrit.libreoffice.org/58236
Tested-by: Jenkins
Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst 6645a781
......@@ -382,7 +382,7 @@ void SwColumnPage::ResetColWidth()
{
if( m_nCols )
{
const sal_uInt16 nWidth = GetMaxWidth( m_pColMgr, m_nCols ) / m_nCols;
const sal_uInt16 nWidth = GetMaxWidth( m_pColMgr.get(), m_nCols ) / m_nCols;
for(sal_uInt16 i = 0; i < m_nCols; ++i)
m_nColWidth[i] = static_cast<long>(nWidth);
......@@ -523,7 +523,7 @@ SwColumnPage::~SwColumnPage()
void SwColumnPage::dispose()
{
delete m_pColMgr;
m_pColMgr.reset();
m_pCLNrEdt.clear();
m_pDefaultVS.clear();
m_pBalanceColsCB.clear();
......@@ -589,8 +589,7 @@ void SwColumnPage::Reset(const SfxItemSet *rSet)
m_aDistEd1.SetPrcntValue(50, FUNIT_CM);
m_aDistEd2.SetPrcntValue(50, FUNIT_CM);
delete m_pColMgr;
m_pColMgr = new SwColMgr(*rSet);
m_pColMgr.reset(new SwColMgr(*rSet));
m_nCols = m_pColMgr->GetCount() ;
m_pCLNrEdt->SetMax(std::max(static_cast<sal_uInt16>(m_pCLNrEdt->GetMax()), m_nCols));
m_pCLNrEdt->SetLast(std::max(m_nCols,static_cast<sal_uInt16>(m_pCLNrEdt->GetMax())));
......@@ -1244,7 +1243,7 @@ void SwColumnPage::ActivatePage(const SfxItemSet& rSet)
}
}
m_pFrameExampleWN->Hide();
m_pPgeExampleWN->UpdateExample( rSet, m_pColMgr );
m_pPgeExampleWN->UpdateExample( rSet, m_pColMgr.get() );
m_pPgeExampleWN->Show();
}
......
......@@ -121,7 +121,7 @@ class SwColumnPage : public SfxTabPage
VclPtr<SwColExample> m_pPgeExampleWN;
VclPtr<SwColumnOnlyExample> m_pFrameExampleWN;
SwColMgr* m_pColMgr;
std::unique_ptr<SwColMgr> m_pColMgr;
sal_uInt16 m_nFirstVis;
sal_uInt16 m_nCols;
......
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