diff options
Diffstat (limited to 'linguistic/source/misc.cxx')
-rw-r--r-- | linguistic/source/misc.cxx | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/linguistic/source/misc.cxx b/linguistic/source/misc.cxx index 2df19215fd..b45e4eca3f 100644 --- a/linguistic/source/misc.cxx +++ b/linguistic/source/misc.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite @@ -33,8 +33,8 @@ #include <tools/string.hxx> #include <tools/fsys.hxx> #include <tools/debug.hxx> -#include <svtools/pathoptions.hxx> -#include <svtools/lngmisc.hxx> +#include <unotools/pathoptions.hxx> +#include <svl/lngmisc.hxx> #include <ucbhelper/content.hxx> #include <i18npool/mslangid.hxx> #include <com/sun/star/ucb/XCommandEnvironment.hpp> @@ -52,6 +52,7 @@ #include <com/sun/star/linguistic2/XSearchableDictionaryList.hpp> #include <unotools/processfactory.hxx> #include <unotools/localedatawrapper.hxx> +#include <unotools/syslocale.hxx> #include <rtl/instance.hxx> @@ -59,7 +60,7 @@ #include "defs.hxx" #include "lngprops.hxx" #include "hyphdta.hxx" - +#include <i18npool/mslangid.hxx> using namespace utl; using namespace osl; @@ -90,10 +91,10 @@ osl::Mutex & GetLinguMutex() LocaleDataWrapper & GetLocaleDataWrapper( INT16 nLang ) { - static LocaleDataWrapper aLclDtaWrp( - getProcessServiceFactory(), - CreateLocale( Application::GetSettings().GetUILanguage() ) ); - + static LocaleDataWrapper aLclDtaWrp( + getProcessServiceFactory(), + CreateLocale( SvtSysLocale().GetUILanguage() ) ); + const Locale &rLcl = aLclDtaWrp.getLoadedLocale(); Locale aLcl( CreateLocale( nLang ) ); if (aLcl.Language != rLcl.Language || @@ -243,8 +244,8 @@ sal_Int32 LevDistance( const OUString &rTxt1, const OUString &rTxt2 ) sal_Unicode c1i = rTxt1.getStr()[i - 1]; sal_Unicode c2k = rTxt2.getStr()[k - 1]; sal_Int32 nCost = c1i == c2k ? 0 : 1; - sal_Int32 nNew = Minimum( aData.Value(i-1, k ) + 1, - aData.Value(i , k-1) + 1, + sal_Int32 nNew = Minimum( aData.Value(i-1, k ) + 1, + aData.Value(i , k-1) + 1, aData.Value(i-1, k-1) + nCost ); // take transposition (exchange with left or right char) in account if (2 < i && 2 < k) @@ -798,7 +799,7 @@ sal_Unicode ToUpper( const sal_Unicode cChar, INT16 nLanguage ) // sorted(!) array of unicode ranges for code points that are exclusively(!) used as numbers // and thus may NOT not be part of names or words like the Chinese/Japanese number characters -static const sal_uInt32 the_aDigitZeroes [] = +static const sal_uInt32 the_aDigitZeroes [] = { 0x00000030, //0039 ; Decimal # Nd [10] DIGIT ZERO..DIGIT NINE 0x00000660, //0669 ; Decimal # Nd [10] ARABIC-INDIC DIGIT ZERO..ARABIC-INDIC DIGIT NINE |