summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2012-11-23 23:06:10 +0100
committerEike Rathke <erack@redhat.com>2012-11-23 23:09:16 +0100
commitaf60316514f3ae3d4c475819bf86f2af837171e3 (patch)
treeccfbd673bd4a53047a04dad6457d09c7eea1566c /sw
parent37f5b864014e9ad17a561b77ea9f6141650e92ad (diff)
some i18n wrappers with LanguageTag
Change-Id: I2ceaa3159e8669c2c569fa8559c1e061dcad399d
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/bastyp/breakit.cxx2
-rw-r--r--sw/source/core/bastyp/calc.cxx16
-rw-r--r--sw/source/core/bastyp/init.cxx2
-rw-r--r--sw/source/core/doc/docsort.cxx2
-rw-r--r--sw/source/core/edit/autofmt.cxx2
-rw-r--r--sw/source/core/fields/docufld.cxx4
-rw-r--r--sw/source/core/fields/expfld.cxx2
-rw-r--r--sw/source/core/fields/fldbas.cxx2
-rw-r--r--sw/source/core/fields/reffld.cxx2
-rw-r--r--sw/source/core/tox/txmsrt.cxx2
-rw-r--r--sw/source/core/txtnode/txtedt.cxx6
-rw-r--r--sw/source/filter/ww8/ww8atr.cxx2
-rw-r--r--sw/source/filter/ww8/ww8scan.cxx4
-rw-r--r--sw/source/ui/app/docstyle.cxx2
-rw-r--r--sw/source/ui/fldui/fldmgr.cxx2
-rw-r--r--sw/source/ui/fldui/inpdlg.cxx2
-rw-r--r--sw/source/ui/utlui/attrdesc.cxx2
-rw-r--r--sw/source/ui/utlui/numfmtlb.cxx2
18 files changed, 29 insertions, 29 deletions
diff --git a/sw/source/core/bastyp/breakit.cxx b/sw/source/core/bastyp/breakit.cxx
index b4c42753ef55..643ec11c6b5b 100644
--- a/sw/source/core/bastyp/breakit.cxx
+++ b/sw/source/core/bastyp/breakit.cxx
@@ -89,7 +89,7 @@ void SwBreakIt::_GetLocale( const LanguageType aLang )
void SwBreakIt::_GetForbidden( const LanguageType aLang )
{
- LocaleDataWrapper aWrap( m_xContext, GetLocale( aLang ) );
+ LocaleDataWrapper aWrap( m_xContext, LanguageTag( GetLocale( aLang )) );
aForbiddenLang = aLang;
delete m_pForbidden;
diff --git a/sw/source/core/bastyp/calc.cxx b/sw/source/core/bastyp/calc.cxx
index b484381ec38e..27e664249bd2 100644
--- a/sw/source/core/bastyp/calc.cxx
+++ b/sw/source/core/bastyp/calc.cxx
@@ -254,12 +254,12 @@ SwCalc::SwCalc( SwDoc& rD )
memset( VarTable, 0, sizeof(VarTable) );
LanguageType eLang = GetDocAppScriptLang( rDoc );
- if( eLang != SvxLocaleToLanguage( pLclData->getLocale() ) ||
- eLang != SvxLocaleToLanguage( pCharClass->getLocale() ) )
+ if( eLang != SvxLocaleToLanguage( pLclData->getLanguageTag().getLocale() ) ||
+ eLang != SvxLocaleToLanguage( pCharClass->getLanguageTag().getLocale() ) )
{
- ::com::sun::star::lang::Locale aLocale( SvxCreateLocale( eLang ));
- pCharClass = new CharClass( ::comphelper::getProcessComponentContext(), aLocale );
- pLclData = new LocaleDataWrapper( aLocale );
+ LanguageTag aLanguageTag( SvxCreateLocale( eLang ));
+ pCharClass = new CharClass( ::comphelper::getProcessComponentContext(), aLanguageTag );
+ pLclData = new LocaleDataWrapper( aLanguageTag );
}
sCurrSym = comphelper::string::strip(pLclData->getCurrSymbol(), ' ');
@@ -560,7 +560,7 @@ SwCalcExp* SwCalc::VarLook( const String& rStr, sal_uInt16 ins )
rtl::OUString sResult;
double nNumber = DBL_MAX;
- long nLang = SvxLocaleToLanguage( pLclData->getLocale() );
+ long nLang = SvxLocaleToLanguage( pLclData->getLanguageTag().getLocale() );
if(pMgr->GetColumnCnt( sSourceName, sTableName, sColumnName,
nTmpRec, nLang, sResult, &nNumber ))
{
@@ -1539,9 +1539,9 @@ bool SwCalc::Str2Double( const String& rCommand, xub_StrLen& rCommandPos,
{
LanguageType eLang = GetDocAppScriptLang( *pDoc );
if (eLang !=
- SvxLocaleToLanguage(aSysLocale.GetLocaleData().getLocale()))
+ SvxLocaleToLanguage(aSysLocale.GetLanguageTag().getLocale()))
{
- pLclD.reset( new LocaleDataWrapper( SvxCreateLocale( eLang ) ) );
+ pLclD.reset( new LocaleDataWrapper( LanguageTag( SvxCreateLocale( eLang )) ) );
}
}
diff --git a/sw/source/core/bastyp/init.cxx b/sw/source/core/bastyp/init.cxx
index 678e074a6c3d..3f67271694ca 100644
--- a/sw/source/core/bastyp/init.cxx
+++ b/sw/source/core/bastyp/init.cxx
@@ -810,7 +810,7 @@ CharClass& GetAppCharClass()
{
pAppCharClass = new CharClass(
::comphelper::getProcessComponentContext(),
- SwBreakIt::Get()->GetLocale( (LanguageType)GetAppLanguage() ));
+ LanguageTag( SwBreakIt::Get()->GetLocale( (LanguageType)GetAppLanguage() )));
}
return *pAppCharClass;
}
diff --git a/sw/source/core/doc/docsort.cxx b/sw/source/core/doc/docsort.cxx
index 363594b42fa6..6932f5b13288 100644
--- a/sw/source/core/doc/docsort.cxx
+++ b/sw/source/core/doc/docsort.cxx
@@ -117,7 +117,7 @@ SwSortElement::~SwSortElement()
double SwSortElement::StrToDouble( const String& rStr ) const
{
if( !pLclData )
- pLclData = new LocaleDataWrapper( *pLocale );
+ pLclData = new LocaleDataWrapper( LanguageTag( *pLocale ));
rtl_math_ConversionStatus eStatus;
sal_Int32 nEnd;
diff --git a/sw/source/core/edit/autofmt.cxx b/sw/source/core/edit/autofmt.cxx
index 8c3096b11bd1..a1ed01e0b113 100644
--- a/sw/source/core/edit/autofmt.cxx
+++ b/sw/source/core/edit/autofmt.cxx
@@ -274,7 +274,7 @@ SwTxtFrm* SwAutoFormat::GetFrm( const SwTxtNode& rTxtNd ) const
void SwAutoFormat::_GetCharClass( LanguageType eLang )
{
delete pCharClass;
- pCharClass = new CharClass( SvxCreateLocale( eLang ));
+ pCharClass = new CharClass( LanguageTag( SvxCreateLocale( eLang )));
eCharClassLang = eLang;
}
diff --git a/sw/source/core/fields/docufld.cxx b/sw/source/core/fields/docufld.cxx
index c0c88e9c3225..d434a7a2f041 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)->getLocale() ) )
+ if( nLang != SvxLocaleToLanguage( (*ppLocalData)->getLanguageTag().getLocale() ) )
*ppLocalData = new LocaleDataWrapper(
- SvxCreateLocale( static_cast<LanguageType>(nLang) ) );
+ LanguageTag( SvxCreateLocale( 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 0e11e2769104..eb491ec1fb21 100644
--- a/sw/source/core/fields/expfld.cxx
+++ b/sw/source/core/fields/expfld.cxx
@@ -927,7 +927,7 @@ xub_StrLen SwGetExpField::GetReferenceTextPos( const SwFmtFld& rFmt, SwDoc& rDoc
{
LanguageType eLang = ((SvxLanguageItem&)aSet.Get(
GetWhichOfScript( RES_CHRATR_LANGUAGE, nSrcpt )) ).GetLanguage();
- CharClass aCC( SvxCreateLocale( eLang ));
+ CharClass aCC( LanguageTag( SvxCreateLocale( eLang )));
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 f2439f1f49f4..be7934f0cb3a 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().GetLocaleData().getLocale() );
+ sal_uInt16 nLng = SvxLocaleToLanguage( SvtSysLocale().GetLanguageTag().getLocale() );
if (pEntry && nLng != pEntry->GetLanguage())
{
diff --git a/sw/source/core/fields/reffld.cxx b/sw/source/core/fields/reffld.cxx
index 6690cead08fc..bec55fb60430 100644
--- a/sw/source/core/fields/reffld.cxx
+++ b/sw/source/core/fields/reffld.cxx
@@ -470,7 +470,7 @@ void SwGetRefField::UpdateField( const SwTxtFld* pFldTxtAttr )
if( !pFldTxtAttr || !pFldTxtAttr->GetpTxtNode() )
break;
- LocaleDataWrapper aLocaleData( SvxCreateLocale( GetLanguage() ) );
+ LocaleDataWrapper aLocaleData( LanguageTag( SvxCreateLocale( GetLanguage() )) );
// erstmal ein "Kurz" - Test - falls beide im selben
// Node stehen!
diff --git a/sw/source/core/tox/txmsrt.cxx b/sw/source/core/tox/txmsrt.cxx
index 135572f0e10d..0e2cb2ab3203 100644
--- a/sw/source/core/tox/txmsrt.cxx
+++ b/sw/source/core/tox/txmsrt.cxx
@@ -100,7 +100,7 @@ void SwTOXInternational::Init()
else
pIndexWrapper->LoadAlgorithm( aLcl, sSortAlgorithm, SW_COLLATOR_IGNORES );
- pCharClass = new CharClass( aLcl );
+ pCharClass = new CharClass( LanguageTag( aLcl ));
}
diff --git a/sw/source/core/txtnode/txtedt.cxx b/sw/source/core/txtnode/txtedt.cxx
index f0d6980d3a9b..c9a13b376659 100644
--- a/sw/source/core/txtnode/txtedt.cxx
+++ b/sw/source/core/txtnode/txtedt.cxx
@@ -750,7 +750,7 @@ sal_Bool SwScanner::NextWord()
Boundary aBound;
CharClass& rCC = GetAppCharClass();
- lang::Locale aOldLocale = rCC.getLocale();
+ LanguageTag aOldLanguageTag = rCC.getLanguageTag();
while ( true )
{
@@ -769,7 +769,7 @@ sal_Bool SwScanner::NextWord()
if ( nWordType != i18n::WordType::WORD_COUNT )
{
- rCC.setLocale( pBreakIt->GetLocale( aCurrLang ) );
+ rCC.setLanguageTag( LanguageTag( pBreakIt->GetLocale( aCurrLang )) );
if ( rCC.isLetterNumeric(rtl::OUString(aText[nBegin])) )
break;
}
@@ -802,7 +802,7 @@ sal_Bool SwScanner::NextWord()
break;
} // end while( true )
- rCC.setLocale( aOldLocale );
+ rCC.setLanguageTag( aOldLanguageTag );
// #i89042, as discussed with HDU: don't evaluate script changes for word count. Use whole word.
if ( nWordType == i18n::WordType::WORD_COUNT )
diff --git a/sw/source/filter/ww8/ww8atr.cxx b/sw/source/filter/ww8/ww8atr.cxx
index 1c520aaf5185..632a56964c10 100644
--- a/sw/source/filter/ww8/ww8atr.cxx
+++ b/sw/source/filter/ww8/ww8atr.cxx
@@ -2343,7 +2343,7 @@ bool MSWordExportBase::GetNumberFmt(const SwField& rFld, String& rStr)
{
sal_uInt16 nLng = rFld.GetLanguage();
LocaleDataWrapper aLocDat(comphelper::getComponentContext(pNFmtr->GetServiceManager()),
- LanguageTag(nLng).getLocale());
+ LanguageTag(nLng));
String sFmt(pNumFmt->GetMappedFormatstring(GetNfKeywordTable(),
aLocDat));
diff --git a/sw/source/filter/ww8/ww8scan.cxx b/sw/source/filter/ww8/ww8scan.cxx
index 925543b3acfd..c00338e81720 100644
--- a/sw/source/filter/ww8/ww8scan.cxx
+++ b/sw/source/filter/ww8/ww8scan.cxx
@@ -5589,8 +5589,8 @@ WW8Fib::WW8Fib(sal_uInt8 nVer)
lidFE = lid;
Locale aTempLocale;
- SvxLanguageToLocale( aTempLocale, lid );
- LocaleDataWrapper aLocaleWrapper( aTempLocale );
+ LanguageTag aLanguageTag( SvxLanguageToLocale( aTempLocale, lid ));
+ LocaleDataWrapper aLocaleWrapper( aLanguageTag );
nNumDecimalSep = aLocaleWrapper.getNumDecimalSep()[0];
}
diff --git a/sw/source/ui/app/docstyle.cxx b/sw/source/ui/app/docstyle.cxx
index ca7e2ac3fbed..e86b6ddb165c 100644
--- a/sw/source/ui/app/docstyle.cxx
+++ b/sw/source/ui/app/docstyle.cxx
@@ -584,7 +584,7 @@ String SwDocStyleSheet::GetDescription(SfxMapUnit eUnit)
{
IntlWrapper aIntlWrapper(
::comphelper::getProcessServiceFactory(),
- SvtSysLocale().GetLocaleData().getLocale());
+ SvtSysLocale().GetLanguageTag());
rtl::OUString sPlus(" + ");
if ( SFX_STYLE_FAMILY_PAGE == nFamily )
diff --git a/sw/source/ui/fldui/fldmgr.cxx b/sw/source/ui/fldui/fldmgr.cxx
index bd5df73d0ecf..e5ad5db5eb60 100644
--- a/sw/source/ui/fldui/fldmgr.cxx
+++ b/sw/source/ui/fldui/fldmgr.cxx
@@ -1605,7 +1605,7 @@ sal_uInt16 SwFldMgr::GetCurrLanguage() const
SwWrtShell* pSh = pWrtShell ? pWrtShell : ::lcl_GetShell();
if( pSh )
return pSh->GetCurLang();
- return SvxLocaleToLanguage( SvtSysLocale().GetLocaleData().getLocale() );
+ return SvxLocaleToLanguage( SvtSysLocale().GetLanguageTag().getLocale() );
}
void SwFieldType::_GetFldName()
diff --git a/sw/source/ui/fldui/inpdlg.cxx b/sw/source/ui/fldui/inpdlg.cxx
index 171620696d1e..e71b64621847 100644
--- a/sw/source/ui/fldui/inpdlg.cxx
+++ b/sw/source/ui/fldui/inpdlg.cxx
@@ -111,7 +111,7 @@ SwFldInputDlg::SwFldInputDlg( Window *pParent, SwWrtShell &rS,
pSetFld = (SwSetExpField*)pField;
String sFormula(pSetFld->GetFormula());
//values are formatted - formulas are not
- CharClass aCC( SvxCreateLocale( pSetFld->GetLanguage() ));
+ CharClass aCC( LanguageTag( SvxCreateLocale( pSetFld->GetLanguage() )));
if( aCC.isNumeric( sFormula ))
{
aStr = pSetFld->ExpandField(true);
diff --git a/sw/source/ui/utlui/attrdesc.cxx b/sw/source/ui/utlui/attrdesc.cxx
index 2bcc85248634..ef379077073e 100644
--- a/sw/source/ui/utlui/attrdesc.cxx
+++ b/sw/source/ui/utlui/attrdesc.cxx
@@ -83,7 +83,7 @@ void SwAttrSet::GetPresentation(
{
SfxItemIter aIter( *this );
const IntlWrapper rInt( ::comphelper::getProcessServiceFactory(),
- GetAppLanguage() );
+ LanguageTag( GetAppLanguage()) );
while( sal_True )
{
aIter.GetCurItem()->GetPresentation( ePres, eCoreMetric,
diff --git a/sw/source/ui/utlui/numfmtlb.cxx b/sw/source/ui/utlui/numfmtlb.cxx
index 71def9e92e66..430ab33d66a1 100644
--- a/sw/source/ui/utlui/numfmtlb.cxx
+++ b/sw/source/ui/utlui/numfmtlb.cxx
@@ -103,7 +103,7 @@ void NumFormatListBox::Init(short nFormatType, sal_Bool bUsrFmts)
if (pView)
eCurLanguage = pView->GetWrtShell().GetCurLang();
else
- eCurLanguage = SvxLocaleToLanguage( SvtSysLocale().GetLocaleData().getLocale() );
+ eCurLanguage = SvxLocaleToLanguage( SvtSysLocale().GetLanguageTag().getLocale() );
if (bUsrFmts == sal_False)
{