diff options
author | varshneydevansh <varshney.devansh614@gmail.com> | 2024-02-02 00:12:33 +0530 |
---|---|---|
committer | Hossein <hossein@libreoffice.org> | 2024-02-14 09:58:21 +0100 |
commit | 0859e497be07acceb0a950183d5997374783266f (patch) | |
tree | 8f47d0f80e74331bd99623bb54de7ba22e3b123e /xmlhelp | |
parent | ec69b448f4b6296edb6b28ced5ecb710be82438b (diff) |
tdf#145539 convert const char[] in files to constexpr OUStringLiteral
OStringLiteral represent read-only memory for string literal while
OUString is a dynamic string class with reference counting
hence use OUString when you need reference counting, string
manipulation along with _ustr suffix.
Change-Id: Ib566df156d81c7527f5650bcc6bd5db6509128cf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162911
Tested-by: Jenkins
Reviewed-by: Hossein <hossein@libreoffice.org>
Diffstat (limited to 'xmlhelp')
-rw-r--r-- | xmlhelp/source/cxxhelp/provider/databases.cxx | 14 | ||||
-rw-r--r-- | xmlhelp/source/treeview/tvread.cxx | 10 |
2 files changed, 12 insertions, 12 deletions
diff --git a/xmlhelp/source/cxxhelp/provider/databases.cxx b/xmlhelp/source/cxxhelp/provider/databases.cxx index cc05fb69ea29..2f20a2d75a73 100644 --- a/xmlhelp/source/cxxhelp/provider/databases.cxx +++ b/xmlhelp/source/cxxhelp/provider/databases.cxx @@ -123,13 +123,13 @@ OUString Databases::expandURL( const OUString& aURL, const Reference< uno::XComp return aRetURL; } -const char vendVersion[] = "%VENDORVERSION"; -const char vendName[] = "%VENDORNAME"; -const char prodVersion[] = "%PRODUCTVERSION"; -const char vendShort[] = "%VENDORSHORT"; -const char prodName[] = "%PRODUCTNAME"; -const char newProdVersion[] = "$[officeversion]"; -const char newProdName[] = "$[officename]"; +constexpr OUStringLiteral vendVersion = u"%VENDORVERSION"; +constexpr OUStringLiteral vendName = u"%VENDORNAME"; +constexpr OUStringLiteral prodVersion = u"%PRODUCTVERSION"; +constexpr OUStringLiteral vendShort = u"%VENDORSHORT"; +constexpr OUStringLiteral prodName = u"%PRODUCTNAME"; +constexpr OUStringLiteral newProdVersion = u"$[officeversion]"; +constexpr OUStringLiteral newProdName = u"$[officename]"; Databases::Databases( bool showBasic, const OUString& instPath, diff --git a/xmlhelp/source/treeview/tvread.cxx b/xmlhelp/source/treeview/tvread.cxx index 7b1b1fd0713e..31f1815979ec 100644 --- a/xmlhelp/source/treeview/tvread.cxx +++ b/xmlhelp/source/treeview/tvread.cxx @@ -157,11 +157,11 @@ using namespace com::sun::star::util; using namespace com::sun::star::container; using namespace com::sun::star::deployment; -const char prodName[] = "%PRODUCTNAME"; -const char vendName[] = "%VENDORNAME"; -const char vendVersion[] = "%VENDORVERSION"; -const char vendShort[] = "%VENDORSHORT"; -const char prodVersion[] = "%PRODUCTVERSION"; +constexpr OUStringLiteral prodName = u"%PRODUCTNAME"; +constexpr OUStringLiteral vendName = u"%VENDORNAME"; +constexpr OUStringLiteral vendVersion = u"%VENDORVERSION"; +constexpr OUStringLiteral vendShort = u"%VENDORSHORT"; +constexpr OUStringLiteral prodVersion = u"%PRODUCTVERSION"; ConfigData::ConfigData() { |