basic : use more OUString literals

Change-Id: I38f57c64c0d110e892982eaed2619c0915fe93b1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166825
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Reviewed-by: Arnaud Versini <arnaud.versini@pm.me>
This commit is contained in:
Arnaud VERSINI 2024-04-29 10:00:04 +02:00 committed by Arnaud Versini
parent 7ab8d33522
commit a123c5b39a

View file

@ -22,59 +22,59 @@
#include <rtl/ustring.hxx>
static const char* pSbxRes[] = {
"Empty",
"Null",
"Integer",
"Long",
"Single",
"Double",
"Currency",
"Date",
"String",
"Object",
"Error",
"Boolean",
"Variant",
"Any",
"Type14",
"Type15",
"Char",
"Byte",
"UShort",
"ULong",
"Long64",
"ULong64",
"Int",
"UInt",
"Void",
"HResult",
"Pointer",
"DimArray",
"CArray",
"Any",
"LpStr",
"LpWStr",
" As ",
"Optional ",
"Byref ",
constexpr OUString pSbxRes[] = {
u"Empty"_ustr,
u"Null"_ustr,
u"Integer"_ustr,
u"Long"_ustr,
u"Single"_ustr,
u"Double"_ustr,
u"Currency"_ustr,
u"Date"_ustr,
u"String"_ustr,
u"Object"_ustr,
u"Error"_ustr,
u"Boolean"_ustr,
u"Variant"_ustr,
u"Any"_ustr,
u"Type14"_ustr,
u"Type15"_ustr,
u"Char"_ustr,
u"Byte"_ustr,
u"UShort"_ustr,
u"ULong"_ustr,
u"Long64"_ustr,
u"ULong64"_ustr,
u"Int"_ustr,
u"UInt"_ustr,
u"Void"_ustr,
u"HResult"_ustr,
u"Pointer"_ustr,
u"DimArray"_ustr,
u"CArray"_ustr,
u"Any"_ustr,
u"LpStr"_ustr,
u"LpWStr"_ustr,
u" As "_ustr,
u"Optional "_ustr,
u"Byref "_ustr,
"Name",
"Parent",
"Application",
"Count",
"Add",
"Item",
"Remove",
u"Name"_ustr,
u"Parent"_ustr,
u"Application"_ustr,
u"Count"_ustr,
u"Add"_ustr,
u"Item"_ustr,
u"Remove"_ustr,
"Error ", // with blank!
"False",
"True"
u"Error "_ustr, // with blank!
u"False"_ustr,
u"True"_ustr
};
OUString GetSbxRes( StringId nId )
{
return OUString::createFromAscii( ( nId > StringId::LastValue ) ? "???" : pSbxRes[ static_cast<int>( nId ) ] );
return ( nId > StringId::LastValue ) ? u"???"_ustr : pSbxRes[ static_cast<int>( nId ) ];
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */