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

Jochen Nitschke j.nitschke+logerrit at ok.de
Mon Jun 19 06:23:16 UTC 2017


 xmlsecurity/source/dialogs/resourcemanager.cxx |    7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

New commits:
commit 5d391c479ec1498dd01a96a572bb6bc3ef130b2e
Author: Jochen Nitschke <j.nitschke+logerrit at ok.de>
Date:   Sun Jun 18 22:13:22 2017 +0200

    xmlsecurity: make static var local
    
    Change-Id: Ia36941e3ec32bcc4255be523203cf65f7d7b4273
    Reviewed-on: https://gerrit.libreoffice.org/38935
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/xmlsecurity/source/dialogs/resourcemanager.cxx b/xmlsecurity/source/dialogs/resourcemanager.cxx
index e989af368b60..00911d180cbf 100644
--- a/xmlsecurity/source/dialogs/resourcemanager.cxx
+++ b/xmlsecurity/source/dialogs/resourcemanager.cxx
@@ -33,7 +33,6 @@ using namespace std;
 namespace XmlSec
 {
     static ResMgr*          pResMgr = nullptr;
-    static SvtSysLocale*    pSysLocale = nullptr;
 
     ResMgr* GetResMgr()
     {
@@ -44,9 +43,9 @@ namespace XmlSec
 
     const LocaleDataWrapper&    GetLocaleData()
     {
-        if (!pSysLocale)
-            pSysLocale = new SvtSysLocale;
-        return pSysLocale->GetLocaleData();
+        static SvtSysLocale ourSysLocale;
+
+        return ourSysLocale.GetLocaleData();
     }
 
     DateTime GetDateTime( const css::util::DateTime& _rDT )


More information about the Libreoffice-commits mailing list