diff options
author | Kohei Yoshida <kyoshida@novell.com> | 2011-05-06 15:35:19 -0400 |
---|---|---|
committer | Kohei Yoshida <kyoshida@novell.com> | 2011-05-06 15:35:19 -0400 |
commit | 09ad3b0ffd21936f4eb8bf380ff0f55512c47480 (patch) | |
tree | 9a8000bf090b5a828c498fed07963a0a05fed5cc | |
parent | 67d7f2e028566c39cf296fae5ef91d4fe0d3c26d (diff) |
Explicitly specify less function object for map, to get it to build with MSVC.
-rw-r--r-- | sc/inc/dpobject.hxx | 7 | ||||
-rw-r--r-- | sc/qa/unit/ucalc.cxx | 2 | ||||
-rw-r--r-- | sc/source/core/data/dpobject.cxx | 5 |
3 files changed, 12 insertions, 2 deletions
diff --git a/sc/inc/dpobject.hxx b/sc/inc/dpobject.hxx index 5769303aa..510f3083f 100644 --- a/sc/inc/dpobject.hxx +++ b/sc/inc/dpobject.hxx @@ -297,6 +297,11 @@ public: ::rtl::OUString maDBName; ::rtl::OUString maCommand; DBType(sal_Int32 nSdbType, const ::rtl::OUString& rDBName, const ::rtl::OUString& rCommand); + + struct less : public ::std::binary_function<DBType, DBType, bool> + { + bool operator() (const DBType& left, const DBType& right) const; + }; }; /** @@ -304,7 +309,7 @@ public: */ class DBCaches { - typedef ::boost::ptr_map<DBType, ScDPCache> CachesType; + typedef ::boost::ptr_map<DBType, ScDPCache, DBType::less> CachesType; CachesType maCaches; ScDocument* mpDoc; public: diff --git a/sc/qa/unit/ucalc.cxx b/sc/qa/unit/ucalc.cxx index 0ab6d32b0..58cacbcfb 100644 --- a/sc/qa/unit/ucalc.cxx +++ b/sc/qa/unit/ucalc.cxx @@ -798,7 +798,7 @@ ScDPObject* createDPFromRange( { OUString aDimName(aFields[i].pName, strlen(aFields[i].pName), RTL_TEXTENCODING_UTF8); ScDPSaveDimension* pDim = aSaveData.GetDimensionByName(aDimName); - pDim->SetOrientation(aFields[i].eOrient); + pDim->SetOrientation(static_cast<sal_uInt16>(aFields[i].eOrient)); pDim->SetUsedHierarchy(0); pDim->SetShowEmpty(true); diff --git a/sc/source/core/data/dpobject.cxx b/sc/source/core/data/dpobject.cxx index 401ef3bac..85f02e2c4 100644 --- a/sc/source/core/data/dpobject.cxx +++ b/sc/source/core/data/dpobject.cxx @@ -2445,6 +2445,11 @@ void ScDPCollection::NameCaches::removeCache(const OUString& rName) ScDPCollection::DBType::DBType(sal_Int32 nSdbType, const OUString& rDBName, const OUString& rCommand) : mnSdbType(nSdbType), maDBName(rDBName), maCommand(rCommand) {} +bool ScDPCollection::DBType::less::operator() (const DBType& left, const DBType& right) const +{ + return left < right; +} + ScDPCollection::DBCaches::DBCaches(ScDocument* pDoc) : mpDoc(pDoc) {} const ScDPCache* ScDPCollection::DBCaches::getCache(sal_Int32 nSdbType, const OUString& rDBName, const OUString& rCommand) |