diff options
-rw-r--r-- | desktop/CppunitTest_desktop_lib.mk | 2 | ||||
-rw-r--r-- | desktop/qa/desktop_lib/test_desktop_lib.cxx | 11 | ||||
-rw-r--r-- | desktop/source/lib/init.cxx | 3 |
3 files changed, 16 insertions, 0 deletions
diff --git a/desktop/CppunitTest_desktop_lib.mk b/desktop/CppunitTest_desktop_lib.mk index 0c963f9088c2..a1f712585507 100644 --- a/desktop/CppunitTest_desktop_lib.mk +++ b/desktop/CppunitTest_desktop_lib.mk @@ -26,6 +26,7 @@ $(eval $(call gb_CppunitTest_use_libraries,desktop_lib, \ sw \ test \ unotest \ + utl \ vcl \ $(gb_UWINAPI) \ )) @@ -64,6 +65,7 @@ $(eval $(call gb_CppunitTest_use_components,desktop_lib,\ unoxml/source/service/unoxml \ xmloff/util/xo \ i18npool/source/search/i18nsearch \ + filter/source/graphic/graphicfilter \ )) $(eval $(call gb_CppunitTest_use_configuration,desktop_lib)) diff --git a/desktop/qa/desktop_lib/test_desktop_lib.cxx b/desktop/qa/desktop_lib/test_desktop_lib.cxx index e397e84cb0ae..204fc6d0b9e5 100644 --- a/desktop/qa/desktop_lib/test_desktop_lib.cxx +++ b/desktop/qa/desktop_lib/test_desktop_lib.cxx @@ -21,6 +21,7 @@ #include <comphelper/propertysequence.hxx> #include <svl/srchitem.hxx> #include <LibreOfficeKit/LibreOfficeKitEnums.h> +#include <unotools/tempfile.hxx> #include "../../inc/lib/init.hxx" @@ -62,6 +63,7 @@ public: void testGetPartPageRectangles(); void testSearchCalc(); void testPaintTile(); + void testSaveAs(); CPPUNIT_TEST_SUITE(DesktopLOKTest); CPPUNIT_TEST(testGetStyles); @@ -71,6 +73,7 @@ public: CPPUNIT_TEST(testGetPartPageRectangles); CPPUNIT_TEST(testSearchCalc); CPPUNIT_TEST(testPaintTile); + CPPUNIT_TEST(testSaveAs); CPPUNIT_TEST_SUITE_END(); uno::Reference<lang::XComponent> mxComponent; @@ -309,6 +312,14 @@ void DesktopLOKTest::testPaintTile() closeDoc(); } +void DesktopLOKTest::testSaveAs() +{ + LibLODocument_Impl* pDocument = loadDoc("blank_text.odt"); + 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 8713bb52fd74..15c27ad85b45 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -117,6 +117,7 @@ static const ExtensionMap aWriterExtensionMap[] = { "pdf", "writer_pdf_Export" }, { "txt", "Text" }, { "xhtml", "XHTML Writer File" }, + { "png", "writer_png_Export" }, { NULL, NULL } }; @@ -150,6 +151,7 @@ static const ExtensionMap aImpressExtensionMap[] = { "svg", "impress_svg_Export" }, { "swf", "impress_flash_Export" }, { "xhtml", "XHTML Impress File" }, + { "png", "impress_png_Export"}, { NULL, NULL } }; @@ -162,6 +164,7 @@ static const ExtensionMap aDrawExtensionMap[] = { "svg", "draw_svg_Export" }, { "swf", "draw_flash_Export" }, { "xhtml", "XHTML Draw File" }, + { "png", "draw_png_Export"}, { NULL, NULL } }; |