diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2021-08-24 09:49:56 +0200 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2021-08-24 13:41:17 +0200 |
commit | 97b7511acfd9593051a611c71d307916097256dd (patch) | |
tree | 3dda794641166c21dc8cb7563b585e500e6f4c52 /include | |
parent | baed91bab05546f7f5233701bd7aaed44f25a364 (diff) |
Simplify caching in ConfigurationWrapper
A follow-up to 48c2f0b4b157e133605c99549893521775ede4da
This allows to not call createInstanceWithArguments repeatedly.
Change-Id: I1893b9b1b0f952ae7c650bab4fb0dfe2f331a129
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120883
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
Diffstat (limited to 'include')
-rw-r--r-- | include/comphelper/configuration.hxx | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/include/comphelper/configuration.hxx b/include/comphelper/configuration.hxx index 27344e7a3672..1ed37dcd45c3 100644 --- a/include/comphelper/configuration.hxx +++ b/include/comphelper/configuration.hxx @@ -97,8 +97,7 @@ public: bool isReadOnly(OUString const & path) const; - static css::uno::Any getPropertyValue(css::uno::Reference< css::uno::XComponentContext > const & context, - OUString const & path); + css::uno::Any getPropertyValue(OUString const & path) const; static void setPropertyValue( std::shared_ptr< ConfigurationChanges > const & batch, @@ -211,7 +210,7 @@ template< typename T, typename U > struct ConfigurationProperty // Folding this into one statement causes a bogus error at least with // Red Hat GCC 4.6.2-1: css::uno::Any a( - detail::ConfigurationWrapper::getPropertyValue(context, + detail::ConfigurationWrapper::get(context).getPropertyValue( T::path())); return detail::Convert< U >::fromAny(a); } |