[Libreoffice-commits] core.git: xmloff/source
Noel Grandin (via logerrit)
logerrit at kemper.freedesktop.org
Sun Aug 1 18:07:16 UTC 2021
xmloff/source/forms/layerexport.hxx | 8 ++++----
xmloff/source/forms/layerimport.hxx | 3 ++-
2 files changed, 6 insertions(+), 5 deletions(-)
New commits:
commit 303aa36685f2d52cff6004f9b41b90629c26f978
Author: Noel Grandin <noelgrandin at gmail.com>
AuthorDate: Sun Aug 1 11:04:34 2021 +0200
Commit: Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Sun Aug 1 20:06:40 2021 +0200
unordered_map is better for pointer keys
Change-Id: Iaef42c9cc3526d1daa9ad6aaa840ea5a449173be
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119816
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/xmloff/source/forms/layerexport.hxx b/xmloff/source/forms/layerexport.hxx
index 39e6b5667c0f..4d19386efa13 100644
--- a/xmloff/source/forms/layerexport.hxx
+++ b/xmloff/source/forms/layerexport.hxx
@@ -21,7 +21,7 @@
#include <sal/config.h>
-#include <map>
+#include <unordered_map>
#include <com/sun/star/container/XIndexAccess.hpp>
#include <com/sun/star/drawing/XDrawPage.hpp>
@@ -43,12 +43,12 @@ namespace xmloff
typedef o3tl::sorted_vector< css::uno::Reference< css::beans::XPropertySet > > PropertySetBag;
// maps objects (property sets) to strings, e.g. control ids.
- typedef ::std::map < css::uno::Reference< css::beans::XPropertySet >
+ typedef ::std::unordered_map < css::uno::Reference< css::beans::XPropertySet >
, OUString
> MapPropertySet2String;
// map pages to maps (of property sets to strings)
- typedef ::std::map < css::uno::Reference< css::drawing::XDrawPage >
+ typedef ::std::unordered_map < css::uno::Reference< css::drawing::XDrawPage >
, MapPropertySet2String
> MapPropertySet2Map;
@@ -106,7 +106,7 @@ namespace xmloff
// TODO: To avoid this construct above, and to have a cleaner implementation, a class encapsulating the
// export of a single page should be introduced.
- typedef std::map<css::uno::Reference<css::beans::XPropertySet>, sal_Int32> MapPropertySet2Int;
+ typedef std::unordered_map<css::uno::Reference<css::beans::XPropertySet>, sal_Int32> MapPropertySet2Int;
MapPropertySet2Int m_aControlNumberFormats;
// maps controls to format keys, which are relative to our own formats supplier
diff --git a/xmloff/source/forms/layerimport.hxx b/xmloff/source/forms/layerimport.hxx
index 448076ec8b4f..21e3a79c723b 100644
--- a/xmloff/source/forms/layerimport.hxx
+++ b/xmloff/source/forms/layerimport.hxx
@@ -22,6 +22,7 @@
#include <sal/config.h>
#include <map>
+#include <unordered_map>
#include <com/sun/star/xml/sax/XAttributeList.hpp>
#include <com/sun/star/drawing/XDrawPage.hpp>
@@ -58,7 +59,7 @@ namespace xmloff
rtl::Reference<SvXMLStylesContext> m_xAutoStyles;
typedef std::map< OUString, css::uno::Reference< css::beans::XPropertySet > > MapString2PropertySet;
- typedef std::map<css::uno::Reference<css::drawing::XDrawPage>, MapString2PropertySet> MapDrawPage2Map;
+ typedef std::unordered_map<css::uno::Reference<css::drawing::XDrawPage>, MapString2PropertySet> MapDrawPage2Map;
MapDrawPage2Map m_aControlIds; // ids of the controls on all known page
MapDrawPage2Map::iterator m_aCurrentPageIds; // ifs of the controls on the current page
More information about the Libreoffice-commits
mailing list