chart2/source/tools/ResourceManager.cxx | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-)
New commits: commit 23109bc47daf037b76b3188c3ac3030873cb8529 Author: Michael Meeks <michael.me...@collabora.com> Date: Thu Apr 26 21:25:43 2018 +0100 Localize chart strings properly. Change-Id: I982c95a50c1b4cd9f03f45b0203e06aca3711969 Reviewed-on: https://gerrit.libreoffice.org/53544 Reviewed-by: Aron Budea <aron.bu...@collabora.com> Tested-by: Aron Budea <aron.bu...@collabora.com> diff --git a/chart2/source/tools/ResourceManager.cxx b/chart2/source/tools/ResourceManager.cxx index 3f3fb615697a..ee842e701d48 100644 --- a/chart2/source/tools/ResourceManager.cxx +++ b/chart2/source/tools/ResourceManager.cxx @@ -19,6 +19,7 @@ #include "ResourceManager.hxx" +#include <vcl/svapp.hxx> #include <tools/resmgr.hxx> namespace chart @@ -27,11 +28,12 @@ namespace chart ResMgr & ResourceManager::getResourceManager() { // not threadsafe - static ResMgr * pResourceManager = nullptr; - if( ! pResourceManager ) - pResourceManager = ResMgr::CreateResMgr("chartcontroller"); + static std::unique_ptr<ResMgr> pResourceManager; + const LanguageTag& rLocale = Application::GetSettings().GetUILanguageTag(); + if( ! pResourceManager || pResourceManager->GetLocale() != rLocale ) + pResourceManager.reset( ResMgr::CreateResMgr("chartcontroller", rLocale) ); OSL_ASSERT( pResourceManager ); - return *pResourceManager; + return *pResourceManager.get(); } } // namespace chart _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits