summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2016-06-20 11:43:37 +0200
committerStephan Bergmann <sbergman@redhat.com>2016-06-20 11:43:37 +0200
commit50a0473e821081c1db2646dd4c3fcc24f5c11bf3 (patch)
tree2d339c30171dcc9271619da46f91acfaa9a684cf /include
parent4833ed2f7fed76cba5fa40b0490da14c6838e8b6 (diff)
Clean up uses of Any::getValue() in comphelper
Change-Id: I433cca20fb29c6b6ede934edcb2e200f15b060f2
Diffstat (limited to 'include')
-rw-r--r--include/comphelper/uno3.hxx8
1 files changed, 3 insertions, 5 deletions
diff --git a/include/comphelper/uno3.hxx b/include/comphelper/uno3.hxx
index 427deb394186..5b4cb63a3542 100644
--- a/include/comphelper/uno3.hxx
+++ b/include/comphelper/uno3.hxx
@@ -169,13 +169,11 @@ namespace comphelper
template <class iface>
bool query_aggregation(const css::uno::Reference< css::uno::XAggregation >& _rxAggregate, css::uno::Reference<iface>& _rxOut)
{
- _rxOut = static_cast<iface*>(nullptr);
+ _rxOut.clear();
if (_rxAggregate.is())
{
- css::uno::Any aCheck = _rxAggregate->queryAggregation(
- cppu::UnoType<iface>::get());
- if (aCheck.hasValue())
- _rxOut = *static_cast<const css::uno::Reference<iface>*>(aCheck.getValue());
+ _rxAggregate->queryAggregation(cppu::UnoType<iface>::get())
+ >>= _rxOut;
}
return _rxOut.is();
}