summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--chart2/qa/extras/chart2import.cxx10
-rw-r--r--chart2/qa/extras/data/docx/barChart.docxbin0 -> 40092 bytes
-rw-r--r--oox/source/helper/propertymap.cxx7
3 files changed, 12 insertions, 5 deletions
diff --git a/chart2/qa/extras/chart2import.cxx b/chart2/qa/extras/chart2import.cxx
index 2d4259b1102b..17940fec8559 100644
--- a/chart2/qa/extras/chart2import.cxx
+++ b/chart2/qa/extras/chart2import.cxx
@@ -34,6 +34,7 @@ public:
void testPPTChartSeries();
void testODPChartSeries();
void testBnc864396();
+ void testChartFileOpen();
CPPUNIT_TEST_SUITE(Chart2ImportTest);
CPPUNIT_TEST(Fdo60083);
@@ -45,6 +46,7 @@ public:
CPPUNIT_TEST(testODTChartSeries);
CPPUNIT_TEST(testDOCChartSeries);
CPPUNIT_TEST(testDOCXChartSeries);
+ CPPUNIT_TEST(testChartFileOpen);
/*
* Disabling Impress Uts.
* ChartTest::tearDown() calls dispose of mxComponent
@@ -260,7 +262,6 @@ void Chart2ImportTest::testPPTChartSeries()
CPPUNIT_ASSERT_EQUAL(OUString("Column 1"), seriesList[0]);
CPPUNIT_ASSERT_EQUAL(OUString("Column 2"), seriesList[1]);
CPPUNIT_ASSERT_EQUAL(OUString("Column 3"), seriesList[2]);
-
}
void Chart2ImportTest::testPPTXChartSeries()
@@ -270,7 +271,6 @@ void Chart2ImportTest::testPPTXChartSeries()
CPPUNIT_ASSERT_EQUAL(OUString("Column 1"), seriesList[1]);
CPPUNIT_ASSERT_EQUAL(OUString("Column 2"), seriesList[2]);
CPPUNIT_ASSERT_EQUAL(OUString("Column 3"), seriesList[3]);
-
}
void Chart2ImportTest::testODPChartSeries()
@@ -280,7 +280,6 @@ void Chart2ImportTest::testODPChartSeries()
CPPUNIT_ASSERT_EQUAL(OUString("Column 1"), seriesList[0]);
CPPUNIT_ASSERT_EQUAL(OUString("Column 2"), seriesList[1]);
CPPUNIT_ASSERT_EQUAL(OUString("Column 3"), seriesList[2]);
-
}
void Chart2ImportTest::testBnc864396()
@@ -298,6 +297,11 @@ void Chart2ImportTest::testBnc864396()
}
}
+void Chart2ImportTest::testChartFileOpen()
+{
+ load("/chart2/qa/extras/data/docx/", "barChart.docx");
+}
+
CPPUNIT_TEST_SUITE_REGISTRATION(Chart2ImportTest);
CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/chart2/qa/extras/data/docx/barChart.docx b/chart2/qa/extras/data/docx/barChart.docx
new file mode 100644
index 000000000000..9b9152bca725
--- /dev/null
+++ b/chart2/qa/extras/data/docx/barChart.docx
Binary files differ
diff --git a/oox/source/helper/propertymap.cxx b/oox/source/helper/propertymap.cxx
index ab37dd3856b0..cd84da0e4af5 100644
--- a/oox/source/helper/propertymap.cxx
+++ b/oox/source/helper/propertymap.cxx
@@ -243,8 +243,11 @@ void PropertyMap::fillSequences( Sequence< OUString >& rNames, Sequence< Any >&
for( const_iterator aIt = begin(), aEnd = end(); aIt != aEnd; ++aIt, ++pNames, ++pValues )
{
OSL_ENSURE( (0 <= aIt->first) && (aIt->first < PROP_COUNT), "PropertyMap::fillSequences - invalid property identifier" );
- *pNames = (*mpPropNames)[ aIt->first ];
- *pValues = aIt->second;
+ if((sal_uInt32)aIt->first <= mpPropNames->size())
+ {
+ *pNames = (*mpPropNames)[ aIt->first ];
+ *pValues = aIt->second;
+ }
}
}
}