[Libreoffice-commits] core.git: formula/source include/formula sc/inc sc/source

Caolán McNamara caolanm at redhat.com
Sun Jan 4 10:49:10 PST 2015


 formula/source/core/api/token.cxx   |    2 +-
 include/formula/FormulaCompiler.hxx |    7 ++++---
 include/formula/tokenarray.hxx      |    6 ++++--
 sc/inc/pch/precompiled_sc.hxx       |    4 ++--
 sc/source/core/data/column4.cxx     |    8 ++++----
 5 files changed, 15 insertions(+), 12 deletions(-)

New commits:
commit dfeb898b53c597c7b55cbca714335892e8830c83
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Sun Jan 4 16:40:59 2015 +0000

    boost::unordered_set->std::unordered_set
    
    Change-Id: I0a8ecc3aa26ffc56f216a6a0e078e158b03a4a02

diff --git a/formula/source/core/api/token.cxx b/formula/source/core/api/token.cxx
index 1824c7a..2f6ae97 100644
--- a/formula/source/core/api/token.cxx
+++ b/formula/source/core/api/token.cxx
@@ -674,7 +674,7 @@ bool FormulaTokenArray::HasNameOrColRowName() const
     return false;
 }
 
-bool FormulaTokenArray::HasOpCodes( const boost::unordered_set<OpCode>& rOpCodes ) const
+bool FormulaTokenArray::HasOpCodes(const unordered_opcode_set& rOpCodes) const
 {
     FormulaToken** p = pCode;
     FormulaToken** pEnd = p + static_cast<size_t>(nLen);
diff --git a/include/formula/FormulaCompiler.hxx b/include/formula/FormulaCompiler.hxx
index 101369d..488760e 100644
--- a/include/formula/FormulaCompiler.hxx
+++ b/include/formula/FormulaCompiler.hxx
@@ -26,7 +26,6 @@
 #include <tools/debug.hxx>
 
 #include <boost/shared_ptr.hpp>
-#include <boost/unordered_map.hpp>
 #include <boost/noncopyable.hpp>
 
 #include <com/sun/star/uno/Sequence.hxx>
@@ -36,6 +35,8 @@
 #include <formula/token.hxx>
 #include <formula/ExternalReferenceHelper.hxx>
 
+#include <unordered_map>
+
 #define FORMULA_MAXJUMPCOUNT    32  /* maximum number of jumps (ocChose) */
 #define FORMULA_MAXTOKENS     8192  /* maximum number of tokens in formula */
 
@@ -60,8 +61,8 @@ struct FormulaArrayStack
 };
 
 
-typedef ::boost::unordered_map< OUString, OpCode, OUStringHash, ::std::equal_to< OUString > > OpCodeHashMap;
-typedef ::boost::unordered_map< OUString, OUString, OUStringHash, ::std::equal_to< OUString > > ExternalHashMap;
+typedef std::unordered_map< OUString, OpCode, OUStringHash, ::std::equal_to< OUString > > OpCodeHashMap;
+typedef std::unordered_map< OUString, OUString, OUStringHash, ::std::equal_to< OUString > > ExternalHashMap;
 
 class FORMULA_DLLPUBLIC FormulaCompiler : boost::noncopyable
 {
diff --git a/include/formula/tokenarray.hxx b/include/formula/tokenarray.hxx
index 043e349..9b9bc8f 100644
--- a/include/formula/tokenarray.hxx
+++ b/include/formula/tokenarray.hxx
@@ -25,7 +25,7 @@
 #include <formula/ExternalReferenceHelper.hxx>
 #include <limits.h>
 
-#include <boost/unordered_set.hpp>
+#include <unordered_set>
 
 namespace svl {
 
@@ -90,6 +90,8 @@ public:
     inline  bool    isRewriteNeeded( OpCode eOp ) const;
 };
 
+typedef std::unordered_set<OpCode, std::hash<std::underlying_type<OpCode>::type> > unordered_opcode_set;
+
 class FORMULA_DLLPUBLIC FormulaTokenArray
 {
     friend class FormulaCompiler;
@@ -166,7 +168,7 @@ public:
      * @return true if the token array contains at least one of the specified
      *         opcode tokens, false otherwise.
      */
-    bool HasOpCodes( const boost::unordered_set<OpCode>& rOpCodes ) const;
+    bool HasOpCodes( const unordered_opcode_set& rOpCodes ) const;
 
     FormulaToken** GetArray() const  { return pCode; }
     FormulaToken** GetCode()  const  { return pRPN; }
diff --git a/sc/inc/pch/precompiled_sc.hxx b/sc/inc/pch/precompiled_sc.hxx
index ff70147..1070123 100644
--- a/sc/inc/pch/precompiled_sc.hxx
+++ b/sc/inc/pch/precompiled_sc.hxx
@@ -53,8 +53,6 @@
 #include <boost/scoped_ptr.hpp>
 #include <boost/shared_ptr.hpp>
 #include <boost/static_assert.hpp>
-#include <boost/unordered_map.hpp>
-#include <boost/unordered_set.hpp>
 #include <cassert>
 #include <climits>
 #include <cmath>
@@ -898,6 +896,8 @@
 #include <ucbhelper/content.hxx>
 #include <ucbhelper/simpleinteractionrequest.hxx>
 #include <unicode/uchar.h>
+#include <unordered_map>
+#include <unordered_set>
 #include <unotools/accessiblerelationsethelper.hxx>
 #include <unotools/accessiblestatesethelper.hxx>
 #include <unotools/bootstrap.hxx>
diff --git a/sc/source/core/data/column4.cxx b/sc/source/core/data/column4.cxx
index c4ca9ad..c46634c 100644
--- a/sc/source/core/data/column4.cxx
+++ b/sc/source/core/data/column4.cxx
@@ -711,13 +711,13 @@ namespace {
 class RecompileByOpcodeHandler
 {
     ScDocument* mpDoc;
-    const boost::unordered_set<OpCode>& mrOps;
+    const formula::unordered_opcode_set& mrOps;
     sc::EndListeningContext& mrEndListenCxt;
     sc::CompileFormulaContext& mrCompileFormulaCxt;
 
 public:
     RecompileByOpcodeHandler(
-        ScDocument* pDoc, const boost::unordered_set<OpCode>& rOps,
+        ScDocument* pDoc, const formula::unordered_opcode_set& rOps,
         sc::EndListeningContext& rEndListenCxt, sc::CompileFormulaContext& rCompileCxt ) :
         mpDoc(pDoc),
         mrOps(rOps),
@@ -849,7 +849,7 @@ void ScColumn::PreprocessRangeNameUpdate(
     // Collect all formula groups.
     std::vector<sc::FormulaGroupEntry> aGroups = GetFormulaGroupEntries();
 
-    boost::unordered_set<OpCode> aOps;
+    formula::unordered_opcode_set aOps;
     aOps.insert(ocBad);
     aOps.insert(ocColRowName);
     aOps.insert(ocName);
@@ -863,7 +863,7 @@ void ScColumn::PreprocessDBDataUpdate(
     // Collect all formula groups.
     std::vector<sc::FormulaGroupEntry> aGroups = GetFormulaGroupEntries();
 
-    boost::unordered_set<OpCode> aOps;
+    formula::unordered_opcode_set aOps;
     aOps.insert(ocBad);
     aOps.insert(ocColRowName);
     aOps.insert(ocDBArea);


More information about the Libreoffice-commits mailing list