[Libreoffice-commits] .: 2 commits - sw/inc sw/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Tue Nov 27 05:42:03 PST 2012
sw/inc/breakit.hxx | 39 ++++++++++++++++++++++++++++++++-----
sw/inc/swtypes.hxx | 3 +-
sw/source/core/bastyp/breakit.cxx | 22 ++++++++++++++------
sw/source/core/bastyp/init.cxx | 13 +++++++-----
sw/source/core/doc/docsort.cxx | 2 -
sw/source/core/doc/tblafmt.cxx | 8 +++----
sw/source/core/edit/acorrect.cxx | 4 +--
sw/source/core/fields/authfld.cxx | 2 -
sw/source/core/text/txtfrm.cxx | 2 -
sw/source/core/tox/tox.cxx | 2 -
sw/source/core/unocore/unosrch.cxx | 2 -
sw/source/filter/html/wrthtml.cxx | 3 --
sw/source/ui/dbui/dbinsdlg.cxx | 5 +++-
sw/source/ui/index/swuiidxmrk.cxx | 2 -
sw/source/ui/misc/outline.cxx | 2 -
sw/source/ui/shells/textsh1.cxx | 2 -
sw/source/ui/smartmenu/stmenu.cxx | 4 +--
sw/source/ui/uiview/srcview.cxx | 3 --
sw/source/ui/uiview/viewsrch.cxx | 2 -
sw/source/ui/utlui/attrdesc.cxx | 2 -
20 files changed, 83 insertions(+), 41 deletions(-)
New commits:
commit d5b7bcbd263162b31780b53070f90fe8b3366786
Author: Eike Rathke <erack at redhat.com>
Date: Tue Nov 27 14:39:05 2012 +0100
avoid unnecessary LanguageTag conversions
Change-Id: Ic85bfad73814e9d2a28efc368526f3c1b5a84ad1
diff --git a/sw/inc/breakit.hxx b/sw/inc/breakit.hxx
index 1ce59f7..44b8555 100644
--- a/sw/inc/breakit.hxx
+++ b/sw/inc/breakit.hxx
@@ -35,7 +35,7 @@
#include <com/sun/star/i18n/XBreakIterator.hpp>
#include <com/sun/star/i18n/XScriptTypeDetector.hpp>
#include <com/sun/star/i18n/ForbiddenCharacters.hpp>
-#include <i18npool/lang.h>
+#include <i18npool/languagetag.hxx>
#include <swdllapi.h>
/*************************************************************************
@@ -48,13 +48,13 @@ class SW_DLLPUBLIC SwBreakIt : private ::boost::noncopyable
com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext > m_xContext;
mutable com::sun::star::uno::Reference< com::sun::star::i18n::XBreakIterator > xBreak;
- com::sun::star::lang::Locale * m_pLocale;
+ LanguageTag * m_pLanguageTag; ///< language tag of the current locale
com::sun::star::i18n::ForbiddenCharacters * m_pForbidden;
- LanguageType aLast; ///< language of the current locale
LanguageType aForbiddenLang; ///< language of the current forbiddenChar struct
void _GetLocale( const LanguageType aLang );
+ void _GetLocale( const LanguageTag& rLanguageTag );
void _GetForbidden( const LanguageType aLang );
void createBreakIterator() const;
@@ -81,9 +81,38 @@ public:
const com::sun::star::lang::Locale& GetLocale( const LanguageType aLang )
{
- if( !m_pLocale || aLast != aLang )
+ if( !m_pLanguageTag || m_pLanguageTag->getLanguageType() != aLang )
_GetLocale( aLang );
- return *m_pLocale;
+ return m_pLanguageTag->getLocale();
+ }
+
+ const com::sun::star::lang::Locale& GetLocale( const LanguageTag& rLanguageTag )
+ {
+ // Use LanguageType comparison instead of LanguageTag::operator!=()
+ // because here the LanguageTag is already a known LanguageType value
+ // assigned, so LanguageTag does not need to convert to BCP47 for
+ // comparison.
+ if( !m_pLanguageTag || m_pLanguageTag->getLanguageType() != rLanguageTag.getLanguageType() )
+ _GetLocale( rLanguageTag );
+ return m_pLanguageTag->getLocale();
+ }
+
+ const LanguageTag& GetLanguageTag( const LanguageType aLang )
+ {
+ if( !m_pLanguageTag || m_pLanguageTag->getLanguageType() != aLang )
+ _GetLocale( aLang );
+ return *m_pLanguageTag;
+ }
+
+ const LanguageTag& GetLanguageTag( const LanguageTag& rLanguageTag )
+ {
+ // Use LanguageType comparison instead of LanguageTag::operator!=()
+ // because here the LanguageTag is already a known LanguageType value
+ // assigned, so LanguageTag does not need to convert to BCP47 for
+ // comparison.
+ if( !m_pLanguageTag || m_pLanguageTag->getLanguageType() != rLanguageTag.getLanguageType() )
+ _GetLocale( rLanguageTag );
+ return *m_pLanguageTag;
}
const com::sun::star::i18n::ForbiddenCharacters& GetForbidden( const LanguageType aLang )
diff --git a/sw/inc/swtypes.hxx b/sw/inc/swtypes.hxx
index 4659012..34bb257 100644
--- a/sw/inc/swtypes.hxx
+++ b/sw/inc/swtypes.hxx
@@ -34,7 +34,7 @@
#include <limits.h> //For LONG_MAX.
#include <com/sun/star/uno/Reference.h>
#include "swdllapi.h"
-#include <i18npool/lang.h>
+#include <i18npool/languagetag.hxx>
namespace com { namespace sun { namespace star {
namespace linguistic2{
@@ -245,6 +245,7 @@ namespace nsSetAttrMode
// Returns the APP - CharClass instance - used for all ToUpper/ToLower/...
SW_DLLPUBLIC CharClass& GetAppCharClass();
SW_DLLPUBLIC LanguageType GetAppLanguage();
+SW_DLLPUBLIC const LanguageTag& GetAppLanguageTag();
#if 0
diff --git a/sw/source/core/bastyp/breakit.cxx b/sw/source/core/bastyp/breakit.cxx
index f56cd5d..275385c 100644
--- a/sw/source/core/bastyp/breakit.cxx
+++ b/sw/source/core/bastyp/breakit.cxx
@@ -60,9 +60,8 @@ SwBreakIt * SwBreakIt::Get()
SwBreakIt::SwBreakIt( const uno::Reference<uno::XComponentContext> & rxContext )
: m_xContext( rxContext ),
- m_pLocale( NULL ),
+ m_pLanguageTag( NULL ),
m_pForbidden( NULL ),
- aLast( LANGUAGE_DONTKNOW ),
aForbiddenLang( LANGUAGE_DONTKNOW )
{
OSL_ENSURE( m_xContext.is(), "SwBreakIt: no MultiServiceFactory" );
@@ -70,7 +69,7 @@ SwBreakIt::SwBreakIt( const uno::Reference<uno::XComponentContext> & rxContext )
SwBreakIt::~SwBreakIt()
{
- delete m_pLocale;
+ delete m_pLanguageTag;
delete m_pForbidden;
}
@@ -82,14 +81,23 @@ void SwBreakIt::createBreakIterator() const
void SwBreakIt::_GetLocale( const LanguageType aLang )
{
- aLast = aLang;
- delete m_pLocale;
- m_pLocale = new lang::Locale( LanguageTag( aLast ).getLocale() );
+ if (m_pLanguageTag)
+ m_pLanguageTag->reset( aLang );
+ else
+ m_pLanguageTag = new LanguageTag( aLang );
+}
+
+void SwBreakIt::_GetLocale( const LanguageTag& rLanguageTag )
+{
+ if (m_pLanguageTag)
+ *m_pLanguageTag = rLanguageTag;
+ else
+ m_pLanguageTag = new LanguageTag( rLanguageTag );
}
void SwBreakIt::_GetForbidden( const LanguageType aLang )
{
- LocaleDataWrapper aWrap( m_xContext, LanguageTag( GetLocale( aLang )) );
+ LocaleDataWrapper aWrap( m_xContext, GetLanguageTag( aLang ) );
aForbiddenLang = aLang;
delete m_pForbidden;
diff --git a/sw/source/core/bastyp/init.cxx b/sw/source/core/bastyp/init.cxx
index dcbf6a7..cbf22b9 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(),
- LanguageTag( SwBreakIt::Get()->GetLocale( (LanguageType)GetAppLanguage() )));
+ SwBreakIt::Get()->GetLanguageTag( GetAppLanguageTag() ));
}
return *pAppCharClass;
}
@@ -827,12 +827,16 @@ LanguageType GetAppLanguage()
return Application::GetSettings().GetLanguageTag().getLanguageType();
}
+const LanguageTag& GetAppLanguageTag()
+{
+ return Application::GetSettings().GetLanguageTag();
+}
+
CollatorWrapper& GetAppCollator()
{
if( !pCollator )
{
- const lang::Locale& rLcl = pBreakIt->GetLocale(
- (LanguageType)GetAppLanguage() );
+ const lang::Locale& rLcl = pBreakIt->GetLocale( GetAppLanguage() );
uno::Reference< lang::XMultiServiceFactory > xMSF = ::comphelper::getProcessServiceFactory();
pCollator = new CollatorWrapper( xMSF );
@@ -844,8 +848,7 @@ CollatorWrapper& GetAppCaseCollator()
{
if( !pCaseCollator )
{
- const lang::Locale& rLcl = pBreakIt->GetLocale(
- (LanguageType)GetAppLanguage() );
+ const lang::Locale& rLcl = pBreakIt->GetLocale( GetAppLanguage() );
uno::Reference< lang::XMultiServiceFactory > xMSF = ::comphelper::getProcessServiceFactory();
pCaseCollator = new CollatorWrapper( xMSF );
diff --git a/sw/source/core/doc/docsort.cxx b/sw/source/core/doc/docsort.cxx
index dd4bf79..2753b53 100644
--- a/sw/source/core/doc/docsort.cxx
+++ b/sw/source/core/doc/docsort.cxx
@@ -90,7 +90,7 @@ void SwSortElement::Init( SwDoc* pD, const SwSortOptions& rOpt,
{
case LANGUAGE_NONE:
case LANGUAGE_DONTKNOW:
- nLang = (LanguageType)GetAppLanguage();
+ nLang = GetAppLanguage();
break;
}
pLocale = new lang::Locale( LanguageTag( nLang ).getLocale() );
diff --git a/sw/source/core/doc/tblafmt.cxx b/sw/source/core/doc/tblafmt.cxx
index a861adc..103bf9c 100644
--- a/sw/source/core/doc/tblafmt.cxx
+++ b/sw/source/core/doc/tblafmt.cxx
@@ -308,7 +308,7 @@ SwBoxAutoFmt::SwBoxAutoFmt()
// aBLTR( RES_... ),
aRotateMode( SVX_ROTATE_MODE_STANDARD, 0 )
{
- eSysLanguage = eNumFmtLanguage = static_cast<LanguageType>(::GetAppLanguage());
+ eSysLanguage = eNumFmtLanguage = ::GetAppLanguage();
aBox.SetDistance( 55 );
}
@@ -492,7 +492,7 @@ sal_Bool SwBoxAutoFmt::Load( SvStream& rStream, const SwAfVersions& rVersions, s
eSysLanguage = (LanguageType) eSys;
eNumFmtLanguage = (LanguageType) eLge;
if ( eSysLanguage == LANGUAGE_SYSTEM ) // from old versions (Calc)
- eSysLanguage = static_cast<LanguageType>(::GetAppLanguage());
+ eSysLanguage = ::GetAppLanguage();
}
aStacked.SetValue( aOrientation.IsStacked() );
@@ -759,12 +759,12 @@ void SwTableAutoFmt::UpdateFromSet( sal_uInt8 nPos,
0 != (pNumFormat = pNFmtr->GetEntry( pNumFmtItem->GetValue() )) )
pFmt->SetValueFormat( ((SvNumberformat*)pNumFormat)->GetFormatstring(),
pNumFormat->GetLanguage(),
- static_cast<LanguageType>(::GetAppLanguage()));
+ ::GetAppLanguage());
else
{
// default
pFmt->SetValueFormat( aEmptyStr, LANGUAGE_SYSTEM,
- static_cast<LanguageType>(::GetAppLanguage() ));
+ ::GetAppLanguage() );
}
}
diff --git a/sw/source/core/edit/acorrect.cxx b/sw/source/core/edit/acorrect.cxx
index 8a985ce..d252dbd 100644
--- a/sw/source/core/edit/acorrect.cxx
+++ b/sw/source/core/edit/acorrect.cxx
@@ -329,7 +329,7 @@ sal_Bool SwAutoCorrDoc::ChgAutoCorrWord( xub_StrLen & rSttPos, xub_StrLen nEndPo
LanguageType eLang = GetLanguage(nEndPos, sal_False);
if(LANGUAGE_SYSTEM == eLang)
- eLang = (LanguageType)GetAppLanguage();
+ eLang = GetAppLanguage();
//JP 22.04.99: Bug 63883 - Sonderbehandlung fuer Punkte.
bool bLastCharIsPoint = nEndPos < pTxtNd->GetTxt().Len() &&
@@ -439,7 +439,7 @@ LanguageType SwAutoCorrDoc::GetLanguage( xub_StrLen nPos, sal_Bool bPrevPara ) c
if( pNd )
eRet = pNd->GetLang( nPos, 0 );
if(LANGUAGE_SYSTEM == eRet)
- eRet = (LanguageType)GetAppLanguage();
+ eRet = GetAppLanguage();
return eRet;
}
diff --git a/sw/source/core/fields/authfld.cxx b/sw/source/core/fields/authfld.cxx
index 0e31c09..b65390f 100644
--- a/sw/source/core/fields/authfld.cxx
+++ b/sw/source/core/fields/authfld.cxx
@@ -79,7 +79,7 @@ SwAuthorityFieldType::SwAuthorityFieldType(SwDoc* pDoc)
m_cSuffix(']'),
m_bIsSequence(sal_False),
m_bSortByDocument(sal_True),
- m_eLanguage((LanguageType)::GetAppLanguage())
+ m_eLanguage(::GetAppLanguage())
{
}
diff --git a/sw/source/core/text/txtfrm.cxx b/sw/source/core/text/txtfrm.cxx
index 27b034b..de795f9 100644
--- a/sw/source/core/text/txtfrm.cxx
+++ b/sw/source/core/text/txtfrm.cxx
@@ -329,7 +329,7 @@ SwDigitModeModifier::SwDigitModeModifier( const OutputDevice& rOutp, LanguageTyp
else if ( SvtCTLOptions::NUMERALS_ARABIC == nTextNumerals )
eLang = LANGUAGE_ENGLISH;
else if ( SvtCTLOptions::NUMERALS_SYSTEM == nTextNumerals )
- eLang = (LanguageType)::GetAppLanguage();
+ eLang = ::GetAppLanguage();
((OutputDevice&)rOut).SetDigitLanguage( eLang );
}
diff --git a/sw/source/core/tox/tox.cxx b/sw/source/core/tox/tox.cxx
index 5446366..ff711ab 100644
--- a/sw/source/core/tox/tox.cxx
+++ b/sw/source/core/tox/tox.cxx
@@ -517,7 +517,7 @@ SwTOXBase::SwTOXBase(const SwTOXType* pTyp, const SwForm& rForm,
: SwClient((SwModify*)pTyp),
aForm(rForm),
aTitle(rTitle),
- eLanguage((LanguageType)::GetAppLanguage()),
+ eLanguage(::GetAppLanguage()),
nCreateType(nCreaType),
nOLEOptions(0),
eCaptionDisplay(CAPTION_COMPLETE),
diff --git a/sw/source/core/unocore/unosrch.cxx b/sw/source/core/unocore/unosrch.cxx
index a738f49..d897153 100644
--- a/sw/source/core/unocore/unosrch.cxx
+++ b/sw/source/core/unocore/unosrch.cxx
@@ -730,7 +730,7 @@ void SwXTextSearch::FillSearchOptions( util::SearchOptions& rSearchOpt ) const
else
rSearchOpt.algorithmType = util::SearchAlgorithms_ABSOLUTE;
- rSearchOpt.Locale = LanguageTag( GetAppLanguage() ).getLocale();
+ rSearchOpt.Locale = GetAppLanguageTag().getLocale();
rSearchOpt.searchString = sSearchText;
rSearchOpt.replaceString = sReplaceText;
diff --git a/sw/source/filter/html/wrthtml.cxx b/sw/source/filter/html/wrthtml.cxx
index 67c6a56..3fb52dc 100644
--- a/sw/source/filter/html/wrthtml.cxx
+++ b/sw/source/filter/html/wrthtml.cxx
@@ -266,8 +266,7 @@ sal_uLong SwHTMLWriter::WriteStream()
nHeaderFooterSpace = 0;
nTxtAttrsToIgnore = 0;
nCSS1OutMode = 0;
- sal_uInt16 nScript = SvtLanguageOptions::GetScriptTypeOfLanguage(
- static_cast< LanguageType >( GetAppLanguage() ) );
+ sal_uInt16 nScript = SvtLanguageOptions::GetScriptTypeOfLanguage( GetAppLanguage() );
switch( nScript )
{
case SCRIPTTYPE_ASIAN:
diff --git a/sw/source/ui/dbui/dbinsdlg.cxx b/sw/source/ui/dbui/dbinsdlg.cxx
index e4e6a6d..076a8dd 100644
--- a/sw/source/ui/dbui/dbinsdlg.cxx
+++ b/sw/source/ui/dbui/dbinsdlg.cxx
@@ -1673,7 +1673,7 @@ void SwInsertDBColAutoPilot::Commit()
else
{
pSubValues[4].Value <<= rtl::OUString(sTmp);
- eLang = (LanguageType)GetAppLanguage();
+ eLang = GetAppLanguage();
}
if( eLang != ePrevLang )
diff --git a/sw/source/ui/index/swuiidxmrk.cxx b/sw/source/ui/index/swuiidxmrk.cxx
index 22b1861..5e08dc6 100644
--- a/sw/source/ui/index/swuiidxmrk.cxx
+++ b/sw/source/ui/index/swuiidxmrk.cxx
@@ -450,7 +450,7 @@ static void lcl_SelectSameStrings(SwWrtShell& rSh, sal_Bool bWordOnly, sal_Bool
SearchAlgorithms_ABSOLUTE,
( bWordOnly ? SearchFlags::NORM_WORD_ONLY : 0 ),
rSh.GetSelTxt(), OUString(),
- LanguageTag( GetAppLanguage() ).getLocale(),
+ GetAppLanguageTag().getLocale(),
0, 0, 0,
(bCaseSensitive
? 0
diff --git a/sw/source/ui/misc/outline.cxx b/sw/source/ui/misc/outline.cxx
index 222da29..04e40b2 100644
--- a/sw/source/ui/misc/outline.cxx
+++ b/sw/source/ui/misc/outline.cxx
@@ -953,7 +953,7 @@ void NumberingPreview::Paint( const Rectangle& /*rRect*/ )
sal_uInt16 nYStart = 4;
sal_uInt16 nYStep = sal_uInt16((aSize.Height() - 6)/ MAXLEVEL);
aStdFont = OutputDevice::GetDefaultFont(
- DEFAULTFONT_UI_SANS, (LanguageType)GetAppLanguage(),
+ DEFAULTFONT_UI_SANS, GetAppLanguage(),
DEFAULTFONT_FLAGS_ONLYONE, this );
// #101524# OJ
aStdFont.SetColor( SwViewOption::GetFontColor() );
diff --git a/sw/source/ui/shells/textsh1.cxx b/sw/source/ui/shells/textsh1.cxx
index e2faab9..1b521cb 100644
--- a/sw/source/ui/shells/textsh1.cxx
+++ b/sw/source/ui/shells/textsh1.cxx
@@ -1605,7 +1605,7 @@ void SwTextShell::GetState( SfxItemSet &rSet )
aActionIndicesSequence );
uno::Reference <frame::XController> xController = GetView().GetController();
- const lang::Locale aLocale( SW_BREAKITER()->GetLocale( (LanguageType)GetAppLanguage() ) );
+ const lang::Locale aLocale( SW_BREAKITER()->GetLocale( GetAppLanguageTag() ) );
const rtl::OUString aApplicationName( rSmartTagMgr.GetApplicationName() );
const rtl::OUString aRangeText = xRange->getString();
diff --git a/sw/source/ui/smartmenu/stmenu.cxx b/sw/source/ui/smartmenu/stmenu.cxx
index 211a107..64d1cce 100644
--- a/sw/source/ui/smartmenu/stmenu.cxx
+++ b/sw/source/ui/smartmenu/stmenu.cxx
@@ -42,7 +42,7 @@ SwSmartTagPopup::SwSmartTagPopup( SwView* pSwView,
mxTextRange( xTextRange )
{
Reference <frame::XController> xController = mpSwView->GetController();
- const lang::Locale aLocale( SW_BREAKITER()->GetLocale( (LanguageType)GetAppLanguage() ) );
+ const lang::Locale aLocale( SW_BREAKITER()->GetLocale( GetAppLanguageTag() ) );
sal_uInt16 nMenuPos = 0;
sal_uInt16 nSubMenuPos = 0;
@@ -160,7 +160,7 @@ sal_uInt16 SwSmartTagPopup::Execute( const Rectangle& rWordPos, Window* pWin )
maInvokeActions[ nId ].mxSmartTagProperties,
mxTextRange->getString(),
rtl::OUString(),
- SW_BREAKITER()->GetLocale( (LanguageType)GetAppLanguage() ) );
+ SW_BREAKITER()->GetLocale( GetAppLanguageTag() ) );
}
}
diff --git a/sw/source/ui/uiview/srcview.cxx b/sw/source/ui/uiview/srcview.cxx
index ff7d51d..2d077b0 100644
--- a/sw/source/ui/uiview/srcview.cxx
+++ b/sw/source/ui/uiview/srcview.cxx
@@ -585,8 +585,7 @@ sal_uInt16 SwSrcView::StartSearchAndReplace(const SvxSearchItem& rSearchItem,
}
util::SearchOptions aSearchOpt( rSearchItem.GetSearchOptions() );
- aSearchOpt.Locale = LanguageTag(
- static_cast< LanguageType >( GetAppLanguage() ) ).getLocale();
+ aSearchOpt.Locale = GetAppLanguageTag().getLocale();
sal_uInt16 nFound;
sal_Bool bAll = sal_False;
diff --git a/sw/source/ui/uiview/viewsrch.cxx b/sw/source/ui/uiview/viewsrch.cxx
index 37d9757..6e515d3 100644
--- a/sw/source/ui/uiview/viewsrch.cxx
+++ b/sw/source/ui/uiview/viewsrch.cxx
@@ -731,7 +731,7 @@ sal_uLong SwView::FUNC_Search( const SwSearchOptions& rOptions )
// build SearchOptions to be used
//
SearchOptions aSearchOpt( pSrchItem->GetSearchOptions() );
- aSearchOpt.Locale = LanguageTag( (sal_uInt16)GetAppLanguage() ).getLocale();
+ aSearchOpt.Locale = GetAppLanguageTag().getLocale();
if( !bDoReplace )
aSearchOpt.replaceString = aEmptyStr;
diff --git a/sw/source/ui/utlui/attrdesc.cxx b/sw/source/ui/utlui/attrdesc.cxx
index ef37907..71af930 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(),
- LanguageTag( GetAppLanguage()) );
+ GetAppLanguageTag() );
while( sal_True )
{
aIter.GetCurItem()->GetPresentation( ePres, eCoreMetric,
commit cb5df8a899a2f6795f857c4d300b6a3cf8977d20
Author: Eike Rathke <erack at redhat.com>
Date: Tue Nov 27 11:24:59 2012 +0100
added a FIXME marker
Change-Id: If6f15e57154da159999d570178eea896e43c4d45
diff --git a/sw/source/ui/dbui/dbinsdlg.cxx b/sw/source/ui/dbui/dbinsdlg.cxx
index 6b6511c..e4e6a6d 100644
--- a/sw/source/ui/dbui/dbinsdlg.cxx
+++ b/sw/source/ui/dbui/dbinsdlg.cxx
@@ -1765,6 +1765,9 @@ void SwInsertDBColAutoPilot::Load()
rtl::OUString sNumberFormatLocale;
pSubProps[5] >>= sNumberFormatLocale;
+ /* FIXME-BCP47: handle language tags, and cope with the wrong
+ * Country-Language string that
+ * SwInsertDBColAutoPilot::Commit() writes so far! */
lang::Locale aLocale;
aLocale.Language = sNumberFormatLocale.copy(0, 2);
aLocale.Country = sNumberFormatLocale.copy(3, 2);
More information about the Libreoffice-commits
mailing list