[Libreoffice-commits] core.git: linguistic/source

Eike Rathke erack at redhat.com
Tue Aug 30 19:54:08 UTC 2016


 linguistic/source/misc.cxx |    6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

New commits:
commit 1fe51b19829d1393f0e376ec65b889b61d1b1ba1
Author: Eike Rathke <erack at redhat.com>
Date:   Tue Aug 30 21:53:21 2016 +0200

    construct only when needed
    
    Change-Id: I5729e80bdaf726c64edf3d50f7225b2181f6e2c9

diff --git a/linguistic/source/misc.cxx b/linguistic/source/misc.cxx
index 160af548..353d2de 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;
 }
 


More information about the Libreoffice-commits mailing list