summaryrefslogtreecommitdiff
path: root/dbaccess/source
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2023-04-12 10:50:46 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2023-04-14 07:54:28 +0200
commitbc2101646bc6e63944c42500af5a15134b9b2d17 (patch)
treeca1da50da2e3e76eef650a1ae3956c16e0a19f33 /dbaccess/source
parentad97694737c99889bc0eb21efccb83768d510361 (diff)
loplugin:stringviewparam improvements
improve the check by checking for methods that exclude using string_view, rather than checking for methods that __can__ use string_view, which leads to exposing some holes in our o3tl/string_view.hxx coverage. Change-Id: Ic9dd60441c671f502692f9cd2a1bb67301c4b960 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150277 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'dbaccess/source')
-rw-r--r--dbaccess/source/ui/querydesign/QueryDesignView.cxx2
-rw-r--r--dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx6
-rw-r--r--dbaccess/source/ui/querydesign/SelectionBrowseBox.hxx2
3 files changed, 5 insertions, 5 deletions
diff --git a/dbaccess/source/ui/querydesign/QueryDesignView.cxx b/dbaccess/source/ui/querydesign/QueryDesignView.cxx
index 1c23e936b016..95c8e82c267d 100644
--- a/dbaccess/source/ui/querydesign/QueryDesignView.cxx
+++ b/dbaccess/source/ui/querydesign/QueryDesignView.cxx
@@ -97,7 +97,7 @@ namespace
bool bHaving,
bool _bAddOrOnOneLine);
- OUString quoteTableAlias(bool _bQuote, const OUString& _sAliasName, const OUString& _sQuote)
+ OUString quoteTableAlias(bool _bQuote, const OUString& _sAliasName, std::u16string_view _sQuote)
{
OUString sRet;
if ( _bQuote && !_sAliasName.isEmpty() )
diff --git a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
index f053d4b43dd1..eb6c666f532c 100644
--- a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
+++ b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
@@ -69,9 +69,9 @@ using namespace ::com::sun::star::accessibility;
namespace
{
- bool isFieldNameAsterisk(const OUString& _sFieldName )
+ bool isFieldNameAsterisk(std::u16string_view _sFieldName )
{
- bool bAsterisk = _sFieldName.isEmpty() || _sFieldName.toChar() == '*';
+ bool bAsterisk = _sFieldName.empty() || _sFieldName[0] == '*';
if ( !bAsterisk )
{
sal_Int32 nTokenCount = comphelper::string::getTokenCount(_sFieldName, '.');
@@ -576,7 +576,7 @@ void OSelectionBrowseBox::notifyFunctionFieldChanged(const OUString& _sOldFuncti
RowModified(GetBrowseRow(BROW_FUNCTION_ROW), _nColumnId);
}
-void OSelectionBrowseBox::clearEntryFunctionField(const OUString& _sFieldName,OTableFieldDescRef const & _pEntry, bool& _bListAction,sal_uInt16 _nColumnId)
+void OSelectionBrowseBox::clearEntryFunctionField(std::u16string_view _sFieldName,OTableFieldDescRef const & _pEntry, bool& _bListAction,sal_uInt16 _nColumnId)
{
if ( !(isFieldNameAsterisk( _sFieldName ) && (!_pEntry->isNoneFunction() || _pEntry->IsGroupBy())) )
return;
diff --git a/dbaccess/source/ui/querydesign/SelectionBrowseBox.hxx b/dbaccess/source/ui/querydesign/SelectionBrowseBox.hxx
index 3bddd9a9c996..d5e11c03e332 100644
--- a/dbaccess/source/ui/querydesign/SelectionBrowseBox.hxx
+++ b/dbaccess/source/ui/querydesign/SelectionBrowseBox.hxx
@@ -306,7 +306,7 @@ namespace dbaui
@param _bListAction
When <TRUE/> a list action will be created.
*/
- void clearEntryFunctionField(const OUString& _sFieldName,OTableFieldDescRef const & _pEntry, bool& _bListAction,sal_uInt16 _nColumnId);
+ void clearEntryFunctionField(std::u16string_view _sFieldName,OTableFieldDescRef const & _pEntry, bool& _bListAction,sal_uInt16 _nColumnId);
/** remove or insert the necessary function types
@param _pEntry