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

Markus Mohrhard markus.mohrhard at googlemail.com
Sun Mar 27 12:43:03 UTC 2016


 sc/inc/colorscale.hxx        |    7 ++-----
 sc/inc/document.hxx          |    8 +++++++-
 sc/source/ui/view/output.cxx |    4 ++--
 3 files changed, 11 insertions(+), 8 deletions(-)

New commits:
commit c90f1f339330644ec34c76247b5c299a18d318b4
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date:   Sun Mar 27 03:25:45 2016 +0200

    mark the reference as const
    
    Change-Id: I66ee342205acb9875899af9a65da9eb9cd5ecc74

diff --git a/sc/source/ui/view/output.cxx b/sc/source/ui/view/output.cxx
index e4c722f..7997abd 100644
--- a/sc/source/ui/view/output.cxx
+++ b/sc/source/ui/view/output.cxx
@@ -873,7 +873,7 @@ void drawDataBars(vcl::RenderContext& rRenderContext, const ScDataBarInfo* pOldD
     }
 }
 
-BitmapEx& getIcon(sc::IconSetBitmapMap & rIconSetBitmapMap, ScIconSetType eType, sal_Int32 nIndex)
+const BitmapEx& getIcon(sc::IconSetBitmapMap & rIconSetBitmapMap, ScIconSetType eType, sal_Int32 nIndex)
 {
     return ScIconSetFormat::getBitmap(rIconSetBitmapMap, eType, nIndex);
 }
@@ -884,7 +884,7 @@ void drawIconSets(vcl::RenderContext& rRenderContext, const ScIconSetInfo* pOldI
     //long nSize = 16;
     ScIconSetType eType = pOldIconSetInfo->eIconSetType;
     sal_Int32 nIndex = pOldIconSetInfo->nIconIndex;
-    BitmapEx& rIcon = getIcon(rIconSetBitmapMap, eType, nIndex);
+    const BitmapEx& rIcon = getIcon(rIconSetBitmapMap, eType, nIndex);
     long aOrigSize = std::max<long>(0,std::min(rRect.GetSize().getWidth() - 4 * nOneX, rRect.GetSize().getHeight() -4 * nOneY));
     rRenderContext.DrawBitmapEx( Point( rRect.Left() + 2 * nOneX, rRect.Top() + 2 * nOneY), Size(aOrigSize, aOrigSize), rIcon );
 }
commit 82510829d5be4321166ae80679b43b376f41ae9e
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date:   Sun Mar 27 03:12:02 2016 +0200

    don't inherit from std::map
    
    Change-Id: I50e9b27c45f6f7bd52af9e0c8a188124d6413cbc

diff --git a/sc/inc/colorscale.hxx b/sc/inc/colorscale.hxx
index 992b532..96a05ee 100644
--- a/sc/inc/colorscale.hxx
+++ b/sc/inc/colorscale.hxx
@@ -14,6 +14,7 @@
 #include <tools/color.hxx>
 #include "rangelst.hxx"
 #include "conditio.hxx"
+#include "document.hxx"
 
 #include <memory>
 #include <vector>
@@ -26,10 +27,6 @@ class ScTokenArray;
 struct ScDataBarInfo;
 class BitmapEx;
 
-namespace sc {
-    class IconSetBitmapMap : public std::map<sal_Int32, BitmapEx> {};
-}
-
 // don't change the order
 // they are also used in the dialog to determine the position
 // in the list box
@@ -375,7 +372,7 @@ public:
     virtual condformat::ScFormatEntryType GetType() const override;
 
     static ScIconSetMap* getIconSetMap();
-    static BitmapEx& getBitmap(sc::IconSetBitmapMap &, ScIconSetType eType, sal_Int32 nIndex);
+    static BitmapEx& getBitmap(sc::IconSetBitmapMap& rBitmapMap, ScIconSetType eType, sal_Int32 nIndex);
 
     typedef ScIconSetFormatData::Entries_t::iterator iterator;
     typedef ScIconSetFormatData::Entries_t::const_iterator const_iterator;
diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx
index 6c313a9..8caca17 100644
--- a/sc/inc/document.hxx
+++ b/sc/inc/document.hxx
@@ -79,7 +79,6 @@ class RefMovedHint;
 struct SortUndoParam;
 struct ReorderParam;
 class FormulaGroupAreaListener;
-class IconSetBitmapMap;
 
 }
 
@@ -190,6 +189,13 @@ class ScHint;
 class SvtBroadcaster;
 enum class ScDBDataPortion;
 enum class ScSheetEventId;
+class BitmapEx;
+
+namespace sc {
+
+typedef std::map<sal_Int32, BitmapEx> IconSetBitmapMap;
+
+}
 
 namespace com { namespace sun { namespace star {
     namespace lang {


More information about the Libreoffice-commits mailing list