summaryrefslogtreecommitdiff
path: root/cui/source
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2024-11-07 10:00:00 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2024-11-07 14:30:52 +0100
commit2de45b85574063cfef3d6ccddc9efe959a8b1076 (patch)
tree977ecc19a8b3d237621bb5fc305f81c1952a583b /cui/source
parent05dafbdc9d7e6755d67d63e58cec3cc1f9038848 (diff)
loplugin:passstuffbyref in cui..dbaccess
Change-Id: Ie15974919f7c0764e661225ef14a9f50917ab083 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176189 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Jenkins
Diffstat (limited to 'cui/source')
-rw-r--r--cui/source/customize/macropg.cxx4
-rw-r--r--cui/source/options/optgdlg.cxx18
-rw-r--r--cui/source/options/optlingu.cxx2
3 files changed, 13 insertions, 11 deletions
diff --git a/cui/source/customize/macropg.cxx b/cui/source/customize/macropg.cxx
index fa4ef4663255..60824e011f00 100644
--- a/cui/source/customize/macropg.cxx
+++ b/cui/source/customize/macropg.cxx
@@ -296,10 +296,10 @@ namespace
return aPureMethod;
}
- OUString GetEventDisplayImage(std::u16string_view rURL)
+ const OUString & GetEventDisplayImage(std::u16string_view rURL)
{
if (rURL.empty())
- return OUString();
+ return EMPTY_OUSTRING;
size_t nIndex = rURL.find(aVndSunStarUNO);
bool bUNO = nIndex == 0;
return bUNO ? RID_SVXBMP_COMPONENT : RID_SVXBMP_MACRO;
diff --git a/cui/source/options/optgdlg.cxx b/cui/source/options/optgdlg.cxx
index c80449a62602..6b84062337a4 100644
--- a/cui/source/options/optgdlg.cxx
+++ b/cui/source/options/optgdlg.cxx
@@ -114,15 +114,17 @@ DeactivateRC OfaMiscTabPage::DeactivatePage( SfxItemSet* pSet_ )
namespace
{
-OUString impl_SystemFileOpenServiceName()
+const OUString & impl_SystemFileOpenServiceName()
{
- #if defined(_WIN32)
- return "com.sun.star.ui.dialogs.SystemFilePicker";
- #elif defined MACOSX
- return "com.sun.star.ui.dialogs.AquaFilePicker";
- #else
- return OUString();
- #endif
+#if defined(_WIN32)
+ static constexpr OUString gPicker = u"com.sun.star.ui.dialogs.SystemFilePicker"_ustr;
+ return gPicker;
+#elif defined MACOSX
+ static constexpr OUString gPicker = u"com.sun.star.ui.dialogs.AquaFilePicker"_ustr;
+ return gPicker;
+#else
+ return EMPTY_OUSTRING;
+#endif
}
bool lcl_HasSystemFilePicker()
diff --git a/cui/source/options/optlingu.cxx b/cui/source/options/optlingu.cxx
index bd5f59c8f741..7381c4d190e3 100644
--- a/cui/source/options/optlingu.cxx
+++ b/cui/source/options/optlingu.cxx
@@ -198,7 +198,7 @@ enum EID_OPTIONS
}
-static OUString lcl_GetPropertyName( EID_OPTIONS eEntryId )
+static const OUString & lcl_GetPropertyName( EID_OPTIONS eEntryId )
{
switch (eEntryId)
{