compilerplugins/clang/stringviewparam.cxx                |   54 ++++++++++-----
 compilerplugins/clang/test/stringviewparam.cxx           |   10 ++
 connectivity/source/commontools/dbtools.cxx              |    6 -
 dbaccess/source/ui/inc/RelationController.hxx            |    4 -
 dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx    |   10 +-
 dbaccess/source/ui/querydesign/SelectionBrowseBox.hxx    |    6 +
 dbaccess/source/ui/relationdesign/RelationController.cxx |    2 
 include/comphelper/stl_types.hxx                         |    3 
 include/connectivity/CommonTools.hxx                     |    7 +
 include/xmloff/numehelp.hxx                              |    5 -
 reportdesign/source/filter/xml/xmlExport.cxx             |    2 
 xmloff/inc/txtflde.hxx                                   |    8 +-
 xmloff/inc/txtlists.hxx                                  |    3 
 xmloff/source/style/numehelp.cxx                         |    4 -
 xmloff/source/text/txtflde.cxx                           |   30 ++++----
 xmloff/source/text/txtlists.cxx                          |    2 
 16 files changed, 97 insertions(+), 59 deletions(-)

New commits:
commit df810a82058a07dd8b1c2268955d64328e53cf97
Author:     Stephan Bergmann <sberg...@redhat.com>
AuthorDate: Wed Dec 9 22:42:32 2020 +0100
Commit:     Stephan Bergmann <sberg...@redhat.com>
CommitDate: Wed Dec 9 23:31:17 2020 +0100

    Fix loplugin:stringviewparam handling of comparison operators
    
    Change-Id: I58456efb9588b544d998ac6a4c27d55457280742
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107510
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <sberg...@redhat.com>

diff --git a/compilerplugins/clang/stringviewparam.cxx 
b/compilerplugins/clang/stringviewparam.cxx
index 365b2cf2a8a5..1e4e71c2d801 100644
--- a/compilerplugins/clang/stringviewparam.cxx
+++ b/compilerplugins/clang/stringviewparam.cxx
@@ -161,28 +161,37 @@ DeclRefExpr const* 
relevantCXXMemberCallExpr(CXXMemberCallExpr const* expr)
     return relevantDeclRefExpr(expr->getImplicitObjectArgument());
 }
 
-DeclRefExpr const* relevantCXXOperatorCallExpr(CXXOperatorCallExpr const* expr)
+SmallVector<DeclRefExpr const*, 2> wrap(DeclRefExpr const* expr)
+{
+    if (expr == nullptr)
+    {
+        return {};
+    }
+    return { expr };
+}
+
+SmallVector<DeclRefExpr const*, 2> 
relevantCXXOperatorCallExpr(CXXOperatorCallExpr const* expr)
 {
     if (expr->getOperator() == OO_Subscript)
     {
         auto const e = expr->getArg(0);
         if (relevantStringType(e->getType()) == StringType::None)
         {
-            return nullptr;
+            return {};
         }
-        return relevantDeclRefExpr(e);
+        return wrap(relevantDeclRefExpr(e));
     }
     else if (compat::isComparisonOp(expr))
     {
         auto arg0 = compat::IgnoreImplicit(expr->getArg(0));
         if (isa<clang::StringLiteral>(arg0))
         {
-            return relevantDeclRefExpr(expr->getArg(1));
+            return wrap(relevantDeclRefExpr(expr->getArg(1)));
         }
         auto arg1 = compat::IgnoreImplicit(expr->getArg(1));
         if (isa<clang::StringLiteral>(arg1))
         {
-            return relevantDeclRefExpr(expr->getArg(0));
+            return wrap(relevantDeclRefExpr(arg0));
         }
 
         // TODO Can't currently convert rtl::OString because we end up with 
ambiguous operator==
@@ -191,21 +200,27 @@ DeclRefExpr const* 
relevantCXXOperatorCallExpr(CXXOperatorCallExpr const* expr)
         auto st2 = relevantStringType(arg1->getType());
         if (st1 == StringType::RtlOustring && st2 == StringType::RtlOustring)
         {
-            auto e1 = relevantDeclRefExpr(expr->getArg(0));
-            if (e1)
-                return e1;
-            return relevantDeclRefExpr(expr->getArg(1));
+            SmallVector<DeclRefExpr const*, 2> v;
+            if (auto const e = relevantDeclRefExpr(arg0))
+            {
+                v.push_back(e);
+            }
+            if (auto const e = relevantDeclRefExpr(arg1))
+            {
+                v.push_back(e);
+            }
+            return v;
         }
-        if (st1 == StringType::RtlOustring && 
isStringView(expr->getArg(1)->getType()))
+        if (st1 == StringType::RtlOustring && isStringView(arg1->getType()))
         {
-            return relevantDeclRefExpr(expr->getArg(0));
+            return wrap(relevantDeclRefExpr(arg0));
         }
-        if (st2 == StringType::RtlOustring && 
isStringView(expr->getArg(0)->getType()))
+        if (st2 == StringType::RtlOustring && isStringView(arg0->getType()))
         {
-            return relevantDeclRefExpr(expr->getArg(1));
+            return wrap(relevantDeclRefExpr(arg1));
         }
     }
-    return nullptr;
+    return {};
 }
 
 class StringViewParam final
@@ -381,14 +396,17 @@ public:
         {
             return true;
         }
-        auto const e = relevantCXXOperatorCallExpr(expr);
-        if (e == nullptr)
+        auto const es = relevantCXXOperatorCallExpr(expr);
+        if (es.empty())
         {
             return FunctionAddress::TraverseCXXOperatorCallExpr(expr);
         }
-        currentGoodUses_.insert(e);
+        currentGoodUses_.insert(es.begin(), es.end());
         auto const ret = FunctionAddress::TraverseCXXOperatorCallExpr(expr);
-        currentGoodUses_.erase(e);
+        for (auto const i : es)
+        {
+            currentGoodUses_.erase(i);
+        }
         return ret;
     }
 
diff --git a/compilerplugins/clang/test/stringviewparam.cxx 
b/compilerplugins/clang/test/stringviewparam.cxx
index a9269dff3891..56fadbea71cf 100644
--- a/compilerplugins/clang/test/stringviewparam.cxx
+++ b/compilerplugins/clang/test/stringviewparam.cxx
@@ -50,8 +50,14 @@ template <> void f5<OUString>(OUString const&) {}
 
 void f6([[maybe_unused]] OUString const&) {}
 
-// expected-error@+1 {{replace function parameter of type 'const rtl::OUString 
&' with 'std::u16string_view' [loplugin:stringviewparam]}}
-bool f7(const OUString& p1, OUString p2) { return p1 == p2; }
+bool f7(
+    // expected-error@+1 {{replace function parameter of type 'const 
rtl::OUString &' with 'std::u16string_view' [loplugin:stringviewparam]}}
+    const OUString& p1,
+    // expected-error@+1 {{replace function parameter of type 'const 
rtl::OUString &' with 'std::u16string_view' [loplugin:stringviewparam]}}
+    const OUString& p2)
+{
+    return p1 == p2;
+}
 // expected-error@+1 {{replace function parameter of type 'const rtl::OUString 
&' with 'std::u16string_view' [loplugin:stringviewparam]}}
 bool f8(const OUString& p1, std::u16string_view p2) { return p1 == p2; }
 
diff --git a/connectivity/source/commontools/dbtools.cxx 
b/connectivity/source/commontools/dbtools.cxx
index d8ce3f42136e..f96e66e62c7e 100644
--- a/connectivity/source/commontools/dbtools.cxx
+++ b/connectivity/source/commontools/dbtools.cxx
@@ -1964,7 +1964,7 @@ void checkDisposed(bool _bThrow)
 
 OSQLColumns::const_iterator find(const OSQLColumns::const_iterator& first,
                                         const OSQLColumns::const_iterator& 
last,
-                                        const OUString& _rVal,
+                                        std::u16string_view _rVal,
                                         const ::comphelper::UStringMixEqual& 
_rCase)
 {
     OUString sName = 
OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_NAME);
@@ -1973,7 +1973,7 @@ OSQLColumns::const_iterator find(const 
OSQLColumns::const_iterator& first,
 
 OSQLColumns::const_iterator findRealName(const OSQLColumns::const_iterator& 
first,
                                         const OSQLColumns::const_iterator& 
last,
-                                        const OUString& _rVal,
+                                        std::u16string_view _rVal,
                                         const ::comphelper::UStringMixEqual& 
_rCase)
 {
     OUString sRealName = 
OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_REALNAME);
@@ -1983,7 +1983,7 @@ OSQLColumns::const_iterator findRealName(const 
OSQLColumns::const_iterator& firs
 OSQLColumns::const_iterator find(OSQLColumns::const_iterator first,
                                         const OSQLColumns::const_iterator& 
last,
                                         const OUString& _rProp,
-                                        const OUString& _rVal,
+                                        std::u16string_view _rVal,
                                         const ::comphelper::UStringMixEqual& 
_rCase)
 {
     while (first != last && 
!_rCase(getString((*first)->getPropertyValue(_rProp)),_rVal))
diff --git a/dbaccess/source/ui/inc/RelationController.hxx 
b/dbaccess/source/ui/inc/RelationController.hxx
index ed3b2a8faf99..a457f38b8057 100644
--- a/dbaccess/source/ui/inc/RelationController.hxx
+++ b/dbaccess/source/ui/inc/RelationController.hxx
@@ -19,6 +19,8 @@
 #pragma once
 
 #include <memory>
+#include <string_view>
+
 #include "JoinController.hxx"
 
 namespace weld
@@ -43,7 +45,7 @@ namespace dbaui
         virtual void            Execute(sal_uInt16 nId, const 
css::uno::Sequence< css::beans::PropertyValue>& aArgs) override;
 
         void loadData();
-        TTableWindowData::value_type existsTable(const OUString& 
_rComposedTableName) const;
+        TTableWindowData::value_type existsTable(std::u16string_view 
_rComposedTableName) const;
 
         // load the window positions out of the datasource
         void loadLayoutInformation();
diff --git a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx 
b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
index 3429f9843c65..1bcb127d9ba6 100644
--- a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
+++ b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
@@ -17,6 +17,10 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
+#include <sal/config.h>
+
+#include <string_view>
+
 #include "SelectionBrowseBox.hxx"
 #include <com/sun/star/sdbc/XDatabaseMetaData.hpp>
 #include <com/sun/star/sdbc/DataType.hpp>
@@ -596,12 +600,12 @@ bool OSelectionBrowseBox::fillColumnRef(const 
OSQLParseNode* _pColumnRef, const
     return 
fillColumnRef(sColumnName,sTableRange,_rxConnection->getMetaData(),_pEntry,_bListAction);
 }
 
-bool OSelectionBrowseBox::fillColumnRef(const OUString& _sColumnName, const 
OUString& _sTableRange, const Reference<XDatabaseMetaData>& _xMetaData, 
OTableFieldDescRef const & _pEntry, bool& _bListAction)
+bool OSelectionBrowseBox::fillColumnRef(const OUString& _sColumnName, 
std::u16string_view _sTableRange, const Reference<XDatabaseMetaData>& 
_xMetaData, OTableFieldDescRef const & _pEntry, bool& _bListAction)
 {
     bool bError = false;
     ::comphelper::UStringMixEqual 
bCase(_xMetaData->supportsMixedCaseQuotedIdentifiers());
     // check if the table name is the same
-    if ( !_sTableRange.isEmpty() && (bCase(_pEntry->GetTable(),_sTableRange) 
|| bCase(_pEntry->GetAlias(),_sTableRange)) )
+    if ( !_sTableRange.empty() && (bCase(_pEntry->GetTable(),_sTableRange) || 
bCase(_pEntry->GetAlias(),_sTableRange)) )
     { // a table was already inserted and the tables contains that column name
 
         if ( !_pEntry->GetTabWindow() )
@@ -807,7 +811,7 @@ bool OSelectionBrowseBox::saveField(OUString& _sFieldName 
,OTableFieldDescRef co
                     if ( nFunCount == 4 && 
SQL_ISRULE(pColumnRef->getChild(3),column_ref) )
                         bError = fillColumnRef( pColumnRef->getChild(3), 
xConnection, aSelEntry, _bListAction );
                     else if ( nFunCount == 3 ) // we have a COUNT(*) here, so 
take the first table
-                        bError = fillColumnRef( "*", OUString(), xMetaData, 
aSelEntry, _bListAction );
+                        bError = fillColumnRef( "*", std::u16string_view(), 
xMetaData, aSelEntry, _bListAction );
                     else
                     {
                         nFunctionType |= FKT_NUMERIC;
diff --git a/dbaccess/source/ui/querydesign/SelectionBrowseBox.hxx 
b/dbaccess/source/ui/querydesign/SelectionBrowseBox.hxx
index c3cd5641d3e1..b156b721a421 100644
--- a/dbaccess/source/ui/querydesign/SelectionBrowseBox.hxx
+++ b/dbaccess/source/ui/querydesign/SelectionBrowseBox.hxx
@@ -18,6 +18,10 @@
  */
 #pragma once
 
+#include <sal/config.h>
+
+#include <string_view>
+
 #include <svtools/editbrowsebox.hxx>
 #include <TableFieldDescription.hxx>
 #include <TableWindowListBox.hxx>
@@ -268,7 +272,7 @@ namespace dbaui
                                         OTableFieldDescRef const & _pEntry,
                                         bool& _bListAction);
         bool            fillColumnRef(  const OUString& _sColumnName,
-                                        const OUString& _sTableRange,
+                                        std::u16string_view _sTableRange,
                                         const css::uno::Reference< 
css::sdbc::XDatabaseMetaData >& _xMetaData,
                                         OTableFieldDescRef const & _pEntry,
                                         bool& _bListAction);
diff --git a/dbaccess/source/ui/relationdesign/RelationController.cxx 
b/dbaccess/source/ui/relationdesign/RelationController.cxx
index e16054f6b768..0750a77a01df 100644
--- a/dbaccess/source/ui/relationdesign/RelationController.cxx
+++ b/dbaccess/source/ui/relationdesign/RelationController.cxx
@@ -492,7 +492,7 @@ void ORelationController::loadData()
     }
 }
 
-TTableWindowData::value_type ORelationController::existsTable(const OUString& 
_rComposedTableName)  const
+TTableWindowData::value_type 
ORelationController::existsTable(std::u16string_view _rComposedTableName)  const
 {
     ::comphelper::UStringMixEqual bCase(true);
     for (auto const& elem : m_vTableData)
diff --git a/include/comphelper/stl_types.hxx b/include/comphelper/stl_types.hxx
index 3b5a991eb4e3..891463253dc5 100644
--- a/include/comphelper/stl_types.hxx
+++ b/include/comphelper/stl_types.hxx
@@ -22,6 +22,7 @@
 #include <sal/config.h>
 
 #include <memory>
+#include <string_view>
 
 #include <rtl/ustring.hxx>
 #include <rtl/ustrbuf.hxx>
@@ -55,7 +56,7 @@ class UStringMixEqual
 
 public:
     UStringMixEqual(bool bCaseSensitive = 
true):m_bCaseSensitive(bCaseSensitive){}
-    bool operator() (const OUString& lhs, const OUString& rhs) const
+    bool operator() (const OUString& lhs, std::u16string_view rhs) const
     {
         return m_bCaseSensitive ? lhs == rhs : lhs.equalsIgnoreAsciiCase( rhs 
);
     }
diff --git a/include/connectivity/CommonTools.hxx 
b/include/connectivity/CommonTools.hxx
index 62e25b10d3f8..98f5a1c50f3b 100644
--- a/include/connectivity/CommonTools.hxx
+++ b/include/connectivity/CommonTools.hxx
@@ -23,6 +23,7 @@
 #include <config_java.h>
 
 #include <map>
+#include <string_view>
 
 #include <rtl/ref.hxx>
 #include <rtl/ustring.hxx>
@@ -98,7 +99,7 @@ namespace connectivity
     OOO_DLLPUBLIC_DBTOOLS
     OSQLColumns::const_iterator find(   const OSQLColumns::const_iterator& 
first,
                                         const OSQLColumns::const_iterator& 
last,
-                                        const OUString& _rVal,
+                                        std::u16string_view _rVal,
                                         const ::comphelper::UStringMixEqual& 
_rCase);
 
     // search from first to last the column with the realname _rVal
@@ -106,7 +107,7 @@ namespace connectivity
     OOO_DLLPUBLIC_DBTOOLS
     OSQLColumns::const_iterator findRealName(   const 
OSQLColumns::const_iterator& first,
                                                 const 
OSQLColumns::const_iterator& last,
-                                                const OUString& _rVal,
+                                                std::u16string_view _rVal,
                                                 const 
::comphelper::UStringMixEqual& _rCase);
 
     // the first two find methods are much faster than the one below
@@ -116,7 +117,7 @@ namespace connectivity
     OSQLColumns::const_iterator find(   OSQLColumns::const_iterator first,
                                         const OSQLColumns::const_iterator& 
last,
                                         const OUString& _rProp,
-                                        const OUString& _rVal,
+                                        std::u16string_view _rVal,
                                         const ::comphelper::UStringMixEqual& 
_rCase);
 
     /// @throws css::lang::DisposedException
diff --git a/include/xmloff/numehelp.hxx b/include/xmloff/numehelp.hxx
index cd976381a274..41d2ddaf29e4 100644
--- a/include/xmloff/numehelp.hxx
+++ b/include/xmloff/numehelp.hxx
@@ -27,6 +27,7 @@
 #include <com/sun/star/uno/Reference.hxx>
 
 #include <set>
+#include <string_view>
 
 namespace com::sun::star::util { class XNumberFormats; }
 namespace com::sun::star::util { class XNumberFormatsSupplier; }
@@ -91,7 +92,7 @@ public:
                                           bool bExportValue = true);
     static void SetNumberFormatAttributes(SvXMLExport& rXMLExport,
                                           const OUString& rValue,
-                                          const OUString& rCharacters,
+                                          std::u16string_view rCharacters,
                                           bool bExportValue,
                                           bool bExportTypeAttribute = true);
 
@@ -106,7 +107,7 @@ public:
                                           bool bExportValue = true,
                                           sal_uInt16 nNamespace = 
XML_NAMESPACE_OFFICE, bool bExportCurrencySymbol = true);
     void SetNumberFormatAttributes(const OUString& rValue,
-                                          const OUString& rCharacters,
+                                          std::u16string_view rCharacters,
                                           bool bExportValue = true,
                                           sal_uInt16 nNamespace = 
XML_NAMESPACE_OFFICE);
 };
diff --git a/reportdesign/source/filter/xml/xmlExport.cxx 
b/reportdesign/source/filter/xml/xmlExport.cxx
index e81e78375ad0..a830c173b74d 100644
--- a/reportdesign/source/filter/xml/xmlExport.cxx
+++ b/reportdesign/source/filter/xml/xmlExport.cxx
@@ -824,7 +824,7 @@ void ORptExport::exportContainer(const Reference< 
XSection>& _xSection)
                         if (!bIsStandard)
                         {
                             if ( nCellType == util::NumberFormat::TEXT )
-                                aHelper.SetNumberFormatAttributes("", "");
+                                aHelper.SetNumberFormatAttributes("", u"");
                             else
                                 aHelper.SetNumberFormatAttributes(nFormatKey, 
0.0, false);
                         }
diff --git a/xmloff/inc/txtflde.hxx b/xmloff/inc/txtflde.hxx
index 91d27690bd74..9ea45f66f24c 100644
--- a/xmloff/inc/txtflde.hxx
+++ b/xmloff/inc/txtflde.hxx
@@ -33,7 +33,7 @@
 #include <map>
 #include <set>
 #include <memory>
-
+#include <string_view>
 
 class SvXMLExport;
 struct XMLPropertyState;
@@ -274,14 +274,14 @@ private:
     void ProcessString(
         enum ::xmloff::token::XMLTokenEnum eXmlName,        /// attribute 
token (namespace text)
         const OUString& sValue,  /// attribute value
-        const OUString& sDefault); /// default value; omit if equal
+        std::u16string_view sDefault); /// default value; omit if equal
 
     /// export a string attribute, omit if default
     void ProcessString(
         enum ::xmloff::token::XMLTokenEnum eXmlName,        /// attribute 
token (namespace text)
         sal_uInt16 nValuePrefix,
         const OUString& sValue,  /// attribute value
-        const OUString& sDefault); /// default value; omit if equal
+        std::u16string_view sDefault); /// default value; omit if equal
 
     /// export a string attribute
     void ProcessString(
@@ -313,7 +313,7 @@ private:
         bool bIsString,     /// do we process a string or a number?
         sal_Int32 nFormatKey,   /// format key for NumberFormatter; possibly -1
         const OUString& sContent, /// string content; possibly invalid
-        const OUString& sDefault, /// default string
+        std::u16string_view sDefault, /// default string
         double fValue,          /// float content; possibly invalid
         bool bExportValue,  /// export value attribute?
         bool bExportValueType,  /// export value-type attribute?
diff --git a/xmloff/inc/txtlists.hxx b/xmloff/inc/txtlists.hxx
index 0e77d60f2ec4..282c87c586a8 100644
--- a/xmloff/inc/txtlists.hxx
+++ b/xmloff/inc/txtlists.hxx
@@ -24,6 +24,7 @@
 #include <map>
 #include <memory>
 #include <stack>
+#include <string_view>
 #include <tuple>
 #include <vector>
 #include <com/sun/star/container/XIndexReplace.hpp>
@@ -115,7 +116,7 @@ class XMLTextListsHelper
         static css::uno::Reference< css::container::XIndexReplace> MakeNumRule(
             SvXMLImport & i_rImport,
             const css::uno::Reference< css::container::XIndexReplace>& 
i_xNumRule,
-            const OUString& i_ParentStyleName,
+            std::u16string_view i_ParentStyleName,
             const OUString& i_StyleName,
             sal_Int16 & io_rLevel,
             bool* o_pRestartNumbering = nullptr,
diff --git a/xmloff/source/style/numehelp.cxx b/xmloff/source/style/numehelp.cxx
index 3d46adcb575e..43dbc73ef85c 100644
--- a/xmloff/source/style/numehelp.cxx
+++ b/xmloff/source/style/numehelp.cxx
@@ -284,7 +284,7 @@ void 
XMLNumberFormatAttributesExportHelper::SetNumberFormatAttributes(SvXMLExpor
 }
 
 void 
XMLNumberFormatAttributesExportHelper::SetNumberFormatAttributes(SvXMLExport& 
rXMLExport,
-    const OUString& rValue, const OUString& rCharacters,
+    const OUString& rValue, std::u16string_view rCharacters,
     bool bExportValue, bool bExportTypeAttribute)
 {
     if (bExportTypeAttribute)
@@ -494,7 +494,7 @@ void 
XMLNumberFormatAttributesExportHelper::SetNumberFormatAttributes(
 }
 
 void XMLNumberFormatAttributesExportHelper::SetNumberFormatAttributes(
-    const OUString& rValue, const OUString& rCharacters,
+    const OUString& rValue, std::u16string_view rCharacters,
     bool bExportValue,
     sal_uInt16 nNamespace)
 {
diff --git a/xmloff/source/text/txtflde.cxx b/xmloff/source/text/txtflde.cxx
index effacfd668df..dc767767f3a6 100644
--- a/xmloff/source/text/txtflde.cxx
+++ b/xmloff/source/text/txtflde.cxx
@@ -1128,7 +1128,7 @@ void XMLTextFieldExport::ExportFieldHelper(
         // show style, unless name will be shown
         ProcessValueAndType(IsStringField(nToken, rPropSet),
                             GetIntProperty(gsPropertyNumberFormat, rPropSet),
-                            "", "", 0.0, // values not used
+                            "", u"", 0.0, // values not used
                             false,
                             false,
                             !bCmd,
@@ -1169,7 +1169,7 @@ void XMLTextFieldExport::ExportFieldHelper(
                        bCmd);
         ProcessValueAndType(IsStringField(nToken, rPropSet),
                             GetIntProperty(gsPropertyNumberFormat, rPropSet),
-                            "", "", 0.0, // values not used
+                            "", u"", 0.0, // values not used
                             false, false, !bCmd,
                             ! GetOptionalBoolProperty(
                                  gsPropertyIsFixedLanguage,
@@ -1252,7 +1252,7 @@ void XMLTextFieldExport::ExportFieldHelper(
         {
             ProcessValueAndType(false,
                                 
GetIntProperty(gsPropertyNumberFormat,rPropSet),
-                                "", "", 0.0, // not used
+                                "", u"", 0.0, // not used
                                 false, false, true,
                                 ! GetOptionalBoolProperty(
                                     gsPropertyIsFixedLanguage,
@@ -1294,7 +1294,7 @@ void XMLTextFieldExport::ExportFieldHelper(
         {
             ProcessValueAndType(false,
                                 
GetIntProperty(gsPropertyNumberFormat,rPropSet),
-                                "", "", 0.0, // not used
+                                "", u"", 0.0, // not used
                                 false, false, true,
                                 ! GetOptionalBoolProperty(
                                     gsPropertyIsFixedLanguage,
@@ -1426,7 +1426,7 @@ void XMLTextFieldExport::ExportFieldHelper(
         {
             ProcessValueAndType(false,  // doesn't happen for text
                                 
GetIntProperty(gsPropertyNumberFormat,rPropSet),
-                                "", "", 0.0, // not used
+                                "", u"", 0.0, // not used
                                 false, false, true, false);
         }
         ProcessDisplay(GetBoolProperty(gsPropertyIsVisible, rPropSet),
@@ -1451,7 +1451,7 @@ void XMLTextFieldExport::ExportFieldHelper(
     case FIELD_ID_DOCINFO_PRINT_DATE:
         ProcessValueAndType(false,
                             GetIntProperty(gsPropertyNumberFormat, rPropSet),
-                            "", "", 0.0,
+                            "", u"", 0.0,
                             false, false, true,
                             ! GetOptionalBoolProperty(
                                     gsPropertyIsFixedLanguage,
@@ -1482,7 +1482,7 @@ void XMLTextFieldExport::ExportFieldHelper(
     {
         ProcessValueAndType(false,  // doesn't happen for text
                                 
GetIntProperty(gsPropertyNumberFormat,rPropSet),
-                                "", "", 0.0, // not used
+                                "", u"", 0.0, // not used
                                 false, false, true,
                                 ! GetOptionalBoolProperty(
                                     gsPropertyIsFixedLanguage,
@@ -1854,7 +1854,7 @@ void XMLTextFieldExport::ExportFieldHelper(
                         GetBoolProperty(gsPropertyIsShowFormula, rPropSet) );
         ProcessValueAndType( false,
                              GetIntProperty(gsPropertyNumberFormat, rPropSet),
-                             "", "", 0.0f,
+                             "", u"", 0.0f,
                              false, false, true,
                              false );
         ExportElement( XML_TABLE_FORMULA, sPresentation );
@@ -2049,7 +2049,7 @@ void XMLTextFieldExport::ExportFieldDeclarations(
                 ProcessValueAndType(
                     bIsString,
                     GetIntProperty(gsPropertyNumberFormat, xFieldPropSet),
-                    "", "", 0.0,
+                    "", u"", 0.0,
                     false, true, false, false);
             }
             else
@@ -2062,7 +2062,7 @@ void XMLTextFieldExport::ExportFieldDeclarations(
                 // from NumberFormats
                 ProcessValueAndType(
                     bIsString,
-                    0, "", "", 0.0,
+                    0, "", u"", 0.0,
                     false, true, false, false);
             }
 
@@ -2135,7 +2135,7 @@ void XMLTextFieldExport::ExportFieldDeclarations(
                 // expression:
                 ProcessValueAndType(
                     false,
-                    0, "", "",
+                    0, "", u"",
                     GetDoubleProperty(gsPropertyValue, xPropSet),
                     true,
                     true,
@@ -2334,7 +2334,7 @@ void XMLTextFieldExport::ExportMetaField(
         // style:data-style-name
         ProcessValueAndType(false,
             GetIntProperty(gsPropertyNumberFormat, i_xMeta),
-            "", "", 0.0, false, false, true,
+            "", u"", 0.0, false, false, true,
             false  );
 
         // text:meta-field without xml:id is invalid
@@ -2357,7 +2357,7 @@ void XMLTextFieldExport::ProcessValueAndType(
     bool bIsString,     /// do we process a string or a number?
     sal_Int32 nFormatKey,   /// format key for NumberFormatter; inv. if string
     const OUString& sContent,   /// string content; possibly invalid
-    const OUString& sDefault,   /// default string
+    std::u16string_view sDefault, /// default string
     double fValue,          /// float content; possibly invalid
     bool bExportValue,  /// export value attribute?
     bool bExportValueType,  /// export value-type attribute?
@@ -2487,7 +2487,7 @@ void XMLTextFieldExport::ProcessString(enum XMLTokenEnum 
eName,
 /// export a string attribute
 void XMLTextFieldExport::ProcessString(enum XMLTokenEnum eName,
                                        const OUString& sValue,
-                                       const OUString& sDefault)
+                                       std::u16string_view sDefault)
 {
     if (sValue != sDefault)
     {
@@ -2499,7 +2499,7 @@ void XMLTextFieldExport::ProcessString(enum XMLTokenEnum 
eName,
 void XMLTextFieldExport::ProcessString(enum XMLTokenEnum eName,
                                        sal_uInt16 nValuePrefix,
                                        const OUString& sValue,
-                                       const OUString& sDefault)
+                                       std::u16string_view sDefault)
 {
     if (sValue != sDefault)
     {
diff --git a/xmloff/source/text/txtlists.cxx b/xmloff/source/text/txtlists.cxx
index b00852ce44be..11d31e025e75 100644
--- a/xmloff/source/text/txtlists.cxx
+++ b/xmloff/source/text/txtlists.cxx
@@ -402,7 +402,7 @@ uno::Reference<container::XIndexReplace>
 XMLTextListsHelper::MakeNumRule(
     SvXMLImport & i_rImport,
     const uno::Reference<container::XIndexReplace>& i_rNumRule,
-    const OUString& i_ParentStyleName,
+    std::u16string_view i_ParentStyleName,
     const OUString& i_StyleName,
     sal_Int16 & io_rLevel,
     bool* o_pRestartNumbering,
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to