From f0778eacf53b522859b3637ad6f4d4333f3d628b Mon Sep 17 00:00:00 2001 From: Vladimir Glazounov Date: Thu, 12 Jun 2003 09:41:01 +0000 Subject: INTEGRATION: CWS mh11rc (1.10.6); FILE MERGED 2003/06/10 08:32:27 mh 1.10.6.2: one more update from ooo11beta2 2003/06/06 08:55:36 mh 1.10.6.1: join: from beta2 --- .../source/spellcheck/spell/sspellimp.cxx | 32 +++++++++------------- 1 file changed, 13 insertions(+), 19 deletions(-) (limited to 'lingucomponent/source') diff --git a/lingucomponent/source/spellcheck/spell/sspellimp.cxx b/lingucomponent/source/spellcheck/spell/sspellimp.cxx index 981c36171d7c..a43f01c28f70 100644 --- a/lingucomponent/source/spellcheck/spell/sspellimp.cxx +++ b/lingucomponent/source/spellcheck/spell/sspellimp.cxx @@ -2,9 +2,9 @@ * * $RCSfile: sspellimp.cxx,v $ * - * $Revision: 1.10 $ + * $Revision: 1.11 $ * - * last change: $Author: hr $ $Date: 2003-04-28 17:05:44 $ + * last change: $Author: vg $ $Date: 2003-06-12 10:41:01 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -138,13 +138,13 @@ SpellChecker::~SpellChecker() if (aDicts[i]) delete aDicts[i]; aDicts[i] = NULL; } - delete[] aDicts; + if (aDicts) delete[] aDicts; aDicts = NULL; - delete[] aDEncs; + if (aDEncs) delete[] aDEncs; aDEncs = NULL; - delete[] aDLocs; + if (aDLocs) delete[] aDLocs; aDLocs = NULL; - delete[] aDNames; + if (aDNames) delete[] aDNames; aDNames = NULL; numdict = 0; if (pPropHelper) @@ -264,19 +264,13 @@ Sequence< Locale > SAL_CALL SpellChecker::getLocales() aSuppLocales.realloc(numlocs); } else { - /* no dictionary.lst so just use default en_US dictionary at shared location */ - numdict = 1; - aDicts = new MySpell*[1]; - aDEncs = new rtl_TextEncoding[1]; - aDLocs = new Locale[1]; - aDNames = new OUString[1]; - aSuppLocales.realloc(1); - Locale *pLocale = aSuppLocales.getArray(); - Locale nLoc( A2OU("en"), A2OU("US"), OUString() ); - pLocale[0] = nLoc; - aDLocs[0] = nLoc; - aDicts[0] = NULL; - aDNames[0] = aPathOpt.GetLinguisticPath() + A2OU("/ooo/") + A2OU("en_US"); + /* no dictionary.lst found so register no dictionaries */ + numdict = 0; + aDicts = NULL; + aDEncs = NULL; + aDLocs = NULL; + aDNames = NULL; + aSuppLocales.realloc(0); } /* de-allocation of memory is handled inside the DictMgr */ -- cgit v1.2.3