Kaydet (Commit) 50532e3f authored tarafından Markus Mohrhard's avatar Markus Mohrhard Kaydeden (comit) Markus Mohrhard

enable ODF export validation

Change-Id: I09f517a49507a2eb31118f88f31dc2ff8b03de6a
üst 25cd2f4b
......@@ -616,6 +616,8 @@ ScDocShellRef ScBootstrapFixture::saveAndReload(
ScDocShellRef xDocSh = load(aTempFile.GetURL(), rFilter, rUserData, rTypeName, nFormatType, nFormat );
if(nFormatType == XLSX_FORMAT_TYPE)
validate(aTempFile.GetFileName(), test::OOXML);
else if (nFormatType == ODS_FORMAT_TYPE)
validate(aTempFile.GetFileName(), test::ODF);
return xDocSh;
}
......
......@@ -150,7 +150,9 @@ void test::BootstrapFixture::validate(const OUString& rPath, test::ValidationFor
aValidator = "officeotron ";
}
else
return;
{
aValidator = "odfvalidator ";
}
utl::TempFile aOutput;
aOutput.EnableKillingFile();
......@@ -184,6 +186,14 @@ void test::BootstrapFixture::validate(const OUString& rPath, test::ValidationFor
CPPUNIT_ASSERT_EQUAL_MESSAGE(aMsg.getStr(), sal_Int32(0), nErrors);
}
}
else if( eFormat == test::ODF && !aContentOUString.isEmpty() )
{
if( aContentOUString.indexOf("Error") != -1 )
{
SAL_WARN("test", aContentOUString);
CPPUNIT_FAIL("validation errors during export");
}
}
#endif
}
......
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