diff options
Diffstat (limited to 'lingucomponent')
-rw-r--r-- | lingucomponent/source/spellcheck/spell/sspellimp.cxx | 6 | ||||
-rw-r--r-- | lingucomponent/source/spellcheck/spell/sspellimp.hxx | 2 |
2 files changed, 3 insertions, 5 deletions
diff --git a/lingucomponent/source/spellcheck/spell/sspellimp.cxx b/lingucomponent/source/spellcheck/spell/sspellimp.cxx index 97b5c48a1676..e541a5ef314e 100644 --- a/lingucomponent/source/spellcheck/spell/sspellimp.cxx +++ b/lingucomponent/source/spellcheck/spell/sspellimp.cxx @@ -89,7 +89,6 @@ SpellChecker::~SpellChecker() delete[] m_aDicts; } delete[] m_aDLocs; - delete[] m_aDNames; if (m_pPropHelper) { m_pPropHelper->RemoveAsPropListener(); @@ -201,7 +200,7 @@ Sequence< Locale > SAL_CALL SpellChecker::getLocales() m_aDicts = new Hunspell* [m_nNumDict]; m_aDEncs.reset( new rtl_TextEncoding [m_nNumDict] ); m_aDLocs = new Locale [m_nNumDict]; - m_aDNames = new OUString [m_nNumDict]; + m_aDNames.reset( new OUString [m_nNumDict] ); k = 0; for (aDictIt = aDics.begin(); aDictIt != aDics.end(); ++aDictIt) { @@ -242,8 +241,7 @@ Sequence< Locale > SAL_CALL SpellChecker::getLocales() m_aDEncs.reset(); delete[] m_aDLocs; m_aDLocs = nullptr; - delete[] m_aDNames; - m_aDNames = nullptr; + m_aDNames.reset(); m_aSuppLocales.realloc(0); } } diff --git a/lingucomponent/source/spellcheck/spell/sspellimp.hxx b/lingucomponent/source/spellcheck/spell/sspellimp.hxx index 3a61900e8c15..285ab715ad0a 100644 --- a/lingucomponent/source/spellcheck/spell/sspellimp.hxx +++ b/lingucomponent/source/spellcheck/spell/sspellimp.hxx @@ -58,7 +58,7 @@ class SpellChecker : Hunspell ** m_aDicts; std::unique_ptr<rtl_TextEncoding[]> m_aDEncs; Locale * m_aDLocs; - OUString * m_aDNames; + std::unique_ptr<OUString[]> m_aDNames; sal_Int32 m_nNumDict; ::comphelper::OInterfaceContainerHelper2 m_aEvtListeners; |