diff options
author | Fridrich Štrba <fridrich.strba@bluewin.ch> | 2014-01-17 13:22:24 +0100 |
---|---|---|
committer | Fridrich Štrba <fridrich.strba@bluewin.ch> | 2014-01-17 13:44:19 +0100 |
commit | 0c16f59fe7a3aed7cc055a81facbbc1fb35998d7 (patch) | |
tree | 7e82468b0d4b9386d9e6ad795d3dc4c7a7114609 | |
parent | 720f251278f53d3066670eef60eb2611aa95bbbc (diff) |
All invocation of xmlReaderForStream use the same options
(cherry picked from commit e68f8f29ec365cc07edf6f1b1dc15c7f75f40051)
Conflicts:
src/lib/ABWXMLHelper.cpp
src/lib/ABWXMLHelper.h
src/lib/AbiDocument.cpp
Change-Id: I6f61c92db22114e3592cd5d24516bcd879422566
-rw-r--r-- | src/lib/ABWParser.cpp | 2 | ||||
-rw-r--r-- | src/lib/ABWXMLHelper.cpp | 5 | ||||
-rw-r--r-- | src/lib/ABWXMLHelper.h | 5 | ||||
-rw-r--r-- | src/lib/AbiDocument.cpp | 2 |
4 files changed, 6 insertions, 8 deletions
diff --git a/src/lib/ABWParser.cpp b/src/lib/ABWParser.cpp index 6fd3b8a..737d4e3 100644 --- a/src/lib/ABWParser.cpp +++ b/src/lib/ABWParser.cpp @@ -120,7 +120,7 @@ bool libabw::ABWParser::processXmlDocument(librevenge::RVNGInputStream *input) if (!input) return false; - xmlTextReaderPtr reader = xmlReaderForStream(input, 0, 0, XML_PARSE_NOBLANKS|XML_PARSE_NOENT|XML_PARSE_NONET|XML_PARSE_RECOVER); + xmlTextReaderPtr reader = xmlReaderForStream(input); if (!reader) return false; int ret = xmlTextReaderRead(reader); diff --git a/src/lib/ABWXMLHelper.cpp b/src/lib/ABWXMLHelper.cpp index d1dbcf2..84d59e1 100644 --- a/src/lib/ABWXMLHelper.cpp +++ b/src/lib/ABWXMLHelper.cpp @@ -73,9 +73,10 @@ extern "C" { // xmlTextReader helper function -xmlTextReaderPtr libabw::xmlReaderForStream(librevenge::RVNGInputStream *input, const char *URL, const char *encoding, int options) +xmlTextReaderPtr libabw::xmlReaderForStream(librevenge::RVNGInputStream *input) { - xmlTextReaderPtr reader = xmlReaderForIO(abwxmlInputReadFunc, abwxmlInputCloseFunc, (void *)input, URL, encoding, options); + xmlTextReaderPtr reader = xmlReaderForIO(abwxmlInputReadFunc, abwxmlInputCloseFunc, (void *)input, 0, 0, + XML_PARSE_NOBLANKS|XML_PARSE_NOENT|XML_PARSE_NONET|XML_PARSE_RECOVER); xmlTextReaderSetErrorHandler(reader, abwxmlReaderErrorFunc, 0); return reader; } diff --git a/src/lib/ABWXMLHelper.h b/src/lib/ABWXMLHelper.h index f0d7b9a..3febdb8 100644 --- a/src/lib/ABWXMLHelper.h +++ b/src/lib/ABWXMLHelper.h @@ -19,10 +19,7 @@ namespace libabw // create an xmlTextReader pointer from a librevenge::RVNGInputStream pointer // needs to be freed using xmlTextReaderFree function. -xmlTextReaderPtr xmlReaderForStream(librevenge::RVNGInputStream *input, - const char *URL, - const char *encoding, - int options); +xmlTextReaderPtr xmlReaderForStream(librevenge::RVNGInputStream *input); } // namespace libabw diff --git a/src/lib/AbiDocument.cpp b/src/lib/AbiDocument.cpp index 15b2155..7dddd85 100644 --- a/src/lib/AbiDocument.cpp +++ b/src/lib/AbiDocument.cpp @@ -45,7 +45,7 @@ ABWAPI bool libabw::AbiDocument::isFileFormatSupported(librevenge::RVNGInputStre try { stream.seek(0, librevenge::RVNG_SEEK_SET); - reader = libabw::xmlReaderForStream(&stream, 0, 0, XML_PARSE_NOBLANKS|XML_PARSE_NOENT|XML_PARSE_NONET|XML_PARSE_RECOVER); + reader = libabw::xmlReaderForStream(&stream); if (!reader) return false; int ret = xmlTextReaderRead(reader); |