From d9280e97c6e7b27742f26930af56b39a7d4edd75 Mon Sep 17 00:00:00 2001 From: Justin Luth Date: Wed, 12 Oct 2016 15:13:37 +0300 Subject: tdf#103159 allow compiling on 12.04 systems still "An uncaught exception of type com.sun.star.xml.sax.SAXParseException [internal line 13]: Namespace prefix manifest on file-entry is not defined" regression from 3aa52d36824d11b8774de15708fdfcbb93cd9dc3 which states that "initialization parameter to FastParser will turn off the namespace declaration missing exception." However, although it doesn't RAISE the exception, it doesn't prevent it either. Change-Id: I26ea02444132e5370dcb4821a75181bc8c76e553 Reviewed-on: https://gerrit.libreoffice.org/29731 Tested-by: Jenkins Reviewed-by: Justin Luth --- sax/qa/cppunit/xmlimport.cxx | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) (limited to 'sax/qa') diff --git a/sax/qa/cppunit/xmlimport.cxx b/sax/qa/cppunit/xmlimport.cxx index 457f5f10f5cc..915f26ee4e1d 100644 --- a/sax/qa/cppunit/xmlimport.cxx +++ b/sax/qa/cppunit/xmlimport.cxx @@ -432,18 +432,24 @@ void XMLImportTest::testMissingNamespaceDeclaration() for (sal_uInt16 i = 0; i < sizeof( fileNames ) / sizeof( OUString ); i++) { - InputSource source; - source.sSystemId = "internal"; + try + { + InputSource source; + source.sSystemId = "internal"; - source.aInputStream = createStreamFromFile( m_sDirPath + fileNames[i] ); - m_xParser->parseStream(source); - const OUString rParserStr = m_xDocumentHandler->getString(); + source.aInputStream = createStreamFromFile( m_sDirPath + fileNames[i] ); + m_xParser->parseStream(source); + const OUString rParserStr = m_xDocumentHandler->getString(); - source.aInputStream = createStreamFromFile( m_sDirPath + fileNames[i] ); - m_xLegacyFastParser->parseStream(source); - const OUString rLegacyFastParserStr = m_xDocumentHandler->getString(); + source.aInputStream = createStreamFromFile( m_sDirPath + fileNames[i] ); + m_xLegacyFastParser->parseStream(source); + const OUString rLegacyFastParserStr = m_xDocumentHandler->getString(); - CPPUNIT_ASSERT_EQUAL( rParserStr, rLegacyFastParserStr ); + CPPUNIT_ASSERT_EQUAL( rParserStr, rLegacyFastParserStr ); + } + catch( SAXException ) + { + } } } -- cgit v1.2.3