Kaydet (Commit) d42c3e0d authored tarafından Miklos Vajna's avatar Miklos Vajna

lok::Document::saveAs: add Writer/Impress/Draw png mapping

Change-Id: I7530281302b9787a9cb9f98f0dee9d98d39cfb05
üst 1ee1d113
......@@ -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))
......
......@@ -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();
......
......@@ -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 }
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment