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>
This commit is contained in:
parent
96fb3c52f5
commit
4722192098
@ -60,11 +60,11 @@ bool ParseManager::parse(std::set< OUString > const * existingDependencies) {
|
||||
sal_uInt32 startTime( osl_getGlobalTimer() );
|
||||
for (;;) {
|
||||
switch (itemData_.is()
|
||||
? xmlreader::XmlReader::RESULT_BEGIN
|
||||
? xmlreader::XmlReader::Result::Begin
|
||||
: reader_.nextItem(
|
||||
parser_->getTextMode(), &itemData_, &itemNamespaceId_))
|
||||
{
|
||||
case xmlreader::XmlReader::RESULT_BEGIN:
|
||||
case xmlreader::XmlReader::Result::Begin:
|
||||
if (!parser_->startElement(
|
||||
reader_, itemNamespaceId_, itemData_, existingDependencies))
|
||||
{
|
||||
@ -72,13 +72,13 @@ bool ParseManager::parse(std::set< OUString > const * existingDependencies) {
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
case xmlreader::XmlReader::RESULT_END:
|
||||
case xmlreader::XmlReader::Result::End:
|
||||
parser_->endElement(reader_);
|
||||
break;
|
||||
case xmlreader::XmlReader::RESULT_TEXT:
|
||||
case xmlreader::XmlReader::Result::Text:
|
||||
parser_->characters(itemData_);
|
||||
break;
|
||||
case xmlreader::XmlReader::RESULT_DONE:
|
||||
case xmlreader::XmlReader::Result::Done:
|
||||
SAL_INFO("configmgr", "parsing " << reader_.getUrl() << " took " << (osl_getGlobalTimer() - startTime) << " ms, success");
|
||||
return true;
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -48,7 +48,7 @@ public:
|
||||
|
||||
enum class Text { NONE, Raw, Normalized };
|
||||
|
||||
enum Result { RESULT_BEGIN, RESULT_END, RESULT_TEXT, RESULT_DONE };
|
||||
enum class Result { Begin, End, Text, Done };
|
||||
|
||||
int registerNamespaceIri(Span const & iri);
|
||||
|
||||
|
@ -39,7 +39,7 @@ static inline void lcl_assertEndingItem(xmlreader::XmlReader& reader)
|
||||
xmlreader::Span name;
|
||||
xmlreader::XmlReader::Result res;
|
||||
res = reader.nextItem(xmlreader::XmlReader::Text::NONE, &name, &nsId);
|
||||
assert(res == xmlreader::XmlReader::RESULT_END);
|
||||
assert(res == xmlreader::XmlReader::Result::End);
|
||||
(void) res;
|
||||
}
|
||||
|
||||
@ -50,9 +50,9 @@ static inline OUString lcl_getValue(xmlreader::XmlReader& reader,
|
||||
xmlreader::Span name;
|
||||
xmlreader::XmlReader::Result res;
|
||||
res = reader.nextItem(xmlreader::XmlReader::Text::NONE, &name, &nsId);
|
||||
assert(res == xmlreader::XmlReader::RESULT_BEGIN && name.equals(span));
|
||||
assert(res == xmlreader::XmlReader::Result::Begin && name.equals(span));
|
||||
res = reader.nextItem(xmlreader::XmlReader::Text::Raw, &name, &nsId);
|
||||
assert(res == xmlreader::XmlReader::RESULT_TEXT);
|
||||
assert(res == xmlreader::XmlReader::Result::Text);
|
||||
(void) res; (void) span;
|
||||
OUString sTmp = name.convertFromUtf8();
|
||||
lcl_assertEndingItem(reader);
|
||||
@ -88,15 +88,15 @@ SwLabelConfig::SwLabelConfig() :
|
||||
res = reader.nextItem(
|
||||
xmlreader::XmlReader::Text::NONE, &name, &nsId);
|
||||
assert(
|
||||
res == xmlreader::XmlReader::RESULT_BEGIN
|
||||
res == xmlreader::XmlReader::Result::Begin
|
||||
&& name.equals("manufacturers"));
|
||||
res = reader.nextItem(
|
||||
xmlreader::XmlReader::Text::NONE, &name, &nsId);
|
||||
while (res != xmlreader::XmlReader::RESULT_END)
|
||||
while (res != xmlreader::XmlReader::Result::End)
|
||||
{
|
||||
// Opening manufacturer
|
||||
assert(
|
||||
res == xmlreader::XmlReader::RESULT_BEGIN
|
||||
res == xmlreader::XmlReader::Result::Begin
|
||||
&& name.equals("manufacturer"));
|
||||
// Get the name
|
||||
(void)reader.nextAttribute(&nsId, &name);
|
||||
@ -109,10 +109,10 @@ SwLabelConfig::SwLabelConfig() :
|
||||
// Opening label or ending manufacturer
|
||||
res = reader.nextItem(
|
||||
xmlreader::XmlReader::Text::NONE, &name, &nsId);
|
||||
if (res == xmlreader::XmlReader::RESULT_END)
|
||||
if (res == xmlreader::XmlReader::Result::End)
|
||||
break;
|
||||
assert(
|
||||
res == xmlreader::XmlReader::RESULT_BEGIN
|
||||
res == xmlreader::XmlReader::Result::Begin
|
||||
&& name.equals("label"));
|
||||
// Get name value
|
||||
sName = lcl_getValue(reader, xmlreader::Span("name"));
|
||||
@ -131,7 +131,7 @@ SwLabelConfig::SwLabelConfig() :
|
||||
};
|
||||
res = reader.nextItem(
|
||||
xmlreader::XmlReader::Text::NONE, &name, &nsId);
|
||||
assert(res == xmlreader::XmlReader::RESULT_DONE);
|
||||
assert(res == xmlreader::XmlReader::Result::Done);
|
||||
|
||||
// add to m_aLabels and m_aManufacturers the custom labels
|
||||
const Sequence<OUString>& rMan = GetNodeNames( OUString() );
|
||||
|
@ -164,7 +164,7 @@ void WinBlocklistParser::handleDevices(wgl::DriverInfo& rDriver, xmlreader::XmlR
|
||||
xmlreader::XmlReader::Result res = rReader.nextItem(
|
||||
xmlreader::XmlReader::Text::Normalized, &name, &nsId);
|
||||
|
||||
if (res == xmlreader::XmlReader::RESULT_BEGIN)
|
||||
if (res == xmlreader::XmlReader::Result::Begin)
|
||||
{
|
||||
++nLevel;
|
||||
if (nLevel > 2)
|
||||
@ -190,14 +190,14 @@ void WinBlocklistParser::handleDevices(wgl::DriverInfo& rDriver, xmlreader::XmlR
|
||||
else
|
||||
throw InvalidFileException();
|
||||
}
|
||||
else if (res == xmlreader::XmlReader::RESULT_END)
|
||||
else if (res == xmlreader::XmlReader::Result::End)
|
||||
{
|
||||
--nLevel;
|
||||
bInMsg = false;
|
||||
if (!nLevel)
|
||||
break;
|
||||
}
|
||||
else if (res == xmlreader::XmlReader::RESULT_TEXT)
|
||||
else if (res == xmlreader::XmlReader::Result::Text)
|
||||
{
|
||||
if (bInMsg)
|
||||
{
|
||||
@ -284,7 +284,7 @@ void WinBlocklistParser::handleList(xmlreader::XmlReader& rReader)
|
||||
xmlreader::XmlReader::Result res = rReader.nextItem(
|
||||
xmlreader::XmlReader::Text::NONE, &name, &nsId);
|
||||
|
||||
if (res == xmlreader::XmlReader::RESULT_BEGIN)
|
||||
if (res == xmlreader::XmlReader::Result::Begin)
|
||||
{
|
||||
if (name.equals("entry"))
|
||||
{
|
||||
@ -303,7 +303,7 @@ void WinBlocklistParser::handleList(xmlreader::XmlReader& rReader)
|
||||
throw InvalidFileException();
|
||||
}
|
||||
}
|
||||
else if (res == xmlreader::XmlReader::RESULT_END)
|
||||
else if (res == xmlreader::XmlReader::Result::End)
|
||||
{
|
||||
break;
|
||||
}
|
||||
@ -320,7 +320,7 @@ void WinBlocklistParser::handleContent(xmlreader::XmlReader& rReader)
|
||||
xmlreader::XmlReader::Result res = rReader.nextItem(
|
||||
xmlreader::XmlReader::Text::NONE, &name, &nsId);
|
||||
|
||||
if (res == xmlreader::XmlReader::RESULT_BEGIN)
|
||||
if (res == xmlreader::XmlReader::Result::Begin)
|
||||
{
|
||||
if (name.equals("whitelist"))
|
||||
{
|
||||
@ -340,7 +340,7 @@ void WinBlocklistParser::handleContent(xmlreader::XmlReader& rReader)
|
||||
throw InvalidFileException();
|
||||
}
|
||||
}
|
||||
else if (res == xmlreader::XmlReader::RESULT_END)
|
||||
else if (res == xmlreader::XmlReader::Result::End)
|
||||
{
|
||||
if (name.equals("whitelist")
|
||||
||
|
||||
@ -349,7 +349,7 @@ void WinBlocklistParser::handleContent(xmlreader::XmlReader& rReader)
|
||||
meBlockType = BlockType::UNKNOWN;
|
||||
}
|
||||
}
|
||||
else if (res == xmlreader::XmlReader::RESULT_DONE)
|
||||
else if (res == xmlreader::XmlReader::Result::Done)
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
@ -549,7 +549,7 @@ void VclBuilder::handleTranslations(xmlreader::XmlReader &reader)
|
||||
xmlreader::XmlReader::Result res = reader.nextItem(
|
||||
xmlreader::XmlReader::Text::Raw, &name, &nsId);
|
||||
|
||||
if (res == xmlreader::XmlReader::RESULT_BEGIN)
|
||||
if (res == xmlreader::XmlReader::Result::Begin)
|
||||
{
|
||||
if (name.equals("e"))
|
||||
{
|
||||
@ -572,16 +572,16 @@ void VclBuilder::handleTranslations(xmlreader::XmlReader &reader)
|
||||
}
|
||||
}
|
||||
|
||||
if (res == xmlreader::XmlReader::RESULT_TEXT && !sID.isEmpty())
|
||||
if (res == xmlreader::XmlReader::Result::Text && !sID.isEmpty())
|
||||
{
|
||||
OString sTranslation(name.begin, name.length);
|
||||
m_pParserState->m_aTranslations[sID][sProperty] = sTranslation;
|
||||
}
|
||||
|
||||
if (res == xmlreader::XmlReader::RESULT_END)
|
||||
if (res == xmlreader::XmlReader::Result::End)
|
||||
sID.clear();
|
||||
|
||||
if (res == xmlreader::XmlReader::RESULT_DONE)
|
||||
if (res == xmlreader::XmlReader::Result::Done)
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -1903,7 +1903,7 @@ void VclBuilder::handleTabChild(vcl::Window *pParent, xmlreader::XmlReader &read
|
||||
xmlreader::XmlReader::Result res = reader.nextItem(
|
||||
xmlreader::XmlReader::Text::NONE, &name, &nsId);
|
||||
|
||||
if (res == xmlreader::XmlReader::RESULT_BEGIN)
|
||||
if (res == xmlreader::XmlReader::Result::Begin)
|
||||
{
|
||||
++nLevel;
|
||||
if (name.equals("object"))
|
||||
@ -1928,13 +1928,13 @@ void VclBuilder::handleTabChild(vcl::Window *pParent, xmlreader::XmlReader &read
|
||||
collectProperty(reader, sID, aProperties);
|
||||
}
|
||||
|
||||
if (res == xmlreader::XmlReader::RESULT_END)
|
||||
if (res == xmlreader::XmlReader::Result::End)
|
||||
--nLevel;
|
||||
|
||||
if (!nLevel)
|
||||
break;
|
||||
|
||||
if (res == xmlreader::XmlReader::RESULT_DONE)
|
||||
if (res == xmlreader::XmlReader::Result::Done)
|
||||
break;
|
||||
}
|
||||
|
||||
@ -2055,7 +2055,7 @@ void VclBuilder::handleChild(vcl::Window *pParent, xmlreader::XmlReader &reader)
|
||||
xmlreader::XmlReader::Result res = reader.nextItem(
|
||||
xmlreader::XmlReader::Text::NONE, &name, &nsId);
|
||||
|
||||
if (res == xmlreader::XmlReader::RESULT_BEGIN)
|
||||
if (res == xmlreader::XmlReader::Result::Begin)
|
||||
{
|
||||
if (name.equals("object") || name.equals("placeholder"))
|
||||
{
|
||||
@ -2128,13 +2128,13 @@ void VclBuilder::handleChild(vcl::Window *pParent, xmlreader::XmlReader &reader)
|
||||
++nLevel;
|
||||
}
|
||||
|
||||
if (res == xmlreader::XmlReader::RESULT_END)
|
||||
if (res == xmlreader::XmlReader::Result::End)
|
||||
--nLevel;
|
||||
|
||||
if (!nLevel)
|
||||
break;
|
||||
|
||||
if (res == xmlreader::XmlReader::RESULT_DONE)
|
||||
if (res == xmlreader::XmlReader::Result::Done)
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -2237,10 +2237,10 @@ void VclBuilder::handleRow(xmlreader::XmlReader &reader, const OString &rID, sal
|
||||
xmlreader::XmlReader::Result res = reader.nextItem(
|
||||
xmlreader::XmlReader::Text::NONE, &name, &nsId);
|
||||
|
||||
if (res == xmlreader::XmlReader::RESULT_DONE)
|
||||
if (res == xmlreader::XmlReader::Result::Done)
|
||||
break;
|
||||
|
||||
if (res == xmlreader::XmlReader::RESULT_BEGIN)
|
||||
if (res == xmlreader::XmlReader::Result::Begin)
|
||||
{
|
||||
++nLevel;
|
||||
if (name.equals("col"))
|
||||
@ -2275,7 +2275,7 @@ void VclBuilder::handleRow(xmlreader::XmlReader &reader, const OString &rID, sal
|
||||
}
|
||||
}
|
||||
|
||||
if (res == xmlreader::XmlReader::RESULT_END)
|
||||
if (res == xmlreader::XmlReader::Result::End)
|
||||
{
|
||||
--nLevel;
|
||||
}
|
||||
@ -2300,10 +2300,10 @@ void VclBuilder::handleListStore(xmlreader::XmlReader &reader, const OString &rI
|
||||
xmlreader::XmlReader::Result res = reader.nextItem(
|
||||
xmlreader::XmlReader::Text::NONE, &name, &nsId);
|
||||
|
||||
if (res == xmlreader::XmlReader::RESULT_DONE)
|
||||
if (res == xmlreader::XmlReader::Result::Done)
|
||||
break;
|
||||
|
||||
if (res == xmlreader::XmlReader::RESULT_BEGIN)
|
||||
if (res == xmlreader::XmlReader::Result::Begin)
|
||||
{
|
||||
if (name.equals("row"))
|
||||
handleRow(reader, rID, nRowIndex++);
|
||||
@ -2311,7 +2311,7 @@ void VclBuilder::handleListStore(xmlreader::XmlReader &reader, const OString &rI
|
||||
++nLevel;
|
||||
}
|
||||
|
||||
if (res == xmlreader::XmlReader::RESULT_END)
|
||||
if (res == xmlreader::XmlReader::Result::End)
|
||||
{
|
||||
--nLevel;
|
||||
}
|
||||
@ -2337,17 +2337,17 @@ void VclBuilder::handleAtkObject(xmlreader::XmlReader &reader, const OString &rI
|
||||
xmlreader::XmlReader::Result res = reader.nextItem(
|
||||
xmlreader::XmlReader::Text::NONE, &name, &nsId);
|
||||
|
||||
if (res == xmlreader::XmlReader::RESULT_DONE)
|
||||
if (res == xmlreader::XmlReader::Result::Done)
|
||||
break;
|
||||
|
||||
if (res == xmlreader::XmlReader::RESULT_BEGIN)
|
||||
if (res == xmlreader::XmlReader::Result::Begin)
|
||||
{
|
||||
++nLevel;
|
||||
if (name.equals("property"))
|
||||
collectProperty(reader, rID, aProperties);
|
||||
}
|
||||
|
||||
if (res == xmlreader::XmlReader::RESULT_END)
|
||||
if (res == xmlreader::XmlReader::Result::End)
|
||||
{
|
||||
--nLevel;
|
||||
}
|
||||
@ -2383,10 +2383,10 @@ std::vector<OString> VclBuilder::handleItems(xmlreader::XmlReader &reader, const
|
||||
xmlreader::XmlReader::Result res = reader.nextItem(
|
||||
xmlreader::XmlReader::Text::NONE, &name, &nsId);
|
||||
|
||||
if (res == xmlreader::XmlReader::RESULT_DONE)
|
||||
if (res == xmlreader::XmlReader::Result::Done)
|
||||
break;
|
||||
|
||||
if (res == xmlreader::XmlReader::RESULT_BEGIN)
|
||||
if (res == xmlreader::XmlReader::Result::Begin)
|
||||
{
|
||||
++nLevel;
|
||||
if (name.equals("item"))
|
||||
@ -2420,7 +2420,7 @@ std::vector<OString> VclBuilder::handleItems(xmlreader::XmlReader &reader, const
|
||||
}
|
||||
}
|
||||
|
||||
if (res == xmlreader::XmlReader::RESULT_END)
|
||||
if (res == xmlreader::XmlReader::Result::End)
|
||||
{
|
||||
--nLevel;
|
||||
}
|
||||
@ -2448,10 +2448,10 @@ void VclBuilder::handleMenu(xmlreader::XmlReader &reader, const OString &rID)
|
||||
xmlreader::XmlReader::Result res = reader.nextItem(
|
||||
xmlreader::XmlReader::Text::NONE, &name, &nsId);
|
||||
|
||||
if (res == xmlreader::XmlReader::RESULT_DONE)
|
||||
if (res == xmlreader::XmlReader::Result::Done)
|
||||
break;
|
||||
|
||||
if (res == xmlreader::XmlReader::RESULT_BEGIN)
|
||||
if (res == xmlreader::XmlReader::Result::Begin)
|
||||
{
|
||||
if (name.equals("child"))
|
||||
{
|
||||
@ -2465,7 +2465,7 @@ void VclBuilder::handleMenu(xmlreader::XmlReader &reader, const OString &rID)
|
||||
}
|
||||
}
|
||||
|
||||
if (res == xmlreader::XmlReader::RESULT_END)
|
||||
if (res == xmlreader::XmlReader::Result::End)
|
||||
{
|
||||
--nLevel;
|
||||
}
|
||||
@ -2488,7 +2488,7 @@ void VclBuilder::handleMenuChild(PopupMenu *pParent, xmlreader::XmlReader &reade
|
||||
xmlreader::XmlReader::Result res = reader.nextItem(
|
||||
xmlreader::XmlReader::Text::NONE, &name, &nsId);
|
||||
|
||||
if (res == xmlreader::XmlReader::RESULT_BEGIN)
|
||||
if (res == xmlreader::XmlReader::Result::Begin)
|
||||
{
|
||||
if (name.equals("object") || name.equals("placeholder"))
|
||||
{
|
||||
@ -2498,13 +2498,13 @@ void VclBuilder::handleMenuChild(PopupMenu *pParent, xmlreader::XmlReader &reade
|
||||
++nLevel;
|
||||
}
|
||||
|
||||
if (res == xmlreader::XmlReader::RESULT_END)
|
||||
if (res == xmlreader::XmlReader::Result::End)
|
||||
--nLevel;
|
||||
|
||||
if (!nLevel)
|
||||
break;
|
||||
|
||||
if (res == xmlreader::XmlReader::RESULT_DONE)
|
||||
if (res == xmlreader::XmlReader::Result::Done)
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -2550,10 +2550,10 @@ void VclBuilder::handleMenuObject(PopupMenu *pParent, xmlreader::XmlReader &read
|
||||
xmlreader::XmlReader::Result res = reader.nextItem(
|
||||
xmlreader::XmlReader::Text::NONE, &name, &nsId);
|
||||
|
||||
if (res == xmlreader::XmlReader::RESULT_DONE)
|
||||
if (res == xmlreader::XmlReader::Result::Done)
|
||||
break;
|
||||
|
||||
if (res == xmlreader::XmlReader::RESULT_BEGIN)
|
||||
if (res == xmlreader::XmlReader::Result::Begin)
|
||||
{
|
||||
++nLevel;
|
||||
if (name.equals("property"))
|
||||
@ -2562,7 +2562,7 @@ void VclBuilder::handleMenuObject(PopupMenu *pParent, xmlreader::XmlReader &read
|
||||
collectAccelerator(reader, aAccelerators);
|
||||
}
|
||||
|
||||
if (res == xmlreader::XmlReader::RESULT_END)
|
||||
if (res == xmlreader::XmlReader::Result::End)
|
||||
{
|
||||
--nLevel;
|
||||
}
|
||||
@ -2589,10 +2589,10 @@ void VclBuilder::handleSizeGroup(xmlreader::XmlReader &reader, const OString &rI
|
||||
xmlreader::XmlReader::Result res = reader.nextItem(
|
||||
xmlreader::XmlReader::Text::NONE, &name, &nsId);
|
||||
|
||||
if (res == xmlreader::XmlReader::RESULT_DONE)
|
||||
if (res == xmlreader::XmlReader::Result::Done)
|
||||
break;
|
||||
|
||||
if (res == xmlreader::XmlReader::RESULT_BEGIN)
|
||||
if (res == xmlreader::XmlReader::Result::Begin)
|
||||
{
|
||||
++nLevel;
|
||||
if (name.equals("widget"))
|
||||
@ -2617,7 +2617,7 @@ void VclBuilder::handleSizeGroup(xmlreader::XmlReader &reader, const OString &rI
|
||||
}
|
||||
}
|
||||
|
||||
if (res == xmlreader::XmlReader::RESULT_END)
|
||||
if (res == xmlreader::XmlReader::Result::End)
|
||||
{
|
||||
--nLevel;
|
||||
}
|
||||
@ -2802,10 +2802,10 @@ VclPtr<vcl::Window> VclBuilder::handleObject(vcl::Window *pParent, xmlreader::Xm
|
||||
xmlreader::XmlReader::Result res = reader.nextItem(
|
||||
xmlreader::XmlReader::Text::NONE, &name, &nsId);
|
||||
|
||||
if (res == xmlreader::XmlReader::RESULT_DONE)
|
||||
if (res == xmlreader::XmlReader::Result::Done)
|
||||
break;
|
||||
|
||||
if (res == xmlreader::XmlReader::RESULT_BEGIN)
|
||||
if (res == xmlreader::XmlReader::Result::Begin)
|
||||
{
|
||||
if (name.equals("child"))
|
||||
{
|
||||
@ -2832,7 +2832,7 @@ VclPtr<vcl::Window> VclBuilder::handleObject(vcl::Window *pParent, xmlreader::Xm
|
||||
}
|
||||
}
|
||||
|
||||
if (res == xmlreader::XmlReader::RESULT_END)
|
||||
if (res == xmlreader::XmlReader::Result::End)
|
||||
{
|
||||
--nLevel;
|
||||
}
|
||||
@ -2880,17 +2880,17 @@ void VclBuilder::handlePacking(vcl::Window *pCurrent, vcl::Window *pParent, xmlr
|
||||
xmlreader::XmlReader::Result res = reader.nextItem(
|
||||
xmlreader::XmlReader::Text::NONE, &name, &nsId);
|
||||
|
||||
if (res == xmlreader::XmlReader::RESULT_DONE)
|
||||
if (res == xmlreader::XmlReader::Result::Done)
|
||||
break;
|
||||
|
||||
if (res == xmlreader::XmlReader::RESULT_BEGIN)
|
||||
if (res == xmlreader::XmlReader::Result::Begin)
|
||||
{
|
||||
++nLevel;
|
||||
if (name.equals("property"))
|
||||
applyPackingProperty(pCurrent, pParent, reader);
|
||||
}
|
||||
|
||||
if (res == xmlreader::XmlReader::RESULT_END)
|
||||
if (res == xmlreader::XmlReader::Result::End)
|
||||
{
|
||||
--nLevel;
|
||||
}
|
||||
|
@ -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:
|
||||
|
Loading…
x
Reference in New Issue
Block a user