summaryrefslogtreecommitdiff
path: root/basic
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2012-11-22 12:26:52 +0100
committerEike Rathke <erack@redhat.com>2012-11-22 12:34:59 +0100
commit9955dbebbdf1b7d36fec272dfea46f57fab47e19 (patch)
tree80705ccc2382e7440ea76f62a544d64d12d1ce4f /basic
parent9c5d6ea5efb5f56a4ac96b4a8505ed84abbbc6bf (diff)
AllSettings with LanguageTag
Change-Id: I710ae66e51139662eb442b681fdf9cc9d158551d
Diffstat (limited to 'basic')
-rw-r--r--basic/CppunitTest_basic_scanner.mk1
-rw-r--r--basic/Library_sb.mk1
-rw-r--r--basic/source/classes/global.cxx2
-rw-r--r--basic/source/comp/basiccharclass.cxx2
-rw-r--r--basic/source/runtime/basrdll.cxx2
-rw-r--r--basic/source/runtime/methods.cxx6
-rw-r--r--basic/source/runtime/methods1.cxx7
-rw-r--r--basic/source/runtime/runtime.cxx4
-rw-r--r--basic/source/runtime/step0.cxx2
-rw-r--r--basic/source/sbx/sbxdate.cxx4
-rw-r--r--basic/source/sbx/sbxscan.cxx6
-rw-r--r--basic/source/uno/dlgcont.cxx2
12 files changed, 21 insertions, 18 deletions
diff --git a/basic/CppunitTest_basic_scanner.mk b/basic/CppunitTest_basic_scanner.mk
index 193c4a5835a5..b5eccfa2d7b8 100644
--- a/basic/CppunitTest_basic_scanner.mk
+++ b/basic/CppunitTest_basic_scanner.mk
@@ -21,6 +21,7 @@ $(eval $(call gb_CppunitTest_use_libraries,basic_scanner, \
cppuhelper \
sal \
salhelper \
+ i18nisolang1 \
sb \
sot \
svl \
diff --git a/basic/Library_sb.mk b/basic/Library_sb.mk
index 73eb63163628..16bb39efe0b4 100644
--- a/basic/Library_sb.mk
+++ b/basic/Library_sb.mk
@@ -42,6 +42,7 @@ $(eval $(call gb_Library_use_libraries,sb,\
cppuhelper \
sal \
salhelper \
+ i18nisolang1 \
sot \
svl \
svt \
diff --git a/basic/source/classes/global.cxx b/basic/source/classes/global.cxx
index 2907b5cdb65f..43a3414f5e0a 100644
--- a/basic/source/classes/global.cxx
+++ b/basic/source/classes/global.cxx
@@ -45,7 +45,7 @@ namespace
comphelper::getProcessComponentContext(),
com::sun::star::i18n::TransliterationModules_IGNORE_CASE )
{
- const LanguageType eOfficeLanguage = Application::GetSettings().GetLanguage();
+ const LanguageType eOfficeLanguage = Application::GetSettings().GetLanguageTag().getLanguageType();
m_aTransliteration.loadModuleIfNeeded( eOfficeLanguage );
}
utl::TransliterationWrapper& getTransliteration() { return m_aTransliteration; }
diff --git a/basic/source/comp/basiccharclass.cxx b/basic/source/comp/basiccharclass.cxx
index e3a83f34a380..4b905d79bd50 100644
--- a/basic/source/comp/basiccharclass.cxx
+++ b/basic/source/comp/basiccharclass.cxx
@@ -100,7 +100,7 @@ bool BasicCharClass::isLetterUnicode( sal_Unicode c )
{
static CharClass* pCharClass = NULL;
if( pCharClass == NULL )
- pCharClass = new CharClass( Application::GetSettings().GetLocale() );
+ pCharClass = new CharClass( Application::GetSettings().GetLanguageTag().getLocale() );
// can we get pCharClass to accept a sal_Unicode instead of this waste?
return pCharClass->isLetter( rtl::OUString(c), 0 );
}
diff --git a/basic/source/runtime/basrdll.cxx b/basic/source/runtime/basrdll.cxx
index 882ffc0d666c..ccd50c0056d8 100644
--- a/basic/source/runtime/basrdll.cxx
+++ b/basic/source/runtime/basrdll.cxx
@@ -36,7 +36,7 @@ BasResId::BasResId( sal_uInt32 nId ) :
BasicDLL::BasicDLL()
{
BASIC_DLL() = this;
- ::com::sun::star::lang::Locale aLocale = Application::GetSettings().GetUILocale();
+ ::com::sun::star::lang::Locale aLocale = Application::GetSettings().GetUILanguageTag().getLocale();
pBasResMgr = ResMgr::CreateResMgr("sb", aLocale );
bDebugMode = false;
bBreakEnabled = true;
diff --git a/basic/source/runtime/methods.cxx b/basic/source/runtime/methods.cxx
index 18da6ae72ef7..27ba48faa523 100644
--- a/basic/source/runtime/methods.cxx
+++ b/basic/source/runtime/methods.cxx
@@ -137,7 +137,7 @@ static const CharClass& GetCharClass( void )
if( bNeedsInit )
{
bNeedsInit = false;
- aLocale = Application::GetSettings().GetLocale();
+ aLocale = Application::GetSettings().GetLanguageTag().getLocale();
}
static CharClass aCharClass( aLocale );
return aCharClass;
@@ -1650,7 +1650,7 @@ RTLFUNC(StrComp)
i18n::TransliterationModules_IGNORE_WIDTH );
}
- LanguageType eLangType = GetpApp()->GetSettings().GetLanguage();
+ LanguageType eLangType = GetpApp()->GetSettings().GetLanguageTag().getLanguageType();
pTransliterationWrapper->loadModuleIfNeeded( eLangType );
nRetValue = pTransliterationWrapper->compareString( rStr1, rStr2 );
}
@@ -1953,7 +1953,7 @@ RTLFUNC(DateValue)
// by using SbiInstance::GetNumberFormatter.
// It seems that both locale number formatter and English number formatter
// are supported in Visual Basic.
- LanguageType eLangType = GetpApp()->GetSettings().GetLanguage();
+ LanguageType eLangType = GetpApp()->GetSettings().GetLanguageTag().getLanguageType();
if( !bSuccess && ( eLangType != LANGUAGE_ENGLISH_US ) )
{
// Create a new SvNumberFormatter by using LANGUAGE_ENGLISH to get the date value;
diff --git a/basic/source/runtime/methods1.cxx b/basic/source/runtime/methods1.cxx
index c6a37f1d0eb8..aac1e634a285 100644
--- a/basic/source/runtime/methods1.cxx
+++ b/basic/source/runtime/methods1.cxx
@@ -74,7 +74,7 @@ static Reference< XCalendar3 > getLocaleCalendar( void )
static com::sun::star::lang::Locale aLastLocale;
static bool bNeedsInit = true;
- com::sun::star::lang::Locale aLocale = Application::GetSettings().GetLocale();
+ com::sun::star::lang::Locale aLocale = Application::GetSettings().GetLanguageTag().getLocale();
bool bNeedsReload = false;
if( bNeedsInit )
{
@@ -82,7 +82,8 @@ static Reference< XCalendar3 > getLocaleCalendar( void )
bNeedsReload = true;
}
else if( aLocale.Language != aLastLocale.Language ||
- aLocale.Country != aLastLocale.Country )
+ aLocale.Country != aLastLocale.Country ||
+ aLocale.Variant != aLastLocale.Variant )
{
bNeedsReload = true;
}
@@ -2543,7 +2544,7 @@ RTLFUNC(FormatDateTime)
SbiInstance::PrepareNumberFormatter( pFormatter, n, n, n );
}
- LanguageType eLangType = GetpApp()->GetSettings().GetLanguage();
+ LanguageType eLangType = GetpApp()->GetSettings().GetLanguageTag().getLanguageType();
sal_uIntPtr nIndex = pFormatter->GetFormatIndex( NF_DATE_SYSTEM_LONG, eLangType );
Color* pCol;
pFormatter->GetOutputString( dDate, nIndex, aRetStr, &pCol );
diff --git a/basic/source/runtime/runtime.cxx b/basic/source/runtime/runtime.cxx
index 482526382a50..122357733cae 100644
--- a/basic/source/runtime/runtime.cxx
+++ b/basic/source/runtime/runtime.cxx
@@ -321,7 +321,7 @@ SbiDllMgr* SbiInstance::GetDllMgr()
// #39629 create NumberFormatter with the help of a static method now
SvNumberFormatter* SbiInstance::GetNumberFormatter()
{
- LanguageType eLangType = GetpApp()->GetSettings().GetLanguage();
+ LanguageType eLangType = GetpApp()->GetSettings().GetLanguageTag().getLanguageType();
SvtSysLocale aSysLocale;
DateFormat eDate = aSysLocale.GetLocaleData().getDateFormat();
if( pNumberFormatter )
@@ -358,7 +358,7 @@ void SbiInstance::PrepareNumberFormatter( SvNumberFormatter*& rpNumberFormatter,
}
else
{
- eLangType = GetpApp()->GetSettings().GetLanguage();
+ eLangType = GetpApp()->GetSettings().GetLanguageTag().getLanguageType();
}
DateFormat eDate;
if( peFormatterDateFormat )
diff --git a/basic/source/runtime/step0.cxx b/basic/source/runtime/step0.cxx
index dc0798499e74..412847356af8 100644
--- a/basic/source/runtime/step0.cxx
+++ b/basic/source/runtime/step0.cxx
@@ -289,7 +289,7 @@ void SbiRuntime::StepLIKE()
aSearchOpt.algorithmType = com::sun::star::util::SearchAlgorithms_REGEXP;
- aSearchOpt.Locale = Application::GetSettings().GetLocale();
+ aSearchOpt.Locale = Application::GetSettings().GetLanguageTag().getLocale();
aSearchOpt.searchString = pattern;
int bTextMode(1);
diff --git a/basic/source/sbx/sbxdate.cxx b/basic/source/sbx/sbxdate.cxx
index 7c0182791a84..6d0a4073a64a 100644
--- a/basic/source/sbx/sbxdate.cxx
+++ b/basic/source/sbx/sbxdate.cxx
@@ -96,7 +96,7 @@ double ImpGetDate( const SbxValues* p )
}
else
{
- LanguageType eLangType = GetpApp()->GetSettings().GetLanguage();
+ LanguageType eLangType = GetpApp()->GetSettings().GetLanguageTag().getLanguageType();
SvNumberFormatter* pFormatter;
com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory >
@@ -270,7 +270,7 @@ start:
}
Color* pColor;
- LanguageType eLangType = GetpApp()->GetSettings().GetLanguage();
+ LanguageType eLangType = GetpApp()->GetSettings().GetLanguageTag().getLanguageType();
SvNumberFormatter* pFormatter;
com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory >
xFactory = comphelper::getProcessServiceFactory();
diff --git a/basic/source/sbx/sbxscan.cxx b/basic/source/sbx/sbxscan.cxx
index 111c8b3285b3..f9a328ea26bf 100644
--- a/basic/source/sbx/sbxscan.cxx
+++ b/basic/source/sbx/sbxscan.cxx
@@ -629,7 +629,7 @@ ResMgr* implGetResMgr( void )
static ResMgr* pResMgr = NULL;
if( !pResMgr )
{
- ::com::sun::star::lang::Locale aLocale = Application::GetSettings().GetUILocale();
+ ::com::sun::star::lang::Locale aLocale = Application::GetSettings().GetUILanguageTag().getLocale();
pResMgr = ResMgr::CreateResMgr("sb", aLocale );
}
return pResMgr;
@@ -725,7 +725,7 @@ void SbxValue::Format( OUString& rRes, const OUString* pFmt ) const
return;
}
- LanguageType eLangType = GetpApp()->GetSettings().GetLanguage();
+ LanguageType eLangType = GetpApp()->GetSettings().GetLanguageTag().getLanguageType();
com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory >
xFactory = comphelper::getProcessServiceFactory();
SvNumberFormatter aFormatter( xFactory, eLangType );
@@ -853,7 +853,7 @@ void SbxValue::Format( OUString& rRes, const OUString* pFmt ) const
{
SbxAppData& rAppData = GetSbxData_Impl();
- LanguageType eLangType = GetpApp()->GetSettings().GetLanguage();
+ LanguageType eLangType = GetpApp()->GetSettings().GetLanguageTag().getLanguageType();
if( rAppData.pBasicFormater )
{
if( rAppData.eBasicFormaterLangType != eLangType )
diff --git a/basic/source/uno/dlgcont.cxx b/basic/source/uno/dlgcont.cxx
index 7820e721bff5..4be2ef2d9afa 100644
--- a/basic/source/uno/dlgcont.cxx
+++ b/basic/source/uno/dlgcont.cxx
@@ -367,7 +367,7 @@ Reference< ::com::sun::star::resource::XStringResourcePersistence >
bool bReadOnly = pDialogLibrary->mbReadOnly;
// get ui locale
- ::com::sun ::star::lang::Locale aLocale = Application::GetSettings().GetUILocale();
+ ::com::sun ::star::lang::Locale aLocale = Application::GetSettings().GetUILanguageTag().getLocale();
OUString aComment(aResourceFileCommentBase);
aComment += aLibName;