From 57fbefe751978c33c205de454a8932145e5f438c Mon Sep 17 00:00:00 2001 From: Kohei Yoshida Date: Tue, 25 Nov 2014 23:18:32 -0500 Subject: 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 --- sc/Library_sc.mk | 1 + sc/inc/formulagroup.hxx | 2 +- sc/inc/listenerquery.hxx | 2 ++ sc/inc/refhint.hxx | 1 + sc/inc/reordermap.hxx | 39 ++++++++++++++++++++++++++++++++++++++ sc/inc/tokenarray.hxx | 1 + sc/inc/types.hxx | 3 --- sc/source/core/data/table3.cxx | 1 + sc/source/core/tool/reordermap.cxx | 33 ++++++++++++++++++++++++++++++++ sc/source/core/tool/token.cxx | 1 + 10 files changed, 80 insertions(+), 4 deletions(-) create mode 100644 sc/inc/reordermap.hxx create mode 100644 sc/source/core/tool/reordermap.cxx 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 #include #include -#include +#include 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 #include +#include + 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 +#include + +namespace sc { + +class ColRowReorderMapType +{ + typedef boost::unordered_map 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 + 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 #include -#include class ScMatrix; @@ -98,8 +97,6 @@ struct RangeMatrix bool isRangeValid() const; }; -typedef boost::unordered_map 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 #include #include +#include #include 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 + +namespace sc { + +ColRowReorderMapType::const_iterator ColRowReorderMapType::end() const +{ + return maData.end(); +} + +std::pair +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 #include using ::std::vector; -- cgit