summaryrefslogtreecommitdiff
path: root/lingucomponent
diff options
context:
space:
mode:
Diffstat (limited to 'lingucomponent')
-rw-r--r--lingucomponent/source/hyphenator/altlinuxhyph/hyphen/hyphenimp.cxx13
-rw-r--r--lingucomponent/source/languageguessing/guesslang.cxx37
-rw-r--r--lingucomponent/source/spellcheck/macosxspell/macspellimp.cxx15
3 files changed, 1 insertions, 64 deletions
diff --git a/lingucomponent/source/hyphenator/altlinuxhyph/hyphen/hyphenimp.cxx b/lingucomponent/source/hyphenator/altlinuxhyph/hyphen/hyphenimp.cxx
index 7687b2b182ef..d2b92ba733b3 100644
--- a/lingucomponent/source/hyphenator/altlinuxhyph/hyphen/hyphenimp.cxx
+++ b/lingucomponent/source/hyphenator/altlinuxhyph/hyphen/hyphenimp.cxx
@@ -81,8 +81,6 @@ using namespace linguistic;
#define CAPTYPE_MIXED 4
// min, max
-
-//#define Min(a,b) (a < b ? a : b)
#define Max(a,b) (a > b ? a : b)
///////////////////////////////////////////////////////////////////////////
@@ -208,12 +206,7 @@ Sequence< Locale > SAL_CALL Hyphenator::getLocales()
// add dictionary information
aDicts = new HDInfo[numdict];
-/*
- aTEncs = new rtl_TextEncoding [numdict];
- aTLocs = new Locale [numdict];
- aTNames = new OUString [numdict];
- aCharSetInfo = new CharClass* [numdict];
-*/
+
k = 0;
for (aDictIt = aDics.begin(); aDictIt != aDics.end(); ++aDictIt)
{
@@ -626,7 +619,6 @@ Reference< XPossibleHyphens > SAL_CALL
int n = wordlen-1;
while((n >=0) && (lcword[n] == '.')) n--;
n++;
- // fprintf(stderr,"hyphenate... %s\n",lcword); fflush(stderr);
if (n > 0) {
if (hnj_hyphen_hyphenate3(dict, lcword, n, hyphens, NULL, &rep, &pos, &cut,
minLead, minTrail, Max(dict->clhmin, Max(dict->clhmin, 2) + Max(0, minLead - Max(dict->lhmin, 2))),
@@ -650,7 +642,6 @@ Reference< XPossibleHyphens > SAL_CALL
// now backfill hyphens[] for any removed periods
for (int c = n; c < wordlen; c++) hyphens[c] = '0';
hyphens[wordlen] = '\0';
- // fprintf(stderr,"... %s\n",hyphens); fflush(stderr);
INT16 nHyphCount = 0;
INT16 i;
@@ -676,8 +667,6 @@ Reference< XPossibleHyphens > SAL_CALL
}
hyphenatedWord = hyphenatedWordBuffer.makeStringAndClear();
- //fprintf(stderr,"result is %s\n",OU2A(hyphenatedWord));
- //fflush(stderr);
xRes = new PossibleHyphens( aWord, LocaleToLanguage( aLocale ),
hyphenatedWord, aHyphPos );
diff --git a/lingucomponent/source/languageguessing/guesslang.cxx b/lingucomponent/source/languageguessing/guesslang.cxx
index 0efe7eebf200..f34b2676762c 100644
--- a/lingucomponent/source/languageguessing/guesslang.cxx
+++ b/lingucomponent/source/languageguessing/guesslang.cxx
@@ -66,7 +66,6 @@ namespace css = ::com::sun::star;
#define A2OU(x) ::rtl::OUString::createFromAscii( x )
#define SERVICENAME "com.sun.star.linguistic2.LanguageGuessing"
-
#define IMPLNAME "com.sun.star.lingu2.LanguageGuessing"
static Sequence< OUString > getSupportedServiceNames_LangGuess_Impl()
@@ -191,40 +190,6 @@ void LangGuess_Impl::EnsureInitialized()
//*************************************************************************
-/* TL: currently not part of the API
-Sequence< com::sun::star::lang::Locale > SAL_CALL LangGuess_Impl::guessLanguages(
- const rtl::OUString &rText,
- sal_Int32 nStartPos,
- sal_Int32 nLen )
- throw (RuntimeException)
-{
- Sequence< com::sun::star::lang::Locale > aRes;
-
- OString o = OUStringToOString( rText, RTL_TEXTENCODING_UTF8 );
- vector<Guess> gs = m_aGuesser.GuessLanguage(o.pData->buffer);
-
- aRes.realloc(gs.size());
-
- com::sun::star::lang::Locale *pRes = aRes.getArray();
-
-#ifdef DEBUG
- std::cout << " We have " << gs.size() << " candidates" << std::endl;
-#endif
-
- for(int i = 0; i < gs.size() ; i++ ){
- com::sun::star::lang::Locale current_aRes;
-
- current_aRes.Language = A2OU( gs[i].getLanguage().c_str() );
- current_aRes.Country = A2OU( gs[i].getCountry().c_str() );
-
- pRes[i] = current_aRes;
- }
-
- return aRes;
-}
-*/
-//*************************************************************************
-
Locale SAL_CALL LangGuess_Impl::guessPrimaryLanguage(
const ::rtl::OUString& rText,
::sal_Int32 nStartPos,
@@ -262,8 +227,6 @@ void LangGuess_Impl::SetFingerPrintsDB(
OString conf_file_path(path);
conf_file_path += conf_file_name;
- //cout << "Conf file : " << conf_file_path.getStr() << " directory : " << path.getStr() << endl;
-
m_aGuesser.SetDBPath((const char*)conf_file_path.getStr(), (const char*)path.getStr());
}
diff --git a/lingucomponent/source/spellcheck/macosxspell/macspellimp.cxx b/lingucomponent/source/spellcheck/macosxspell/macspellimp.cxx
index f9392cf379bd..b2bd3de4211c 100644
--- a/lingucomponent/source/spellcheck/macosxspell/macspellimp.cxx
+++ b/lingucomponent/source/spellcheck/macosxspell/macspellimp.cxx
@@ -93,7 +93,6 @@ const sal_Char *dbg_dump(rtl_uString *pStr)
MacSpellChecker::MacSpellChecker() :
aEvtListeners ( GetLinguMutex() )
{
-// aDicts = NULL;
aDEncs = NULL;
aDLocs = NULL;
aDNames = NULL;
@@ -110,14 +109,6 @@ MacSpellChecker::MacSpellChecker() :
MacSpellChecker::~MacSpellChecker()
{
- // if (aDicts) {
- // for (int i = 0; i < numdict; i++) {
- // if (aDicts[i]) delete aDicts[i];
- // aDicts[i] = NULL;
- // }
- // delete[] aDicts;
- // }
- // aDicts = NULL;
numdict = 0;
if (aDEncs) delete[] aDEncs;
aDEncs = NULL;
@@ -162,7 +153,6 @@ Sequence< Locale > SAL_CALL MacSpellChecker::getLocales()
rtl_TextEncoding aEnc = RTL_TEXTENCODING_UTF8;
std::vector<objc_object *> postspdict;
- //std::vector<dictentry *> postspdict;
std::vector<dictentry *> postupdict;
@@ -224,11 +214,7 @@ Sequence< Locale > SAL_CALL MacSpellChecker::getLocales()
numlocs++;
}
aDLocs[k] = nLoc;
- //pointer to Hunspell dictionary - not needed for MAC
- //aDicts[k] = NULL;
aDEncs[k] = 0;
- // Dictionary file names not valid for Mac Spell
- //aDNames[k] = aPathOpt.GetLinguisticPath() + A2OU("/ooo/") + A2OU(postspdict[i]->filename);
k++;
}
@@ -237,7 +223,6 @@ Sequence< Locale > SAL_CALL MacSpellChecker::getLocales()
} else {
/* no dictionary.lst found so register no dictionaries */
numdict = 0;
- //aDicts = NULL;
aDEncs = NULL;
aDLocs = NULL;
aDNames = NULL;