diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2015-10-20 17:13:30 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2015-10-20 17:13:30 +0200 |
commit | d42c3e0ddd9078c00de591b7470d73ad8a186cb1 (patch) | |
tree | 91a35e7f618b9d8ce8ecf9355712a66e98c87fcc /desktop/qa | |
parent | 1ee1d113fde9fbd46bfef31883221ad9ea822e0d (diff) |
lok::Document::saveAs: add Writer/Impress/Draw png mapping
Change-Id: I7530281302b9787a9cb9f98f0dee9d98d39cfb05
Diffstat (limited to 'desktop/qa')
-rw-r--r-- | desktop/qa/desktop_lib/test_desktop_lib.cxx | 11 |
1 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 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(); |