Kaydet (Commit) 69a290dd authored tarafından Kohei Yoshida's avatar Kohei Yoshida

Explicitly specify less function object for map, to get it to build with MSVC.

üst a1749730
...@@ -297,6 +297,11 @@ public: ...@@ -297,6 +297,11 @@ public:
::rtl::OUString maDBName; ::rtl::OUString maDBName;
::rtl::OUString maCommand; ::rtl::OUString maCommand;
DBType(sal_Int32 nSdbType, const ::rtl::OUString& rDBName, const ::rtl::OUString& rCommand); 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: ...@@ -304,7 +309,7 @@ public:
*/ */
class DBCaches class DBCaches
{ {
typedef ::boost::ptr_map<DBType, ScDPCache> CachesType; typedef ::boost::ptr_map<DBType, ScDPCache, DBType::less> CachesType;
CachesType maCaches; CachesType maCaches;
ScDocument* mpDoc; ScDocument* mpDoc;
public: public:
......
...@@ -798,7 +798,7 @@ ScDPObject* createDPFromRange( ...@@ -798,7 +798,7 @@ ScDPObject* createDPFromRange(
{ {
OUString aDimName(aFields[i].pName, strlen(aFields[i].pName), RTL_TEXTENCODING_UTF8); OUString aDimName(aFields[i].pName, strlen(aFields[i].pName), RTL_TEXTENCODING_UTF8);
ScDPSaveDimension* pDim = aSaveData.GetDimensionByName(aDimName); ScDPSaveDimension* pDim = aSaveData.GetDimensionByName(aDimName);
pDim->SetOrientation(aFields[i].eOrient); pDim->SetOrientation(static_cast<sal_uInt16>(aFields[i].eOrient));
pDim->SetUsedHierarchy(0); pDim->SetUsedHierarchy(0);
pDim->SetShowEmpty(true); pDim->SetShowEmpty(true);
......
...@@ -2445,6 +2445,11 @@ void ScDPCollection::NameCaches::removeCache(const OUString& rName) ...@@ -2445,6 +2445,11 @@ void ScDPCollection::NameCaches::removeCache(const OUString& rName)
ScDPCollection::DBType::DBType(sal_Int32 nSdbType, const OUString& rDBName, const OUString& rCommand) : ScDPCollection::DBType::DBType(sal_Int32 nSdbType, const OUString& rDBName, const OUString& rCommand) :
mnSdbType(nSdbType), maDBName(rDBName), maCommand(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) {} ScDPCollection::DBCaches::DBCaches(ScDocument* pDoc) : mpDoc(pDoc) {}
const ScDPCache* ScDPCollection::DBCaches::getCache(sal_Int32 nSdbType, const OUString& rDBName, const OUString& rCommand) const ScDPCache* ScDPCollection::DBCaches::getCache(sal_Int32 nSdbType, const OUString& rDBName, const OUString& rCommand)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment