summaryrefslogtreecommitdiffstats
path: root/configmgr
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2021-12-21 13:42:35 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-12-21 15:55:46 +0100
commit25298930bc86d1a449a7e5b139d65e49f695f8c1 (patch)
treeb3f28ef6b18b12347694a637b6785ecb5eedc1fe /configmgr
parenttdf#146244 sw: fix Undo of accepting table row insertion (diff)
downloadcore-25298930bc86d1a449a7e5b139d65e49f695f8c1.tar.gz
core-25298930bc86d1a449a7e5b139d65e49f695f8c1.zip
loplugin:flatten in canvas..cui
Change-Id: I208767eaa60d913fe2882403f1f9351eb08256f7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127224 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'configmgr')
-rw-r--r--configmgr/source/valueparser.cxx29
1 files changed, 15 insertions, 14 deletions
diff --git a/configmgr/source/valueparser.cxx b/configmgr/source/valueparser.cxx
index a70c3231b702..82778e6c823b 100644
--- a/configmgr/source/valueparser.cxx
+++ b/configmgr/source/valueparser.cxx
@@ -252,22 +252,23 @@ ValueParser::ValueParser(int layer): type_(TYPE_ERROR), layer_(layer), state_()
ValueParser::~ValueParser() {}
xmlreader::XmlReader::Text ValueParser::getTextMode() const {
- if (node_.is()) {
- switch (state_) {
- case State::Text:
- if (!items_.empty()) {
- break;
- }
- [[fallthrough]];
- case State::IT:
- return
- (type_ == TYPE_STRING || type_ == TYPE_STRING_LIST ||
- !separator_.isEmpty())
- ? xmlreader::XmlReader::Text::Raw
- : xmlreader::XmlReader::Text::Normalized;
- default:
+ if (!node_)
+ return xmlreader::XmlReader::Text::NONE;
+
+ switch (state_) {
+ case State::Text:
+ if (!items_.empty()) {
break;
}
+ [[fallthrough]];
+ case State::IT:
+ return
+ (type_ == TYPE_STRING || type_ == TYPE_STRING_LIST ||
+ !separator_.isEmpty())
+ ? xmlreader::XmlReader::Text::Raw
+ : xmlreader::XmlReader::Text::Normalized;
+ default:
+ break;
}
return xmlreader::XmlReader::Text::NONE;
}