summaryrefslogtreecommitdiff
path: root/desktop
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2015-10-20 18:12:22 +0200
committerMiklos Vajna <vmiklos@collabora.co.uk>2015-10-20 18:12:23 +0200
commit03bb5d52fecd6c613c6cc36508eb44e5e1c3456a (patch)
treec96d4cf398cea8ffe1ea5f1de8c071477d4b4a5d /desktop
parentfd612a144c0028972513a18167a13d29326a1798 (diff)
sc: initial png export
Change-Id: Iae0e89646eab794879529274f09839ad34aa4696
Diffstat (limited to 'desktop')
-rw-r--r--desktop/qa/desktop_lib/test_desktop_lib.cxx10
-rw-r--r--desktop/source/lib/init.cxx1
2 files changed, 11 insertions, 0 deletions
diff --git a/desktop/qa/desktop_lib/test_desktop_lib.cxx b/desktop/qa/desktop_lib/test_desktop_lib.cxx
index 204fc6d0b9e5..3e8544c6c5d2 100644
--- a/desktop/qa/desktop_lib/test_desktop_lib.cxx
+++ b/desktop/qa/desktop_lib/test_desktop_lib.cxx
@@ -64,6 +64,7 @@ public:
void testSearchCalc();
void testPaintTile();
void testSaveAs();
+ void testSaveAsCalc();
CPPUNIT_TEST_SUITE(DesktopLOKTest);
CPPUNIT_TEST(testGetStyles);
@@ -74,6 +75,7 @@ public:
CPPUNIT_TEST(testSearchCalc);
CPPUNIT_TEST(testPaintTile);
CPPUNIT_TEST(testSaveAs);
+ CPPUNIT_TEST(testSaveAsCalc);
CPPUNIT_TEST_SUITE_END();
uno::Reference<lang::XComponent> mxComponent;
@@ -320,6 +322,14 @@ void DesktopLOKTest::testSaveAs()
CPPUNIT_ASSERT(pDocument->pClass->saveAs(pDocument, aTempFile.GetURL().toUtf8().getStr(), "png", 0));
}
+void DesktopLOKTest::testSaveAsCalc()
+{
+ LibLODocument_Impl* pDocument = loadDoc("search.ods");
+ utl::TempFile aTempFile;
+ aTempFile.EnableKillingFile();
+ CPPUNIT_ASSERT(pDocument->pClass->saveAs(pDocument, aTempFile.GetURL().toUtf8().getStr(), "png", 0));
+}
+
CPPUNIT_TEST_SUITE_REGISTRATION(DesktopLOKTest);
CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 15c27ad85b45..405e5ff12165 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -132,6 +132,7 @@ static const ExtensionMap aCalcExtensionMap[] =
{ "xhtml", "XHTML Calc File" },
{ "xls", "MS Excel 97" },
{ "xlsx", "Calc MS Excel 2007 XML" },
+ { "png", "calc_png_Export" },
{ NULL, NULL }
};