diff options
Diffstat (limited to 'test/source')
-rw-r--r-- | test/source/unoapi_test.cxx | 29 |
1 files changed, 28 insertions, 1 deletions
diff --git a/test/source/unoapi_test.cxx b/test/source/unoapi_test.cxx index 0cc8bf0e33cc..395a10db1c37 100644 --- a/test/source/unoapi_test.cxx +++ b/test/source/unoapi_test.cxx @@ -22,7 +22,8 @@ using namespace css; using namespace css::uno; UnoApiTest::UnoApiTest(OUString path) - : m_aBaseString(std::move(path)) + : mbSkipValidation(false) + , m_aBaseString(std::move(path)) { } @@ -83,6 +84,32 @@ utl::TempFileNamed UnoApiTest::save(const OUString& rFilter) mxComponent->dispose(); mxComponent.clear(); + if (!mbSkipValidation) + { + if (rFilter == "Office Open XML Text") + validate(aTempFile.GetFileName(), test::OOXML); + else if (rFilter == "Calc Office Open XML") + validate(aTempFile.GetFileName(), test::OOXML); + else if (rFilter == "Impress Office Open XML") + validate(aTempFile.GetFileName(), test::OOXML); + else if (rFilter == "writer8") + validate(aTempFile.GetFileName(), test::ODF); + else if (rFilter == "calc8") + validate(aTempFile.GetFileName(), test::ODF); + else if (rFilter == "impress8") + validate(aTempFile.GetFileName(), test::ODF); + else if (rFilter == "draw8") + validate(aTempFile.GetFileName(), test::ODF); + else if (rFilter == "OpenDocument Text Flat XML") + validate(aTempFile.GetFileName(), test::ODF); + else if (rFilter == "MS Word 97") + validate(aTempFile.GetFileName(), test::MSBINARY); + else if (rFilter == "MS Excel 97") + validate(aTempFile.GetFileName(), test::MSBINARY); + else if (rFilter == "MS PowerPoint 97") + validate(aTempFile.GetFileName(), test::MSBINARY); + } + return aTempFile; } |