summaryrefslogtreecommitdiff
path: root/sw/source/core/fields
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2012-11-24 18:54:09 +0100
committerEike Rathke <erack@redhat.com>2012-11-24 18:56:43 +0100
commit41956321ceefb5836feb2c119b66de7bb557740f (patch)
treee756d740615881ceeea816e7ef15096f91d7cc1e /sw/source/core/fields
parent6395c843710b59e391f10f3532442ae11fe64357 (diff)
get rid of Svx...Locale...() double conversion nonsense
Change-Id: I21d14ff6087d1adb0ce769f2e8f8060a005250cc
Diffstat (limited to 'sw/source/core/fields')
-rw-r--r--sw/source/core/fields/authfld.cxx4
-rw-r--r--sw/source/core/fields/docufld.cxx4
-rw-r--r--sw/source/core/fields/expfld.cxx3
-rw-r--r--sw/source/core/fields/fldbas.cxx2
-rw-r--r--sw/source/core/fields/reffld.cxx3
5 files changed, 9 insertions, 7 deletions
diff --git a/sw/source/core/fields/authfld.cxx b/sw/source/core/fields/authfld.cxx
index ff618c819bc1..0e31c09b561c 100644
--- a/sw/source/core/fields/authfld.cxx
+++ b/sw/source/core/fields/authfld.cxx
@@ -397,7 +397,7 @@ bool SwAuthorityFieldType::QueryValue( Any& rVal, sal_uInt16 nWhichId ) const
break;
case FIELD_PROP_LOCALE:
- rVal <<= SvxCreateLocale(GetLanguage());
+ rVal <<= LanguageTag(GetLanguage()).getLocale();
break;
case FIELD_PROP_PROP_SEQ:
@@ -457,7 +457,7 @@ bool SwAuthorityFieldType::PutValue( const Any& rAny, sal_uInt16 nWhichId )
{
com::sun::star::lang::Locale aLocale;
if( 0 != (bRet = rAny >>= aLocale ))
- SetLanguage( SvxLocaleToLanguage( aLocale ));
+ SetLanguage( LanguageTag( aLocale ).getLanguageType());
}
break;
diff --git a/sw/source/core/fields/docufld.cxx b/sw/source/core/fields/docufld.cxx
index d434a7a2f041..7047d153aa8b 100644
--- a/sw/source/core/fields/docufld.cxx
+++ b/sw/source/core/fields/docufld.cxx
@@ -893,9 +893,9 @@ static void lcl_GetLocalDataWrapper( sal_uLong nLang,
SvtSysLocale aLocale;
*ppAppLocalData = &aLocale.GetLocaleData();
*ppLocalData = *ppAppLocalData;
- if( nLang != SvxLocaleToLanguage( (*ppLocalData)->getLanguageTag().getLocale() ) )
+ if( nLang != (*ppLocalData)->getLanguageTag().getLanguageType() )
*ppLocalData = new LocaleDataWrapper(
- LanguageTag( SvxCreateLocale( static_cast<LanguageType>(nLang) )) );
+ LanguageTag( static_cast<LanguageType>(nLang) ));
}
String SwDocInfoFieldType::Expand( sal_uInt16 nSub, sal_uInt32 nFormat,
diff --git a/sw/source/core/fields/expfld.cxx b/sw/source/core/fields/expfld.cxx
index eb491ec1fb21..a79e4edf4c56 100644
--- a/sw/source/core/fields/expfld.cxx
+++ b/sw/source/core/fields/expfld.cxx
@@ -927,7 +927,8 @@ xub_StrLen SwGetExpField::GetReferenceTextPos( const SwFmtFld& rFmt, SwDoc& rDoc
{
LanguageType eLang = ((SvxLanguageItem&)aSet.Get(
GetWhichOfScript( RES_CHRATR_LANGUAGE, nSrcpt )) ).GetLanguage();
- CharClass aCC( LanguageTag( SvxCreateLocale( eLang )));
+ LanguageTag aLanguageTag( eLang);
+ CharClass aCC( aLanguageTag);
sal_Unicode c0 = sNodeText.GetChar(0);
sal_Bool bIsAlphaNum = aCC.isAlphaNumeric( sNodeText, 0 );
if( !bIsAlphaNum ||
diff --git a/sw/source/core/fields/fldbas.cxx b/sw/source/core/fields/fldbas.cxx
index be7934f0cb3a..b8cafaa6447d 100644
--- a/sw/source/core/fields/fldbas.cxx
+++ b/sw/source/core/fields/fldbas.cxx
@@ -597,7 +597,7 @@ SwFieldType* SwValueField::ChgTyp( SwFieldType* pNewType )
sal_uInt32 SwValueField::GetSystemFormat(SvNumberFormatter* pFormatter, sal_uInt32 nFmt)
{
const SvNumberformat* pEntry = pFormatter->GetEntry(nFmt);
- sal_uInt16 nLng = SvxLocaleToLanguage( SvtSysLocale().GetLanguageTag().getLocale() );
+ sal_uInt16 nLng = SvtSysLocale().GetLanguageTag().getLanguageType();
if (pEntry && nLng != pEntry->GetLanguage())
{
diff --git a/sw/source/core/fields/reffld.cxx b/sw/source/core/fields/reffld.cxx
index 4d68397ba7d0..77d38f11c9f8 100644
--- a/sw/source/core/fields/reffld.cxx
+++ b/sw/source/core/fields/reffld.cxx
@@ -470,7 +470,8 @@ void SwGetRefField::UpdateField( const SwTxtFld* pFldTxtAttr )
if( !pFldTxtAttr || !pFldTxtAttr->GetpTxtNode() )
break;
- LocaleDataWrapper aLocaleData( LanguageTag( SvxCreateLocale( GetLanguage() )) );
+ LanguageTag aLanguageTag( GetLanguage());
+ LocaleDataWrapper aLocaleData( aLanguageTag );
// erstmal ein "Kurz" - Test - falls beide im selben
// Node stehen!