[Libreoffice-commits] .: Branch 'libreoffice-3-4' - sc/inc sc/qa sc/source

Kohei Yoshida kohei at kemper.freedesktop.org
Fri May 6 12:37:38 PDT 2011


 sc/inc/dpobject.hxx              |    7 ++++++-
 sc/qa/unit/ucalc.cxx             |    2 +-
 sc/source/core/data/dpobject.cxx |    5 +++++
 3 files changed, 12 insertions(+), 2 deletions(-)

New commits:
commit 09ad3b0ffd21936f4eb8bf380ff0f55512c47480
Author: Kohei Yoshida <kyoshida at novell.com>
Date:   Fri May 6 15:35:19 2011 -0400

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

diff --git a/sc/inc/dpobject.hxx b/sc/inc/dpobject.hxx
index 5769303..510f308 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 0ab6d32..58cacbc 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 401ef3b..85f02e2 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)


More information about the Libreoffice-commits mailing list