Make NC_ constexpr-friendly

...by moving the char8_t -> char reinterpret_cast out of any potential constexpr
paths into a new TranslateId::getId.  And demonstrate constexpr'ability by
making the aCategories var in OApplicationIconControl::Fill
(dbaccess/source/ui/app/AppIconControl.cxx) constexpr.  (And there might be more
such cases that could now be made constexpr.)

Change-Id: I0b4e3292faf8f6b901f9b9e934e1aa6bf0f583ff
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157862
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
This commit is contained in:
Stephan Bergmann 2023-10-12 11:17:11 +02:00
parent 6056a0e320
commit dcea29c283
113 changed files with 126 additions and 122 deletions

View file

@ -19,7 +19,7 @@
#pragma once
#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
#define NC_(Context, String) TranslateId(Context, u8##String)
#define RID_STR_ACC_NAME_BROWSEBUTTON NC_("RID_STR_ACC_NAME_BROWSEBUTTON", "Browse")
#define STR_SVT_ACC_ACTION_EXPAND NC_("STR_SVT_ACC_ACTION_EXPAND", "Expand" )

View file

@ -19,7 +19,7 @@
#pragma once
#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
#define NC_(Context, String) TranslateId(Context, u8##String)
#define AVMEDIA_STR_ZOOM_50 NC_("AVMEDIA_STR_ZOOM_50", "50%")
#define AVMEDIA_STR_ZOOM_100 NC_("AVMEDIA_STR_ZOOM_100", "100%")

View file

@ -20,7 +20,7 @@
#ifndef BASCTL_INC_BASIDESH_HRC
#define BASCTL_INC_BASIDESH_HRC
#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
#define NC_(Context, String) TranslateId(Context, u8##String)
#define RID_STR_FILTER_ALLFILES NC_("RID_STR_FILTER_ALLFILES", "<All>")
#define RID_STR_NOMODULE NC_("RID_STR_NOMODULE", "< No Module >")

View file

@ -25,7 +25,7 @@
#include <utility>
#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
#define NC_(Context, String) TranslateId(Context, u8##String)
std::pair<TranslateId, ErrCode> const RID_BASIC_START[] =
{

View file

@ -19,7 +19,7 @@
#pragma once
#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
#define NC_(Context, String) TranslateId(Context, u8##String)
#define STR_BASICKEY_FORMAT_ON NC_("STR_BASICKEY_FORMAT_ON", "On")
#define STR_BASICKEY_FORMAT_OFF NC_("STR_BASICKEY_FORMAT_OFF", "Off")

View file

@ -11,7 +11,7 @@
#include <unotools/resmgr.hxx>
#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
#define NC_(Context, String) TranslateId(Context, u8##String)
const TranslateId CHART_TYPE[] =
{

View file

@ -19,7 +19,7 @@
#ifndef CHART_STRINGS_HRC
#define CHART_STRINGS_HRC
#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
#define NC_(Context, String) TranslateId(Context, u8##String)
#define STR_DLG_CHART_WIZARD NC_("STR_DLG_CHART_WIZARD", "Chart Wizard")
#define STR_DLG_SMOOTH_LINE_PROPERTIES NC_("STR_DLG_SMOOTH_LINE_PROPERTIES", "Smooth Lines")

View file

@ -19,7 +19,7 @@
#pragma once
#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
#define NC_(Context, String) TranslateId(Context, u8##String)
// = common strings
#define STR_NO_CONNECTION_GIVEN NC_("STR_NO_CONNECTION_GIVEN", "No connection to the database exists.")

View file

@ -11,7 +11,7 @@
#include <unotools/resmgr.hxx>
#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
#define NC_(Context, String) TranslateId(Context, u8##String)
const TranslateId NUM_CATEGORIES[] =
{

View file

@ -18,7 +18,7 @@
*/
#pragma once
#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
#define NC_(Context, String) TranslateId(Context, u8##String)
#define RID_CUISTR_KEY_WORK_PATH NC_("RID_SVXSTR_KEY_WORK_PATH", "My Documents")
#define RID_CUISTR_KEY_GRAPHICS_PATH NC_("RID_SVXSTR_KEY_GRAPHICS_PATH", "Images")

View file

@ -19,7 +19,7 @@
#pragma once
#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
#define NC_(Context, String) TranslateId(Context, u8##String)
#include <rtl/ustring.hxx>
#include <config_python.h>

View file

@ -9,7 +9,7 @@
#pragma once
#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
#define NC_(Context, String) TranslateId(Context, u8##String)
#include <rtl/ustring.hxx>
#include <tuple>

View file

@ -27,7 +27,7 @@
#include <utility>
#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
#define NC_(Context, String) TranslateId(Context, u8##String)
const std::pair<TranslateId, sal_uInt16> SID_GENERAL_OPTIONS_RES[] =
{

View file

@ -14,7 +14,7 @@
#include <utility>
#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
#define NC_(Context, String) TranslateId(Context, u8##String)
#define CHRDLG_ENCLOSE_NONE 0
#define CHRDLG_ENCLOSE_ROUND 1

View file

@ -21,7 +21,7 @@
#include <unotools/resmgr.hxx>
#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
#define NC_(Context, String) TranslateId(Context, u8##String)
const TranslateId RSC_QUERY_OBJECT_TYPE[] =
{

View file

@ -21,7 +21,7 @@
#include <unotools/resmgr.hxx>
#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
#define NC_(Context, String) TranslateId(Context, u8##String)
#define RID_STR_CONNECTION_INVALID NC_("RID_STR_CONNECTION_INVALID", "No connection could be established.")
#define RID_STR_TABLE_IS_FILTERED NC_("RID_STR_TABLE_IS_FILTERED", "The table $name$ already exists. It is not visible because it has been filtered out.")

View file

@ -22,7 +22,7 @@
#include <utility>
#include <unotools/resmgr.hxx>
#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
#define NC_(Context, String) TranslateId(Context, u8##String)
#define DI_TITLE 1
#define DI_FROM 2

View file

@ -69,7 +69,7 @@ OApplicationIconControl::OApplicationIconControl(std::unique_ptr<weld::ScrolledW
void OApplicationIconControl::Fill()
{
static const struct CategoryDescriptor
static constexpr struct CategoryDescriptor
{
TranslateId pLabelResId;
ElementType eType;

View file

@ -19,7 +19,7 @@
#pragma once
#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
#define NC_(Context, String) TranslateId(Context, u8##String)
#define RID_STR_COPYING_PACKAGE NC_("RID_STR_COPYING_PACKAGE", "Copying: ")
#define RID_STR_ERROR_WHILE_ADDING NC_("RID_STR_ERROR_WHILE_ADDING", "Error while adding: ")

View file

@ -11,7 +11,7 @@
#include <unotools/resmgr.hxx>
#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
#define NC_(Context, String) TranslateId(Context, u8##String)
const TranslateId RID_SVXITEMS_HORJUST[] =
{

View file

@ -9,7 +9,7 @@
#pragma once
#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
#define NC_(Context, String) TranslateId(Context, u8##String)
#define BTN_OVERWRITE_TEXT NC_("BTN_OVERWRITE_TEXT", "Overwrite")
#define STR_OVERWRITE_LINK NC_("STR_OVERWRITE_LINK", "You have made changes to the %{filename}, saving will overwrite the data from the inserted object.\n\nDo you still want to overwrite this data?")

View file

@ -22,7 +22,7 @@
#include <unotools/resmgr.hxx>
#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
#define NC_(Context, String) TranslateId(Context, u8##String)
namespace {

View file

@ -22,7 +22,7 @@
#include <unotools/resmgr.hxx>
#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
#define NC_(Context, String) TranslateId(Context, u8##String)
namespace {

View file

@ -22,7 +22,7 @@
#include <unotools/resmgr.hxx>
#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
#define NC_(Context, String) TranslateId(Context, u8##String)
const TranslateId RID_RSC_ENUM_VERTICAL_ALIGN[] =
{

View file

@ -22,7 +22,7 @@
#include <unotools/resmgr.hxx>
#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
#define NC_(Context, String) TranslateId(Context, u8##String)
#define RID_STR_EDITMASK NC_("RID_STR_EDITMASK", "Edit mask")
#define RID_STR_LITERALMASK NC_("RID_STR_LITERALMASK", "Literal mask")

View file

@ -22,7 +22,7 @@
#include <unotools/resmgr.hxx>
#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
#define NC_(Context, String) TranslateId(Context, u8##String)
namespace {

View file

@ -22,7 +22,7 @@
#include <rtl/ustring.hxx>
#include <unotools/resmgr.hxx>
#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
#define NC_(Context, String) TranslateId(Context, u8##String)
#define NNC_(Context, StringSingular, StringPlural) TranslateNId(Context, reinterpret_cast<char const *>(u8##StringSingular), reinterpret_cast<char const *>(u8##StringPlural))
#define STR_UNKNOWN_APPLICATION NC_("STR_UNKNOWN_APPLICATION", "Unknown")

View file

@ -21,7 +21,7 @@
#include <unotools/resmgr.hxx>
#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
#define NC_(Context, String) TranslateId(Context, u8##String)
#define RID_BASELISTBOX_ERROR_FILLLIST NC_("RID_BASELISTBOX_ERROR_FILLLIST", "The contents of a combo box or list field could not be determined.")
#define RID_STR_IMPORT_GRAPHIC NC_("RID_STR_IMPORT_GRAPHIC", "Insert Image" )

View file

@ -23,7 +23,7 @@
#include <utility>
#include <unotools/resmgr.hxx>
#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
#define NC_(Context, String) TranslateId(Context, u8##String)
/** These English names are used to store/load ODFF as of ODF v1.2. */
// NAMES CAN ONLY BE CHANGED WHEN PROVIDING BACKWARD AND FORWARD COMPATIBILITY

View file

@ -19,7 +19,7 @@
#pragma once
#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
#define NC_(Context, String) TranslateId(Context, u8##String)
#define STR_OPTIONAL NC_("STR_OPTIONAL", "(optional)")
#define STR_REQUIRED NC_("STR_REQUIRED", "(required)")

View file

@ -19,7 +19,7 @@
#pragma once
#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
#define NC_(Context, String) TranslateId(Context, u8##String)
#define STR_EXPLORERFILE_OPEN NC_("STR_EXPLORERFILE_OPEN", "Open")
#define STR_EXPLORERFILE_SAVE NC_("STR_EXPLORERFILE_SAVE", "Save as")

View file

@ -19,7 +19,7 @@
#pragma once
#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
#define NC_(Context, String) TranslateId(Context, u8##String)
#define STR_MENU_HEADFOOTALL NC_("STR_MENU_HEADFOOTALL", "All" )
#define STR_UPDATEDOC NC_("STR_UPDATEDOC", "~Update" )

View file

@ -20,7 +20,7 @@
#ifndef INCLUDED_INCLUDE_EDITENG_EDITRIDS_HRC
#define INCLUDED_INCLUDE_EDITENG_EDITRIDS_HRC
#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
#define NC_(Context, String) TranslateId(Context, u8##String)
// enum SvxBreak ------------------------------------------------------------
#define RID_SVXITEMS_BREAK_NONE NC_("RID_SVXITEMS_BREAK_NONE", "No break")

View file

@ -9,7 +9,7 @@
#ifndef INCLUDED_FPICKER_FPICKER_HRC
#define INCLUDED_FPICKER_FPICKER_HRC
#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
#define NC_(Context, String) TranslateId(Context, u8##String)
#define STR_SVT_FILEPICKER_AUTO_EXTENSION NC_("STR_SVT_FILEPICKER_AUTO_EXTENSION", "~Automatic file name extension")
#define STR_SVT_FILEPICKER_PASSWORD NC_("STR_SVT_FILEPICKER_PASSWORD", "Save with pass~word")

View file

@ -20,7 +20,7 @@
#ifndef INCLUDED_SFX2_INC_STRINGS_HRC
#define INCLUDED_SFX2_INC_STRINGS_HRC
#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
#define NC_(Context, String) TranslateId(Context, u8##String)
#define STR_TEMPLATE_FILTER NC_("STR_TEMPLATE_FILTER", "Templates")
#define STR_SAVEDOC NC_("STR_SAVEDOC", "~Save")

View file

@ -19,7 +19,7 @@
#ifndef INCLUDED_SVL_SVL_HRC
#define INCLUDED_SVL_SVL_HRC
#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
#define NC_(Context, String) TranslateId(Context, u8##String)
// Internet Media Type Presentations

View file

@ -19,7 +19,7 @@
#pragma once
#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
#define NC_(Context, String) TranslateId(Context, u8##String)
// To translators: tdf#125447 use no mnemonic in this string
#define STR_UNDO NC_("STR_UNDO", "Undo: ")

View file

@ -20,7 +20,7 @@
#ifndef INCLUDED_SVX_INC_STRINGS_HRC
#define INCLUDED_SVX_INC_STRINGS_HRC
#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
#define NC_(Context, String) TranslateId(Context, u8##String)
#define STR_ObjNameSingulNONE NC_("STR_ObjNameSingulNONE", "Drawing object")
#define STR_ObjNamePluralNONE NC_("STR_ObjNamePluralNONE", "Drawing objects")

View file

@ -27,7 +27,7 @@
#include <unotools/resmgr.hxx>
#include <utility>
#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
#define NC_(Context, String) TranslateId(Context, u8##String)
const std::pair<TranslateId, sal_uInt16> RID_ATTR_NAMES[] =
{

View file

@ -31,13 +31,17 @@ typedef OUString (*ResHookProc)(const OUString& rStr);
struct UNOTOOLS_DLLPUBLIC TranslateId
{
const char* mpContext;
const char* mpId;
const char8_t* mpId;
inline constexpr TranslateId()
: mpContext(nullptr), mpId(nullptr) {}
inline constexpr TranslateId(const char* pContext, const char* pId)
inline TranslateId(const char* pContext, const char* pId)
: mpContext(pContext), mpId(reinterpret_cast<char8_t const *>(pId)) {}
inline constexpr TranslateId(const char* pContext, const char8_t* pId)
: mpContext(pContext), mpId(pId) {}
char const * getId() const { return reinterpret_cast<char const *>(mpId); }
inline operator bool() const { return mpId != nullptr; }
bool operator==(const TranslateId& other) const;

View file

@ -10,7 +10,7 @@
#ifndef OOX_STRINGS_HRC
#define OOX_STRINGS_HRC
#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
#define NC_(Context, String) TranslateId(Context, u8##String)
#define STR_DIAGRAM_TITLE NC_("STR_DIAGRAM_TITLE", "Chart Title")
#define STR_DIAGRAM_AXISTITLE NC_("STR_DIAGRAM_AXISTITLE", "Axis Title")

View file

@ -12,7 +12,7 @@
#include <unotools/resmgr.hxx>
#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
#define NC_(Context, String) TranslateId(Context, u8##String)
const TranslateId RID_STR_FORCENEWPAGE_CONST[] =
{

View file

@ -20,7 +20,7 @@
#ifndef INCLUDED_REPORTDESIGN_INC_STRINGS_HRC
#define INCLUDED_REPORTDESIGN_INC_STRINGS_HRC
#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
#define NC_(Context, String) TranslateId(Context, u8##String)
#define RID_STR_PROPPAGE_DEFAULT NC_("RID_STR_PROPPAGE_DEFAULT", "General")
#define RID_STR_PROPPAGE_DATA NC_("RID_STR_PROPPAGE_DATA", "Data")

View file

@ -21,7 +21,7 @@
#include <unotools/resmgr.hxx>
#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
#define NC_(Context, String) TranslateId(Context, u8##String)
const TranslateId RID_FUNCTION_CATEGORIES[] =
{

View file

@ -20,7 +20,7 @@
#ifndef SC_GLOBSTR_HRC
#define SC_GLOBSTR_HRC
#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
#define NC_(Context, String) TranslateId(Context, u8##String)
#define NNC_(Context, StringSingular, StringPlural) TranslateNId(Context, reinterpret_cast<char const *>(u8##StringSingular), reinterpret_cast<char const *>(u8##StringPlural))
/*

View file

@ -21,7 +21,7 @@
# include <unotools/resmgr.hxx>
#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
#define NC_(Context, String) TranslateId(Context, u8##String)
const TranslateId SCSTR_DPFUNCLISTBOX[] =
{

View file

@ -19,7 +19,7 @@
#pragma once
#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
#define NC_(Context, String) TranslateId(Context, u8##String)
#include <svtools/ehdl.hxx>
#include "scerrors.hxx"

View file

@ -20,7 +20,7 @@
#include <unotools/resmgr.hxx>
#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
#define NC_(Context, String) TranslateId(Context, u8##String)
/* Resource file for the function wizard / autopilot.
*

View file

@ -22,7 +22,7 @@
#include <svl/style.hxx>
#include <unotools/resmgr.hxx>
#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
#define NC_(Context, String) TranslateId(Context, u8##String)
const std::pair<TranslateId, SfxStyleSearchBits> RID_CELLSTYLEFAMILY[] =
{

View file

@ -19,7 +19,7 @@
#pragma once
#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
#define NC_(Context, String) TranslateId(Context, u8##String)
#define NNC_(Context, StringSingular, StringPlural) TranslateNId(Context, reinterpret_cast<char const *>(u8##StringSingular), reinterpret_cast<char const *>(u8##StringPlural))
// Strings for interface names -------------------------------------------

View file

@ -21,7 +21,7 @@
#include <unotools/resmgr.hxx>
#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
#define NC_(Context, String) TranslateId(Context, u8##String)
const TranslateId SCSTR_SUBTOTALS[] =
{

View file

@ -21,7 +21,7 @@
#include <unotools/resmgr.hxx>
#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
#define NC_(Context, String) TranslateId(Context, u8##String)
#include <tools/fldunit.hxx>

View file

@ -21,7 +21,7 @@
#include <unotools/resmgr.hxx>
#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
#define NC_(Context, String) TranslateId(Context, u8##String)
const TranslateId ANALYSIS_Workday[] =
{

View file

@ -21,7 +21,7 @@
#include <unotools/resmgr.hxx>
#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
#define NC_(Context, String) TranslateId(Context, u8##String)
const TranslateId DATE_FUNCDESC_DiffWeeks[] =
{

View file

@ -21,7 +21,7 @@
#include <unotools/resmgr.hxx>
#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
#define NC_(Context, String) TranslateId(Context, u8##String)
// function and parameter description
const TranslateId PRICING_FUNCDESC_OptBarrier[] =

View file

@ -19,7 +19,7 @@
#pragma once
#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
#define NC_(Context, String) TranslateId(Context, u8##String)
// function names as accessible from cells
#define PRICING_FUNCNAME_OptBarrier NC_("PRICING_FUNCNAME_OptBarrier", "OPT_BARRIER")

View file

@ -19,7 +19,7 @@
#pragma once
#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
#define NC_(Context, String) TranslateId(Context, u8##String)
#define RID_SOLVER_COMPONENT NC_("RID_SOLVER_COMPONENT", "%PRODUCTNAME Linear Solver")
#define RID_COINMP_SOLVER_COMPONENT NC_("RID_COINMP_SOLVER_COMPONENT", "%PRODUCTNAME CoinMP Linear Solver")

View file

@ -21,7 +21,7 @@
#include <unotools/resmgr.hxx>
#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
#define NC_(Context, String) TranslateId(Context, u8##String)
const TranslateId STR_IMPRESS_PRINT_UI_CONTENT_CHOICES[] =
{

View file

@ -19,7 +19,7 @@
#pragma once
#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
#define NC_(Context, String) TranslateId(Context, u8##String)
#include <svtools/ehdl.hxx>
#include <comphelper/errcode.hxx>

View file

@ -22,7 +22,7 @@
#include <svl/style.hxx>
#include <unotools/resmgr.hxx>
#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
#define NC_(Context, String) TranslateId(Context, u8##String)
const std::pair<TranslateId, SfxStyleSearchBits> RID_GRAPHICSTYLEFAMILY[] =
{

View file

@ -13,7 +13,7 @@
#include <utility>
#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
#define NC_(Context, String) TranslateId(Context, u8##String)
namespace sd
{

View file

@ -19,7 +19,7 @@
#pragma once
#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
#define NC_(Context, String) TranslateId(Context, u8##String)
#define NNC_(Context, StringSingular, StringPlural) TranslateNId(Context, reinterpret_cast<char const *>(u8##StringSingular), reinterpret_cast<char const *>(u8##StringPlural))
#define STR_NULL NC_("STR_NULL", "None")

View file

@ -22,7 +22,7 @@
#include <unotools/resmgr.hxx>
#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
#define NC_(Context, String) TranslateId(Context, u8##String)
const TranslateId SFX_CB_PROPERTY_STRINGARRAY[] =
{

View file

@ -22,7 +22,7 @@
#include <unotools/resmgr.hxx>
#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
#define NC_(Context, String) TranslateId(Context, u8##String)
const TranslateId TEMPLATE_LONG_NAMES_ARY[] =
{

View file

@ -10,7 +10,7 @@
#pragma once
#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
#define NC_(Context, String) TranslateId(Context, u8##String)
#define STR_TEXT_PORTION NC_("STR_TEXT_PORTION", "Text Portion %1")
#define STR_PARAGRAPH NC_("STR_PARAGRAPH", "Paragraph %1")

View file

@ -10,7 +10,7 @@
#ifndef INCLUDED_SHELL_INC_SPSUPP_STRINGS_HRC
#define INCLUDED_SHELL_INC_SPSUPP_STRINGS_HRC
#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
#define NC_(Context, String) TranslateId(Context, u8##String)
#define RID_STR_SP_VIEW_OR_EDIT_TITLE NC_("RID_STR_SP_VIEW_OR_EDIT_TITLE", "Open Document")
#define RID_STR_SP_VIEW_OR_EDIT_MESSAGE NC_("RID_STR_SP_VIEW_OR_EDIT_MESSAGE", "You are opening document\n\n %DOCNAME\n\nDo you want to open it to view or to edit?")

View file

@ -11,7 +11,7 @@
#include <unotools/resmgr.hxx>
#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
#define NC_(Context, String) TranslateId(Context, u8##String)
const TranslateId RID_UI_SYMBOLSET_NAMES[] =
{

View file

@ -26,7 +26,7 @@
#pragma once
#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
#define NC_(Context, String) TranslateId(Context, u8##String)
// clang-format off
#define RID_PLUSX_HELP NC_("RID_PLUSX_HELP", "+ Sign" )

View file

@ -50,7 +50,7 @@ OUString SmLocalizedSymbolData::GetUiSymbolName( std::u16string_view rExportName
for (size_t i = 0; i < SAL_N_ELEMENTS(RID_UI_SYMBOL_NAMES); ++i)
{
if (o3tl::equalsAscii(rExportName, RID_UI_SYMBOL_NAMES[i].mpId))
if (o3tl::equalsAscii(rExportName, RID_UI_SYMBOL_NAMES[i].getId()))
{
aRes = SmResId(RID_UI_SYMBOL_NAMES[i]);
break;
@ -68,7 +68,7 @@ OUString SmLocalizedSymbolData::GetExportSymbolName( std::u16string_view rUiName
{
if (rUiName == SmResId(RID_UI_SYMBOL_NAMES[i]))
{
const char *pKey = RID_UI_SYMBOL_NAMES[i].mpId;
const char *pKey = RID_UI_SYMBOL_NAMES[i].getId();
aRes = OUString(pKey, strlen(pKey), RTL_TEXTENCODING_UTF8);
break;
}
@ -83,7 +83,7 @@ OUString SmLocalizedSymbolData::GetUiSymbolSetName( std::u16string_view rExportN
for (size_t i = 0; i < SAL_N_ELEMENTS(RID_UI_SYMBOLSET_NAMES); ++i)
{
if (o3tl::equalsAscii(rExportName, RID_UI_SYMBOLSET_NAMES[i].mpId))
if (o3tl::equalsAscii(rExportName, RID_UI_SYMBOLSET_NAMES[i].getId()))
{
aRes = SmResId(RID_UI_SYMBOLSET_NAMES[i]);
break;
@ -101,7 +101,7 @@ OUString SmLocalizedSymbolData::GetExportSymbolSetName( std::u16string_view rUiN
{
if (rUiName == SmResId(RID_UI_SYMBOLSET_NAMES[i]))
{
const char *pKey = RID_UI_SYMBOLSET_NAMES[i].mpId;
const char *pKey = RID_UI_SYMBOLSET_NAMES[i].getId();
aRes = OUString(pKey, strlen(pKey), RTL_TEXTENCODING_UTF8);
break;
}

View file

@ -11,7 +11,7 @@
#include <editeng/borderline.hxx>
#include <unotools/resmgr.hxx>
#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
#define NC_(Context, String) TranslateId(Context, u8##String)
const std::pair<TranslateId, SvxBorderLineStyle> RID_SVXSTR_BORDERLINE[] =
{

View file

@ -22,7 +22,7 @@
#include <svtools/sfxecode.hxx>
#include <svtools/soerr.hxx>
#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
#define NC_(Context, String) TranslateId(Context, u8##String)
const ErrMsgCode RID_ERRCTX[] =
{

View file

@ -22,7 +22,7 @@
#include <i18nlangtag/lang.h>
#include <unotools/resmgr.hxx>
#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
#define NC_(Context, String) TranslateId(Context, u8##String)
const std::pair<TranslateId, LanguageType> STR_ARR_SVT_LANGUAGE_TABLE[] =
{

View file

@ -24,7 +24,7 @@
#include <utility>
#include <unotools/resmgr.hxx>
#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
#define NC_(Context, String) TranslateId(Context, u8##String)
const std::pair<TranslateId, FieldUnit> RID_SVXSTR_FIELDUNIT_TABLE[] =
{

View file

@ -22,7 +22,7 @@
#include <unotools/resmgr.hxx>
#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
#define NC_(Context, String) TranslateId(Context, u8##String)
const TranslateId RID_RSC_SQL_INTERNATIONAL[] =
{

View file

@ -22,7 +22,7 @@
#include <unotools/resmgr.hxx>
#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
#define NC_(Context, String) TranslateId(Context, u8##String)
const TranslateId RID_SVXSW_CONVERTMENU[] =
{

View file

@ -24,7 +24,7 @@
#include <sal/types.h>
#include <unotools/resmgr.hxx>
#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
#define NC_(Context, String) TranslateId(Context, u8##String)
std::pair<TranslateId, sal_uInt16> RID_SVXSTR_FRMSEL_TEXTS[] =
{

View file

@ -9,7 +9,7 @@
#pragma once
#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
#define NC_(Context, String) TranslateId(Context, u8##String)
#define NNC_(Context, StringSingular, StringPlural) TranslateNId(Context, reinterpret_cast<char const *>(u8##StringSingular), reinterpret_cast<char const *>(u8##StringPlural))
/*--------------------------------------------------------------------

View file

@ -24,7 +24,7 @@
#include <utility>
#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
#define NC_(Context, String) TranslateId(Context, u8##String)
const std::pair<TranslateId, int> RID_SVXSTRARY_NUMBERINGTYPE[] =
{

View file

@ -12,7 +12,7 @@
#include <unotools/resmgr.hxx>
#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
#define NC_(Context, String) TranslateId(Context, u8##String)
const TranslateId RID_SVXITEMS_ROTATE_MODE[] =
{

View file

@ -13,7 +13,7 @@
#include <utility>
#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
#define NC_(Context, String) TranslateId(Context, u8##String)
const std::pair<TranslateId, int> RID_SVXSTRARY_SAMECONTENT[] =
{

View file

@ -11,7 +11,7 @@
#include <unotools/resmgr.hxx>
#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
#define NC_(Context, String) TranslateId(Context, u8##String)
struct measurement
{

View file

@ -20,7 +20,7 @@
#ifndef INCLUDED_SVX_INC_SVXERR_HRC
#define INCLUDED_SVX_INC_SVXERR_HRC
#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
#define NC_(Context, String) TranslateId(Context, u8##String)
#include <svx/svxerr.hxx>
#include <editeng/editerr.hxx>

View file

@ -22,7 +22,7 @@
#include <unotools/resmgr.hxx>
#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
#define NC_(Context, String) TranslateId(Context, u8##String)
//the following string have to match the (enum values) positions in svx/swframeposstrings.hxx!
const TranslateId RID_SVXSW_FRAMEPOSITIONS[] =

View file

@ -22,7 +22,7 @@
#include <unotools/resmgr.hxx>
#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
#define NC_(Context, String) TranslateId(Context, u8##String)
const TranslateId RID_RSC_TABWIN_PREFIX[] =
{

View file

@ -24,7 +24,7 @@
#include <unotools/resmgr.hxx>
#include <utility>
#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
#define NC_(Context, String) TranslateId(Context, u8##String)
// Encodings for which no conversion exist yet are commented out.

View file

@ -24,7 +24,7 @@
#include <unotools/resmgr.hxx>
#include <utility>
#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
#define NC_(Context, String) TranslateId(Context, u8##String)
const std::pair<TranslateId, int> RID_SVXSTRARY_PAPERSIZE_STD[] =
{

View file

@ -110,7 +110,7 @@ bool SvxOrientationItem::PutValue( const uno::Any& rVal, sal_uInt8 /*nMemberId*/
OUString SvxOrientationItem::GetValueText( SvxCellOrientation nVal )
{
OString id = OString::Concat(RID_SVXITEMS_ORI_STANDARD.mpId) + OString::number(static_cast<int>(nVal));
OString id = OString::Concat(RID_SVXITEMS_ORI_STANDARD.getId()) + OString::number(static_cast<int>(nVal));
return SvxResId(TranslateId(RID_SVXITEMS_ORI_STANDARD.mpContext, id.getStr()));
}

View file

@ -268,7 +268,7 @@ void BulletsTypeMgr::Init()
pActualBullets[i] = new BulletsSettings;
pActualBullets[i]->cBulletChar = aDefaultBulletTypes[i];
pActualBullets[i]->aFont = rActBulletFont;
OString id = OString::Concat(RID_SVXSTR_BULLET_DESCRIPTION_0.mpId) + OString::number(i);
OString id = OString::Concat(RID_SVXSTR_BULLET_DESCRIPTION_0.getId()) + OString::number(i);
pActualBullets[i]->sDescription = SvxResId( TranslateId(RID_SVXSTR_BULLET_DESCRIPTION_0.mpContext, id.getStr()) );
}
}
@ -593,7 +593,7 @@ void OutlineTypeMgr::Init()
{
pOutlineSettingsArrs[ nItem ] = new OutlineSettings_Impl;
OutlineSettings_Impl* pItemArr = pOutlineSettingsArrs[ nItem ];
OString id = OString::Concat(RID_SVXSTR_OUTLINENUM_DESCRIPTION_0.mpId) + OString::number(nItem);
OString id = OString::Concat(RID_SVXSTR_OUTLINENUM_DESCRIPTION_0.getId()) + OString::number(nItem);
pItemArr->sDescription = SvxResId( TranslateId(RID_SVXSTR_OUTLINENUM_DESCRIPTION_0.mpContext, id.getStr()) );
pItemArr->pNumSettingsArr = new NumSettingsArr_Impl;
Reference<XIndexAccess> xLevel = aOutlineAccess.getConstArray()[nItem];

View file

@ -11,7 +11,7 @@
#ifndef INCLUDED_SW_INC_ACCESSIBILITY_CHECK_STRINGS_HRC
#define INCLUDED_SW_INC_ACCESSIBILITY_CHECK_STRINGS_HRC
#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
#define NC_(Context, String) TranslateId(Context, u8##String)
#define STR_NO_ALT NC_("STR_NO_ALT", "%OBJECT_NAME%")
#define STR_TABLE_MERGE_SPLIT NC_("STR_TABLE_MERGE_SPLIT", "Table “%OBJECT_NAME%” contains merges or splits.")

View file

@ -22,7 +22,7 @@
#include <unotools/resmgr.hxx>
#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
#define NC_(Context, String) TranslateId(Context, u8##String)
#include <svl/style.hxx>

View file

@ -22,7 +22,7 @@
#include "tox.hxx"
#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
#define NC_(Context, String) TranslateId(Context, u8##String)
const std::pair<TranslateId, SwTOOElements> RES_SRCTYPES[] =
{

View file

@ -24,7 +24,7 @@
#include <unotools/resmgr.hxx>
#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
#define NC_(Context, String) TranslateId(Context, u8##String)
// Elements -----------------------------------------------------------------
#define MM_PART_TITLE 0

View file

@ -25,7 +25,7 @@
#include "swerror.h"
#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
#define NC_(Context, String) TranslateId(Context, u8##String)
#define ERR_CODE( class, err ) ErrCode(ErrCodeArea::Sw, class, err.GetCode())
#define WARN_CODE( class, err ) ErrCode(ErrCodeArea::Sw, class, err.GetCode())

View file

@ -22,7 +22,7 @@
#include <unotools/resmgr.hxx>
#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
#define NC_(Context, String) TranslateId(Context, u8##String)
const TranslateId FLD_SELECT[] =
{

View file

@ -22,7 +22,7 @@
#include <unotools/resmgr.hxx>
#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
#define NC_(Context, String) TranslateId(Context, u8##String)
const TranslateId FLD_REF_PAGE_TYPES[] =
{

View file

@ -19,7 +19,7 @@
#pragma once
#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
#define NC_(Context, String) TranslateId(Context, u8##String)
#define NNC_(Context, StringSingular, StringPlural) TranslateNId(Context, reinterpret_cast<char const *>(u8##StringSingular), reinterpret_cast<char const *>(u8##StringPlural))
/*--------------------------------------------------------------------

View file

@ -22,7 +22,7 @@
#include <unotools/resmgr.hxx>
#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
#define NC_(Context, String) TranslateId(Context, u8##String)
const TranslateId RA_SALUTATION[] =
{

View file

@ -24,7 +24,7 @@
#include <unotools/resmgr.hxx>
#include <utility>
#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
#define NC_(Context, String) TranslateId(Context, u8##String)
const std::pair<TranslateId, FieldUnit> STR_ARR_METRIC[] =
{

View file

@ -22,7 +22,7 @@
#include <unotools/resmgr.hxx>
#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
#define NC_(Context, String) TranslateId(Context, u8##String)
const TranslateId OUTLINE_STYLE[] =
{

View file

@ -12,7 +12,7 @@
#include <unotools/resmgr.hxx>
#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
#define NC_(Context, String) TranslateId(Context, u8##String)
#include <utility>

Some files were not shown because too many files have changed in this diff Show more