spelling dialog always leaked here

Change-Id: I00c96bbfe7106a09c0a8aa09f3209537bc3d2b07
This commit is contained in:
Caolán McNamara 2015-07-07 15:48:03 +01:00
parent 3398b59d2d
commit 4c9d7772bd
2 changed files with 9 additions and 9 deletions

View file

@ -46,7 +46,7 @@ class SVX_DLLPUBLIC SpellDialogChildWindow
: public SfxChildWindow
{
friend class SpellDialog;
AbstractSpellDialog* m_pAbstractSpellDialog;
std::unique_ptr<AbstractSpellDialog> m_xAbstractSpellDialog;
public:
SpellDialogChildWindow (
vcl::Window*pParent,

View file

@ -35,10 +35,10 @@ SpellDialogChildWindow::SpellDialogChildWindow (
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
DBG_ASSERT(pFact, "SvxAbstractDialogFactory::Create() failed");
m_pAbstractSpellDialog = pFact->CreateSvxSpellDialog(_pParent,
m_xAbstractSpellDialog.reset(pFact->CreateSvxSpellDialog(_pParent,
pBindings,
this );
pWindow = m_pAbstractSpellDialog->GetWindow();
this ));
pWindow = m_xAbstractSpellDialog->GetWindow();
eChildAlignment = SfxChildAlignment::NOALIGNMENT;
SetHideNotDelete(true);
}
@ -49,15 +49,15 @@ SpellDialogChildWindow::~SpellDialogChildWindow()
SfxBindings& SpellDialogChildWindow::GetBindings() const
{
OSL_ASSERT (m_pAbstractSpellDialog != NULL);
return m_pAbstractSpellDialog->GetBindings();
assert(m_xAbstractSpellDialog);
return m_xAbstractSpellDialog->GetBindings();
}
void SpellDialogChildWindow::InvalidateSpellDialog()
{
OSL_ASSERT (m_pAbstractSpellDialog != NULL);
if(m_pAbstractSpellDialog)
m_pAbstractSpellDialog->Invalidate();
OSL_ASSERT (m_xAbstractSpellDialog);
if (m_xAbstractSpellDialog)
m_xAbstractSpellDialog->Invalidate();
}
bool SpellDialogChildWindow::HasAutoCorrection()