diff options
author | Julien Nabet <serval2412@yahoo.fr> | 2017-12-02 20:14:52 +0100 |
---|---|---|
committer | Julien Nabet <serval2412@yahoo.fr> | 2017-12-02 22:13:00 +0100 |
commit | 2f2c7c3dadda7a20c8d49e6ea044887a94d2d46e (patch) | |
tree | e23eca4eb2861e4cacc7e13531ed10295dbe07d7 /xmloff | |
parent | b4daa672d393ed6688efe66534807c17e4eaaf57 (diff) |
Replace list by vector in XMLEventImportHelper (xmloff)
Change-Id: I5c8ac0a1cad628bd80550d7d0f5cec46d0f66dae
Reviewed-on: https://gerrit.libreoffice.org/45724
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Diffstat (limited to 'xmloff')
-rw-r--r-- | xmloff/inc/XMLEventImportHelper.hxx | 4 | ||||
-rw-r--r-- | xmloff/source/script/XMLEventImportHelper.cxx | 12 |
2 files changed, 8 insertions, 8 deletions
diff --git a/xmloff/inc/XMLEventImportHelper.hxx b/xmloff/inc/XMLEventImportHelper.hxx index 23b7358834f6..0ad45da644ca 100644 --- a/xmloff/inc/XMLEventImportHelper.hxx +++ b/xmloff/inc/XMLEventImportHelper.hxx @@ -24,7 +24,7 @@ #include <xmloff/xmlevent.hxx> #include <map> -#include <list> +#include <vector> namespace com { namespace sun { namespace star { @@ -60,7 +60,7 @@ class XMLEventImportHelper NameMap* pEventNameMap; /// stack of previous aEventNameMap - std::list< NameMap* > aEventNameMapList; + std::vector< NameMap* > aEventNameMapVector; public: XMLEventImportHelper(); diff --git a/xmloff/source/script/XMLEventImportHelper.cxx b/xmloff/source/script/XMLEventImportHelper.cxx index 7210c339ebbd..84bcd8eb1d16 100644 --- a/xmloff/source/script/XMLEventImportHelper.cxx +++ b/xmloff/source/script/XMLEventImportHelper.cxx @@ -32,7 +32,7 @@ using ::com::sun::star::uno::Sequence; XMLEventImportHelper::XMLEventImportHelper() : aFactoryMap(), pEventNameMap(new NameMap), - aEventNameMapList() + aEventNameMapVector() { } @@ -91,20 +91,20 @@ void XMLEventImportHelper::AddTranslationTable( void XMLEventImportHelper::PushTranslationTable() { // save old map and install new one - aEventNameMapList.push_back(pEventNameMap); + aEventNameMapVector.push_back(pEventNameMap); pEventNameMap = new NameMap; } void XMLEventImportHelper::PopTranslationTable() { - DBG_ASSERT(aEventNameMapList.size() > 0, + DBG_ASSERT(aEventNameMapVector.size() > 0, "no translation tables left to pop"); - if ( !aEventNameMapList.empty() ) + if ( !aEventNameMapVector.empty() ) { // delete current and install old map delete pEventNameMap; - pEventNameMap = aEventNameMapList.back(); - aEventNameMapList.pop_back(); + pEventNameMap = aEventNameMapVector.back(); + aEventNameMapVector.pop_back(); } } |