summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@collabora.com>2014-11-25 23:18:32 -0500
committerKohei Yoshida <kohei.yoshida@collabora.com>2014-11-25 23:20:23 -0500
commit57fbefe751978c33c205de454a8932145e5f438c (patch)
treea2570f91985d7b815b61d1bc93d83ed36e4b6b93
parent42c8178ce73756f85fa41473bb16f667f7f564e9 (diff)
remove boost/unordered_map.hpp include from types.hxx.
types.hxx is included by pretty much everyone inside sc. Let's not stick a boost header in there... Change-Id: Iaf2aa9e13d0e02437bcd9e71a0143432abfa0a7c
-rw-r--r--sc/Library_sc.mk1
-rw-r--r--sc/inc/formulagroup.hxx2
-rw-r--r--sc/inc/listenerquery.hxx2
-rw-r--r--sc/inc/refhint.hxx1
-rw-r--r--sc/inc/reordermap.hxx39
-rw-r--r--sc/inc/tokenarray.hxx1
-rw-r--r--sc/inc/types.hxx3
-rw-r--r--sc/source/core/data/table3.cxx1
-rw-r--r--sc/source/core/tool/reordermap.cxx33
-rw-r--r--sc/source/core/tool/token.cxx1
10 files changed, 80 insertions, 4 deletions
diff --git a/sc/Library_sc.mk b/sc/Library_sc.mk
index a3373b05d384..ca854a86ac69 100644
--- a/sc/Library_sc.mk
+++ b/sc/Library_sc.mk
@@ -265,6 +265,7 @@ $(eval $(call gb_Library_add_exception_objects,sc,\
sc/source/core/tool/refreshtimer \
sc/source/core/tool/reftokenhelper \
sc/source/core/tool/refupdat \
+ sc/source/core/tool/reordermap \
sc/source/core/tool/scmatrix \
sc/source/core/tool/scopetools \
sc/source/core/tool/sharedformula \
diff --git a/sc/inc/formulagroup.hxx b/sc/inc/formulagroup.hxx
index 3c2c28216b5d..ba5f31893345 100644
--- a/sc/inc/formulagroup.hxx
+++ b/sc/inc/formulagroup.hxx
@@ -22,7 +22,7 @@
#include <vector>
#include <boost/noncopyable.hpp>
#include <boost/ptr_container/ptr_vector.hpp>
-#include <boost/unordered_set.hpp>
+#include <boost/unordered_map.hpp>
class ScDocument;
class ScTokenArray;
diff --git a/sc/inc/listenerquery.hxx b/sc/inc/listenerquery.hxx
index 2cbc95731be1..c0620bb1a38f 100644
--- a/sc/inc/listenerquery.hxx
+++ b/sc/inc/listenerquery.hxx
@@ -13,6 +13,8 @@
#include <address.hxx>
#include <svl/listener.hxx>
+#include <boost/unordered_map.hpp>
+
namespace sc {
/**
diff --git a/sc/inc/refhint.hxx b/sc/inc/refhint.hxx
index 0f65aaeae06b..70815223e886 100644
--- a/sc/inc/refhint.hxx
+++ b/sc/inc/refhint.hxx
@@ -16,6 +16,7 @@
namespace sc {
struct RefUpdateContext;
+class ColRowReorderMapType;
class RefHint : public SfxSimpleHint
{
diff --git a/sc/inc/reordermap.hxx b/sc/inc/reordermap.hxx
new file mode 100644
index 000000000000..832338423229
--- /dev/null
+++ b/sc/inc/reordermap.hxx
@@ -0,0 +1,39 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#ifndef INCLUDED_SC_REORDERMAP_HXX
+#define INCLUDED_SC_REORDERMAP_HXX
+
+#include <types.hxx>
+#include <boost/unordered_map.hpp>
+
+namespace sc {
+
+class ColRowReorderMapType
+{
+ typedef boost::unordered_map<SCCOLROW,SCCOLROW> DataType;
+ DataType maData;
+public:
+ typedef DataType::value_type value_type;
+ typedef DataType::const_iterator const_iterator;
+ typedef DataType::iterator iterator;
+
+ const_iterator end() const;
+
+ std::pair<iterator, bool>
+ insert( DataType::value_type const& val );
+
+ const_iterator find( DataType::key_type const& key ) const;
+};
+
+}
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/inc/tokenarray.hxx b/sc/inc/tokenarray.hxx
index 07f344b5bfce..5d6593d6f8f1 100644
--- a/sc/inc/tokenarray.hxx
+++ b/sc/inc/tokenarray.hxx
@@ -36,6 +36,7 @@ struct RefUpdateDeleteTabContext;
struct RefUpdateMoveTabContext;
struct RefUpdateResult;
struct TokenStringContext;
+class ColRowReorderMapType;
}
diff --git a/sc/inc/types.hxx b/sc/inc/types.hxx
index d92c9b5b9430..039010a3fa24 100644
--- a/sc/inc/types.hxx
+++ b/sc/inc/types.hxx
@@ -13,7 +13,6 @@
#include <sal/types.h>
#include <boost/intrusive_ptr.hpp>
-#include <boost/unordered_map.hpp>
class ScMatrix;
@@ -98,8 +97,6 @@ struct RangeMatrix
bool isRangeValid() const;
};
-typedef boost::unordered_map<SCCOLROW,SCCOLROW> ColRowReorderMapType;
-
enum AreaOverlapType
{
AreaInside,
diff --git a/sc/source/core/data/table3.cxx b/sc/source/core/data/table3.cxx
index 227dfab8b5b9..f808db5a837e 100644
--- a/sc/source/core/data/table3.cxx
+++ b/sc/source/core/data/table3.cxx
@@ -62,6 +62,7 @@
#include <refhint.hxx>
#include <listenerquery.hxx>
#include <bcaslot.hxx>
+#include <reordermap.hxx>
#include <svl/sharedstringpool.hxx>
diff --git a/sc/source/core/tool/reordermap.cxx b/sc/source/core/tool/reordermap.cxx
new file mode 100644
index 000000000000..0aecc89737ac
--- /dev/null
+++ b/sc/source/core/tool/reordermap.cxx
@@ -0,0 +1,33 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include <reordermap.hxx>
+
+namespace sc {
+
+ColRowReorderMapType::const_iterator ColRowReorderMapType::end() const
+{
+ return maData.end();
+}
+
+std::pair<ColRowReorderMapType::iterator, bool>
+ColRowReorderMapType::insert( ColRowReorderMapType::value_type const& val )
+{
+ return maData.insert(val);
+}
+
+ColRowReorderMapType::const_iterator
+ColRowReorderMapType::find( DataType::key_type const& key ) const
+{
+ return maData.find(key);
+}
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/tool/token.cxx b/sc/source/core/tool/token.cxx
index 77f7cc2f8583..b0bfb99f88e3 100644
--- a/sc/source/core/tool/token.cxx
+++ b/sc/source/core/tool/token.cxx
@@ -43,6 +43,7 @@
#include "types.hxx"
#include "globstr.hrc"
#include "addincol.hxx"
+#include <reordermap.hxx>
#include <svl/sharedstring.hxx>
using ::std::vector;