summaryrefslogtreecommitdiff
path: root/sax
diff options
context:
space:
mode:
authorJustin Luth <justin_luth@sil.org>2016-10-12 15:13:37 +0300
committerJustin Luth <justin_luth@sil.org>2016-10-12 18:09:39 +0000
commitd9280e97c6e7b27742f26930af56b39a7d4edd75 (patch)
tree4770b1bc7fe19a495aaa0458a80fa930e384684a /sax
parentd3645961d98ce9f0cfb1ef7f0aba7bf020b90945 (diff)
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 <ci@libreoffice.org> Reviewed-by: Justin Luth <justin_luth@sil.org>
Diffstat (limited to 'sax')
-rw-r--r--sax/qa/cppunit/xmlimport.cxx24
1 files changed, 15 insertions, 9 deletions
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 )
+ {
+ }
}
}