summaryrefslogtreecommitdiff
path: root/writerperfect/source
diff options
context:
space:
mode:
authorNoel <noelgrandin@gmail.com>2020-11-25 08:14:07 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-11-30 12:32:14 +0100
commit8332d6d8200e8ca1f22dd98d9373efd5a431d09c (patch)
treedd45d452202998297b8562743ea6345462304d04 /writerperfect/source
parentd05a4cfbdcece491f7385dbeaa7eca03f2fdc1d5 (diff)
loplugin:stringviewparam include comparisons with string literals
Change-Id: I8ba1214500dddaf413c506a4b82f43d63cda804b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106559 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'writerperfect/source')
-rw-r--r--writerperfect/source/writer/exp/xmlimp.cxx4
-rw-r--r--writerperfect/source/writer/exp/xmlimp.hxx2
-rw-r--r--writerperfect/source/writer/exp/xmltext.cxx12
-rw-r--r--writerperfect/source/writer/exp/xmltext.hxx4
4 files changed, 11 insertions, 11 deletions
diff --git a/writerperfect/source/writer/exp/xmlimp.cxx b/writerperfect/source/writer/exp/xmlimp.cxx
index 5f22f372b9ad..33870c026e78 100644
--- a/writerperfect/source/writer/exp/xmlimp.cxx
+++ b/writerperfect/source/writer/exp/xmlimp.cxx
@@ -451,10 +451,10 @@ const uno::Reference<uno::XComponentContext>& XMLImport::GetComponentContext() c
}
rtl::Reference<XMLImportContext>
-XMLImport::CreateContext(const OUString& rName,
+XMLImport::CreateContext(std::u16string_view rName,
const uno::Reference<xml::sax::XAttributeList>& /*xAttribs*/)
{
- if (rName == "office:document")
+ if (rName == u"office:document")
return new XMLOfficeDocContext(*this);
return nullptr;
}
diff --git a/writerperfect/source/writer/exp/xmlimp.hxx b/writerperfect/source/writer/exp/xmlimp.hxx
index 85cec8506819..7c689d30c65f 100644
--- a/writerperfect/source/writer/exp/xmlimp.hxx
+++ b/writerperfect/source/writer/exp/xmlimp.hxx
@@ -102,7 +102,7 @@ public:
const std::vector<FixedLayoutPage>& rPageMetafiles);
rtl::Reference<XMLImportContext>
- CreateContext(const OUString& rName,
+ CreateContext(std::u16string_view rName,
const css::uno::Reference<css::xml::sax::XAttributeList>& xAttribs);
librevenge::RVNGTextInterface& GetGenerator() const;
diff --git a/writerperfect/source/writer/exp/xmltext.cxx b/writerperfect/source/writer/exp/xmltext.cxx
index 01e185c4391c..933cf43e1880 100644
--- a/writerperfect/source/writer/exp/xmltext.cxx
+++ b/writerperfect/source/writer/exp/xmltext.cxx
@@ -36,16 +36,16 @@ rtl::Reference<XMLImportContext> XMLBodyContentContext::CreateChildContext(
return CreateTextChildContext(GetImport(), rName, true);
}
-rtl::Reference<XMLImportContext> CreateTextChildContext(XMLImport& rImport, const OUString& rName,
- bool bTopLevel)
+rtl::Reference<XMLImportContext> CreateTextChildContext(XMLImport& rImport,
+ std::u16string_view rName, bool bTopLevel)
{
- if (rName == "text:p" || rName == "text:h")
+ if (rName == u"text:p" || rName == u"text:h")
return new XMLParaContext(rImport, bTopLevel);
- if (rName == "text:section")
+ if (rName == u"text:section")
return new XMLSectionContext(rImport);
- if (rName == "table:table")
+ if (rName == u"table:table")
return new XMLTableContext(rImport, bTopLevel);
- if (rName == "text:list")
+ if (rName == u"text:list")
return new XMLTextListContext(rImport);
return nullptr;
}
diff --git a/writerperfect/source/writer/exp/xmltext.hxx b/writerperfect/source/writer/exp/xmltext.hxx
index 2a7ef2654637..1d91fbbb05fe 100644
--- a/writerperfect/source/writer/exp/xmltext.hxx
+++ b/writerperfect/source/writer/exp/xmltext.hxx
@@ -27,8 +27,8 @@ public:
};
/// Context factory for body text, section, table cell, etc.
-rtl::Reference<XMLImportContext> CreateTextChildContext(XMLImport& rImport, const OUString& rName,
- bool bTopLevel = false);
+rtl::Reference<XMLImportContext>
+CreateTextChildContext(XMLImport& rImport, std::u16string_view rName, bool bTopLevel = false);
} // namespace writerperfect::exp