diff options
Diffstat (limited to 'cui/source')
-rw-r--r-- | cui/source/customize/macropg.cxx | 4 | ||||
-rw-r--r-- | cui/source/options/optgdlg.cxx | 18 | ||||
-rw-r--r-- | cui/source/options/optlingu.cxx | 2 |
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) { |