diff options
author | Michael Stahl <mst@openoffice.org> | 2011-02-10 16:45:04 +0100 |
---|---|---|
committer | Michael Stahl <mst@openoffice.org> | 2011-02-10 16:45:04 +0100 |
commit | 253150cf8d7794647a638630a55f4f0ff847d200 (patch) | |
tree | d386b90870361e71872242d7e063b61cc2cd87dd /unoxml/source | |
parent | baea7fb003baf92129decc6a778659767edd7427 (diff) |
xmlfix3: #i113683#: remove unfinished, unneeded CDocumentBuilder::parseSource
Diffstat (limited to 'unoxml/source')
-rw-r--r-- | unoxml/source/dom/documentbuilder.cxx | 36 | ||||
-rw-r--r-- | unoxml/source/dom/documentbuilder.hxx | 4 |
2 files changed, 2 insertions, 38 deletions
diff --git a/unoxml/source/dom/documentbuilder.cxx b/unoxml/source/dom/documentbuilder.cxx index b081434dd0b3..695ccb670e4c 100644 --- a/unoxml/source/dom/documentbuilder.cxx +++ b/unoxml/source/dom/documentbuilder.cxx @@ -281,11 +281,13 @@ namespace DOM return pInput; } +#if 0 static xmlParserInputPtr external_entity_loader(const char *URL, const char * /*ID*/, xmlParserCtxtPtr ctxt) { // just call our resolver function using the URL as systemId return resolve_func(ctxt, 0, (const xmlChar*)URL); } +#endif // default warning handler triggers assertion static void warning_func(void * ctx, const char * /*msg*/, ...) @@ -359,40 +361,6 @@ namespace DOM return xRet; } - Reference< XDocument > SAL_CALL CDocumentBuilder::parseSource(const InputSource& is) - throw (RuntimeException, SAXParseException, IOException) - { - ::osl::MutexGuard const g(m_Mutex); - - // if there is an encoding specified in the input source, use it - xmlCharEncoding enc = XML_CHAR_ENCODING_NONE; - if (is.sEncoding.getLength() > 0) { - OString oEncstr = OUStringToOString(is.sEncoding, RTL_TEXTENCODING_UTF8); - char *encstr = (char*) oEncstr.getStr(); - enc = xmlParseCharEncoding(encstr); - } - - // set up parser context - ::boost::shared_ptr<xmlParserCtxt> const pContext( - xmlNewParserCtxt(), xmlFreeParserCtxt); - - // register error functions to prevent errors being printed - // on the console - pContext->_private = this; - pContext->sax->error = error_func; - pContext->sax->warning = warning_func; - - // setup entity resolver binding(s) - pContext->sax->resolveEntity = resolve_func; - xmlSetExternalEntityLoader(external_entity_loader); - - // if an input stream is provided, use it - - // use the systemID - - return Reference< XDocument >(); - } - Reference< XDocument > SAL_CALL CDocumentBuilder::parseURI(const OUString& sUri) throw (RuntimeException, SAXParseException, IOException) { diff --git a/unoxml/source/dom/documentbuilder.hxx b/unoxml/source/dom/documentbuilder.hxx index d6562bede338..ea1bfcc603e8 100644 --- a/unoxml/source/dom/documentbuilder.hxx +++ b/unoxml/source/dom/documentbuilder.hxx @@ -142,10 +142,6 @@ namespace DOM virtual Reference< XDocument > SAL_CALL parseURI(const OUString& uri) throw (RuntimeException, SAXParseException, IOException); - virtual Reference< XDocument > SAL_CALL parseSource(const InputSource& is) - throw (RuntimeException, SAXParseException, IOException); - - /** Specify the EntityResolver to be used to resolve entities present in the XML document to be parsed. |