Replace list by vector in scripting/eventhelpher
Change-Id: Ia7a24649cc8f204fe412b240df02b3a814ed491c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104180 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
This commit is contained in:
@@ -67,7 +67,7 @@
|
|||||||
#include <cppuhelper/supportsservice.hxx>
|
#include <cppuhelper/supportsservice.hxx>
|
||||||
#include <comphelper/evtmethodhelper.hxx>
|
#include <comphelper/evtmethodhelper.hxx>
|
||||||
|
|
||||||
#include <list>
|
#include <vector>
|
||||||
#include <unordered_map>
|
#include <unordered_map>
|
||||||
|
|
||||||
using namespace ::com::sun::star;
|
using namespace ::com::sun::star;
|
||||||
@@ -172,7 +172,7 @@ struct TranslateInfo
|
|||||||
|
|
||||||
typedef std::unordered_map<
|
typedef std::unordered_map<
|
||||||
OUString,
|
OUString,
|
||||||
std::list< TranslateInfo > > EventInfoHash;
|
std::vector< TranslateInfo > > EventInfoHash;
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
@@ -273,14 +273,14 @@ static EventInfoHash& getEventTransInfo()
|
|||||||
while (i < nCount)
|
while (i < nCount)
|
||||||
{
|
{
|
||||||
sEventInfo = pTransProp->sEventInfo;
|
sEventInfo = pTransProp->sEventInfo;
|
||||||
std::list< TranslateInfo > infoList;
|
std::vector< TranslateInfo > infoList;
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
infoList.push_back( pTransProp->aTransInfo );
|
infoList.push_back( pTransProp->aTransInfo );
|
||||||
pTransProp++;
|
pTransProp++;
|
||||||
i++;
|
i++;
|
||||||
}while(i < nCount && sEventInfo == pTransProp->sEventInfo);
|
}while(i < nCount && sEventInfo == pTransProp->sEventInfo);
|
||||||
tmp[sEventInfo] = infoList;
|
tmp[sEventInfo] = std::move(infoList);
|
||||||
}
|
}
|
||||||
return tmp;
|
return tmp;
|
||||||
}();
|
}();
|
||||||
@@ -382,7 +382,7 @@ ScriptEventHelper::~ScriptEventHelper()
|
|||||||
Sequence< OUString >
|
Sequence< OUString >
|
||||||
ScriptEventHelper::getEventListeners() const
|
ScriptEventHelper::getEventListeners() const
|
||||||
{
|
{
|
||||||
std::list< OUString > eventMethods;
|
std::vector< OUString > eventMethods;
|
||||||
|
|
||||||
Reference< beans::XIntrospection > xIntrospection = beans::theIntrospection::get( m_xCtx );
|
Reference< beans::XIntrospection > xIntrospection = beans::theIntrospection::get( m_xCtx );
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user