desktop/source/deployment/gui/dp_gui_service.cxx | 41 +++-------------------- 1 file changed, 6 insertions(+), 35 deletions(-)
New commits: commit 31014301cbb1e9f4b2f7d8970901b7cea4938f80 Author: Mike Kaganski <mike.kagan...@collabora.com> AuthorDate: Sat Jan 11 19:40:53 2020 +0300 Commit: Mike Kaganski <mike.kagan...@collabora.com> CommitDate: Sat Jan 11 18:27:32 2020 +0100 Replace rtl::Static uses with statics Change-Id: Ifef42ffc1b27be0225d0d33b21d74ba3ea0b231e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86610 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com> diff --git a/desktop/source/deployment/gui/dp_gui_service.cxx b/desktop/source/deployment/gui/dp_gui_service.cxx index a333705a561d..5110308bf787 100644 --- a/desktop/source/deployment/gui/dp_gui_service.cxx +++ b/desktop/source/deployment/gui/dp_gui_service.cxx @@ -86,46 +86,17 @@ void MyApp::DeInit() comphelper::setProcessServiceFactory(nullptr); } -namespace -{ - struct ProductName - : public rtl::Static< OUString, ProductName > {}; - 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 > {}; -} - static OUString ReplaceProductNameHookProc( const OUString& rStr ) { if (rStr.indexOf( "%PRODUCT" ) == -1) return rStr; - OUString sProductName = ProductName::get(); - OUString sVersion = Version::get(); - OUString sAboutBoxVersion = AboutBoxVersion::get(); - OUString sAboutBoxVersionSuffix = AboutBoxVersionSuffix::get(); - OUString sExtension = Extension::get(); - OUString sOOOVendor = OOOVendor::get(); - - if ( sProductName.isEmpty() ) - { - sProductName = utl::ConfigManager::getProductName(); - sVersion = utl::ConfigManager::getProductVersion(); - sAboutBoxVersion = utl::ConfigManager::getAboutBoxProductVersion(); - sAboutBoxVersionSuffix = utl::ConfigManager::getAboutBoxProductVersionSuffix(); - sOOOVendor = utl::ConfigManager::getVendor(); - if ( sExtension.isEmpty() ) - { - sExtension = utl::ConfigManager::getProductExtension(); - } - } + static const OUString sProductName = utl::ConfigManager::getProductName(); + static const OUString sVersion = utl::ConfigManager::getProductVersion(); + static const OUString sAboutBoxVersion = utl::ConfigManager::getAboutBoxProductVersion(); + static const OUString sAboutBoxVersionSuffix = utl::ConfigManager::getAboutBoxProductVersionSuffix(); + static const OUString sExtension = utl::ConfigManager::getProductExtension(); + static const OUString sOOOVendor = utl::ConfigManager::getVendor(); OUString sRet = rStr.replaceAll( "%PRODUCTNAME", sProductName ); sRet = sRet.replaceAll( "%PRODUCTVERSION", sVersion ); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits