diff options
author | Eike Rathke <erack@redhat.com> | 2016-08-30 21:53:21 +0200 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2016-08-30 21:53:46 +0200 |
commit | 1fe51b19829d1393f0e376ec65b889b61d1b1ba1 (patch) | |
tree | dc8f65be930142386b9fc75c141a7ee902377e07 /linguistic | |
parent | dc83b3ae470914dbcb08fe1f0a4a4e1a1d3d8e19 (diff) |
construct only when needed
Change-Id: I5729e80bdaf726c64edf3d50f7225b2181f6e2c9
Diffstat (limited to 'linguistic')
-rw-r--r-- | linguistic/source/misc.cxx | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/linguistic/source/misc.cxx b/linguistic/source/misc.cxx index 160af548b84f..353d2decc5af 100644 --- a/linguistic/source/misc.cxx +++ b/linguistic/source/misc.cxx @@ -72,10 +72,8 @@ LocaleDataWrapper & GetLocaleDataWrapper( sal_Int16 nLang ) { static LocaleDataWrapper aLclDtaWrp( SvtSysLocale().GetLanguageTag() ); - const LanguageTag &rLcl = aLclDtaWrp.getLoadedLanguageTag(); - LanguageTag aLcl( nLang ); - if (aLcl != rLcl) - aLclDtaWrp.setLanguageTag( aLcl ); + if (nLang != aLclDtaWrp.getLoadedLanguageTag().getLanguageType()) + aLclDtaWrp.setLanguageTag( LanguageTag( nLang ) ); return aLclDtaWrp; } |