diff options
author | Noel Grandin <noel@peralex.com> | 2021-06-15 21:12:25 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-06-17 14:32:11 +0200 |
commit | 0771ac00acc8730f77db76b901724f1513a32723 (patch) | |
tree | 8af934c3f11e452bc8ef8941fd284cdc9cdbab5c /forms | |
parent | 0d97abc8ef890b2e2ead34c449f2a140e22dd5ee (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 'forms')
-rw-r--r-- | forms/source/inc/frm_resource.hxx | 3 | ||||
-rw-r--r-- | forms/source/resource/frm_resource.cxx | 4 |
2 files changed, 4 insertions, 3 deletions
diff --git a/forms/source/inc/frm_resource.hxx b/forms/source/inc/frm_resource.hxx index f56c6e3cfd76..5766af787f2c 100644 --- a/forms/source/inc/frm_resource.hxx +++ b/forms/source/inc/frm_resource.hxx @@ -20,6 +20,7 @@ #pragma once #include <rtl/ustring.hxx> +#include <string_view> namespace frm { @@ -31,7 +32,7 @@ namespace frm { /** loads the string with the specified resource id from the FormLayer mo file */ - OUString loadString(const char* pResId); + OUString loadString(std::string_view aResId); }; } diff --git a/forms/source/resource/frm_resource.cxx b/forms/source/resource/frm_resource.cxx index 362c41974192..00c6bd5c5b22 100644 --- a/forms/source/resource/frm_resource.cxx +++ b/forms/source/resource/frm_resource.cxx @@ -22,9 +22,9 @@ namespace frm::ResourceManager { - OUString loadString(const char* pResId) + OUString loadString(std::string_view aResId) { - return Translate::get(pResId, Translate::Create("frm")); + return Translate::get(aResId, Translate::Create("frm")); } } |