summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2021-06-15 21:12:25 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-06-17 14:32:11 +0200
commit0771ac00acc8730f77db76b901724f1513a32723 (patch)
tree8af934c3f11e452bc8ef8941fd284cdc9cdbab5c /include
parent0d97abc8ef890b2e2ead34c449f2a140e22dd5ee (diff)
use string_view in the Translate API
Change-Id: I0bb0ea9d39ed623928060ffd3f2e2bc36ba33209 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117272 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'include')
-rw-r--r--include/basic/sbdef.hxx2
-rw-r--r--include/editeng/eerdll.hxx2
-rw-r--r--include/sfx2/sfxresid.hxx3
-rw-r--r--include/svl/svlresid.hxx3
-rw-r--r--include/svtools/svtresid.hxx2
-rw-r--r--include/svx/dialmgr.hxx2
-rw-r--r--include/unotools/resmgr.hxx7
7 files changed, 12 insertions, 9 deletions
diff --git a/include/basic/sbdef.hxx b/include/basic/sbdef.hxx
index 275eacf2a131..e84a14d5d51d 100644
--- a/include/basic/sbdef.hxx
+++ b/include/basic/sbdef.hxx
@@ -71,7 +71,7 @@ enum class PropertyMode
BASIC_DLLPUBLIC extern std::pair<const char*, ErrCode> const RID_BASIC_START[];
BASIC_DLLPUBLIC std::locale BasResLocale();
-OUString BasResId(const char* pId);
+OUString BasResId(std::string_view pId);
#endif
diff --git a/include/editeng/eerdll.hxx b/include/editeng/eerdll.hxx
index d57ad101fcfd..a3b215f44395 100644
--- a/include/editeng/eerdll.hxx
+++ b/include/editeng/eerdll.hxx
@@ -30,7 +30,7 @@ namespace editeng
class SharedVclResources;
}
-OUString EDITENG_DLLPUBLIC EditResId(const char* pId);
+OUString EDITENG_DLLPUBLIC EditResId(std::string_view aId);
class EditDLL
{
diff --git a/include/sfx2/sfxresid.hxx b/include/sfx2/sfxresid.hxx
index 922c59941738..62bbc99e92bc 100644
--- a/include/sfx2/sfxresid.hxx
+++ b/include/sfx2/sfxresid.hxx
@@ -21,8 +21,9 @@
#include <sfx2/dllapi.h>
#include <rtl/ustring.hxx>
+#include <string_view>
-SFX2_DLLPUBLIC OUString SfxResId(const char* pId);
+SFX2_DLLPUBLIC OUString SfxResId(std::string_view aId);
#endif
diff --git a/include/svl/svlresid.hxx b/include/svl/svlresid.hxx
index 4b568bb12b39..5e6f271ea7a1 100644
--- a/include/svl/svlresid.hxx
+++ b/include/svl/svlresid.hxx
@@ -12,8 +12,9 @@
#include <svl/svldllapi.h>
#include <rtl/ustring.hxx>
+#include <string_view>
-SVL_DLLPUBLIC OUString SvlResId(const char* pId);
+SVL_DLLPUBLIC OUString SvlResId(std::string_view aId);
#endif // INCLUDED_SVL_SVTRESID_HXX
diff --git a/include/svtools/svtresid.hxx b/include/svtools/svtresid.hxx
index d89790c854d6..cf2fa976293b 100644
--- a/include/svtools/svtresid.hxx
+++ b/include/svtools/svtresid.hxx
@@ -24,6 +24,6 @@
#include <locale>
SVT_DLLPUBLIC std::locale SvtResLocale();
-SVT_DLLPUBLIC OUString SvtResId(const char* pId);
+SVT_DLLPUBLIC OUString SvtResId(std::string_view aId);
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/dialmgr.hxx b/include/svx/dialmgr.hxx
index 6dc6dcaa436d..ea31de153123 100644
--- a/include/svx/dialmgr.hxx
+++ b/include/svx/dialmgr.hxx
@@ -23,7 +23,7 @@
#include <svx/svxdllapi.h>
SVXCORE_DLLPUBLIC std::locale SvxResLocale();
-SVXCORE_DLLPUBLIC OUString SvxResId(const char* pId);
+SVXCORE_DLLPUBLIC OUString SvxResId(std::string_view aId);
#endif
diff --git a/include/unotools/resmgr.hxx b/include/unotools/resmgr.hxx
index d1c64e399ffe..4fce82b82294 100644
--- a/include/unotools/resmgr.hxx
+++ b/include/unotools/resmgr.hxx
@@ -22,6 +22,7 @@
#include <unotools/unotoolsdllapi.h>
#include <unotools/syslocale.hxx>
#include <rtl/ustring.hxx>
+#include <string_view>
class LanguageTag;
@@ -29,9 +30,9 @@ typedef OUString (*ResHookProc)(const OUString& rStr);
namespace Translate
{
- UNOTOOLS_DLLPUBLIC std::locale Create(const char* pPrefixName, const LanguageTag& rLocale = SvtSysLocale().GetUILanguageTag());
- UNOTOOLS_DLLPUBLIC OUString get(const char* pId, const std::locale &loc);
- UNOTOOLS_DLLPUBLIC OUString nget(const char* pId, int n, const std::locale &loc);
+ UNOTOOLS_DLLPUBLIC std::locale Create(std::string_view aPrefixName, const LanguageTag& rLocale = SvtSysLocale().GetUILanguageTag());
+ UNOTOOLS_DLLPUBLIC OUString get(std::string_view aId, const std::locale &loc);
+ UNOTOOLS_DLLPUBLIC OUString nget(std::string_view aId, int n, const std::locale &loc);
UNOTOOLS_DLLPUBLIC void SetReadStringHook( ResHookProc pProc );
UNOTOOLS_DLLPUBLIC ResHookProc GetReadStringHook();
UNOTOOLS_DLLPUBLIC OUString ExpandVariables(const OUString& rString);