summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cui/source/inc/align.hxx2
-rw-r--r--cui/source/tabpages/align.cxx5
2 files changed, 3 insertions, 4 deletions
diff --git a/cui/source/inc/align.hxx b/cui/source/inc/align.hxx
index 6edfd8b8ba44..df2094afe684 100644
--- a/cui/source/inc/align.hxx
+++ b/cui/source/inc/align.hxx
@@ -93,7 +93,7 @@ private:
VclPtr<ValueSet> m_pVsRefEdge;
VclPtr<TriStateBox> m_pCbStacked;
VclPtr<TriStateBox> m_pCbAsianMode;
- OrientationHelper* m_pOrientHlp;
+ std::unique_ptr<OrientationHelper> m_pOrientHlp;
VclPtr<VclHBox> m_pBoxDirection;
VclPtr<TriStateBox> m_pBtnWrap;
diff --git a/cui/source/tabpages/align.cxx b/cui/source/tabpages/align.cxx
index 6157e030f0c5..ed35fa53ea6b 100644
--- a/cui/source/tabpages/align.cxx
+++ b/cui/source/tabpages/align.cxx
@@ -175,7 +175,7 @@ AlignmentTabPage::AlignmentTabPage( vcl::Window* pParent, const SfxItemSet& rCor
get(m_pCbStacked,"checkVertStack");
get(m_pCbAsianMode,"checkAsianMode");
- m_pOrientHlp = new OrientationHelper(*m_pCtrlDial, *m_pNfRotate, *m_pCbStacked);
+ m_pOrientHlp.reset( new OrientationHelper(*m_pCtrlDial, *m_pNfRotate, *m_pCbStacked) );
// Properties
get(m_pBtnWrap,"checkWrapTextAuto");
@@ -246,8 +246,7 @@ AlignmentTabPage::~AlignmentTabPage()
void AlignmentTabPage::dispose()
{
- delete m_pOrientHlp;
- m_pOrientHlp = nullptr;
+ m_pOrientHlp.reset();
m_pLbHorAlign.clear();
m_pFtIndent.clear();
m_pEdIndent.clear();