summaryrefslogtreecommitdiff
path: root/xmlreader/source
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-05-23 14:54:44 +0200
committerNoel Grandin <noelgrandin@gmail.com>2016-05-25 11:59:08 +0000
commit472219209849daee7a9924f0f54d5f0bdfe4b772 (patch)
tree426719450423d135acb9edfadf6fb7ca302bcfca /xmlreader/source
parent96fb3c52f5d04c8257cefd97630173005e6e466c (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 'xmlreader/source')
-rw-r--r--xmlreader/source/xmlreader.cxx16
1 files changed, 8 insertions, 8 deletions
diff --git a/xmlreader/source/xmlreader.cxx b/xmlreader/source/xmlreader.cxx
index 41310f6ee157..ea15510c410b 100644
--- a/xmlreader/source/xmlreader.cxx
+++ b/xmlreader/source/xmlreader.cxx
@@ -157,9 +157,9 @@ XmlReader::Result XmlReader::nextItem(Text reportText, Span * data, int * nsId)
return handleEndTag();
case STATE_EMPTY_ELEMENT_TAG:
handleElementEnd();
- return RESULT_END;
+ return Result::End;
default: // STATE_DONE
- return RESULT_DONE;
+ return Result::Done;
}
}
@@ -697,7 +697,7 @@ XmlReader::Result XmlReader::handleStartTag(int * nsId, Span * localName) {
*nsId = getNamespaceId(Span(nameBegin, nameColon - nameBegin));
*localName = Span(nameColon + 1, nameEnd - (nameColon + 1));
}
- return RESULT_BEGIN;
+ return Result::Begin;
}
XmlReader::Result XmlReader::handleEndTag() {
@@ -720,7 +720,7 @@ XmlReader::Result XmlReader::handleEndTag() {
"missing '>' in " + fileUrl_ );
}
++pos_;
- return RESULT_END;
+ return Result::End;
}
void XmlReader::handleElementEnd() {
@@ -798,7 +798,7 @@ XmlReader::Result XmlReader::handleRawText(Span * text) {
*text = pad_.get();
++pos_;
state_ = STATE_END_TAG;
- return RESULT_TEXT;
+ return Result::Text;
case '?':
++pos_;
skipProcessingInstruction();
@@ -807,7 +807,7 @@ XmlReader::Result XmlReader::handleRawText(Span * text) {
default:
*text = pad_.get();
state_ = STATE_START_TAG;
- return RESULT_TEXT;
+ return Result::Text;
}
break;
default:
@@ -915,7 +915,7 @@ XmlReader::Result XmlReader::handleNormalizedText(Span * text) {
pad_.add(flowBegin, flowEnd - flowBegin);
*text = pad_.get();
state_ = STATE_END_TAG;
- return RESULT_TEXT;
+ return Result::Text;
case '?':
++pos_;
skipProcessingInstruction();
@@ -925,7 +925,7 @@ XmlReader::Result XmlReader::handleNormalizedText(Span * text) {
pad_.add(flowBegin, flowEnd - flowBegin);
*text = pad_.get();
state_ = STATE_START_TAG;
- return RESULT_TEXT;
+ return Result::Text;
}
break;
default: