diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-08-13 13:33:08 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-08-13 15:35:36 +0200 |
commit | 9753428dfc2bf038188c9a59af7fd2d789b46517 (patch) | |
tree | 923a3d1888dbadc38436de76b9cad343be5380fe /framework/source/services | |
parent | 53b8fcbd3f81903b171fd59478abf0283c6feb24 (diff) |
rtl::Static -> thread-safe static local
Change-Id: If5b7181fb1bb3f3f21ec3742680e5a3e12b21b73
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120431
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'framework/source/services')
-rw-r--r-- | framework/source/services/desktop.cxx | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/framework/source/services/desktop.cxx b/framework/source/services/desktop.cxx index ea2f0cac77f5..c369998365fe 100644 --- a/framework/source/services/desktop.cxx +++ b/framework/source/services/desktop.cxx @@ -51,7 +51,6 @@ #include <comphelper/sequence.hxx> #include <comphelper/lok.hxx> #include <cppuhelper/supportsservice.hxx> -#include <rtl/instance.hxx> #include <vcl/svapp.hxx> #include <desktop/crashreport.hxx> #include <vcl/scheduler.hxx> @@ -1441,11 +1440,9 @@ void SAL_CALL Desktop::getFastPropertyValue( css::uno::Any& aValue , ::cppu::IPropertyArrayHelper& SAL_CALL Desktop::getInfoHelper() { - struct Static: - public rtl::StaticWithInit<cppu::OPropertyArrayHelper, Static> - { - cppu::OPropertyArrayHelper operator ()() { - return { + static cppu::OPropertyArrayHelper HELPER = + [&] () { + return cppu::OPropertyArrayHelper { {{"ActiveFrame", PropHandle::ActiveFrame, cppu::UnoType<css::lang::XComponent>::get(), (css::beans::PropertyAttribute::TRANSIENT @@ -1464,9 +1461,8 @@ void SAL_CALL Desktop::getFastPropertyValue( css::uno::Any& aValue , {"Title", PropHandle::Title, cppu::UnoType<OUString>::get(), css::beans::PropertyAttribute::TRANSIENT}}, true}; - } - }; - return Static::get(); + }(); + return HELPER; } /*-************************************************************************************************************ |