[Libreoffice-commits] core.git: 3 commits - chart2/qa sd/source
Michael Stahl
mstahl at redhat.com
Mon Oct 20 06:27:39 PDT 2014
chart2/qa/extras/chart2export.cxx | 11 ++++++++++-
chart2/qa/extras/chart2import.cxx | 12 ++++++------
sd/source/ui/unoidl/unomodel.cxx | 2 +-
3 files changed, 17 insertions(+), 8 deletions(-)
New commits:
commit f5e135bb250e3f5fdae9e7b48cc4e92f027b65d8
Author: Michael Stahl <mstahl at redhat.com>
Date: Thu Oct 16 22:35:10 2014 +0200
chart2: fix temp file leaks in Chart2ExportTest
Change-Id: Id128f19dee056189a34a02156fd0bf3ac14c2454
diff --git a/chart2/qa/extras/chart2export.cxx b/chart2/qa/extras/chart2export.cxx
index 38bd92f..fc29305 100644
--- a/chart2/qa/extras/chart2export.cxx
+++ b/chart2/qa/extras/chart2export.cxx
@@ -40,6 +40,8 @@ public:
void test();
void testErrorBarXLSX();
void testTrendline();
+ void testTrendlineOOXML();
+ void testTrendlineXLS();
void testStockChart();
void testBarChart();
void testCrosses();
@@ -82,6 +84,8 @@ public:
CPPUNIT_TEST(test);
CPPUNIT_TEST(testErrorBarXLSX);
CPPUNIT_TEST(testTrendline);
+ CPPUNIT_TEST(testTrendlineOOXML);
+ CPPUNIT_TEST(testTrendlineXLS);
CPPUNIT_TEST(testStockChart);
CPPUNIT_TEST(testBarChart);
CPPUNIT_TEST(testCrosses);
@@ -410,17 +414,22 @@ void Chart2ExportTest::testTrendline()
checkTrendlinesInChart(getChartDocFromSheet( 0, mxComponent));
reload("calc8");
checkTrendlinesInChart(getChartDocFromSheet( 0, mxComponent));
+}
+void Chart2ExportTest::testTrendlineOOXML()
+{
load("/chart2/qa/extras/data/ods/", "trendline.ods");
checkTrendlinesInChart(getChartDocFromSheet( 0, mxComponent));
reload("Calc Office Open XML");
checkTrendlinesInChart(getChartDocFromSheet( 0, mxComponent));
+}
+void Chart2ExportTest::testTrendlineXLS()
+{
load("/chart2/qa/extras/data/ods/", "trendline.ods");
checkTrendlinesInChart(getChartDocFromSheet( 0, mxComponent));
reload("MS Excel 97");
checkTrendlinesInChart(getChartDocFromSheet( 0, mxComponent));
-
}
void Chart2ExportTest::testStockChart()
commit 9a1889f0cb87fe50bb1f6b2afd7ff7c3ebe20590
Author: Michael Stahl <mstahl at redhat.com>
Date: Thu Oct 16 18:44:32 2014 +0200
chart2: fix temp file leak caused by missing tearDown() between tests
Change-Id: Ia4ee76743c640c0c5b92ec169e619f6c8788480e
diff --git a/chart2/qa/extras/chart2import.cxx b/chart2/qa/extras/chart2import.cxx
index 0a70fc9..4d0eb23 100644
--- a/chart2/qa/extras/chart2import.cxx
+++ b/chart2/qa/extras/chart2import.cxx
@@ -54,6 +54,7 @@ public:
void testFlatODSStackedColumnChart();
void testFdo78080();
void testFdo54361();
+ void testFdo54361_1();
void testAutoBackgroundXLSX();
void testTextCanOverlapXLSX();
void testNumberFormatsXLSX();
@@ -84,6 +85,7 @@ public:
CPPUNIT_TEST(testFlatODSStackedColumnChart);
CPPUNIT_TEST(testFdo78080);
CPPUNIT_TEST(testFdo54361);
+ CPPUNIT_TEST(testFdo54361_1);
CPPUNIT_TEST(testAutoBackgroundXLSX);
CPPUNIT_TEST(testTextCanOverlapXLSX);
CPPUNIT_TEST(testNumberFormatsXLSX);
@@ -610,9 +612,13 @@ void Chart2ImportTest::testTransparentBackground(OUString const & filename)
CPPUNIT_ASSERT_MESSAGE("Background needs to be with solid fill style", aStyle == 1);
}
+// 2 test methods here so that tearDown() can dispose the document
void Chart2ImportTest::testFdo54361()
{
testTransparentBackground("fdo54361.xlsx");
+}
+void Chart2ImportTest::testFdo54361_1()
+{
testTransparentBackground("fdo54361-1.xlsx");
}
commit 6e355d95614e04282620574c89ff63fd3405c14e
Author: Michael Stahl <mstahl at redhat.com>
Date: Thu Oct 16 13:27:27 2014 +0200
Revert "at least fix the crash when calling SdXImpressDocument::dispose
... for now"
This reverts commit 599473a13e3c5ba669d995c913ad415bd674a16c.
moggi says the unspecified crash happened with the tests following the
comment in chart2import.cxx:75, but the tests run fine in valgrind now.
The commit creates a memory leak in the CppunitTests as
SfxBaseModel::dispose() returns early, because mbDisposed is set.
Change-Id: I987dce6a4090784d166a4a3b2e7f9e2c0cddd289
diff --git a/chart2/qa/extras/chart2import.cxx b/chart2/qa/extras/chart2import.cxx
index 3b1f1e7..0a70fc9 100644
--- a/chart2/qa/extras/chart2import.cxx
+++ b/chart2/qa/extras/chart2import.cxx
@@ -71,12 +71,6 @@ public:
CPPUNIT_TEST(testODTChartSeries);
CPPUNIT_TEST(testDOCChartSeries);
CPPUNIT_TEST(testDOCXChartSeries);
-/*
- * Disabling Impress Uts.
- * ChartTest::tearDown() calls dispose of mxComponent
- * this causes the UT to crash in sd.
- * sd::DrawView::Notify tries to reset by calling sd::DrawViewShell::ResetActualPage
- */
CPPUNIT_TEST(testPPTChartSeries);
CPPUNIT_TEST(testPPTXChartSeries);
CPPUNIT_TEST(testPPTXHiddenDataSeries);
diff --git a/sd/source/ui/unoidl/unomodel.cxx b/sd/source/ui/unoidl/unomodel.cxx
index be94ae7..f5e7065 100644
--- a/sd/source/ui/unoidl/unomodel.cxx
+++ b/sd/source/ui/unoidl/unomodel.cxx
@@ -2399,8 +2399,8 @@ void SAL_CALL SdXImpressDocument::dispose() throw (::com::sun::star::uno::Runtim
// that dispose() is called again. It is important to forward this
// second dispose() to the base class, too.
// As a consequence the following code has to be able to be run twice.
- mbDisposed = true;
SfxBaseModel::dispose();
+ mbDisposed = true;
uno::Reference< container::XNameAccess > xStyles(mxStyleFamilies);
if( xStyles.is() )
More information about the Libreoffice-commits
mailing list