summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xcompilerplugins/clang/unusedenumconstants.py3
-rw-r--r--configmgr/source/valueparser.cxx30
-rw-r--r--configmgr/source/valueparser.hxx2
3 files changed, 20 insertions, 15 deletions
diff --git a/compilerplugins/clang/unusedenumconstants.py b/compilerplugins/clang/unusedenumconstants.py
index 34d52cb2ffda..ebd5ddaba474 100755
--- a/compilerplugins/clang/unusedenumconstants.py
+++ b/compilerplugins/clang/unusedenumconstants.py
@@ -116,6 +116,7 @@ for d in definitionSet:
"filter/source/graphicfilter/icgm/cgmtypes.hxx",
"basic/source/inc/filefmt.hxx", # FileOffset
"include/basic/sbxdef.hxx", # SbxDataType
+ "connectivity/source/inc/dbase/DTable.hxx", # ODbaseTable::DBFType
# unit test code
"cppu/source/uno/check.cxx",
# general weird nonsense going on
@@ -142,6 +143,7 @@ for d in definitionSet:
"basic/source/inc/opcodes.hxx", # SbiOpcode
"basic/source/inc/token.hxx", # SbiToken
"binaryurp/source/specialfunctionids.hxx", # binaryurp::SpecialFunctionIds
+ "connectivity/source/inc/odbc/OTools.hxx", # ODBC3SQLFunctionId
# Windows or OSX only
"include/canvas/rendering/icolorbuffer.hxx",
"include/vcl/commandevent.hxx",
@@ -184,6 +186,7 @@ for d in definitionSet:
"vcl/unx/gtk/salnativewidgets-gtk.cxx",
"sc/inc/callform.hxx", # ParamType
"include/i18nlangtag/applelangid.hxx", # AppleLanguageId
+ "connectivity/source/drivers/firebird/Util.hxx", # firebird::BlobSubtype
]):
continue
diff --git a/configmgr/source/valueparser.cxx b/configmgr/source/valueparser.cxx
index 33176071a640..d26bddc481fa 100644
--- a/configmgr/source/valueparser.cxx
+++ b/configmgr/source/valueparser.cxx
@@ -256,12 +256,12 @@ ValueParser::~ValueParser() {}
xmlreader::XmlReader::Text ValueParser::getTextMode() const {
if (node_.is()) {
switch (state_) {
- case STATE_TEXT:
+ case State::Text:
if (!items_.empty()) {
break;
}
SAL_FALLTHROUGH;
- case STATE_IT:
+ case State::IT:
return
(type_ == TYPE_STRING || type_ == TYPE_STRING_LIST ||
!separator_.isEmpty())
@@ -282,18 +282,18 @@ bool ValueParser::startElement(
return false;
}
switch (state_) {
- case STATE_TEXT:
+ case State::Text:
if (nsId == xmlreader::XmlReader::NAMESPACE_NONE && name.equals("it") &&
isListType(type_) && separator_.isEmpty())
{
pad_.clear();
// before first <it>, characters are not ignored; assume they
// are only whitespace
- state_ = STATE_IT;
+ state_ = State::IT;
return true;
}
SAL_FALLTHROUGH;
- case STATE_IT:
+ case State::IT:
if (nsId == xmlreader::XmlReader::NAMESPACE_NONE &&
name.equals("unicode") &&
(type_ == TYPE_STRING || type_ == TYPE_STRING_LIST))
@@ -327,7 +327,7 @@ bool ValueParser::startElement(
throw css::uno::RuntimeException(
"bad unicode scalar attribute in " + reader.getUrl());
}
- state_ = State(state_ + 1);
+ state_ = state_ == State::Text ? State::TextUnicode : State::ITUnicode;
return true;
}
break;
@@ -343,7 +343,7 @@ bool ValueParser::endElement() {
return false;
}
switch (state_) {
- case STATE_TEXT:
+ case State::Text:
{
css::uno::Any *pValue = nullptr;
@@ -407,15 +407,17 @@ bool ValueParser::endElement() {
node_.clear();
}
break;
- case STATE_TEXT_UNICODE:
- case STATE_IT_UNICODE:
- state_ = State(state_ - 1);
+ case State::TextUnicode:
+ state_ = State::Text;
break;
- case STATE_IT:
+ case State::ITUnicode:
+ state_ = State::IT;
+ break;
+ case State::IT:
items_.push_back(
parseValue(OString(), pad_.get(), elementType(type_)));
pad_.clear();
- state_ = STATE_TEXT;
+ state_ = State::Text;
break;
}
return true;
@@ -423,7 +425,7 @@ bool ValueParser::endElement() {
void ValueParser::characters(xmlreader::Span const & text) {
if (node_.is()) {
- assert(state_ == STATE_TEXT || state_ == STATE_IT);
+ assert(state_ == State::Text || state_ == State::IT);
pad_.add(text.begin, text.length);
}
}
@@ -434,7 +436,7 @@ void ValueParser::start(
assert(node.is() && !node_.is());
node_ = node;
localizedName_ = localizedName;
- state_ = STATE_TEXT;
+ state_ = State::Text;
}
diff --git a/configmgr/source/valueparser.hxx b/configmgr/source/valueparser.hxx
index 092d910dcd05..50cab466d2d4 100644
--- a/configmgr/source/valueparser.hxx
+++ b/configmgr/source/valueparser.hxx
@@ -73,7 +73,7 @@ private:
template< typename T > css::uno::Any convertItems();
- enum State { STATE_TEXT, STATE_TEXT_UNICODE, STATE_IT, STATE_IT_UNICODE };
+ enum class State { Text, TextUnicode, IT, ITUnicode };
int layer_;
rtl::Reference< Node > node_;