summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sd/CppunitTest_sd_html_export_tests.mk1
-rw-r--r--sd/qa/unit/HtmlExportTest.cxx23
2 files changed, 9 insertions, 15 deletions
diff --git a/sd/CppunitTest_sd_html_export_tests.mk b/sd/CppunitTest_sd_html_export_tests.mk
index 268f2b193dc4..1d6968886005 100644
--- a/sd/CppunitTest_sd_html_export_tests.mk
+++ b/sd/CppunitTest_sd_html_export_tests.mk
@@ -40,6 +40,7 @@ $(eval $(call gb_CppunitTest_use_libraries,sd_html_export_tests, \
sd \
sfx \
sot \
+ subsequenttest \
svl \
svt \
svx \
diff --git a/sd/qa/unit/HtmlExportTest.cxx b/sd/qa/unit/HtmlExportTest.cxx
index ea8de7b9be06..2e7885e062d8 100644
--- a/sd/qa/unit/HtmlExportTest.cxx
+++ b/sd/qa/unit/HtmlExportTest.cxx
@@ -7,32 +7,25 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
-#include "sdmodeltestbase.hxx"
-
+#include <test/unoapi_test.hxx>
#include <test/htmltesttools.hxx>
#include <test/xmltesttools.hxx>
using namespace css;
-class SdHTMLFilterTest : public SdModelTestBase, public XmlTestTools, public HtmlTestTools
+class SdHTMLFilterTest : public UnoApiTest, public XmlTestTools, public HtmlTestTools
{
-private:
- htmlDocUniquePtr exportAndParseHtml(sd::DrawDocShellRef const& xDocShRef)
+public:
+ SdHTMLFilterTest()
+ : UnoApiTest("/sd/qa/unit/data/")
{
- FileFormat* pFormat = getFormat(HTML);
- OUString aExt = "." + OUString::createFromAscii(pFormat->pName);
- utl::TempFileNamed aTempFile(u"", true, aExt);
- aTempFile.EnableKillingFile();
- exportTo(xDocShRef.get(), pFormat, aTempFile);
- return parseHtml(aTempFile);
}
-public:
void testHTMLExport()
{
- sd::DrawDocShellRef xDocShRef = loadURL(
- m_directories.getURLFromSrc(u"/sd/qa/unit/data/HtmlExportTestDocument.odp"), ODP);
- htmlDocUniquePtr htmlDoc = exportAndParseHtml(xDocShRef);
+ loadFromURL(u"HtmlExportTestDocument.odp");
+ utl::TempFileNamed aTempFile = save("impress_html_Export");
+ htmlDocUniquePtr htmlDoc = parseHtml(aTempFile);
assertXPath(htmlDoc, "/html", 1);
assertXPath(htmlDoc, "/html/body", 1);