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

Stephan Bergmann sbergman at redhat.com
Tue May 16 13:12:25 UTC 2017


 desktop/source/app/app.cxx |   32 +++++---------------------------
 1 file changed, 5 insertions(+), 27 deletions(-)

New commits:
commit a40e0d00ba597a12de42334ee78af9c5fc68e65e
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Tue May 16 15:09:14 2017 +0200

    Remove dead rtl::Static instances
    
    ...effectively dead ever since c1758889cbd5e8e4afb1044425c908715eb3e1cd "Heavily
    simplified utl::ConfigManager" changed the references into them (rBrandName
    etc.) into non-references (for reasons lost).
    
    Change-Id: Ib77fb458ade9d9b53ec5c1cc1e38785a47c42c42

diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx
index 4a86547a56d9..50e1efe5f5cd 100644
--- a/desktop/source/app/app.cxx
+++ b/desktop/source/app/app.cxx
@@ -456,18 +456,8 @@ CommandLineArgs& Desktop::GetCommandLineArgs()
 
 namespace
 {
-    struct BrandName
-        : public rtl::Static< OUString, BrandName > {};
-    struct Version
-        : public rtl::Static< OUString, Version > {};
-    struct AboutBoxVersion
-        : public rtl::Static< OUString, AboutBoxVersion > {};
-    struct AboutBoxVersionSuffix
-        : public rtl::Static< OUString, AboutBoxVersionSuffix > {};
     struct OOOVendor
         : public rtl::Static< OUString, OOOVendor > {};
-    struct Extension
-        : public rtl::Static< OUString, Extension > {};
 }
 
 OUString ReplaceStringHookProc( const OUString& rStr )
@@ -478,23 +468,11 @@ OUString ReplaceStringHookProc( const OUString& rStr )
     static std::once_flag aInitOnce;
     std::call_once(aInitOnce, []
     {
-        sBrandName = BrandName::get();
-        sVersion = Version::get();
-        sAboutBoxVersion = AboutBoxVersion::get();
-        sAboutBoxVersionSuffix = AboutBoxVersionSuffix::get();
-        sExtension = Extension::get();
-
-        if ( sBrandName.isEmpty() )
-        {
-            sBrandName = utl::ConfigManager::getProductName();
-            sVersion = utl::ConfigManager::getProductVersion();
-            sAboutBoxVersion = utl::ConfigManager::getAboutBoxProductVersion();
-            sAboutBoxVersionSuffix = utl::ConfigManager::getAboutBoxProductVersionSuffix();
-            if (sExtension.isEmpty())
-            {
-                sExtension = utl::ConfigManager::getProductExtension();
-            }
-        }
+        sBrandName = utl::ConfigManager::getProductName();
+        sVersion = utl::ConfigManager::getProductVersion();
+        sAboutBoxVersion = utl::ConfigManager::getAboutBoxProductVersion();
+        sAboutBoxVersionSuffix = utl::ConfigManager::getAboutBoxProductVersionSuffix();
+        sExtension = utl::ConfigManager::getProductExtension();
     } );
 
     OUString sRet(rStr);


More information about the Libreoffice-commits mailing list