summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
Diffstat (limited to 'sw')
-rw-r--r--sw/source/ui/frmdlg/column.cxx9
-rw-r--r--sw/source/uibase/inc/column.hxx2
2 files changed, 5 insertions, 6 deletions
diff --git a/sw/source/ui/frmdlg/column.cxx b/sw/source/ui/frmdlg/column.cxx
index 16aa1ed8420c..8232edfca584 100644
--- a/sw/source/ui/frmdlg/column.cxx
+++ b/sw/source/ui/frmdlg/column.cxx
@@ -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();
}
diff --git a/sw/source/uibase/inc/column.hxx b/sw/source/uibase/inc/column.hxx
index 2f1b911ac35a..b72bc00180d6 100644
--- a/sw/source/uibase/inc/column.hxx
+++ b/sw/source/uibase/inc/column.hxx
@@ -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;