summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorXisco Fauli <xiscofauli@libreoffice.org>2022-10-26 13:23:04 +0200
committerXisco Fauli <xiscofauli@libreoffice.org>2022-10-26 14:08:38 +0200
commitffe9dfbbc64c7ce873f3a83c046ec417d07eaa4e (patch)
tree7c5d03441d2b58fb287544d74898e58a3edee476 /sd
parent0dfe66b1d3b6b55cd8fcf76a8290dcd6f6a1a329 (diff)
CppunitTest_sd_html_export_tests: inherit from UnoApiTest
Change-Id: Ia51a023102f83406d83f5bfa92bb7dda31ee9dc8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141872 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Diffstat (limited to 'sd')
-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);