diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-05-13 15:30:37 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-05-14 17:30:08 +0200 |
commit | ce214d56727ecf8fb212910a711b4e3ef38e4b63 (patch) | |
tree | 214f432cbeb3a9fefa45a6ee1a8dd5def786ba72 /unotools | |
parent | 3a91c52b5a8a4fa131c2b74ba83032c835da313f (diff) |
bypass some unnecessary wrapping in Any in SfxEvents_Impl
Change-Id: I96d1194253207642e7abe83b0b18c82eb3782824
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134316
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'unotools')
-rw-r--r-- | unotools/source/config/eventcfg.cxx | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/unotools/source/config/eventcfg.cxx b/unotools/source/config/eventcfg.cxx index 0c0f87ed4624..fb1eb948a47b 100644 --- a/unotools/source/config/eventcfg.cxx +++ b/unotools/source/config/eventcfg.cxx @@ -111,7 +111,7 @@ public: /// @throws css::container::NoSuchElementException /// @throws css::lang::WrappedTargetException /// @throws css::uno::RuntimeException - css::uno::Any getByName( const OUString& aName ); + css::uno::Sequence < css::beans::PropertyValue > getByName( const OUString& aName ); /// @throws css::uno::RuntimeException css::uno::Sequence< OUString > getElementNames( ); /// @throws css::uno::RuntimeException @@ -238,9 +238,8 @@ void GlobalEventConfig_Impl::replaceByName( const OUString& aName, const Any& aE SetModified(); } -Any GlobalEventConfig_Impl::getByName( const OUString& aName ) +css::uno::Sequence < css::beans::PropertyValue > GlobalEventConfig_Impl::getByName( const OUString& aName ) { - Any aRet; Sequence< beans::PropertyValue > props(2); auto pProps = props.getArray(); pProps[0].Name = "EventType"; @@ -261,8 +260,7 @@ Any GlobalEventConfig_Impl::getByName( const OUString& aName ) pProps[1].Value <<= OUString(); } - aRet <<= props; - return aRet; + return props; } Sequence< OUString > GlobalEventConfig_Impl::getElementNames( ) @@ -342,6 +340,10 @@ void SAL_CALL GlobalEventConfig::replaceByName( const OUString& aName, const Any } Any SAL_CALL GlobalEventConfig::getByName( const OUString& aName ) { + return Any(getByName2(aName)); +} +css::uno::Sequence < css::beans::PropertyValue > GlobalEventConfig::getByName2( const OUString& aName ) +{ std::unique_lock aGuard( GetOwnStaticMutex() ); return m_pImpl->getByName( aName ); } |