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, \ ...@@ -26,6 +26,7 @@ $(eval $(call gb_CppunitTest_use_libraries,desktop_lib, \
sw \ sw \
test \ test \
unotest \ unotest \
utl \
vcl \ vcl \
$(gb_UWINAPI) \ $(gb_UWINAPI) \
)) ))
...@@ -64,6 +65,7 @@ $(eval $(call gb_CppunitTest_use_components,desktop_lib,\ ...@@ -64,6 +65,7 @@ $(eval $(call gb_CppunitTest_use_components,desktop_lib,\
unoxml/source/service/unoxml \ unoxml/source/service/unoxml \
xmloff/util/xo \ xmloff/util/xo \
i18npool/source/search/i18nsearch \ i18npool/source/search/i18nsearch \
filter/source/graphic/graphicfilter \
)) ))
$(eval $(call gb_CppunitTest_use_configuration,desktop_lib)) $(eval $(call gb_CppunitTest_use_configuration,desktop_lib))
......
...@@ -21,6 +21,7 @@ ...@@ -21,6 +21,7 @@
#include <comphelper/propertysequence.hxx> #include <comphelper/propertysequence.hxx>
#include <svl/srchitem.hxx> #include <svl/srchitem.hxx>
#include <LibreOfficeKit/LibreOfficeKitEnums.h> #include <LibreOfficeKit/LibreOfficeKitEnums.h>
#include <unotools/tempfile.hxx>
#include "../../inc/lib/init.hxx" #include "../../inc/lib/init.hxx"
...@@ -62,6 +63,7 @@ public: ...@@ -62,6 +63,7 @@ public:
void testGetPartPageRectangles(); void testGetPartPageRectangles();
void testSearchCalc(); void testSearchCalc();
void testPaintTile(); void testPaintTile();
void testSaveAs();
CPPUNIT_TEST_SUITE(DesktopLOKTest); CPPUNIT_TEST_SUITE(DesktopLOKTest);
CPPUNIT_TEST(testGetStyles); CPPUNIT_TEST(testGetStyles);
...@@ -71,6 +73,7 @@ public: ...@@ -71,6 +73,7 @@ public:
CPPUNIT_TEST(testGetPartPageRectangles); CPPUNIT_TEST(testGetPartPageRectangles);
CPPUNIT_TEST(testSearchCalc); CPPUNIT_TEST(testSearchCalc);
CPPUNIT_TEST(testPaintTile); CPPUNIT_TEST(testPaintTile);
CPPUNIT_TEST(testSaveAs);
CPPUNIT_TEST_SUITE_END(); CPPUNIT_TEST_SUITE_END();
uno::Reference<lang::XComponent> mxComponent; uno::Reference<lang::XComponent> mxComponent;
...@@ -309,6 +312,14 @@ void DesktopLOKTest::testPaintTile() ...@@ -309,6 +312,14 @@ void DesktopLOKTest::testPaintTile()
closeDoc(); 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_TEST_SUITE_REGISTRATION(DesktopLOKTest);
CPPUNIT_PLUGIN_IMPLEMENT(); CPPUNIT_PLUGIN_IMPLEMENT();
......
...@@ -117,6 +117,7 @@ static const ExtensionMap aWriterExtensionMap[] = ...@@ -117,6 +117,7 @@ static const ExtensionMap aWriterExtensionMap[] =
{ "pdf", "writer_pdf_Export" }, { "pdf", "writer_pdf_Export" },
{ "txt", "Text" }, { "txt", "Text" },
{ "xhtml", "XHTML Writer File" }, { "xhtml", "XHTML Writer File" },
{ "png", "writer_png_Export" },
{ NULL, NULL } { NULL, NULL }
}; };
...@@ -150,6 +151,7 @@ static const ExtensionMap aImpressExtensionMap[] = ...@@ -150,6 +151,7 @@ static const ExtensionMap aImpressExtensionMap[] =
{ "svg", "impress_svg_Export" }, { "svg", "impress_svg_Export" },
{ "swf", "impress_flash_Export" }, { "swf", "impress_flash_Export" },
{ "xhtml", "XHTML Impress File" }, { "xhtml", "XHTML Impress File" },
{ "png", "impress_png_Export"},
{ NULL, NULL } { NULL, NULL }
}; };
...@@ -162,6 +164,7 @@ static const ExtensionMap aDrawExtensionMap[] = ...@@ -162,6 +164,7 @@ static const ExtensionMap aDrawExtensionMap[] =
{ "svg", "draw_svg_Export" }, { "svg", "draw_svg_Export" },
{ "swf", "draw_flash_Export" }, { "swf", "draw_flash_Export" },
{ "xhtml", "XHTML Draw File" }, { "xhtml", "XHTML Draw File" },
{ "png", "draw_png_Export"},
{ NULL, NULL } { 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