summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2015-07-07 14:36:42 +0100
committerCaolán McNamara <caolanm@redhat.com>2015-07-07 19:48:01 +0100
commit3398b59d2dbdcafc7fd3e7446271c5dc3bd9b3be (patch)
treee3b777f7223c3a0562c552bcb0d63105e084b19b /sw
parent47c41f4c03db2e876301760415db1e937d00f551 (diff)
AbstractSwWordCountFloatDlg always leaked here
Change-Id: Icfff86678f6b9d85c0bc9bc77e450891d388cb2a
Diffstat (limited to 'sw')
-rw-r--r--sw/source/uibase/dialog/wordcountwrapper.cxx10
-rw-r--r--sw/source/uibase/inc/wordcountdialog.hxx2
2 files changed, 6 insertions, 6 deletions
diff --git a/sw/source/uibase/dialog/wordcountwrapper.cxx b/sw/source/uibase/dialog/wordcountwrapper.cxx
index 119a0ea926b1..16546675aa2b 100644
--- a/sw/source/uibase/dialog/wordcountwrapper.cxx
+++ b/sw/source/uibase/dialog/wordcountwrapper.cxx
@@ -23,9 +23,9 @@ SwWordCountWrapper::SwWordCountWrapper( vcl::Window *pParentWindow,
{
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
assert(pFact && "SwAbstractDialogFactory fail!");
- pAbstDlg = pFact->CreateSwWordCountDialog(pBindings, this, pParentWindow, pInfo);
- assert(pAbstDlg && "Dialog construction failed!");
- pWindow = pAbstDlg->GetWindow();
+ xAbstDlg.reset(pFact->CreateSwWordCountDialog(pBindings, this, pParentWindow, pInfo));
+ assert(xAbstDlg && "Dialog construction failed!");
+ pWindow = xAbstDlg->GetWindow();
eChildAlignment = SfxChildAlignment::NOALIGNMENT;
}
@@ -38,12 +38,12 @@ SfxChildWinInfo SwWordCountWrapper::GetInfo() const
void SwWordCountWrapper::UpdateCounts()
{
- pAbstDlg->UpdateCounts();
+ xAbstDlg->UpdateCounts();
}
void SwWordCountWrapper::SetCounts(const SwDocStat &rCurrCnt, const SwDocStat &rDocStat)
{
- pAbstDlg->SetCounts(rCurrCnt, rDocStat);
+ xAbstDlg->SetCounts(rCurrCnt, rDocStat);
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/uibase/inc/wordcountdialog.hxx b/sw/source/uibase/inc/wordcountdialog.hxx
index d4d9bde1c1fb..1ac17c1910e6 100644
--- a/sw/source/uibase/inc/wordcountdialog.hxx
+++ b/sw/source/uibase/inc/wordcountdialog.hxx
@@ -65,7 +65,7 @@ public:
class SwWordCountWrapper : public SfxChildWindow
{
- AbstractSwWordCountFloatDlg* pAbstDlg;
+ std::unique_ptr<AbstractSwWordCountFloatDlg> xAbstDlg;
protected:
SwWordCountWrapper( vcl::Window *pParentWindow,
sal_uInt16 nId,