Related fdo#46808: Fix UUIInteractionHandler::initialize argument handling
This was a regression introduced with c25cb8a641
"fdo#46808, Adapt task::InteractionHandler UNO service to new style."
Change-Id: I52e36c4aabbf4b2b4552ed0e8ea164db15071980
This commit is contained in:
@@ -70,18 +70,26 @@ UUIInteractionHandler::initialize(
|
|||||||
{
|
{
|
||||||
delete m_pImpl;
|
delete m_pImpl;
|
||||||
|
|
||||||
|
// The old-style InteractionHandler service supported a sequence of
|
||||||
|
// PropertyValue, while the new-style service now uses constructors to pass
|
||||||
|
// in Parent and Context values; for backwards compatibility, keep support
|
||||||
|
// for a PropertyValue sequence, too:
|
||||||
uno::Reference< awt::XWindow > xWindow;
|
uno::Reference< awt::XWindow > xWindow;
|
||||||
rtl::OUString aContext;
|
rtl::OUString aContext;
|
||||||
::comphelper::NamedValueCollection aProperties( rArguments );
|
if (!((rArguments.getLength() == 1 && (rArguments[0] >>= xWindow)) ||
|
||||||
if ( aProperties.has( "Parent" ) )
|
(rArguments.getLength() == 2 && (rArguments[0] >>= xWindow) &&
|
||||||
|
(rArguments[1] >>= aContext))))
|
||||||
{
|
{
|
||||||
OSL_VERIFY( aProperties.get( "Parent" ) >>= xWindow );
|
::comphelper::NamedValueCollection aProperties( rArguments );
|
||||||
|
if ( aProperties.has( "Parent" ) )
|
||||||
|
{
|
||||||
|
OSL_VERIFY( aProperties.get( "Parent" ) >>= xWindow );
|
||||||
|
}
|
||||||
|
if ( aProperties.has( "Context" ) )
|
||||||
|
{
|
||||||
|
OSL_VERIFY( aProperties.get( "Context" ) >>= aContext );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if ( aProperties.has( "Context" ) )
|
|
||||||
{
|
|
||||||
OSL_VERIFY( aProperties.get( "Context" ) >>= aContext );
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
m_pImpl = new UUIInteractionHelper(m_xServiceFactory, xWindow, aContext);
|
m_pImpl = new UUIInteractionHelper(m_xServiceFactory, xWindow, aContext);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user