summaryrefslogtreecommitdiff
path: root/chart2
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2015-12-03 23:04:19 +0100
committerMichael Stahl <mstahl@redhat.com>2015-12-04 12:01:13 +0100
commit19f64ccc8c71b1e63b166c559479ee1c3390f8a0 (patch)
tree164cd445ba0a7cb1dada4ac220ef87ef7a3aedac /chart2
parentf46327e6c99e5230907debf660337a47d4fa7caf (diff)
chart2: replace boost::ptr_map with std::map
Change-Id: I07a8b2eaa11ca29e3303d323060c3a4c52823967
Diffstat (limited to 'chart2')
-rw-r--r--chart2/inc/pch/precompiled_chartcore.hxx1
-rw-r--r--chart2/source/view/inc/3DChartObjects.hxx7
-rw-r--r--chart2/source/view/main/3DChartObjects.cxx11
3 files changed, 9 insertions, 10 deletions
diff --git a/chart2/inc/pch/precompiled_chartcore.hxx b/chart2/inc/pch/precompiled_chartcore.hxx
index 5941967f42ed..4c7b206082ad 100644
--- a/chart2/inc/pch/precompiled_chartcore.hxx
+++ b/chart2/inc/pch/precompiled_chartcore.hxx
@@ -38,7 +38,6 @@
#include <vector>
#include <boost/checked_delete.hpp>
#include <boost/intrusive_ptr.hpp>
-#include <boost/ptr_container/ptr_map.hpp>
#include <osl/conditn.hxx>
#include <osl/diagnose.h>
#include <osl/doublecheckedlocking.h>
diff --git a/chart2/source/view/inc/3DChartObjects.hxx b/chart2/source/view/inc/3DChartObjects.hxx
index 1c2d61b2c171..27123ce8e563 100644
--- a/chart2/source/view/inc/3DChartObjects.hxx
+++ b/chart2/source/view/inc/3DChartObjects.hxx
@@ -17,9 +17,10 @@
#include <vcl/opengl/OpenGLContext.hxx>
#include "GL3DRenderer.hxx"
-#include <boost/ptr_container/ptr_map.hpp>
#include <boost/shared_array.hpp>
+#include <map>
+
namespace chart {
namespace opengl3D {
@@ -39,9 +40,9 @@ class TextCache
public:
const TextCacheItem &getText(OUString const & rText, bool bIs3dText = false);
private:
- typedef boost::ptr_map<OUString const, TextCacheItem> TextCacheType;
+ typedef std::map<OUString const, TextCacheItem> TextCacheType;
- TextCacheType maTextCache;
+ TextCacheType m_TextCache;
};
class Renderable3DObject
diff --git a/chart2/source/view/main/3DChartObjects.cxx b/chart2/source/view/main/3DChartObjects.cxx
index e8bb046add59..56cc3232876f 100644
--- a/chart2/source/view/main/3DChartObjects.cxx
+++ b/chart2/source/view/main/3DChartObjects.cxx
@@ -72,9 +72,9 @@ void Line::setLineColor(const Color& rColor)
const TextCacheItem& TextCache::getText(OUString const & rText, bool bIs3dText)
{
- TextCacheType::const_iterator itr = maTextCache.find(rText);
- if(itr != maTextCache.end())
- return *itr->second;
+ TextCacheType::const_iterator const itr = m_TextCache.find(rText);
+ if (itr != m_TextCache.end())
+ return itr->second;
ScopedVclPtrInstance< VirtualDevice > pDevice(*Application::GetDefaultDevice(),
DeviceFormat::DEFAULT, DeviceFormat::DEFAULT);
@@ -105,10 +105,9 @@ const TextCacheItem& TextCache::getText(OUString const & rText, bool bIs3dText)
long nBmpHeight = aText.GetSizePixel().Height();
sal_uInt8* pBitmapBuf(new sal_uInt8[3* nBmpWidth * nBmpHeight]);
memcpy(pBitmapBuf, buf, 3* nBmpWidth * nBmpHeight);
- TextCacheItem *pItem = new TextCacheItem(pBitmapBuf, aText.GetSizePixel());
- maTextCache.insert(rText, pItem);
+ m_TextCache.insert(std::make_pair(rText, TextCacheItem(pBitmapBuf, aText.GetSizePixel())));
Bitmap::ReleaseAccess(pAcc);
- return *maTextCache.find(rText)->second;
+ return m_TextCache.find(rText)->second;
}
Text::Text(OpenGL3DRenderer* pRenderer, TextCache& rTextCache, const OUString& rStr, sal_uInt32 nId):