[Libreoffice-commits] core.git: 3 commits - chart2/qa drawinglayer/source include/drawinglayer sd/qa
Markus Mohrhard
markus.mohrhard at collabora.co.uk
Mon Mar 10 10:18:47 PDT 2014
chart2/qa/extras/chart2import.cxx | 13 +++++++++++++
chart2/qa/extras/data/xlsx/strict_chart.xlsx |binary
drawinglayer/source/primitive2d/epsprimitive2d.cxx | 2 --
include/drawinglayer/primitive2d/epsprimitive2d.hxx | 4 ----
sd/qa/unit/data/strict_ooxml.pptx |binary
sd/qa/unit/import-tests.cxx | 16 ++++++++++++++++
6 files changed, 29 insertions(+), 6 deletions(-)
New commits:
commit ed3fc457e1fbdfd2cff808e259d62d1d537a01ce
Author: Markus Mohrhard <markus.mohrhard at collabora.co.uk>
Date: Mon Mar 10 18:16:18 2014 +0100
add strict OOXML pptx import test
Change-Id: I2e4f17b7b7ab1e14c5cb0f6ce90e771d7c20a5c8
diff --git a/sd/qa/unit/data/strict_ooxml.pptx b/sd/qa/unit/data/strict_ooxml.pptx
new file mode 100644
index 0000000..534b483
Binary files /dev/null and b/sd/qa/unit/data/strict_ooxml.pptx differ
diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx
index 0f5732c..eb3b56d 100644
--- a/sd/qa/unit/import-tests.cxx
+++ b/sd/qa/unit/import-tests.cxx
@@ -60,6 +60,7 @@ public:
void testN821567();
void testFdo68594();
void testFdo72998();
+ void testStrictOOXML();
CPPUNIT_TEST_SUITE(SdFiltersTest);
CPPUNIT_TEST(testDocumentLayout);
@@ -76,6 +77,7 @@ public:
CPPUNIT_TEST(testN821567);
CPPUNIT_TEST(testFdo68594);
CPPUNIT_TEST(testFdo72998);
+ CPPUNIT_TEST(testStrictOOXML);
CPPUNIT_TEST_SUITE_END();
};
@@ -538,6 +540,20 @@ void SdFiltersTest::testFdo71075()
CPPUNIT_ASSERT_MESSAGE( "Invalid Series count", aValues.getConstArray()[i] == values[i]);
}
+void SdFiltersTest::testStrictOOXML()
+{
+ ::sd::DrawDocShellRef xDocShRef = loadURL(getURLFromSrc("/sd/qa/unit/data/strict_ooxml.pptx"));
+ CPPUNIT_ASSERT_MESSAGE( "failed to load", xDocShRef.Is() );
+ CPPUNIT_ASSERT_MESSAGE( "not in destruction", !xDocShRef->IsInDestruction() );
+
+ SdDrawDocument *pDoc = xDocShRef->GetDoc();
+ CPPUNIT_ASSERT_MESSAGE( "no document", pDoc != NULL );
+ uno::Reference< drawing::XDrawPagesSupplier > xDoc(xDocShRef->GetDoc()->getUnoModel(), uno::UNO_QUERY_THROW );
+ uno::Reference< drawing::XDrawPage > xPage(xDoc->getDrawPages()->getByIndex(0), uno::UNO_QUERY_THROW );
+ uno::Reference< drawing::XShape > xShape(xPage->getByIndex(0), uno::UNO_QUERY_THROW );
+ CPPUNIT_ASSERT_MESSAGE( "failed to load shape", xShape.is() );
+}
+
CPPUNIT_TEST_SUITE_REGISTRATION(SdFiltersTest);
CPPUNIT_PLUGIN_IMPLEMENT();
commit 2ce06d07bb7682dfe8483a047dfc23a3bf87a079
Author: Markus Mohrhard <markus.mohrhard at collabora.co.uk>
Date: Mon Mar 10 18:02:43 2014 +0100
test case for strict OOXML chart import
Change-Id: Ie000dda7b04615c2e79376c5da5dc96b4ea40db0
diff --git a/chart2/qa/extras/chart2import.cxx b/chart2/qa/extras/chart2import.cxx
index 2d4259b..bdebe51 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 testSimpleStrictXLSX();
CPPUNIT_TEST_SUITE(Chart2ImportTest);
CPPUNIT_TEST(Fdo60083);
@@ -55,6 +56,7 @@ public:
CPPUNIT_TEST(testPPTXChartSeries);
CPPUNIT_TEST(testODPChartSeries);
CPPUNIT_TEST(testBnc864396);
+ CPPUNIT_TEST(testSimpleStrictXLSX);
CPPUNIT_TEST_SUITE_END();
private:
@@ -298,6 +300,17 @@ void Chart2ImportTest::testBnc864396()
}
}
+void Chart2ImportTest::testSimpleStrictXLSX()
+{
+ load("/chart2/qa/extras/data/xlsx/", "strict_chart.xlsx");
+ uno::Reference< chart2::XChartDocument > xChartDoc = getChartDocFromSheet( 0, mxComponent );
+ CPPUNIT_ASSERT(xChartDoc.is());
+
+ Reference< chart2::XDataSeries > xDataSeries = getDataSeriesFromDoc( xChartDoc, 0 );
+ CPPUNIT_ASSERT(xDataSeries.is());
+
+}
+
CPPUNIT_TEST_SUITE_REGISTRATION(Chart2ImportTest);
CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/chart2/qa/extras/data/xlsx/strict_chart.xlsx b/chart2/qa/extras/data/xlsx/strict_chart.xlsx
new file mode 100644
index 0000000..4378933
Binary files /dev/null and b/chart2/qa/extras/data/xlsx/strict_chart.xlsx differ
commit 2f59eae88abcdfce72e7d116a4bec4547ad43498
Author: Markus Mohrhard <markus.mohrhard at collabora.co.uk>
Date: Mon Mar 10 15:29:16 2014 +0100
remove whitespace
Change-Id: Ie03ffe6e02fe7c4d67a5a6752bc6fa24377da7cd
diff --git a/drawinglayer/source/primitive2d/epsprimitive2d.cxx b/drawinglayer/source/primitive2d/epsprimitive2d.cxx
index 0cac329..6e25403 100644
--- a/drawinglayer/source/primitive2d/epsprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/epsprimitive2d.cxx
@@ -21,8 +21,6 @@
#include <drawinglayer/primitive2d/drawinglayer_primitivetypes2d.hxx>
#include <drawinglayer/primitive2d/metafileprimitive2d.hxx>
-
-
namespace drawinglayer
{
namespace primitive2d
diff --git a/include/drawinglayer/primitive2d/epsprimitive2d.hxx b/include/drawinglayer/primitive2d/epsprimitive2d.hxx
index d3b88da..08b2827 100644
--- a/include/drawinglayer/primitive2d/epsprimitive2d.hxx
+++ b/include/drawinglayer/primitive2d/epsprimitive2d.hxx
@@ -27,8 +27,6 @@
#include <vcl/gfxlink.hxx>
#include <vcl/gdimtf.hxx>
-
-
namespace drawinglayer
{
namespace primitive2d
@@ -74,8 +72,6 @@ namespace drawinglayer
} // end of namespace primitive2d
} // end of namespace drawinglayer
-
-
#endif //INCLUDED_DRAWINGLAYER_PRIMITIVE2D_EPSPRIMITIVE2D_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
More information about the Libreoffice-commits
mailing list