diff options
Diffstat (limited to 'testtools/source/bridgetest/bridgetest.cxx')
-rw-r--r-- | testtools/source/bridgetest/bridgetest.cxx | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/testtools/source/bridgetest/bridgetest.cxx b/testtools/source/bridgetest/bridgetest.cxx index 207e1e398c3b..e9a56413a0f3 100644 --- a/testtools/source/bridgetest/bridgetest.cxx +++ b/testtools/source/bridgetest/bridgetest.cxx @@ -20,6 +20,7 @@ #include <stdio.h> #include <string.h> +#include <o3tl/any.hxx> #include <osl/diagnose.h> #include "osl/diagnose.hxx" #include <osl/time.h> @@ -592,12 +593,9 @@ static bool performTest( xLBT->getNullPolyType().member == Type(), "getNullPolyType"); Any nullAny(xLBT->getNullPolyAny().member); + auto ifc = o3tl::tryAccess<Reference<XInterface>>(nullAny); bRet &= check( - (((nullAny.getValueTypeName() == - "com.sun.star.uno.XInterface") && - !static_cast< Reference< XInterface > const * >( - nullAny.getValue())->is()) - || nullAny == Any()), + !nullAny.hasValue() || (ifc && !ifc->is()), "getNullPolyAny"); bRet &= check( xLBT->getNullPolySequence().member.getLength() == 0, |