summaryrefslogtreecommitdiff
path: root/sc/source/ui
diff options
context:
space:
mode:
authorFridrich Štrba <fridrich.strba@bluewin.ch>2011-02-06 00:56:21 +0100
committerFridrich Štrba <fridrich.strba@bluewin.ch>2011-02-06 00:59:10 +0100
commiteb1d9d3cda2da6b00749ff61ea63931f00a5b2b7 (patch)
tree4d31232cf0d58f153ca474ba8802344f954c9836 /sc/source/ui
parent82d08610465649dd1a49f8b7f6d4e7cf80f15c16 (diff)
port repository calc to boost unordered containers
Diffstat (limited to 'sc/source/ui')
-rw-r--r--sc/source/ui/cctrl/dpcontrol.cxx6
-rw-r--r--sc/source/ui/docshell/macromgr.cxx6
-rw-r--r--sc/source/ui/inc/crnrdlg.hxx4
-rw-r--r--sc/source/ui/inc/docsh.hxx4
-rw-r--r--sc/source/ui/inc/dpcontrol.hxx4
-rw-r--r--sc/source/ui/inc/pvfundlg.hxx8
-rw-r--r--sc/source/ui/unoobj/cellsuno.cxx4
-rw-r--r--sc/source/ui/unoobj/chart2uno.cxx11
-rw-r--r--sc/source/ui/vba/vbachartobjects.hxx4
-rw-r--r--sc/source/ui/vba/vbacharts.hxx2
-rw-r--r--sc/source/ui/vba/vbawindow.cxx4
-rw-r--r--sc/source/ui/vba/vbawindows.cxx4
-rw-r--r--sc/source/ui/vba/vbaworkbooks.cxx2
-rw-r--r--sc/source/ui/view/dbfunc3.cxx12
-rw-r--r--sc/source/ui/view/gridwin2.cxx8
15 files changed, 40 insertions, 43 deletions
diff --git a/sc/source/ui/cctrl/dpcontrol.cxx b/sc/source/ui/cctrl/dpcontrol.cxx
index 829ad7f99308..7bd9f501edab 100644
--- a/sc/source/ui/cctrl/dpcontrol.cxx
+++ b/sc/source/ui/cctrl/dpcontrol.cxx
@@ -57,7 +57,7 @@ using ::com::sun::star::accessibility::XAccessibleContext;
using ::rtl::OUString;
using ::rtl::OUStringHash;
using ::std::vector;
-using ::std::hash_map;
+using ::boost::unordered_map;
using ::std::auto_ptr;
ScDPFieldButton::ScDPFieldButton(OutputDevice* pOutDev, const StyleSettings* pStyle, const Fraction* pZoomX, const Fraction* pZoomY, ScDocument* pDoc) :
@@ -1384,9 +1384,9 @@ const Size& ScDPFieldPopupWindow::getWindowSize() const
return maWndSize;
}
-void ScDPFieldPopupWindow::getResult(hash_map<OUString, bool, OUStringHash>& rResult)
+void ScDPFieldPopupWindow::getResult(boost::unordered_map<OUString, bool, OUStringHash>& rResult)
{
- typedef hash_map<OUString, bool, OUStringHash> ResultMap;
+ typedef boost::unordered_map<OUString, bool, OUStringHash> ResultMap;
ResultMap aResult;
size_t n = maMembers.size();
for (size_t i = 0; i < n; ++i)
diff --git a/sc/source/ui/docshell/macromgr.cxx b/sc/source/ui/docshell/macromgr.cxx
index b51d17d6c901..fdc837d363e3 100644
--- a/sc/source/ui/docshell/macromgr.cxx
+++ b/sc/source/ui/docshell/macromgr.cxx
@@ -47,7 +47,7 @@ using ::com::sun::star::uno::RuntimeException;
using ::com::sun::star::uno::Reference;
using ::rtl::OUString;
using ::rtl::OUStringHash;
-using ::std::hash_map;
+using ::boost::unordered_map;
using ::std::list;
using ::std::for_each;
using ::std::pair;
@@ -103,7 +103,7 @@ public:
}
private:
- typedef hash_map<OUString, list<ScFormulaCell*>, OUStringHash> ModuleCellMap;
+ typedef boost::unordered_map<OUString, list<ScFormulaCell*>, OUStringHash> ModuleCellMap;
ModuleCellMap maCells;
};
@@ -146,7 +146,7 @@ public:
void ScMacroManager::InitUserFuncData()
{
- // Clear hash_map
+ // Clear boost::unordered_map
mhFuncToVolatile.clear();
String sProjectName( RTL_CONSTASCII_USTRINGPARAM("Standard") );
diff --git a/sc/source/ui/inc/crnrdlg.hxx b/sc/source/ui/inc/crnrdlg.hxx
index bd0d974cd764..8a8540bbd5d8 100644
--- a/sc/source/ui/inc/crnrdlg.hxx
+++ b/sc/source/ui/inc/crnrdlg.hxx
@@ -34,7 +34,7 @@
#include <vcl/fixed.hxx>
#include <vcl/lstbox.hxx>
-#include <hash_map>
+#include <boost/unordered_map.hpp>
class ScViewData;
class ScDocument;
@@ -79,7 +79,7 @@ private:
ScRangePairListRef xColNameRanges;
ScRangePairListRef xRowNameRanges;
- typedef ::std::hash_map< String, ScRange, ScStringHashCode, ::std::equal_to<String> > NameRangeMap;
+ typedef ::boost::unordered_map< String, ScRange, ScStringHashCode, ::std::equal_to<String> > NameRangeMap;
NameRangeMap aRangeMap;
ScViewData* pViewData;
ScDocument* pDoc;
diff --git a/sc/source/ui/inc/docsh.hxx b/sc/source/ui/inc/docsh.hxx
index b4b5a2a5ee31..a09c1b2bddbb 100644
--- a/sc/source/ui/inc/docsh.hxx
+++ b/sc/source/ui/inc/docsh.hxx
@@ -43,7 +43,7 @@
#include "refreshtimer.hxx"
#include "optutil.hxx"
-#include <hash_map>
+#include <boost/unordered_map.hpp>
#include <cppuhelper/implbase1.hxx>
class ScEditEngineDefaulter;
@@ -77,7 +77,7 @@ struct ScColWidthParam;
namespace sfx2 { class FileDialogHelper; }
struct DocShell_Impl;
-typedef ::std::hash_map< ULONG, ULONG > ScChangeActionMergeMap;
+typedef ::boost::unordered_map< ULONG, ULONG > ScChangeActionMergeMap;
//==================================================================
diff --git a/sc/source/ui/inc/dpcontrol.hxx b/sc/source/ui/inc/dpcontrol.hxx
index 5c5bcc49982e..489e6b23e05d 100644
--- a/sc/source/ui/inc/dpcontrol.hxx
+++ b/sc/source/ui/inc/dpcontrol.hxx
@@ -40,7 +40,7 @@
#include <boost/shared_ptr.hpp>
#include <memory>
-#include <hash_map>
+#include <boost/unordered_map.hpp>
namespace com { namespace sun { namespace star {
@@ -282,7 +282,7 @@ public:
const Size& getWindowSize() const;
- void getResult(::std::hash_map< ::rtl::OUString, bool, ::rtl::OUStringHash>& rResult);
+ void getResult(::boost::unordered_map< ::rtl::OUString, bool, ::rtl::OUStringHash>& rResult);
void close(bool bOK);
/**
diff --git a/sc/source/ui/inc/pvfundlg.hxx b/sc/source/ui/inc/pvfundlg.hxx
index 773f73679235..d2402bc02e32 100644
--- a/sc/source/ui/inc/pvfundlg.hxx
+++ b/sc/source/ui/inc/pvfundlg.hxx
@@ -43,7 +43,7 @@
#include <sfx2/itemconnect.hxx>
#include "pivot.hxx"
-#include <hash_map>
+#include <boost/unordered_map.hpp>
// ============================================================================
@@ -69,7 +69,7 @@ private:
class ScDPFunctionDlg : public ModalDialog
{
- typedef ::std::hash_map< ::rtl::OUString, ::rtl::OUString, ::rtl::OUStringHash > NameMapType;
+ typedef ::boost::unordered_map< ::rtl::OUString, ::rtl::OUString, ::rtl::OUStringHash > NameMapType;
public:
explicit ScDPFunctionDlg( Window* pParent, const ScDPLabelDataVec& rLabelVec,
const ScDPLabelData& rLabelData, const ScDPFuncData& rFuncData );
@@ -212,7 +212,7 @@ private:
ScDPObject& mrDPObj; /// The DataPilot object (for member names).
ScDPLabelData maLabelData; /// Cache for members data.
- typedef ::std::hash_map< ::rtl::OUString, ::rtl::OUString, ::rtl::OUStringHash > NameMapType;
+ typedef ::boost::unordered_map< ::rtl::OUString, ::rtl::OUString, ::rtl::OUStringHash > NameMapType;
NameMapType maDataFieldNameMap; /// Cache for displayed name to field name mapping.
};
@@ -242,7 +242,7 @@ private:
CancelButton maBtnCancel;
HelpButton maBtnHelp;
- typedef ::std::hash_map<String, long, ScStringHashCode> DimNameIndexMap;
+ typedef ::boost::unordered_map<String, long, ScStringHashCode> DimNameIndexMap;
DimNameIndexMap maNameIndexMap;
ScDPObject& mrDPObj;
};
diff --git a/sc/source/ui/unoobj/cellsuno.cxx b/sc/source/ui/unoobj/cellsuno.cxx
index fc908d3b6e13..98e960e01078 100644
--- a/sc/source/ui/unoobj/cellsuno.cxx
+++ b/sc/source/ui/unoobj/cellsuno.cxx
@@ -9572,7 +9572,7 @@ struct ScPatternHashCode
};
// Hash map to find a range by its start row
-typedef ::std::hash_map< SCROW, ScRange > ScRowRangeHashMap;
+typedef ::boost::unordered_map< SCROW, ScRange > ScRowRangeHashMap;
typedef ::std::vector<ScRange> ScRangeVector;
@@ -9691,7 +9691,7 @@ const ScRangeList& ScUniqueFormatsEntry::GetRanges()
return *aReturnRanges;
}
-typedef ::std::hash_map< const ScPatternAttr*, ScUniqueFormatsEntry, ScPatternHashCode > ScUniqueFormatsHashMap;
+typedef ::boost::unordered_map< const ScPatternAttr*, ScUniqueFormatsEntry, ScPatternHashCode > ScUniqueFormatsHashMap;
// function object to sort the range lists by start of first range
struct ScUniqueFormatsOrder
diff --git a/sc/source/ui/unoobj/chart2uno.cxx b/sc/source/ui/unoobj/chart2uno.cxx
index 912e88b97569..260b80d5a2fe 100644
--- a/sc/source/ui/unoobj/chart2uno.cxx
+++ b/sc/source/ui/unoobj/chart2uno.cxx
@@ -83,7 +83,6 @@ using ::std::vector;
using ::std::list;
using ::std::distance;
using ::std::unary_function;
-using ::std::hash_set;
using ::boost::shared_ptr;
namespace
@@ -2666,8 +2665,8 @@ void ScChart2DataSequence::StopListeningToAllExternalRefs()
if (!m_pExtRefListener.get())
return;
- const hash_set<sal_uInt16>& rFileIds = m_pExtRefListener->getAllFileIds();
- hash_set<sal_uInt16>::const_iterator itr = rFileIds.begin(), itrEnd = rFileIds.end();
+ const boost::unordered_set<sal_uInt16>& rFileIds = m_pExtRefListener->getAllFileIds();
+ boost::unordered_set<sal_uInt16>::const_iterator itr = rFileIds.begin(), itrEnd = rFileIds.end();
ScExternalRefManager* pRefMgr = m_pDocument->GetExternalRefManager();
for (; itr != itrEnd; ++itr)
pRefMgr->removeLinkListener(*itr, m_pExtRefListener.get());
@@ -2699,8 +2698,8 @@ void ScChart2DataSequence::CopyData(const ScChart2DataSequence& r)
ScExternalRefManager* pRefMgr = m_pDocument->GetExternalRefManager();
m_pExtRefListener.reset(new ExternalRefListener(*this, m_pDocument));
- const hash_set<sal_uInt16>& rFileIds = r.m_pExtRefListener->getAllFileIds();
- hash_set<sal_uInt16>::const_iterator itr = rFileIds.begin(), itrEnd = rFileIds.end();
+ const boost::unordered_set<sal_uInt16>& rFileIds = r.m_pExtRefListener->getAllFileIds();
+ boost::unordered_set<sal_uInt16>::const_iterator itr = rFileIds.begin(), itrEnd = rFileIds.end();
for (; itr != itrEnd; ++itr)
{
pRefMgr->addLinkListener(*itr, m_pExtRefListener.get());
@@ -2884,7 +2883,7 @@ void ScChart2DataSequence::ExternalRefListener::removeFileId(sal_uInt16 nFileId)
maFileIds.erase(nFileId);
}
-const hash_set<sal_uInt16>& ScChart2DataSequence::ExternalRefListener::getAllFileIds()
+const boost::unordered_set<sal_uInt16>& ScChart2DataSequence::ExternalRefListener::getAllFileIds()
{
return maFileIds;
}
diff --git a/sc/source/ui/vba/vbachartobjects.hxx b/sc/source/ui/vba/vbachartobjects.hxx
index 3524c8ffe30e..ee0b7b13f2cd 100644
--- a/sc/source/ui/vba/vbachartobjects.hxx
+++ b/sc/source/ui/vba/vbachartobjects.hxx
@@ -36,11 +36,11 @@
#include <com/sun/star/container/XEnumerationAccess.hpp>
#include <vbahelper/vbacollectionimpl.hxx>
#include "excelvbahelper.hxx"
-#include <hash_map>
+#include <boost/unordered_map.hpp>
typedef CollTestImplHelper< ov::excel::XChartObjects > ChartObjects_BASE;
/* #TODO see if this hash table is 'really' necessary
-typedef ::std::hash_map< ::rtl::OUString,
+typedef ::boost::unordered_map< ::rtl::OUString,
css::uno::Reference< ov::excel::XChartObject >,
::rtl::OUStringHash,
::std::equal_to< ::rtl::OUString > > aHashTable;
diff --git a/sc/source/ui/vba/vbacharts.hxx b/sc/source/ui/vba/vbacharts.hxx
index 76bd2bec808b..ff1fdec0b549 100644
--- a/sc/source/ui/vba/vbacharts.hxx
+++ b/sc/source/ui/vba/vbacharts.hxx
@@ -31,7 +31,7 @@
#include <com/sun/star/sheet/XSpreadsheetDocument.hpp>
#include <vbahelper/vbacollectionimpl.hxx>
#include "excelvbahelper.hxx"
-#include <hash_map>
+#include <boost/unordered_map.hpp>
typedef CollTestImplHelper< ov::excel::XCharts > Charts_BASE;
diff --git a/sc/source/ui/vba/vbawindow.cxx b/sc/source/ui/vba/vbawindow.cxx
index 1f0c9183708a..7ff6186010e3 100644
--- a/sc/source/ui/vba/vbawindow.cxx
+++ b/sc/source/ui/vba/vbawindow.cxx
@@ -47,7 +47,7 @@
#include <tabvwsh.hxx>
#include <docuno.hxx>
#include <sc.hrc>
-#include <hash_map>
+#include <boost/unordered_map.hpp>
#include <sfx2/viewfrm.hxx>
#include <vcl/wrkwin.hxx>
#include "unonames.hxx"
@@ -56,7 +56,7 @@ using namespace ::com::sun::star;
using namespace ::ooo::vba;
using namespace ::ooo::vba::excel::XlWindowState;
-typedef std::hash_map< rtl::OUString,
+typedef boost::unordered_map< rtl::OUString,
SCTAB, ::rtl::OUStringHash,
::std::equal_to< ::rtl::OUString > > NameIndexHash;
diff --git a/sc/source/ui/vba/vbawindows.cxx b/sc/source/ui/vba/vbawindows.cxx
index e5d0a09e33e7..5cf95b999763 100644
--- a/sc/source/ui/vba/vbawindows.cxx
+++ b/sc/source/ui/vba/vbawindows.cxx
@@ -27,7 +27,7 @@
************************************************************************/
#include "vbawindows.hxx"
-#include <hash_map>
+#include <boost/unordered_map.hpp>
#include <com/sun/star/sheet/XSpreadsheetDocument.hpp>
#include <com/sun/star/frame/XDesktop.hpp>
@@ -40,7 +40,7 @@
using namespace ::com::sun::star;
using namespace ::ooo::vba;
-typedef std::hash_map< rtl::OUString,
+typedef boost::unordered_map< rtl::OUString,
sal_Int32, ::rtl::OUStringHash,
::std::equal_to< ::rtl::OUString > > NameIndexHash;
diff --git a/sc/source/ui/vba/vbaworkbooks.cxx b/sc/source/ui/vba/vbaworkbooks.cxx
index 1ce20b8b2e47..ee947f1a757e 100644
--- a/sc/source/ui/vba/vbaworkbooks.cxx
+++ b/sc/source/ui/vba/vbaworkbooks.cxx
@@ -60,7 +60,7 @@
#include "vbaworkbooks.hxx"
#include <vbahelper/vbahelper.hxx>
-#include <hash_map>
+#include <boost/unordered_map.hpp>
#include <vector>
#include <osl/file.hxx>
using namespace ::ooo::vba;
diff --git a/sc/source/ui/view/dbfunc3.cxx b/sc/source/ui/view/dbfunc3.cxx
index 62b6271dff4d..aeb28de50f3d 100644
--- a/sc/source/ui/view/dbfunc3.cxx
+++ b/sc/source/ui/view/dbfunc3.cxx
@@ -79,8 +79,8 @@
#include "cell.hxx"
#include "userlist.hxx"
-#include <hash_set>
-#include <hash_map>
+#include <boost/unordered_set.hpp>
+#include <boost/unordered_map.hpp>
#include <memory>
#include <list>
#include <vector>
@@ -99,8 +99,6 @@ using ::rtl::OUStringBuffer;
using ::std::auto_ptr;
using ::std::list;
using ::std::vector;
-using ::std::hash_map;
-using ::std::hash_set;
// STATIC DATA -----------------------------------------------------------
@@ -1779,7 +1777,7 @@ bool ScDBFunc::DataPilotSort( const ScAddress& rPos, bool bAscending, sal_uInt16
typedef ScDPSaveDimension::MemberList MemList;
const MemList& rDimMembers = pSaveDim->GetMembers();
list<OUString> aMembers;
- hash_set<OUString, ::rtl::OUStringHash> aMemberSet;
+ boost::unordered_set<OUString, ::rtl::OUStringHash> aMemberSet;
size_t nMemberCount = 0;
for (MemList::const_iterator itr = rDimMembers.begin(), itrEnd = rDimMembers.end();
itr != itrEnd; ++itr)
@@ -1796,7 +1794,7 @@ bool ScDBFunc::DataPilotSort( const ScAddress& rPos, bool bAscending, sal_uInt16
// Collect and rank those custom sort strings that also exist in the member name list.
- typedef hash_map<OUString, sal_uInt16, OUStringHash> UserSortMap;
+ typedef boost::unordered_map<OUString, sal_uInt16, OUStringHash> UserSortMap;
UserSortMap aSubStrs;
sal_uInt16 nSubCount = 0;
if (pUserListId)
@@ -1900,7 +1898,7 @@ BOOL ScDBFunc::DataPilotMove( const ScRange& rSource, const ScAddress& rDest )
bool bValid = ( aDestData.Dimension >= 0 ); // dropping onto a field
// look through the source range
- std::hash_set< rtl::OUString, rtl::OUStringHash, std::equal_to<rtl::OUString> > aMembersSet; // for lookup
+ boost::unordered_set< rtl::OUString, rtl::OUStringHash, std::equal_to<rtl::OUString> > aMembersSet; // for lookup
std::vector< rtl::OUString > aMembersVector; // members in original order, for inserting
aMembersVector.reserve( std::max( static_cast<SCSIZE>( rSource.aEnd.Col() - rSource.aStart.Col() + 1 ),
static_cast<SCSIZE>( rSource.aEnd.Row() - rSource.aStart.Row() + 1 ) ) );
diff --git a/sc/source/ui/view/gridwin2.cxx b/sc/source/ui/view/gridwin2.cxx
index 475ee13cd2f8..df6a7f3e9b10 100644
--- a/sc/source/ui/view/gridwin2.cxx
+++ b/sc/source/ui/view/gridwin2.cxx
@@ -61,13 +61,13 @@
#include "scabstdlg.hxx"
#include <vector>
-#include <hash_map>
+#include <boost/unordered_map.hpp>
using namespace com::sun::star;
using ::com::sun::star::sheet::DataPilotFieldOrientation;
using ::std::vector;
using ::std::auto_ptr;
-using ::std::hash_map;
+using ::boost::unordered_map;
using ::rtl::OUString;
using ::rtl::OUStringHash;
@@ -543,8 +543,8 @@ void ScGridWindow::DPLaunchFieldPopupMenu(
void ScGridWindow::UpdateDPFromFieldPopupMenu()
{
- typedef hash_map<OUString, OUString, OUStringHash> MemNameMapType;
- typedef hash_map<OUString, bool, OUStringHash> MemVisibilityType;
+ typedef boost::unordered_map<OUString, OUString, OUStringHash> MemNameMapType;
+ typedef boost::unordered_map<OUString, bool, OUStringHash> MemVisibilityType;
if (!mpDPFieldPopup.get())
return;