diff options
author | Noel Grandin <noel@peralex.com> | 2016-05-23 14:54:44 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2016-05-25 11:59:08 +0000 |
commit | 472219209849daee7a9924f0f54d5f0bdfe4b772 (patch) | |
tree | 426719450423d135acb9edfadf6fb7ca302bcfca /cppuhelper/source/servicemanager.cxx | |
parent | 96fb3c52f5d04c8257cefd97630173005e6e466c (diff) |
Convert XmlReader::Result to scoped enum
Change-Id: I6a0d1dcf5ae51d2ac08aacdfec50865f93e51c21
Reviewed-on: https://gerrit.libreoffice.org/25365
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'cppuhelper/source/servicemanager.cxx')
-rw-r--r-- | cppuhelper/source/servicemanager.cxx | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/cppuhelper/source/servicemanager.cxx b/cppuhelper/source/servicemanager.cxx index 2785920e55c6..75894244e96e 100644 --- a/cppuhelper/source/servicemanager.cxx +++ b/cppuhelper/source/servicemanager.cxx @@ -156,7 +156,7 @@ Parser::Parser( xmlreader::XmlReader::Text::NONE, &name, &nsId); switch (state) { case STATE_BEGIN: - if (res == xmlreader::XmlReader::RESULT_BEGIN && nsId == ucNsId + if (res == xmlreader::XmlReader::Result::Begin && nsId == ucNsId && name.equals(RTL_CONSTASCII_STRINGPARAM("components"))) { state = STATE_COMPONENTS; @@ -165,17 +165,17 @@ Parser::Parser( throw css::registry::InvalidRegistryException( reader_.getUrl() + ": unexpected item in outer level"); case STATE_END: - if (res == xmlreader::XmlReader::RESULT_DONE) { + if (res == xmlreader::XmlReader::Result::Done) { return; } throw css::registry::InvalidRegistryException( reader_.getUrl() + ": unexpected item in outer level"); case STATE_COMPONENTS: - if (res == xmlreader::XmlReader::RESULT_END) { + if (res == xmlreader::XmlReader::Result::End) { state = STATE_END; break; } - if (res == xmlreader::XmlReader::RESULT_BEGIN && nsId == ucNsId + if (res == xmlreader::XmlReader::Result::Begin && nsId == ucNsId && name.equals(RTL_CONSTASCII_STRINGPARAM("component"))) { handleComponent(); @@ -185,13 +185,13 @@ Parser::Parser( throw css::registry::InvalidRegistryException( reader_.getUrl() + ": unexpected item in <components>"); case STATE_COMPONENT: - if (res == xmlreader::XmlReader::RESULT_END) { + if (res == xmlreader::XmlReader::Result::End) { state = STATE_COMPONENTS; break; } SAL_FALLTHROUGH; case STATE_COMPONENT_INITIAL: - if (res == xmlreader::XmlReader::RESULT_BEGIN && nsId == ucNsId + if (res == xmlreader::XmlReader::Result::Begin && nsId == ucNsId && name.equals(RTL_CONSTASCII_STRINGPARAM("implementation"))) { handleImplementation(); @@ -201,18 +201,18 @@ Parser::Parser( throw css::registry::InvalidRegistryException( reader_.getUrl() + ": unexpected item in <component>"); case STATE_IMPLEMENTATION: - if (res == xmlreader::XmlReader::RESULT_END) { + if (res == xmlreader::XmlReader::Result::End) { state = STATE_COMPONENT; break; } - if (res == xmlreader::XmlReader::RESULT_BEGIN && nsId == ucNsId + if (res == xmlreader::XmlReader::Result::Begin && nsId == ucNsId && name.equals(RTL_CONSTASCII_STRINGPARAM("service"))) { handleService(); state = STATE_SERVICE; break; } - if (res == xmlreader::XmlReader::RESULT_BEGIN && nsId == ucNsId + if (res == xmlreader::XmlReader::Result::Begin && nsId == ucNsId && name.equals(RTL_CONSTASCII_STRINGPARAM("singleton"))) { handleSingleton(); @@ -222,14 +222,14 @@ Parser::Parser( throw css::registry::InvalidRegistryException( reader_.getUrl() + ": unexpected item in <implementation>"); case STATE_SERVICE: - if (res == xmlreader::XmlReader::RESULT_END) { + if (res == xmlreader::XmlReader::Result::End) { state = STATE_IMPLEMENTATION; break; } throw css::registry::InvalidRegistryException( reader_.getUrl() + ": unexpected item in <service>"); case STATE_SINGLETON: - if (res == xmlreader::XmlReader::RESULT_END) { + if (res == xmlreader::XmlReader::Result::End) { state = STATE_IMPLEMENTATION; break; } |