[Libreoffice-commits] core.git: 3 commits - chart2/source sc/source
Markus Mohrhard
markus.mohrhard at googlemail.com
Mon Jun 9 21:52:37 PDT 2014
chart2/source/view/main/ChartView.cxx | 8 ++++++++
sc/source/filter/excel/excrecds.cxx | 3 ++-
sc/source/filter/inc/pivotcachebuffer.hxx | 2 +-
sc/source/filter/oox/pivotcachebuffer.cxx | 2 +-
4 files changed, 12 insertions(+), 3 deletions(-)
New commits:
commit 32ac015be4d0f33120bc066e7f49e197c7405c45
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date: Tue Jun 10 06:30:09 2014 +0200
fix invalid memory access related to temporary object
e.g. export of ooo116460-2.xlsx
Change-Id: Id1ca2249e7b1f197a2df0d122c57dd97c4c4d785
diff --git a/sc/source/filter/excel/excrecds.cxx b/sc/source/filter/excel/excrecds.cxx
index b7ce324..36a3254 100644
--- a/sc/source/filter/excel/excrecds.cxx
+++ b/sc/source/filter/excel/excrecds.cxx
@@ -891,7 +891,8 @@ void XclExpAutofilter::SaveXml( XclExpXmlStream& rStrm )
std::vector<OUString>::const_iterator itr = maMultiValues.begin(), itrEnd = maMultiValues.end();
for (; itr != itrEnd; ++itr)
{
- const char* pz = OUStringToOString(*itr, RTL_TEXTENCODING_UTF8).getStr();
+ OString aStr = OUStringToOString(*itr, RTL_TEXTENCODING_UTF8);
+ const char* pz = aStr.getStr();
rWorksheet->singleElement(XML_filter, XML_val, pz, FSEND);
}
rWorksheet->endElement(XML_filters);
commit 009c6835aca4a0066c6ae80db8736d8e43af6783
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date: Tue Jun 10 06:22:25 2014 +0200
avoid access to ChartView after having been deleted
e.g. 49225-3.xlsx
Change-Id: I62f2c39a928619ccfa66f128577de2c71f243a1c
diff --git a/chart2/source/view/main/ChartView.cxx b/chart2/source/view/main/ChartView.cxx
index 5a2b3e4..efc5c10 100644
--- a/chart2/source/view/main/ChartView.cxx
+++ b/chart2/source/view/main/ChartView.cxx
@@ -158,6 +158,7 @@ class GL2DRenderer : public IRenderer
{
public:
GL2DRenderer(ChartView* pView);
+ virtual ~GL2DRenderer() SAL_OVERRIDE;
virtual void update() SAL_OVERRIDE;
virtual void clickedAt(const Point& rPos, sal_uInt16 nButton) SAL_OVERRIDE;
@@ -173,6 +174,13 @@ GL2DRenderer::GL2DRenderer(ChartView* pView):
{
}
+GL2DRenderer::~GL2DRenderer()
+{
+ OpenGLWindow* pWindow = mpView->mrChartModel.getOpenGLWindow();
+ if(pWindow)
+ pWindow->setRenderer(NULL);
+}
+
void GL2DRenderer::update()
{
mpView->render();
commit de95cdd5768b4713a6c7f99716ddac7487dad288
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date: Tue Jun 10 06:12:32 2014 +0200
don't use temporary object
This avoids invalid memory access with fdo45268-1.xlsx
Change-Id: If141df14d7d747023c944c83c2d8957abe8b95ad
diff --git a/sc/source/filter/inc/pivotcachebuffer.hxx b/sc/source/filter/inc/pivotcachebuffer.hxx
index ffac9cf..a4e0746 100644
--- a/sc/source/filter/inc/pivotcachebuffer.hxx
+++ b/sc/source/filter/inc/pivotcachebuffer.hxx
@@ -275,7 +275,7 @@ public:
/** Returns the names of all shared or group items. */
void getCacheItemNames( ::std::vector< OUString >& orItemNames ) const;
/** Returns shared or group items. */
- PivotCacheItemList getCacheItems() const;
+ const PivotCacheItemList& getCacheItems() const;
/** Creates inplace numeric grouping settings. */
void convertNumericGrouping(
diff --git a/sc/source/filter/oox/pivotcachebuffer.cxx b/sc/source/filter/oox/pivotcachebuffer.cxx
index 7ece914..b9a491f 100644
--- a/sc/source/filter/oox/pivotcachebuffer.cxx
+++ b/sc/source/filter/oox/pivotcachebuffer.cxx
@@ -749,7 +749,7 @@ void PivotCacheField::getCacheItemNames( ::std::vector< OUString >& orItemNames
maSharedItems.getCacheItemNames( orItemNames );
}
-PivotCacheItemList PivotCacheField::getCacheItems() const
+const PivotCacheItemList& PivotCacheField::getCacheItems() const
{
if( hasGroupItems() )
return maGroupItems;
More information about the Libreoffice-commits
mailing list