summaryrefslogtreecommitdiff
path: root/linguistic/source
diff options
context:
space:
mode:
Diffstat (limited to 'linguistic/source')
-rw-r--r--linguistic/source/spelldta.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/linguistic/source/spelldta.cxx b/linguistic/source/spelldta.cxx
index 7ae3d3d7f42d..b3f57e9b870f 100644
--- a/linguistic/source/spelldta.cxx
+++ b/linguistic/source/spelldta.cxx
@@ -28,6 +28,7 @@
#include <linguistic/misc.hxx>
#include <linguistic/spelldta.hxx>
+#include <rtl/ref.hxx>
using namespace osl;
@@ -255,11 +256,11 @@ void SpellAlternatives::SetAlternatives( const Sequence< OUString > &rAlt )
css::uno::Reference < css::linguistic2::XSpellAlternatives > SpellAlternatives::CreateSpellAlternatives(
const OUString &rWord, LanguageType nLang, sal_Int16 nTypeP, const css::uno::Sequence< OUString > &rAlt )
{
- SpellAlternatives* pAlt = new SpellAlternatives;
+ rtl::Reference<SpellAlternatives> pAlt = new SpellAlternatives;
pAlt->SetWordLanguage( rWord, nLang );
pAlt->SetFailureType( nTypeP );
pAlt->SetAlternatives( rAlt );
- return Reference < XSpellAlternatives >(pAlt);
+ return pAlt;
}