[Libreoffice-commits] core.git: configmgr/source include/xmlreader sw/source vcl/opengl vcl/source xmlreader/source

Noel Grandin (via logerrit) logerrit at kemper.freedesktop.org
Sun Oct 6 15:08:01 UTC 2019


 configmgr/source/valueparser.cxx     |   10 +--
 configmgr/source/xcdparser.cxx       |   12 +--
 configmgr/source/xcsparser.cxx       |   60 +++++++++---------
 configmgr/source/xcuparser.cxx       |   80 ++++++++++++------------
 configmgr/source/xmldata.cxx         |   63 +++++--------------
 include/xmlreader/span.hxx           |   23 ++++---
 sw/source/uibase/envelp/labelcfg.cxx |   10 +--
 vcl/opengl/win/blocklist_parser.cxx  |   32 ++++-----
 vcl/source/window/builder.cxx        |  114 +++++++++++++++++------------------
 xmlreader/source/xmlreader.cxx       |   12 +--
 10 files changed, 198 insertions(+), 218 deletions(-)

New commits:
commit 0a6b9df8c8fc8e97ac627081485613e336051208
Author:     Noel Grandin <noelgrandin at gmail.com>
AuthorDate: Sun Oct 6 08:10:55 2019 +0200
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Sun Oct 6 17:06:53 2019 +0200

    convert equals() to operator== in xmlreader::Span
    
    Change-Id: Ic6a8eae344c06be87e2bc4bf7f242a2d18ebc8ad
    Reviewed-on: https://gerrit.libreoffice.org/80312
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/configmgr/source/valueparser.cxx b/configmgr/source/valueparser.cxx
index ceadf689f5b1..49ddba36fc27 100644
--- a/configmgr/source/valueparser.cxx
+++ b/configmgr/source/valueparser.cxx
@@ -63,11 +63,11 @@ bool parseHexDigit(char c, int * value) {
 
 bool parseValue(xmlreader::Span const & text, sal_Bool * value) {
     assert(text.is() && value != nullptr);
-    if (text.equals("true") || text.equals("1")) {
+    if (text == "true" || text == "1") {
         *value = true;
         return true;
     }
-    if (text.equals("false") || text.equals("0")) {
+    if (text == "false" || text == "0") {
         *value = false;
         return true;
     }
@@ -278,7 +278,7 @@ bool ValueParser::startElement(
     }
     switch (state_) {
     case State::Text:
-        if (nsId == xmlreader::XmlReader::NAMESPACE_NONE && name.equals("it") &&
+        if (nsId == xmlreader::XmlReader::NAMESPACE_NONE && name == "it" &&
             isListType(type_) && separator_.isEmpty())
         {
             pad_.clear();
@@ -290,7 +290,7 @@ bool ValueParser::startElement(
         [[fallthrough]];
     case State::IT:
         if (nsId == xmlreader::XmlReader::NAMESPACE_NONE &&
-            name.equals("unicode") &&
+            name == "unicode" &&
             (type_ == TYPE_STRING || type_ == TYPE_STRING_LIST))
         {
             sal_Int32 scalar = -1;
@@ -301,7 +301,7 @@ bool ValueParser::startElement(
                     break;
                 }
                 if (attrNsId == ParseManager::NAMESPACE_OOR &&
-                    attrLn.equals("scalar"))
+                    attrLn == "scalar")
                 {
                     if (!parseValue(reader.getAttributeValue(true), &scalar)) {
                         scalar = -1;
diff --git a/configmgr/source/xcdparser.cxx b/configmgr/source/xcdparser.cxx
index a849e210b3b6..a069c6b99c6f 100644
--- a/configmgr/source/xcdparser.cxx
+++ b/configmgr/source/xcdparser.cxx
@@ -61,14 +61,14 @@ bool XcdParser::startElement(
     }
     switch (state_) {
     case STATE_START:
-        if (nsId == ParseManager::NAMESPACE_OOR && name.equals("data")) {
+        if (nsId == ParseManager::NAMESPACE_OOR && name == "data") {
             state_ = STATE_DEPENDENCIES;
             return true;
         }
         break;
     case STATE_DEPENDENCIES:
         if (nsId == xmlreader::XmlReader::NAMESPACE_NONE &&
-            name.equals("dependency"))
+            name == "dependency")
         {
             if (dependencyFile_.isEmpty()) {
                 dependencyOptional_ = false;
@@ -81,12 +81,12 @@ bool XcdParser::startElement(
                     }
                     if (attrNsId == xmlreader::XmlReader::NAMESPACE_NONE &&
                             //TODO: _OOR
-                        attrLn.equals("file"))
+                        attrLn == "file")
                     {
                         attrFile = reader.getAttributeValue(false);
                     } else if ((attrNsId ==
                                 xmlreader::XmlReader::NAMESPACE_NONE) &&
-                               attrLn.equals("optional"))
+                               attrLn == "optional")
                     {
                         dependencyOptional_ = xmldata::parseBoolean(
                             reader.getAttributeValue(true));
@@ -118,7 +118,7 @@ bool XcdParser::startElement(
         [[fallthrough]];
     case STATE_COMPONENTS:
         if (nsId == ParseManager::NAMESPACE_OOR &&
-            name.equals("component-schema"))
+            name == "component-schema")
         {
             nestedParser_ = new XcsParser(layer_, data_);
             nesting_ = 1;
@@ -126,7 +126,7 @@ bool XcdParser::startElement(
                 reader, nsId, name, existingDependencies);
         }
         if (nsId == ParseManager::NAMESPACE_OOR &&
-            (name.equals("component-data") || name.equals("items")))
+            (name == "component-data" || name == "items"))
         {
             nestedParser_ = new XcuParser(layer_ + 1, data_, nullptr, nullptr, nullptr);
             nesting_ = 1;
diff --git a/configmgr/source/xcsparser.cxx b/configmgr/source/xcsparser.cxx
index 2087aec55226..24e1dc008312 100644
--- a/configmgr/source/xcsparser.cxx
+++ b/configmgr/source/xcsparser.cxx
@@ -127,7 +127,7 @@ bool XcsParser::startElement(
     }
     if (state_ == STATE_START) {
         if (nsId == ParseManager::NAMESPACE_OOR &&
-            name.equals("component-schema"))
+            name == "component-schema")
         {
             handleComponentSchema(reader);
             state_ = STATE_COMPONENT_SCHEMA;
@@ -140,8 +140,8 @@ bool XcsParser::startElement(
         // illegal content):
         if (ignoring_ > 0 ||
             (nsId == xmlreader::XmlReader::NAMESPACE_NONE &&
-             (name.equals("info") || name.equals("import") ||
-              name.equals("uses") || name.equals("constraints"))))
+             (name == "info" || name == "import" ||
+              name == "uses" || name == "constraints")))
         {
             assert(ignoring_ < LONG_MAX);
             ++ignoring_;
@@ -150,7 +150,7 @@ bool XcsParser::startElement(
         switch (state_) {
         case STATE_COMPONENT_SCHEMA:
             if (nsId == xmlreader::XmlReader::NAMESPACE_NONE &&
-                name.equals("templates"))
+                name == "templates")
             {
                 state_ = STATE_TEMPLATES;
                 return true;
@@ -158,7 +158,7 @@ bool XcsParser::startElement(
             [[fallthrough]];
         case STATE_TEMPLATES_DONE:
             if (nsId == xmlreader::XmlReader::NAMESPACE_NONE &&
-                name.equals("component"))
+                name == "component")
             {
                 state_ = STATE_COMPONENT;
                 assert(elements_.empty());
@@ -172,13 +172,13 @@ bool XcsParser::startElement(
         case STATE_TEMPLATES:
             if (elements_.empty()) {
                 if (nsId == xmlreader::XmlReader::NAMESPACE_NONE &&
-                    name.equals("group"))
+                    name == "group")
                 {
                     handleGroup(reader, true);
                     return true;
                 }
                 if (nsId == xmlreader::XmlReader::NAMESPACE_NONE &&
-                    name.equals("set"))
+                    name == "set")
                 {
                     handleSet(reader, true);
                     return true;
@@ -192,7 +192,7 @@ bool XcsParser::startElement(
             case Node::KIND_PROPERTY:
             case Node::KIND_LOCALIZED_PROPERTY:
                 if (nsId == xmlreader::XmlReader::NAMESPACE_NONE &&
-                    name.equals("value"))
+                    name == "value")
                 {
                     handlePropValue(reader, elements_.top().node);
                     return true;
@@ -200,25 +200,25 @@ bool XcsParser::startElement(
                 break;
             case Node::KIND_GROUP:
                 if (nsId == xmlreader::XmlReader::NAMESPACE_NONE &&
-                    name.equals("prop"))
+                    name == "prop")
                 {
                     handleProp(reader);
                     return true;
                 }
                 if (nsId == xmlreader::XmlReader::NAMESPACE_NONE &&
-                    name.equals("node-ref"))
+                    name == "node-ref")
                 {
                     handleNodeRef(reader);
                     return true;
                 }
                 if (nsId == xmlreader::XmlReader::NAMESPACE_NONE &&
-                    name.equals("group"))
+                    name == "group")
                 {
                     handleGroup(reader, false);
                     return true;
                 }
                 if (nsId == xmlreader::XmlReader::NAMESPACE_NONE &&
-                    name.equals("set"))
+                    name == "set")
                 {
                     handleSet(reader, false);
                     return true;
@@ -226,7 +226,7 @@ bool XcsParser::startElement(
                 break;
             case Node::KIND_SET:
                 if (nsId == xmlreader::XmlReader::NAMESPACE_NONE &&
-                    name.equals("item"))
+                    name == "item")
                 {
                     handleSetItem(
                         reader,
@@ -331,7 +331,7 @@ void XcsParser::handleComponentSchema(xmlreader::XmlReader & reader) {
         if (!reader.nextAttribute(&attrNsId, &attrLn)) {
             break;
         }
-        if (attrNsId == ParseManager::NAMESPACE_OOR && attrLn.equals("package"))
+        if (attrNsId == ParseManager::NAMESPACE_OOR && attrLn == "package")
         {
             if (hasPackage) {
                 throw css::uno::RuntimeException(
@@ -342,7 +342,7 @@ void XcsParser::handleComponentSchema(xmlreader::XmlReader & reader) {
             xmlreader::Span s(reader.getAttributeValue(false));
             buf.insert(0, s.begin, s.length);
         } else if (attrNsId == ParseManager::NAMESPACE_OOR &&
-                   attrLn.equals("name"))
+                   attrLn == "name")
         {
             if (hasName) {
                 throw css::uno::RuntimeException(
@@ -378,15 +378,15 @@ void XcsParser::handleNodeRef(xmlreader::XmlReader & reader) {
         if (!reader.nextAttribute(&attrNsId, &attrLn)) {
             break;
         }
-        if (attrNsId == ParseManager::NAMESPACE_OOR && attrLn.equals("name")) {
+        if (attrNsId == ParseManager::NAMESPACE_OOR && attrLn == "name") {
             hasName = true;
             name = reader.getAttributeValue(false).convertFromUtf8();
         } else if (attrNsId == ParseManager::NAMESPACE_OOR &&
-                   attrLn.equals("component"))
+                   attrLn == "component")
         {
             component = reader.getAttributeValue(false).convertFromUtf8();
         } else if (attrNsId == ParseManager::NAMESPACE_OOR &&
-                   attrLn.equals("node-type"))
+                   attrLn == "node-type")
         {
             hasNodeType = true;
             nodeType = reader.getAttributeValue(false).convertFromUtf8();
@@ -424,20 +424,20 @@ void XcsParser::handleProp(xmlreader::XmlReader & reader) {
         if (!reader.nextAttribute(&attrNsId, &attrLn)) {
             break;
         }
-        if (attrNsId == ParseManager::NAMESPACE_OOR && attrLn.equals("name")) {
+        if (attrNsId == ParseManager::NAMESPACE_OOR && attrLn == "name") {
             hasName = true;
             name = reader.getAttributeValue(false).convertFromUtf8();
         } else if (attrNsId == ParseManager::NAMESPACE_OOR &&
-                   attrLn.equals("type"))
+                   attrLn == "type")
         {
             valueParser_.type_ = xmldata::parseType(
                 reader, reader.getAttributeValue(true));
         } else if (attrNsId == ParseManager::NAMESPACE_OOR &&
-                   attrLn.equals("localized"))
+                   attrLn == "localized")
         {
             localized = xmldata::parseBoolean(reader.getAttributeValue(true));
         } else if (attrNsId == ParseManager::NAMESPACE_OOR &&
-                   attrLn.equals("nillable"))
+                   attrLn == "nillable")
         {
             nillable = xmldata::parseBoolean(reader.getAttributeValue(true));
         }
@@ -474,7 +474,7 @@ void XcsParser::handlePropValue(
             break;
         }
         if (attrNsId == ParseManager::NAMESPACE_OOR &&
-            attrLn.equals("separator"))
+            attrLn == "separator")
         {
             attrSeparator = reader.getAttributeValue(false);
             if (attrSeparator.length == 0) {
@@ -498,11 +498,11 @@ void XcsParser::handleGroup(xmlreader::XmlReader & reader, bool isTemplate) {
         if (!reader.nextAttribute(&attrNsId, &attrLn)) {
             break;
         }
-        if (attrNsId == ParseManager::NAMESPACE_OOR && attrLn.equals("name")) {
+        if (attrNsId == ParseManager::NAMESPACE_OOR && attrLn == "name") {
             hasName = true;
             name = reader.getAttributeValue(false).convertFromUtf8();
         } else if (attrNsId == ParseManager::NAMESPACE_OOR &&
-                   attrLn.equals("extensible"))
+                   attrLn == "extensible")
         {
             extensible = xmldata::parseBoolean(reader.getAttributeValue(true));
         }
@@ -534,15 +534,15 @@ void XcsParser::handleSet(xmlreader::XmlReader & reader, bool isTemplate) {
         if (!reader.nextAttribute(&attrNsId, &attrLn)) {
             break;
         }
-        if (attrNsId == ParseManager::NAMESPACE_OOR && attrLn.equals("name")) {
+        if (attrNsId == ParseManager::NAMESPACE_OOR && attrLn == "name") {
             hasName = true;
             name = reader.getAttributeValue(false).convertFromUtf8();
         } else if (attrNsId == ParseManager::NAMESPACE_OOR &&
-                   attrLn.equals("component"))
+                   attrLn == "component")
         {
             component = reader.getAttributeValue(false).convertFromUtf8();
         } else if (attrNsId == ParseManager::NAMESPACE_OOR &&
-                   attrLn.equals("node-type"))
+                   attrLn == "node-type")
         {
             hasNodeType = true;
             nodeType = reader.getAttributeValue(false).convertFromUtf8();
@@ -576,11 +576,11 @@ void XcsParser::handleSetItem(xmlreader::XmlReader & reader, SetNode * set) {
             break;
         }
         if (attrNsId == ParseManager::NAMESPACE_OOR &&
-            attrLn.equals("component"))
+            attrLn == "component")
         {
             component = reader.getAttributeValue(false).convertFromUtf8();
         } else if (attrNsId == ParseManager::NAMESPACE_OOR &&
-                   attrLn.equals("node-type"))
+                   attrLn == "node-type")
         {
             hasNodeType = true;
             nodeType = reader.getAttributeValue(false).convertFromUtf8();
diff --git a/configmgr/source/xcuparser.cxx b/configmgr/source/xcuparser.cxx
index 596d85b696da..89508be97992 100644
--- a/configmgr/source/xcuparser.cxx
+++ b/configmgr/source/xcuparser.cxx
@@ -75,10 +75,10 @@ bool XcuParser::startElement(
     }
     if (state_.empty()) {
         if (nsId == ParseManager::NAMESPACE_OOR &&
-            name.equals("component-data"))
+            name == "component-data")
         {
             handleComponentData(reader);
-        } else if (nsId == ParseManager::NAMESPACE_OOR && name.equals("items"))
+        } else if (nsId == ParseManager::NAMESPACE_OOR && name == "items")
         {
             state_.push(State::Modify(rtl::Reference< Node >()));
         } else {
@@ -89,7 +89,7 @@ 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 != "item")
         {
             throw css::uno::RuntimeException(
                 "bad items node member <" + name.convertFromUtf8() + "> in " +
@@ -100,7 +100,7 @@ bool XcuParser::startElement(
         switch (state_.top().node->kind()) {
         case Node::KIND_PROPERTY:
             if (nsId != xmlreader::XmlReader::NAMESPACE_NONE ||
-                !name.equals("value"))
+                name != "value")
             {
                 throw css::uno::RuntimeException(
                     "bad property node member <" + name.convertFromUtf8() +
@@ -112,7 +112,7 @@ bool XcuParser::startElement(
             break;
         case Node::KIND_LOCALIZED_PROPERTY:
             if (nsId != xmlreader::XmlReader::NAMESPACE_NONE ||
-                !name.equals("value"))
+                name != "value")
             {
                 throw css::uno::RuntimeException(
                     "bad localized property node member <" +
@@ -129,13 +129,13 @@ bool XcuParser::startElement(
                 reader.getUrl());
         case Node::KIND_GROUP:
             if (nsId == xmlreader::XmlReader::NAMESPACE_NONE &&
-                name.equals("prop"))
+                name == "prop")
             {
                 handleGroupProp(
                     reader,
                     static_cast< GroupNode * >(state_.top().node.get()));
             } else if (nsId == xmlreader::XmlReader::NAMESPACE_NONE &&
-                       name.equals("node"))
+                       name == "node")
             {
                 handleGroupNode(reader, state_.top().node);
             } else {
@@ -146,12 +146,12 @@ bool XcuParser::startElement(
             break;
         case Node::KIND_SET:
             if (nsId == xmlreader::XmlReader::NAMESPACE_NONE &&
-                name.equals("node"))
+                name == "node")
             {
                 handleSetNode(
                     reader, static_cast< SetNode * >(state_.top().node.get()));
             } else if (nsId == xmlreader::XmlReader::NAMESPACE_NONE &&
-                       name.equals("prop"))
+                       name == "prop")
             {
                 SAL_WARN(
                     "configmgr",
@@ -203,16 +203,16 @@ void XcuParser::characters(xmlreader::Span const & text) {
 
 XcuParser::Operation XcuParser::parseOperation(xmlreader::Span const & text) {
     assert(text.is());
-    if (text.equals("modify")) {
+    if (text == "modify") {
         return OPERATION_MODIFY;
     }
-    if (text.equals("replace")) {
+    if (text == "replace") {
         return OPERATION_REPLACE;
     }
-    if (text.equals("fuse")) {
+    if (text == "fuse") {
         return OPERATION_FUSE;
     }
-    if (text.equals("remove")) {
+    if (text == "remove") {
         return OPERATION_REMOVE;
     }
     throw css::uno::RuntimeException(
@@ -232,7 +232,7 @@ void XcuParser::handleComponentData(xmlreader::XmlReader & reader) {
         if (!reader.nextAttribute(&attrNsId, &attrLn)) {
             break;
         }
-        if (attrNsId == ParseManager::NAMESPACE_OOR && attrLn.equals("package"))
+        if (attrNsId == ParseManager::NAMESPACE_OOR && attrLn == "package")
         {
             if (hasPackage) {
                 throw css::uno::RuntimeException(
@@ -243,7 +243,7 @@ void XcuParser::handleComponentData(xmlreader::XmlReader & reader) {
             xmlreader::Span s(reader.getAttributeValue(false));
             buf.insert(0, s.begin, s.length);
         } else if (attrNsId == ParseManager::NAMESPACE_OOR &&
-                   attrLn.equals("name"))
+                   attrLn == "name")
         {
             if (hasName) {
                 throw css::uno::RuntimeException(
@@ -254,11 +254,11 @@ void XcuParser::handleComponentData(xmlreader::XmlReader & reader) {
             xmlreader::Span s(reader.getAttributeValue(false));
             buf.append(s.begin, s.length);
         } else if (attrNsId == ParseManager::NAMESPACE_OOR &&
-                   attrLn.equals("op"))
+                   attrLn == "op")
         {
             op = parseOperation(reader.getAttributeValue(true));
         } else if (attrNsId == ParseManager::NAMESPACE_OOR &&
-                   attrLn.equals("finalized"))
+                   attrLn == "finalized")
         {
             finalized = xmldata::parseBoolean(reader.getAttributeValue(true));
         }
@@ -320,7 +320,7 @@ void XcuParser::handleItem(xmlreader::XmlReader & reader) {
         if (!reader.nextAttribute(&attrNsId, &attrLn)) {
             break;
         }
-        if (attrNsId == ParseManager::NAMESPACE_OOR && attrLn.equals("path")) {
+        if (attrNsId == ParseManager::NAMESPACE_OOR && attrLn == "path") {
             attrPath = reader.getAttributeValue(false);
         }
     }
@@ -386,10 +386,10 @@ void XcuParser::handlePropValue(
         if (!reader.nextAttribute(&attrNsId, &attrLn)) {
             break;
         }
-        if (attrNsId == ParseManager::NAMESPACE_XSI && attrLn.equals("nil")) {
+        if (attrNsId == ParseManager::NAMESPACE_XSI && attrLn == "nil") {
             nil = xmldata::parseBoolean(reader.getAttributeValue(true));
         } else if (attrNsId == ParseManager::NAMESPACE_OOR &&
-                   attrLn.equals("type"))
+                   attrLn == "type")
         {
             Type type = xmldata::parseType(
                 reader, reader.getAttributeValue(true));
@@ -399,7 +399,7 @@ void XcuParser::handlePropValue(
             }
             valueParser_.type_ = type;
         } else if (attrNsId == ParseManager::NAMESPACE_OOR &&
-                   attrLn.equals("separator"))
+                   attrLn == "separator")
         {
             xmlreader::Span s(reader.getAttributeValue(false));
             if (s.length == 0) {
@@ -408,7 +408,7 @@ void XcuParser::handlePropValue(
             }
             separator = OString(s.begin, s.length);
         } else if (attrNsId == ParseManager::NAMESPACE_OOR &&
-                   attrLn.equals("external"))
+                   attrLn == "external")
         {
             external = reader.getAttributeValue(true).convertFromUtf8();
             if (external.isEmpty()) {
@@ -452,15 +452,15 @@ void XcuParser::handleLocpropValue(
             break;
         }
         if (attrNsId == xmlreader::XmlReader::NAMESPACE_XML &&
-            attrLn.equals("lang"))
+            attrLn == "lang")
         {
             name = reader.getAttributeValue(false).convertFromUtf8();
         } else if (attrNsId == ParseManager::NAMESPACE_XSI &&
-                   attrLn.equals("nil"))
+                   attrLn == "nil")
         {
             nil = xmldata::parseBoolean(reader.getAttributeValue(true));
         } else if (attrNsId == ParseManager::NAMESPACE_OOR &&
-                   attrLn.equals("type"))
+                   attrLn == "type")
         {
             Type type = xmldata::parseType(
                 reader, reader.getAttributeValue(true));
@@ -470,7 +470,7 @@ void XcuParser::handleLocpropValue(
             }
             valueParser_.type_ = type;
         } else if (attrNsId == ParseManager::NAMESPACE_OOR &&
-                   attrLn.equals("separator"))
+                   attrLn == "separator")
         {
             xmlreader::Span s(reader.getAttributeValue(false));
             if (s.length == 0) {
@@ -479,7 +479,7 @@ void XcuParser::handleLocpropValue(
             }
             separator = OString(s.begin, s.length);
         } else if (attrNsId == ParseManager::NAMESPACE_OOR &&
-                   attrLn.equals("op"))
+                   attrLn == "op")
         {
             op = parseOperation(reader.getAttributeValue(true));
         }
@@ -559,19 +559,19 @@ void XcuParser::handleGroupProp(
         if (!reader.nextAttribute(&attrNsId, &attrLn)) {
             break;
         }
-        if (attrNsId == ParseManager::NAMESPACE_OOR && attrLn.equals("name")) {
+        if (attrNsId == ParseManager::NAMESPACE_OOR && attrLn == "name") {
             hasName = true;
             name = reader.getAttributeValue(false).convertFromUtf8();
         } else if (attrNsId == ParseManager::NAMESPACE_OOR &&
-                   attrLn.equals("type"))
+                   attrLn == "type")
         {
             type = xmldata::parseType(reader, reader.getAttributeValue(true));
         } else if (attrNsId == ParseManager::NAMESPACE_OOR &&
-                   attrLn.equals("op"))
+                   attrLn == "op")
         {
             op = parseOperation(reader.getAttributeValue(true));
         } else if (attrNsId == ParseManager::NAMESPACE_OOR &&
-                   attrLn.equals("finalized"))
+                   attrLn == "finalized")
         {
             finalized = xmldata::parseBoolean(reader.getAttributeValue(true));
         }
@@ -754,15 +754,15 @@ void XcuParser::handleGroupNode(
         if (!reader.nextAttribute(&attrNsId, &attrLn)) {
             break;
         }
-        if (attrNsId == ParseManager::NAMESPACE_OOR && attrLn.equals("name")) {
+        if (attrNsId == ParseManager::NAMESPACE_OOR && attrLn == "name") {
             hasName = true;
             name = reader.getAttributeValue(false).convertFromUtf8();
         } else if (attrNsId == ParseManager::NAMESPACE_OOR &&
-                   attrLn.equals("op"))
+                   attrLn == "op")
         {
             op = parseOperation(reader.getAttributeValue(true));
         } else if (attrNsId == ParseManager::NAMESPACE_OOR &&
-                   attrLn.equals("finalized"))
+                   attrLn == "finalized")
         {
             finalized = xmldata::parseBoolean(reader.getAttributeValue(true));
         }
@@ -824,28 +824,28 @@ void XcuParser::handleSetNode(xmlreader::XmlReader & reader, SetNode * set) {
         if (!reader.nextAttribute(&attrNsId, &attrLn)) {
             break;
         }
-        if (attrNsId == ParseManager::NAMESPACE_OOR && attrLn.equals("name")) {
+        if (attrNsId == ParseManager::NAMESPACE_OOR && attrLn == "name") {
             hasName = true;
             name = reader.getAttributeValue(false).convertFromUtf8();
         } else if (attrNsId == ParseManager::NAMESPACE_OOR &&
-                   attrLn.equals("component"))
+                   attrLn == "component")
         {
             component = reader.getAttributeValue(false).convertFromUtf8();
         } else if (attrNsId == ParseManager::NAMESPACE_OOR &&
-                   attrLn.equals("node-type"))
+                   attrLn == "node-type")
         {
             hasNodeType = true;
             nodeType = reader.getAttributeValue(false).convertFromUtf8();
         } else if (attrNsId == ParseManager::NAMESPACE_OOR &&
-                   attrLn.equals("op"))
+                   attrLn == "op")
         {
             op = parseOperation(reader.getAttributeValue(true));
         } else if (attrNsId == ParseManager::NAMESPACE_OOR &&
-                   attrLn.equals("finalized"))
+                   attrLn == "finalized")
         {
             finalized = xmldata::parseBoolean(reader.getAttributeValue(true));
         } else if (attrNsId == ParseManager::NAMESPACE_OOR &&
-                   attrLn.equals("mandatory"))
+                   attrLn == "mandatory")
         {
             mandatory = xmldata::parseBoolean(reader.getAttributeValue(true));
         }
diff --git a/configmgr/source/xmldata.cxx b/configmgr/source/xmldata.cxx
index 6323f5d65b86..e919d08e7824 100644
--- a/configmgr/source/xmldata.cxx
+++ b/configmgr/source/xmldata.cxx
@@ -43,82 +43,55 @@ Type parseType(
     assert(text.is());
     sal_Int32 i = rtl_str_indexOfChar_WithLength(text.begin, text.length, ':');
     if (i >= 0) {
+        xmlreader::Span token(text.begin + i + 1, text.length - (i + 1));
         switch (reader.getNamespaceId(xmlreader::Span(text.begin, i))) {
         case ParseManager::NAMESPACE_OOR:
-            if (xmlreader::Span(text.begin + i + 1, text.length - (i + 1)).
-                equals("any"))
+            if (token == "any")
             {
                 return TYPE_ANY;
-            } else if (xmlreader::Span(
-                           text.begin + i + 1, text.length - (i + 1)).
-                       equals("boolean-list"))
+            } else if (token == "boolean-list")
             {
                 return TYPE_BOOLEAN_LIST;
-            } else if (xmlreader::Span(
-                           text.begin + i + 1, text.length - (i + 1)).
-                       equals("short-list"))
+            } else if (token == "short-list")
             {
                 return TYPE_SHORT_LIST;
-            } else if (xmlreader::Span(
-                           text.begin + i + 1, text.length - (i + 1)).
-                       equals("int-list"))
+            } else if (token == "int-list")
             {
                 return TYPE_INT_LIST;
-            } else if (xmlreader::Span(
-                           text.begin + i + 1, text.length - (i + 1)).
-                       equals("long-list"))
+            } else if (token == "long-list")
             {
                 return TYPE_LONG_LIST;
-            } else if (xmlreader::Span(
-                           text.begin + i + 1, text.length - (i + 1)).
-                       equals("double-list"))
+            } else if (token == "double-list")
             {
                 return TYPE_DOUBLE_LIST;
-            } else if (xmlreader::Span(
-                           text.begin + i + 1, text.length - (i + 1)).
-                       equals("string-list"))
+            } else if (token == "string-list")
             {
                 return TYPE_STRING_LIST;
-            } else if (xmlreader::Span(
-                           text.begin + i + 1, text.length - (i + 1)).
-                       equals("hexBinary-list"))
+            } else if (token == "hexBinary-list")
             {
                 return TYPE_HEXBINARY_LIST;
             }
             break;
         case ParseManager::NAMESPACE_XS:
-            if (xmlreader::Span(text.begin + i + 1, text.length - (i + 1)).
-                equals("boolean"))
+            if (token == "boolean")
             {
                 return TYPE_BOOLEAN;
-            } else if (xmlreader::Span(
-                           text.begin + i + 1, text.length - (i + 1)).
-                       equals("short"))
+            } else if (token =="short")
             {
                 return TYPE_SHORT;
-            } else if (xmlreader::Span(
-                           text.begin + i + 1, text.length - (i + 1)).
-                       equals("int"))
+            } else if (token =="int")
             {
                 return TYPE_INT;
-            } else if (xmlreader::Span(
-                           text.begin + i + 1, text.length - (i + 1)).
-                       equals("long"))
+            } else if (token =="long")
             {
                 return TYPE_LONG;
-            } else if (xmlreader::Span(
-                           text.begin + i + 1, text.length - (i + 1)).
-                       equals("double"))
+            } else if (token =="double")
             {
                 return TYPE_DOUBLE;
-            } else if (xmlreader::Span(
-                           text.begin + i + 1, text.length - (i + 1)).
-                       equals("string"))
+            } else if (token =="string")
             {
                 return TYPE_STRING;
-            } else if (xmlreader::Span(
-                           text.begin + i + 1, text.length - (i + 1)).
-                       equals("hexBinary"))
+            } else if (token =="hexBinary")
             {
                 return TYPE_HEXBINARY;
             }
@@ -133,10 +106,10 @@ Type parseType(
 
 bool parseBoolean(xmlreader::Span const & text) {
     assert(text.is());
-    if (text.equals("true")) {
+    if (text == "true") {
         return true;
     }
-    if (text.equals("false")) {
+    if (text == "false") {
         return false;
     }
     throw css::uno::RuntimeException(
diff --git a/include/xmlreader/span.hxx b/include/xmlreader/span.hxx
index db0ed229bcd9..038241ef1133 100644
--- a/include/xmlreader/span.hxx
+++ b/include/xmlreader/span.hxx
@@ -23,6 +23,7 @@
 #include <sal/config.h>
 
 #include <cstddef>
+#include <cstring>
 
 #include <sal/types.h>
 #include <rtl/string.h>
@@ -50,21 +51,29 @@ struct SAL_WARN_UNUSED OOO_DLLPUBLIC_XMLREADER Span {
 
     bool is() const { return begin != nullptr; }
 
-    bool equals(Span const & text) const {
+    bool operator==(Span const & text) const {
         return length == text.length
-            && (rtl_str_compare_WithLength(
-                    begin, length, text.begin, text.length)
-                == 0);
+            && memcmp(begin, text.begin, text.length) == 0;
+    }
+
+    bool operator!=(Span const & text) const {
+        return !(operator==(text));
     }
 
     bool equals(char const * textBegin, sal_Int32 textLength) const {
-        return equals(Span(textBegin, textLength));
+        return operator==(Span(textBegin, textLength));
+    }
+
+    template< std::size_t N > bool operator==(char const (& literal)[N])
+        const
+    {
+        return operator==(Span(literal, N - 1));
     }
 
-    template< std::size_t N > bool equals(char const (& literal)[N])
+    template< std::size_t N > bool operator!=(char const (& literal)[N])
         const
     {
-        return equals(Span(literal, N - 1));
+        return operator!=(Span(literal, N - 1));
     }
 
     rtl::OUString convertFromUtf8() const;
diff --git a/sw/source/uibase/envelp/labelcfg.cxx b/sw/source/uibase/envelp/labelcfg.cxx
index 12aedd4c30b3..29585f463fda 100644
--- a/sw/source/uibase/envelp/labelcfg.cxx
+++ b/sw/source/uibase/envelp/labelcfg.cxx
@@ -54,7 +54,7 @@ static 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 == span);
     res = reader.nextItem(xmlreader::XmlReader::Text::Raw, &name, &nsId);
     assert(res == xmlreader::XmlReader::Result::Text);
     (void) res; (void) span;
@@ -92,7 +92,7 @@ SwLabelConfig::SwLabelConfig() :
             xmlreader::XmlReader::Text::NONE, &name, &nsId);
     assert(
         res == xmlreader::XmlReader::Result::Begin
-        && name.equals("manufacturers"));
+        && name == "manufacturers");
     res = reader.nextItem(
             xmlreader::XmlReader::Text::NONE, &name, &nsId);
     while (res != xmlreader::XmlReader::Result::End)
@@ -100,12 +100,12 @@ SwLabelConfig::SwLabelConfig() :
         // Opening manufacturer
         assert(
             res == xmlreader::XmlReader::Result::Begin
-            && name.equals("manufacturer"));
+            && name == "manufacturer");
         // Get the name
         (void)reader.nextAttribute(&nsId, &name);
         assert(
             nsId == xmlreader::XmlReader::NAMESPACE_NONE
-            && name.equals("name"));
+            && name == "name");
         sManufacturer = reader.getAttributeValue(false).convertFromUtf8();
 
         for(;;) {
@@ -116,7 +116,7 @@ SwLabelConfig::SwLabelConfig() :
                 break;
             assert(
                 res == xmlreader::XmlReader::Result::Begin
-                && name.equals("label"));
+                && name == "label");
             // Get name value
             sName = lcl_getValue(reader, xmlreader::Span("name"));
             // Get measure value
diff --git a/vcl/opengl/win/blocklist_parser.cxx b/vcl/opengl/win/blocklist_parser.cxx
index d7dd5de26258..79e49f540028 100644
--- a/vcl/opengl/win/blocklist_parser.cxx
+++ b/vcl/opengl/win/blocklist_parser.cxx
@@ -162,16 +162,16 @@ void handleDevices(wgl::DriverInfo& rDriver, xmlreader::XmlReader& rReader)
             if (nLevel > 2)
                 throw InvalidFileException();
 
-            if (name.equals("msg"))
+            if (name == "msg")
             {
                 bInMsg = true;
             }
-            else if (name.equals("device"))
+            else if (name == "device")
             {
                 int nsIdDeveice;
                 while (rReader.nextAttribute(&nsIdDeveice, &name))
                 {
-                    if (name.equals("id"))
+                    if (name == "id")
                     {
                         name = rReader.getAttributeValue(false);
                         OString aDeviceId(name.begin, name.length);
@@ -222,37 +222,37 @@ void WinBlocklistParser::handleEntry(wgl::DriverInfo& rDriver, xmlreader::XmlRea
 
     while (rReader.nextAttribute(&nsId, &name))
     {
-        if (name.equals("os"))
+        if (name == "os")
         {
             name = rReader.getAttributeValue(false);
             OString sOS(name.begin, name.length);
             rDriver.meOperatingSystem = getOperatingSystem(sOS);
         }
-        else if (name.equals("vendor"))
+        else if (name == "vendor")
         {
             name = rReader.getAttributeValue(false);
             OString sVendor(name.begin, name.length);
             rDriver.maAdapterVendor = getVendor(sVendor);
         }
-        else if (name.equals("compare"))
+        else if (name == "compare")
         {
             name = rReader.getAttributeValue(false);
             OString sCompare(name.begin, name.length);
             rDriver.meComparisonOp = getComparison(sCompare);
         }
-        else if (name.equals("version"))
+        else if (name == "version")
         {
             name = rReader.getAttributeValue(false);
             OString sVersion(name.begin, name.length);
             rDriver.mnDriverVersion = getVersion(sVersion);
         }
-        else if (name.equals("minVersion"))
+        else if (name == "minVersion")
         {
             name = rReader.getAttributeValue(false);
             OString sMinVersion(name.begin, name.length);
             rDriver.mnDriverVersion = getVersion(sMinVersion);
         }
-        else if (name.equals("maxVersion"))
+        else if (name == "maxVersion")
         {
             name = rReader.getAttributeValue(false);
             OString sMaxVersion(name.begin, name.length);
@@ -280,13 +280,13 @@ void WinBlocklistParser::handleList(xmlreader::XmlReader& rReader)
 
         if (res == xmlreader::XmlReader::Result::Begin)
         {
-            if (name.equals("entry"))
+            if (name == "entry")
             {
                 wgl::DriverInfo aDriver;
                 handleEntry(aDriver, rReader);
                 mrDriverList.push_back(aDriver);
             }
-            else if (name.equals("entryRange"))
+            else if (name == "entryRange")
             {
                 wgl::DriverInfo aDriver;
                 handleEntry(aDriver, rReader);
@@ -316,17 +316,17 @@ void WinBlocklistParser::handleContent(xmlreader::XmlReader& rReader)
 
         if (res == xmlreader::XmlReader::Result::Begin)
         {
-            if (name.equals("whitelist"))
+            if (name == "whitelist")
             {
                 meBlockType = BlockType::WHITELIST;
                 handleList(rReader);
             }
-            else if (name.equals("blacklist"))
+            else if (name == "blacklist")
             {
                 meBlockType = BlockType::BLACKLIST;
                 handleList(rReader);
             }
-            else if (name.equals("root"))
+            else if (name == "root")
             {
             }
             else
@@ -336,9 +336,7 @@ void WinBlocklistParser::handleContent(xmlreader::XmlReader& rReader)
         }
         else if (res == xmlreader::XmlReader::Result::End)
         {
-            if (name.equals("whitelist")
-                    ||
-                    name.equals("blacklist"))
+            if (name == "whitelist" || name == "blacklist")
             {
                 meBlockType = BlockType::UNKNOWN;
             }
diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx
index 79d698045d91..87b6a740502f 100644
--- a/vcl/source/window/builder.cxx
+++ b/vcl/source/window/builder.cxx
@@ -2711,11 +2711,11 @@ void VclBuilder::handleTabChild(vcl::Window *pParent, xmlreader::XmlReader &read
         if (res == xmlreader::XmlReader::Result::Begin)
         {
             ++nLevel;
-            if (name.equals("object"))
+            if (name == "object")
             {
                 while (reader.nextAttribute(&nsId, &name))
                 {
-                    if (name.equals("id"))
+                    if (name == "id")
                     {
                         name = reader.getAttributeValue(false);
                         OString sID(name.begin, name.length);
@@ -2730,13 +2730,13 @@ void VclBuilder::handleTabChild(vcl::Window *pParent, xmlreader::XmlReader &read
                     }
                 }
             }
-            else if (name.equals("style"))
+            else if (name == "style")
             {
                 int nPriority = 0;
                 context = handleStyle(reader, nPriority);
                 --nLevel;
             }
-            else if (name.equals("property"))
+            else if (name == "property")
                 collectProperty(reader, aProperties);
         }
 
@@ -2865,12 +2865,12 @@ void VclBuilder::handleChild(vcl::Window *pParent, xmlreader::XmlReader &reader)
 
     while (reader.nextAttribute(&nsId, &name))
     {
-        if (name.equals("type"))
+        if (name == "type")
         {
             name = reader.getAttributeValue(false);
             sType = OString(name.begin, name.length);
         }
-        else if (name.equals("internal-child"))
+        else if (name == "internal-child")
         {
             name = reader.getAttributeValue(false);
             sInternalChild = OString(name.begin, name.length);
@@ -2891,7 +2891,7 @@ void VclBuilder::handleChild(vcl::Window *pParent, xmlreader::XmlReader &reader)
 
         if (res == xmlreader::XmlReader::Result::Begin)
         {
-            if (name.equals("object") || name.equals("placeholder"))
+            if (name == "object" || name == "placeholder")
             {
                 pCurrentChild = handleObject(pParent, reader).get();
 
@@ -2960,15 +2960,15 @@ void VclBuilder::handleChild(vcl::Window *pParent, xmlreader::XmlReader &reader)
                     }
                 }
             }
-            else if (name.equals("packing"))
+            else if (name == "packing")
             {
                 handlePacking(pCurrentChild, pParent, reader);
             }
-            else if (name.equals("interface"))
+            else if (name == "interface")
             {
                 while (reader.nextAttribute(&nsId, &name))
                 {
-                    if (name.equals("domain"))
+                    if (name == "domain")
                     {
                         name = reader.getAttributeValue(false);
                         sType = OString(name.begin, name.length);
@@ -3002,12 +3002,12 @@ void VclBuilder::collectPangoAttribute(xmlreader::XmlReader &reader, stringmap &
 
     while (reader.nextAttribute(&nsId, &span))
     {
-        if (span.equals("name"))
+        if (span == "name")
         {
             span = reader.getAttributeValue(false);
             sProperty = OString(span.begin, span.length);
         }
-        else if (span.equals("value"))
+        else if (span == "value")
         {
             span = reader.getAttributeValue(false);
             sValue = OString(span.begin, span.length);
@@ -3028,12 +3028,12 @@ void VclBuilder::collectAtkRelationAttribute(xmlreader::XmlReader &reader, strin
 
     while (reader.nextAttribute(&nsId, &span))
     {
-        if (span.equals("type"))
+        if (span == "type")
         {
             span = reader.getAttributeValue(false);
             sProperty = OString(span.begin, span.length);
         }
-        else if (span.equals("target"))
+        else if (span == "target")
         {
             span = reader.getAttributeValue(false);
             sValue = OString(span.begin, span.length);
@@ -3056,7 +3056,7 @@ void VclBuilder::collectAtkRoleAttribute(xmlreader::XmlReader &reader, stringmap
 
     while (reader.nextAttribute(&nsId, &span))
     {
-        if (span.equals("type"))
+        if (span == "type")
         {
             span = reader.getAttributeValue(false);
             sProperty = OString(span.begin, span.length);
@@ -3087,7 +3087,7 @@ void VclBuilder::handleRow(xmlreader::XmlReader &reader, const OString &rID)
         if (res == xmlreader::XmlReader::Result::Begin)
         {
             ++nLevel;
-            if (name.equals("col"))
+            if (name == "col")
             {
                 bool bTranslated = false;
                 sal_uInt32 nId = 0;
@@ -3095,16 +3095,16 @@ void VclBuilder::handleRow(xmlreader::XmlReader &reader, const OString &rID)
 
                 while (reader.nextAttribute(&nsId, &name))
                 {
-                    if (name.equals("id"))
+                    if (name == "id")
                     {
                         name = reader.getAttributeValue(false);
                         nId = OString(name.begin, name.length).toInt32();
                     }
-                    else if (nId == 0 && name.equals("translatable") && reader.getAttributeValue(false).equals("yes"))
+                    else if (nId == 0 && name == "translatable" && reader.getAttributeValue(false) == "yes")
                     {
                         bTranslated = true;
                     }
-                    else if (name.equals("context"))
+                    else if (name == "context")
                     {
                         name = reader.getAttributeValue(false);
                         sContext = OString(name.begin, name.length);
@@ -3161,7 +3161,7 @@ void VclBuilder::handleListStore(xmlreader::XmlReader &reader, const OString &rI
 
         if (res == xmlreader::XmlReader::Result::Begin)
         {
-            if (name.equals("row"))
+            if (name == "row")
             {
                 bool bNotTreeStore = rClass != "GtkTreeStore";
                 if (bNotTreeStore)
@@ -3204,7 +3204,7 @@ void VclBuilder::handleAtkObject(xmlreader::XmlReader &reader, vcl::Window *pWin
         if (res == xmlreader::XmlReader::Result::Begin)
         {
             ++nLevel;
-            if (name.equals("property"))
+            if (name == "property")
                 collectProperty(reader, aProperties);
         }
 
@@ -3249,23 +3249,23 @@ std::vector<ComboBoxTextItem> VclBuilder::handleItems(xmlreader::XmlReader &read
         if (res == xmlreader::XmlReader::Result::Begin)
         {
             ++nLevel;
-            if (name.equals("item"))
+            if (name == "item")
             {
                 bool bTranslated = false;
                 OString sContext, sId;
 
                 while (reader.nextAttribute(&nsId, &name))
                 {
-                    if (name.equals("translatable") && reader.getAttributeValue(false).equals("yes"))
+                    if (name == "translatable" && reader.getAttributeValue(false) == "yes")
                     {
                         bTranslated = true;
                     }
-                    else if (name.equals("context"))
+                    else if (name == "context")
                     {
                         name = reader.getAttributeValue(false);
                         sContext = OString(name.begin, name.length);
                     }
-                    else if (name.equals("id"))
+                    else if (name == "id")
                     {
                         name = reader.getAttributeValue(false);
                         sId = OString(name.begin, name.length);
@@ -3326,14 +3326,14 @@ void VclBuilder::handleMenu(xmlreader::XmlReader &reader, const OString &rID)
 
         if (res == xmlreader::XmlReader::Result::Begin)
         {
-            if (name.equals("child"))
+            if (name == "child")
             {
                 handleMenuChild(pCurrentMenu, reader);
             }
             else
             {
                 ++nLevel;
-                if (name.equals("property"))
+                if (name == "property")
                     collectProperty(reader, aProperties);
             }
         }
@@ -3363,7 +3363,7 @@ void VclBuilder::handleMenuChild(PopupMenu *pParent, xmlreader::XmlReader &reade
 
         if (res == xmlreader::XmlReader::Result::Begin)
         {
-            if (name.equals("object") || name.equals("placeholder"))
+            if (name == "object" || name == "placeholder")
             {
                 handleMenuObject(pParent, reader);
             }
@@ -3394,12 +3394,12 @@ void VclBuilder::handleMenuObject(PopupMenu *pParent, xmlreader::XmlReader &read
 
     while (reader.nextAttribute(&nsId, &name))
     {
-        if (name.equals("class"))
+        if (name == "class")
         {
             name = reader.getAttributeValue(false);
             sClass = OString(name.begin, name.length);
         }
-        else if (name.equals("id"))
+        else if (name == "id")
         {
             name = reader.getAttributeValue(false);
             sID = OString(name.begin, name.length);
@@ -3430,7 +3430,7 @@ void VclBuilder::handleMenuObject(PopupMenu *pParent, xmlreader::XmlReader &read
 
         if (res == xmlreader::XmlReader::Result::Begin)
         {
-            if (name.equals("child"))
+            if (name == "child")
             {
                 size_t nChildMenuIdx = m_aMenus.size();
                 handleChild(nullptr, reader);
@@ -3440,9 +3440,9 @@ void VclBuilder::handleMenuObject(PopupMenu *pParent, xmlreader::XmlReader &read
             else
             {
                 ++nLevel;
-                if (name.equals("property"))
+                if (name == "property")
                     collectProperty(reader, aProperties);
-                else if (name.equals("accelerator"))
+                else if (name == "accelerator")
                     collectAccelerator(reader, aAccelerators);
             }
         }
@@ -3480,11 +3480,11 @@ void VclBuilder::handleSizeGroup(xmlreader::XmlReader &reader)
         if (res == xmlreader::XmlReader::Result::Begin)
         {
             ++nLevel;
-            if (name.equals("widget"))
+            if (name == "widget")
             {
                 while (reader.nextAttribute(&nsId, &name))
                 {
-                    if (name.equals("name"))
+                    if (name == "name")
                     {
                         name = reader.getAttributeValue(false);
                         OString sWidget(name.begin, name.length);
@@ -3497,7 +3497,7 @@ void VclBuilder::handleSizeGroup(xmlreader::XmlReader &reader)
             }
             else
             {
-                if (name.equals("property"))
+                if (name == "property")
                     collectProperty(reader, rSizeGroup.m_aProperties);
             }
         }
@@ -3654,12 +3654,12 @@ VclPtr<vcl::Window> VclBuilder::handleObject(vcl::Window *pParent, xmlreader::Xm
 
     while (reader.nextAttribute(&nsId, &name))
     {
-        if (name.equals("class"))
+        if (name == "class")
         {
             name = reader.getAttributeValue(false);
             sClass = OString(name.begin, name.length);
         }
-        else if (name.equals("id"))
+        else if (name == "id")
         {
             name = reader.getAttributeValue(false);
             sID = OString(name.begin, name.length);
@@ -3713,7 +3713,7 @@ VclPtr<vcl::Window> VclBuilder::handleObject(vcl::Window *pParent, xmlreader::Xm
 
         if (res == xmlreader::XmlReader::Result::Begin)
         {
-            if (name.equals("child"))
+            if (name == "child")
             {
                 if (!pCurrentChild)
                 {
@@ -3722,9 +3722,9 @@ VclPtr<vcl::Window> VclBuilder::handleObject(vcl::Window *pParent, xmlreader::Xm
                 }
                 handleChild(pCurrentChild, reader);
             }
-            else if (name.equals("items"))
+            else if (name == "items")
                 aItems = handleItems(reader);
-            else if (name.equals("style"))
+            else if (name == "style")
             {
                 int nPriority = 0;
                 std::vector<vcl::EnumContext::Context> aContext = handleStyle(reader, nPriority);
@@ -3746,15 +3746,15 @@ VclPtr<vcl::Window> VclBuilder::handleObject(vcl::Window *pParent, xmlreader::Xm
             else
             {
                 ++nLevel;
-                if (name.equals("property"))
+                if (name == "property")
                     collectProperty(reader, aProperties);
-                else if (name.equals("attribute"))
+                else if (name == "attribute")
                     collectPangoAttribute(reader, aPangoAttributes);
-                else if (name.equals("relation"))
+                else if (name == "relation")
                     collectAtkRelationAttribute(reader, aAtkAttributes);
-                else if (name.equals("role"))
+                else if (name == "role")
                     collectAtkRoleAttribute(reader, aAtkAttributes);
-                else if (name.equals("action-widget"))
+                else if (name == "action-widget")
                     handleActionWidget(reader);
             }
         }
@@ -3813,7 +3813,7 @@ void VclBuilder::handlePacking(vcl::Window *pCurrent, vcl::Window *pParent, xmlr
         if (res == xmlreader::XmlReader::Result::Begin)
         {
             ++nLevel;
-            if (name.equals("property"))
+            if (name == "property")
                 applyPackingProperty(pCurrent, pParent, reader);
         }
 
@@ -3855,7 +3855,7 @@ void VclBuilder::applyPackingProperty(vcl::Window *pCurrent,
 
     while (reader.nextAttribute(&nsId, &name))
     {
-        if (name.equals("name"))
+        if (name == "name")
         {
             name = reader.getAttributeValue(false);
             OString sKey(name.begin, name.length);
@@ -3951,7 +3951,7 @@ std::vector<vcl::EnumContext::Context> VclBuilder::handleStyle(xmlreader::XmlRea
         if (res == xmlreader::XmlReader::Result::Begin)
         {
             ++nLevel;
-            if (name.equals("class"))
+            if (name == "class")
             {
                 OString classStyle = getStyleClass(reader);
 
@@ -3994,7 +3994,7 @@ OString VclBuilder::getStyleClass(xmlreader::XmlReader &reader)
 
     while (reader.nextAttribute(&nsId, &name))
     {
-        if (name.equals("name"))
+        if (name == "name")
         {
             name = reader.getAttributeValue(false);
             aRet = OString (name.begin, name.length);
@@ -4015,17 +4015,17 @@ void VclBuilder::collectProperty(xmlreader::XmlReader &reader, stringmap &rMap)
 
     while (reader.nextAttribute(&nsId, &name))
     {
-        if (name.equals("name"))
+        if (name == "name")
         {
             name = reader.getAttributeValue(false);
             sProperty = OString(name.begin, name.length);
         }
-        else if (name.equals("context"))
+        else if (name == "context")
         {
             name = reader.getAttributeValue(false);
             sContext = OString(name.begin, name.length);
         }
-        else if (name.equals("translatable") && reader.getAttributeValue(false).equals("yes"))
+        else if (name == "translatable" && reader.getAttributeValue(false) == "yes")
         {
             bTranslated = true;
         }
@@ -4061,7 +4061,7 @@ void VclBuilder::handleActionWidget(xmlreader::XmlReader &reader)
 
     while (reader.nextAttribute(&nsId, &name))
     {
-        if (name.equals("response"))
+        if (name == "response")
         {
             name = reader.getAttributeValue(false);
             sResponse = OString(name.begin, name.length);
@@ -4087,17 +4087,17 @@ void VclBuilder::collectAccelerator(xmlreader::XmlReader &reader, accelmap &rMap
 
     while (reader.nextAttribute(&nsId, &name))
     {
-        if (name.equals("key"))
+        if (name == "key")
         {
             name = reader.getAttributeValue(false);
             sValue = OString(name.begin, name.length);
         }
-        else if (name.equals("signal"))
+        else if (name == "signal")
         {
             name = reader.getAttributeValue(false);
             sProperty = OString(name.begin, name.length);
         }
-        else if (name.equals("modifiers"))
+        else if (name == "modifiers")
         {
             name = reader.getAttributeValue(false);
             sModifiers = OString(name.begin, name.length);
diff --git a/xmlreader/source/xmlreader.cxx b/xmlreader/source/xmlreader.cxx
index 229be044662c..0194f6c695a7 100644
--- a/xmlreader/source/xmlreader.cxx
+++ b/xmlreader/source/xmlreader.cxx
@@ -112,7 +112,7 @@ XmlReader::~XmlReader() {
 int XmlReader::registerNamespaceIri(Span const & iri) {
     int id = toNamespaceId(namespaceIris_.size());
     namespaceIris_.push_back(iri);
-    if (iri.equals("http://www.w3.org/2001/XMLSchema-instance")) {
+    if (iri == "http://www.w3.org/2001/XMLSchema-instance") {
         // Old user layer .xcu files used the xsi namespace prefix without
         // declaring a corresponding namespace binding, see issue 77174; reading
         // those files during migration would fail without this hack that can be
@@ -190,7 +190,7 @@ int XmlReader::getNamespaceId(Span const & prefix) const {
     }
 
     auto i = std::find_if(namespaces_.crbegin(), namespaces_.crend(),
-        [&prefix](const NamespaceData& rNamespaceData) { return prefix.equals(rNamespaceData.prefix); });
+        [&prefix](const NamespaceData& rNamespaceData) { return prefix == rNamespaceData.prefix; });
 
     if (i != namespaces_.rend())
     {
@@ -379,7 +379,7 @@ int XmlReader::scanNamespaceIri(char const * begin, char const * end) {
     assert(begin != nullptr && begin <= end);
     Span iri(handleAttributeValue(begin, end, false));
     for (NamespaceIris::size_type i = 0; i < namespaceIris_.size(); ++i) {
-        if (namespaceIris_[i].equals(iri)) {
+        if (namespaceIris_[i] == iri) {
             return toNamespaceId(i);
         }
     }
@@ -645,13 +645,13 @@ XmlReader::Result XmlReader::handleStartTag(int * nsId, Span * localName) {
         char const * valueEnd = pos_ + i;
         pos_ += i + 1;
         if (attrNameColon == nullptr &&
-            Span(attrNameBegin, attrNameEnd - attrNameBegin).equals("xmlns"))
+            Span(attrNameBegin, attrNameEnd - attrNameBegin) == "xmlns")
         {
             hasDefaultNs = true;
             defaultNsId = scanNamespaceIri(valueBegin, valueEnd);
         } else if (attrNameColon != nullptr &&
-                   Span(attrNameBegin, attrNameColon - attrNameBegin).equals(
-                       "xmlns"))
+                   Span(attrNameBegin, attrNameColon - attrNameBegin) ==
+                       "xmlns")
         {
             namespaces_.emplace_back(
                     Span(attrNameColon + 1, attrNameEnd - (attrNameColon + 1)),


More information about the Libreoffice-commits mailing list