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 /extensions/source | |
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 'extensions/source')
-rw-r--r-- | extensions/source/bibliography/bibmod.cxx | 4 | ||||
-rw-r--r-- | extensions/source/bibliography/bibresid.hxx | 3 | ||||
-rw-r--r-- | extensions/source/propctrlr/modulepcr.cxx | 2 | ||||
-rw-r--r-- | extensions/source/propctrlr/modulepcr.hxx | 3 | ||||
-rw-r--r-- | extensions/source/scanner/sanedlg.cxx | 4 |
5 files changed, 9 insertions, 7 deletions
diff --git a/extensions/source/bibliography/bibmod.cxx b/extensions/source/bibliography/bibmod.cxx index c355e836a02b..5f32aef3a366 100644 --- a/extensions/source/bibliography/bibmod.cxx +++ b/extensions/source/bibliography/bibmod.cxx @@ -54,9 +54,9 @@ void CloseBibModul(HdlBibModul ppBibModul) } } -OUString BibResId(const char* pId) +OUString BibResId(std::string_view aId) { - return Translate::get(pId, pBibModul->GetResLocale()); + return Translate::get(aId, pBibModul->GetResLocale()); } BibConfig* BibModul::pBibConfig = nullptr; diff --git a/extensions/source/bibliography/bibresid.hxx b/extensions/source/bibliography/bibresid.hxx index 354b5233e599..7de3d0c46bfb 100644 --- a/extensions/source/bibliography/bibresid.hxx +++ b/extensions/source/bibliography/bibresid.hxx @@ -20,7 +20,8 @@ #pragma once #include <rtl/ustring.hxx> +#include <string_view> -OUString BibResId(const char* pId); +OUString BibResId(std::string_view aId); /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/extensions/source/propctrlr/modulepcr.cxx b/extensions/source/propctrlr/modulepcr.cxx index 74d4b5daff7c..67a6e198b27e 100644 --- a/extensions/source/propctrlr/modulepcr.cxx +++ b/extensions/source/propctrlr/modulepcr.cxx @@ -23,7 +23,7 @@ namespace pcr { -OUString PcrRes(const char* pId) { return Translate::get(pId, Translate::Create("pcr")); } +OUString PcrRes(std::string_view aId) { return Translate::get(aId, Translate::Create("pcr")); } } // namespace pcr diff --git a/extensions/source/propctrlr/modulepcr.hxx b/extensions/source/propctrlr/modulepcr.hxx index edfef48d8e29..c8eed78eef32 100644 --- a/extensions/source/propctrlr/modulepcr.hxx +++ b/extensions/source/propctrlr/modulepcr.hxx @@ -20,10 +20,11 @@ #pragma once #include <rtl/ustring.hxx> +#include <string_view> namespace pcr { -OUString PcrRes(const char* pId); +OUString PcrRes(std::string_view pId); } // namespace pcr /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/extensions/source/scanner/sanedlg.cxx b/extensions/source/scanner/sanedlg.cxx index 7dc78017ced8..d13ebcc53da9 100644 --- a/extensions/source/scanner/sanedlg.cxx +++ b/extensions/source/scanner/sanedlg.cxx @@ -273,9 +273,9 @@ SaneDlg::~SaneDlg() namespace { -OUString SaneResId(const char *pID) +OUString SaneResId(std::string_view aID) { - return Translate::get(pID, Translate::Create("pcr")); + return Translate::get(aID, Translate::Create("pcr")); } } |