summaryrefslogtreecommitdiff
path: root/configmgr
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-09-20 15:03:35 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-09-21 15:18:57 +0200
commitac80f048f2bb23651ddc3c6608e9ef24635698d7 (patch)
tree925ece62dd2e859170d1267d8e7122c4f9b762e8 /configmgr
parentb5450f4afe2af6620fbbbdf686853dfa3293ff90 (diff)
loplugin:flatten in basctl..configmgr
Change-Id: I674cad57ce30a885e126d3bcc921f8fcb53dc36d Reviewed-on: https://gerrit.libreoffice.org/42577 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'configmgr')
-rw-r--r--configmgr/source/xcuparser.cxx29
1 files changed, 13 insertions, 16 deletions
diff --git a/configmgr/source/xcuparser.cxx b/configmgr/source/xcuparser.cxx
index b47a482f3f8b..7db53e3e77fb 100644
--- a/configmgr/source/xcuparser.cxx
+++ b/configmgr/source/xcuparser.cxx
@@ -93,42 +93,39 @@ bool XcuParser::startElement(
} else if (state_.top().ignore) {
state_.push(State::Ignore(false));
} else if (!state_.top().node.is()) {
- if (nsId == xmlreader::XmlReader::NAMESPACE_NONE && name.equals("item"))
+ if (nsId != xmlreader::XmlReader::NAMESPACE_NONE || !name.equals("item"))
{
- handleItem(reader);
- } else {
throw css::uno::RuntimeException(
"bad items node member <" + name.convertFromUtf8() + "> in " +
reader.getUrl());
}
+ handleItem(reader);
} else {
switch (state_.top().node->kind()) {
case Node::KIND_PROPERTY:
- if (nsId == xmlreader::XmlReader::NAMESPACE_NONE &&
- name.equals("value"))
+ if (nsId != xmlreader::XmlReader::NAMESPACE_NONE ||
+ !name.equals("value"))
{
- handlePropValue(
- reader,
- static_cast< PropertyNode * >(state_.top().node.get()));
- } else {
throw css::uno::RuntimeException(
"bad property node member <" + name.convertFromUtf8() +
"> in " + reader.getUrl());
}
+ handlePropValue(
+ reader,
+ static_cast< PropertyNode * >(state_.top().node.get()));
break;
case Node::KIND_LOCALIZED_PROPERTY:
- if (nsId == xmlreader::XmlReader::NAMESPACE_NONE &&
- name.equals("value"))
+ if (nsId != xmlreader::XmlReader::NAMESPACE_NONE ||
+ !name.equals("value"))
{
- handleLocpropValue(
- reader,
- static_cast< LocalizedPropertyNode * >(
- state_.top().node.get()));
- } else {
throw css::uno::RuntimeException(
"bad localized property node member <" +
name.convertFromUtf8() + "> in " + reader.getUrl());
}
+ handleLocpropValue(
+ reader,
+ static_cast< LocalizedPropertyNode * >(
+ state_.top().node.get()));
break;
case Node::KIND_LOCALIZED_VALUE:
throw css::uno::RuntimeException(