diff options
author | Julien Nabet <serval2412@yahoo.fr> | 2017-10-31 23:50:41 +0100 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-11-01 07:19:56 +0100 |
commit | 18537be0cd5a50cd9a2853a8e06660c820c2e7f8 (patch) | |
tree | 6b6770e87c3c197eb2aa591fc34871993b844646 /desktop | |
parent | bbf1312b2d775a851a38290e3c12c677f6acbfde (diff) |
Replace some lists by vectors in deployment/registry (desktop)
Change-Id: I264a8b4d8fc90f647d5a6f1aef4a190353d494e5
Reviewed-on: https://gerrit.libreoffice.org/44143
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'desktop')
10 files changed, 13 insertions, 15 deletions
diff --git a/desktop/source/deployment/registry/configuration/dp_configuration.cxx b/desktop/source/deployment/registry/configuration/dp_configuration.cxx index 499806e43895..a7807d9515e6 100644 --- a/desktop/source/deployment/registry/configuration/dp_configuration.cxx +++ b/desktop/source/deployment/registry/configuration/dp_configuration.cxx @@ -213,7 +213,7 @@ BackendImpl::BackendImpl( //are still registers. Only after revoking and restarting OOo the folders //can be removed. This works now, because the extension manager is a singleton //and the backends are only create once per process. - std::list<OUString> folders = m_backendDb->getAllDataUrls(); + std::vector<OUString> folders = m_backendDb->getAllDataUrls(); deleteUnusedFolders(folders); configmgrini_verify_init( xCmdEnv ); diff --git a/desktop/source/deployment/registry/configuration/dp_configurationbackenddb.cxx b/desktop/source/deployment/registry/configuration/dp_configurationbackenddb.cxx index b4b47a25260f..ead87464821a 100644 --- a/desktop/source/deployment/registry/configuration/dp_configurationbackenddb.cxx +++ b/desktop/source/deployment/registry/configuration/dp_configurationbackenddb.cxx @@ -127,11 +127,11 @@ ConfigurationBackendDb::getEntry(OUString const & url) } } -std::list<OUString> ConfigurationBackendDb::getAllDataUrls() +std::vector<OUString> ConfigurationBackendDb::getAllDataUrls() { try { - std::list<OUString> listRet; + std::vector<OUString> listRet; Reference<css::xml::dom::XDocument> doc = getDocument(); Reference<css::xml::dom::XNode> root = doc->getFirstChild(); diff --git a/desktop/source/deployment/registry/configuration/dp_configurationbackenddb.hxx b/desktop/source/deployment/registry/configuration/dp_configurationbackenddb.hxx index ce6443f12d7f..09cbf05a9d3d 100644 --- a/desktop/source/deployment/registry/configuration/dp_configurationbackenddb.hxx +++ b/desktop/source/deployment/registry/configuration/dp_configurationbackenddb.hxx @@ -22,7 +22,7 @@ #include <rtl/ustring.hxx> #include <rtl/string.hxx> -#include <list> +#include <vector> #include <boost/optional.hpp> #include <dp_backenddb.hxx> @@ -70,7 +70,7 @@ public: void addEntry(OUString const & url, Data const & data); ::boost::optional<Data> getEntry(OUString const & url); - std::list< OUString> getAllDataUrls(); + std::vector< OUString> getAllDataUrls(); }; diff --git a/desktop/source/deployment/registry/dp_backend.cxx b/desktop/source/deployment/registry/dp_backend.cxx index e9f31e266d79..46be07058768 100644 --- a/desktop/source/deployment/registry/dp_backend.cxx +++ b/desktop/source/deployment/registry/dp_backend.cxx @@ -248,7 +248,7 @@ void PackageRegistryBackend::deleteTempFolder( //then created a Folder with a same name and a trailing '_' //If the folderURL has no '_' then there is no corresponding tmp file. void PackageRegistryBackend::deleteUnusedFolders( - std::list< OUString> const & usedFolders) + std::vector< OUString> const & usedFolders) { try { diff --git a/desktop/source/deployment/registry/dp_backenddb.cxx b/desktop/source/deployment/registry/dp_backenddb.cxx index e4329c90ed68..f7054869a45e 100644 --- a/desktop/source/deployment/registry/dp_backenddb.cxx +++ b/desktop/source/deployment/registry/dp_backenddb.cxx @@ -565,12 +565,12 @@ std::list< OUString> BackendDb::readList( } } -std::list<OUString> BackendDb::getOneChildFromAllEntries( +std::vector<OUString> BackendDb::getOneChildFromAllEntries( OUString const & name) { try { - std::list<OUString> listRet; + std::vector<OUString> listRet; Reference<css::xml::dom::XDocument> doc = getDocument(); Reference<css::xml::dom::XNode> root = doc->getFirstChild(); diff --git a/desktop/source/deployment/registry/help/dp_help.cxx b/desktop/source/deployment/registry/help/dp_help.cxx index b0a8c2761743..d5df148aeec9 100644 --- a/desktop/source/deployment/registry/help/dp_help.cxx +++ b/desktop/source/deployment/registry/help/dp_help.cxx @@ -144,7 +144,7 @@ BackendImpl::BackendImpl( //are still registers. Only after revoking and restarting OOo the folders //can be removed. This works now, because the extension manager is a singleton //and the backends are only create once per process. - std::list<OUString> folders = m_backendDb->getAllDataUrls(); + std::vector<OUString> folders = m_backendDb->getAllDataUrls(); deleteUnusedFolders(folders); } } diff --git a/desktop/source/deployment/registry/help/dp_helpbackenddb.cxx b/desktop/source/deployment/registry/help/dp_helpbackenddb.cxx index e91ea4b61de0..e65f9e3644ad 100644 --- a/desktop/source/deployment/registry/help/dp_helpbackenddb.cxx +++ b/desktop/source/deployment/registry/help/dp_helpbackenddb.cxx @@ -123,7 +123,7 @@ HelpBackendDb::getEntry(OUString const & url) } } -std::list<OUString> HelpBackendDb::getAllDataUrls() +std::vector<OUString> HelpBackendDb::getAllDataUrls() { return getOneChildFromAllEntries("data-url"); } diff --git a/desktop/source/deployment/registry/help/dp_helpbackenddb.hxx b/desktop/source/deployment/registry/help/dp_helpbackenddb.hxx index f11717272391..50621abd576a 100644 --- a/desktop/source/deployment/registry/help/dp_helpbackenddb.hxx +++ b/desktop/source/deployment/registry/help/dp_helpbackenddb.hxx @@ -21,7 +21,6 @@ #define INCLUDED_DESKTOP_SOURCE_DEPLOYMENT_REGISTRY_HELP_DP_HELPBACKENDDB_HXX #include <rtl/ustring.hxx> -#include <list> #include <boost/optional.hpp> #include <dp_backenddb.hxx> @@ -68,7 +67,7 @@ public: ::boost::optional<Data> getEntry(OUString const & url); //must also return the data urls for entries with @activ="false". That is, //those are currently revoked. - std::list< OUString> getAllDataUrls(); + std::vector< OUString> getAllDataUrls(); }; diff --git a/desktop/source/deployment/registry/inc/dp_backend.h b/desktop/source/deployment/registry/inc/dp_backend.h index dfc62058a7bf..03f2640a4cf4 100644 --- a/desktop/source/deployment/registry/inc/dp_backend.h +++ b/desktop/source/deployment/registry/inc/dp_backend.h @@ -32,7 +32,6 @@ #include <com/sun/star/deployment/XPackageRegistry.hpp> #include <com/sun/star/deployment/XPackageManager.hpp> #include <com/sun/star/deployment/InvalidRemovedParameterException.hpp> -#include <list> #include <unordered_map> #include <strings.hrc> @@ -251,7 +250,7 @@ protected: not used are deleted. */ void deleteUnusedFolders( - std::list< OUString> const & usedFolders); + std::vector< OUString> const & usedFolders); /* deletes one folder with a "temporary" name and the corresponding tmp file, which was used to derive the folder name. */ diff --git a/desktop/source/deployment/registry/inc/dp_backenddb.hxx b/desktop/source/deployment/registry/inc/dp_backenddb.hxx index a127658cd99a..8e619d091020 100644 --- a/desktop/source/deployment/registry/inc/dp_backenddb.hxx +++ b/desktop/source/deployment/registry/inc/dp_backenddb.hxx @@ -109,7 +109,7 @@ protected: /* returns the values of one particularly child element of all key elements. */ - std::list< OUString> getOneChildFromAllEntries( + std::vector< OUString> getOneChildFromAllEntries( OUString const & sElementName); |