summaryrefslogtreecommitdiff
path: root/sw/source/uibase
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2020-12-28 17:56:40 +0100
committerStephan Bergmann <sbergman@redhat.com>2020-12-29 16:42:33 +0100
commit042033f1e6da22616cb76c8d950c20c9efecbad5 (patch)
tree26b3f1f42d067506f44550b410f3fb9640616a5b /sw/source/uibase
parentccfd8e9d09f9ac0a0ea92d0f378391006faaf934 (diff)
loplugin:stringviewparam: operator +
Change-Id: I044dd21b63d7eb03224675584fa143009c6b6008 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108418 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'sw/source/uibase')
-rw-r--r--sw/source/uibase/app/docsh.cxx2
-rw-r--r--sw/source/uibase/app/docstyle.cxx6
-rw-r--r--sw/source/uibase/inc/inputwin.hxx6
-rw-r--r--sw/source/uibase/inc/selglos.hxx10
-rw-r--r--sw/source/uibase/misc/glosdoc.cxx5
-rw-r--r--sw/source/uibase/ribbar/inputwin.cxx4
6 files changed, 21 insertions, 12 deletions
diff --git a/sw/source/uibase/app/docsh.cxx b/sw/source/uibase/app/docsh.cxx
index 7a9620b876cf..16b3a66d8460 100644
--- a/sw/source/uibase/app/docsh.cxx
+++ b/sw/source/uibase/app/docsh.cxx
@@ -1108,7 +1108,7 @@ void SwDocShell::GetState(SfxItemSet& rSet)
{
SfxViewShell* pViewShell = GetView()? GetView(): SfxViewShell::Current();
bool bVisible = sfx2::SfxNotebookBar::StateMethod(pViewShell->GetViewFrame()->GetBindings(),
- "modules/swriter/ui/");
+ u"modules/swriter/ui/");
rSet.Put( SfxBoolItem( SID_NOTEBOOKBAR, bVisible ) );
}
break;
diff --git a/sw/source/uibase/app/docstyle.cxx b/sw/source/uibase/app/docstyle.cxx
index c720c3775c8c..d824ac393cbd 100644
--- a/sw/source/uibase/app/docstyle.cxx
+++ b/sw/source/uibase/app/docstyle.cxx
@@ -368,7 +368,7 @@ static const SwBoxAutoFormat* lcl_FindCellStyle(SwDoc& rDoc, std::u16string_view
}
sal_uInt32 SwStyleSheetIterator::SwPoolFormatList::FindName(SfxStyleFamily eFam,
- const OUString &rName)
+ std::u16string_view rName)
{
if(!maImpl.empty())
{
@@ -423,7 +423,7 @@ void SwStyleSheetIterator::SwPoolFormatList::rehash()
}
void SwStyleSheetIterator::SwPoolFormatList::RemoveName(SfxStyleFamily eFam,
- const OUString &rName)
+ std::u16string_view rName)
{
sal_uInt32 nTmpPos = FindName( eFam, rName );
if( nTmpPos < maImpl.size() )
@@ -435,7 +435,7 @@ void SwStyleSheetIterator::SwPoolFormatList::RemoveName(SfxStyleFamily eFam,
}
// Add Strings to the list of templates
-void SwStyleSheetIterator::SwPoolFormatList::Append( char cChar, const OUString& rStr )
+void SwStyleSheetIterator::SwPoolFormatList::Append( char cChar, std::u16string_view rStr )
{
const OUString aStr = OUStringChar(cChar) + rStr;
diff --git a/sw/source/uibase/inc/inputwin.hxx b/sw/source/uibase/inc/inputwin.hxx
index ab18e2118cc3..5536f9634c6d 100644
--- a/sw/source/uibase/inc/inputwin.hxx
+++ b/sw/source/uibase/inc/inputwin.hxx
@@ -19,6 +19,10 @@
#ifndef INCLUDED_SW_SOURCE_UIBASE_INC_INPUTWIN_HXX
#define INCLUDED_SW_SOURCE_UIBASE_INC_INPUTWIN_HXX
+#include <sal/config.h>
+
+#include <string_view>
+
#include <vcl/InterimItemWindow.hxx>
#include <vcl/menu.hxx>
#include <vcl/toolbox.hxx>
@@ -49,7 +53,7 @@ public:
SetSizePixel(m_xWidget->get_preferred_size());
}
- void UpdateRange(const OUString& rSel, const OUString& rTableName);
+ void UpdateRange(std::u16string_view rSel, const OUString& rTableName);
virtual void dispose() override
{
diff --git a/sw/source/uibase/inc/selglos.hxx b/sw/source/uibase/inc/selglos.hxx
index 0109051a5f68..fd5de379631a 100644
--- a/sw/source/uibase/inc/selglos.hxx
+++ b/sw/source/uibase/inc/selglos.hxx
@@ -19,6 +19,10 @@
#pragma once
+#include <sal/config.h>
+
+#include <string_view>
+
#include <vcl/weld.hxx>
class SwSelGlossaryDlg final : public weld::GenericDialogController
@@ -28,12 +32,12 @@ class SwSelGlossaryDlg final : public weld::GenericDialogController
DECL_LINK(DoubleClickHdl, weld::TreeView&, bool);
public:
- SwSelGlossaryDlg(weld::Window * pParent, const OUString &rShortName);
+ SwSelGlossaryDlg(weld::Window * pParent, std::u16string_view rShortName);
virtual ~SwSelGlossaryDlg() override;
- void InsertGlos(const OUString &rRegion, const OUString &rGlosName)
+ void InsertGlos(std::u16string_view rRegion, std::u16string_view rGlosName)
{
- const OUString aTmp = rRegion + ":" + rGlosName;
+ const OUString aTmp = OUString::Concat(rRegion) + ":" + rGlosName;
m_xGlosBox->append_text(aTmp);
}
sal_Int32 GetSelectedIdx() const
diff --git a/sw/source/uibase/misc/glosdoc.cxx b/sw/source/uibase/misc/glosdoc.cxx
index f4e58d08ffcd..181f8c7247e1 100644
--- a/sw/source/uibase/misc/glosdoc.cxx
+++ b/sw/source/uibase/misc/glosdoc.cxx
@@ -18,6 +18,7 @@
*/
#include <algorithm>
+#include <string_view>
#include <com/sun/star/container/XNamed.hpp>
#include <comphelper/servicehelper.hxx>
@@ -47,9 +48,9 @@ using namespace ::com::sun::star::uno;
namespace
{
-OUString lcl_FullPathName(const OUString& sPath, const OUString& sName)
+OUString lcl_FullPathName(std::u16string_view sPath, std::u16string_view sName)
{
- return sPath + "/" + sName + SwGlossaries::GetExtension();
+ return OUString::Concat(sPath) + "/" + sName + SwGlossaries::GetExtension();
}
OUString lcl_CheckFileName( const OUString& rNewFilePath,
diff --git a/sw/source/uibase/ribbar/inputwin.cxx b/sw/source/uibase/ribbar/inputwin.cxx
index c5dfa9dc1366..fb1b082d6747 100644
--- a/sw/source/uibase/ribbar/inputwin.cxx
+++ b/sw/source/uibase/ribbar/inputwin.cxx
@@ -501,10 +501,10 @@ IMPL_LINK_NOARG(InputEdit, ActivateHdl, weld::Entry&, bool)
return true;
}
-void InputEdit::UpdateRange(const OUString& rBoxes,
+void InputEdit::UpdateRange(std::u16string_view rBoxes,
const OUString& rName )
{
- if( rBoxes.isEmpty() )
+ if( rBoxes.empty() )
{
GrabFocus();
return;