diff --git a/framework/source/uielement/statusbarmanager.cxx b/framework/source/uielement/statusbarmanager.cxx index dbc305c696fa..3efb64c44bfd 100644 --- a/framework/source/uielement/statusbarmanager.cxx +++ b/framework/source/uielement/statusbarmanager.cxx @@ -34,6 +34,7 @@ #include #include #include +#include #include #include #include @@ -299,38 +300,19 @@ void StatusBarManager::CreateControllers() AddonStatusbarItemData *pItemData = static_cast< AddonStatusbarItemData *>( m_pStatusBar->GetItemData( nId ) ); uno::Reference< ui::XStatusbarItem > xStatusbarItem = new StatusbarItem( m_pStatusBar, nId, aCommandURL ); - beans::PropertyValue aPropValue; - std::vector< uno::Any > aPropVector; + std::vector< uno::Any > aPropVector + { + uno::Any(comphelper::makePropertyValue("CommandURL", aCommandURL)), + uno::Any(comphelper::makePropertyValue("ModuleIdentifier", u""_ustr)), + uno::Any(comphelper::makePropertyValue("Frame", m_xFrame)), - aPropValue.Name = "CommandURL"; - aPropValue.Value <<= aCommandURL; - aPropVector.push_back( uno::Any( aPropValue ) ); + // TODO remove this + uno::Any(comphelper::makePropertyValue("ServiceManager", uno::Reference(m_xContext->getServiceManager(), uno::UNO_QUERY_THROW))), - aPropValue.Name = "ModuleIdentifier"; - aPropValue.Value <<= OUString(); - aPropVector.push_back( uno::Any( aPropValue ) ); - - aPropValue.Name = "Frame"; - aPropValue.Value <<= m_xFrame; - aPropVector.push_back( uno::Any( aPropValue ) ); - - // TODO remove this - aPropValue.Name = "ServiceManager"; - aPropValue.Value <<= uno::Reference(m_xContext->getServiceManager(), uno::UNO_QUERY_THROW); - aPropVector.push_back( uno::Any( aPropValue ) ); - - aPropValue.Name = "ParentWindow"; - aPropValue.Value <<= xStatusbarWindow; - aPropVector.push_back( uno::Any( aPropValue ) ); - - // TODO still needing with the css::ui::XStatusbarItem? - aPropValue.Name = "Identifier"; - aPropValue.Value <<= nId; - aPropVector.push_back( uno::Any( aPropValue ) ); - - aPropValue.Name = "StatusbarItem"; - aPropValue.Value <<= xStatusbarItem; - aPropVector.push_back( uno::Any( aPropValue ) ); + uno::Any(comphelper::makePropertyValue("ParentWindow", xStatusbarWindow)), + uno::Any(comphelper::makePropertyValue("Identifier", nId)), + uno::Any(comphelper::makePropertyValue("StatusbarItem", xStatusbarItem)) + }; uno::Sequence< uno::Any > aArgs( comphelper::containerToSequence( aPropVector ) );