summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--avmedia/inc/strings.hrc2
-rw-r--r--avmedia/source/inc/mediamisc.hxx2
-rw-r--r--basctl/inc/strings.hrc2
-rw-r--r--basctl/source/basicide/iderdll.cxx2
-rw-r--r--basctl/source/inc/iderid.hxx4
-rw-r--r--basic/inc/basic.hrc6
-rw-r--r--basic/inc/strings.hrc2
-rw-r--r--basic/source/classes/sb.cxx4
-rw-r--r--basic/source/sbx/sbxscan.cxx2
-rw-r--r--chart2/inc/chart.hrc4
-rw-r--r--chart2/inc/strings.hrc2
-rw-r--r--chart2/source/controller/dialogs/dlg_CreationWizard.cxx2
-rw-r--r--chart2/source/controller/dialogs/tp_Scale.cxx6
-rw-r--r--chart2/source/controller/dialogs/tp_Scale.hxx3
-rw-r--r--chart2/source/controller/main/ChartController_Tools.cxx2
-rw-r--r--chart2/source/controller/main/DrawCommandDispatch.cxx2
-rw-r--r--chart2/source/inc/ResId.hxx4
-rw-r--r--chart2/source/tools/ResId.cxx3
-rw-r--r--connectivity/CppunitTest_connectivity_sharedresources.mk1
-rw-r--r--connectivity/Library_ado.mk1
-rw-r--r--connectivity/Library_mysql_jdbc.mk1
-rw-r--r--connectivity/Library_odbc.mk1
-rw-r--r--connectivity/inc/strings.hrc2
-rw-r--r--connectivity/source/commontools/TConnection.cxx2
-rw-r--r--connectivity/source/commontools/sqlerror.cxx4
-rw-r--r--connectivity/source/drivers/dbase/DIndex.cxx2
-rw-r--r--connectivity/source/drivers/dbase/DTable.cxx2
-rw-r--r--connectivity/source/drivers/file/FResultSet.cxx2
-rw-r--r--connectivity/source/drivers/macab/MacabStatement.cxx2
-rw-r--r--connectivity/source/drivers/macab/macabutilities.hxx3
-rw-r--r--connectivity/source/inc/TConnection.hxx2
-rw-r--r--connectivity/source/inc/dbase/DIndex.hxx2
-rw-r--r--connectivity/source/inc/dbase/DTable.hxx2
-rw-r--r--connectivity/source/inc/resource/sharedresources.hxx12
-rw-r--r--connectivity/source/resource/sharedresources.cxx14
-rw-r--r--cui/inc/numcategories.hrc6
-rw-r--r--cui/inc/strings.hrc2
-rw-r--r--cui/inc/tipoftheday.hrc5
-rw-r--r--cui/inc/toolbarmode.hrc5
-rw-r--r--cui/inc/treeopt.hrc26
-rw-r--r--cui/inc/twolines.hrc6
-rw-r--r--cui/source/dialogs/about.cxx2
-rw-r--r--cui/source/dialogs/cuifmsearch.cxx6
-rw-r--r--cui/source/factory/cuiresmgr.cxx2
-rw-r--r--cui/source/inc/border.hxx3
-rw-r--r--cui/source/inc/dialmgr.hxx3
-rw-r--r--cui/source/inc/macropg.hxx5
-rw-r--r--cui/source/options/optpath.cxx2
-rw-r--r--cui/source/options/treeopt.cxx1
-rw-r--r--cui/source/tabpages/border.cxx6
-rw-r--r--dbaccess/inc/core_resource.hxx7
-rw-r--r--dbaccess/inc/query.hrc4
-rw-r--r--dbaccess/inc/strings.hrc4
-rw-r--r--dbaccess/inc/templwin.hrc5
-rw-r--r--dbaccess/source/core/dataaccess/datasource.cxx2
-rw-r--r--dbaccess/source/core/resource/core_resource.cxx6
-rw-r--r--dbaccess/source/ui/app/AppDetailView.cxx8
-rw-r--r--dbaccess/source/ui/app/AppDetailView.hxx8
-rw-r--r--dbaccess/source/ui/app/AppIconControl.cxx2
-rw-r--r--dbaccess/source/ui/app/AppTitleWindow.cxx4
-rw-r--r--dbaccess/source/ui/app/AppTitleWindow.hxx5
-rw-r--r--dbaccess/source/ui/control/FieldControls.cxx8
-rw-r--r--dbaccess/source/ui/control/FieldDescControl.cxx2
-rw-r--r--dbaccess/source/ui/dlg/ConnectionPage.cxx2
-rw-r--r--dbaccess/source/ui/dlg/ConnectionPageSetup.cxx10
-rw-r--r--dbaccess/source/ui/dlg/ConnectionPageSetup.hxx5
-rw-r--r--dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx6
-rw-r--r--dbaccess/source/ui/dlg/DBSetupConnectionPages.hxx8
-rw-r--r--dbaccess/source/ui/dlg/dbadmin.cxx2
-rw-r--r--dbaccess/source/ui/dlg/dbwiz.cxx2
-rw-r--r--dbaccess/source/ui/dlg/detailpages.cxx2
-rw-r--r--dbaccess/source/ui/dlg/generalpage.cxx2
-rw-r--r--dbaccess/source/ui/dlg/sqlmessage.cxx4
-rw-r--r--dbaccess/source/ui/inc/FieldControls.hxx9
-rw-r--r--dbaccess/source/ui/inc/FieldDescControl.hxx3
-rw-r--r--dbaccess/source/ui/inc/GeneralUndo.hxx2
-rw-r--r--dbaccess/source/ui/inc/UITools.hxx3
-rw-r--r--dbaccess/source/ui/inc/dbadmin.hxx3
-rw-r--r--dbaccess/source/ui/misc/UITools.cxx2
-rw-r--r--dbaccess/source/ui/querydesign/QueryDesignFieldUndoAct.hxx4
-rw-r--r--dbaccess/source/ui/querydesign/QueryDesignUndoAction.hxx2
-rw-r--r--dbaccess/source/ui/querydesign/QueryDesignView.cxx2
-rw-r--r--dbaccess/source/ui/querydesign/QueryTabConnUndoAction.cxx2
-rw-r--r--dbaccess/source/ui/querydesign/QueryTabConnUndoAction.hxx2
-rw-r--r--dbaccess/source/ui/querydesign/QueryTabWinUndoAct.cxx4
-rw-r--r--dbaccess/source/ui/querydesign/QueryTabWinUndoAct.hxx2
-rw-r--r--dbaccess/source/ui/querydesign/querycontroller.cxx2
-rw-r--r--dbaccess/source/ui/querydesign/querydlg.cxx2
-rw-r--r--dbaccess/source/ui/tabledesign/TableUndo.cxx4
-rw-r--r--dbaccess/source/ui/tabledesign/TableUndo.hxx4
-rw-r--r--desktop/inc/dp_shared.hxx2
-rw-r--r--desktop/inc/strings.hrc2
-rw-r--r--desktop/source/deployment/gui/dp_gui_dialog2.cxx2
-rw-r--r--desktop/source/deployment/gui/dp_gui_dialog2.hxx3
-rw-r--r--desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx8
-rw-r--r--desktop/source/deployment/registry/help/dp_help.cxx4
-rw-r--r--editeng/inc/strings.hrc8
-rw-r--r--editeng/source/editeng/eerdll.cxx2
-rw-r--r--editeng/source/items/borderline.cxx4
-rw-r--r--editeng/source/items/charhiddenitem.cxx3
-rw-r--r--editeng/source/items/frmitems.cxx22
-rw-r--r--editeng/source/items/itemtype.cxx6
-rw-r--r--editeng/source/items/paraitem.cxx10
-rw-r--r--editeng/source/items/textitem.cxx34
-rw-r--r--editeng/source/misc/splwrap.cxx2
-rw-r--r--editeng/source/misc/unolingu.cxx2
-rw-r--r--extensions/inc/command.hrc6
-rw-r--r--extensions/inc/showhide.hrc4
-rw-r--r--extensions/inc/stringarrays.hrc60
-rw-r--r--extensions/inc/strings.hrc4
-rw-r--r--extensions/inc/yesno.hrc6
-rw-r--r--extensions/source/abpilot/abspilot.cxx2
-rw-r--r--extensions/source/bibliography/bibmod.cxx2
-rw-r--r--extensions/source/bibliography/bibresid.hxx4
-rw-r--r--extensions/source/dbpilots/controlwizard.cxx2
-rw-r--r--extensions/source/inc/componentmodule.cxx2
-rw-r--r--extensions/source/inc/componentmodule.hxx3
-rw-r--r--extensions/source/propctrlr/defaultforminspection.cxx2
-rw-r--r--extensions/source/propctrlr/eventhandler.cxx2
-rw-r--r--extensions/source/propctrlr/eventhandler.hxx3
-rw-r--r--extensions/source/propctrlr/formcomponenthandler.cxx2
-rw-r--r--extensions/source/propctrlr/formmetadata.cxx2
-rw-r--r--extensions/source/propctrlr/handlerhelper.cxx2
-rw-r--r--extensions/source/propctrlr/handlerhelper.hxx3
-rw-r--r--extensions/source/propctrlr/modulepcr.cxx2
-rw-r--r--extensions/source/propctrlr/modulepcr.hxx4
-rw-r--r--extensions/source/scanner/sanedlg.cxx2
-rw-r--r--filter/inc/strings.hrc2
-rw-r--r--filter/source/pdf/impdialog.cxx2
-rw-r--r--filter/source/t602/t602filter.cxx2
-rw-r--r--filter/source/t602/t602filter.hxx3
-rw-r--r--filter/source/xsltdialog/xmlfiltercommon.hxx3
-rw-r--r--filter/source/xsltdialog/xmlfiltersettingsdialog.cxx2
-rw-r--r--filter/source/xsltdialog/xmlfiltertabdialog.cxx7
-rw-r--r--forms/inc/strings.hrc4
-rw-r--r--forms/source/inc/frm_resource.hxx4
-rw-r--r--forms/source/resource/frm_resource.cxx3
-rw-r--r--forms/source/runtime/formoperations.cxx4
-rw-r--r--forms/source/runtime/formoperations.hxx3
-rw-r--r--forms/source/solar/control/navtoolbar.cxx2
-rw-r--r--forms/source/xforms/datatypes.cxx46
-rw-r--r--forms/source/xforms/datatypes.hxx23
-rw-r--r--forms/source/xforms/resourcehelper.cxx8
-rw-r--r--forms/source/xforms/resourcehelper.hxx11
-rw-r--r--formula/inc/core_resource.hrc18
-rw-r--r--formula/inc/core_resource.hxx4
-rw-r--r--formula/inc/strings.hrc2
-rw-r--r--formula/source/core/api/FormulaCompiler.cxx83
-rw-r--r--formula/source/core/resource/core_resource.cxx3
-rw-r--r--fpicker/inc/fpsofficeResMgr.hxx5
-rw-r--r--fpicker/inc/strings.hrc2
-rw-r--r--fpicker/source/aqua/resourceprovider.mm8
-rw-r--r--fpicker/source/office/iodlg.cxx4
-rw-r--r--fpicker/source/win32/resourceprovider.cxx8
-rw-r--r--framework/inc/classes/fwkresid.hxx4
-rw-r--r--framework/inc/strings.hrc2
-rw-r--r--framework/source/fwe/classes/fwkresid.cxx3
-rw-r--r--framework/source/uielement/controlmenucontroller.cxx2
-rw-r--r--include/basic/sbdef.hxx5
-rw-r--r--include/editeng/editrids.hrc2
-rw-r--r--include/editeng/eerdll.hxx3
-rw-r--r--include/editeng/frmdir.hxx3
-rw-r--r--include/editeng/itemtype.hxx3
-rw-r--r--include/fpicker/strings.hrc2
-rw-r--r--include/sfx2/sfxresid.hxx4
-rw-r--r--include/sfx2/strings.hrc2
-rw-r--r--include/sfx2/styfitem.hxx3
-rw-r--r--include/svl/svl.hrc2
-rw-r--r--include/svl/svlresid.hxx4
-rw-r--r--include/svtools/ehdl.hxx2
-rw-r--r--include/svtools/strings.hrc2
-rw-r--r--include/svtools/svtresid.hxx3
-rw-r--r--include/svx/dialmgr.hxx3
-rw-r--r--include/svx/strings.hrc2
-rw-r--r--include/svx/svddrgmt.hxx2
-rw-r--r--include/svx/svdmrkv.hxx4
-rw-r--r--include/svx/svdobj.hxx3
-rw-r--r--include/svx/svdundo.hxx7
-rw-r--r--include/svx/svxitems.hrc4
-rw-r--r--include/svx/xit.hxx3
-rw-r--r--include/unotools/resmgr.hxx18
-rw-r--r--oox/inc/ooxresid.hxx4
-rw-r--r--oox/inc/strings.hrc4
-rw-r--r--oox/source/helper/ooxresid.cxx4
-rw-r--r--reportdesign/inc/UndoActions.hxx8
-rw-r--r--reportdesign/inc/core_resource.hxx4
-rw-r--r--reportdesign/inc/stringarray.hrc34
-rw-r--r--reportdesign/inc/strings.hrc2
-rw-r--r--reportdesign/source/core/resource/core_resource.cxx3
-rw-r--r--reportdesign/source/core/sdr/ReportUndoFactory.cxx2
-rw-r--r--reportdesign/source/core/sdr/UndoActions.cxx10
-rw-r--r--reportdesign/source/ui/dlg/GroupsSorting.cxx4
-rw-r--r--reportdesign/source/ui/inc/GeometryHandler.hxx5
-rw-r--r--reportdesign/source/ui/inc/ReportController.hxx8
-rw-r--r--reportdesign/source/ui/inc/RptUndo.hxx6
-rw-r--r--reportdesign/source/ui/inc/SectionWindow.hxx4
-rw-r--r--reportdesign/source/ui/inspection/DataProviderHandler.cxx2
-rw-r--r--reportdesign/source/ui/inspection/DefaultInspection.cxx2
-rw-r--r--reportdesign/source/ui/inspection/GeometryHandler.cxx16
-rw-r--r--reportdesign/source/ui/misc/RptUndo.cxx8
-rw-r--r--reportdesign/source/ui/report/ReportController.cxx12
-rw-r--r--reportdesign/source/ui/report/SectionWindow.cxx4
-rw-r--r--reportdesign/source/ui/report/propbrw.cxx2
-rw-r--r--sc/inc/compiler.hrc6
-rw-r--r--sc/inc/dpobject.hxx3
-rw-r--r--sc/inc/dpshttab.hxx3
-rw-r--r--sc/inc/globstr.hrc4
-rw-r--r--sc/inc/pvfundlg.hrc4
-rw-r--r--sc/inc/scerrors.hrc4
-rw-r--r--sc/inc/scfuncs.hrc792
-rw-r--r--sc/inc/scresid.hxx5
-rw-r--r--sc/inc/scstyles.hrc10
-rw-r--r--sc/inc/strings.hrc4
-rw-r--r--sc/inc/subtotals.hrc4
-rw-r--r--sc/inc/units.hrc4
-rw-r--r--sc/qa/unit/ucalc_pivottable.cxx6
-rw-r--r--sc/source/core/data/attrib.cxx8
-rw-r--r--sc/source/core/data/dpdimsave.cxx2
-rw-r--r--sc/source/core/data/dpobject.cxx6
-rw-r--r--sc/source/core/data/dpoutput.cxx8
-rw-r--r--sc/source/core/data/dpshttab.cxx6
-rw-r--r--sc/source/core/data/dptabres.cxx6
-rw-r--r--sc/source/core/data/dputil.cxx8
-rw-r--r--sc/source/core/data/funcdesc.cxx2
-rw-r--r--sc/source/core/data/global.cxx4
-rw-r--r--sc/source/core/data/table3.cxx4
-rw-r--r--sc/source/core/tool/autoform.cxx2
-rw-r--r--sc/source/core/tool/chgtrack.cxx4
-rw-r--r--sc/source/filter/excel/xepivot.cxx2
-rw-r--r--sc/source/filter/ftools/fprogressbar.cxx4
-rw-r--r--sc/source/filter/inc/fprogressbar.hxx5
-rw-r--r--sc/source/ui/StatisticsDialogs/AnalysisOfVarianceDialog.cxx12
-rw-r--r--sc/source/ui/StatisticsDialogs/ChiSquareTestDialog.cxx2
-rw-r--r--sc/source/ui/StatisticsDialogs/CovarianceDialog.cxx2
-rw-r--r--sc/source/ui/StatisticsDialogs/DescriptiveStatisticsDialog.cxx6
-rw-r--r--sc/source/ui/StatisticsDialogs/ExponentialSmoothingDialog.cxx2
-rw-r--r--sc/source/ui/StatisticsDialogs/FTestDialog.cxx2
-rw-r--r--sc/source/ui/StatisticsDialogs/FourierAnalysisDialog.cxx2
-rw-r--r--sc/source/ui/StatisticsDialogs/MatrixComparisonGenerator.cxx2
-rw-r--r--sc/source/ui/StatisticsDialogs/MovingAverageDialog.cxx2
-rw-r--r--sc/source/ui/StatisticsDialogs/RandomNumberGeneratorDialog.cxx2
-rw-r--r--sc/source/ui/StatisticsDialogs/RegressionDialog.cxx6
-rw-r--r--sc/source/ui/StatisticsDialogs/TTestDialog.cxx2
-rw-r--r--sc/source/ui/StatisticsDialogs/ZTestDialog.cxx2
-rw-r--r--sc/source/ui/app/inputhdl.cxx2
-rw-r--r--sc/source/ui/app/inputwin.cxx4
-rw-r--r--sc/source/ui/app/scdll.cxx6
-rw-r--r--sc/source/ui/condformat/condformathelper.cxx2
-rw-r--r--sc/source/ui/dbgui/PivotLayoutDialog.cxx2
-rw-r--r--sc/source/ui/dbgui/PivotLayoutTreeListData.cxx2
-rw-r--r--sc/source/ui/dbgui/consdlg.cxx2
-rw-r--r--sc/source/ui/dbgui/dpgroupdlg.cxx2
-rw-r--r--sc/source/ui/dbgui/sfiltdlg.cxx2
-rw-r--r--sc/source/ui/docshell/dbdocfun.cxx2
-rw-r--r--sc/source/ui/docshell/dbdocimp.cxx2
-rw-r--r--sc/source/ui/docshell/docfunc.cxx2
-rw-r--r--sc/source/ui/docshell/docsh5.cxx4
-rw-r--r--sc/source/ui/docshell/editable.cxx4
-rw-r--r--sc/source/ui/drawfunc/fuconrec.cxx2
-rw-r--r--sc/source/ui/inc/AnalysisOfVarianceDialog.hxx2
-rw-r--r--sc/source/ui/inc/ChiSquareTestDialog.hxx2
-rw-r--r--sc/source/ui/inc/CovarianceDialog.hxx2
-rw-r--r--sc/source/ui/inc/DescriptiveStatisticsDialog.hxx2
-rw-r--r--sc/source/ui/inc/ExponentialSmoothingDialog.hxx2
-rw-r--r--sc/source/ui/inc/FTestDialog.hxx2
-rw-r--r--sc/source/ui/inc/FourierAnalysisDialog.hxx2
-rw-r--r--sc/source/ui/inc/MatrixComparisonGenerator.hxx2
-rw-r--r--sc/source/ui/inc/MovingAverageDialog.hxx2
-rw-r--r--sc/source/ui/inc/RandomNumberGeneratorDialog.hxx2
-rw-r--r--sc/source/ui/inc/RegressionDialog.hxx2
-rw-r--r--sc/source/ui/inc/StatisticsInputOutputDialog.hxx2
-rw-r--r--sc/source/ui/inc/StatisticsTwoVariableDialog.hxx2
-rw-r--r--sc/source/ui/inc/TTestDialog.hxx2
-rw-r--r--sc/source/ui/inc/ZTestDialog.hxx2
-rw-r--r--sc/source/ui/inc/docfunc.hxx3
-rw-r--r--sc/source/ui/inc/docsh.hxx2
-rw-r--r--sc/source/ui/inc/editable.hxx3
-rw-r--r--sc/source/ui/inc/tabview.hxx2
-rw-r--r--sc/source/ui/navipi/content.cxx2
-rw-r--r--sc/source/ui/pagedlg/areasdlg.cxx2
-rw-r--r--sc/source/ui/undo/undoblk.cxx2
-rw-r--r--sc/source/ui/undo/undocell.cxx2
-rw-r--r--sc/source/ui/undo/undodat.cxx2
-rw-r--r--sc/source/ui/undo/undostyl.cxx2
-rw-r--r--sc/source/ui/undo/undotab.cxx6
-rw-r--r--sc/source/ui/unoobj/styleuno.cxx2
-rw-r--r--sc/source/ui/unoobj/targuno.cxx2
-rw-r--r--sc/source/ui/view/cellsh1.cxx6
-rw-r--r--sc/source/ui/view/dbfunc3.cxx2
-rw-r--r--sc/source/ui/view/tabview2.cxx4
-rw-r--r--sc/source/ui/view/tabvwsha.cxx2
-rw-r--r--sc/source/ui/view/viewfunc.cxx2
-rw-r--r--scaddins/inc/analysis.hrc206
-rw-r--r--scaddins/inc/datefunc.hrc20
-rw-r--r--scaddins/inc/pricing.hrc12
-rw-r--r--scaddins/inc/strings.hrc2
-rw-r--r--scaddins/source/analysis/analysis.cxx4
-rw-r--r--scaddins/source/analysis/analysis.hxx5
-rw-r--r--scaddins/source/analysis/analysishelper.hxx17
-rw-r--r--scaddins/source/datefunc/datefunc.cxx4
-rw-r--r--scaddins/source/datefunc/datefunc.hxx17
-rw-r--r--scaddins/source/pricing/pricing.cxx4
-rw-r--r--scaddins/source/pricing/pricing.hxx17
-rw-r--r--sccomp/inc/strings.hrc2
-rw-r--r--sccomp/source/solver/CoinMPSolver.cxx1
-rw-r--r--sccomp/source/solver/LpsolveSolver.cxx1
-rw-r--r--sccomp/source/solver/SolverComponent.cxx4
-rw-r--r--sccomp/source/solver/SolverComponent.hxx3
-rw-r--r--sccomp/source/solver/SwarmSolver.cxx8
-rw-r--r--scripting/Library_dlgprov.mk1
-rw-r--r--sd/inc/DocumentRenderer.hrc22
-rw-r--r--sd/inc/errhdl.hrc4
-rw-r--r--sd/inc/family.hrc10
-rw-r--r--sd/inc/pageformatpanel.hrc6
-rw-r--r--sd/inc/sdresid.hxx5
-rw-r--r--sd/inc/strings.hrc4
-rw-r--r--sd/source/core/stlpool.cxx4
-rw-r--r--sd/source/filter/grf/sdgrffilter.cxx6
-rw-r--r--sd/source/filter/html/htmlex.cxx5
-rw-r--r--sd/source/filter/html/htmlex.hxx7
-rw-r--r--sd/source/ui/annotations/annotationmanager.cxx2
-rw-r--r--sd/source/ui/app/sdmod.cxx6
-rw-r--r--sd/source/ui/controller/displaymodecontroller.cxx6
-rw-r--r--sd/source/ui/controller/slidelayoutcontroller.cxx10
-rw-r--r--sd/source/ui/dlg/PaneChildWindows.cxx2
-rw-r--r--sd/source/ui/dlg/tpaction.cxx6
-rw-r--r--sd/source/ui/func/fuconrec.cxx2
-rw-r--r--sd/source/ui/inc/PaneChildWindows.hxx3
-rw-r--r--sd/source/ui/inc/tpaction.hxx2
-rw-r--r--sd/source/ui/sidebar/LayoutMenu.cxx10
-rw-r--r--sd/source/ui/sidebar/MasterPageContainer.cxx8
-rw-r--r--sd/source/ui/view/DocumentRenderer.cxx2
-rw-r--r--sd/source/ui/view/Outliner.cxx2
-rw-r--r--sd/source/ui/view/drviews2.cxx2
-rw-r--r--sd/source/ui/view/viewoverlaymanager.cxx2
-rw-r--r--sfx2/inc/dinfdlg.hrc6
-rw-r--r--sfx2/inc/doctempl.hrc4
-rw-r--r--sfx2/source/appl/opengrf.cxx2
-rw-r--r--sfx2/source/bastyp/sfxresid.cxx3
-rw-r--r--sfx2/source/control/msgpool.cxx6
-rw-r--r--sfx2/source/devtools/DevToolsStrings.hrc3
-rw-r--r--sfx2/source/dialog/styfitem.cxx4
-rw-r--r--sfx2/source/doc/doctempl.cxx2
-rw-r--r--sfx2/source/doc/doctemplates.cxx2
-rw-r--r--sfx2/source/doc/objstor.cxx2
-rw-r--r--shell/inc/spsupp/spsuppStrings.hrc2
-rw-r--r--shell/source/win32/spsupp/spsuppHelper.cxx2
-rwxr-xr-xsolenv/bin/install-gdb-printers3
-rw-r--r--solenv/gdb/libreoffice/utl.py39
-rw-r--r--starmath/inc/ElementsDockingWindow.hxx11
-rw-r--r--starmath/inc/parsebase.hxx3
-rw-r--r--starmath/inc/smmod.hrc6
-rw-r--r--starmath/inc/smmod.hxx2
-rw-r--r--starmath/inc/strings.hrc2
-rw-r--r--starmath/source/AccessibleSmElementsControl.cxx4
-rw-r--r--starmath/source/ElementsDockingWindow.cxx76
-rw-r--r--starmath/source/parsebase.cxx2
-rw-r--r--starmath/source/smmod.cxx11
-rw-r--r--starmath/source/uiobject.cxx2
-rw-r--r--svl/source/misc/getstringresource.cxx5
-rw-r--r--svtools/inc/borderline.hrc4
-rw-r--r--svtools/inc/errtxt.hrc14
-rw-r--r--svtools/inc/langtab.hrc4
-rw-r--r--svtools/source/dialogs/insdlg.cxx4
-rw-r--r--svtools/source/dialogs/prnsetup.cxx2
-rw-r--r--svtools/source/misc/ehdl.cxx2
-rw-r--r--svtools/source/misc/imagemgr.cxx40
-rw-r--r--svtools/source/misc/svtresid.cxx3
-rw-r--r--svx/inc/DescriptionGenerator.hxx3
-rw-r--r--svx/inc/fieldunit.hrc4
-rw-r--r--svx/inc/fmstring.hrc4
-rw-r--r--svx/inc/formnavi.hrc4
-rw-r--r--svx/inc/frmsel.hrc6
-rw-r--r--svx/inc/inspectorvalues.hrc4
-rw-r--r--svx/inc/numberingtype.hrc4
-rw-r--r--svx/inc/rotationstrings.hrc4
-rw-r--r--svx/inc/samecontent.hrc4
-rw-r--r--svx/inc/spacing.hrc12
-rw-r--r--svx/inc/svxerr.hrc6
-rw-r--r--svx/inc/swframeposstrings.hrc4
-rw-r--r--svx/inc/tabwin.hrc4
-rw-r--r--svx/inc/txenctab.hrc4
-rw-r--r--svx/source/accessibility/DescriptionGenerator.cxx2
-rw-r--r--svx/source/accessibility/ShapeTypeHandler.cxx6
-rw-r--r--svx/source/accessibility/svxrectctaccessiblecontext.cxx4
-rw-r--r--svx/source/dialog/dialmgr.cxx3
-rw-r--r--svx/source/dialog/docrecovery.cxx2
-rw-r--r--svx/source/dialog/page.hrc6
-rw-r--r--svx/source/dialog/papersizelistbox.cxx2
-rw-r--r--svx/source/dialog/svxbmpnumvalueset.cxx6
-rw-r--r--svx/source/dialog/svxruler.cxx2
-rw-r--r--svx/source/fmcomp/fmgridcl.cxx4
-rw-r--r--svx/source/form/datanavi.cxx12
-rw-r--r--svx/source/form/fmPropBrw.cxx2
-rw-r--r--svx/source/form/formcontrolfactory.cxx4
-rw-r--r--svx/source/gallery2/gallery1.cxx2
-rw-r--r--svx/source/items/algitem.cxx3
-rw-r--r--svx/source/items/pageitem.cxx2
-rw-r--r--svx/source/sidebar/nbdtmg.cxx8
-rw-r--r--svx/source/stbctrls/modctrl.cxx2
-rw-r--r--svx/source/stbctrls/xmlsecctrl.cxx2
-rw-r--r--svx/source/svdraw/ActionDescriptionProvider.cxx2
-rw-r--r--svx/source/svdraw/svdattr.cxx26
-rw-r--r--svx/source/svdraw/svddrgmt.cxx2
-rw-r--r--svx/source/svdraw/svdedtv2.cxx2
-rw-r--r--svx/source/svdraw/svdmrkv.cxx2
-rw-r--r--svx/source/svdraw/svdobj.cxx2
-rw-r--r--svx/source/svdraw/svdocirc.cxx4
-rw-r--r--svx/source/svdraw/svdograf.cxx4
-rw-r--r--svx/source/svdraw/svdopath.cxx4
-rw-r--r--svx/source/svdraw/svdorect.cxx4
-rw-r--r--svx/source/svdraw/svdundo.cxx6
-rw-r--r--svx/source/tbxctrls/extrusioncontrols.cxx8
-rw-r--r--svx/source/tbxctrls/lboxctrl.cxx2
-rw-r--r--svx/source/toolbars/extrusionbar.cxx2
-rw-r--r--svx/source/toolbars/fontworkbar.cxx2
-rw-r--r--svx/source/unodraw/unoprov.cxx153
-rw-r--r--svx/source/xoutdev/xattr.cxx6
-rw-r--r--svx/source/xoutdev/xattr2.cxx4
-rw-r--r--svx/source/xoutdev/xattrbmp.cxx1
-rw-r--r--sw/inc/AccessibilityCheckStrings.hrc2
-rw-r--r--sw/inc/app.hrc26
-rw-r--r--sw/inc/cnttab.hrc4
-rw-r--r--sw/inc/dbui.hrc6
-rw-r--r--sw/inc/error.hrc4
-rw-r--r--sw/inc/flddinf.hrc4
-rw-r--r--sw/inc/fldref.hrc4
-rw-r--r--sw/inc/inspectorproperties.hrc4
-rw-r--r--sw/inc/mdiexp.hxx3
-rw-r--r--sw/inc/mmaddressblockpage.hrc6
-rw-r--r--sw/inc/optload.hrc4
-rw-r--r--sw/inc/outline.hrc4
-rw-r--r--sw/inc/pageformatpanel.hrc6
-rw-r--r--sw/inc/strings.hrc4
-rw-r--r--sw/inc/swtypes.hxx5
-rw-r--r--sw/inc/utlui.hrc4
-rw-r--r--sw/source/core/access/acccontext.cxx2
-rw-r--r--sw/source/core/access/acccontext.hxx3
-rw-r--r--sw/source/core/access/accfootnote.cxx4
-rw-r--r--sw/source/core/access/accheaderfooter.cxx2
-rw-r--r--sw/source/core/doc/DocumentStylePoolManager.cxx30
-rw-r--r--sw/source/core/doc/doclay.cxx6
-rw-r--r--sw/source/core/doc/docredln.cxx2
-rw-r--r--sw/source/core/doc/notxtfrm.cxx2
-rw-r--r--sw/source/core/fields/reffld.cxx2
-rw-r--r--sw/source/core/frmedt/feshview.cxx2
-rw-r--r--sw/source/core/layout/pagedesc.cxx2
-rw-r--r--sw/source/core/tox/tox.cxx22
-rw-r--r--sw/source/core/tox/txmsrt.cxx2
-rw-r--r--sw/source/core/undo/undobj.cxx2
-rw-r--r--sw/source/core/unocore/unosett.cxx2
-rw-r--r--sw/source/core/unocore/unostyle.cxx6
-rw-r--r--sw/source/ui/fldui/flddok.cxx2
-rw-r--r--sw/source/ui/fldui/fldfunc.cxx2
-rw-r--r--sw/source/ui/fldui/fldref.cxx2
-rw-r--r--sw/source/ui/index/cnttab.cxx12
-rw-r--r--sw/source/ui/index/swuiidxmrk.cxx2
-rw-r--r--sw/source/uibase/app/docsh2.cxx2
-rw-r--r--sw/source/uibase/app/mainwn.cxx2
-rw-r--r--sw/source/uibase/app/swmodule.cxx6
-rw-r--r--sw/source/uibase/dochdl/swdtflvr.cxx14
-rw-r--r--sw/source/uibase/docvw/SidebarTxtControl.cxx4
-rw-r--r--sw/source/uibase/docvw/edtwin2.cxx2
-rw-r--r--sw/source/uibase/fldui/fldmgr.cxx62
-rw-r--r--sw/source/uibase/misc/redlndlg.cxx2
-rw-r--r--sw/source/uibase/misc/swruler.cxx2
-rw-r--r--sw/source/uibase/ribbar/workctrl.cxx10
-rw-r--r--sw/source/uibase/shells/textfld.cxx2
-rw-r--r--sw/source/uibase/sidebar/WriterInspectorTextPanel.cxx2
-rw-r--r--sw/source/uibase/uiview/view2.cxx8
-rw-r--r--sw/source/uibase/uiview/viewprt.cxx2
-rw-r--r--sw/source/uibase/utlui/attrdesc.cxx34
-rw-r--r--sw/source/uibase/utlui/content.cxx6
-rw-r--r--sw/source/uibase/utlui/glbltree.cxx2
-rw-r--r--sw/source/uibase/utlui/initui.cxx6
-rw-r--r--sw/source/uibase/utlui/navipi.cxx4
-rw-r--r--sw/source/uibase/wrtsh/wrtundo.cxx2
-rw-r--r--unotools/source/i18n/resmgr.cxx128
-rw-r--r--uui/inc/ids.hrc6
-rw-r--r--uui/inc/strings.hrc2
-rw-r--r--uui/source/iahndl-ssl.cxx4
-rw-r--r--uui/source/iahndl.cxx2
-rw-r--r--uui/source/iahndl.hxx5
-rw-r--r--uui/source/passworddlg.cxx6
-rw-r--r--writerperfect/inc/WPFTResMgr.hxx5
-rw-r--r--writerperfect/inc/strings.hrc2
-rw-r--r--xmlsecurity/inc/certificatechooser.hxx3
-rw-r--r--xmlsecurity/inc/resourcemanager.hxx5
-rw-r--r--xmlsecurity/inc/strings.hrc2
-rw-r--r--xmlsecurity/source/dialogs/certificatechooser.cxx2
490 files changed, 1993 insertions, 1849 deletions
diff --git a/avmedia/inc/strings.hrc b/avmedia/inc/strings.hrc
index 26e6b8fbd478..084bdf5353cf 100644
--- a/avmedia/inc/strings.hrc
+++ b/avmedia/inc/strings.hrc
@@ -19,7 +19,7 @@
#pragma once
-#define NC_(Context, String) reinterpret_cast<char const *>(Context "\004" u8##String)
+#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
#define AVMEDIA_STR_OPEN NC_("AVMEDIA_STR_OPEN", "Open")
#define AVMEDIA_STR_INSERT NC_("AVMEDIA_STR_INSERT", "Apply")
diff --git a/avmedia/source/inc/mediamisc.hxx b/avmedia/source/inc/mediamisc.hxx
index 014a73c6c56f..542dbe5f1f74 100644
--- a/avmedia/source/inc/mediamisc.hxx
+++ b/avmedia/source/inc/mediamisc.hxx
@@ -35,7 +35,7 @@
// Mime types
#define AVMEDIA_MIMETYPE_COMMON "application/vnd.sun.star.media"
-inline OUString AvmResId(std::string_view aId)
+inline OUString AvmResId(TranslateId aId)
{
return Translate::get(aId, Translate::Create("avmedia"));
}
diff --git a/basctl/inc/strings.hrc b/basctl/inc/strings.hrc
index a5a0a4660b59..63f68ba0fcf9 100644
--- a/basctl/inc/strings.hrc
+++ b/basctl/inc/strings.hrc
@@ -20,7 +20,7 @@
#ifndef BASCTL_INC_BASIDESH_HRC
#define BASCTL_INC_BASIDESH_HRC
-#define NC_(Context, String) reinterpret_cast<char const *>(Context "\004" u8##String)
+#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
#define RID_STR_FILTER_ALLFILES NC_("RID_STR_FILTER_ALLFILES", "<All>")
#define RID_STR_NOMODULE NC_("RID_STR_NOMODULE", "< No Module >")
diff --git a/basctl/source/basicide/iderdll.cxx b/basctl/source/basicide/iderdll.cxx
index a6f3abd68edb..022045050e9a 100644
--- a/basctl/source/basicide/iderdll.cxx
+++ b/basctl/source/basicide/iderdll.cxx
@@ -105,7 +105,7 @@ ExtraData* GetExtraData()
return nullptr;
}
-OUString IDEResId(std::string_view aId)
+OUString IDEResId(TranslateId aId)
{
return Translate::get(aId, SfxApplication::GetModule(SfxToolsModule::Basic)->GetResLocale());
}
diff --git a/basctl/source/inc/iderid.hxx b/basctl/source/inc/iderid.hxx
index 254d481ad614..83cbc3d0c4aa 100644
--- a/basctl/source/inc/iderid.hxx
+++ b/basctl/source/inc/iderid.hxx
@@ -20,11 +20,11 @@
#pragma once
#include <rtl/ustring.hxx>
-#include <string_view>
+#include <unotools/resmgr.hxx>
namespace basctl
{
-OUString IDEResId(std::string_view aId);
+OUString IDEResId(TranslateId aId);
} // namespace basctl
diff --git a/basic/inc/basic.hrc b/basic/inc/basic.hrc
index 1a063615318e..3208737a2564 100644
--- a/basic/inc/basic.hrc
+++ b/basic/inc/basic.hrc
@@ -19,9 +19,9 @@
#pragma once
-#define NC_(Context, String) reinterpret_cast<char const *>(Context "\004" u8##String)
+#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
-std::pair<const char*, ErrCode> const RID_BASIC_START[] =
+std::pair<TranslateId, ErrCode> const RID_BASIC_START[] =
{
{ NC_("RID_BASIC_START", "Syntax error."), ERRCODE_BASIC_SYNTAX },
{ NC_("RID_BASIC_START", "Return without Gosub."), ERRCODE_BASIC_NO_GOSUB },
@@ -152,7 +152,7 @@ std::pair<const char*, ErrCode> const RID_BASIC_START[] =
{ NC_("RID_BASIC_START", "Too many DLL application clients."), ERRCODE_BASIC_TOO_MANY_DLL },
{ NC_("RID_BASIC_START", "For loop not initialized."), ERRCODE_BASIC_LOOP_NOT_INIT },
{ NC_("RID_BASIC_START", "$(ARG1)"), ERRCODE_BASIC_COMPAT },
- { nullptr, ERRCODE_NONE }
+ { {}, ERRCODE_NONE }
};
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/basic/inc/strings.hrc b/basic/inc/strings.hrc
index ff8e0fc22618..7aeb2831a64a 100644
--- a/basic/inc/strings.hrc
+++ b/basic/inc/strings.hrc
@@ -19,7 +19,7 @@
#pragma once
-#define NC_(Context, String) reinterpret_cast<char const *>(Context "\004" u8##String)
+#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
#define STR_BASICKEY_FORMAT_ON NC_("STR_BASICKEY_FORMAT_ON", "On")
#define STR_BASICKEY_FORMAT_OFF NC_("STR_BASICKEY_FORMAT_OFF", "Off")
diff --git a/basic/source/classes/sb.cxx b/basic/source/classes/sb.cxx
index d394c9c8d9a1..e4ee5b508451 100644
--- a/basic/source/classes/sb.cxx
+++ b/basic/source/classes/sb.cxx
@@ -1543,8 +1543,8 @@ void StarBASIC::MakeErrorText( ErrCode nId, std::u16string_view aMsg )
SolarMutexGuard aSolarGuard;
sal_uInt16 nOldID = GetVBErrorCode( nId );
- const char* pErrorMsg = nullptr;
- for (std::pair<const char *, ErrCode> const *pItem = RID_BASIC_START; pItem->second; ++pItem)
+ TranslateId pErrorMsg;
+ for (std::pair<TranslateId, ErrCode> const *pItem = RID_BASIC_START; pItem->second; ++pItem)
{
if (nId == pItem->second)
{
diff --git a/basic/source/sbx/sbxscan.cxx b/basic/source/sbx/sbxscan.cxx
index b59f948aa6d8..a632a689a42f 100644
--- a/basic/source/sbx/sbxscan.cxx
+++ b/basic/source/sbx/sbxscan.cxx
@@ -591,7 +591,7 @@ std::locale BasResLocale()
return Translate::Create("sb");
}
-OUString BasResId(std::string_view aId)
+OUString BasResId(TranslateId aId)
{
return Translate::get(aId, BasResLocale());
}
diff --git a/chart2/inc/chart.hrc b/chart2/inc/chart.hrc
index 4620a78be366..a43ce2a78993 100644
--- a/chart2/inc/chart.hrc
+++ b/chart2/inc/chart.hrc
@@ -9,9 +9,9 @@
#pragma once
-#define NC_(Context, String) reinterpret_cast<char const *>(Context "\004" u8##String)
+#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
-const char* CHART_TYPE[] =
+const TranslateId CHART_TYPE[] =
{
NC_("tp_ChartType|liststore1", "Bar"),
NC_("tp_ChartType|liststore1", "Cylinder"),
diff --git a/chart2/inc/strings.hrc b/chart2/inc/strings.hrc
index 163b0f44e902..ab6ca48c8376 100644
--- a/chart2/inc/strings.hrc
+++ b/chart2/inc/strings.hrc
@@ -19,7 +19,7 @@
#ifndef CHART_STRINGS_HRC
#define CHART_STRINGS_HRC
-#define NC_(Context, String) reinterpret_cast<char const *>(Context "\004" u8##String)
+#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(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")
diff --git a/chart2/source/controller/dialogs/dlg_CreationWizard.cxx b/chart2/source/controller/dialogs/dlg_CreationWizard.cxx
index da073c2f9956..e35dfb8a166e 100644
--- a/chart2/source/controller/dialogs/dlg_CreationWizard.cxx
+++ b/chart2/source/controller/dialogs/dlg_CreationWizard.cxx
@@ -171,7 +171,7 @@ void CreationWizard::setValidPage(BuilderPage* pTabPage)
OUString CreationWizard::getStateDisplayName( WizardState nState ) const
{
- const char* pResId = nullptr;
+ TranslateId pResId;
switch( nState )
{
case STATE_CHARTTYPE:
diff --git a/chart2/source/controller/dialogs/tp_Scale.cxx b/chart2/source/controller/dialogs/tp_Scale.cxx
index db2ba248ee8e..e605b17c9891 100644
--- a/chart2/source/controller/dialogs/tp_Scale.cxx
+++ b/chart2/source/controller/dialogs/tp_Scale.cxx
@@ -395,7 +395,7 @@ DeactivateRC ScaleTabPage::DeactivatePage(SfxItemSet* pItemSet)
nStepFmt = 0;
weld::Widget* pControl = nullptr;
- const char* pErrStrId = nullptr;
+ TranslateId pErrStrId;
double fDummy;
fMax = m_xFmtFldMax->GetFormatter().GetValue();
@@ -583,9 +583,9 @@ void ScaleTabPage::ShowAxisOrigin( bool bShowOrigin )
m_bShowAxisOrigin = true;
}
-bool ScaleTabPage::ShowWarning(const char* pResIdMessage, weld::Widget* pControl /* = nullptr */)
+bool ScaleTabPage::ShowWarning(TranslateId pResIdMessage, weld::Widget* pControl /* = nullptr */)
{
- if (pResIdMessage == nullptr)
+ if (!pResIdMessage)
return false;
std::unique_ptr<weld::MessageDialog> xWarn(Application::CreateMessageDialog(GetFrameWeld(),
diff --git a/chart2/source/controller/dialogs/tp_Scale.hxx b/chart2/source/controller/dialogs/tp_Scale.hxx
index 101e6df1cede..b90d3ef20211 100644
--- a/chart2/source/controller/dialogs/tp_Scale.hxx
+++ b/chart2/source/controller/dialogs/tp_Scale.hxx
@@ -19,6 +19,7 @@
#pragma once
#include <sfx2/tabdlg.hxx>
+#include <unotools/resmgr.hxx>
namespace chart
{
@@ -98,7 +99,7 @@ private:
@return false, if nResIdMessage was 0, true otherwise
*/
- bool ShowWarning(const char* pResIdMessage, weld::Widget* pControl);
+ bool ShowWarning(TranslateId pResIdMessage, weld::Widget* pControl);
void HideAllControls();
};
diff --git a/chart2/source/controller/main/ChartController_Tools.cxx b/chart2/source/controller/main/ChartController_Tools.cxx
index 093cbcdaeac8..0515bc84ccb7 100644
--- a/chart2/source/controller/main/ChartController_Tools.cxx
+++ b/chart2/source/controller/main/ChartController_Tools.cxx
@@ -725,7 +725,7 @@ bool ChartController::executeDispatch_Delete()
ObjectIdentifier::getObjectPropertySet( aCID, getModel() ));
if( xErrorBarProp.is())
{
- const char* pId;
+ TranslateId pId;
if ( aObjectType == OBJECTTYPE_DATA_ERRORS_X )
pId = STR_OBJECT_ERROR_BARS_X;
diff --git a/chart2/source/controller/main/DrawCommandDispatch.cxx b/chart2/source/controller/main/DrawCommandDispatch.cxx
index 545f600f36a2..1de375c1f281 100644
--- a/chart2/source/controller/main/DrawCommandDispatch.cxx
+++ b/chart2/source/controller/main/DrawCommandDispatch.cxx
@@ -73,7 +73,7 @@ bool DrawCommandDispatch::isFeatureSupported( const OUString& rCommandURL )
return parseCommandURL( rCommandURL, &nFeatureId, &aBaseCommand, &aCustomShapeType );
}
-static ::basegfx::B2DPolyPolygon getPolygon(const char* pResId, const SdrModel& rModel)
+static ::basegfx::B2DPolyPolygon getPolygon(TranslateId pResId, const SdrModel& rModel)
{
::basegfx::B2DPolyPolygon aReturn;
XLineEndListRef pLineEndList = rModel.GetLineEndList();
diff --git a/chart2/source/inc/ResId.hxx b/chart2/source/inc/ResId.hxx
index 91dc561e2cb9..48baf852ab04 100644
--- a/chart2/source/inc/ResId.hxx
+++ b/chart2/source/inc/ResId.hxx
@@ -20,11 +20,11 @@
#include <rtl/ustring.hxx>
#include "charttoolsdllapi.hxx"
-#include <string_view>
+#include <unotools/resmgr.hxx>
namespace chart
{
-OUString OOO_DLLPUBLIC_CHARTTOOLS SchResId(std::string_view aId);
+OUString OOO_DLLPUBLIC_CHARTTOOLS SchResId(TranslateId aId);
} // namespace chart
diff --git a/chart2/source/tools/ResId.cxx b/chart2/source/tools/ResId.cxx
index 7a19075a57b3..aaa1d840c95c 100644
--- a/chart2/source/tools/ResId.cxx
+++ b/chart2/source/tools/ResId.cxx
@@ -18,11 +18,10 @@
*/
#include <ResId.hxx>
-#include <unotools/resmgr.hxx>
namespace chart
{
- OUString SchResId(std::string_view aId)
+ OUString SchResId(TranslateId aId)
{
return Translate::get(aId, Translate::Create("chart"));
}
diff --git a/connectivity/CppunitTest_connectivity_sharedresources.mk b/connectivity/CppunitTest_connectivity_sharedresources.mk
index 9af3f8ca2442..f9f8172c6fce 100644
--- a/connectivity/CppunitTest_connectivity_sharedresources.mk
+++ b/connectivity/CppunitTest_connectivity_sharedresources.mk
@@ -30,6 +30,7 @@ $(eval $(call gb_CppunitTest_use_libraries,connectivity_sharedresources, \
dbtools \
sal \
test \
+ utl \
unotest \
))
diff --git a/connectivity/Library_ado.mk b/connectivity/Library_ado.mk
index ca9633eca0bd..4886c5aa6d61 100644
--- a/connectivity/Library_ado.mk
+++ b/connectivity/Library_ado.mk
@@ -42,6 +42,7 @@ $(eval $(call gb_Library_use_libraries,ado,\
cppuhelper \
sal \
salhelper \
+ utl \
dbtools \
comphelper \
))
diff --git a/connectivity/Library_mysql_jdbc.mk b/connectivity/Library_mysql_jdbc.mk
index b6916ce784b1..ce4649f88580 100644
--- a/connectivity/Library_mysql_jdbc.mk
+++ b/connectivity/Library_mysql_jdbc.mk
@@ -29,6 +29,7 @@ $(eval $(call gb_Library_use_libraries,mysql_jdbc,\
cppuhelper \
sal \
salhelper \
+ utl \
dbtools \
comphelper \
))
diff --git a/connectivity/Library_odbc.mk b/connectivity/Library_odbc.mk
index ae2b131c3649..9ab70270cfc7 100644
--- a/connectivity/Library_odbc.mk
+++ b/connectivity/Library_odbc.mk
@@ -41,6 +41,7 @@ $(eval $(call gb_Library_use_libraries,odbc,\
dbtools \
sal \
salhelper \
+ utl \
))
$(eval $(call gb_Library_add_exception_objects,odbc,\
diff --git a/connectivity/inc/strings.hrc b/connectivity/inc/strings.hrc
index ce4177493bd9..47a857bd1226 100644
--- a/connectivity/inc/strings.hrc
+++ b/connectivity/inc/strings.hrc
@@ -19,7 +19,7 @@
#pragma once
-#define NC_(Context, String) reinterpret_cast<char const *>(Context "\004" u8##String)
+#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
// = common strings
#define STR_NO_CONNECTION_GIVEN NC_("STR_NO_CONNECTION_GIVEN", "No connection to the database exists.")
diff --git a/connectivity/source/commontools/TConnection.cxx b/connectivity/source/commontools/TConnection.cxx
index 134aa5960115..89ab7e9ca11d 100644
--- a/connectivity/source/commontools/TConnection.cxx
+++ b/connectivity/source/commontools/TConnection.cxx
@@ -75,7 +75,7 @@ Sequence< sal_Int8 > OMetaConnection::getUnoTunnelId()
return s_aPropertyNameMap;
}
-void OMetaConnection::throwGenericSQLException(const char* pErrorResourceId, const Reference< XInterface>& _xContext )
+void OMetaConnection::throwGenericSQLException(TranslateId pErrorResourceId, const Reference< XInterface>& _xContext )
{
OUString sErrorMessage;
if (pErrorResourceId)
diff --git a/connectivity/source/commontools/sqlerror.cxx b/connectivity/source/commontools/sqlerror.cxx
index 513a5cf9dc81..383743906520 100644
--- a/connectivity/source/commontools/sqlerror.cxx
+++ b/connectivity/source/commontools/sqlerror.cxx
@@ -103,7 +103,7 @@ namespace connectivity
_rMessage = _rMessage.replaceAt( nIndex, nPlaceholderLen, *rParamValue );
}
- const char* lcl_getResourceErrorID(const ErrorCondition _eCondition)
+ TranslateId lcl_getResourceErrorID(const ErrorCondition _eCondition)
{
switch (_eCondition)
{
@@ -126,7 +126,7 @@ namespace connectivity
case css::sdb::ErrorCondition::DATA_CANNOT_SELECT_UNFILTERED:
return STR_DATA_CANNOT_SELECT_UNFILTERED;
}
- return nullptr;
+ return {};
}
OUString lcl_getResourceState(const ErrorCondition _eCondition)
diff --git a/connectivity/source/drivers/dbase/DIndex.cxx b/connectivity/source/drivers/dbase/DIndex.cxx
index d168de39eb77..04f46be9a513 100644
--- a/connectivity/source/drivers/dbase/DIndex.cxx
+++ b/connectivity/source/drivers/dbase/DIndex.cxx
@@ -461,7 +461,7 @@ void ODbaseIndex::DropImpl()
}
}
-void ODbaseIndex::impl_killFileAndthrowError_throw(const char* pErrorId, const OUString& _sFile)
+void ODbaseIndex::impl_killFileAndthrowError_throw(TranslateId pErrorId, const OUString& _sFile)
{
closeImpl();
if(UCBContentHelper::Exists(_sFile))
diff --git a/connectivity/source/drivers/dbase/DTable.cxx b/connectivity/source/drivers/dbase/DTable.cxx
index 5b1ea452f61a..f597ce615b5f 100644
--- a/connectivity/source/drivers/dbase/DTable.cxx
+++ b/connectivity/source/drivers/dbase/DTable.cxx
@@ -1103,7 +1103,7 @@ bool ODbaseTable::CreateImpl()
return true;
}
-void ODbaseTable::throwInvalidColumnType(const char* pErrorId, const OUString& _sColumnName)
+void ODbaseTable::throwInvalidColumnType(TranslateId pErrorId, const OUString& _sColumnName)
{
try
{
diff --git a/connectivity/source/drivers/file/FResultSet.cxx b/connectivity/source/drivers/file/FResultSet.cxx
index 595ca2be7281..4d29f1de7a84 100644
--- a/connectivity/source/drivers/file/FResultSet.cxx
+++ b/connectivity/source/drivers/file/FResultSet.cxx
@@ -57,7 +57,7 @@ using namespace com::sun::star::container;
namespace
{
- void lcl_throwError(const char* pErrorId, const css::uno::Reference< css::uno::XInterface>& _xContext)
+ void lcl_throwError(TranslateId pErrorId, const css::uno::Reference< css::uno::XInterface>& _xContext)
{
::connectivity::SharedResources aResources;
const OUString sMessage = aResources.getResourceString(pErrorId);
diff --git a/connectivity/source/drivers/macab/MacabStatement.cxx b/connectivity/source/drivers/macab/MacabStatement.cxx
index 1f317150d249..6c8a02cd7391 100644
--- a/connectivity/source/drivers/macab/MacabStatement.cxx
+++ b/connectivity/source/drivers/macab/MacabStatement.cxx
@@ -47,7 +47,7 @@ using namespace com::sun::star::util;
namespace connectivity::macab
{
- void impl_throwError(const char* pErrorId)
+ void impl_throwError(TranslateId pErrorId)
{
::connectivity::SharedResources aResources;
const OUString sError( aResources.getResourceString(pErrorId) );
diff --git a/connectivity/source/drivers/macab/macabutilities.hxx b/connectivity/source/drivers/macab/macabutilities.hxx
index abf65c73d152..cfe46f37f286 100644
--- a/connectivity/source/drivers/macab/macabutilities.hxx
+++ b/connectivity/source/drivers/macab/macabutilities.hxx
@@ -21,6 +21,7 @@
#include <com/sun/star/util/DateTime.hpp>
#include <com/sun/star/sdbc/DataType.hpp>
+#include <unotools/resmgr.hxx>
#include <time.h>
#include <premac.h>
@@ -131,7 +132,7 @@ namespace connectivity::macab
return dataType;
}
- void impl_throwError(const char* pErrorId);
+ void impl_throwError(TranslateId pErrorId);
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/connectivity/source/inc/TConnection.hxx b/connectivity/source/inc/TConnection.hxx
index 0e9c4c22e750..246e968b8a32 100644
--- a/connectivity/source/inc/TConnection.hxx
+++ b/connectivity/source/inc/TConnection.hxx
@@ -61,7 +61,7 @@ namespace connectivity
rtl_TextEncoding getTextEncoding() const { return m_nTextEncoding; }
const OUString& getURL() const { return m_sURL; }
void setURL(const OUString& _rsUrl) { m_sURL = _rsUrl; }
- void throwGenericSQLException(const char* pErrorResourceId, const css::uno::Reference< css::uno::XInterface>& _xContext);
+ void throwGenericSQLException(TranslateId pErrorResourceId, const css::uno::Reference< css::uno::XInterface>& _xContext);
const SharedResources& getResources() const { return m_aResources;}
void setConnectionInfo(const css::uno::Sequence< css::beans::PropertyValue >& _aInfo) { m_aConnectionInfo = _aInfo; }
diff --git a/connectivity/source/inc/dbase/DIndex.hxx b/connectivity/source/inc/dbase/DIndex.hxx
index 3c5374f298e2..12d7574e4b28 100644
--- a/connectivity/source/inc/dbase/DIndex.hxx
+++ b/connectivity/source/inc/dbase/DIndex.hxx
@@ -81,7 +81,7 @@ namespace connectivity::dbase
OUString getCompletePath() const;
void closeImpl();
// Closes and kills the index file and throws an error
- void impl_killFileAndthrowError_throw(const char* pErrorId, const OUString& _sFile);
+ void impl_killFileAndthrowError_throw(TranslateId pErrorId, const OUString& _sFile);
protected:
virtual ~ODbaseIndex() override;
public:
diff --git a/connectivity/source/inc/dbase/DTable.hxx b/connectivity/source/inc/dbase/DTable.hxx
index c41ee9f7e9e1..79048b56d96f 100644
--- a/connectivity/source/inc/dbase/DTable.hxx
+++ b/connectivity/source/inc/dbase/DTable.hxx
@@ -130,7 +130,7 @@ namespace connectivity::dbase
/// @throws css::container::ElementExistException
/// @throws css::uno::RuntimeException
void renameImpl( const OUString& newName );
- void throwInvalidColumnType(const char* pErrorId, const OUString& _sColumnName);
+ void throwInvalidColumnType(TranslateId pErrorId, const OUString& _sColumnName);
protected:
virtual void FileClose() override;
diff --git a/connectivity/source/inc/resource/sharedresources.hxx b/connectivity/source/inc/resource/sharedresources.hxx
index 8b4f3f98899d..0c439cdf24e3 100644
--- a/connectivity/source/inc/resource/sharedresources.hxx
+++ b/connectivity/source/inc/resource/sharedresources.hxx
@@ -22,7 +22,7 @@
#include <rtl/ustring.hxx>
#include <vector>
#include <connectivity/dbtoolsdllapi.hxx>
-
+#include <unotools/resmgr.hxx>
namespace connectivity
{
@@ -47,7 +47,7 @@ namespace connectivity
*/
OUString
getResourceString(
- const char* pResId
+ TranslateId pResId
) const;
/** loads a string from the shared resource file, and replaces
@@ -65,7 +65,7 @@ namespace connectivity
*/
OUString
getResourceStringWithSubstitution(
- const char* pResId,
+ TranslateId pResId,
const char* _pAsciiPatternToReplace,
const OUString& _rStringToSubstitute
) const;
@@ -89,7 +89,7 @@ namespace connectivity
*/
OUString
getResourceStringWithSubstitution(
- const char* pResId,
+ TranslateId pResId,
const char* _pAsciiPatternToReplace1,
const OUString& _rStringToSubstitute1,
const char* _pAsciiPatternToReplace2,
@@ -119,7 +119,7 @@ namespace connectivity
*/
OUString
getResourceStringWithSubstitution(
- const char* pResId,
+ TranslateId pResId,
const char* _pAsciiPatternToReplace1,
const OUString& _rStringToSubstitute1,
const char* _pAsciiPatternToReplace2,
@@ -138,7 +138,7 @@ namespace connectivity
@return
the string from the resource file, with applied string substitution
*/
- OUString getResourceStringWithSubstitution( const char* pResId,
+ OUString getResourceStringWithSubstitution( TranslateId pResId,
const std::vector< std::pair<const char* , OUString > >& _rStringToSubstitutes) const;
};
diff --git a/connectivity/source/resource/sharedresources.cxx b/connectivity/source/resource/sharedresources.cxx
index 3f7062f6be52..b7c204c9f1cc 100644
--- a/connectivity/source/resource/sharedresources.cxx
+++ b/connectivity/source/resource/sharedresources.cxx
@@ -44,7 +44,7 @@ namespace connectivity
static SharedResources_Impl&
getInstance();
- OUString getResourceString(const char* pId);
+ OUString getResourceString(TranslateId pId);
private:
SharedResources_Impl();
@@ -66,7 +66,7 @@ namespace connectivity
{
}
- OUString SharedResources_Impl::getResourceString(const char* pId)
+ OUString SharedResources_Impl::getResourceString(TranslateId pId)
{
return Translate::get(pId, m_aLocale);
}
@@ -129,13 +129,13 @@ namespace connectivity
}
- OUString SharedResources::getResourceString(const char* pResId) const
+ OUString SharedResources::getResourceString(TranslateId pResId) const
{
return SharedResources_Impl::getInstance().getResourceString(pResId);
}
- OUString SharedResources::getResourceStringWithSubstitution(const char* pResId,
+ OUString SharedResources::getResourceStringWithSubstitution(TranslateId pResId,
const char* _pAsciiPatternToReplace, const OUString& _rStringToSubstitute ) const
{
OUString sString( SharedResources_Impl::getInstance().getResourceString(pResId) );
@@ -145,7 +145,7 @@ namespace connectivity
}
- OUString SharedResources::getResourceStringWithSubstitution(const char* pResId,
+ OUString SharedResources::getResourceStringWithSubstitution(TranslateId pResId,
const char* _pAsciiPatternToReplace1, const OUString& _rStringToSubstitute1,
const char* _pAsciiPatternToReplace2, const OUString& _rStringToSubstitute2 ) const
{
@@ -158,7 +158,7 @@ namespace connectivity
}
- OUString SharedResources::getResourceStringWithSubstitution(const char* pResId,
+ OUString SharedResources::getResourceStringWithSubstitution(TranslateId pResId,
const char* _pAsciiPatternToReplace1, const OUString& _rStringToSubstitute1,
const char* _pAsciiPatternToReplace2, const OUString& _rStringToSubstitute2,
const char* _pAsciiPatternToReplace3, const OUString& _rStringToSubstitute3 ) const
@@ -173,7 +173,7 @@ namespace connectivity
return sString;
}
- OUString SharedResources::getResourceStringWithSubstitution(const char* pResId,
+ OUString SharedResources::getResourceStringWithSubstitution(TranslateId pResId,
const std::vector< std::pair<const char* , OUString > >& _rStringToSubstitutes) const
{
OUString sString( SharedResources_Impl::getInstance().getResourceString(pResId) );
diff --git a/cui/inc/numcategories.hrc b/cui/inc/numcategories.hrc
index 73d25da4f079..40370cc65811 100644
--- a/cui/inc/numcategories.hrc
+++ b/cui/inc/numcategories.hrc
@@ -9,9 +9,11 @@
#pragma once
-#define NC_(Context, String) reinterpret_cast<char const *>(Context "\004" u8##String)
+#include <unotools/resmgr.hxx>
-const char* NUM_CATEGORIES[] =
+#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
+
+const TranslateId NUM_CATEGORIES[] =
{
NC_("numberingformatpage|liststore1", "All"),
NC_("numberingformatpage|liststore1", "User-defined"),
diff --git a/cui/inc/strings.hrc b/cui/inc/strings.hrc
index 2e6b1276739e..83995559a27a 100644
--- a/cui/inc/strings.hrc
+++ b/cui/inc/strings.hrc
@@ -18,7 +18,7 @@
*/
#pragma once
-#define NC_(Context, String) reinterpret_cast<char const *>(Context "\004" u8##String)
+#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
#define RID_SVXSTR_KEY_CONFIG_DIR NC_("RID_SVXSTR_KEY_CONFIG_DIR", "Configuration")
#define RID_SVXSTR_KEY_WORK_PATH NC_("RID_SVXSTR_KEY_WORK_PATH", "My Documents")
diff --git a/cui/inc/tipoftheday.hrc b/cui/inc/tipoftheday.hrc
index d5d5c7f62a8e..b410d8f5f1ca 100644
--- a/cui/inc/tipoftheday.hrc
+++ b/cui/inc/tipoftheday.hrc
@@ -19,11 +19,12 @@
#pragma once
-#define NC_(Context, String) reinterpret_cast<char const *>(Context "\004" u8##String)
+#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
#include <rtl/ustring.hxx>
#include <config_python.h>
#include <tuple>
+#include <unotools/resmgr.hxx>
/*
* std:tuple consists of <text, uri, image>
@@ -44,7 +45,7 @@
* images are scaled to 150x150px; const ThumbSize() in tipoftheday.cxx
*/
-const std::tuple<const char*, OUString, OUString> TIPOFTHEDAY_STRINGARRAY[] =
+const std::tuple<TranslateId, OUString, OUString> TIPOFTHEDAY_STRINGARRAY[] =
{
{ NC_("RID_CUI_TIPOFTHEDAY", "%PRODUCTNAME offers a variety of user interface options to make you feel at home"), ".uno:ToolbarModeUI", "toolbarmode.png"},
{ NC_("RID_CUI_TIPOFTHEDAY", "Need to allow changes to parts of a read-only document in Writer? Insert frames or sections that can authorize changes."), "https://help.libreoffice.org/%PRODUCTVERSION/%LANGUAGENAME/text/swriter/guide/section_edit.html", "tipoftheday_w.png"}, //local help missing
diff --git a/cui/inc/toolbarmode.hrc b/cui/inc/toolbarmode.hrc
index ab2c9263abd6..d073eaaf996a 100644
--- a/cui/inc/toolbarmode.hrc
+++ b/cui/inc/toolbarmode.hrc
@@ -9,15 +9,16 @@
#pragma once
-#define NC_(Context, String) reinterpret_cast<char const *>(Context "\004" u8##String)
+#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
#include <rtl/ustring.hxx>
#include <tuple>
+#include <unotools/resmgr.hxx>
/*
Description, ui file name, preview file name
*/
-const std::tuple<const char*, OUString, OUString> TOOLBARMODES_ARRAY[] =
+const std::tuple<TranslateId, OUString, OUString> TOOLBARMODES_ARRAY[] =
{
{ NC_("RID_CUI_TOOLBARMODES", "Standard user interface with menu, toolbar, and collapsed sidebar. Intended for users who are familiar with the classic interface."), "Default", "default.png" },
{ NC_("RID_CUI_TOOLBARMODES", "The Tabbed user interface is the most similar to the Ribbons used in Microsoft Office. It organizes functions in tabs and makes the main menu obsolete."), "notebookbar.ui", "notebookbar.png" },
diff --git a/cui/inc/treeopt.hrc b/cui/inc/treeopt.hrc
index 64894a91a5da..c7ee66d7e8d0 100644
--- a/cui/inc/treeopt.hrc
+++ b/cui/inc/treeopt.hrc
@@ -26,9 +26,9 @@
#include <utility>
-#define NC_(Context, String) reinterpret_cast<char const *>(Context "\004" u8##String)
+#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
-const std::pair<const char*, sal_uInt16> SID_GENERAL_OPTIONS_RES[] =
+const std::pair<TranslateId, sal_uInt16> SID_GENERAL_OPTIONS_RES[] =
{
{ NC_("SID_GENERAL_OPTIONS_RES", "%PRODUCTNAME"), 0 },
{ NC_("SID_GENERAL_OPTIONS_RES", "User Data"), RID_SFXPAGE_GENERAL },
@@ -47,7 +47,7 @@ const std::pair<const char*, sal_uInt16> SID_GENERAL_OPTIONS_RES[] =
{ NC_("SID_GENERAL_OPTIONS_RES", "OpenCL"), RID_SVXPAGE_OPENCL }
};
-const std::pair<const char*, sal_uInt16> SID_LANGUAGE_OPTIONS_RES[] =
+const std::pair<TranslateId, sal_uInt16> SID_LANGUAGE_OPTIONS_RES[] =
{
{ NC_("SID_LANGUAGE_OPTIONS_RES", "Language Settings"), 0 },
{ NC_("SID_LANGUAGE_OPTIONS_RES", "Languages"), OFA_TP_LANGUAGES },
@@ -57,14 +57,14 @@ const std::pair<const char*, sal_uInt16> SID_LANGUAGE_OPTIONS_RES[] =
{ NC_("SID_LANGUAGE_OPTIONS_RES", "Complex Text Layout"), RID_SVXPAGE_OPTIONS_CTL }
};
-const std::pair<const char*, sal_uInt16> SID_INET_DLG_RES[] =
+const std::pair<TranslateId, sal_uInt16> SID_INET_DLG_RES[] =
{
{ NC_("SID_INET_DLG_RES", "Internet"), 0 },
{ NC_("SID_INET_DLG_RES", "Proxy"), RID_SVXPAGE_INET_PROXY },
{ NC_("SID_INET_DLG_RES", "Email"), RID_SVXPAGE_INET_MAIL }
};
-const std::pair<const char*, sal_uInt16> SID_SW_EDITOPTIONS_RES[] =
+const std::pair<TranslateId, sal_uInt16> SID_SW_EDITOPTIONS_RES[] =
{
{ NC_("SID_SW_EDITOPTIONS_RES", "%PRODUCTNAME Writer"), 0 },
{ NC_("SID_SW_EDITOPTIONS_RES", "General"), RID_SW_TP_OPTLOAD_PAGE },
@@ -83,7 +83,7 @@ const std::pair<const char*, sal_uInt16> SID_SW_EDITOPTIONS_RES[] =
{ NC_("SID_SW_EDITOPTIONS_RES", "Mail Merge Email"), RID_SW_TP_MAILCONFIG }
};
-const std::pair<const char*, sal_uInt16> SID_SW_ONLINEOPTIONS_RES[] =
+const std::pair<TranslateId, sal_uInt16> SID_SW_ONLINEOPTIONS_RES[] =
{
{ NC_("SID_SW_ONLINEOPTIONS_RES", "%PRODUCTNAME Writer/Web"), 0 },
{ NC_("SID_SW_ONLINEOPTIONS_RES", "View"), RID_SW_TP_HTML_CONTENT_OPT },
@@ -94,13 +94,13 @@ const std::pair<const char*, sal_uInt16> SID_SW_ONLINEOPTIONS_RES[] =
{ NC_("SID_SW_ONLINEOPTIONS_RES", "Background"), RID_SW_TP_BACKGROUND }
};
-const std::pair<const char*, sal_uInt16> SID_SM_EDITOPTIONS_RES[] =
+const std::pair<TranslateId, sal_uInt16> SID_SM_EDITOPTIONS_RES[] =
{
{ NC_("SID_SM_EDITOPTIONS_RES", "%PRODUCTNAME Math"), 0 },
{ NC_("SID_SM_EDITOPTIONS_RES", "Settings"), SID_SM_TP_PRINTOPTIONS },
};
-const std::pair<const char*, sal_uInt16> SID_SC_EDITOPTIONS_RES[] =
+const std::pair<TranslateId, sal_uInt16> SID_SC_EDITOPTIONS_RES[] =
{
{ NC_("SID_SC_EDITOPTIONS_RES", "%PRODUCTNAME Calc"), 0 },
{ NC_("SID_SC_EDITOPTIONS_RES", "General"), SID_SC_TP_LAYOUT },
@@ -115,7 +115,7 @@ const std::pair<const char*, sal_uInt16> SID_SC_EDITOPTIONS_RES[] =
{ NC_("SID_SC_EDITOPTIONS_RES", "Print"), RID_SC_TP_PRINT }
};
-const std::pair<const char*, sal_uInt16> SID_SD_EDITOPTIONS_RES[] =
+const std::pair<TranslateId, sal_uInt16> SID_SD_EDITOPTIONS_RES[] =
{
{ NC_("SID_SD_EDITOPTIONS_RES", "%PRODUCTNAME Impress"), 0 },
{ NC_("SID_SD_EDITOPTIONS_RES", "General"), SID_SI_TP_MISC },
@@ -124,7 +124,7 @@ const std::pair<const char*, sal_uInt16> SID_SD_EDITOPTIONS_RES[] =
{ NC_("SID_SD_EDITOPTIONS_RES", "Print"), SID_SI_TP_PRINT }
};
-const std::pair<const char*, sal_uInt16> SID_SD_GRAPHIC_OPTIONS_RES[] =
+const std::pair<TranslateId, sal_uInt16> SID_SD_GRAPHIC_OPTIONS_RES[] =
{
{ NC_("SID_SD_GRAPHIC_OPTIONS_RES", "%PRODUCTNAME Draw"), 0 },
{ NC_("SID_SD_GRAPHIC_OPTIONS_RES", "General"), SID_SD_TP_MISC },
@@ -133,13 +133,13 @@ const std::pair<const char*, sal_uInt16> SID_SD_GRAPHIC_OPTIONS_RES[] =
{ NC_("SID_SD_GRAPHIC_OPTIONS_RES", "Print"), SID_SD_TP_PRINT }
};
-const std::pair<const char*, sal_uInt16> SID_SCH_EDITOPTIONS_RES[] =
+const std::pair<TranslateId, sal_uInt16> SID_SCH_EDITOPTIONS_RES[] =
{
{ NC_("SID_SCH_EDITOPTIONS_RES", "Charts"), 0 },
{ NC_("SID_SCH_EDITOPTIONS_RES", "Default Colors"), RID_OPTPAGE_CHART_DEFCOLORS }
};
-const std::pair<const char*, sal_uInt16> SID_FILTER_DLG_RES[] =
+const std::pair<TranslateId, sal_uInt16> SID_FILTER_DLG_RES[] =
{
{ NC_("SID_FILTER_DLG_RES", "Load/Save"), 0 },
{ NC_("SID_FILTER_DLG_RES", "General"), RID_SFXPAGE_SAVE },
@@ -148,7 +148,7 @@ const std::pair<const char*, sal_uInt16> SID_FILTER_DLG_RES[] =
{ NC_("SID_FILTER_DLG_RES", "HTML Compatibility"), RID_OFAPAGE_HTMLOPT }
};
-const std::pair<const char*, sal_uInt16> SID_SB_STARBASEOPTIONS_RES[] =
+const std::pair<TranslateId, sal_uInt16> SID_SB_STARBASEOPTIONS_RES[] =
{
{ NC_("SID_SB_STARBASEOPTIONS_RES", "%PRODUCTNAME Base"), 0 },
{ NC_("SID_SB_STARBASEOPTIONS_RES", "Connections"), SID_SB_CONNECTIONPOOLING },
diff --git a/cui/inc/twolines.hrc b/cui/inc/twolines.hrc
index 609e05e267d6..c0e46d70144e 100644
--- a/cui/inc/twolines.hrc
+++ b/cui/inc/twolines.hrc
@@ -13,7 +13,7 @@
#include <utility>
-#define NC_(Context, String) reinterpret_cast<char const *>(Context "\004" u8##String)
+#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
#define CHRDLG_ENCLOSE_NONE 0
#define CHRDLG_ENCLOSE_ROUND 1
@@ -22,7 +22,7 @@
#define CHRDLG_ENCLOSE_CURVED 4
#define CHRDLG_ENCLOSE_SPECIAL_CHAR 5
-const std::pair<const char*, sal_uInt16> TWOLINE_OPEN[] =
+const std::pair<TranslateId, sal_uInt16> TWOLINE_OPEN[] =
{
{ NC_("twolinespage|liststore1", "(None)"), CHRDLG_ENCLOSE_NONE },
{ NC_("twolinespage|liststore1", "("), CHRDLG_ENCLOSE_ROUND },
@@ -32,7 +32,7 @@ const std::pair<const char*, sal_uInt16> TWOLINE_OPEN[] =
{ NC_("twolinespage|liststore1", "Other Characters..."), CHRDLG_ENCLOSE_SPECIAL_CHAR }
};
-const std::pair<const char*, sal_uInt16> TWOLINE_CLOSE[] =
+const std::pair<TranslateId, sal_uInt16> TWOLINE_CLOSE[] =
{
{ NC_("twolinespage|liststore2", "(None)"), CHRDLG_ENCLOSE_NONE },
{ NC_("twolinespage|liststore2", ")"), CHRDLG_ENCLOSE_ROUND },
diff --git a/cui/source/dialogs/about.cxx b/cui/source/dialogs/about.cxx
index 12d1927b5ccd..36a7e6e69656 100644
--- a/cui/source/dialogs/about.cxx
+++ b/cui/source/dialogs/about.cxx
@@ -146,7 +146,7 @@ bool AboutDialog::IsStringValidGitHash(const OUString &hash) {
}
OUString AboutDialog::GetVersionString() {
- OUString sVersion = CuiResId("%ABOUTBOXPRODUCTVERSION%ABOUTBOXPRODUCTVERSIONSUFFIX");
+ OUString sVersion = CuiResId(TranslateId(nullptr, "%ABOUTBOXPRODUCTVERSION%ABOUTBOXPRODUCTVERSIONSUFFIX"));
#ifdef _WIN64
sVersion += " (x64)";
diff --git a/cui/source/dialogs/cuifmsearch.cxx b/cui/source/dialogs/cuifmsearch.cxx
index d6e223dc0d19..18f9cae66536 100644
--- a/cui/source/dialogs/cuifmsearch.cxx
+++ b/cui/source/dialogs/cuifmsearch.cxx
@@ -192,13 +192,13 @@ void FmSearchDialog::Init(const OUString& strVisibleFields, const OUString& sIni
// fill the listboxes
// method of field comparison
- const char* const aResIds[] = {
+ const TranslateId aResIds[] = {
RID_STR_SEARCH_ANYWHERE,
RID_STR_SEARCH_BEGINNING,
RID_STR_SEARCH_END,
RID_STR_SEARCH_WHOLE
};
- for (auto pResId : aResIds)
+ for (auto const & pResId : aResIds)
m_plbPosition->append_text(CuiResId(pResId));
m_plbPosition->set_active(MATCHING_ANYWHERE);
@@ -600,7 +600,7 @@ IMPL_LINK(FmSearchDialog, OnSearchProgress, const FmSearchProgress*, pProgress,
case FmSearchProgress::State::Error:
case FmSearchProgress::State::NothingFound:
{
- const char* pErrorId = (FmSearchProgress::State::Error == pProgress->aSearchState)
+ TranslateId pErrorId = (FmSearchProgress::State::Error == pProgress->aSearchState)
? RID_STR_SEARCH_GENERAL_ERROR
: RID_STR_SEARCH_NORECORD;
std::unique_ptr<weld::MessageDialog> xBox(Application::CreateMessageDialog(m_xDialog.get(),
diff --git a/cui/source/factory/cuiresmgr.cxx b/cui/source/factory/cuiresmgr.cxx
index fc6f0d5fd24d..2b58e5854f6e 100644
--- a/cui/source/factory/cuiresmgr.cxx
+++ b/cui/source/factory/cuiresmgr.cxx
@@ -20,6 +20,6 @@
#include <dialmgr.hxx>
#include <unotools/resmgr.hxx>
-OUString CuiResId(std::string_view aKey) { return Translate::get(aKey, Translate::Create("cui")); }
+OUString CuiResId(TranslateId aKey) { return Translate::get(aKey, Translate::Create("cui")); }
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/inc/border.hxx b/cui/source/inc/border.hxx
index 708f79083380..d863650ee52f 100644
--- a/cui/source/inc/border.hxx
+++ b/cui/source/inc/border.hxx
@@ -27,6 +27,7 @@
#include <svx/colorbox.hxx>
#include <svx/frmsel.hxx>
#include <svx/flagsdef.hxx>
+#include <unotools/resmgr.hxx>
#include <set>
@@ -169,7 +170,7 @@ private:
DECL_LINK(RemoveAdjacentCellBorderHdl_Impl, weld::Toggleable&, void);
sal_uInt16 GetPresetImageId(sal_uInt16 nValueSetIdx) const;
- const char* GetPresetStringId(sal_uInt16 nValueSetIdx) const;
+ TranslateId GetPresetStringId(sal_uInt16 nValueSetIdx) const;
void FillPresetVS();
void FillShadowVS();
diff --git a/cui/source/inc/dialmgr.hxx b/cui/source/inc/dialmgr.hxx
index 003941790603..a26c0b25d32b 100644
--- a/cui/source/inc/dialmgr.hxx
+++ b/cui/source/inc/dialmgr.hxx
@@ -20,7 +20,8 @@
#pragma once
#include <rtl/ustring.hxx>
+#include <unotools/resmgr.hxx>
-OUString CuiResId(std::string_view aKey);
+OUString CuiResId(TranslateId aKey);
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/inc/macropg.hxx b/cui/source/inc/macropg.hxx
index f6a6e8a17ae2..39e4ef284384 100644
--- a/cui/source/inc/macropg.hxx
+++ b/cui/source/inc/macropg.hxx
@@ -25,6 +25,7 @@
#include <com/sun/star/util/XModifiable.hpp>
#include <com/sun/star/uno/Reference.hxx>
#include <rtl/ustring.hxx>
+#include <unotools/resmgr.hxx>
#include <unordered_map>
#include <vector>
@@ -34,8 +35,8 @@ typedef std::unordered_map< OUString, std::pair< OUString, OUString > > EventsHa
struct EventDisplayName
{
const char* pAsciiEventName;
- const char* pEventResourceID;
- EventDisplayName(const char* pAsciiName, const char* pResId)
+ TranslateId pEventResourceID;
+ EventDisplayName(const char* pAsciiName, TranslateId pResId)
: pAsciiEventName(pAsciiName)
, pEventResourceID(pResId)
{
diff --git a/cui/source/options/optpath.cxx b/cui/source/options/optpath.cxx
index 590ff2eb05c5..bdd7db2ca89e 100644
--- a/cui/source/options/optpath.cxx
+++ b/cui/source/options/optpath.cxx
@@ -245,7 +245,7 @@ void SvxPathTabPage::Reset( const SfxItemSet* )
&& !SvtModuleOptions().IsModuleInstalled( SvtModuleOptions::EModule::WRITER ) )
continue;
- const char* pId = nullptr;
+ TranslateId pId;
switch (static_cast<SvtPathOptions::Paths>(i))
{
diff --git a/cui/source/options/treeopt.cxx b/cui/source/options/treeopt.cxx
index 38cbe4952de5..533dc34edea1 100644
--- a/cui/source/options/treeopt.cxx
+++ b/cui/source/options/treeopt.cxx
@@ -29,6 +29,7 @@
#include <svx/dialogs.hrc>
#include <svx/svxids.hrc>
+#include <unotools/resmgr.hxx>
#include <treeopt.hrc>
#include <helpids.h>
diff --git a/cui/source/tabpages/border.cxx b/cui/source/tabpages/border.cxx
index 435b86ad6b9d..c0adea646e35 100644
--- a/cui/source/tabpages/border.cxx
+++ b/cui/source/tabpages/border.cxx
@@ -1297,10 +1297,10 @@ sal_uInt16 SvxBorderTabPage::GetPresetImageId( sal_uInt16 nValueSetIdx ) const
return ppnImgIds[ nLine ][ nValueSetIdx - 1 ];
}
-const char* SvxBorderTabPage::GetPresetStringId( sal_uInt16 nValueSetIdx ) const
+TranslateId SvxBorderTabPage::GetPresetStringId( sal_uInt16 nValueSetIdx ) const
{
// string resource IDs for each image (in order of the IID_PRE_* image IDs)
- static const char* pnStrIds[] =
+ static const TranslateId pnStrIds[] =
{
RID_SVXSTR_TABLE_PRESET_NONE,
RID_SVXSTR_PARA_PRESET_ALL,
@@ -1357,7 +1357,7 @@ void SvxBorderTabPage::FillShadowVS()
m_xWndShadows->SetColCount( SVX_BORDER_SHADOW_COUNT );
// string resource IDs for each image
- static const char* pnStrIds[ SVX_BORDER_SHADOW_COUNT ] =
+ static const TranslateId pnStrIds[ SVX_BORDER_SHADOW_COUNT ] =
{ RID_SVXSTR_SHADOW_STYLE_NONE, RID_SVXSTR_SHADOW_STYLE_BOTTOMRIGHT, RID_SVXSTR_SHADOW_STYLE_TOPRIGHT, RID_SVXSTR_SHADOW_STYLE_BOTTOMLEFT, RID_SVXSTR_SHADOW_STYLE_TOPLEFT };
// insert images and help texts
diff --git a/dbaccess/inc/core_resource.hxx b/dbaccess/inc/core_resource.hxx
index 0e1e80ee3efd..0e70aabefea6 100644
--- a/dbaccess/inc/core_resource.hxx
+++ b/dbaccess/inc/core_resource.hxx
@@ -22,6 +22,7 @@
#include <rtl/ustring.hxx>
#include "dbadllapi.hxx"
+#include <unotools/resmgr.hxx>
#define DBA_RES( id ) ::dbaccess::ResourceManager::loadString( id )
#define DBA_RES_PARAM( id, ascii, replace ) ::dbaccess::ResourceManager::loadString( id, ascii, replace )
@@ -40,7 +41,7 @@ namespace dbaccess
public:
/** loads the string with the specified resource id
*/
- static OUString loadString(const char* pResId);
+ static OUString loadString(TranslateId pResId);
/** loads a string from the resource file, substituting a placeholder with a given string
@@ -52,7 +53,7 @@ namespace dbaccess
the string which should substitute the placeholder
*/
static OUString loadString(
- const char* pResId,
+ TranslateId pResId,
const char* _pPlaceholderAscii,
std::u16string_view _rReplace
);
@@ -71,7 +72,7 @@ namespace dbaccess
the string which should substitute the second placeholder
*/
static OUString loadString(
- const char* pResId,
+ TranslateId pResId,
const char* _pPlaceholderAscii1,
std::u16string_view _rReplace1,
const char* _pPlaceholderAscii2,
diff --git a/dbaccess/inc/query.hrc b/dbaccess/inc/query.hrc
index fe4042517603..e4c034ded11c 100644
--- a/dbaccess/inc/query.hrc
+++ b/dbaccess/inc/query.hrc
@@ -19,9 +19,9 @@
#ifndef INCLUDED_VCL_INC_PRINTACCESSORYVIEW_HRC
#define INCLUDED_VCL_INC_PRINTACCESSORYVIEW_HRC
-#define NC_(Context, String) reinterpret_cast<char const *>(Context "\004" u8##String)
+#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
-const char* RSC_QUERY_OBJECT_TYPE[] =
+const TranslateId RSC_QUERY_OBJECT_TYPE[] =
{
NC_("RSC_QUERY_OBJECT_TYPE", "The table view"),
NC_("RSC_QUERY_OBJECT_TYPE", "The query"),
diff --git a/dbaccess/inc/strings.hrc b/dbaccess/inc/strings.hrc
index 2ccc5a666717..3fe6a7207dac 100644
--- a/dbaccess/inc/strings.hrc
+++ b/dbaccess/inc/strings.hrc
@@ -19,7 +19,9 @@
#ifndef INCLUDED_DBACCESS_SOURCE_CORE_INC_CORE_RESOURCE_HRC
#define INCLUDED_DBACCESS_SOURCE_CORE_INC_CORE_RESOURCE_HRC
-#define NC_(Context, String) reinterpret_cast<char const *>(Context "\004" u8##String)
+#include <unotools/resmgr.hxx>
+
+#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(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.")
diff --git a/dbaccess/inc/templwin.hrc b/dbaccess/inc/templwin.hrc
index 0147a694ff5b..052883d37926 100644
--- a/dbaccess/inc/templwin.hrc
+++ b/dbaccess/inc/templwin.hrc
@@ -20,8 +20,9 @@
#pragma once
#include <utility>
+#include <unotools/resmgr.hxx>
-#define NC_(Context, String) reinterpret_cast<char const *>(Context "\004" u8##String)
+#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
#define DI_TITLE 1
#define DI_FROM 2
@@ -36,7 +37,7 @@
#define DI_THEME 11
#define DI_SIZE 12
-const std::pair<const char*, int> STRARY_SVT_DOCINFO[] =
+const std::pair<TranslateId, int> STRARY_SVT_DOCINFO[] =
{
{ NC_("STRARY_SVT_DOCINFO", "Title") , DI_TITLE },
{ NC_("STRARY_SVT_DOCINFO", "By") , DI_FROM },
diff --git a/dbaccess/source/core/dataaccess/datasource.cxx b/dbaccess/source/core/dataaccess/datasource.cxx
index 83a45afa3e2d..4f499eccc263 100644
--- a/dbaccess/source/core/dataaccess/datasource.cxx
+++ b/dbaccess/source/core/dataaccess/datasource.cxx
@@ -676,7 +676,7 @@ Reference< XConnection > ODatabaseSource::buildLowLevelConnection(const OUString
sPwd = m_pImpl->m_aPassword;
}
- const char* pExceptionMessageId = RID_STR_COULDNOTCONNECT_UNSPECIFIED;
+ TranslateId pExceptionMessageId = RID_STR_COULDNOTCONNECT_UNSPECIFIED;
if (xManager.is())
{
sal_Int32 nAdditionalArgs(0);
diff --git a/dbaccess/source/core/resource/core_resource.cxx b/dbaccess/source/core/resource/core_resource.cxx
index cecf7d3b4773..ecf73939eec2 100644
--- a/dbaccess/source/core/resource/core_resource.cxx
+++ b/dbaccess/source/core/resource/core_resource.cxx
@@ -33,18 +33,18 @@ namespace dbaccess
struct theResourceManagerMutex : public rtl::Static< osl::Mutex, theResourceManagerMutex > {};
}
- OUString ResourceManager::loadString(const char* pResId)
+ OUString ResourceManager::loadString(TranslateId pResId)
{
return Translate::get(pResId, Translate::Create("dba"));
}
- OUString ResourceManager::loadString(const char* pResId, const char* _pPlaceholderAscii, std::u16string_view _rReplace)
+ OUString ResourceManager::loadString(TranslateId pResId, const char* _pPlaceholderAscii, std::u16string_view _rReplace)
{
OUString sString(loadString(pResId));
return sString.replaceFirst( OUString::createFromAscii(_pPlaceholderAscii), _rReplace );
}
- OUString ResourceManager::loadString(const char* pResId, const char* _pPlaceholderAscii1, std::u16string_view _rReplace1,
+ OUString ResourceManager::loadString(TranslateId pResId, const char* _pPlaceholderAscii1, std::u16string_view _rReplace1,
const char* _pPlaceholderAscii2, std::u16string_view _rReplace2)
{
OUString sString(loadString(pResId));
diff --git a/dbaccess/source/ui/app/AppDetailView.cxx b/dbaccess/source/ui/app/AppDetailView.cxx
index 6c56c6052282..6e995354e4f6 100644
--- a/dbaccess/source/ui/app/AppDetailView.cxx
+++ b/dbaccess/source/ui/app/AppDetailView.cxx
@@ -50,7 +50,7 @@ using namespace ::com::sun::star::beans;
using ::com::sun::star::util::URL;
using ::com::sun::star::sdb::application::NamedDatabaseObject;
-TaskEntry::TaskEntry( const char* _pAsciiUNOCommand, const char* _pHelpID, const char* pTitleResourceID, bool _bHideWhenDisabled )
+TaskEntry::TaskEntry( const char* _pAsciiUNOCommand, TranslateId _pHelpID, TranslateId pTitleResourceID, bool _bHideWhenDisabled )
:sUNOCommand( OUString::createFromAscii( _pAsciiUNOCommand ) )
,pHelpID( _pHelpID )
,sTitle( DBA_RES(pTitleResourceID) )
@@ -60,7 +60,7 @@ TaskEntry::TaskEntry( const char* _pAsciiUNOCommand, const char* _pHelpID, const
void OTasksWindow::updateHelpText()
{
- const char* pHelpTextId = nullptr;
+ TranslateId pHelpTextId;
int nCurEntry = m_xTreeView->get_selected_index();
if (nCurEntry != -1)
pHelpTextId = reinterpret_cast<TaskEntry*>(m_xTreeView->get_id(nCurEntry).toUInt64())->pHelpID;
@@ -135,7 +135,7 @@ OTasksWindow::~OTasksWindow()
Clear();
}
-void OTasksWindow::setHelpText(const char* pId)
+void OTasksWindow::setHelpText(TranslateId pId)
{
if (pId)
m_xHelpText->set_text(DBA_RES(pId));
@@ -208,7 +208,7 @@ OApplicationDetailView::OApplicationDetailView(weld::Container* pParent, OAppBor
, m_xTasksParent(m_xBuilder->weld_container("tasks"))
, m_xContainerParent(m_xBuilder->weld_container("container"))
, m_xTasks(new dbaui::OTitleWindow(m_xTasksParent.get(), STR_TASKS))
- , m_xTitleContainer(new dbaui::OTitleWindow(m_xContainerParent.get(), nullptr))
+ , m_xTitleContainer(new dbaui::OTitleWindow(m_xContainerParent.get(), TranslateId()))
, m_rBorderWin(rBorder)
{
m_xControlHelper = std::make_shared<OAppDetailPageHelper>(m_xTitleContainer->getChildContainer(), m_rBorderWin, ePreviewMode);
diff --git a/dbaccess/source/ui/app/AppDetailView.hxx b/dbaccess/source/ui/app/AppDetailView.hxx
index 58b382800865..f074df4401f7 100644
--- a/dbaccess/source/ui/app/AppDetailView.hxx
+++ b/dbaccess/source/ui/app/AppDetailView.hxx
@@ -40,14 +40,14 @@ namespace dbaui
struct TaskEntry
{
OUString sUNOCommand;
- const char* pHelpID;
+ TranslateId pHelpID;
OUString sTitle;
bool bHideWhenDisabled;
// TODO: we should be consistent in the task pane and the menus/toolbars:
// If an entry is disabled in the latter, it should also be disabled in the former.
// If an entry is *hidden* in the former, it should also be hidden in the latter.
- TaskEntry( const char* _pAsciiUNOCommand, const char* pHelpID, const char* pTitleResourceID, bool _bHideWhenDisabled = false );
+ TaskEntry( const char* _pAsciiUNOCommand, TranslateId pHelpID, TranslateId pTitleResourceID, bool _bHideWhenDisabled = false );
};
typedef std::vector< TaskEntry > TaskEntryList;
@@ -56,7 +56,7 @@ namespace dbaui
/// the tasks available in the pane
TaskEntryList aTasks;
/// the resource ID for the title of the pane
- const char* pTitleId;
+ TranslateId pTitleId;
};
class OTasksWindow final : public OChildWindow
@@ -89,7 +89,7 @@ namespace dbaui
void fillTaskEntryList( const TaskEntryList& _rList );
void Clear();
- void setHelpText(const char* pId);
+ void setHelpText(TranslateId pId);
};
class OApplicationDetailView final : public IClipboardTest
diff --git a/dbaccess/source/ui/app/AppIconControl.cxx b/dbaccess/source/ui/app/AppIconControl.cxx
index 0ae6f1eff01b..ff9e35ab9cd3 100644
--- a/dbaccess/source/ui/app/AppIconControl.cxx
+++ b/dbaccess/source/ui/app/AppIconControl.cxx
@@ -71,7 +71,7 @@ void OApplicationIconControl::Fill()
{
static const struct CategoryDescriptor
{
- const char* pLabelResId;
+ TranslateId pLabelResId;
ElementType eType;
const char* aImageResId;
} aCategories[] = { { RID_STR_TABLES_CONTAINER, E_TABLE, BMP_TABLEFOLDER_TREE_L },
diff --git a/dbaccess/source/ui/app/AppTitleWindow.cxx b/dbaccess/source/ui/app/AppTitleWindow.cxx
index 9927b49b2956..d5e604394b2f 100644
--- a/dbaccess/source/ui/app/AppTitleWindow.cxx
+++ b/dbaccess/source/ui/app/AppTitleWindow.cxx
@@ -23,7 +23,7 @@
namespace dbaui
{
-OTitleWindow::OTitleWindow(weld::Container* pParent, const char* pTitleId)
+OTitleWindow::OTitleWindow(weld::Container* pParent, TranslateId pTitleId)
: m_xBuilder(Application::CreateBuilder(pParent, "dbaccess/ui/titlewindow.ui"))
, m_xContainer(m_xBuilder->weld_container("TitleWindow"))
, m_xTitleFrame(m_xBuilder->weld_container("titleparent"))
@@ -46,7 +46,7 @@ void OTitleWindow::setChildWindow(const std::shared_ptr<OChildWindow>& rChild)
m_xChild = rChild;
}
-void OTitleWindow::setTitle(const char* pTitleId)
+void OTitleWindow::setTitle(TranslateId pTitleId)
{
if (!pTitleId)
return;
diff --git a/dbaccess/source/ui/app/AppTitleWindow.hxx b/dbaccess/source/ui/app/AppTitleWindow.hxx
index 161e21e5c3fe..d57f5241650f 100644
--- a/dbaccess/source/ui/app/AppTitleWindow.hxx
+++ b/dbaccess/source/ui/app/AppTitleWindow.hxx
@@ -19,6 +19,7 @@
#pragma once
#include <ChildWindow.hxx>
+#include <unotools/resmgr.hxx>
namespace dbaui
{
@@ -32,7 +33,7 @@ namespace dbaui
std::shared_ptr<OChildWindow> m_xChild;
public:
- OTitleWindow(weld::Container* pParent, const char* pTitleId);
+ OTitleWindow(weld::Container* pParent, TranslateId pTitleId);
~OTitleWindow();
void GrabFocus();
@@ -59,7 +60,7 @@ namespace dbaui
@param pTitleId
The resource id of the title text.
*/
- void setTitle(const char* pTitleId);
+ void setTitle(TranslateId pTitleId);
};
} // namespace dbaui
diff --git a/dbaccess/source/ui/control/FieldControls.cxx b/dbaccess/source/ui/control/FieldControls.cxx
index 866014a99f2d..3f3553d56ee9 100644
--- a/dbaccess/source/ui/control/FieldControls.cxx
+++ b/dbaccess/source/ui/control/FieldControls.cxx
@@ -25,7 +25,7 @@ namespace dbaui {
OPropColumnEditCtrl::OPropColumnEditCtrl(std::unique_ptr<weld::Entry> xEntry,
OUString const & _rAllowedChars,
- const char* pHelpId,
+ TranslateId pHelpId,
short nPosition)
: OSQLNameEntry(std::move(xEntry), _rAllowedChars)
, m_nPos(nPosition)
@@ -33,7 +33,7 @@ OPropColumnEditCtrl::OPropColumnEditCtrl(std::unique_ptr<weld::Entry> xEntry,
m_strHelpText = DBA_RES(pHelpId);
}
-OPropEditCtrl::OPropEditCtrl(std::unique_ptr<weld::Entry> xEntry, const char* pHelpId, short nPosition)
+OPropEditCtrl::OPropEditCtrl(std::unique_ptr<weld::Entry> xEntry, TranslateId pHelpId, short nPosition)
: OWidgetBase(xEntry.get())
, m_xEntry(std::move(xEntry))
, m_nPos(nPosition)
@@ -41,7 +41,7 @@ OPropEditCtrl::OPropEditCtrl(std::unique_ptr<weld::Entry> xEntry, const char* pH
m_strHelpText = DBA_RES(pHelpId);
}
-OPropNumericEditCtrl::OPropNumericEditCtrl(std::unique_ptr<weld::SpinButton> xSpinButton, const char* pHelpId, short nPosition)
+OPropNumericEditCtrl::OPropNumericEditCtrl(std::unique_ptr<weld::SpinButton> xSpinButton, TranslateId pHelpId, short nPosition)
: OWidgetBase(xSpinButton.get())
, m_xSpinButton(std::move(xSpinButton))
, m_nPos(nPosition)
@@ -49,7 +49,7 @@ OPropNumericEditCtrl::OPropNumericEditCtrl(std::unique_ptr<weld::SpinButton> xSp
m_strHelpText = DBA_RES(pHelpId);
}
-OPropListBoxCtrl::OPropListBoxCtrl(std::unique_ptr<weld::ComboBox> xComboBox, const char* pHelpId, short nPosition)
+OPropListBoxCtrl::OPropListBoxCtrl(std::unique_ptr<weld::ComboBox> xComboBox, TranslateId pHelpId, short nPosition)
: OWidgetBase(xComboBox.get())
, m_xComboBox(std::move(xComboBox))
, m_nPos(nPosition)
diff --git a/dbaccess/source/ui/control/FieldDescControl.cxx b/dbaccess/source/ui/control/FieldDescControl.cxx
index 9009d0b467c3..ef67b373e6d8 100644
--- a/dbaccess/source/ui/control/FieldDescControl.cxx
+++ b/dbaccess/source/ui/control/FieldDescControl.cxx
@@ -607,7 +607,7 @@ void OFieldDescControl::InitializeControl(weld::Widget* pControl,const OString&
}
}
-std::unique_ptr<OPropNumericEditCtrl> OFieldDescControl::CreateNumericControl(const OString& rId, const char* pHelpId, short _nProperty, const OString& _sHelpId)
+std::unique_ptr<OPropNumericEditCtrl> OFieldDescControl::CreateNumericControl(const OString& rId, TranslateId pHelpId, short _nProperty, const OString& _sHelpId)
{
auto xControl = std::make_unique<OPropNumericEditCtrl>(
m_xBuilder->weld_spin_button(rId), pHelpId, _nProperty);
diff --git a/dbaccess/source/ui/dlg/ConnectionPage.cxx b/dbaccess/source/ui/dlg/ConnectionPage.cxx
index 5082abf9ed98..1450ece5b454 100644
--- a/dbaccess/source/ui/dlg/ConnectionPage.cxx
+++ b/dbaccess/source/ui/dlg/ConnectionPage.cxx
@@ -255,7 +255,7 @@ namespace dbaui
}
#endif
- const char* pMessage = bSuccess ? STR_JDBCDRIVER_SUCCESS : STR_JDBCDRIVER_NO_SUCCESS;
+ TranslateId pMessage = bSuccess ? STR_JDBCDRIVER_SUCCESS : STR_JDBCDRIVER_NO_SUCCESS;
const MessageType mt = bSuccess ? MessageType::Info : MessageType::Error;
OSQLMessageBox aMsg(GetFrameWeld(), DBA_RES(pMessage), OUString(), MessBoxStyle::Ok | MessBoxStyle::DefaultOk, mt);
aMsg.run();
diff --git a/dbaccess/source/ui/dlg/ConnectionPageSetup.cxx b/dbaccess/source/ui/dlg/ConnectionPageSetup.cxx
index bee1b1f11493..8f57c24f99eb 100644
--- a/dbaccess/source/ui/dlg/ConnectionPageSetup.cxx
+++ b/dbaccess/source/ui/dlg/ConnectionPageSetup.cxx
@@ -58,16 +58,16 @@ namespace dbaui
std::unique_ptr<OGenericAdministrationPage> OConnectionTabPageSetup::CreateUserDefinedTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& _rAttrSet)
{
- return std::make_unique<OConnectionTabPageSetup>(pPage, pController, "dbaccess/ui/dbwizconnectionpage.ui", "ConnectionPage", _rAttrSet, nullptr, nullptr, STR_COMMONURL);
+ return std::make_unique<OConnectionTabPageSetup>(pPage, pController, "dbaccess/ui/dbwizconnectionpage.ui", "ConnectionPage", _rAttrSet, TranslateId(), TranslateId(), STR_COMMONURL);
}
- OConnectionTabPageSetup::OConnectionTabPageSetup(weld::Container* pPage, weld::DialogController* pController, const OUString& _rUIXMLDescription, const OString& _rId, const SfxItemSet& _rCoreAttrs, const char* pHelpTextResId, const char* pHeaderResId, const char* pUrlResId)
+ OConnectionTabPageSetup::OConnectionTabPageSetup(weld::Container* pPage, weld::DialogController* pController, const OUString& _rUIXMLDescription, const OString& _rId, const SfxItemSet& _rCoreAttrs, TranslateId pHelpTextResId, TranslateId pHeaderResId, TranslateId pUrlResId)
: OConnectionHelper(pPage, pController, _rUIXMLDescription, _rId, _rCoreAttrs)
, m_xHelpText(m_xBuilder->weld_label("helptext"))
, m_xHeaderText(m_xBuilder->weld_label("header"))
{
- if (pHelpTextResId != nullptr)
+ if (pHelpTextResId)
{
OUString sHelpText = DBA_RES(pHelpTextResId);
m_xHelpText->set_label(sHelpText);
@@ -75,10 +75,10 @@ namespace dbaui
else
m_xHelpText->hide();
- if (pHeaderResId != nullptr)
+ if (pHeaderResId)
m_xHeaderText->set_label(DBA_RES(pHeaderResId));
- if (pUrlResId != nullptr)
+ if (pUrlResId)
{
OUString sLabelText = DBA_RES(pUrlResId);
m_xFT_Connection->set_label(sLabelText);
diff --git a/dbaccess/source/ui/dlg/ConnectionPageSetup.hxx b/dbaccess/source/ui/dlg/ConnectionPageSetup.hxx
index b04fb194d36d..0039a7160a6e 100644
--- a/dbaccess/source/ui/dlg/ConnectionPageSetup.hxx
+++ b/dbaccess/source/ui/dlg/ConnectionPageSetup.hxx
@@ -18,9 +18,10 @@
*/
#pragma once
-#include "ConnectionHelper.hxx"
+#include "ConnectionHelper.hxx"
#include "adminpages.hxx"
+#include <unotools/resmgr.hxx>
namespace dbaui
{
@@ -38,7 +39,7 @@ namespace dbaui
DECL_LINK(OnEditModified, weld::Entry&, void);
public:
- OConnectionTabPageSetup(weld::Container* pPage, weld::DialogController* pController, const OUString& _rUIXMLDescription, const OString& _rId, const SfxItemSet& _rCoreAttrs, const char* pHelpTextResId, const char* pHeaderResId, const char* pUrlResId);
+ OConnectionTabPageSetup(weld::Container* pPage, weld::DialogController* pController, const OUString& _rUIXMLDescription, const OString& _rId, const SfxItemSet& _rCoreAttrs, TranslateId pHelpTextResId, TranslateId pHeaderResId, TranslateId pUrlResId);
virtual ~OConnectionTabPageSetup() override;
static std::unique_ptr<OGenericAdministrationPage> CreateDbaseTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& _rAttrSet);
diff --git a/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx b/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx
index a15c011f3734..ffbde972ff08 100644
--- a/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx
+++ b/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx
@@ -324,7 +324,7 @@ using namespace ::com::sun::star;
}
// OMySQLJDBCConnectionPageSetup
- OGeneralSpecialJDBCConnectionPageSetup::OGeneralSpecialJDBCConnectionPageSetup( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& _rCoreAttrs ,sal_uInt16 _nPortId, const char* pDefaultPortResId, const char* pHelpTextResId, const char* pHeaderTextResId, const char* pDriverClassId)
+ OGeneralSpecialJDBCConnectionPageSetup::OGeneralSpecialJDBCConnectionPageSetup( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& _rCoreAttrs ,sal_uInt16 _nPortId, TranslateId pDefaultPortResId, TranslateId pHelpTextResId, TranslateId pHeaderTextResId, TranslateId pDriverClassId)
: OGenericAdministrationPage(pPage, pController, "dbaccess/ui/specialjdbcconnectionpage.ui", "SpecialJDBCConnectionPage", _rCoreAttrs)
, m_nPortId(_nPortId)
, m_xHeaderText(m_xBuilder->weld_label("header"))
@@ -479,7 +479,7 @@ using namespace ::com::sun::star;
{
}
#endif
- const char *pMessage = bSuccess ? STR_JDBCDRIVER_SUCCESS : STR_JDBCDRIVER_NO_SUCCESS;
+ TranslateId pMessage = bSuccess ? STR_JDBCDRIVER_SUCCESS : STR_JDBCDRIVER_NO_SUCCESS;
const MessageType mt = bSuccess ? MessageType::Info : MessageType::Error;
OSQLMessageBox aMsg(GetFrameWeld(), DBA_RES(pMessage), OUString(), MessBoxStyle::Ok | MessBoxStyle::DefaultOk, mt);
aMsg.run();
@@ -591,7 +591,7 @@ using namespace ::com::sun::star;
{
}
#endif
- const char* pMessage = bSuccess ? STR_JDBCDRIVER_SUCCESS : STR_JDBCDRIVER_NO_SUCCESS;
+ TranslateId pMessage = bSuccess ? STR_JDBCDRIVER_SUCCESS : STR_JDBCDRIVER_NO_SUCCESS;
const MessageType mt = bSuccess ? MessageType::Info : MessageType::Error;
OSQLMessageBox aMsg(GetFrameWeld(), DBA_RES(pMessage), OUString(), MessBoxStyle::Ok | MessBoxStyle::DefaultOk, mt);
aMsg.run();
diff --git a/dbaccess/source/ui/dlg/DBSetupConnectionPages.hxx b/dbaccess/source/ui/dlg/DBSetupConnectionPages.hxx
index 64fa848c855f..8bc367602fd9 100644
--- a/dbaccess/source/ui/dlg/DBSetupConnectionPages.hxx
+++ b/dbaccess/source/ui/dlg/DBSetupConnectionPages.hxx
@@ -123,10 +123,10 @@ namespace dbaui
OGeneralSpecialJDBCConnectionPageSetup(weld::Container* pPage, weld::DialogController* pController
, const SfxItemSet& _rCoreAttrs
, sal_uInt16 _nPortId
- , const char* pDefaultPortResId
- , const char* pHelpTextResId
- , const char* pHeaderTextResId
- , const char* pDriverClassId );
+ , TranslateId pDefaultPortResId
+ , TranslateId pHelpTextResId
+ , TranslateId pHeaderTextResId
+ , TranslateId pDriverClassId );
virtual ~OGeneralSpecialJDBCConnectionPageSetup() override;
static std::unique_ptr<OGenericAdministrationPage> CreateMySQLJDBCTabPage( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& _rAttrSet );
static std::unique_ptr<OGenericAdministrationPage> CreateOracleJDBCTabPage( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& _rAttrSet );
diff --git a/dbaccess/source/ui/dlg/dbadmin.cxx b/dbaccess/source/ui/dlg/dbadmin.cxx
index 0c79cf0c9bae..3b528ba0b070 100644
--- a/dbaccess/source/ui/dlg/dbadmin.cxx
+++ b/dbaccess/source/ui/dlg/dbadmin.cxx
@@ -80,7 +80,7 @@ void ODbAdminDialog::PageCreated(const OString& rId, SfxTabPage& _rPage)
SfxTabDialogController::PageCreated(rId, _rPage);
}
-void ODbAdminDialog::addDetailPage(const OString& rPageId, const char* pTextId, CreateTabPage pCreateFunc)
+void ODbAdminDialog::addDetailPage(const OString& rPageId, TranslateId pTextId, CreateTabPage pCreateFunc)
{
AddTabPage(rPageId, DBA_RES(pTextId), pCreateFunc);
}
diff --git a/dbaccess/source/ui/dlg/dbwiz.cxx b/dbaccess/source/ui/dlg/dbwiz.cxx
index d39fd3c79c29..942584a9a739 100644
--- a/dbaccess/source/ui/dlg/dbwiz.cxx
+++ b/dbaccess/source/ui/dlg/dbwiz.cxx
@@ -214,7 +214,7 @@ void ODbTypeWizDialog::clearPassword()
std::unique_ptr<BuilderPage> ODbTypeWizDialog::createPage(WizardState _nState)
{
- const char* pStringId = STR_PAGETITLE_ADVANCED;
+ TranslateId pStringId = STR_PAGETITLE_ADVANCED;
std::unique_ptr<BuilderPage> xPage;
OString sIdent(OString::number(_nState));
diff --git a/dbaccess/source/ui/dlg/detailpages.cxx b/dbaccess/source/ui/dlg/detailpages.cxx
index 8b74872d904f..8a06d7de1c18 100644
--- a/dbaccess/source/ui/dlg/detailpages.cxx
+++ b/dbaccess/source/ui/dlg/detailpages.cxx
@@ -469,7 +469,7 @@ namespace dbaui
{
}
#endif
- const char* pMessage = bSuccess ? STR_JDBCDRIVER_SUCCESS : STR_JDBCDRIVER_NO_SUCCESS;
+ TranslateId pMessage = bSuccess ? STR_JDBCDRIVER_SUCCESS : STR_JDBCDRIVER_NO_SUCCESS;
const MessageType mt = bSuccess ? MessageType::Info : MessageType::Error;
OSQLMessageBox aMsg(GetFrameWeld(), DBA_RES(pMessage), OUString(), MessBoxStyle::Ok | MessBoxStyle::DefaultOk, mt);
aMsg.run();
diff --git a/dbaccess/source/ui/dlg/generalpage.cxx b/dbaccess/source/ui/dlg/generalpage.cxx
index 27eb77dc78ab..e3bacdefbc73 100644
--- a/dbaccess/source/ui/dlg/generalpage.cxx
+++ b/dbaccess/source/ui/dlg/generalpage.cxx
@@ -181,7 +181,7 @@ namespace dbaui
if ( eMessage != m_eLastMessage )
{
- const char* pResId = nullptr;
+ TranslateId pResId;
if ( smUnsupportedType == eMessage )
pResId = STR_UNSUPPORTED_DATASOURCE_TYPE;
OUString sMessage;
diff --git a/dbaccess/source/ui/dlg/sqlmessage.cxx b/dbaccess/source/ui/dlg/sqlmessage.cxx
index 42024d9cf078..f5610156c6a5 100644
--- a/dbaccess/source/ui/dlg/sqlmessage.cxx
+++ b/dbaccess/source/ui/dlg/sqlmessage.cxx
@@ -66,7 +66,7 @@ namespace
private:
OUString m_label;
public:
- explicit LabelProvider(const char* labelResourceID)
+ explicit LabelProvider(TranslateId labelResourceID)
: m_label(DBA_RES(labelResourceID))
{
}
@@ -121,7 +121,7 @@ namespace
std::shared_ptr< LabelProvider > const & getLabelProvider( SQLExceptionInfo::TYPE _eType, bool _bSubLabel ) const
{
std::shared_ptr< LabelProvider >* ppProvider( &m_pErrorLabel );
- const char* pLabelID( STR_EXCEPTION_ERROR );
+ TranslateId pLabelID( STR_EXCEPTION_ERROR );
switch ( _eType )
{
diff --git a/dbaccess/source/ui/inc/FieldControls.hxx b/dbaccess/source/ui/inc/FieldControls.hxx
index d0fca32a61b8..7eb88ec4e077 100644
--- a/dbaccess/source/ui/inc/FieldControls.hxx
+++ b/dbaccess/source/ui/inc/FieldControls.hxx
@@ -19,6 +19,7 @@
#pragma once
#include "SqlNameEdit.hxx"
+#include <unotools/resmgr.hxx>
namespace dbaui
{
@@ -28,7 +29,7 @@ namespace dbaui
short m_nPos;
OUString m_strHelpText;
public:
- OPropColumnEditCtrl(std::unique_ptr<weld::Entry> xEntry, OUString const & _rAllowedChars, const char* pHelpId, short nPosition);
+ OPropColumnEditCtrl(std::unique_ptr<weld::Entry> xEntry, OUString const & _rAllowedChars, TranslateId pHelpId, short nPosition);
short GetPos() const { return m_nPos; }
const OUString& GetHelp() const { return m_strHelpText; }
@@ -41,7 +42,7 @@ namespace dbaui
OUString m_strHelpText;
public:
- OPropEditCtrl(std::unique_ptr<weld::Entry> xEntry, const char* pHelpId, short nPosition);
+ OPropEditCtrl(std::unique_ptr<weld::Entry> xEntry, TranslateId pHelpId, short nPosition);
void set_text(const OUString& rText) { m_xEntry->set_text(rText); }
OUString get_text() const { return m_xEntry->get_text(); }
@@ -61,7 +62,7 @@ namespace dbaui
OUString m_strHelpText;
public:
- OPropNumericEditCtrl(std::unique_ptr<weld::SpinButton> xSpinButton, const char* pHelpId, short nPosition);
+ OPropNumericEditCtrl(std::unique_ptr<weld::SpinButton> xSpinButton, TranslateId pHelpId, short nPosition);
void set_text(const OUString& rText) { m_xSpinButton->set_text(rText); }
OUString get_text() const { return m_xSpinButton->get_text(); }
@@ -87,7 +88,7 @@ namespace dbaui
OUString m_strHelpText;
public:
- OPropListBoxCtrl(std::unique_ptr<weld::ComboBox> xComboBox, const char* pHelpId, short nPosition);
+ OPropListBoxCtrl(std::unique_ptr<weld::ComboBox> xComboBox, TranslateId pHelpId, short nPosition);
virtual ~OPropListBoxCtrl() override
{
m_xComboBox->clear();
diff --git a/dbaccess/source/ui/inc/FieldDescControl.hxx b/dbaccess/source/ui/inc/FieldDescControl.hxx
index 8288ae3155e9..478a41070f73 100644
--- a/dbaccess/source/ui/inc/FieldDescControl.hxx
+++ b/dbaccess/source/ui/inc/FieldDescControl.hxx
@@ -24,6 +24,7 @@
#include <com/sun/star/sdbc/XDatabaseMetaData.hpp>
#include <com/sun/star/util/XNumberFormatter.hpp>
#include "TypeInfo.hxx"
+#include <unotools/resmgr.hxx>
// field description columns of a table
#define FIELD_NAME 1
@@ -116,7 +117,7 @@ namespace dbaui
void UpdateFormatSample(OFieldDescription const * pFieldDescr);
bool isTextFormat(const OFieldDescription* _pFieldDescr,sal_uInt32& _nFormatKey) const;
- std::unique_ptr<OPropNumericEditCtrl> CreateNumericControl(const OString& rId, const char* pHelpId, short _nProperty, const OString& _sHelpId);
+ std::unique_ptr<OPropNumericEditCtrl> CreateNumericControl(const OString& rId, TranslateId pHelpId, short _nProperty, const OString& _sHelpId);
void InitializeControl(weld::Widget* _pControl,const OString& _sHelpId);
void InitializeControl(OPropListBoxCtrl* _pControl,const OString& _sHelpId,bool _bAddChangeHandler);
diff --git a/dbaccess/source/ui/inc/GeneralUndo.hxx b/dbaccess/source/ui/inc/GeneralUndo.hxx
index e99ff2c4f330..1bbb593e333d 100644
--- a/dbaccess/source/ui/inc/GeneralUndo.hxx
+++ b/dbaccess/source/ui/inc/GeneralUndo.hxx
@@ -31,7 +31,7 @@ namespace dbaui
OUString m_strComment; // undo, redo comment
public:
- OCommentUndoAction(const char* pCommentID) { m_strComment = DBA_RES(pCommentID); }
+ OCommentUndoAction(TranslateId pCommentID) { m_strComment = DBA_RES(pCommentID); }
virtual OUString GetComment() const override { return m_strComment; }
};
diff --git a/dbaccess/source/ui/inc/UITools.hxx b/dbaccess/source/ui/inc/UITools.hxx
index 71bdc92c35da..0a0918ab99b0 100644
--- a/dbaccess/source/ui/inc/UITools.hxx
+++ b/dbaccess/source/ui/inc/UITools.hxx
@@ -24,6 +24,7 @@
#include <editeng/svxenum.hxx>
#include <vcl/taskpanelist.hxx>
#include <connectivity/dbtools.hxx>
+#include <unotools/resmgr.hxx>
#include <memory>
#include <string_view>
@@ -310,7 +311,7 @@ namespace dbaui
@return
RET_YES, RET_NO, RET_ALL
*/
- sal_Int32 askForUserAction(weld::Window* pParent, const char* pTitle, const char* pText, bool bAll, std::u16string_view rName);
+ sal_Int32 askForUserAction(weld::Window* pParent, TranslateId pTitle, TranslateId pText, bool bAll, std::u16string_view rName);
/** creates a new view from a query or table
@param _sName
diff --git a/dbaccess/source/ui/inc/dbadmin.hxx b/dbaccess/source/ui/inc/dbadmin.hxx
index fb948f940fb8..8caf3c129102 100644
--- a/dbaccess/source/ui/inc/dbadmin.hxx
+++ b/dbaccess/source/ui/inc/dbadmin.hxx
@@ -22,6 +22,7 @@
#include <sfx2/tabdlg.hxx>
#include <dsntypes.hxx>
#include "IItemSetHelper.hxx"
+#include <unotools/resmgr.hxx>
#include <memory>
namespace com::sun::star {
@@ -88,7 +89,7 @@ public:
private:
// adds a new detail page and remove all the old ones
- void addDetailPage(const OString& rPageId, const char* pTextId, CreateTabPage pCreateFunc);
+ void addDetailPage(const OString& rPageId, TranslateId pTextId, CreateTabPage pCreateFunc);
virtual void PageCreated(const OString& rId, SfxTabPage& _rPage) override;
virtual short Ok() override;
diff --git a/dbaccess/source/ui/misc/UITools.cxx b/dbaccess/source/ui/misc/UITools.cxx
index 2ef0c8d44553..5caf0fb4e32d 100644
--- a/dbaccess/source/ui/misc/UITools.cxx
+++ b/dbaccess/source/ui/misc/UITools.cxx
@@ -1145,7 +1145,7 @@ TOTypeInfoSP queryTypeInfoByType(sal_Int32 _nDataType,const OTypeInfoMap& _rType
return pTypeInfo;
}
-sal_Int32 askForUserAction(weld::Window* pParent, const char* pTitle, const char* pText, bool _bAll, std::u16string_view _sName)
+sal_Int32 askForUserAction(weld::Window* pParent, TranslateId pTitle, TranslateId pText, bool _bAll, std::u16string_view _sName)
{
SolarMutexGuard aGuard;
OUString aMsg = DBA_RES(pText);
diff --git a/dbaccess/source/ui/querydesign/QueryDesignFieldUndoAct.hxx b/dbaccess/source/ui/querydesign/QueryDesignFieldUndoAct.hxx
index 601d25f9c01c..13262f570290 100644
--- a/dbaccess/source/ui/querydesign/QueryDesignFieldUndoAct.hxx
+++ b/dbaccess/source/ui/querydesign/QueryDesignFieldUndoAct.hxx
@@ -37,7 +37,7 @@ namespace dbaui
virtual void Redo() override = 0;
public:
- OQueryDesignFieldUndoAct(OSelectionBrowseBox* pSelBrwBox, const char* pCommentID);
+ OQueryDesignFieldUndoAct(OSelectionBrowseBox* pSelBrwBox, TranslateId pCommentID);
virtual ~OQueryDesignFieldUndoAct() override;
void SetColumnPosition(sal_uInt16 _nColumnPosition)
@@ -90,7 +90,7 @@ namespace dbaui
OTableFieldDescRef pDescr; // the deleted column description
public:
- OTabFieldUndoAct(OSelectionBrowseBox* pSelBrwBox, const char* pCommentID) : OQueryDesignFieldUndoAct(pSelBrwBox, pCommentID) { }
+ OTabFieldUndoAct(OSelectionBrowseBox* pSelBrwBox, TranslateId pCommentID) : OQueryDesignFieldUndoAct(pSelBrwBox, pCommentID) { }
void SetTabFieldDescr(OTableFieldDescRef const & pDescription) { pDescr = pDescription; }
};
diff --git a/dbaccess/source/ui/querydesign/QueryDesignUndoAction.hxx b/dbaccess/source/ui/querydesign/QueryDesignUndoAction.hxx
index d3ce81bde0c6..8a87423930a7 100644
--- a/dbaccess/source/ui/querydesign/QueryDesignUndoAction.hxx
+++ b/dbaccess/source/ui/querydesign/QueryDesignUndoAction.hxx
@@ -32,7 +32,7 @@ namespace dbaui
VclPtr<OJoinTableView> m_pOwner; // in this container it all happens
public:
- OQueryDesignUndoAction(OJoinTableView* pOwner, const char* pCommentID) : OCommentUndoAction(pCommentID), m_pOwner(pOwner) { }
+ OQueryDesignUndoAction(OJoinTableView* pOwner, TranslateId pCommentID) : OCommentUndoAction(pCommentID), m_pOwner(pOwner) { }
};
}
diff --git a/dbaccess/source/ui/querydesign/QueryDesignView.cxx b/dbaccess/source/ui/querydesign/QueryDesignView.cxx
index cc2bcf2828d4..1d0664305452 100644
--- a/dbaccess/source/ui/querydesign/QueryDesignView.cxx
+++ b/dbaccess/source/ui/querydesign/QueryDesignView.cxx
@@ -2361,7 +2361,7 @@ namespace
OUString getParseErrorMessage( SqlParseError _eErrorCode )
{
- const char* pResId;
+ TranslateId pResId;
switch (_eErrorCode)
{
case eIllegalJoin:
diff --git a/dbaccess/source/ui/querydesign/QueryTabConnUndoAction.cxx b/dbaccess/source/ui/querydesign/QueryTabConnUndoAction.cxx
index 33cafc1509d7..e3b6cd0e94bb 100644
--- a/dbaccess/source/ui/querydesign/QueryTabConnUndoAction.cxx
+++ b/dbaccess/source/ui/querydesign/QueryTabConnUndoAction.cxx
@@ -35,7 +35,7 @@ OQueryTabConnUndoAction::~OQueryTabConnUndoAction()
}
}
-OQueryTabConnUndoAction::OQueryTabConnUndoAction(OQueryTableView* pOwner, const char* pCommentID)
+OQueryTabConnUndoAction::OQueryTabConnUndoAction(OQueryTableView* pOwner, TranslateId pCommentID)
: OQueryDesignUndoAction(pOwner, pCommentID)
, m_pConnection(nullptr)
, m_bOwnerOfConn(false)
diff --git a/dbaccess/source/ui/querydesign/QueryTabConnUndoAction.hxx b/dbaccess/source/ui/querydesign/QueryTabConnUndoAction.hxx
index 3ccb80bf67f1..21077074ee84 100644
--- a/dbaccess/source/ui/querydesign/QueryTabConnUndoAction.hxx
+++ b/dbaccess/source/ui/querydesign/QueryTabConnUndoAction.hxx
@@ -34,7 +34,7 @@ namespace dbaui
// am I the only owner of the connection? (changes with every redo and undo)
public:
- OQueryTabConnUndoAction(OQueryTableView* pOwner, const char* pCommentID);
+ OQueryTabConnUndoAction(OQueryTableView* pOwner, TranslateId pCommentID);
virtual ~OQueryTabConnUndoAction() override;
virtual void Undo() override = 0;
diff --git a/dbaccess/source/ui/querydesign/QueryTabWinUndoAct.cxx b/dbaccess/source/ui/querydesign/QueryTabWinUndoAct.cxx
index 3171c8789dcb..d3bc756c07f0 100644
--- a/dbaccess/source/ui/querydesign/QueryTabWinUndoAct.cxx
+++ b/dbaccess/source/ui/querydesign/QueryTabWinUndoAct.cxx
@@ -25,7 +25,7 @@
#include <QueryTableView.hxx>
using namespace dbaui;
-OQueryDesignFieldUndoAct::OQueryDesignFieldUndoAct(OSelectionBrowseBox* pSelBrwBox, const char* pCommentID)
+OQueryDesignFieldUndoAct::OQueryDesignFieldUndoAct(OSelectionBrowseBox* pSelBrwBox, TranslateId pCommentID)
: OCommentUndoAction(pCommentID)
, pOwner(pSelBrwBox)
, m_nColumnPosition(BROWSER_INVALIDID)
@@ -37,7 +37,7 @@ OQueryDesignFieldUndoAct::~OQueryDesignFieldUndoAct()
pOwner = nullptr;
}
-OQueryTabWinUndoAct::OQueryTabWinUndoAct(OQueryTableView* pOwner, const char* pCommentID)
+OQueryTabWinUndoAct::OQueryTabWinUndoAct(OQueryTableView* pOwner, TranslateId pCommentID)
: OQueryDesignUndoAction(pOwner, pCommentID)
, m_pTabWin(nullptr)
, m_bOwnerOfObjects(false)
diff --git a/dbaccess/source/ui/querydesign/QueryTabWinUndoAct.hxx b/dbaccess/source/ui/querydesign/QueryTabWinUndoAct.hxx
index 992a6ff0f2b6..9b433054288e 100644
--- a/dbaccess/source/ui/querydesign/QueryTabWinUndoAct.hxx
+++ b/dbaccess/source/ui/querydesign/QueryTabWinUndoAct.hxx
@@ -39,7 +39,7 @@ namespace dbaui
// am I the only owner of the managed objects? (changes with every redo or undo)
public:
- OQueryTabWinUndoAct(OQueryTableView* pOwner, const char* pCommentID);
+ OQueryTabWinUndoAct(OQueryTableView* pOwner, TranslateId pCommentID);
virtual ~OQueryTabWinUndoAct() override;
void SetOwnership(bool bTakeIt) { m_bOwnerOfObjects = bTakeIt; }
diff --git a/dbaccess/source/ui/querydesign/querycontroller.cxx b/dbaccess/source/ui/querydesign/querycontroller.cxx
index aa9145d5cb7a..8070df7a5f90 100644
--- a/dbaccess/source/ui/querydesign/querycontroller.cxx
+++ b/dbaccess/source/ui/querydesign/querycontroller.cxx
@@ -119,7 +119,7 @@ namespace dbaui
namespace
{
- OUString lcl_getObjectResourceString(const char* pResId, sal_Int32 _nCommandType)
+ OUString lcl_getObjectResourceString(TranslateId pResId, sal_Int32 _nCommandType)
{
OUString sMessageText = DBA_RES(pResId);
OUString sObjectType = DBA_RES(RSC_QUERY_OBJECT_TYPE[_nCommandType]);
diff --git a/dbaccess/source/ui/querydesign/querydlg.cxx b/dbaccess/source/ui/querydesign/querydlg.cxx
index 91631f9f3b93..5a21998d9946 100644
--- a/dbaccess/source/ui/querydesign/querydlg.cxx
+++ b/dbaccess/source/ui/querydesign/querydlg.cxx
@@ -150,7 +150,7 @@ IMPL_LINK_NOARG( DlgQryJoin, LBChangeHdl, weld::ComboBox&, void )
OUString sFirstWinName = m_pConnData->getReferencingTable()->GetWinName();
OUString sSecondWinName = m_pConnData->getReferencedTable()->GetWinName();
const EJoinType eOldJoinType = eJoinType;
- const char* pResId = nullptr;
+ TranslateId pResId;
const sal_Int32 nPos = m_xLB_JoinType->get_active();
const sal_Int32 nJoinType = m_xLB_JoinType->get_id(nPos).toInt32();
bool bAddHint = true;
diff --git a/dbaccess/source/ui/tabledesign/TableUndo.cxx b/dbaccess/source/ui/tabledesign/TableUndo.cxx
index 3a2ea9783879..4ef28032795e 100644
--- a/dbaccess/source/ui/tabledesign/TableUndo.cxx
+++ b/dbaccess/source/ui/tabledesign/TableUndo.cxx
@@ -30,7 +30,7 @@ using namespace dbaui;
using namespace ::svt;
-OTableDesignUndoAct::OTableDesignUndoAct(OTableRowView* pOwner, const char* pCommentID)
+OTableDesignUndoAct::OTableDesignUndoAct(OTableRowView* pOwner, TranslateId pCommentID)
: OCommentUndoAction(pCommentID)
, m_pTabDgnCtrl(pOwner)
{
@@ -106,7 +106,7 @@ void OTableDesignCellUndoAct::Redo()
OTableDesignUndoAct::Redo();
}
-OTableEditorUndoAct::OTableEditorUndoAct(OTableEditorCtrl* pOwner, const char* pCommentID)
+OTableEditorUndoAct::OTableEditorUndoAct(OTableEditorCtrl* pOwner, TranslateId pCommentID)
: OTableDesignUndoAct(pOwner, pCommentID)
, pTabEdCtrl(pOwner)
{
diff --git a/dbaccess/source/ui/tabledesign/TableUndo.hxx b/dbaccess/source/ui/tabledesign/TableUndo.hxx
index 6a0eeae16529..2bd25f9d6447 100644
--- a/dbaccess/source/ui/tabledesign/TableUndo.hxx
+++ b/dbaccess/source/ui/tabledesign/TableUndo.hxx
@@ -39,7 +39,7 @@ namespace dbaui
virtual void Undo() override;
virtual void Redo() override;
public:
- OTableDesignUndoAct(OTableRowView* pOwner, const char* pCommentID);
+ OTableDesignUndoAct(OTableRowView* pOwner, TranslateId pCommentID);
virtual ~OTableDesignUndoAct() override;
};
@@ -50,7 +50,7 @@ namespace dbaui
VclPtr<OTableEditorCtrl> pTabEdCtrl;
public:
- OTableEditorUndoAct(OTableEditorCtrl* pOwner, const char* pCommentID);
+ OTableEditorUndoAct(OTableEditorCtrl* pOwner, TranslateId pCommentID);
virtual ~OTableEditorUndoAct() override;
};
diff --git a/desktop/inc/dp_shared.hxx b/desktop/inc/dp_shared.hxx
index 0db47190c48c..0ce0bc401d65 100644
--- a/desktop/inc/dp_shared.hxx
+++ b/desktop/inc/dp_shared.hxx
@@ -33,7 +33,7 @@ struct DeploymentLocale :
} // namespace dp
-inline OUString DpResId(std::string_view aId)
+inline OUString DpResId(TranslateId aId)
{
return Translate::get(aId, dp::DeploymentLocale::get());
}
diff --git a/desktop/inc/strings.hrc b/desktop/inc/strings.hrc
index dd263a54c163..ce3c7a73a19d 100644
--- a/desktop/inc/strings.hrc
+++ b/desktop/inc/strings.hrc
@@ -19,7 +19,7 @@
#pragma once
-#define NC_(Context, String) reinterpret_cast<char const *>(Context "\004" u8##String)
+#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(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: ")
diff --git a/desktop/source/deployment/gui/dp_gui_dialog2.cxx b/desktop/source/deployment/gui/dp_gui_dialog2.cxx
index 191bed09f6bb..28eec755c563 100644
--- a/desktop/source/deployment/gui/dp_gui_dialog2.cxx
+++ b/desktop/source/deployment/gui/dp_gui_dialog2.cxx
@@ -302,7 +302,7 @@ bool DialogHelper::IsSharedPkgMgr( const uno::Reference< deployment::XPackage >
bool DialogHelper::continueOnSharedExtension( const uno::Reference< deployment::XPackage > &xPackage,
weld::Widget* pParent,
- const char* pResID,
+ TranslateId pResID,
bool &bHadWarning )
{
if ( !bHadWarning && IsSharedPkgMgr( xPackage ) )
diff --git a/desktop/source/deployment/gui/dp_gui_dialog2.hxx b/desktop/source/deployment/gui/dp_gui_dialog2.hxx
index 921b6f050b96..2a90d1ca060c 100644
--- a/desktop/source/deployment/gui/dp_gui_dialog2.hxx
+++ b/desktop/source/deployment/gui/dp_gui_dialog2.hxx
@@ -30,6 +30,7 @@
#include <rtl/ustring.hxx>
#include <cppuhelper/implbase.hxx>
+#include <unotools/resmgr.hxx>
#include <com/sun/star/deployment/XPackage.hpp>
#include <com/sun/star/uno/XComponentContext.hpp>
@@ -76,7 +77,7 @@ public:
static bool IsSharedPkgMgr( const css::uno::Reference< css::deployment::XPackage > &);
bool continueOnSharedExtension( const css::uno::Reference< css::deployment::XPackage > &,
weld::Widget* pParent,
- const char* pResID,
+ TranslateId pResID,
bool &bHadWarning );
void incBusy() { m_aBusy.incBusy(m_pWindow); }
diff --git a/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx b/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx
index 95cb874f1ca9..80d682d7a855 100644
--- a/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx
+++ b/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx
@@ -405,7 +405,7 @@ void ProgressCmdEnv::handle( uno::Reference< task::XInteractionRequest > const &
}
else if (request >>= verExc)
{
- const char* id;
+ TranslateId id;
switch (dp_misc::compareVersions(
verExc.NewVersion, verExc.Deployed->getVersion() ))
{
@@ -435,18 +435,18 @@ void ProgressCmdEnv::handle( uno::Reference< task::XInteractionRequest > const &
{
s = xBox->get_primary_text();
}
- else if (!strcmp(id, RID_STR_WARNING_VERSION_EQUAL))
+ else if (id != RID_STR_WARNING_VERSION_EQUAL)
{
//hypothetical: requires two instances of an extension with the same
//version to have different display names. Probably the developer forgot
//to change the version.
s = DpResId(RID_STR_WARNINGBOX_VERSION_EQUAL_DIFFERENT_NAMES);
}
- else if (!strcmp(id, RID_STR_WARNING_VERSION_LESS))
+ else if (id != RID_STR_WARNING_VERSION_LESS)
{
s = DpResId(RID_STR_WARNINGBOX_VERSION_LESS_DIFFERENT_NAMES);
}
- else if (!strcmp(id, RID_STR_WARNING_VERSION_GREATER))
+ else if (id != RID_STR_WARNING_VERSION_GREATER)
{
s = DpResId(RID_STR_WARNINGBOX_VERSION_GREATER_DIFFERENT_NAMES);
}
diff --git a/desktop/source/deployment/registry/help/dp_help.cxx b/desktop/source/deployment/registry/help/dp_help.cxx
index 542efff7269d..57bbfa0ab35f 100644
--- a/desktop/source/deployment/registry/help/dp_help.cxx
+++ b/desktop/source/deployment/registry/help/dp_help.cxx
@@ -490,7 +490,7 @@ void BackendImpl::implProcessHelp(
if( !bSuccess )
{
- const char* pErrStrId = nullptr;
+ TranslateId pErrStrId;
switch( aErrorInfo.m_eErrorClass )
{
case HelpProcessingErrorClass::General: pErrStrId = RID_STR_HELPPROCESSING_GENERAL_ERROR; break;
@@ -521,7 +521,7 @@ void BackendImpl::implProcessHelp(
aErrMsg = aErrMsg.copy( 0, nCopy );
}
aErrStr += aErrMsg;
- if (!strcmp(pErrStrId, RID_STR_HELPPROCESSING_XMLPARSING_ERROR) && !aErrorInfo.m_aXMLParsingFile.isEmpty() )
+ if (pErrStrId != RID_STR_HELPPROCESSING_XMLPARSING_ERROR && !aErrorInfo.m_aXMLParsingFile.isEmpty() )
{
aErrStr += " in ";
diff --git a/editeng/inc/strings.hrc b/editeng/inc/strings.hrc
index 813fa1f92591..a7195a1d2e4e 100644
--- a/editeng/inc/strings.hrc
+++ b/editeng/inc/strings.hrc
@@ -9,9 +9,9 @@
#pragma once
-#define NC_(Context, String) reinterpret_cast<char const *>(Context "\004" u8##String)
+#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
-const char* RID_SVXITEMS_HORJUST[] =
+const TranslateId RID_SVXITEMS_HORJUST[] =
{
// enum SvxCellHorJustify ----------------------------------------------------
NC_("RID_SVXITEMS_HORJUST_STANDARD", "Horizontal alignment default"),
@@ -22,7 +22,7 @@ const char* RID_SVXITEMS_HORJUST[] =
NC_("RID_SVXITEMS_HORJUST_REPEAT", "Repeat alignment")
};
-const char* RID_SVXITEMS_VERJUST[] =
+const TranslateId RID_SVXITEMS_VERJUST[] =
{
// enum SvxCellVerJustify ----------------------------------------------------
NC_("RID_SVXITEMS_VERJUST_STANDARD", "Vertical alignment default"),
@@ -32,7 +32,7 @@ const char* RID_SVXITEMS_VERJUST[] =
NC_("RID_SVXITEMS_HORJUST_BLOCK", "Justify vertically")
};
-const char* RID_SVXITEMS_JUSTMETHOD[] =
+const TranslateId RID_SVXITEMS_JUSTMETHOD[] =
{
// enum SvxCellJustifyMethod ----------------------------------------------------
NC_("RID_SVXITEMS_JUSTMETHOD_AUTO", "Automatic Justify"),
diff --git a/editeng/source/editeng/eerdll.cxx b/editeng/source/editeng/eerdll.cxx
index 8141c6481f86..0e0540bf1244 100644
--- a/editeng/source/editeng/eerdll.cxx
+++ b/editeng/source/editeng/eerdll.cxx
@@ -188,7 +188,7 @@ uno::Reference< linguistic2::XLanguageGuessing > const & GlobalEditData::GetLang
return xLanguageGuesser;
}
-OUString EditResId(std::string_view aId)
+OUString EditResId(TranslateId aId)
{
return Translate::get(aId, Translate::Create("editeng"));
}
diff --git a/editeng/source/items/borderline.cxx b/editeng/source/items/borderline.cxx
index 9037eeba9015..1b06258b20a8 100644
--- a/editeng/source/items/borderline.cxx
+++ b/editeng/source/items/borderline.cxx
@@ -622,7 +622,7 @@ OUString SvxBorderLine::GetValueString(MapUnit eSrcUnit,
const IntlWrapper* pIntl,
bool bMetricStr) const
{
- static const char* aStyleIds[] =
+ static TranslateId aStyleIds[] =
{
RID_SOLID,
RID_DOTTED,
@@ -647,7 +647,7 @@ OUString SvxBorderLine::GetValueString(MapUnit eSrcUnit,
if ( static_cast<int>(m_nStyle) < int(SAL_N_ELEMENTS(aStyleIds)) )
{
- const char* pResId = aStyleIds[static_cast<int>(m_nStyle)];
+ TranslateId pResId = aStyleIds[static_cast<int>(m_nStyle)];
aStr += EditResId(pResId);
}
else
diff --git a/editeng/source/items/charhiddenitem.cxx b/editeng/source/items/charhiddenitem.cxx
index 8d0753c91e68..ec2a0af3c703 100644
--- a/editeng/source/items/charhiddenitem.cxx
+++ b/editeng/source/items/charhiddenitem.cxx
@@ -20,6 +20,7 @@
#include <editeng/charhiddenitem.hxx>
#include <editeng/editrids.hrc>
#include <editeng/eerdll.hxx>
+#include <unotools/resmgr.hxx>
SvxCharHiddenItem::SvxCharHiddenItem( const bool bHidden, const sal_uInt16 nId ) :
@@ -41,7 +42,7 @@ bool SvxCharHiddenItem::GetPresentation
const IntlWrapper & /*rIntl*/
) const
{
- const char* pId = RID_SVXITEMS_CHARHIDDEN_FALSE;
+ TranslateId pId = RID_SVXITEMS_CHARHIDDEN_FALSE;
if ( GetValue() )
pId = RID_SVXITEMS_CHARHIDDEN_TRUE;
diff --git a/editeng/source/items/frmitems.cxx b/editeng/source/items/frmitems.cxx
index 7027ae7c2914..add9c3654f65 100644
--- a/editeng/source/items/frmitems.cxx
+++ b/editeng/source/items/frmitems.cxx
@@ -904,7 +904,7 @@ bool SvxPrintItem::GetPresentation
OUString& rText, const IntlWrapper&
) const
{
- const char* pId = RID_SVXITEMS_PRINT_FALSE;
+ TranslateId pId = RID_SVXITEMS_PRINT_FALSE;
if ( GetValue() )
pId = RID_SVXITEMS_PRINT_TRUE;
@@ -925,7 +925,7 @@ bool SvxOpaqueItem::GetPresentation
OUString& rText, const IntlWrapper&
) const
{
- const char* pId = RID_SVXITEMS_OPAQUE_FALSE;
+ TranslateId pId = RID_SVXITEMS_OPAQUE_FALSE;
if ( GetValue() )
pId = RID_SVXITEMS_OPAQUE_TRUE;
@@ -993,7 +993,7 @@ bool SvxProtectItem::GetPresentation
OUString& rText, const IntlWrapper&
) const
{
- const char* pId = RID_SVXITEMS_PROT_CONTENT_FALSE;
+ TranslateId pId = RID_SVXITEMS_PROT_CONTENT_FALSE;
if ( bCntnt )
pId = RID_SVXITEMS_PROT_CONTENT_TRUE;
@@ -1185,7 +1185,7 @@ sal_uInt16 SvxShadowItem::CalcShadowSpace( SvxShadowItemSide nShadow ) const
return nSpace;
}
-static const char* RID_SVXITEMS_SHADOW[] =
+static TranslateId RID_SVXITEMS_SHADOW[] =
{
RID_SVXITEMS_SHADOW_NONE,
RID_SVXITEMS_SHADOW_TOPLEFT,
@@ -1207,7 +1207,7 @@ bool SvxShadowItem::GetPresentation
case SfxItemPresentation::Nameless:
{
rText = ::GetColorString( aShadowColor ) + cpDelim;
- const char* pId = RID_SVXITEMS_TRANSPARENT_FALSE;
+ TranslateId pId = RID_SVXITEMS_TRANSPARENT_FALSE;
if ( aShadowColor.IsTransparent() )
pId = RID_SVXITEMS_TRANSPARENT_TRUE;
@@ -1224,7 +1224,7 @@ bool SvxShadowItem::GetPresentation
::GetColorString( aShadowColor ) +
cpDelim;
- const char* pId = RID_SVXITEMS_TRANSPARENT_FALSE;
+ TranslateId pId = RID_SVXITEMS_TRANSPARENT_FALSE;
if ( aShadowColor.IsTransparent() )
pId = RID_SVXITEMS_TRANSPARENT_TRUE;
rText += EditResId(pId) +
@@ -2571,7 +2571,7 @@ bool SvxFormatBreakItem::GetPresentation
OUString SvxFormatBreakItem::GetValueTextByPos( sal_uInt16 nPos )
{
- static const char* RID_SVXITEMS_BREAK[] =
+ static TranslateId RID_SVXITEMS_BREAK[] =
{
RID_SVXITEMS_BREAK_NONE,
RID_SVXITEMS_BREAK_COLUMN_BEFORE,
@@ -2655,7 +2655,7 @@ bool SvxFormatKeepItem::GetPresentation
OUString& rText, const IntlWrapper&
) const
{
- const char* pId = RID_SVXITEMS_FMTKEEP_FALSE;
+ TranslateId pId = RID_SVXITEMS_FMTKEEP_FALSE;
if ( GetValue() )
pId = RID_SVXITEMS_FMTKEEP_TRUE;
@@ -3113,7 +3113,7 @@ bool SvxBrushItem::GetPresentation
if ( GPOS_NONE == eGraphicPos )
{
rText = ::GetColorString( aColor ) + cpDelim;
- const char* pId = RID_SVXITEMS_TRANSPARENT_FALSE;
+ TranslateId pId = RID_SVXITEMS_TRANSPARENT_FALSE;
if ( aColor.IsTransparent() )
pId = RID_SVXITEMS_TRANSPARENT_TRUE;
@@ -3366,9 +3366,9 @@ SvxFrameDirectionItem* SvxFrameDirectionItem::Clone( SfxItemPool * ) const
return new SvxFrameDirectionItem( *this );
}
-const char* getFrmDirResId(size_t nIndex)
+TranslateId getFrmDirResId(size_t nIndex)
{
- const char* const RID_SVXITEMS_FRMDIR[] =
+ TranslateId const RID_SVXITEMS_FRMDIR[] =
{
RID_SVXITEMS_FRMDIR_HORI_LEFT_TOP,
RID_SVXITEMS_FRMDIR_HORI_RIGHT_TOP,
diff --git a/editeng/source/items/itemtype.cxx b/editeng/source/items/itemtype.cxx
index 5cf463173063..cbb83c83be35 100644
--- a/editeng/source/items/itemtype.cxx
+++ b/editeng/source/items/itemtype.cxx
@@ -152,7 +152,7 @@ OUString GetColorString( const Color& rCol )
nColor += 1;
}
- static const char* RID_SVXITEMS_COLORS[] =
+ static TranslateId RID_SVXITEMS_COLORS[] =
{
RID_SVXITEMS_COLOR_BLACK,
RID_SVXITEMS_COLOR_BLUE,
@@ -188,9 +188,9 @@ OUString GetColorString( const Color& rCol )
return sStr;
}
-const char* GetMetricId( MapUnit eUnit )
+TranslateId GetMetricId( MapUnit eUnit )
{
- const char* pId = RID_SVXITEMS_METRIC_MM;
+ TranslateId pId = RID_SVXITEMS_METRIC_MM;
switch ( eUnit )
{
diff --git a/editeng/source/items/paraitem.cxx b/editeng/source/items/paraitem.cxx
index 9bc05843bd22..4dc508a6939f 100644
--- a/editeng/source/items/paraitem.cxx
+++ b/editeng/source/items/paraitem.cxx
@@ -435,7 +435,7 @@ sal_uInt16 SvxAdjustItem::GetValueCount() const
OUString SvxAdjustItem::GetValueTextByPos( sal_uInt16 nPos )
{
- static const char* RID_SVXITEMS_ADJUST[] =
+ static TranslateId RID_SVXITEMS_ADJUST[] =
{
RID_SVXITEMS_ADJUST_LEFT,
RID_SVXITEMS_ADJUST_RIGHT,
@@ -648,7 +648,7 @@ bool SvxHyphenZoneItem::GetPresentation
{
case SfxItemPresentation::Nameless:
{
- const char* pId = RID_SVXITEMS_HYPHEN_FALSE;
+ TranslateId pId = RID_SVXITEMS_HYPHEN_FALSE;
if ( bHyphen )
pId = RID_SVXITEMS_HYPHEN_TRUE;
@@ -665,7 +665,7 @@ bool SvxHyphenZoneItem::GetPresentation
}
case SfxItemPresentation::Complete:
{
- const char* pId = RID_SVXITEMS_HYPHEN_FALSE;
+ TranslateId pId = RID_SVXITEMS_HYPHEN_FALSE;
if ( bHyphen )
pId = RID_SVXITEMS_HYPHEN_TRUE;
@@ -1008,7 +1008,7 @@ bool SvxFormatSplitItem::GetPresentation
OUString& rText, const IntlWrapper&
) const
{
- const char* pId = RID_SVXITEMS_FMTSPLIT_FALSE;
+ TranslateId pId = RID_SVXITEMS_FMTSPLIT_FALSE;
if ( GetValue() )
pId = RID_SVXITEMS_FMTSPLIT_TRUE;
@@ -1173,7 +1173,7 @@ bool SvxParaVertAlignItem::GetPresentation(
MapUnit /*eCoreMetric*/, MapUnit /*ePresMetric*/,
OUString &rText, const IntlWrapper& ) const
{
- const char* pTmp;
+ TranslateId pTmp;
switch( GetValue() )
{
case Align::Automatic: pTmp = RID_SVXITEMS_PARAVERTALIGN_AUTO; break;
diff --git a/editeng/source/items/textitem.cxx b/editeng/source/items/textitem.cxx
index 3fd992617695..433352b4653f 100644
--- a/editeng/source/items/textitem.cxx
+++ b/editeng/source/items/textitem.cxx
@@ -356,7 +356,7 @@ OUString SvxPostureItem::GetValueTextByPos( sal_uInt16 nPos )
DBG_ASSERT( nPos <= sal_uInt16(ITALIC_NORMAL), "enum overflow!" );
FontItalic eItalic = static_cast<FontItalic>(nPos);
- const char* pId = nullptr;
+ TranslateId pId;
switch ( eItalic )
{
@@ -483,7 +483,7 @@ bool SvxWeightItem::GetPresentation
OUString SvxWeightItem::GetValueTextByPos( sal_uInt16 nPos )
{
- static const char* RID_SVXITEMS_WEIGHTS[] =
+ static TranslateId RID_SVXITEMS_WEIGHTS[] =
{
RID_SVXITEMS_WEIGHT_DONTKNOW,
RID_SVXITEMS_WEIGHT_THIN,
@@ -1029,7 +1029,7 @@ SvxUnderlineItem* SvxUnderlineItem::Clone( SfxItemPool * ) const
OUString SvxUnderlineItem::GetValueTextByPos( sal_uInt16 nPos ) const
{
- static const char* RID_SVXITEMS_UL[] =
+ static TranslateId RID_SVXITEMS_UL[] =
{
RID_SVXITEMS_UL_NONE,
RID_SVXITEMS_UL_SINGLE,
@@ -1070,7 +1070,7 @@ SvxOverlineItem* SvxOverlineItem::Clone( SfxItemPool * ) const
OUString SvxOverlineItem::GetValueTextByPos( sal_uInt16 nPos ) const
{
- static const char* RID_SVXITEMS_OL[] =
+ static TranslateId RID_SVXITEMS_OL[] =
{
RID_SVXITEMS_OL_NONE,
RID_SVXITEMS_OL_SINGLE,
@@ -1147,7 +1147,7 @@ bool SvxCrossedOutItem::GetPresentation
OUString SvxCrossedOutItem::GetValueTextByPos( sal_uInt16 nPos )
{
- static const char* RID_SVXITEMS_STRIKEOUT[] =
+ static TranslateId RID_SVXITEMS_STRIKEOUT[] =
{
RID_SVXITEMS_STRIKEOUT_NONE,
RID_SVXITEMS_STRIKEOUT_SINGLE,
@@ -1216,7 +1216,7 @@ bool SvxShadowedItem::GetPresentation
OUString& rText, const IntlWrapper& /*rIntl*/
) const
{
- const char* pId = RID_SVXITEMS_SHADOWED_FALSE;
+ TranslateId pId = RID_SVXITEMS_SHADOWED_FALSE;
if ( GetValue() )
pId = RID_SVXITEMS_SHADOWED_TRUE;
@@ -1244,7 +1244,7 @@ bool SvxAutoKernItem::GetPresentation
OUString& rText, const IntlWrapper& /*rIntl*/
) const
{
- const char* pId = RID_SVXITEMS_AUTOKERN_FALSE;
+ TranslateId pId = RID_SVXITEMS_AUTOKERN_FALSE;
if ( GetValue() )
pId = RID_SVXITEMS_AUTOKERN_TRUE;
@@ -1273,7 +1273,7 @@ bool SvxWordLineModeItem::GetPresentation
OUString& rText, const IntlWrapper& /*rIntl*/
) const
{
- const char* pId = RID_SVXITEMS_WORDLINE_FALSE;
+ TranslateId pId = RID_SVXITEMS_WORDLINE_FALSE;
if ( GetValue() )
pId = RID_SVXITEMS_WORDLINE_TRUE;
@@ -1301,7 +1301,7 @@ bool SvxContourItem::GetPresentation
OUString& rText, const IntlWrapper& /*rIntl*/
) const
{
- const char* pId = RID_SVXITEMS_CONTOUR_FALSE;
+ TranslateId pId = RID_SVXITEMS_CONTOUR_FALSE;
if ( GetValue() )
pId = RID_SVXITEMS_CONTOUR_TRUE;
@@ -1467,7 +1467,7 @@ bool SvxKerningItem::GetPresentation
case SfxItemPresentation::Complete:
{
rText = EditResId(RID_SVXITEMS_KERNING_COMPLETE);
- const char* pId = nullptr;
+ TranslateId pId;
if ( GetValue() > 0 )
pId = RID_SVXITEMS_KERNING_EXPANDED;
@@ -1536,7 +1536,7 @@ bool SvxCaseMapItem::GetPresentation
OUString SvxCaseMapItem::GetValueTextByPos( sal_uInt16 nPos )
{
- static const char* RID_SVXITEMS_CASEMAP[] =
+ static TranslateId RID_SVXITEMS_CASEMAP[] =
{
RID_SVXITEMS_CASEMAP_NONE,
RID_SVXITEMS_CASEMAP_UPPERCASE,
@@ -1658,7 +1658,7 @@ bool SvxEscapementItem::GetPresentation
OUString SvxEscapementItem::GetValueTextByPos( sal_uInt16 nPos )
{
- static const char* RID_SVXITEMS_ESCAPEMENT[] =
+ static TranslateId RID_SVXITEMS_ESCAPEMENT[] =
{
RID_SVXITEMS_ESCAPEMENT_OFF,
RID_SVXITEMS_ESCAPEMENT_SUPER,
@@ -1875,7 +1875,7 @@ bool SvxBlinkItem::GetPresentation
OUString& rText, const IntlWrapper& /*rIntl*/
) const
{
- const char* pId = RID_SVXITEMS_BLINK_FALSE;
+ TranslateId pId = RID_SVXITEMS_BLINK_FALSE;
if ( GetValue() )
pId = RID_SVXITEMS_BLINK_TRUE;
@@ -1905,7 +1905,7 @@ bool SvxEmphasisMarkItem::GetPresentation
const IntlWrapper& /*rIntl*/
) const
{
- static const char* RID_SVXITEMS_EMPHASIS[] =
+ static TranslateId RID_SVXITEMS_EMPHASIS[] =
{
RID_SVXITEMS_EMPHASIS_NONE_STYLE,
RID_SVXITEMS_EMPHASIS_DOT_STYLE,
@@ -1917,11 +1917,11 @@ bool SvxEmphasisMarkItem::GetPresentation
FontEmphasisMark nVal = GetEmphasisMark();
rText = EditResId(RID_SVXITEMS_EMPHASIS[
static_cast<sal_uInt16>(static_cast<FontEmphasisMark>( nVal & FontEmphasisMark::Style ))]);
- const char* pId = ( FontEmphasisMark::PosAbove & nVal )
+ TranslateId pId = ( FontEmphasisMark::PosAbove & nVal )
? RID_SVXITEMS_EMPHASIS_ABOVE_POS
: ( FontEmphasisMark::PosBelow & nVal )
? RID_SVXITEMS_EMPHASIS_BELOW_POS
- : nullptr;
+ : TranslateId();
if( pId )
rText += EditResId( pId );
return true;
@@ -2329,7 +2329,7 @@ SvxCharReliefItem* SvxCharReliefItem::Clone( SfxItemPool * ) const
return new SvxCharReliefItem( *this );
}
-static const char* RID_SVXITEMS_RELIEF[] =
+static TranslateId RID_SVXITEMS_RELIEF[] =
{
RID_SVXITEMS_RELIEF_NONE,
RID_SVXITEMS_RELIEF_EMBOSSED,
diff --git a/editeng/source/misc/splwrap.cxx b/editeng/source/misc/splwrap.cxx
index b51c9c97b613..669546a8e5cb 100644
--- a/editeng/source/misc/splwrap.cxx
+++ b/editeng/source/misc/splwrap.cxx
@@ -342,7 +342,7 @@ bool SvxSpellWrapper::SpellNext( )
// a BODY_area done, ask for the other BODY_area
xWait.reset();
- const char* pResId = bReverse ? RID_SVXSTR_QUERY_BW_CONTINUE : RID_SVXSTR_QUERY_CONTINUE;
+ TranslateId pResId = bReverse ? RID_SVXSTR_QUERY_BW_CONTINUE : RID_SVXSTR_QUERY_CONTINUE;
std::unique_ptr<weld::MessageDialog> xBox(Application::CreateMessageDialog(pWin,
VclMessageType::Question, VclButtonsType::YesNo,
EditResId(pResId)));
diff --git a/editeng/source/misc/unolingu.cxx b/editeng/source/misc/unolingu.cxx
index b72fae9ebb67..c5f37e74cbb4 100644
--- a/editeng/source/misc/unolingu.cxx
+++ b/editeng/source/misc/unolingu.cxx
@@ -731,7 +731,7 @@ short SvxDicError(weld::Window *pParent, linguistic::DictionaryError nError)
short nRes = 0;
if (linguistic::DictionaryError::NONE != nError)
{
- const char* pRid;
+ TranslateId pRid;
switch (nError)
{
case linguistic::DictionaryError::FULL : pRid = RID_SVXSTR_DIC_ERR_FULL; break;
diff --git a/extensions/inc/command.hrc b/extensions/inc/command.hrc
index 8ae09743b154..ca05f1c4e732 100644
--- a/extensions/inc/command.hrc
+++ b/extensions/inc/command.hrc
@@ -20,11 +20,13 @@
#ifndef INCLUDED_EXTENSIONS_INC_COMMAND_HRC
#define INCLUDED_EXTENSIONS_INC_COMMAND_HRC
-#define NC_(Context, String) reinterpret_cast<char const *>(Context "\004" u8##String)
+#include <unotools/resmgr.hxx>
+
+#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
namespace {
-const char* RID_RSC_ENUM_COMMAND_TYPE[] =
+const TranslateId RID_RSC_ENUM_COMMAND_TYPE[] =
{
NC_("RID_RSC_ENUM_COMMAND_TYPE", "Table"),
NC_("RID_RSC_ENUM_COMMAND_TYPE", "Query"),
diff --git a/extensions/inc/showhide.hrc b/extensions/inc/showhide.hrc
index 0f7ec42ad346..5f96170a71f9 100644
--- a/extensions/inc/showhide.hrc
+++ b/extensions/inc/showhide.hrc
@@ -20,11 +20,11 @@
#ifndef INCLUDED_EXTENSIONS_INC_SHOWHIDE_HRC
#define INCLUDED_EXTENSIONS_INC_SHOWHIDE_HRC
-#define NC_(Context, String) reinterpret_cast<char const *>(Context "\004" u8##String)
+#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
namespace {
-const char* RID_RSC_ENUM_SHOWHIDE[] =
+const TranslateId RID_RSC_ENUM_SHOWHIDE[] =
{
NC_("RID_RSC_ENUM_SHOWHIDE", "Hide"),
NC_("RID_RSC_ENUM_SHOWHIDE", "Show")
diff --git a/extensions/inc/stringarrays.hrc b/extensions/inc/stringarrays.hrc
index c7053e143bf0..2de092317cac 100644
--- a/extensions/inc/stringarrays.hrc
+++ b/extensions/inc/stringarrays.hrc
@@ -20,29 +20,29 @@
#ifndef INCLUDED_EXTENSIONS_INC_STRINGARRAYS_HRC
#define INCLUDED_EXTENSIONS_INC_STRINGARRAYS_HRC
-#define NC_(Context, String) reinterpret_cast<char const *>(Context "\004" u8##String)
+#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
-const char* RID_RSC_ENUM_VERTICAL_ALIGN[] =
+const TranslateId RID_RSC_ENUM_VERTICAL_ALIGN[] =
{
NC_("RID_RSC_ENUM_VERTICAL_ALIGN", "Top"),
NC_("RID_RSC_ENUM_VERTICAL_ALIGN", "Middle"),
NC_("RID_RSC_ENUM_VERTICAL_ALIGN", "Bottom")
};
-const char* RID_RSC_ENUM_ICONSIZE_TYPE[] =
+const TranslateId RID_RSC_ENUM_ICONSIZE_TYPE[] =
{
NC_("RID_RSC_ENUM_ICONSIZE_TYPE", "Small"),
NC_("RID_RSC_ENUM_ICONSIZE_TYPE", "Large")
};
-const char* RID_RSC_ENUM_BORDER_TYPE[] =
+const TranslateId RID_RSC_ENUM_BORDER_TYPE[] =
{
NC_("RID_RSC_ENUM_BORDER_TYPE", "Without frame"),
NC_("RID_RSC_ENUM_BORDER_TYPE", "3D look"),
NC_("RID_RSC_ENUM_BORDER_TYPE", "Flat")
};
-const char* RID_RSC_ENUM_LISTSOURCE_TYPE[] =
+const TranslateId RID_RSC_ENUM_LISTSOURCE_TYPE[] =
{
NC_("RID_RSC_ENUM_LISTSOURCE_TYPE", "Valuelist"),
NC_("RID_RSC_ENUM_LISTSOURCE_TYPE", "Table"),
@@ -52,14 +52,14 @@ const char* RID_RSC_ENUM_LISTSOURCE_TYPE[] =
NC_("RID_RSC_ENUM_LISTSOURCE_TYPE", "Tablefields" )
};
-const char* RID_RSC_ENUM_ALIGNMENT[] =
+const TranslateId RID_RSC_ENUM_ALIGNMENT[] =
{
NC_("RID_RSC_ENUM_ALIGNMENT", "Left"),
NC_("RID_RSC_ENUM_ALIGNMENT", "Center"),
NC_("RID_RSC_ENUM_ALIGNMENT", "Right" )
};
-const char* RID_RSC_ENUM_BUTTONTYPE[] =
+const TranslateId RID_RSC_ENUM_BUTTONTYPE[] =
{
NC_("RID_RSC_ENUM_BUTTONTYPE", "None"),
NC_("RID_RSC_ENUM_BUTTONTYPE", "Submit form"),
@@ -76,20 +76,20 @@ const char* RID_RSC_ENUM_BUTTONTYPE[] =
NC_("RID_RSC_ENUM_BUTTONTYPE", "Refresh form")
};
-const char* RID_RSC_ENUM_SUBMIT_METHOD[] =
+const TranslateId RID_RSC_ENUM_SUBMIT_METHOD[] =
{
NC_("RID_RSC_ENUM_SUBMIT_METHOD", "Get"),
NC_("RID_RSC_ENUM_SUBMIT_METHOD", "Post" )
};
-const char* RID_RSC_ENUM_SUBMIT_ENCODING[] =
+const TranslateId RID_RSC_ENUM_SUBMIT_ENCODING[] =
{
NC_("RID_RSC_ENUM_SUBMIT_ENCODING", "URL"),
NC_("RID_RSC_ENUM_SUBMIT_ENCODING", "Multipart"),
NC_("RID_RSC_ENUM_SUBMIT_ENCODING", "Text" )
};
-const char* RID_RSC_ENUM_DATEFORMAT_LIST[] =
+const TranslateId RID_RSC_ENUM_DATEFORMAT_LIST[] =
{
NC_("RID_RSC_ENUM_DATEFORMAT_LIST", "Standard (short)"),
NC_("RID_RSC_ENUM_DATEFORMAT_LIST", "Standard (short YY)"),
@@ -105,7 +105,7 @@ const char* RID_RSC_ENUM_DATEFORMAT_LIST[] =
NC_("RID_RSC_ENUM_DATEFORMAT_LIST", "YYYY-MM-DD" ),
};
-const char* RID_RSC_ENUM_TIMEFORMAT_LIST[] =
+const TranslateId RID_RSC_ENUM_TIMEFORMAT_LIST[] =
{
NC_("RID_RSC_ENUM_TIMEFORMAT_LIST", "13:45"),
NC_("RID_RSC_ENUM_TIMEFORMAT_LIST", "13:45:00"),
@@ -113,28 +113,28 @@ const char* RID_RSC_ENUM_TIMEFORMAT_LIST[] =
NC_("RID_RSC_ENUM_TIMEFORMAT_LIST", "01:45:00 PM" ),
};
-const char* RID_RSC_ENUM_CHECKED[] =
+const TranslateId RID_RSC_ENUM_CHECKED[] =
{
NC_("RID_RSC_ENUM_CHECKED", "Not Selected"),
NC_("RID_RSC_ENUM_CHECKED", "Selected"),
NC_("RID_RSC_ENUM_CHECKED", "Not Defined" )
};
-const char* RID_RSC_ENUM_CYCLE[] =
+const TranslateId RID_RSC_ENUM_CYCLE[] =
{
NC_("RID_RSC_ENUM_CYCLE", "All records"),
NC_("RID_RSC_ENUM_CYCLE", "Active record"),
NC_("RID_RSC_ENUM_CYCLE", "Current page" )
};
-const char* RID_RSC_ENUM_NAVIGATION[] =
+const TranslateId RID_RSC_ENUM_NAVIGATION[] =
{
NC_("RID_RSC_ENUM_NAVIGATION", "No"),
NC_("RID_RSC_ENUM_NAVIGATION", "Yes"),
NC_("RID_RSC_ENUM_NAVIGATION", "Parent Form")
};
-const char* RID_RSC_ENUM_SUBMIT_TARGET[] =
+const TranslateId RID_RSC_ENUM_SUBMIT_TARGET[] =
{
NC_("RID_RSC_ENUM_SUBMIT_TARGET", "_blank"),
NC_("RID_RSC_ENUM_SUBMIT_TARGET", "_parent"),
@@ -142,7 +142,7 @@ const char* RID_RSC_ENUM_SUBMIT_TARGET[] =
NC_("RID_RSC_ENUM_SUBMIT_TARGET", "_top")
};
-const char* RID_RSC_ENUM_SELECTION_TYPE[] =
+const TranslateId RID_RSC_ENUM_SELECTION_TYPE[] =
{
NC_("RID_RSC_ENUM_SELECTION_TYPE", "None" ),
NC_("RID_RSC_ENUM_SELECTION_TYPE", "Single" ),
@@ -150,13 +150,13 @@ const char* RID_RSC_ENUM_SELECTION_TYPE[] =
NC_("RID_RSC_ENUM_SELECTION_TYPE", "Range" )
};
-const char* RID_RSC_ENUM_ORIENTATION[] =
+const TranslateId RID_RSC_ENUM_ORIENTATION[] =
{
NC_("RID_RSC_ENUM_ORIENTATION", "Horizontal"),
NC_("RID_RSC_ENUM_ORIENTATION", "Vertical")
};
-const char* RID_RSC_ENUM_PUSHBUTTONTYPE[] =
+const TranslateId RID_RSC_ENUM_PUSHBUTTONTYPE[] =
{
NC_("RID_RSC_ENUM_PUSHBUTTONTYPE", "Default"),
NC_("RID_RSC_ENUM_PUSHBUTTONTYPE", "OK"),
@@ -164,26 +164,26 @@ const char* RID_RSC_ENUM_PUSHBUTTONTYPE[] =
NC_("RID_RSC_ENUM_PUSHBUTTONTYPE", "Help")
};
-const char* RID_RSC_ENUM_CELL_EXCHANGE_TYPE[] =
+const TranslateId RID_RSC_ENUM_CELL_EXCHANGE_TYPE[] =
{
NC_("RID_RSC_ENUM_CELL_EXCHANGE_TYPE", "The selected entry"),
NC_("RID_RSC_ENUM_CELL_EXCHANGE_TYPE", "Position of the selected entry")
};
-const char* RID_RSC_ENUM_TEXTTYPE[] =
+const TranslateId RID_RSC_ENUM_TEXTTYPE[] =
{
NC_("RID_RSC_ENUM_TEXTTYPE", "Single-line"),
NC_("RID_RSC_ENUM_TEXTTYPE", "Multi-line"),
NC_("RID_RSC_ENUM_TEXTTYPE", "Multi-line with formatting")
};
-const char* RID_RSC_ENUM_LINEEND_FORMAT[] =
+const TranslateId RID_RSC_ENUM_LINEEND_FORMAT[] =
{
NC_("RID_RSC_ENUM_LINEEND_FORMAT", "LF (Unix)"),
NC_("RID_RSC_ENUM_LINEEND_FORMAT", "CR+LF (Windows)")
};
-const char* RID_RSC_ENUM_SCROLLBARS[] =
+const TranslateId RID_RSC_ENUM_SCROLLBARS[] =
{
NC_("RID_RSC_ENUM_SCROLLBARS", "None"),
NC_("RID_RSC_ENUM_SCROLLBARS", "Horizontal"),
@@ -191,13 +191,13 @@ const char* RID_RSC_ENUM_SCROLLBARS[] =
NC_("RID_RSC_ENUM_SCROLLBARS", "Both")
};
-const char* RID_RSC_ENUM_VISUALEFFECT[] =
+const TranslateId RID_RSC_ENUM_VISUALEFFECT[] =
{
NC_("RID_RSC_ENUM_VISUALEFFECT", "3D"),
NC_("RID_RSC_ENUM_VISUALEFFECT", "Flat"),
};
-const char* RID_RSC_ENUM_IMAGE_POSITION[] =
+const TranslateId RID_RSC_ENUM_IMAGE_POSITION[] =
{
NC_("RID_RSC_ENUM_IMAGE_POSITION", "Left top"),
NC_("RID_RSC_ENUM_IMAGE_POSITION", "Left centered"),
@@ -214,35 +214,35 @@ const char* RID_RSC_ENUM_IMAGE_POSITION[] =
NC_("RID_RSC_ENUM_IMAGE_POSITION", "Centered"),
};
-const char* RID_RSC_ENUM_WHITESPACE_HANDLING[] =
+const TranslateId RID_RSC_ENUM_WHITESPACE_HANDLING[] =
{
NC_("RID_RSC_ENUM_WHITESPACE_HANDLING", "Preserve"),
NC_("RID_RSC_ENUM_WHITESPACE_HANDLING", "Replace"),
NC_("RID_RSC_ENUM_WHITESPACE_HANDLING", "Collapse")
};
-const char* RID_RSC_ENUM_SCALE_MODE[] =
+const TranslateId RID_RSC_ENUM_SCALE_MODE[] =
{
NC_("RID_RSC_ENUM_SCALE_MODE", "No"),
NC_("RID_RSC_ENUM_SCALE_MODE", "Keep Ratio"),
NC_("RID_RSC_ENUM_SCALE_MODE", "Fit to Size")
};
-const char* RID_RSC_ENUM_WRITING_MODE[] =
+const TranslateId RID_RSC_ENUM_WRITING_MODE[] =
{
NC_("RID_RSC_ENUM_WRITING_MODE", "Left-to-right"),
NC_("RID_RSC_ENUM_WRITING_MODE", "Right-to-left"),
NC_("RID_RSC_ENUM_WRITING_MODE", "Use superordinate object settings")
};
-const char* RID_RSC_ENUM_WHEEL_BEHAVIOR[] =
+const TranslateId RID_RSC_ENUM_WHEEL_BEHAVIOR[] =
{
NC_("RID_RSC_ENUM_WHEEL_BEHAVIOR", "Never"),
NC_("RID_RSC_ENUM_WHEEL_BEHAVIOR", "When focused"),
NC_("RID_RSC_ENUM_WHEEL_BEHAVIOR", "Always")
};
-const char* RID_RSC_ENUM_TEXT_ANCHOR_TYPE[] =
+const TranslateId RID_RSC_ENUM_TEXT_ANCHOR_TYPE[] =
{
NC_("RID_RSC_ENUM_TEXT_ANCHOR_TYPE", "To Paragraph"),
NC_("RID_RSC_ENUM_TEXT_ANCHOR_TYPE", "As Character"),
@@ -251,7 +251,7 @@ const char* RID_RSC_ENUM_TEXT_ANCHOR_TYPE[] =
NC_("RID_RSC_ENUM_TEXT_ANCHOR_TYPE", "To Character")
};
-const char* RID_RSC_ENUM_SHEET_ANCHOR_TYPE[] =
+const TranslateId RID_RSC_ENUM_SHEET_ANCHOR_TYPE[] =
{
NC_("RID_RSC_ENUM_SHEET_ANCHOR_TYPE", "To Page"),
NC_("RID_RSC_ENUM_SHEET_ANCHOR_TYPE", "To Cell")
diff --git a/extensions/inc/strings.hrc b/extensions/inc/strings.hrc
index 63dc3ced1b7d..8d6ed0580256 100644
--- a/extensions/inc/strings.hrc
+++ b/extensions/inc/strings.hrc
@@ -20,7 +20,9 @@
#ifndef INCLUDED_EXTENSIONS_INC_STRINGS_HRC
#define INCLUDED_EXTENSIONS_INC_STRINGS_HRC
-#define NC_(Context, String) reinterpret_cast<char const *>(Context "\004" u8##String)
+#include <unotools/resmgr.hxx>
+
+#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
#define RID_STR_EDITMASK NC_("RID_STR_EDITMASK", "Edit mask")
#define RID_STR_LITERALMASK NC_("RID_STR_LITERALMASK", "Literal mask")
diff --git a/extensions/inc/yesno.hrc b/extensions/inc/yesno.hrc
index 3992a1e8ab28..32792bb81300 100644
--- a/extensions/inc/yesno.hrc
+++ b/extensions/inc/yesno.hrc
@@ -20,11 +20,13 @@
#ifndef INCLUDED_EXTENSIONS_INC_YESNO_HRC
#define INCLUDED_EXTENSIONS_INC_YESNO_HRC
-#define NC_(Context, String) reinterpret_cast<char const *>(Context "\004" u8##String)
+#include <unotools/resmgr.hxx>
+
+#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
namespace {
-const char* RID_RSC_ENUM_YESNO[] =
+const TranslateId RID_RSC_ENUM_YESNO[] =
{
NC_("RID_RSC_ENUM_YESNO", "No" ),
NC_("RID_RSC_ENUM_YESNO", "Yes" )
diff --git a/extensions/source/abpilot/abspilot.cxx b/extensions/source/abpilot/abspilot.cxx
index fee75664d983..5600e819fb07 100644
--- a/extensions/source/abpilot/abspilot.cxx
+++ b/extensions/source/abpilot/abspilot.cxx
@@ -119,7 +119,7 @@ namespace abp
OUString OAddressBookSourcePilot::getStateDisplayName( WizardState _nState ) const
{
- const char* pResId = nullptr;
+ TranslateId pResId;
switch ( _nState )
{
case STATE_SELECT_ABTYPE: pResId = RID_STR_SELECT_ABTYPE; break;
diff --git a/extensions/source/bibliography/bibmod.cxx b/extensions/source/bibliography/bibmod.cxx
index 5f32aef3a366..3a6d06672004 100644
--- a/extensions/source/bibliography/bibmod.cxx
+++ b/extensions/source/bibliography/bibmod.cxx
@@ -54,7 +54,7 @@ void CloseBibModul(HdlBibModul ppBibModul)
}
}
-OUString BibResId(std::string_view aId)
+OUString BibResId(TranslateId aId)
{
return Translate::get(aId, pBibModul->GetResLocale());
}
diff --git a/extensions/source/bibliography/bibresid.hxx b/extensions/source/bibliography/bibresid.hxx
index 7de3d0c46bfb..6e17e76f2af7 100644
--- a/extensions/source/bibliography/bibresid.hxx
+++ b/extensions/source/bibliography/bibresid.hxx
@@ -20,8 +20,8 @@
#pragma once
#include <rtl/ustring.hxx>
-#include <string_view>
+#include <unotools/resmgr.hxx>
-OUString BibResId(std::string_view aId);
+OUString BibResId(TranslateId aId);
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/extensions/source/dbpilots/controlwizard.cxx b/extensions/source/dbpilots/controlwizard.cxx
index b442aca3fdbe..e8a2dfef1189 100644
--- a/extensions/source/dbpilots/controlwizard.cxx
+++ b/extensions/source/dbpilots/controlwizard.cxx
@@ -185,7 +185,7 @@ namespace dbp
m_xFormDatasource->set_label(sDataSource);
m_xFormTable->set_label(sCommand);
- const char* pCommandTypeResourceId = nullptr;
+ TranslateId pCommandTypeResourceId;
switch (nCommandType)
{
case CommandType::TABLE:
diff --git a/extensions/source/inc/componentmodule.cxx b/extensions/source/inc/componentmodule.cxx
index 69d2234adbdb..e1b29b2ecef6 100644
--- a/extensions/source/inc/componentmodule.cxx
+++ b/extensions/source/inc/componentmodule.cxx
@@ -23,7 +23,7 @@
namespace compmodule
{
- OUString ModuleRes(const char* pId)
+ OUString ModuleRes(TranslateId pId)
{
return Translate::get(pId, Translate::Create("pcr"));
}
diff --git a/extensions/source/inc/componentmodule.hxx b/extensions/source/inc/componentmodule.hxx
index 80bc71169190..24b5032cd98e 100644
--- a/extensions/source/inc/componentmodule.hxx
+++ b/extensions/source/inc/componentmodule.hxx
@@ -20,12 +20,13 @@
#pragma once
#include <rtl/ustring.hxx>
+#include <unotools/resmgr.hxx>
namespace compmodule
{
// specialized ResId, using the resource locale provided by the global module
- OUString ModuleRes(const char* pId);
+ OUString ModuleRes(TranslateId pId);
} // namespace compmodule
diff --git a/extensions/source/propctrlr/defaultforminspection.cxx b/extensions/source/propctrlr/defaultforminspection.cxx
index b3b0c82af496..a2b1d2d26ea1 100644
--- a/extensions/source/propctrlr/defaultforminspection.cxx
+++ b/extensions/source/propctrlr/defaultforminspection.cxx
@@ -131,7 +131,7 @@ namespace pcr
static struct
{
const char* programmaticName;
- const char* uiNameResId;
+ TranslateId uiNameResId;
const char* helpId;
} const aCategories[] = {
{ "General", RID_STR_PROPPAGE_DEFAULT, HID_FM_PROPDLG_TAB_GENERAL },
diff --git a/extensions/source/propctrlr/eventhandler.cxx b/extensions/source/propctrlr/eventhandler.cxx
index 74a1ba13a94b..940d7d48f379 100644
--- a/extensions/source/propctrlr/eventhandler.cxx
+++ b/extensions/source/propctrlr/eventhandler.cxx
@@ -123,7 +123,7 @@ namespace pcr
namespace FormComponentType = css::form::FormComponentType;
EventDescription::EventDescription( EventId _nId, const char* _pListenerNamespaceAscii, const char* _pListenerClassAsciiName,
- const char* _pListenerMethodAsciiName, const char* pDisplayNameResId, const OString& _sHelpId, const OString& _sUniqueBrowseId )
+ const char* _pListenerMethodAsciiName, TranslateId pDisplayNameResId, const OString& _sHelpId, const OString& _sUniqueBrowseId )
:sDisplayName(PcrRes( pDisplayNameResId ))
,sListenerMethodName( OUString::createFromAscii( _pListenerMethodAsciiName ) )
,sHelpId( _sHelpId )
diff --git a/extensions/source/propctrlr/eventhandler.hxx b/extensions/source/propctrlr/eventhandler.hxx
index 320875a418fb..1447276a3b62 100644
--- a/extensions/source/propctrlr/eventhandler.hxx
+++ b/extensions/source/propctrlr/eventhandler.hxx
@@ -28,6 +28,7 @@
#include <com/sun/star/frame/XFrame.hpp>
#include <com/sun/star/uno/XComponentContext.hpp>
#include <cppuhelper/compbase.hxx>
+#include <unotools/resmgr.hxx>
#include <unordered_map>
@@ -58,7 +59,7 @@ namespace pcr
const char* _pListenerNamespaceAscii,
const char* _pListenerClassAsciiName,
const char* _pListenerMethodAsciiName,
- const char* pDisplayNameResId,
+ TranslateId pDisplayNameResId,
const OString& _sHelpId,
const OString& _sUniqueBrowseId );
};
diff --git a/extensions/source/propctrlr/formcomponenthandler.cxx b/extensions/source/propctrlr/formcomponenthandler.cxx
index 0cf3bc52f171..abbb5d418dc6 100644
--- a/extensions/source/propctrlr/formcomponenthandler.cxx
+++ b/extensions/source/propctrlr/formcomponenthandler.cxx
@@ -739,7 +739,7 @@ namespace pcr
// font style
::FontWeight eWeight = vcl::unohelper::ConvertFontWeight( aFont.Weight );
- const char* pStyleResID = RID_STR_FONTSTYLE_REGULAR;
+ TranslateId pStyleResID = RID_STR_FONTSTYLE_REGULAR;
if ( aFont.Slant == FontSlant_ITALIC )
{
if ( eWeight > WEIGHT_NORMAL )
diff --git a/extensions/source/propctrlr/formmetadata.cxx b/extensions/source/propctrlr/formmetadata.cxx
index 3fd9e92b3a0f..f9147cb4469a 100644
--- a/extensions/source/propctrlr/formmetadata.cxx
+++ b/extensions/source/propctrlr/formmetadata.cxx
@@ -410,7 +410,7 @@ namespace pcr
OSL_ENSURE( ( ( getPropertyUIFlags( _nId ) & PROP_FLAG_ENUM ) != 0 ) || ( _nId == PROPERTY_ID_TARGET_FRAME ),
"OPropertyInfoService::getPropertyEnumRepresentations: this is no enum property!" );
- const char** pStringItemsResId = nullptr;
+ const TranslateId* pStringItemsResId = nullptr;
int nElements = 0;
switch ( _nId )
{
diff --git a/extensions/source/propctrlr/handlerhelper.cxx b/extensions/source/propctrlr/handlerhelper.cxx
index b83773b6f00a..cc9e08561dda 100644
--- a/extensions/source/propctrlr/handlerhelper.cxx
+++ b/extensions/source/propctrlr/handlerhelper.cxx
@@ -139,7 +139,7 @@ namespace pcr
}
Reference< XPropertyControl > PropertyHandlerHelper::createListBoxControl( const Reference< XPropertyControlFactory >& _rxControlFactory,
- const char** pTransIds, size_t nElements, bool _bReadOnlyControl )
+ const TranslateId* pTransIds, size_t nElements, bool _bReadOnlyControl )
{
std::vector<OUString> aInitialListEntries;
for (size_t i = 0; i < nElements; ++i)
diff --git a/extensions/source/propctrlr/handlerhelper.hxx b/extensions/source/propctrlr/handlerhelper.hxx
index a53a24a9256f..21c0fd2fe162 100644
--- a/extensions/source/propctrlr/handlerhelper.hxx
+++ b/extensions/source/propctrlr/handlerhelper.hxx
@@ -25,6 +25,7 @@
#include <com/sun/star/inspection/XPropertyControlFactory.hpp>
#include <com/sun/star/beans/PropertyAttribute.hpp>
#include <com/sun/star/beans/Optional.hpp>
+#include <unotools/resmgr.hxx>
#include <vector>
@@ -116,7 +117,7 @@ namespace pcr
static css::uno::Reference< css::inspection::XPropertyControl >
createListBoxControl(
const css::uno::Reference< css::inspection::XPropertyControlFactory >& _rxControlFactory,
- const char** pTransIds, size_t nElements,
+ const TranslateId* pTransIds, size_t nElements,
bool _bReadOnlyControl
);
diff --git a/extensions/source/propctrlr/modulepcr.cxx b/extensions/source/propctrlr/modulepcr.cxx
index 67a6e198b27e..da8336e10991 100644
--- a/extensions/source/propctrlr/modulepcr.cxx
+++ b/extensions/source/propctrlr/modulepcr.cxx
@@ -23,7 +23,7 @@
namespace pcr
{
-OUString PcrRes(std::string_view aId) { return Translate::get(aId, Translate::Create("pcr")); }
+OUString PcrRes(TranslateId 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 c8eed78eef32..d0b854893ea2 100644
--- a/extensions/source/propctrlr/modulepcr.hxx
+++ b/extensions/source/propctrlr/modulepcr.hxx
@@ -20,11 +20,11 @@
#pragma once
#include <rtl/ustring.hxx>
-#include <string_view>
+#include <unotools/resmgr.hxx>
namespace pcr
{
-OUString PcrRes(std::string_view pId);
+OUString PcrRes(TranslateId 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 87c17e56fe78..e76575cd9bc9 100644
--- a/extensions/source/scanner/sanedlg.cxx
+++ b/extensions/source/scanner/sanedlg.cxx
@@ -273,7 +273,7 @@ SaneDlg::~SaneDlg()
namespace {
-OUString SaneResId(std::string_view aID)
+OUString SaneResId(TranslateId aID)
{
return Translate::get(aID, Translate::Create("pcr"));
}
diff --git a/filter/inc/strings.hrc b/filter/inc/strings.hrc
index b1bea27dec47..eecfdb33e2d0 100644
--- a/filter/inc/strings.hrc
+++ b/filter/inc/strings.hrc
@@ -19,7 +19,7 @@
#pragma once
-#define NC_(Context, String) reinterpret_cast<char const *>(Context "\004" u8##String)
+#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
#define STR_UNKNOWN_APPLICATION NC_("STR_UNKNOWN_APPLICATION", "Unknown")
#define STR_IMPORT_ONLY NC_("STR_IMPORT_ONLY", "import filter")
diff --git a/filter/source/pdf/impdialog.cxx b/filter/source/pdf/impdialog.cxx
index a1a8978e04ff..0e5a4441907e 100644
--- a/filter/source/pdf/impdialog.cxx
+++ b/filter/source/pdf/impdialog.cxx
@@ -42,7 +42,7 @@
#include <com/sun/star/beans/XMaterialHolder.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
-static OUString PDFFilterResId(std::string_view aId)
+static OUString PDFFilterResId(TranslateId aId)
{
return Translate::get(aId, Translate::Create("flt"));
}
diff --git a/filter/source/t602/t602filter.cxx b/filter/source/t602/t602filter.cxx
index 8fd52e72fed5..a8df18768b3a 100644
--- a/filter/source/t602/t602filter.cxx
+++ b/filter/source/t602/t602filter.cxx
@@ -1078,7 +1078,7 @@ sal_Int16 SAL_CALL T602ImportFilterDialog::execute()
return css::ui::dialogs::ExecutableDialogResults::CANCEL;
}
-OUString T602ImportFilterDialog::getResStr(const char* resid)
+OUString T602ImportFilterDialog::getResStr(TranslateId resid)
{
return Translate::get(resid, maResLocale);
}
diff --git a/filter/source/t602/t602filter.hxx b/filter/source/t602/t602filter.hxx
index e9ec3a58e4e3..04376a1f3c26 100644
--- a/filter/source/t602/t602filter.hxx
+++ b/filter/source/t602/t602filter.hxx
@@ -34,6 +34,7 @@
#include <xmloff/attrlist.hxx>
#include <i18nlangtag/languagetag.hxx>
#include <rtl/ref.hxx>
+#include <unotools/resmgr.hxx>
namespace T602ImportFilter {
@@ -85,7 +86,7 @@ class T602ImportFilterDialog : public cppu::WeakImplHelper <
LanguageTag maLocale;
std::locale maResLocale;
bool OptionsDlg();
- OUString getResStr(const char* resid);
+ OUString getResStr(TranslateId resid);
virtual ~T602ImportFilterDialog() override;
diff --git a/filter/source/xsltdialog/xmlfiltercommon.hxx b/filter/source/xsltdialog/xmlfiltercommon.hxx
index c8b8ea7bfa67..0d340fa12e0f 100644
--- a/filter/source/xsltdialog/xmlfiltercommon.hxx
+++ b/filter/source/xsltdialog/xmlfiltercommon.hxx
@@ -20,6 +20,7 @@
#include <com/sun/star/io/XInputStream.hpp>
#include <com/sun/star/io/XOutputStream.hpp>
+#include <unotools/resmgr.hxx>
#include <string_view>
#include <vector>
@@ -77,6 +78,6 @@ struct application_info_impl
extern std::vector< application_info_impl > const & getApplicationInfos();
extern OUString getApplicationUIName( std::u16string_view rServiceName );
extern const application_info_impl* getApplicationInfo( std::u16string_view rServiceName );
-OUString XsltResId(std::string_view pId);
+OUString XsltResId(TranslateId pId);
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx b/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx
index a31eba952173..66e35f186c5d 100644
--- a/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx
+++ b/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx
@@ -58,7 +58,7 @@ using namespace com::sun::star::util;
using ::rtl::Uri;
-OUString XsltResId(std::string_view aId)
+OUString XsltResId(TranslateId aId)
{
return Translate::get(aId, Translate::Create("flt"));
}
diff --git a/filter/source/xsltdialog/xmlfiltertabdialog.cxx b/filter/source/xsltdialog/xmlfiltertabdialog.cxx
index 306cf0abf23f..ea73c486ae1f 100644
--- a/filter/source/xsltdialog/xmlfiltertabdialog.cxx
+++ b/filter/source/xsltdialog/xmlfiltertabdialog.cxx
@@ -25,6 +25,7 @@
#include <vcl/svapp.hxx>
#include <vcl/weld.hxx>
#include <osl/file.hxx>
+#include <unotools/resmgr.hxx>
#include <strings.hrc>
#include "xmlfiltertabdialog.hxx"
@@ -69,7 +70,7 @@ bool XMLFilterTabDialog::onOk()
mpBasicPage->FillInfo( mpNewInfo.get() );
OString sErrorPage;
- const char* pErrorId = nullptr;
+ TranslateId pErrorId;
weld::Widget* pFocusWindow = nullptr;
OUString aReplace1;
OUString aReplace2;
@@ -128,7 +129,7 @@ bool XMLFilterTabDialog::onOk()
sal_Int32 nFilter;
Sequence< PropertyValue > aValues;
- for( nFilter = 0; (nFilter < nCount) && (pErrorId == nullptr); nFilter++, pFilterName++ )
+ for( nFilter = 0; (nFilter < nCount) && !pErrorId; nFilter++, pFilterName++ )
{
Any aAny( xFilterContainer->getByName( *pFilterName ) );
if( !(aAny >>= aValues) )
@@ -138,7 +139,7 @@ bool XMLFilterTabDialog::onOk()
PropertyValue* pValues = aValues.getArray();
sal_Int32 nValue;
- for( nValue = 0; (nValue < nValueCount) && (pErrorId == nullptr); nValue++, pValues++ )
+ for( nValue = 0; (nValue < nValueCount) && !pErrorId; nValue++, pValues++ )
{
if ( pValues->Name == "UIName" )
{
diff --git a/forms/inc/strings.hrc b/forms/inc/strings.hrc
index c3b7447fbc84..8ff5d91dc8b3 100644
--- a/forms/inc/strings.hrc
+++ b/forms/inc/strings.hrc
@@ -19,7 +19,9 @@
#pragma once
-#define NC_(Context, String) reinterpret_cast<char const *>(Context "\004" u8##String)
+#include <unotools/resmgr.hxx>
+
+#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(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" )
diff --git a/forms/source/inc/frm_resource.hxx b/forms/source/inc/frm_resource.hxx
index 5766af787f2c..ea629440bbce 100644
--- a/forms/source/inc/frm_resource.hxx
+++ b/forms/source/inc/frm_resource.hxx
@@ -20,7 +20,7 @@
#pragma once
#include <rtl/ustring.hxx>
-#include <string_view>
+#include <unotools/resmgr.hxx>
namespace frm
{
@@ -32,7 +32,7 @@ namespace frm
{
/** loads the string with the specified resource id from the FormLayer mo file
*/
- OUString loadString(std::string_view aResId);
+ OUString loadString(TranslateId aResId);
};
}
diff --git a/forms/source/resource/frm_resource.cxx b/forms/source/resource/frm_resource.cxx
index 00c6bd5c5b22..ee29836643db 100644
--- a/forms/source/resource/frm_resource.cxx
+++ b/forms/source/resource/frm_resource.cxx
@@ -18,11 +18,10 @@
*/
#include <frm_resource.hxx>
-#include <unotools/resmgr.hxx>
namespace frm::ResourceManager
{
- OUString loadString(std::string_view aResId)
+ OUString loadString(TranslateId aResId)
{
return Translate::get(aResId, Translate::Create("frm"));
}
diff --git a/forms/source/runtime/formoperations.cxx b/forms/source/runtime/formoperations.cxx
index 4aa12bc91233..fa8e092ab5cb 100644
--- a/forms/source/runtime/formoperations.cxx
+++ b/forms/source/runtime/formoperations.cxx
@@ -775,7 +775,7 @@ namespace frm
default:
{
- const char* pErrorResourceId = RID_STR_FEATURE_UNKNOWN;
+ TranslateId pErrorResourceId = RID_STR_FEATURE_UNKNOWN;
if ( lcl_requiresArguments( _nFeature ) )
pErrorResourceId = RID_STR_FEATURE_REQUIRES_PARAMETERS;
else if ( !lcl_isExecutableFeature( _nFeature ) )
@@ -1733,7 +1733,7 @@ namespace frm
template < typename FunctObj >
- void FormOperations::impl_doActionInSQLContext_throw( FunctObj f, const char* pErrorResourceId ) const
+ void FormOperations::impl_doActionInSQLContext_throw( FunctObj f, TranslateId pErrorResourceId ) const
{
try
{
diff --git a/forms/source/runtime/formoperations.hxx b/forms/source/runtime/formoperations.hxx
index bd092edd2a48..182b0a7e0958 100644
--- a/forms/source/runtime/formoperations.hxx
+++ b/forms/source/runtime/formoperations.hxx
@@ -35,6 +35,7 @@
#include <cppuhelper/compbase.hxx>
#include <connectivity/dbtools.hxx>
#include <tools/long.hxx>
+#include <unotools/resmgr.hxx>
namespace frm
{
@@ -293,7 +294,7 @@ namespace frm
the id of the resources string to use as error message
*/
template < typename FunctObj >
- void impl_doActionInSQLContext_throw( FunctObj f, const char* pErrorResourceId ) const;
+ void impl_doActionInSQLContext_throw( FunctObj f, TranslateId pErrorResourceId ) const;
// functionoid to call appendOrderByColumn
class impl_appendOrderByColumn_throw
diff --git a/forms/source/solar/control/navtoolbar.cxx b/forms/source/solar/control/navtoolbar.cxx
index 475038b8391d..909c5d044502 100644
--- a/forms/source/solar/control/navtoolbar.cxx
+++ b/forms/source/solar/control/navtoolbar.cxx
@@ -56,7 +56,7 @@ namespace frm
|| ( _nFeatureId == LID_RECORD_FILLER );
}
- OUString getLabelString(const char* pResId)
+ OUString getLabelString(TranslateId pResId)
{
OUString sLabel( " " + FRM_RES_STRING(pResId) + " " );
return sLabel;
diff --git a/forms/source/xforms/datatypes.cxx b/forms/source/xforms/datatypes.cxx
index c4ce2d941bb4..464b1c1adbbf 100644
--- a/forms/source/xforms/datatypes.cxx
+++ b/forms/source/xforms/datatypes.cxx
@@ -158,14 +158,14 @@ namespace xforms
sal_Bool OXSDDataType::validate( const OUString& sValue )
{
- return ( _validate( sValue ) == nullptr );
+ return bool(_validate( sValue ));
}
OUString OXSDDataType::explainInvalid( const OUString& sValue )
{
// get reason
- const char* pReason = _validate( sValue );
+ TranslateId pReason = _validate( sValue );
// get resource and return localized string
return (!pReason)
@@ -174,7 +174,7 @@ namespace xforms
_explainInvalid( pReason ) );
}
- OUString OXSDDataType::_explainInvalid(const OString& rReason)
+ OUString OXSDDataType::_explainInvalid(TranslateId rReason)
{
if ( RID_STR_XFORMS_PATTERN_DOESNT_MATCH == rReason )
{
@@ -212,7 +212,7 @@ namespace xforms
}
}
- const char* OXSDDataType::_validate( const OUString& _rValue )
+ TranslateId OXSDDataType::_validate( const OUString& _rValue )
{
// care for the regular expression
if ( !m_sPattern.isEmpty() )
@@ -229,7 +229,7 @@ namespace xforms
return RID_STR_XFORMS_PATTERN_DOESNT_MATCH;
}
- return nullptr;
+ return {};
}
@@ -418,9 +418,9 @@ namespace xforms
return bReturn;
}
- const char* OValueLimitedType_Base::_validate( const OUString& rValue )
+ TranslateId OValueLimitedType_Base::_validate( const OUString& rValue )
{
- const char* pReason = OXSDDataType::_validate( rValue );
+ TranslateId pReason = OXSDDataType::_validate( rValue );
if (!pReason)
{
@@ -442,7 +442,7 @@ namespace xforms
return pReason;
}
- OUString OValueLimitedType_Base::_explainInvalid(const OString& rReason)
+ OUString OValueLimitedType_Base::_explainInvalid(TranslateId rReason)
{
OUStringBuffer sInfo;
if (rReason == RID_STR_XFORMS_VALUE_IS_NOT_A)
@@ -511,10 +511,10 @@ namespace xforms
}
- const char* OStringType::_validate( const OUString& rValue )
+ TranslateId OStringType::_validate( const OUString& rValue )
{
// check regexp, whitespace etc. in parent class
- const char* pReason = OStringType_Base::_validate( rValue );
+ TranslateId pReason = OStringType_Base::_validate( rValue );
if (!pReason)
{
@@ -537,7 +537,7 @@ namespace xforms
return pReason;
}
- OUString OStringType::_explainInvalid(const OString& rReason)
+ OUString OStringType::_explainInvalid(TranslateId rReason)
{
sal_Int32 nValue = 0;
OUStringBuffer sInfo;
@@ -556,7 +556,7 @@ namespace xforms
if( m_aMinLength >>= nValue )
sInfo.append( nValue );
}
- else if (!rReason.isEmpty())
+ else if (rReason)
{
sInfo.append(OStringType_Base::_explainInvalid(rReason));
}
@@ -578,19 +578,19 @@ namespace xforms
OBooleanType_Base::initializeClone( _rCloneSource );
}
- const char* OBooleanType::_validate( const OUString& sValue )
+ TranslateId OBooleanType::_validate( const OUString& sValue )
{
- const char* pInvalidityReason = OBooleanType_Base::_validate( sValue );
+ TranslateId pInvalidityReason = OBooleanType_Base::_validate( sValue );
if ( pInvalidityReason )
return pInvalidityReason;
bool bValid = sValue == "0" || sValue == "1" || sValue == "true" || sValue == "false";
- return bValid ? nullptr : RID_STR_XFORMS_INVALID_VALUE;
+ return bValid ? TranslateId() : RID_STR_XFORMS_INVALID_VALUE;
}
- OUString OBooleanType::_explainInvalid(const OString& rReason)
+ OUString OBooleanType::_explainInvalid(TranslateId rReason)
{
- return rReason.isEmpty() ? OUString() : getName();
+ return !rReason ? OUString() : getName();
}
ODecimalType::ODecimalType( const OUString& _rName, sal_Int16 _nTypeClass )
@@ -620,9 +620,9 @@ namespace xforms
// validate decimals and return code for which facets failed
// to be used by: ODecimalType::validate and ODecimalType::explainInvalid
- const char* ODecimalType::_validate( const OUString& rValue )
+ TranslateId ODecimalType::_validate( const OUString& rValue )
{
- const char* pReason = ODecimalType_Base::_validate( rValue );
+ TranslateId pReason = ODecimalType_Base::_validate( rValue );
// check digits (if no other cause is available so far)
if (!pReason)
@@ -653,7 +653,7 @@ namespace xforms
return pReason;
}
- OUString ODecimalType::_explainInvalid(const OString& rReason)
+ OUString ODecimalType::_explainInvalid(TranslateId rReason)
{
sal_Int32 nValue = 0;
OUStringBuffer sInfo;
@@ -712,7 +712,7 @@ namespace xforms
DEFAULT_IMPLEMNENT_SUBTYPE( ODateType, DATE )
- const char* ODateType::_validate( const OUString& _rValue )
+ TranslateId ODateType::_validate( const OUString& _rValue )
{
return ODateType_Base::_validate( _rValue );
}
@@ -754,7 +754,7 @@ namespace xforms
DEFAULT_IMPLEMNENT_SUBTYPE( OTimeType, TIME )
- const char* OTimeType::_validate( const OUString& _rValue )
+ TranslateId OTimeType::_validate( const OUString& _rValue )
{
return OTimeType_Base::_validate( _rValue );
}
@@ -802,7 +802,7 @@ namespace xforms
DEFAULT_IMPLEMNENT_SUBTYPE( ODateTimeType, DATETIME )
- const char* ODateTimeType::_validate( const OUString& _rValue )
+ TranslateId ODateTimeType::_validate( const OUString& _rValue )
{
return ODateTimeType_Base::_validate( _rValue );
}
diff --git a/forms/source/xforms/datatypes.hxx b/forms/source/xforms/datatypes.hxx
index 860d1901b553..84ca5cfe9bdd 100644
--- a/forms/source/xforms/datatypes.hxx
+++ b/forms/source/xforms/datatypes.hxx
@@ -30,6 +30,7 @@
#include <comphelper/proparrhlp.hxx>
#include <comphelper/broadcasthelper.hxx>
#include <rtl/ref.hxx>
+#include <unotools/resmgr.hxx>
#include <unicode/regex.h>
@@ -117,8 +118,8 @@ namespace xforms
virtual void initializeClone( const OXSDDataType& _rCloneSource );
// helper method for validate and explainInvalid
- virtual const char* _validate( const OUString& value );
- virtual OUString _explainInvalid( const OString& rReason );
+ virtual TranslateId _validate( const OUString& value );
+ virtual OUString _explainInvalid( TranslateId rReason );
// helper method for checking properties values which are to be set
virtual bool checkPropertySanity( sal_Int32 _nHandle, const css::uno::Any& _rNewValue, OUString& _rErrorMessage );
@@ -176,8 +177,8 @@ namespace xforms
// OXSDDataType overridables
virtual bool _getValue( const OUString& value, double& fValue );
- virtual const char* _validate( const OUString& value ) override;
- virtual OUString _explainInvalid( const OString& rReason ) override;
+ virtual TranslateId _validate( const OUString& value ) override;
+ virtual OUString _explainInvalid( TranslateId rReason ) override;
// own overridables
/** translate a given value into a human-readable string
@@ -248,8 +249,8 @@ namespace xforms
DECLARE_DEFAULT_CLONING( OBooleanType )
// OXSDDataType overridables
- virtual const char* _validate( const OUString& value ) override;
- virtual OUString _explainInvalid( const OString& rReason ) override;
+ virtual TranslateId _validate( const OUString& value ) override;
+ virtual OUString _explainInvalid( TranslateId rReason ) override;
};
class OStringType;
@@ -270,8 +271,8 @@ namespace xforms
void initializeTypedClone( const OStringType& _rCloneSource );
// OXSDDataType overridables
- virtual const char* _validate( const OUString& value ) override;
- virtual OUString _explainInvalid( const OString& rReason ) override;
+ virtual TranslateId _validate( const OUString& value ) override;
+ virtual OUString _explainInvalid( TranslateId rReason ) override;
virtual bool checkPropertySanity( sal_Int32 _nHandle, const css::uno::Any& _rNewValue, OUString& _rErrorMessage ) override;
virtual void registerProperties() override;
};
@@ -291,8 +292,8 @@ namespace xforms
void initializeTypedClone( const ODecimalType& _rCloneSource );
// OXSDDataType overridables
- virtual const char* _validate( const OUString& value ) override;
- virtual OUString _explainInvalid( const OString& rReason ) override;
+ virtual TranslateId _validate( const OUString& value ) override;
+ virtual OUString _explainInvalid( TranslateId rReason ) override;
virtual void registerProperties() override;
// OValueLimitedType overridables
@@ -318,7 +319,7 @@ namespace xforms
DECLARE_DEFAULT_CLONING( classname ) \
\
/* OXSDDataType overridables */ \
- virtual const char* _validate( const OUString& value ) override; \
+ virtual TranslateId _validate( const OUString& value ) override; \
virtual bool _getValue( const OUString& value, double& fValue ) override; \
\
/* OValueLimitedType overridables */ \
diff --git a/forms/source/xforms/resourcehelper.cxx b/forms/source/xforms/resourcehelper.cxx
index 17c168d980ae..011d806f598d 100644
--- a/forms/source/xforms/resourcehelper.cxx
+++ b/forms/source/xforms/resourcehelper.cxx
@@ -28,25 +28,25 @@
namespace xforms
{
-OUString getResource(const char* pResourceId)
+OUString getResource(TranslateId pResourceId)
{
return getResource(pResourceId, {}, {}, {});
}
-OUString getResource(const char* pResourceId,
+OUString getResource(TranslateId pResourceId,
std::u16string_view rInfo1)
{
return getResource(pResourceId, rInfo1, {}, {});
}
-OUString getResource(const char* pResourceId,
+OUString getResource(TranslateId pResourceId,
std::u16string_view rInfo1,
std::u16string_view rInfo2)
{
return getResource(pResourceId, rInfo1, rInfo2, {});
}
-OUString getResource(const char* pResourceId,
+OUString getResource(TranslateId pResourceId,
std::u16string_view rInfo1,
std::u16string_view rInfo2,
std::u16string_view rInfo3)
diff --git a/forms/source/xforms/resourcehelper.hxx b/forms/source/xforms/resourcehelper.hxx
index 9f200fdc87c0..1453a7e4ca04 100644
--- a/forms/source/xforms/resourcehelper.hxx
+++ b/forms/source/xforms/resourcehelper.hxx
@@ -20,20 +20,19 @@
#include <sal/config.h>
-#include <string_view>
-
#include <rtl/ustring.hxx>
+#include <unotools/resmgr.hxx>
namespace xforms
{
/// get a resource string for the current language
- OUString getResource(const char*);
+ OUString getResource(TranslateId);
// overloaded: get a resource string, and substitute parameters
- OUString getResource(const char*, std::u16string_view);
- OUString getResource(const char*, std::u16string_view,
+ OUString getResource(TranslateId, std::u16string_view);
+ OUString getResource(TranslateId, std::u16string_view,
std::u16string_view);
- OUString getResource(const char*, std::u16string_view,
+ OUString getResource(TranslateId, std::u16string_view,
std::u16string_view,
std::u16string_view);
diff --git a/formula/inc/core_resource.hrc b/formula/inc/core_resource.hrc
index 01520f582b1b..ba09355ce284 100644
--- a/formula/inc/core_resource.hrc
+++ b/formula/inc/core_resource.hrc
@@ -22,7 +22,7 @@
#include <formula/compiler.hxx>
#include <utility>
-#define NC_(Context, String) reinterpret_cast<char const *>(Context "\004" u8##String)
+#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(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
@@ -31,7 +31,7 @@
// If there is a reason for another name for some function then add an
// *additional* name to be recognized to sc/source/core/tool/compiler.cxx
// ScCompiler::IsOpCode() in the if (mxSymbols->isODFF()) block.
-const std::pair<const char*, int> RID_STRLIST_FUNCTION_NAMES_ENGLISH_ODFF[] =
+const std::pair<const char *, int> RID_STRLIST_FUNCTION_NAMES_ENGLISH_ODFF[] =
{
{ "IF" , SC_OPCODE_IF },
{ "IFERROR" , SC_OPCODE_IF_ERROR },
@@ -472,7 +472,7 @@ const std::pair<const char*, int> RID_STRLIST_FUNCTION_NAMES_ENGLISH_ODFF[] =
};
/** These function names are used in the OOXML XLSX import/export. */
-const std::pair<const char*, int> RID_STRLIST_FUNCTION_NAMES_ENGLISH_OOXML[] =
+const std::pair<const char *, int> RID_STRLIST_FUNCTION_NAMES_ENGLISH_OOXML[] =
{
{ "IF" , SC_OPCODE_IF },
{ "IFERROR" , SC_OPCODE_IF_ERROR },
@@ -922,7 +922,7 @@ const std::pair<const char*, int> RID_STRLIST_FUNCTION_NAMES_ENGLISH_OOXML[] =
// If there is a reason for another name for some function then add an
// *additional* name to be recognized to sc/source/core/tool/compiler.cxx
// ScCompiler::IsOpCode() in the else if (mxSymbols->isPODF()) block.
-const std::pair<const char*, int> RID_STRLIST_FUNCTION_NAMES_ENGLISH_PODF[] =
+const std::pair<const char *, int> RID_STRLIST_FUNCTION_NAMES_ENGLISH_PODF[] =
{
{ "IF" , SC_OPCODE_IF },
{ "IFERROR" , SC_OPCODE_IF_ERROR },
@@ -1373,7 +1373,7 @@ const std::pair<const char*, int> RID_STRLIST_FUNCTION_NAMES_ENGLISH_PODF[] =
// If there is a reason for another name for some function then add an
// *additional* name to be recognized to sc/source/core/tool/compiler.cxx
// ScCompiler::IsOpCode().
-const std::pair<const char*, int> RID_STRLIST_FUNCTION_NAMES_ENGLISH_API[] =
+const std::pair<const char *, int> RID_STRLIST_FUNCTION_NAMES_ENGLISH_API[] =
{
{ "IF" , SC_OPCODE_IF },
{ "IFERROR" , SC_OPCODE_IF_ERROR },
@@ -1822,7 +1822,7 @@ const std::pair<const char*, int> RID_STRLIST_FUNCTION_NAMES_ENGLISH_API[] =
should match the [en-US] names of RID_STRLIST_FUNCTION_NAMES below. */
// As such they are a duplicate, but we can not have two string localizations
// at the same time.
-const std::pair<const char*, int> RID_STRLIST_FUNCTION_NAMES_ENGLISH[] =
+const std::pair<const char *, int> RID_STRLIST_FUNCTION_NAMES_ENGLISH[] =
{
{ "IF" , SC_OPCODE_IF },
{ "IFERROR" , SC_OPCODE_IF_ERROR },
@@ -2272,7 +2272,7 @@ const std::pair<const char*, int> RID_STRLIST_FUNCTION_NAMES_ENGLISH[] =
change has to be mentioned in the release notes, i.e.
https://wiki.documentfoundation.org/ReleaseNotes/...
*/
-const std::pair<const char*, int> RID_STRLIST_FUNCTION_NAMES[] =
+const std::pair<TranslateId, int> RID_STRLIST_FUNCTION_NAMES[] =
{
{ NC_("RID_STRLIST_FUNCTION_NAMES", "IF") , SC_OPCODE_IF },
{ NC_("RID_STRLIST_FUNCTION_NAMES", "IFERROR") , SC_OPCODE_IF_ERROR },
@@ -2711,10 +2711,10 @@ const std::pair<const char*, int> RID_STRLIST_FUNCTION_NAMES[] =
{ NC_("RID_STRLIST_FUNCTION_NAMES", "RAND.NV"), SC_OPCODE_RANDOM_NV },
{ NC_("RID_STRLIST_FUNCTION_NAMES", "RANDBETWEEN.NV"), SC_OPCODE_RANDBETWEEN_NV },
- { nullptr, -1 }
+ { {}, -1 }
};
-const std::pair<const char*, int> RID_STRLIST_FUNCTION_NAMES_SYMBOLS[] =
+const std::pair<const char *, int> RID_STRLIST_FUNCTION_NAMES_SYMBOLS[] =
{
{ "(" , SC_OPCODE_OPEN },
{ ")" , SC_OPCODE_CLOSE },
diff --git a/formula/inc/core_resource.hxx b/formula/inc/core_resource.hxx
index f8943f603999..f21d8fb25fd5 100644
--- a/formula/inc/core_resource.hxx
+++ b/formula/inc/core_resource.hxx
@@ -21,8 +21,8 @@
#include <rtl/ustring.hxx>
#include <formula/formuladllapi.h>
-#include <string_view>
+#include <unotools/resmgr.hxx>
-FORMULA_DLLPUBLIC OUString ForResId(std::string_view aId);
+FORMULA_DLLPUBLIC OUString ForResId(TranslateId aId);
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/formula/inc/strings.hrc b/formula/inc/strings.hrc
index a54a2f259b95..7bdc7139799a 100644
--- a/formula/inc/strings.hrc
+++ b/formula/inc/strings.hrc
@@ -19,7 +19,7 @@
#pragma once
-#define NC_(Context, String) reinterpret_cast<char const *>(Context "\004" u8##String)
+#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
#define STR_OPTIONAL NC_("STR_OPTIONAL", "(optional)")
#define STR_REQUIRED NC_("STR_REQUIRED", "(required)")
diff --git a/formula/source/core/api/FormulaCompiler.cxx b/formula/source/core/api/FormulaCompiler.cxx
index f7174807f0f4..39a62ebdc1e4 100644
--- a/formula/source/core/api/FormulaCompiler.cxx
+++ b/formula/source/core/api/FormulaCompiler.cxx
@@ -155,7 +155,9 @@ class OpCodeList
{
public:
- OpCodeList(bool bLocalized, const std::pair<const char*, int>* pSymbols, const FormulaCompiler::NonConstOpCodeMapPtr&,
+ OpCodeList(const std::pair<const char*, int>* pSymbols, const FormulaCompiler::NonConstOpCodeMapPtr&,
+ FormulaCompiler::SeparatorType = FormulaCompiler::SeparatorType::SEMICOLON_BASE );
+ OpCodeList(const std::pair<TranslateId, int>* pSymbols, const FormulaCompiler::NonConstOpCodeMapPtr&,
FormulaCompiler::SeparatorType = FormulaCompiler::SeparatorType::SEMICOLON_BASE );
private:
@@ -164,15 +166,43 @@ private:
private:
FormulaCompiler::SeparatorType meSepType;
- const std::pair<const char*, int>* mpSymbols;
- bool mbLocalized;
+ const std::pair<const char*, int>* mpSymbols1;
+ const std::pair<TranslateId, int>* mpSymbols2;
};
-OpCodeList::OpCodeList(bool bLocalized, const std::pair<const char*, int>* pSymbols, const FormulaCompiler::NonConstOpCodeMapPtr& xMap,
+OpCodeList::OpCodeList(const std::pair<const char*, int>* pSymbols, const FormulaCompiler::NonConstOpCodeMapPtr& xMap,
FormulaCompiler::SeparatorType eSepType)
: meSepType(eSepType)
- , mpSymbols(pSymbols)
- , mbLocalized(bLocalized)
+ , mpSymbols1(pSymbols)
+ , mpSymbols2(nullptr)
+{
+ std::unique_ptr<CharClass> xCharClass( xMap->isEnglish() ? nullptr : createCharClassIfNonEnglishUI());
+ const CharClass* pCharClass = xCharClass.get();
+ if (meSepType == FormulaCompiler::SeparatorType::RESOURCE_BASE)
+ {
+ for (sal_uInt16 i = 0; i <= SC_OPCODE_LAST_OPCODE_ID; ++i)
+ {
+ putDefaultOpCode( xMap, i, pCharClass);
+ }
+ }
+ else
+ {
+ for (sal_uInt16 i = 0; i <= SC_OPCODE_LAST_OPCODE_ID; ++i)
+ {
+ OUString aOpStr;
+ if ( getOpCodeString( aOpStr, i) )
+ xMap->putOpCode( aOpStr, OpCode(i), pCharClass);
+ else
+ putDefaultOpCode( xMap, i, pCharClass);
+ }
+ }
+}
+
+OpCodeList::OpCodeList(const std::pair<TranslateId, int>* pSymbols, const FormulaCompiler::NonConstOpCodeMapPtr& xMap,
+ FormulaCompiler::SeparatorType eSepType)
+ : meSepType(eSepType)
+ , mpSymbols1(nullptr)
+ , mpSymbols2(pSymbols)
{
std::unique_ptr<CharClass> xCharClass( xMap->isEnglish() ? nullptr : createCharClassIfNonEnglishUI());
const CharClass* pCharClass = xCharClass.get();
@@ -235,18 +265,37 @@ bool OpCodeList::getOpCodeString( OUString& rStr, sal_uInt16 nOp )
void OpCodeList::putDefaultOpCode( const FormulaCompiler::NonConstOpCodeMapPtr& xMap, sal_uInt16 nOp,
const CharClass* pCharClass )
{
- const char* pKey = nullptr;
- for (const std::pair<const char*, int>* pSymbol = mpSymbols; pSymbol->first; ++pSymbol)
+ OUString sKey;
+ if (mpSymbols1)
{
- if (nOp == pSymbol->second)
+ const char* pKey = nullptr;
+ for (const std::pair<const char*, int>* pSymbol = mpSymbols1; pSymbol->first; ++pSymbol)
{
- pKey = pSymbol->first;
- break;
+ if (nOp == pSymbol->second)
+ {
+ pKey = pSymbol->first;
+ break;
+ }
}
+ if (!pKey)
+ return;
+ sKey = OUString::createFromAscii(pKey);
+ }
+ else
+ {
+ TranslateId pKey;
+ for (const std::pair<TranslateId, int>* pSymbol = mpSymbols2; pSymbol->first; ++pSymbol)
+ {
+ if (nOp == pSymbol->second)
+ {
+ pKey = pSymbol->first;
+ break;
+ }
+ }
+ if (!pKey)
+ return;
+ sKey = ForResId(pKey);
}
- if (!pKey)
- return;
- OUString sKey = !mbLocalized ? OUString::createFromAscii(pKey) : ForResId(pKey);
xMap->putOpCode(sKey, OpCode(nOp), pCharClass);
}
@@ -857,8 +906,8 @@ static void lcl_fillNativeSymbols( FormulaCompiler::NonConstOpCodeMapPtr& xMap,
aSymbolMap.mxSymbolMap =
std::make_shared<FormulaCompiler::OpCodeMap>(
SC_OPCODE_LAST_OPCODE_ID + 1, true, FormulaGrammar::GRAM_NATIVE_UI);
- OpCodeList aOpCodeListSymbols(false, RID_STRLIST_FUNCTION_NAMES_SYMBOLS, aSymbolMap.mxSymbolMap);
- OpCodeList aOpCodeListNative(true, RID_STRLIST_FUNCTION_NAMES, aSymbolMap.mxSymbolMap);
+ OpCodeList aOpCodeListSymbols(RID_STRLIST_FUNCTION_NAMES_SYMBOLS, aSymbolMap.mxSymbolMap);
+ OpCodeList aOpCodeListNative(RID_STRLIST_FUNCTION_NAMES, aSymbolMap.mxSymbolMap);
// No AddInMap for native core mapping.
}
@@ -953,7 +1002,7 @@ void FormulaCompiler::loadSymbols(const std::pair<const char*, int>* pSymbols, F
// not Core
rxMap = std::make_shared<OpCodeMap>( SC_OPCODE_LAST_OPCODE_ID + 1, eGrammar != FormulaGrammar::GRAM_ODFF, eGrammar );
- OpCodeList aOpCodeList(false, pSymbols, rxMap, eSepType);
+ OpCodeList aOpCodeList(pSymbols, rxMap, eSepType);
fillFromAddInMap( rxMap, eGrammar);
// Fill from collection for AddIns not already present.
diff --git a/formula/source/core/resource/core_resource.cxx b/formula/source/core/resource/core_resource.cxx
index 6a0943aba18f..d18432357984 100644
--- a/formula/source/core/resource/core_resource.cxx
+++ b/formula/source/core/resource/core_resource.cxx
@@ -16,9 +16,8 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#include <unotools/resmgr.hxx>
#include <core_resource.hxx>
-OUString ForResId(std::string_view aId) { return Translate::get(aId, Translate::Create("for")); }
+OUString ForResId(TranslateId aId) { return Translate::get(aId, Translate::Create("for")); }
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/fpicker/inc/fpsofficeResMgr.hxx b/fpicker/inc/fpsofficeResMgr.hxx
index 3393f8afa95a..a86a91509c38 100644
--- a/fpicker/inc/fpsofficeResMgr.hxx
+++ b/fpicker/inc/fpsofficeResMgr.hxx
@@ -10,9 +10,6 @@
#include <unotools/resmgr.hxx>
-inline OUString FpsResId(std::string_view aId)
-{
- return Translate::get(aId, Translate::Create("fps"));
-};
+inline OUString FpsResId(TranslateId aId) { return Translate::get(aId, Translate::Create("fps")); };
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/fpicker/inc/strings.hrc b/fpicker/inc/strings.hrc
index 6037da706828..042ea35c44ce 100644
--- a/fpicker/inc/strings.hrc
+++ b/fpicker/inc/strings.hrc
@@ -19,7 +19,7 @@
#pragma once
-#define NC_(Context, String) reinterpret_cast<char const *>(Context "\004" u8##String)
+#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
#define STR_EXPLORERFILE_OPEN NC_("STR_EXPLORERFILE_OPEN", "Open")
#define STR_EXPLORERFILE_SAVE NC_("STR_EXPLORERFILE_SAVE", "Save as")
diff --git a/fpicker/source/aqua/resourceprovider.mm b/fpicker/source/aqua/resourceprovider.mm
index 4daa24b9ff07..34b0359a231d 100644
--- a/fpicker/source/aqua/resourceprovider.mm
+++ b/fpicker/source/aqua/resourceprovider.mm
@@ -42,7 +42,7 @@ namespace {
struct Entry
{
sal_Int32 ctrlId;
- const char* resId;
+ TranslateId resId;
};
}
@@ -71,9 +71,9 @@ Entry const CtrlIdToResIdTable[] = {
const sal_Int32 SIZE_TABLE = SAL_N_ELEMENTS( CtrlIdToResIdTable );
-static const char* CtrlIdToResId(sal_Int32 aControlId)
+static TranslateId CtrlIdToResId(sal_Int32 aControlId)
{
- const char *pResId = nullptr;
+ TranslateId pResId;
for ( sal_Int32 i = 0; i < SIZE_TABLE; i++ )
{
@@ -94,7 +94,7 @@ namespace CResourceProvider_Impl
OUString aResString;
// translate the control id to a resource id
- const char* pResId = CtrlIdToResId(aId);
+ TranslateId pResId = CtrlIdToResId(aId);
if (pResId)
aResString = FpsResId(pResId);
diff --git a/fpicker/source/office/iodlg.cxx b/fpicker/source/office/iodlg.cxx
index 1f94a58436ae..6d863e1d2f3f 100644
--- a/fpicker/source/office/iodlg.cxx
+++ b/fpicker/source/office/iodlg.cxx
@@ -378,8 +378,8 @@ SvtFileDialog::SvtFileDialog(weld::Window* pParent, PickerFlags nStyle)
AddControls_Impl( );
// adjust the labels to the mode
- const char* pResId = STR_EXPLORERFILE_OPEN;
- const char* pButtonResId = nullptr;
+ TranslateId pResId = STR_EXPLORERFILE_OPEN;
+ TranslateId pButtonResId;
if ( nStyle & PickerFlags::SaveAs )
{
diff --git a/fpicker/source/win32/resourceprovider.cxx b/fpicker/source/win32/resourceprovider.cxx
index 883edf36dff2..ff841b385b26 100644
--- a/fpicker/source/win32/resourceprovider.cxx
+++ b/fpicker/source/win32/resourceprovider.cxx
@@ -46,7 +46,7 @@ namespace {
struct Entry
{
sal_Int32 ctrlId;
- const char* resId;
+ TranslateId resId;
};
}
@@ -71,9 +71,9 @@ Entry const CtrlIdToResIdTable[] = {
const sal_Int32 SIZE_TABLE = SAL_N_ELEMENTS( CtrlIdToResIdTable );
-static const char* CtrlIdToResId( sal_Int32 aControlId )
+static TranslateId CtrlIdToResId( sal_Int32 aControlId )
{
- const char* pResId = nullptr;
+ TranslateId pResId;
for ( sal_Int32 i = 0; i < SIZE_TABLE; i++ )
{
@@ -93,7 +93,7 @@ namespace CResourceProvider
{
OUString aResOUString;
// translate the control id to a resource id
- const char *pResId = CtrlIdToResId(aId);
+ TranslateId pResId = CtrlIdToResId(aId);
if (pResId)
aResOUString = FpsResId(pResId);
return aResOUString;
diff --git a/framework/inc/classes/fwkresid.hxx b/framework/inc/classes/fwkresid.hxx
index 4aacac961019..5023f34a238b 100644
--- a/framework/inc/classes/fwkresid.hxx
+++ b/framework/inc/classes/fwkresid.hxx
@@ -20,8 +20,8 @@
#pragma once
#include <rtl/ustring.hxx>
-#include <string_view>
+#include <unotools/resmgr.hxx>
-OUString FwkResId(std::string_view aId);
+OUString FwkResId(TranslateId aId);
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/framework/inc/strings.hrc b/framework/inc/strings.hrc
index 796517bdc130..18b372915b9b 100644
--- a/framework/inc/strings.hrc
+++ b/framework/inc/strings.hrc
@@ -19,7 +19,7 @@
#pragma once
-#define NC_(Context, String) reinterpret_cast<char const *>(Context "\004" u8##String)
+#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
#define STR_MENU_HEADFOOTALL NC_("STR_MENU_HEADFOOTALL", "All" )
#define STR_UPDATEDOC NC_("STR_UPDATEDOC", "~Update" )
diff --git a/framework/source/fwe/classes/fwkresid.cxx b/framework/source/fwe/classes/fwkresid.cxx
index 9acac0728885..e9a1d639d386 100644
--- a/framework/source/fwe/classes/fwkresid.cxx
+++ b/framework/source/fwe/classes/fwkresid.cxx
@@ -18,8 +18,7 @@
*/
#include <classes/fwkresid.hxx>
-#include <unotools/resmgr.hxx>
-OUString FwkResId(std::string_view aId) { return Translate::get(aId, Translate::Create("fwk")); }
+OUString FwkResId(TranslateId aId) { return Translate::get(aId, Translate::Create("fwk")); }
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/framework/source/uielement/controlmenucontroller.cxx b/framework/source/uielement/controlmenucontroller.cxx
index 6af67e7a30a9..14c372a55688 100644
--- a/framework/source/uielement/controlmenucontroller.cxx
+++ b/framework/source/uielement/controlmenucontroller.cxx
@@ -64,7 +64,7 @@ static const char* aCommands[] =
".uno:ConvertToNavigationBar"
};
-static const char* aLabels[] =
+static TranslateId aLabels[] =
{
RID_STR_PROPTITLE_EDIT,
RID_STR_PROPTITLE_PUSHBUTTON,
diff --git a/include/basic/sbdef.hxx b/include/basic/sbdef.hxx
index e84a14d5d51d..d864ed8de7b2 100644
--- a/include/basic/sbdef.hxx
+++ b/include/basic/sbdef.hxx
@@ -24,6 +24,7 @@
#include <rtl/ustring.hxx>
#include <basic/basicdllapi.h>
#include <o3tl/typed_flags_set.hxx>
+#include <unotools/resmgr.hxx>
class ErrCode;
@@ -69,9 +70,9 @@ enum class PropertyMode
Set
};
-BASIC_DLLPUBLIC extern std::pair<const char*, ErrCode> const RID_BASIC_START[];
+BASIC_DLLPUBLIC extern std::pair<TranslateId, ErrCode> const RID_BASIC_START[];
BASIC_DLLPUBLIC std::locale BasResLocale();
-OUString BasResId(std::string_view pId);
+OUString BasResId(TranslateId pId);
#endif
diff --git a/include/editeng/editrids.hrc b/include/editeng/editrids.hrc
index 1abb476975e0..556ee042aeca 100644
--- a/include/editeng/editrids.hrc
+++ b/include/editeng/editrids.hrc
@@ -20,7 +20,7 @@
#ifndef INCLUDED_INCLUDE_EDITENG_EDITRIDS_HRC
#define INCLUDED_INCLUDE_EDITENG_EDITRIDS_HRC
-#define NC_(Context, String) reinterpret_cast<char const *>(Context "\004" u8##String)
+#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
// enum SvxBreak ------------------------------------------------------------
#define RID_SVXITEMS_BREAK_NONE NC_("RID_SVXITEMS_BREAK_NONE", "No break")
diff --git a/include/editeng/eerdll.hxx b/include/editeng/eerdll.hxx
index a3b215f44395..b77d6a0d4703 100644
--- a/include/editeng/eerdll.hxx
+++ b/include/editeng/eerdll.hxx
@@ -22,6 +22,7 @@
#include <editeng/editengdllapi.h>
#include <rtl/ustring.hxx>
+#include <unotools/resmgr.hxx>
#include <memory>
class GlobalEditData;
@@ -30,7 +31,7 @@ namespace editeng
class SharedVclResources;
}
-OUString EDITENG_DLLPUBLIC EditResId(std::string_view aId);
+OUString EDITENG_DLLPUBLIC EditResId(TranslateId aId);
class EditDLL
{
diff --git a/include/editeng/frmdir.hxx b/include/editeng/frmdir.hxx
index ca3cc615b773..ef5275d26a7d 100644
--- a/include/editeng/frmdir.hxx
+++ b/include/editeng/frmdir.hxx
@@ -21,6 +21,7 @@
#define INCLUDED_EDITENG_FRMDIR_HXX
#include <com/sun/star/text/WritingMode2.hpp>
+#include <unotools/resmgr.hxx>
/**
* Defines possible text directions in frames.
@@ -54,7 +55,7 @@ enum class SvxFrameDirection
Vertical_LR_BT = css::text::WritingMode2::BT_LR,
};
-const char* getFrmDirResId(size_t nIndex);
+TranslateId getFrmDirResId(size_t nIndex);
#endif // INCLUDED_EDITENG_FRMDIR_HXX
diff --git a/include/editeng/itemtype.hxx b/include/editeng/itemtype.hxx
index 117e477c8621..7f70a7073a45 100644
--- a/include/editeng/itemtype.hxx
+++ b/include/editeng/itemtype.hxx
@@ -24,6 +24,7 @@
#include <tools/long.hxx>
#include <tools/mapunit.hxx>
#include <editeng/editengdllapi.h>
+#include <unotools/resmgr.hxx>
class Color;
class IntlWrapper;
@@ -33,7 +34,7 @@ inline constexpr OUStringLiteral cpDelim = u", ";
EDITENG_DLLPUBLIC OUString GetMetricText( tools::Long nVal, MapUnit eSrcUnit, MapUnit eDestUnit, const IntlWrapper * pIntl );
OUString GetColorString( const Color& rCol );
-EDITENG_DLLPUBLIC const char* GetMetricId(MapUnit eUnit);
+EDITENG_DLLPUBLIC TranslateId GetMetricId(MapUnit eUnit);
#endif
diff --git a/include/fpicker/strings.hrc b/include/fpicker/strings.hrc
index d86a5c569e7b..4dd7fb5fa50c 100644
--- a/include/fpicker/strings.hrc
+++ b/include/fpicker/strings.hrc
@@ -9,7 +9,7 @@
#ifndef INCLUDED_FPICKER_FPICKER_HRC
#define INCLUDED_FPICKER_FPICKER_HRC
-#define NC_(Context, String) reinterpret_cast<char const *>(Context "\004" u8##String)
+#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(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")
diff --git a/include/sfx2/sfxresid.hxx b/include/sfx2/sfxresid.hxx
index 62bbc99e92bc..f5cd1aca4cf3 100644
--- a/include/sfx2/sfxresid.hxx
+++ b/include/sfx2/sfxresid.hxx
@@ -21,9 +21,9 @@
#include <sfx2/dllapi.h>
#include <rtl/ustring.hxx>
-#include <string_view>
+#include <unotools/resmgr.hxx>
-SFX2_DLLPUBLIC OUString SfxResId(std::string_view aId);
+SFX2_DLLPUBLIC OUString SfxResId(TranslateId aId);
#endif
diff --git a/include/sfx2/strings.hrc b/include/sfx2/strings.hrc
index ce05fa4dce27..3367d368b2fa 100644
--- a/include/sfx2/strings.hrc
+++ b/include/sfx2/strings.hrc
@@ -20,7 +20,7 @@
#ifndef INCLUDED_SFX2_INC_STRINGS_HRC
#define INCLUDED_SFX2_INC_STRINGS_HRC
-#define NC_(Context, String) reinterpret_cast<char const *>(Context "\004" u8##String)
+#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
#define STR_TEMPLATE_FILTER NC_("STR_TEMPLATE_FILTER", "Templates")
#define STR_SAVEDOC NC_("STR_SAVEDOC", "~Save")
diff --git a/include/sfx2/styfitem.hxx b/include/sfx2/styfitem.hxx
index dc939342689f..dc2efd88cf85 100644
--- a/include/sfx2/styfitem.hxx
+++ b/include/sfx2/styfitem.hxx
@@ -23,6 +23,7 @@
#include <sal/config.h>
#include <sfx2/dllapi.h>
#include <svl/style.hxx>
+#include <unotools/resmgr.hxx>
#include <vector>
struct SFX2_DLLPUBLIC SfxFilterTuple
@@ -46,7 +47,7 @@ class SFX2_DLLPUBLIC SfxStyleFamilyItem
SfxStyleFilter aFilterList;
public:
- SfxStyleFamilyItem(SfxStyleFamily nFamily, const OUString &rName, const OUString& rImage, const std::pair<const char*, SfxStyleSearchBits>* pStringArray, const std::locale& rLocale);
+ SfxStyleFamilyItem(SfxStyleFamily nFamily, const OUString &rName, const OUString& rImage, const std::pair<TranslateId, SfxStyleSearchBits>* pStringArray, const std::locale& rLocale);
const OUString& GetText() const { return aText; }
SfxStyleFamily GetFamily() const { return nFamily; }
diff --git a/include/svl/svl.hrc b/include/svl/svl.hrc
index 231d26c0f3b5..f1f60756c301 100644
--- a/include/svl/svl.hrc
+++ b/include/svl/svl.hrc
@@ -19,7 +19,7 @@
#ifndef INCLUDED_SVL_SVL_HRC
#define INCLUDED_SVL_SVL_HRC
-#define NC_(Context, String) reinterpret_cast<char const *>(Context "\004" u8##String)
+#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
// Internet Media Type Presentations
diff --git a/include/svl/svlresid.hxx b/include/svl/svlresid.hxx
index 5e6f271ea7a1..5b57aa2c0c52 100644
--- a/include/svl/svlresid.hxx
+++ b/include/svl/svlresid.hxx
@@ -12,9 +12,9 @@
#include <svl/svldllapi.h>
#include <rtl/ustring.hxx>
-#include <string_view>
+#include <unotools/resmgr.hxx>
-SVL_DLLPUBLIC OUString SvlResId(std::string_view aId);
+SVL_DLLPUBLIC OUString SvlResId(TranslateId sContextAndId);
#endif // INCLUDED_SVL_SVTRESID_HXX
diff --git a/include/svtools/ehdl.hxx b/include/svtools/ehdl.hxx
index bcfdd93b2442..2324a5107b5c 100644
--- a/include/svtools/ehdl.hxx
+++ b/include/svtools/ehdl.hxx
@@ -23,7 +23,7 @@
#include <svtools/svtresid.hxx>
#include <vcl/errinf.hxx>
-typedef std::pair<const char*, ErrCode> ErrMsgCode;
+typedef std::pair<TranslateId, ErrCode> ErrMsgCode;
SVT_DLLPUBLIC extern const ErrMsgCode RID_ERRHDL[];
SVT_DLLPUBLIC extern const ErrMsgCode RID_ERRCTX[];
diff --git a/include/svtools/strings.hrc b/include/svtools/strings.hrc
index 774d701d6e1a..b4393c4ebd7b 100644
--- a/include/svtools/strings.hrc
+++ b/include/svtools/strings.hrc
@@ -19,7 +19,7 @@
#pragma once
-#define NC_(Context, String) reinterpret_cast<char const *>(Context "\004" u8##String)
+#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
// To translators: tdf#125447 use no mnemonic in this string
#define STR_UNDO NC_("STR_UNDO", "Undo: ")
diff --git a/include/svtools/svtresid.hxx b/include/svtools/svtresid.hxx
index cf2fa976293b..c24ee7d936ae 100644
--- a/include/svtools/svtresid.hxx
+++ b/include/svtools/svtresid.hxx
@@ -21,9 +21,10 @@
#include <svtools/svtdllapi.h>
#include <rtl/ustring.hxx>
+#include <unotools/resmgr.hxx>
#include <locale>
SVT_DLLPUBLIC std::locale SvtResLocale();
-SVT_DLLPUBLIC OUString SvtResId(std::string_view aId);
+SVT_DLLPUBLIC OUString SvtResId(TranslateId aId);
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/dialmgr.hxx b/include/svx/dialmgr.hxx
index ea31de153123..34681a510761 100644
--- a/include/svx/dialmgr.hxx
+++ b/include/svx/dialmgr.hxx
@@ -21,9 +21,10 @@
#include <rtl/ustring.hxx>
#include <svx/svxdllapi.h>
+#include <unotools/resmgr.hxx>
SVXCORE_DLLPUBLIC std::locale SvxResLocale();
-SVXCORE_DLLPUBLIC OUString SvxResId(std::string_view aId);
+SVXCORE_DLLPUBLIC OUString SvxResId(TranslateId aId);
#endif
diff --git a/include/svx/strings.hrc b/include/svx/strings.hrc
index c1bbf42205f8..e18af6a34981 100644
--- a/include/svx/strings.hrc
+++ b/include/svx/strings.hrc
@@ -20,7 +20,7 @@
#ifndef INCLUDED_SVX_INC_STRINGS_HRC
#define INCLUDED_SVX_INC_STRINGS_HRC
-#define NC_(Context, String) reinterpret_cast<char const *>(Context "\004" u8##String)
+#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
#define STR_ObjNameSingulNONE NC_("STR_ObjNameSingulNONE", "Drawing object")
#define STR_ObjNamePluralNONE NC_("STR_ObjNamePluralNONE", "Drawing objects")
diff --git a/include/svx/svddrgmt.hxx b/include/svx/svddrgmt.hxx
index 72d8ad3ff154..626467f18465 100644
--- a/include/svx/svddrgmt.hxx
+++ b/include/svx/svddrgmt.hxx
@@ -157,7 +157,7 @@ protected:
void createSdrDragEntries_GlueDrag();
// old call forwarders to the SdrDragView
- OUString ImpGetDescriptionStr(const char* pStrCacheID) const;
+ OUString ImpGetDescriptionStr(TranslateId pStrCacheID) const;
SdrHdl* GetDragHdl() const { return getSdrDragView().mpDragHdl; }
SdrHdlKind GetDragHdlKind() const { return getSdrDragView().meDragHdl; }
SdrDragStat& DragStat() { return getSdrDragView().maDragStat; }
diff --git a/include/svx/svdmrkv.hxx b/include/svx/svdmrkv.hxx
index 48ebb4917414..bdd1046c097d 100644
--- a/include/svx/svdmrkv.hxx
+++ b/include/svx/svdmrkv.hxx
@@ -26,7 +26,7 @@
#include <svx/svxdllapi.h>
#include <o3tl/typed_flags_set.hxx>
#include <basegfx/range/b2drectangle.hxx>
-
+#include <unotools/resmgr.hxx>
class SfxViewShell;
@@ -169,7 +169,7 @@ protected:
SdrObject* CheckSingleSdrObjectHit(const Point& rPnt, sal_uInt16 nTol, SdrObjList const * pOL, SdrPageView* pPV, SdrSearchOptions nOptions, const SdrLayerIDSet* pMVisLay, SdrObject*& rpRootObj) const;
SdrObject* CheckSingleSdrObjectHit(const Point& rPnt, sal_uInt16 nTol, SdrObjList const * pOL, SdrPageView* pPV, SdrSearchOptions nOptions, const SdrLayerIDSet* pMVisLay, SdrObject*& rpRootObj,const SdrMarkList * pMarkList) const;
bool ImpIsFrameHandles() const;
- OUString ImpGetDescriptionString(const char* pStrCacheID, ImpGetDescriptionOptions nOpt=ImpGetDescriptionOptions::NONE) const;
+ OUString ImpGetDescriptionString(TranslateId pStrCacheID, ImpGetDescriptionOptions nOpt=ImpGetDescriptionOptions::NONE) const;
// Generates a string including degrees symbol, from an angel specification in 1/100deg
bool ImpMarkPoint(SdrHdl* pHdl, SdrMark* pMark, bool bUnmark);
diff --git a/include/svx/svdobj.hxx b/include/svx/svdobj.hxx
index d7ccf830cf44..d10adcd36445 100644
--- a/include/svx/svdobj.hxx
+++ b/include/svx/svdobj.hxx
@@ -35,6 +35,7 @@
#include <tools/link.hxx>
#include <tools/weakbase.h>
#include <tools/gen.hxx>
+#include <unotools/resmgr.hxx>
#include <unordered_set>
@@ -910,7 +911,7 @@ protected:
tools::Rectangle ImpDragCalcRect(const SdrDragStat& rDrag) const;
// for GetDragComment
- OUString ImpGetDescriptionStr(const char* pStrCacheID) const;
+ OUString ImpGetDescriptionStr(TranslateId pStrCacheID) const;
void ImpForcePlusData();
diff --git a/include/svx/svdundo.hxx b/include/svx/svdundo.hxx
index 24ee5e569e82..cdfd8070f6ac 100644
--- a/include/svx/svdundo.hxx
+++ b/include/svx/svdundo.hxx
@@ -31,6 +31,7 @@
#include <svx/svdtypes.hxx>
#include <svx/svdsob.hxx>
#include <svx/svxdllapi.h>
+#include <unotools/resmgr.hxx>
class SfxItemSet;
class SfxPoolItem;
@@ -125,9 +126,9 @@ protected:
protected:
SdrUndoObj(SdrObject& rNewObj);
- OUString ImpGetDescriptionStr(const char* pStrCacheID, bool bRepeat = false) const;
+ OUString ImpGetDescriptionStr(TranslateId pStrCacheID, bool bRepeat = false) const;
- [[nodiscard]] static OUString GetDescriptionStringForObject( const SdrObject& _rForObject, const char* pStrCacheID, bool bRepeat = false );
+ [[nodiscard]] static OUString GetDescriptionStringForObject( const SdrObject& _rForObject, TranslateId pStrCacheID, bool bRepeat = false );
// #94278# new method for evtl. PageChange at UNDO/REDO
void ImpShowPageOfThisObject();
@@ -526,7 +527,7 @@ protected:
SdrUndoPage(SdrPage& rNewPg);
~SdrUndoPage();
- static OUString ImpGetDescriptionStr(const char* pStrCacheID);
+ static OUString ImpGetDescriptionStr(TranslateId pStrCacheID);
};
/**
diff --git a/include/svx/svxitems.hrc b/include/svx/svxitems.hrc
index 3ea7f12581ab..2e5d5cf8b8e2 100644
--- a/include/svx/svxitems.hrc
+++ b/include/svx/svxitems.hrc
@@ -26,9 +26,9 @@
#include <editeng/editids.hrc>
#include <utility>
-#define NC_(Context, String) reinterpret_cast<char const *>(Context "\004" u8##String)
+#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
-const std::pair<const char*, sal_uInt16> RID_ATTR_NAMES[] =
+const std::pair<TranslateId, sal_uInt16> RID_ATTR_NAMES[] =
{
{ NC_("RID_ATTR_NAMES", "Scale") , SID_ATTR_ZOOM },
{ NC_("RID_ATTR_NAMES", "Brush") , SID_ATTR_BRUSH },
diff --git a/include/svx/xit.hxx b/include/svx/xit.hxx
index 1333a4ef1066..db8f666197c5 100644
--- a/include/svx/xit.hxx
+++ b/include/svx/xit.hxx
@@ -23,6 +23,7 @@
#include <svl/stritem.hxx>
#include <svx/xtable.hxx>
#include <svx/svxdllapi.h>
+#include <unotools/resmgr.hxx>
/************************************************************************/
@@ -59,7 +60,7 @@ public:
Argument pPool2 can be null.
If returned string equals NameOrIndex->GetName(), the name was already unique.
*/
- static OUString CheckNamedItem( const NameOrIndex* pCheckItem, const sal_uInt16 nWhich, const SfxItemPool* pPool1, SvxCompareValueFunc pCompareValueFunc, const char* pPrefixResId, const XPropertyListRef &pDefaults );
+ static OUString CheckNamedItem( const NameOrIndex* pCheckItem, const sal_uInt16 nWhich, const SfxItemPool* pPool1, SvxCompareValueFunc pCompareValueFunc, TranslateId pPrefixResId, const XPropertyListRef &pDefaults );
void dumpAsXml(xmlTextWriterPtr pWriter) const override;
};
diff --git a/include/unotools/resmgr.hxx b/include/unotools/resmgr.hxx
index 0795c3f16704..80e3a23eb57d 100644
--- a/include/unotools/resmgr.hxx
+++ b/include/unotools/resmgr.hxx
@@ -33,15 +33,15 @@ struct UNOTOOLS_DLLPUBLIC TranslateId
const char* mpContext;
const char* mpId;
- TranslateId()
+ inline TranslateId()
: mpContext(nullptr), mpId(nullptr) {}
- TranslateId(const char* pContext, const char* pId)
+ inline TranslateId(const char* pContext, const char* pId)
: mpContext(pContext), mpId(pId) {}
- operator bool() const { return mpId != nullptr; }
+ inline operator bool() const { return mpId != nullptr; }
bool operator==(const TranslateId& other) const;
- bool operator!=(const TranslateId& other) const { return !operator==(other); }
+ inline bool operator!=(const TranslateId& other) const { return !operator==(other); }
};
struct UNOTOOLS_DLLPUBLIC TranslateNId
@@ -50,22 +50,20 @@ struct UNOTOOLS_DLLPUBLIC TranslateNId
const char* mpSingular;
const char* mpPlural;
- TranslateNId()
+ inline TranslateNId()
: mpContext(nullptr), mpSingular(nullptr), mpPlural(nullptr) {}
- TranslateNId(const char* pContext, const char* pSingular, const char* pPlural)
+ inline TranslateNId(const char* pContext, const char* pSingular, const char* pPlural)
: mpContext(pContext), mpSingular(pSingular), mpPlural(pPlural) {}
- operator bool() const { return mpContext != nullptr; }
+ inline operator bool() const { return mpContext != nullptr; }
bool operator==(const TranslateNId& other) const;
- bool operator!=(const TranslateNId& other) const { return !operator==(other); }
+ inline bool operator!=(const TranslateNId& other) const { return !operator==(other); }
};
namespace Translate
{
UNOTOOLS_DLLPUBLIC std::locale Create(std::string_view aPrefixName, const LanguageTag& rLocale = SvtSysLocale().GetUILanguageTag());
- UNOTOOLS_DLLPUBLIC OUString get(std::string_view aId, const std::locale &loc);
- UNOTOOLS_DLLPUBLIC OUString nget(std::string_view aId, int n, const std::locale &loc);
UNOTOOLS_DLLPUBLIC OUString get(TranslateId sContextAndId, const std::locale &loc);
UNOTOOLS_DLLPUBLIC OUString nget(TranslateNId aContextSingularPlural, int n, const std::locale &loc);
UNOTOOLS_DLLPUBLIC void SetReadStringHook( ResHookProc pProc );
diff --git a/oox/inc/ooxresid.hxx b/oox/inc/ooxresid.hxx
index d8015dc120ac..473e13407ac3 100644
--- a/oox/inc/ooxresid.hxx
+++ b/oox/inc/ooxresid.hxx
@@ -11,9 +11,9 @@
#define INCLUDED_OOX_INC_RESID_HXX
#include <rtl/ustring.hxx>
-#include <string_view>
+#include <unotools/resmgr.hxx>
-OUString OoxResId(std::string_view aId);
+OUString OoxResId(TranslateId aId);
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
diff --git a/oox/inc/strings.hrc b/oox/inc/strings.hrc
index 89a6d9a115a6..c9b4f3cf7230 100644
--- a/oox/inc/strings.hrc
+++ b/oox/inc/strings.hrc
@@ -10,9 +10,9 @@
#ifndef OOX_STRINGS_HRC
#define OOX_STRINGS_HRC
-#define NC_(Context, String) reinterpret_cast<char const *>(Context "\004" u8##String)
+#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
#define STR_DIAGRAM_TITLE NC_("STR_DIAGRAM_TITLE", "Chart Title")
#define STR_DIAGRAM_AXISTITLE NC_("STR_DIAGRAM_AXISTITLE", "Axis Title")
#endif
-/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */ \ No newline at end of file
+/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
diff --git a/oox/source/helper/ooxresid.cxx b/oox/source/helper/ooxresid.cxx
index 6a509ccbca7b..58e0e8cb33e0 100644
--- a/oox/source/helper/ooxresid.cxx
+++ b/oox/source/helper/ooxresid.cxx
@@ -11,6 +11,6 @@
#include <ooxresid.hxx>
#include <unotools/resmgr.hxx>
-OUString OoxResId(std::string_view aId) { return Translate::get(aId, Translate::Create("oox")); }
+OUString OoxResId(TranslateId aId) { return Translate::get(aId, Translate::Create("oox")); }
-/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */ \ No newline at end of file
+/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
diff --git a/reportdesign/inc/UndoActions.hxx b/reportdesign/inc/UndoActions.hxx
index 1764f27ffb33..7b1fb2005380 100644
--- a/reportdesign/inc/UndoActions.hxx
+++ b/reportdesign/inc/UndoActions.hxx
@@ -141,7 +141,7 @@ namespace rptui
::dbaui::IController* m_pController;
public:
- OCommentUndoAction(SdrModel& rMod, const char* pCommentID);
+ OCommentUndoAction(SdrModel& rMod, TranslateId pCommentID);
virtual ~OCommentUndoAction() override;
virtual OUString GetComment() const override { return m_strComment; }
@@ -169,7 +169,7 @@ namespace rptui
,Action _eAction
,const css::uno::Reference< css::container::XIndexContainer >& rContainer
,const css::uno::Reference< css::uno::XInterface>& xElem
- ,const char* pCommentId);
+ ,TranslateId pCommentId);
virtual ~OUndoContainerAction() override;
virtual void Undo() override;
@@ -193,7 +193,7 @@ namespace rptui
,::std::function<css::uno::Reference< css::report::XSection >(OReportHelper *)> _pMemberFunction
,const css::uno::Reference< css::report::XReportDefinition >& _xReport
,const css::uno::Reference< css::uno::XInterface>& xElem
- ,const char* pCommentId);
+ ,TranslateId pCommentId);
private:
virtual void implReInsert( ) override;
@@ -212,7 +212,7 @@ namespace rptui
,::std::function<css::uno::Reference< css::report::XSection >(OGroupHelper *)> _pMemberFunction
,const css::uno::Reference< css::report::XGroup >& _xGroup
,const css::uno::Reference< css::uno::XInterface>& xElem
- ,const char* pCommentId);
+ ,TranslateId pCommentId);
private:
virtual void implReInsert( ) override;
diff --git a/reportdesign/inc/core_resource.hxx b/reportdesign/inc/core_resource.hxx
index f5d6bfb6e1a7..4c298216d1b9 100644
--- a/reportdesign/inc/core_resource.hxx
+++ b/reportdesign/inc/core_resource.hxx
@@ -22,9 +22,9 @@
#include "dllapi.h"
#include <rtl/ustring.hxx>
-#include <string_view>
+#include <unotools/resmgr.hxx>
-OUString REPORTDESIGN_DLLPUBLIC RptResId(std::string_view pId);
+OUString REPORTDESIGN_DLLPUBLIC RptResId(TranslateId pId);
#endif // INCLUDED_REPORTDESIGN_SOURCE_CORE_INC_CORE_RESOURCE_HXX
diff --git a/reportdesign/inc/stringarray.hrc b/reportdesign/inc/stringarray.hrc
index b49f401d0f54..99bdc9a296c5 100644
--- a/reportdesign/inc/stringarray.hrc
+++ b/reportdesign/inc/stringarray.hrc
@@ -10,72 +10,72 @@
#ifndef INCLUDED_REPORTDESIGN_INC_FNP_HRC
#define INCLUDED_REPORTDESIGN_INC_FNP_HRC
-#define NC_(Context, String) reinterpret_cast<char const *>(Context "\004" u8##String)
+#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
-const char* RID_STR_FORCENEWPAGE_CONST[] =
+const TranslateId RID_STR_FORCENEWPAGE_CONST[] =
{
NC_("RID_STR_FORCENEWPAGE_CONST", "None"),
NC_("RID_STR_FORCENEWPAGE_CONST", "Before Section"),
NC_("RID_STR_FORCENEWPAGE_CONST", "After Section"),
NC_("RID_STR_FORCENEWPAGE_CONST", "Before & After Section"),
- nullptr
+ {}
};
-const char* RID_STR_GROUPKEEPTOGETHER_CONST[] =
+const TranslateId RID_STR_GROUPKEEPTOGETHER_CONST[] =
{
NC_("RID_STR_GROUPKEEPTOGETHER_CONST", "Per Page"),
NC_("RID_STR_GROUPKEEPTOGETHER_CONST", "Per Column"),
- nullptr
+ {}
};
-const char* RID_STR_REPORTPRINTOPTION_CONST[] =
+const TranslateId RID_STR_REPORTPRINTOPTION_CONST[] =
{
NC_("RID_STR_REPORTPRINTOPTION_CONST", "All Pages"),
NC_("RID_STR_REPORTPRINTOPTION_CONST", "Not With Report Header"),
NC_("RID_STR_REPORTPRINTOPTION_CONST", "Not With Report Footer"),
NC_("RID_STR_REPORTPRINTOPTION_CONST", "Not With Report Header/Footer"),
- nullptr
+ {}
};
-const char* RID_STR_TYPE_CONST[] =
+const TranslateId RID_STR_TYPE_CONST[] =
{
NC_("RID_STR_TYPE_CONST", "Field or Formula"),
NC_("RID_STR_TYPE_CONST", "Function"),
NC_("RID_STR_TYPE_CONST", "Counter"),
NC_("RID_STR_TYPE_CONST", "User defined Function"),
- nullptr
+ {}
};
-const char* RID_STR_BOOL[] =
+const TranslateId RID_STR_BOOL[] =
{
NC_("RID_STR_BOOL", "No"),
NC_("RID_STR_BOOL", "Yes"),
- nullptr
+ {}
};
-const char* RID_STR_KEEPTOGETHER_CONST[] =
+const TranslateId RID_STR_KEEPTOGETHER_CONST[] =
{
NC_("RID_STR_KEEPTOGETHER_CONST", "No"),
NC_("RID_STR_KEEPTOGETHER_CONST", "Whole Group"),
NC_("RID_STR_KEEPTOGETHER_CONST", "With First Detail"),
- nullptr
+ {}
};
-const char* RID_STR_VERTICAL_ALIGN_CONST[] =
+const TranslateId RID_STR_VERTICAL_ALIGN_CONST[] =
{
NC_("RID_STR_VERTICAL_ALIGN_CONST", "Top"),
NC_("RID_STR_VERTICAL_ALIGN_CONST", "Middle"),
NC_("RID_STR_VERTICAL_ALIGN_CONST", "Bottom"),
- nullptr
+ {}
};
-const char* RID_STR_PARAADJUST_CONST[] =
+const TranslateId RID_STR_PARAADJUST_CONST[] =
{
NC_("RID_STR_PARAADJUST_CONST", "Left"),
NC_("RID_STR_PARAADJUST_CONST", "Right"),
NC_("RID_STR_PARAADJUST_CONST", "Block"),
NC_("RID_STR_PARAADJUST_CONST", "Center"),
- nullptr
+ {}
};
#endif
diff --git a/reportdesign/inc/strings.hrc b/reportdesign/inc/strings.hrc
index 87eae041d6e4..0a2ca496a9d5 100644
--- a/reportdesign/inc/strings.hrc
+++ b/reportdesign/inc/strings.hrc
@@ -20,7 +20,7 @@
#ifndef INCLUDED_REPORTDESIGN_INC_STRINGS_HRC
#define INCLUDED_REPORTDESIGN_INC_STRINGS_HRC
-#define NC_(Context, String) reinterpret_cast<char const *>(Context "\004" u8##String)
+#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
#define RID_STR_PROPPAGE_DEFAULT NC_("RID_STR_PROPPAGE_DEFAULT", "General")
#define RID_STR_PROPPAGE_DATA NC_("RID_STR_PROPPAGE_DATA", "Data")
diff --git a/reportdesign/source/core/resource/core_resource.cxx b/reportdesign/source/core/resource/core_resource.cxx
index a81ab5e34fae..e11d536dc132 100644
--- a/reportdesign/source/core/resource/core_resource.cxx
+++ b/reportdesign/source/core/resource/core_resource.cxx
@@ -17,8 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#include <core_resource.hxx>
-#include <unotools/resmgr.hxx>
-OUString RptResId(std::string_view aId) { return Translate::get(aId, Translate::Create("rpt")); }
+OUString RptResId(TranslateId aId) { return Translate::get(aId, Translate::Create("rpt")); }
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/core/sdr/ReportUndoFactory.cxx b/reportdesign/source/core/sdr/ReportUndoFactory.cxx
index c926c874407e..1c36d836b2e2 100644
--- a/reportdesign/source/core/sdr/ReportUndoFactory.cxx
+++ b/reportdesign/source/core/sdr/ReportUndoFactory.cxx
@@ -25,7 +25,7 @@ namespace rptui
{
using namespace ::com::sun::star;
-static std::unique_ptr<SdrUndoAction> lcl_createUndo(SdrObject& rObject, Action _eAction, const char* pCommentId)
+static std::unique_ptr<SdrUndoAction> lcl_createUndo(SdrObject& rObject, Action _eAction, TranslateId pCommentId)
{
OObjectBase* pObj = dynamic_cast<OObjectBase*>(&rObject);
if ( !pObj )
diff --git a/reportdesign/source/core/sdr/UndoActions.cxx b/reportdesign/source/core/sdr/UndoActions.cxx
index 8616ee612d4d..21332691bfb7 100644
--- a/reportdesign/source/core/sdr/UndoActions.cxx
+++ b/reportdesign/source/core/sdr/UndoActions.cxx
@@ -68,7 +68,7 @@ namespace rptui
}
-OCommentUndoAction::OCommentUndoAction(SdrModel& _rMod,const char* pCommentID)
+OCommentUndoAction::OCommentUndoAction(SdrModel& _rMod, TranslateId pCommentID)
:SdrUndoAction(_rMod)
{
m_pController = static_cast< OReportModel& >( _rMod ).getController();
@@ -91,7 +91,7 @@ OUndoContainerAction::OUndoContainerAction(SdrModel& _rMod
,Action _eAction
,const uno::Reference< container::XIndexContainer >& rContainer
,const Reference< XInterface > & xElem
- ,const char* pCommentId)
+ ,TranslateId pCommentId)
:OCommentUndoAction(_rMod, pCommentId)
,m_xElement(xElem)
,m_xContainer(rContainer)
@@ -233,7 +233,7 @@ OUndoGroupSectionAction::OUndoGroupSectionAction(
SdrModel& _rMod, Action _eAction,
::std::function<uno::Reference<report::XSection>(OGroupHelper*)> _pMemberFunction,
const uno::Reference<report::XGroup>& _xGroup, const Reference<XInterface>& xElem,
- const char* pCommentId)
+ TranslateId pCommentId)
: OUndoContainerAction(_rMod, _eAction, nullptr, xElem, pCommentId)
, m_aGroupHelper(_xGroup)
, m_pMemberFunction(std::move(_pMemberFunction))
@@ -277,7 +277,7 @@ OUndoReportSectionAction::OUndoReportSectionAction(
SdrModel& _rMod, Action _eAction,
::std::function<uno::Reference<report::XSection>(OReportHelper*)> _pMemberFunction,
const uno::Reference<report::XReportDefinition>& _xReport, const Reference<XInterface>& xElem,
- const char* pCommentId)
+ TranslateId pCommentId)
: OUndoContainerAction(_rMod, _eAction, nullptr, xElem, pCommentId)
, m_aReportHelper(_xReport)
, m_pMemberFunction(std::move(_pMemberFunction))
@@ -323,7 +323,7 @@ void OUndoReportSectionAction::implReRemove( )
}
ORptUndoPropertyAction::ORptUndoPropertyAction(SdrModel& rNewMod, const PropertyChangeEvent& evt)
- :OCommentUndoAction(rNewMod,nullptr)
+ :OCommentUndoAction(rNewMod,{})
,m_xObj(evt.Source, UNO_QUERY)
,m_aPropertyName(evt.PropertyName)
,m_aNewValue(evt.NewValue)
diff --git a/reportdesign/source/ui/dlg/GroupsSorting.cxx b/reportdesign/source/ui/dlg/GroupsSorting.cxx
index 6ac7f357d90e..0957c3039e39 100644
--- a/reportdesign/source/ui/dlg/GroupsSorting.cxx
+++ b/reportdesign/source/ui/dlg/GroupsSorting.cxx
@@ -938,7 +938,7 @@ IMPL_LINK_NOARG(OGroupsSortingDialog, OnControlFocusGot, LinkParamNone*, void )
IMPL_LINK(OGroupsSortingDialog, OnWidgetFocusGot, weld::Widget&, rControl, void )
{
- const std::pair<weld::Widget*, const char*> pControls[] = {
+ const std::pair<weld::Widget*, TranslateId> pControls[] = {
{ m_xHeaderLst.get(), STR_RPT_HELP_HEADER },
{ m_xFooterLst.get(), STR_RPT_HELP_FOOTER },
{ m_xGroupOnLst.get(), STR_RPT_HELP_GROUPON },
@@ -1081,7 +1081,7 @@ void OGroupsSortingDialog::displayGroup(const uno::Reference<report::XGroup>& _x
case sdbc::DataType::TIME:
case sdbc::DataType::TIMESTAMP:
{
- const char* aIds[] = { STR_RPT_YEAR, STR_RPT_QUARTER,STR_RPT_MONTH,STR_RPT_WEEK,STR_RPT_DAY,STR_RPT_HOUR,STR_RPT_MINUTE };
+ const TranslateId aIds[] = { STR_RPT_YEAR, STR_RPT_QUARTER,STR_RPT_MONTH,STR_RPT_WEEK,STR_RPT_DAY,STR_RPT_HOUR,STR_RPT_MINUTE };
for (size_t i = 0; i < SAL_N_ELEMENTS(aIds); ++i)
{
m_xGroupOnLst->append(OUString::number(i+2), RptResId(aIds[i]));
diff --git a/reportdesign/source/ui/inc/GeometryHandler.hxx b/reportdesign/source/ui/inc/GeometryHandler.hxx
index e5852694600d..79fb54433238 100644
--- a/reportdesign/source/ui/inc/GeometryHandler.hxx
+++ b/reportdesign/source/ui/inc/GeometryHandler.hxx
@@ -33,6 +33,7 @@
#include <com/sun/star/report/XFunctionsSupplier.hpp>
#include <com/sun/star/beans/XPropertyChangeListener.hpp>
#include <com/sun/star/sdbc/XRowSet.hpp>
+#include <unotools/resmgr.hxx>
#include <map>
#include <memory>
#include <string_view>
@@ -92,12 +93,12 @@ namespace rptui
*/
sal_uInt32 impl_getDataFieldType_throw(const OUString& _sDataField = OUString()) const;
- css::uno::Any getConstantValue(bool bToControlValue,const char** pResId,const css::uno::Any& _aValue,const OUString& _sConstantName,const OUString & PropertyName );
+ css::uno::Any getConstantValue(bool bToControlValue,const TranslateId* pResId,const css::uno::Any& _aValue,const OUString& _sConstantName,const OUString & PropertyName );
css::beans::Property getProperty(const OUString & PropertyName);
static void implCreateListLikeControl(
const css::uno::Reference< css::inspection::XPropertyControlFactory >& _rxControlFactory
,css::inspection::LineDescriptor & out_Descriptor
- ,const char** pResId
+ ,const TranslateId* pResId
,bool _bReadOnlyControl
,bool _bTrueIfListBoxFalseIfComboBox
);
diff --git a/reportdesign/source/ui/inc/ReportController.hxx b/reportdesign/source/ui/inc/ReportController.hxx
index 80685623f126..92ab4f3fe712 100644
--- a/reportdesign/source/ui/inc/ReportController.hxx
+++ b/reportdesign/source/ui/inc/ReportController.hxx
@@ -194,8 +194,8 @@ namespace rptui
,sal_Int32 _nGroupPos
,bool _bShow);
- void executeMethodWithUndo(const char* pUndoStrId,const ::std::function<void(ODesignView *)>& _pMemfun);
- void alignControlsWithUndo(const char* pUndoStrId, ControlModification _nControlModification, bool _bAlignAtSection = false);
+ void executeMethodWithUndo(TranslateId pUndoStrId,const ::std::function<void(ODesignView *)>& _pMemfun);
+ void alignControlsWithUndo(TranslateId pUndoStrId, ControlModification _nControlModification, bool _bAlignAtSection = false);
css::uno::Reference< css::frame::XFrame > getXFrame();
@@ -207,7 +207,7 @@ namespace rptui
static void shrinkSectionTop(const css::uno::Reference< css::report::XSection >& _xSection);
public:
- void shrinkSection(const char* pUndoStrId, const css::uno::Reference< css::report::XSection >& _xSection, sal_Int32 _nShrinkId);
+ void shrinkSection(TranslateId pUndoStrId, const css::uno::Reference< css::report::XSection >& _xSection, sal_Int32 _nShrinkId);
/** opens the file open dialog to allow the user to select an image which will be
* bound to a newly created image button.
@@ -292,7 +292,7 @@ namespace rptui
/** set the property at all selected controls.
@return <TRUE/> when the selection is not empty
*/
- bool impl_setPropertyAtControls_throw(const char* pUndoResId
+ bool impl_setPropertyAtControls_throw(TranslateId pUndoResId
,const OUString& _sProperty
,const css::uno::Any& _aValue
,const css::uno::Sequence< css::beans::PropertyValue >& _aArgs);
diff --git a/reportdesign/source/ui/inc/RptUndo.hxx b/reportdesign/source/ui/inc/RptUndo.hxx
index 9f0b6c1aa24b..cef45a59d996 100644
--- a/reportdesign/source/ui/inc/RptUndo.hxx
+++ b/reportdesign/source/ui/inc/RptUndo.hxx
@@ -55,7 +55,7 @@ namespace rptui
OSectionUndo( OReportModel& rMod
,sal_uInt16 _nSlot
,Action _eAction
- ,const char* pCommentID);
+ ,TranslateId pCommentID);
virtual ~OSectionUndo() override;
virtual void Undo() override;
@@ -103,7 +103,7 @@ namespace rptui
,::std::function<css::uno::Reference< css::report::XSection >(OGroupHelper *)> _pMemberFunction
,const css::uno::Reference< css::report::XGroup >& _xGroup
,Action _eAction
- ,const char* pCommentID);
+ ,TranslateId pCommentID);
virtual OUString GetComment() const override;
};
@@ -122,7 +122,7 @@ namespace rptui
void implReRemove( );
public:
OGroupUndo(OReportModel& rMod
- ,const char* pCommentID
+ ,TranslateId pCommentID
,Action _eAction
,const css::uno::Reference< css::report::XGroup>& _xGroup
,const css::uno::Reference< css::report::XReportDefinition >& _xReportDefinition);
diff --git a/reportdesign/source/ui/inc/SectionWindow.hxx b/reportdesign/source/ui/inc/SectionWindow.hxx
index a202b0a19315..1e727c2e5f71 100644
--- a/reportdesign/source/ui/inc/SectionWindow.hxx
+++ b/reportdesign/source/ui/inc/SectionWindow.hxx
@@ -62,7 +62,7 @@ namespace rptui
* @return sal_True when title was set otherwise FALSE
*/
bool setGroupSectionTitle(
- const css::uno::Reference<css::report::XGroup>& _xGroup, const char* pResId,
+ const css::uno::Reference<css::report::XGroup>& _xGroup, TranslateId pResId,
const ::std::function<css::uno::Reference<css::report::XSection>(OGroupHelper*)>&
_pGetSection,
const ::std::function<bool(OGroupHelper*)>& _pIsSectionOn);
@@ -76,7 +76,7 @@ namespace rptui
* @return sal_True when title was set otherwise FALSE
*/
bool setReportSectionTitle(
- const css::uno::Reference<css::report::XReportDefinition>& _xReport, const char* pResId,
+ const css::uno::Reference<css::report::XReportDefinition>& _xReport, TranslateId pResId,
const ::std::function<css::uno::Reference<css::report::XSection>(OReportHelper*)>&
_pGetSection,
const ::std::function<bool(OReportHelper*)>& _pIsSectionOn);
diff --git a/reportdesign/source/ui/inspection/DataProviderHandler.cxx b/reportdesign/source/ui/inspection/DataProviderHandler.cxx
index d9665d6883dc..f4c8abd97497 100644
--- a/reportdesign/source/ui/inspection/DataProviderHandler.cxx
+++ b/reportdesign/source/ui/inspection/DataProviderHandler.cxx
@@ -468,7 +468,7 @@ bool DataProviderHandler::impl_dialogLinkedFields_nothrow( ::osl::ClearableMutex
{"ParentWindow", m_xContext->getValueByName("DialogParentWindow")},
{"Detail", uno::Any(m_xDataProvider)},
{"Master", uno::Any(m_xReportComponent->getSection()->getReportDefinition())},
- {"Explanation", uno::Any(RptResId(RID_STR_EXPLANATION))},
+ {"Explanation", uno::Any(RptResId(TranslateId(nullptr, RID_STR_EXPLANATION)))},
{"DetailLabel", uno::Any(RptResId(RID_STR_DETAILLABEL))},
{"MasterLabel", uno::Any(RptResId(RID_STR_MASTERLABEL))},
}));
diff --git a/reportdesign/source/ui/inspection/DefaultInspection.cxx b/reportdesign/source/ui/inspection/DefaultInspection.cxx
index 4ac4dd3bbc2a..80269f433346 100644
--- a/reportdesign/source/ui/inspection/DefaultInspection.cxx
+++ b/reportdesign/source/ui/inspection/DefaultInspection.cxx
@@ -160,7 +160,7 @@ namespace rptui
const struct
{
const char* programmaticName;
- const char* uiNameResId;
+ TranslateId uiNameResId;
OString helpId;
} aCategories[] = {
{ "General", RID_STR_PROPPAGE_DEFAULT, HID_RPT_PROPDLG_TAB_GENERAL },
diff --git a/reportdesign/source/ui/inspection/GeometryHandler.cxx b/reportdesign/source/ui/inspection/GeometryHandler.cxx
index 280e9060e67f..68aa4cabfe37 100644
--- a/reportdesign/source/ui/inspection/GeometryHandler.cxx
+++ b/reportdesign/source/ui/inspection/GeometryHandler.cxx
@@ -634,13 +634,13 @@ beans::PropertyState SAL_CALL GeometryHandler::getPropertyState(const OUString &
void GeometryHandler::implCreateListLikeControl(
const uno::Reference< inspection::XPropertyControlFactory >& _rxControlFactory
,inspection::LineDescriptor & out_Descriptor
- ,const char** pResId
+ ,const TranslateId* pResId
,bool _bReadOnlyControl
,bool _bTrueIfListBoxFalseIfComboBox
)
{
std::vector<OUString> aList;
- for (const char** pItem = pResId; *pItem; ++pItem)
+ for (const TranslateId* pItem = pResId; *pItem; ++pItem)
aList.push_back(RptResId(*pItem));
implCreateListLikeControl(_rxControlFactory, out_Descriptor, aList, _bReadOnlyControl, _bTrueIfListBoxFalseIfComboBox);
}
@@ -724,7 +724,7 @@ inspection::LineDescriptor SAL_CALL GeometryHandler::describePropertyLine(const
case PROPERTY_ID_BACKTRANSPARENT:
case PROPERTY_ID_CONTROLBACKGROUNDTRANSPARENT:
{
- const char** pResId = RID_STR_BOOL;
+ const TranslateId* pResId = RID_STR_BOOL;
if ( PROPERTY_ID_KEEPTOGETHER == nId && uno::Reference< report::XGroup>(m_xReportComponent,uno::UNO_QUERY).is())
pResId = RID_STR_KEEPTOGETHER_CONST;
implCreateListLikeControl(_xControlFactory,aOut,pResId,false,true);
@@ -892,10 +892,10 @@ beans::Property GeometryHandler::getProperty(const OUString & PropertyName)
return beans::Property();
return *pFind;
}
-uno::Any GeometryHandler::getConstantValue(bool _bToControlValue,const char** pResId,const uno::Any& _aValue,const OUString& _sConstantName,const OUString & PropertyName )
+uno::Any GeometryHandler::getConstantValue(bool _bToControlValue,const TranslateId* pResId,const uno::Any& _aValue,const OUString& _sConstantName,const OUString & PropertyName )
{
std::vector<OUString> aList;
- for (const char** pItem = pResId; *pItem; ++pItem)
+ for (const TranslateId* pItem = pResId; *pItem; ++pItem)
aList.push_back(RptResId(*pItem));
uno::Sequence< OUString > aSeq(aList.size());
for (size_t i = 0; i < aList.size(); ++i)
@@ -1037,7 +1037,7 @@ uno::Any SAL_CALL GeometryHandler::convertToPropertyValue(const OUString & Prope
sal_uInt32 nFound(RESARRAY_INDEX_NOTFOUND);
sal_uInt32 i = 0;
- for (const char** pItem = RID_STR_TYPE_CONST; *pItem; ++pItem)
+ for (const TranslateId* pItem = RID_STR_TYPE_CONST; *pItem; ++pItem)
{
if (sValue == RptResId(*pItem))
{
@@ -1060,7 +1060,7 @@ uno::Any SAL_CALL GeometryHandler::convertToPropertyValue(const OUString & Prope
sal_uInt32 nFound(RESARRAY_INDEX_NOTFOUND);
sal_uInt32 i = 0;
- for (const char** pItem = RID_STR_VERTICAL_ALIGN_CONST; *pItem; ++pItem)
+ for (const TranslateId* pItem = RID_STR_VERTICAL_ALIGN_CONST; *pItem; ++pItem)
{
if (sValue == RptResId(*pItem))
{
@@ -1080,7 +1080,7 @@ uno::Any SAL_CALL GeometryHandler::convertToPropertyValue(const OUString & Prope
sal_uInt32 nFound(RESARRAY_INDEX_NOTFOUND);
sal_uInt32 i = 0;
- for (const char** pItem = RID_STR_PARAADJUST_CONST; *pItem; ++pItem)
+ for (const TranslateId* pItem = RID_STR_PARAADJUST_CONST; *pItem; ++pItem)
{
if (sValue == RptResId(*pItem))
{
diff --git a/reportdesign/source/ui/misc/RptUndo.cxx b/reportdesign/source/ui/misc/RptUndo.cxx
index c2a07a4d0f92..29d3945bedc3 100644
--- a/reportdesign/source/ui/misc/RptUndo.cxx
+++ b/reportdesign/source/ui/misc/RptUndo.cxx
@@ -113,7 +113,7 @@ namespace
OSectionUndo::OSectionUndo(OReportModel& _rMod
,sal_uInt16 _nSlot
,Action _eAction
- ,const char* pCommentID)
+ ,TranslateId pCommentID)
: OCommentUndoAction(_rMod,pCommentID)
,m_eAction(_eAction)
,m_nSlot(_nSlot)
@@ -214,7 +214,7 @@ OReportSectionUndo::OReportSectionUndo(
OReportModel& _rMod, sal_uInt16 _nSlot,
::std::function<uno::Reference<report::XSection>(OReportHelper*)> _pMemberFunction,
const uno::Reference<report::XReportDefinition>& _xReport, Action _eAction)
- : OSectionUndo(_rMod, _nSlot, _eAction, nullptr)
+ : OSectionUndo(_rMod, _nSlot, _eAction, {})
, m_aReportHelper(_xReport)
, m_pMemberFunction(std::move(_pMemberFunction))
{
@@ -248,7 +248,7 @@ void OReportSectionUndo::implReRemove( )
OGroupSectionUndo::OGroupSectionUndo(
OReportModel& _rMod, sal_uInt16 _nSlot,
::std::function<uno::Reference<report::XSection>(OGroupHelper*)> _pMemberFunction,
- const uno::Reference<report::XGroup>& _xGroup, Action _eAction, const char* pCommentID)
+ const uno::Reference<report::XGroup>& _xGroup, Action _eAction, TranslateId pCommentID)
: OSectionUndo(_rMod, _nSlot, _eAction, pCommentID)
, m_aGroupHelper(_xGroup)
, m_pMemberFunction(std::move(_pMemberFunction))
@@ -314,7 +314,7 @@ void OGroupSectionUndo::implReRemove( )
OGroupUndo::OGroupUndo(OReportModel& _rMod
- ,const char* pCommentID
+ ,TranslateId pCommentID
,Action _eAction
,const uno::Reference< report::XGroup>& _xGroup
,const uno::Reference< report::XReportDefinition >& _xReportDefinition)
diff --git a/reportdesign/source/ui/report/ReportController.cxx b/reportdesign/source/ui/report/ReportController.cxx
index dbc992f33c61..04d331aae68e 100644
--- a/reportdesign/source/ui/report/ReportController.cxx
+++ b/reportdesign/source/ui/report/ReportController.cxx
@@ -2581,7 +2581,7 @@ void OReportController::Notify(SfxBroadcaster & /* _rBc */, SfxHint const & _rHi
});
}
-void OReportController::executeMethodWithUndo(const char* pUndoStrId,const ::std::function<void(ODesignView *)>& _pMemfun)
+void OReportController::executeMethodWithUndo(TranslateId pUndoStrId,const ::std::function<void(ODesignView *)>& _pMemfun)
{
const OUString sUndoAction = RptResId(pUndoStrId);
UndoContext aUndoContext( getUndoManager(), sUndoAction );
@@ -2589,7 +2589,7 @@ void OReportController::executeMethodWithUndo(const char* pUndoStrId,const ::std
InvalidateFeature( SID_UNDO );
}
-void OReportController::alignControlsWithUndo(const char* pUndoStrId, ControlModification _nControlModification, bool _bAlignAtSection)
+void OReportController::alignControlsWithUndo(TranslateId pUndoStrId, ControlModification _nControlModification, bool _bAlignAtSection)
{
const OUString sUndoAction = RptResId(pUndoStrId);
UndoContext aUndoContext( getUndoManager(), sUndoAction );
@@ -2665,7 +2665,7 @@ void OReportController::shrinkSectionTop(const uno::Reference<report::XSection>&
_xSection->setHeight(nNewSectionHeight);
}
-void OReportController::shrinkSection(const char* pUndoStrId, const uno::Reference<report::XSection>& _xSection, sal_Int32 _nSid)
+void OReportController::shrinkSection(TranslateId pUndoStrId, const uno::Reference<report::XSection>& _xSection, sal_Int32 _nSid)
{
if ( _xSection.is() )
{
@@ -2838,7 +2838,7 @@ uno::Reference<frame::XModel> OReportController::executeReport()
uno::Reference<frame::XModel> xModel;
if ( m_xReportDefinition.is() )
{
- const char* pErrorId = RID_ERR_NO_COMMAND;
+ TranslateId pErrorId = RID_ERR_NO_COMMAND;
bool bEnabled = !m_xReportDefinition->getCommand().isEmpty();
if ( bEnabled )
{
@@ -2864,7 +2864,7 @@ uno::Reference<frame::XModel> OReportController::executeReport()
if ( isEditable() )
{
sal_uInt16 nCommand = 0;
- if (!strcmp(pErrorId, RID_ERR_NO_COMMAND))
+ if (pErrorId != RID_ERR_NO_COMMAND)
{
if ( !m_bShowProperties )
executeUnChecked(SID_SHOW_PROPERTYBROWSER,uno::Sequence< beans::PropertyValue>());
@@ -4151,7 +4151,7 @@ bool OReportController::isFormatCommandEnabled(sal_uInt16 _nCommand,const uno::R
return bRet;
}
-bool OReportController::impl_setPropertyAtControls_throw(const char* pUndoResId,const OUString& _sProperty,const uno::Any& _aValue,const Sequence< PropertyValue >& _aArgs)
+bool OReportController::impl_setPropertyAtControls_throw(TranslateId pUndoResId,const OUString& _sProperty,const uno::Any& _aValue,const Sequence< PropertyValue >& _aArgs)
{
::std::vector< uno::Reference< uno::XInterface > > aSelection;
uno::Reference< awt::XWindow> xWindow;
diff --git a/reportdesign/source/ui/report/SectionWindow.cxx b/reportdesign/source/ui/report/SectionWindow.cxx
index 660971395694..60d5235f84bb 100644
--- a/reportdesign/source/ui/report/SectionWindow.cxx
+++ b/reportdesign/source/ui/report/SectionWindow.cxx
@@ -163,7 +163,7 @@ void OSectionWindow::_propertyChanged(const beans::PropertyChangeEvent& _rEvent)
}
bool OSectionWindow::setReportSectionTitle(
- const uno::Reference<report::XReportDefinition>& _xReport, const char* pResId,
+ const uno::Reference<report::XReportDefinition>& _xReport, TranslateId pResId,
const ::std::function<uno::Reference<report::XSection>(OReportHelper*)>& _pGetSection,
const ::std::function<bool(OReportHelper*)>& _pIsSectionOn)
{
@@ -179,7 +179,7 @@ bool OSectionWindow::setReportSectionTitle(
}
bool OSectionWindow::setGroupSectionTitle(
- const uno::Reference<report::XGroup>& _xGroup, const char* pResId,
+ const uno::Reference<report::XGroup>& _xGroup, TranslateId pResId,
const ::std::function<uno::Reference<report::XSection>(OGroupHelper*)>& _pGetSection,
const ::std::function<bool(OGroupHelper*)>& _pIsSectionOn)
{
diff --git a/reportdesign/source/ui/report/propbrw.cxx b/reportdesign/source/ui/report/propbrw.cxx
index afdbe742705a..672350ad230e 100644
--- a/reportdesign/source/ui/report/propbrw.cxx
+++ b/reportdesign/source/ui/report/propbrw.cxx
@@ -327,7 +327,7 @@ OUString PropBrw::GetHeadlineName( const uno::Sequence< Reference<uno::XInterfac
Reference< lang::XServiceInfo > xServiceInfo( xNameCont->getByName("ReportComponent"), UNO_QUERY );
if ( xServiceInfo.is() )
{
- const char* pResId;
+ TranslateId pResId;
if ( xServiceInfo->supportsService( SERVICE_FIXEDTEXT ) )
{
pResId = RID_STR_PROPTITLE_FIXEDTEXT;
diff --git a/sc/inc/compiler.hrc b/sc/inc/compiler.hrc
index 8e7b50dafb06..e77dd26ea6a4 100644
--- a/sc/inc/compiler.hrc
+++ b/sc/inc/compiler.hrc
@@ -19,9 +19,11 @@
#pragma once
-#define NC_(Context, String) reinterpret_cast<char const *>(Context "\004" u8##String)
+#include <unotools/resmgr.hxx>
-const char* RID_FUNCTION_CATEGORIES[] =
+#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
+
+const TranslateId RID_FUNCTION_CATEGORIES[] =
{
NC_("RID_FUNCTION_CATEGORIES", "Database"),
NC_("RID_FUNCTION_CATEGORIES", "Date&Time"),
diff --git a/sc/inc/dpobject.hxx b/sc/inc/dpobject.hxx
index 6d740769637c..3552f14fb657 100644
--- a/sc/inc/dpobject.hxx
+++ b/sc/inc/dpobject.hxx
@@ -29,6 +29,7 @@
#include <com/sun/star/sheet/DataPilotFieldOrientation.hpp>
#include <o3tl/sorted_vector.hxx>
+#include <unotools/resmgr.hxx>
#include <memory>
#include <vector>
@@ -383,7 +384,7 @@ public:
ScDPCollection(const ScDPCollection& r);
~ScDPCollection();
- const char* ReloadCache(const ScDPObject* pDPObj, o3tl::sorted_vector<ScDPObject*>& rRefs);
+ TranslateId ReloadCache(const ScDPObject* pDPObj, o3tl::sorted_vector<ScDPObject*>& rRefs);
bool ReloadGroupsInCache(const ScDPObject* pDPObj, o3tl::sorted_vector<ScDPObject*>& rRefs);
SC_DLLPUBLIC bool GetReferenceGroups(const ScDPObject& rDPObj, const ScDPDimensionSaveData** pGroups) const;
diff --git a/sc/inc/dpshttab.hxx b/sc/inc/dpshttab.hxx
index 39406a7c4386..c34482bc2105 100644
--- a/sc/inc/dpshttab.hxx
+++ b/sc/inc/dpshttab.hxx
@@ -23,6 +23,7 @@
#include "address.hxx"
#include "scdllapi.h"
#include "queryparam.hxx"
+#include <unotools/resmgr.hxx>
#include <unordered_set>
#include <vector>
@@ -70,7 +71,7 @@ public:
* @return nullptr if the source range is sane, otherwise an error message ID is
* returned.
*/
- const char* CheckSourceRange() const;
+ TranslateId CheckSourceRange() const;
private:
mutable ScRange maSourceRange;
diff --git a/sc/inc/globstr.hrc b/sc/inc/globstr.hrc
index 4e0eb49d6f63..44776504b47e 100644
--- a/sc/inc/globstr.hrc
+++ b/sc/inc/globstr.hrc
@@ -20,8 +20,8 @@
#ifndef SC_GLOBSTR_HRC
#define SC_GLOBSTR_HRC
-#define NC_(Context, String) reinterpret_cast<char const *>(Context "\004" u8##String)
-#define NNC_(Context, StringSingular, StringPlural) reinterpret_cast<char const *>(Context "\004" u8##StringSingular "\004" u8##StringPlural)
+#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
+#define NNC_(Context, StringSingular, StringPlural) TranslateNId(Context, reinterpret_cast<char const *>(u8##StringSingular), reinterpret_cast<char const *>(u8##StringPlural))
/*
* This file is reserved for string IDs of permanently loaded resident string
diff --git a/sc/inc/pvfundlg.hrc b/sc/inc/pvfundlg.hrc
index 9c890035a68c..0f3fe4dd424f 100644
--- a/sc/inc/pvfundlg.hrc
+++ b/sc/inc/pvfundlg.hrc
@@ -19,9 +19,9 @@
#pragma once
-#define NC_(Context, String) reinterpret_cast<char const *>(Context "\004" u8##String)
+#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
-const char* SCSTR_DPFUNCLISTBOX[] =
+const TranslateId SCSTR_DPFUNCLISTBOX[] =
{
NC_("SCSTR_DPFUNCLISTBOX", "Sum"),
NC_("SCSTR_DPFUNCLISTBOX", "Count"),
diff --git a/sc/inc/scerrors.hrc b/sc/inc/scerrors.hrc
index 82f23585ff70..b2ee886174ee 100644
--- a/sc/inc/scerrors.hrc
+++ b/sc/inc/scerrors.hrc
@@ -19,7 +19,7 @@
#pragma once
-#define NC_(Context, String) reinterpret_cast<char const *>(Context "\004" u8##String)
+#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
#include <svtools/ehdl.hxx>
#include "scerrors.hxx"
@@ -103,7 +103,7 @@ const ErrMsgCode RID_ERRHDLSC[] =
SCWARN_IMPORT_FILE_ROWCOL },
{ NC_("RID_ERRHDLSC", "Not all attributes could be read.") ,
SCWARN_IMPORT_FEATURES_LOST },
- { nullptr, ERRCODE_NONE }
+ { {}, ERRCODE_NONE }
};
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/inc/scfuncs.hrc b/sc/inc/scfuncs.hrc
index b8ac0476956c..88d78f2f7c28 100644
--- a/sc/inc/scfuncs.hrc
+++ b/sc/inc/scfuncs.hrc
@@ -18,7 +18,7 @@
*/
#pragma once
-#define NC_(Context, String) reinterpret_cast<char const *>(Context "\004" u8##String)
+#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
/* Resource file for the function wizard / autopilot.
*
@@ -31,7 +31,7 @@
*/
// -=*# Resource for function DCOUNT #*=-
-const char* SC_OPCODE_DB_COUNT_ARY[] =
+const TranslateId SC_OPCODE_DB_COUNT_ARY[] =
{
NC_("SC_OPCODE_DB_COUNT", "Counts the cells of a data range whose contents match the search criteria."),
NC_("SC_OPCODE_DB_COUNT", "Database"),
@@ -43,7 +43,7 @@ const char* SC_OPCODE_DB_COUNT_ARY[] =
};
// -=*# Resource for function DCOUNTA #*=-
-const char* SC_OPCODE_DB_COUNT_2_ARY[] =
+const TranslateId SC_OPCODE_DB_COUNT_2_ARY[] =
{
NC_("SC_OPCODE_DB_COUNT_2", "Counts all non-blank cells of a data range where the content corresponds to the search criteria."),
NC_("SC_OPCODE_DB_COUNT_2", "Database"),
@@ -55,7 +55,7 @@ const char* SC_OPCODE_DB_COUNT_2_ARY[] =
};
// -=*# Resource for function DAVERAGE #*=-
-const char* SC_OPCODE_DB_AVERAGE_ARY[] =
+const TranslateId SC_OPCODE_DB_AVERAGE_ARY[] =
{
NC_("SC_OPCODE_DB_AVERAGE", "Returns the average value of all the cells of a data range whose contents match the search criteria."),
NC_("SC_OPCODE_DB_AVERAGE", "Database"),
@@ -67,7 +67,7 @@ const char* SC_OPCODE_DB_AVERAGE_ARY[] =
};
// -=*# Resource for function DGET #*=-
-const char* SC_OPCODE_DB_GET_ARY[] =
+const TranslateId SC_OPCODE_DB_GET_ARY[] =
{
NC_("SC_OPCODE_DB_GET", "Defines the contents of the cell of a data range which matches the search criteria."),
NC_("SC_OPCODE_DB_GET", "Database"),
@@ -79,7 +79,7 @@ const char* SC_OPCODE_DB_GET_ARY[] =
};
// -=*# Resource for function DMAX #*=-
-const char* SC_OPCODE_DB_MAX_ARY[] =
+const TranslateId SC_OPCODE_DB_MAX_ARY[] =
{
NC_("SC_OPCODE_DB_MAX", "Returns the maximum value from all of the cells of a data range which correspond to the search criteria."),
NC_("SC_OPCODE_DB_MAX", "Database"),
@@ -91,7 +91,7 @@ const char* SC_OPCODE_DB_MAX_ARY[] =
};
// -=*# Resource for function DMIN #*=-
-const char* SC_OPCODE_DB_MIN_ARY[] =
+const TranslateId SC_OPCODE_DB_MIN_ARY[] =
{
NC_("SC_OPCODE_DB_MIN", "Returns the minimum of all cells of a data range where the contents correspond to the search criteria."),
NC_("SC_OPCODE_DB_MIN", "Database"),
@@ -103,7 +103,7 @@ const char* SC_OPCODE_DB_MIN_ARY[] =
};
// -=*# Resource for function DPRODUCT #*=-
-const char* SC_OPCODE_DB_PRODUCT_ARY[] =
+const TranslateId SC_OPCODE_DB_PRODUCT_ARY[] =
{
NC_("SC_OPCODE_DB_PRODUCT", "Multiplies all cells of a data range where the contents match the search criteria."),
NC_("SC_OPCODE_DB_PRODUCT", "Database"),
@@ -115,7 +115,7 @@ const char* SC_OPCODE_DB_PRODUCT_ARY[] =
};
// -=*# Resource for function DSTDEV #*=-
-const char* SC_OPCODE_DB_STD_DEV_ARY[] =
+const TranslateId SC_OPCODE_DB_STD_DEV_ARY[] =
{
NC_("SC_OPCODE_DB_STD_DEV", "Calculates the standard deviation of all cells in a data range whose contents match the search criteria."),
NC_("SC_OPCODE_DB_STD_DEV", "Database"),
@@ -127,7 +127,7 @@ const char* SC_OPCODE_DB_STD_DEV_ARY[] =
};
// -=*# Resource for function DSTDEVP #*=-
-const char* SC_OPCODE_DB_STD_DEV_P_ARY[] =
+const TranslateId SC_OPCODE_DB_STD_DEV_P_ARY[] =
{
NC_("SC_OPCODE_DB_STD_DEV_P", "Returns the standard deviation with regards to the population of all cells of a data range matching the search criteria."),
NC_("SC_OPCODE_DB_STD_DEV_P", "Database"),
@@ -139,7 +139,7 @@ const char* SC_OPCODE_DB_STD_DEV_P_ARY[] =
};
// -=*# Resource for function DSUM #*=-
-const char* SC_OPCODE_DB_SUM_ARY[] =
+const TranslateId SC_OPCODE_DB_SUM_ARY[] =
{
NC_("SC_OPCODE_DB_SUM", "Adds all the cells of a data range where the contents match the search criteria."),
NC_("SC_OPCODE_DB_SUM", "Database"),
@@ -151,7 +151,7 @@ const char* SC_OPCODE_DB_SUM_ARY[] =
};
// -=*# Resource for function DVAR #*=-
-const char* SC_OPCODE_DB_VAR_ARY[] =
+const TranslateId SC_OPCODE_DB_VAR_ARY[] =
{
NC_("SC_OPCODE_DB_VAR", "Determines the variance of all the cells in a data range where the contents match the search criteria."),
NC_("SC_OPCODE_DB_VAR", "Database"),
@@ -163,7 +163,7 @@ const char* SC_OPCODE_DB_VAR_ARY[] =
};
// -=*# Resource for function DVARP #*=-
-const char* SC_OPCODE_DB_VAR_P_ARY[] =
+const TranslateId SC_OPCODE_DB_VAR_P_ARY[] =
{
NC_("SC_OPCODE_DB_VAR_P", "Determines variance of a population based on all cells in a data range where contents match the search criteria."),
NC_("SC_OPCODE_DB_VAR_P", "Database"),
@@ -175,7 +175,7 @@ const char* SC_OPCODE_DB_VAR_P_ARY[] =
};
// -=*# Resource for function DATE #*=-
-const char* SC_OPCODE_GET_DATE_ARY[] =
+const TranslateId SC_OPCODE_GET_DATE_ARY[] =
{
NC_("SC_OPCODE_GET_DATE", "Provides an internal number for the date given."),
NC_("SC_OPCODE_GET_DATE", "Year"),
@@ -187,7 +187,7 @@ const char* SC_OPCODE_GET_DATE_ARY[] =
};
// -=*# Resource for function DATE_VALUE #*=-
-const char* SC_OPCODE_GET_DATE_VALUE_ARY[] =
+const TranslateId SC_OPCODE_GET_DATE_VALUE_ARY[] =
{
NC_("SC_OPCODE_GET_DATE_VALUE", "Returns an internal number for a text having a possible date format."),
NC_("SC_OPCODE_GET_DATE_VALUE", "Text"),
@@ -195,7 +195,7 @@ const char* SC_OPCODE_GET_DATE_VALUE_ARY[] =
};
// -=*# Resource for function DAY #*=-
-const char* SC_OPCODE_GET_DAY_ARY[] =
+const TranslateId SC_OPCODE_GET_DAY_ARY[] =
{
NC_("SC_OPCODE_GET_DAY", "Returns the sequential date of the month as an integer (1-31) in relation to the date value."),
NC_("SC_OPCODE_GET_DAY", "Number"),
@@ -203,7 +203,7 @@ const char* SC_OPCODE_GET_DAY_ARY[] =
};
// -=*# Resource for function DAYS360 #*=-
-const char* SC_OPCODE_GET_DIFF_DATE_360_ARY[] =
+const TranslateId SC_OPCODE_GET_DIFF_DATE_360_ARY[] =
{
NC_("SC_OPCODE_GET_DIFF_DATE_360", "Calculates the number of days between two dates based on a 360-day year."),
NC_("SC_OPCODE_GET_DIFF_DATE_360", "Date 1"),
@@ -215,7 +215,7 @@ const char* SC_OPCODE_GET_DIFF_DATE_360_ARY[] =
};
// -=*# Resource for function NETWORKDAYS #*=-
-const char* SC_OPCODE_NETWORKDAYS_ARY[] =
+const TranslateId SC_OPCODE_NETWORKDAYS_ARY[] =
{
NC_("SC_OPCODE_NETWORKDAYS", "Returns the number of workdays between two dates using arguments to indicate weekenddays and holidays."),
NC_("SC_OPCODE_NETWORKDAYS", "Start date"),
@@ -229,7 +229,7 @@ const char* SC_OPCODE_NETWORKDAYS_ARY[] =
};
// -=*# Resource for function NETWORKDAYS.INTL #*=-
-const char* SC_OPCODE_NETWORKDAYS_MS_ARY[] =
+const TranslateId SC_OPCODE_NETWORKDAYS_MS_ARY[] =
{
NC_("SC_OPCODE_NETWORKDAYS_MS", "Returns the number of workdays between two dates using arguments to indicate weekend days and holidays."),
NC_("SC_OPCODE_NETWORKDAYS_MS", "Start date"),
@@ -243,7 +243,7 @@ const char* SC_OPCODE_NETWORKDAYS_MS_ARY[] =
};
// -=*# Resource for function WORKDAY.INTL #*=-
-const char* SC_OPCODE_WORKDAY_MS_ARY[] =
+const TranslateId SC_OPCODE_WORKDAY_MS_ARY[] =
{
NC_("SC_OPCODE_WORKDAY_MS", "Returns the serial number of the date before or after a number of workdays using arguments to indicate weekend days and holidays."),
NC_("SC_OPCODE_WORKDAY_MS", "Start date"),
@@ -257,7 +257,7 @@ const char* SC_OPCODE_WORKDAY_MS_ARY[] =
};
// -=*# Resource for function HOUR #*=-
-const char* SC_OPCODE_GET_HOUR_ARY[] =
+const TranslateId SC_OPCODE_GET_HOUR_ARY[] =
{
NC_("SC_OPCODE_GET_HOUR", "Determines the sequential number of the hour of the day (0-23) for the time value."),
NC_("SC_OPCODE_GET_HOUR", "Number"),
@@ -265,7 +265,7 @@ const char* SC_OPCODE_GET_HOUR_ARY[] =
};
// -=*# Resource for function MINUTE #*=-
-const char* SC_OPCODE_GET_MIN_ARY[] =
+const TranslateId SC_OPCODE_GET_MIN_ARY[] =
{
NC_("SC_OPCODE_GET_MIN", "Determines the sequential number for the minute of the hour (0-59) for the time value."),
NC_("SC_OPCODE_GET_MIN", "Number"),
@@ -273,7 +273,7 @@ const char* SC_OPCODE_GET_MIN_ARY[] =
};
// -=*# Resource for function MONTH #*=-
-const char* SC_OPCODE_GET_MONTH_ARY[] =
+const TranslateId SC_OPCODE_GET_MONTH_ARY[] =
{
NC_("SC_OPCODE_GET_MONTH", "Determines the sequential number of a month of the year (1-12) for the date value."),
NC_("SC_OPCODE_GET_MONTH", "Number"),
@@ -281,13 +281,13 @@ const char* SC_OPCODE_GET_MONTH_ARY[] =
};
// -=*# Resource for function NOW #*=-
-const char* SC_OPCODE_GET_ACT_TIME_ARY[] =
+const TranslateId SC_OPCODE_GET_ACT_TIME_ARY[] =
{
NC_("SC_OPCODE_GET_ACT_TIME", "Determines the current time of the computer.")
};
// -=*# Resource for function SECOND #*=-
-const char*SC_OPCODE_GET_SEC_ARY[] =
+const TranslateId SC_OPCODE_GET_SEC_ARY[] =
{
NC_("SC_OPCODE_GET_SEC", "Determines the sequential number of the second of a minute (0-59) for the time value."),
NC_("SC_OPCODE_GET_SEC", "Number"),
@@ -295,7 +295,7 @@ const char*SC_OPCODE_GET_SEC_ARY[] =
};
// -=*# Resource for function TIME #*=-
-const char* SC_OPCODE_GET_TIME_ARY[] =
+const TranslateId SC_OPCODE_GET_TIME_ARY[] =
{
NC_("SC_OPCODE_GET_TIME", "Determines a time value from the details for hour, minute and second."),
NC_("SC_OPCODE_GET_TIME", "Hour"),
@@ -307,7 +307,7 @@ const char* SC_OPCODE_GET_TIME_ARY[] =
};
// -=*# Resource for function TIMEVALUE #*=-
-const char* SC_OPCODE_GET_TIME_VALUE_ARY[] =
+const TranslateId SC_OPCODE_GET_TIME_VALUE_ARY[] =
{
NC_("SC_OPCODE_GET_TIME_VALUE", "Returns a sequential number for a text shown in a possible time entry format."),
NC_("SC_OPCODE_GET_TIME_VALUE", "Text"),
@@ -315,13 +315,13 @@ const char* SC_OPCODE_GET_TIME_VALUE_ARY[] =
};
// -=*# Resource for function TODAY #*=-
-const char* SC_OPCODE_GET_ACT_DATE_ARY[] =
+const TranslateId SC_OPCODE_GET_ACT_DATE_ARY[] =
{
NC_("SC_OPCODE_GET_ACT_DATE", "Determines the current date of the computer.")
};
// -=*# Resource for function WEEKDAY #*=-
-const char* SC_OPCODE_GET_DAY_OF_WEEK_ARY[] =
+const TranslateId SC_OPCODE_GET_DAY_OF_WEEK_ARY[] =
{
NC_("SC_OPCODE_GET_DAY_OF_WEEK", "Returns the day of the week for the date value as an integer."),
NC_("SC_OPCODE_GET_DAY_OF_WEEK", "Number"),
@@ -331,7 +331,7 @@ const char* SC_OPCODE_GET_DAY_OF_WEEK_ARY[] =
};
// -=*# Resource for function YEAR #*=-
-const char* SC_OPCODE_GET_YEAR_ARY[] =
+const TranslateId SC_OPCODE_GET_YEAR_ARY[] =
{
NC_("SC_OPCODE_GET_YEAR", "Returns the year of a date value as an integer."),
NC_("SC_OPCODE_GET_YEAR", "Number"),
@@ -339,7 +339,7 @@ const char* SC_OPCODE_GET_YEAR_ARY[] =
};
// -=*# Resource for function DAYS #*=-
-const char* SC_OPCODE_GET_DIFF_DATE_ARY[] =
+const TranslateId SC_OPCODE_GET_DIFF_DATE_ARY[] =
{
NC_("SC_OPCODE_GET_DIFF_DATE", "Calculates the number of days between two dates."),
NC_("SC_OPCODE_GET_DIFF_DATE", "Date 2"),
@@ -349,7 +349,7 @@ const char* SC_OPCODE_GET_DIFF_DATE_ARY[] =
};
// -=*# Resource for function DATEDIF #*=-
-const char* SC_OPCODE_GET_DATEDIF_ARY[] =
+const TranslateId SC_OPCODE_GET_DATEDIF_ARY[] =
{
NC_("SC_OPCODE_GET_DATEDIF", "Returns the number of whole days, months or years between 'start date' and 'end date'."),
NC_("SC_OPCODE_GET_DATEDIF", "Start date"),
@@ -361,7 +361,7 @@ const char* SC_OPCODE_GET_DATEDIF_ARY[] =
};
// -=*# Resource for function WEEKNUM #*=-
-const char* SC_OPCODE_WEEK_ARY[] =
+const TranslateId SC_OPCODE_WEEK_ARY[] =
{
NC_("SC_OPCODE_WEEK", "Calculates the calendar week corresponding to the given date."),
NC_("SC_OPCODE_WEEK", "Number"),
@@ -371,14 +371,14 @@ const char* SC_OPCODE_WEEK_ARY[] =
};
// -=*# Resource for function ISOWEEKNUM #*=-
-const char* SC_OPCODE_ISOWEEKNUM_ARY[] =
+const TranslateId SC_OPCODE_ISOWEEKNUM_ARY[] =
{
NC_("SC_OPCODE_ISOWEEKNUM", "Calculates the ISO 8601 calendar week for the given date."),
NC_("SC_OPCODE_ISOWEEKNUM", "Number"),
NC_("SC_OPCODE_ISOWEEKNUM", "The internal number of the date.")
};
-const char* SC_OPCODE_WEEKNUM_OOO_ARY[] =
+const TranslateId SC_OPCODE_WEEKNUM_OOO_ARY[] =
{
NC_("SC_OPCODE_WEEKNUM_OOO", "Calculates the calendar week corresponding to the given date.\nThis function only provides interoperability with %PRODUCTNAME 5.0 and earlier and OpenOffice.org."),
NC_("SC_OPCODE_WEEKNUM_OOO", "Number"),
@@ -388,7 +388,7 @@ const char* SC_OPCODE_WEEKNUM_OOO_ARY[] =
};
// -=*# Resource for function EASTERSUNDAY #*=-
-const char* SC_OPCODE_EASTERSUNDAY_ARY[] =
+const TranslateId SC_OPCODE_EASTERSUNDAY_ARY[] =
{
NC_("SC_OPCODE_EASTERSUNDAY", "Calculates the date of Easter Sunday in a given year."),
NC_("SC_OPCODE_EASTERSUNDAY", "Year"),
@@ -396,7 +396,7 @@ const char* SC_OPCODE_EASTERSUNDAY_ARY[] =
};
// -=*# Resource for function PV #*=-
-const char* SC_OPCODE_PV_ARY[] =
+const TranslateId SC_OPCODE_PV_ARY[] =
{
NC_("SC_OPCODE_PV", "Present value. Calculates the present value of an investment."),
NC_("SC_OPCODE_PV", "Rate"),
@@ -412,7 +412,7 @@ const char* SC_OPCODE_PV_ARY[] =
};
// -=*# Resource for function FV #*=-
-const char* SC_OPCODE_FV_ARY[] =
+const TranslateId SC_OPCODE_FV_ARY[] =
{
NC_("SC_OPCODE_FV", "Future value. Returns the future value of an investment based on regular payments and a constant interest rate."),
NC_("SC_OPCODE_FV", "Rate"),
@@ -428,7 +428,7 @@ const char* SC_OPCODE_FV_ARY[] =
};
// -=*# Resource for function NPER #*=-
-const char* SC_OPCODE_NPER_ARY[] =
+const TranslateId SC_OPCODE_NPER_ARY[] =
{
NC_("SC_OPCODE_NPER", "Payment period. Calculates the number of payment periods for an investment based on regular payments and a constant interest rate."),
NC_("SC_OPCODE_NPER", "Rate"),
@@ -444,7 +444,7 @@ const char* SC_OPCODE_NPER_ARY[] =
};
// -=*# Resource for function PMT #*=-
-const char* SC_OPCODE_PMT_ARY[] =
+const TranslateId SC_OPCODE_PMT_ARY[] =
{
NC_("SC_OPCODE_PMT", "Regular payments. Returns the periodic payment of an annuity, based on regular payments and a fixed periodic interest rate."),
NC_("SC_OPCODE_PMT", "Rate"),
@@ -460,7 +460,7 @@ const char* SC_OPCODE_PMT_ARY[] =
};
// -=*# Resource for function RATE #*=-
-const char* SC_OPCODE_RATE_ARY[] =
+const TranslateId SC_OPCODE_RATE_ARY[] =
{
NC_("SC_OPCODE_RATE", "Calculates the constant interest rate of an investment with regular payments."),
NC_("SC_OPCODE_RATE", "NPER"),
@@ -478,7 +478,7 @@ const char* SC_OPCODE_RATE_ARY[] =
};
// -=*# Resource for function IPMT #*=-
-const char* SC_OPCODE_IPMT_ARY[] =
+const TranslateId SC_OPCODE_IPMT_ARY[] =
{
NC_("SC_OPCODE_IPMT", "Compounded interest. Calculates the interest payment on the principal for an investment with regular payments and a constant interest rate for a given period."),
NC_("SC_OPCODE_IPMT", "Rate"),
@@ -496,7 +496,7 @@ const char* SC_OPCODE_IPMT_ARY[] =
};
// -=*# Resource for function PPMT #*=-
-const char* SC_OPCODE_PPMT_ARY[] =
+const TranslateId SC_OPCODE_PPMT_ARY[] =
{
NC_("SC_OPCODE_PPMT", "Repayment. Calculates the repayment amount for a period for an investment whereby the payments are at regular intervals and the interest rate constant."),
NC_("SC_OPCODE_PPMT", "Rate"),
@@ -514,7 +514,7 @@ const char* SC_OPCODE_PPMT_ARY[] =
};
// -=*# Resource for function CUMPRINC #*=-
-const char* SC_OPCODE_CUM_PRINC_ARY[] =
+const TranslateId SC_OPCODE_CUM_PRINC_ARY[] =
{
NC_("SC_OPCODE_CUM_PRINC", "Cumulative capital. Calculates the total amount of the repayment share in a period for an investment with constant interest rate."),
NC_("SC_OPCODE_CUM_PRINC", "Rate"),
@@ -532,7 +532,7 @@ const char* SC_OPCODE_CUM_PRINC_ARY[] =
};
// -=*# Resource for function CUMIPMT #*=-
-const char* SC_OPCODE_CUM_IPMT_ARY[] =
+const TranslateId SC_OPCODE_CUM_IPMT_ARY[] =
{
NC_("SC_OPCODE_CUM_IPMT", "Cumulative compounded interest. Calculates the total amount of the interest share in a period for an investment with a constant interest rate."),
NC_("SC_OPCODE_CUM_IPMT", "Rate"),
@@ -550,7 +550,7 @@ const char* SC_OPCODE_CUM_IPMT_ARY[] =
};
// -=*# Resource for function SYD #*=-
-const char* SC_OPCODE_SYD_ARY[] =
+const TranslateId SC_OPCODE_SYD_ARY[] =
{
NC_("SC_OPCODE_SYD", "Calculates the arithmetically declining value of an asset (depreciation) for a specified period."),
NC_("SC_OPCODE_SYD", "Cost"),
@@ -564,7 +564,7 @@ const char* SC_OPCODE_SYD_ARY[] =
};
// -=*# Resource for function SLN #*=-
-const char* SC_OPCODE_SLN_ARY[] =
+const TranslateId SC_OPCODE_SLN_ARY[] =
{
NC_("SC_OPCODE_SLN", "Calculates the linear depreciation per period."),
NC_("SC_OPCODE_SLN", "Cost"),
@@ -576,7 +576,7 @@ const char* SC_OPCODE_SLN_ARY[] =
};
// -=*# Resource for function DDB #*=-
-const char* SC_OPCODE_DDB_ARY[] =
+const TranslateId SC_OPCODE_DDB_ARY[] =
{
NC_("SC_OPCODE_DDB", "Calculates the depreciation of an asset for a specific period using the double-declining balance method or declining balance factor."),
NC_("SC_OPCODE_DDB", "Cost"),
@@ -592,7 +592,7 @@ const char* SC_OPCODE_DDB_ARY[] =
};
// -=*# Resource for function DB #*=-
-const char* SC_OPCODE_DB_ARY[] =
+const TranslateId SC_OPCODE_DB_ARY[] =
{
NC_("SC_OPCODE_DB", "Returns the real depreciation of an asset for a specified period using the fixed-declining balance method."),
NC_("SC_OPCODE_DB", "Cost"),
@@ -608,7 +608,7 @@ const char* SC_OPCODE_DB_ARY[] =
};
// -=*# Resource for function VDB #*=-
-const char* SC_OPCODE_VBD_ARY[] =
+const TranslateId SC_OPCODE_VBD_ARY[] =
{
NC_("SC_OPCODE_VBD", "Variable declining balance. Returns the declining balance depreciation for a particular period."),
NC_("SC_OPCODE_VBD", "Cost"),
@@ -628,7 +628,7 @@ const char* SC_OPCODE_VBD_ARY[] =
};
// -=*# Resource for function EFFECT #*=-
-const char* SC_OPCODE_EFFECT_ARY[] =
+const TranslateId SC_OPCODE_EFFECT_ARY[] =
{
NC_("SC_OPCODE_EFFECT", "Calculates the annual net interest rate for a nominal interest rate."),
NC_("SC_OPCODE_EFFECT", "NOM"),
@@ -638,7 +638,7 @@ const char* SC_OPCODE_EFFECT_ARY[] =
};
// -=*# Resource for function NOMINAL #*=-
-const char* SC_OPCODE_NOMINAL_ARY[] =
+const TranslateId SC_OPCODE_NOMINAL_ARY[] =
{
NC_("SC_OPCODE_NOMINAL", "Calculates the yearly nominal interest rate as an effective interest rate."),
NC_("SC_OPCODE_NOMINAL", "Effective rate"),
@@ -648,7 +648,7 @@ const char* SC_OPCODE_NOMINAL_ARY[] =
};
// -=*# Resource for function NPV #*=-
-const char* SC_OPCODE_NPV_ARY[] =
+const TranslateId SC_OPCODE_NPV_ARY[] =
{
NC_("SC_OPCODE_NPV", "Net present value. Calculates the net present value of an investment based on a series of periodic payments and a discount rate."),
NC_("SC_OPCODE_NPV", "Rate"),
@@ -658,7 +658,7 @@ const char* SC_OPCODE_NPV_ARY[] =
};
// -=*# Resource for function IRR #*=-
-const char* SC_OPCODE_IRR_ARY[] =
+const TranslateId SC_OPCODE_IRR_ARY[] =
{
NC_("SC_OPCODE_IRR", "Returns the actuarial rate of interest of an investment excluding costs or profits."),
NC_("SC_OPCODE_IRR", "Values"),
@@ -668,7 +668,7 @@ const char* SC_OPCODE_IRR_ARY[] =
};
// -=*# Resource for function MIRR #*=-
-const char* SC_OPCODE_MIRR_ARY[] =
+const TranslateId SC_OPCODE_MIRR_ARY[] =
{
NC_("SC_OPCODE_MIRR", "Returns the modified internal rate of return for a series of investments."),
NC_("SC_OPCODE_MIRR", "Values"),
@@ -680,7 +680,7 @@ const char* SC_OPCODE_MIRR_ARY[] =
};
// -=*# Resource for function ISPMT #*=-
-const char* SC_OPCODE_ISPMT_ARY[] =
+const TranslateId SC_OPCODE_ISPMT_ARY[] =
{
NC_("SC_OPCODE_ISPMT", "Returns the amount of interest for constant amortization rates."),
NC_("SC_OPCODE_ISPMT", "Rate"),
@@ -694,7 +694,7 @@ const char* SC_OPCODE_ISPMT_ARY[] =
};
// -=*# Resource for function PDURATION #*=-
-const char* SC_OPCODE_PDURATION_ARY[] =
+const TranslateId SC_OPCODE_PDURATION_ARY[] =
{
NC_("SC_OPCODE_PDURATION", "Duration. Calculates the number of periods required by an investment to attain the desired value."),
NC_("SC_OPCODE_PDURATION", "Rate"),
@@ -706,7 +706,7 @@ const char* SC_OPCODE_PDURATION_ARY[] =
};
// -=*# Resource for function RRI #*=-
-const char* SC_OPCODE_RRI_ARY[] =
+const TranslateId SC_OPCODE_RRI_ARY[] =
{
NC_("SC_OPCODE_RRI", "Interest. Calculates the interest rate which represents the rate of return from an investment."),
NC_("SC_OPCODE_RRI", "Periods"),
@@ -718,7 +718,7 @@ const char* SC_OPCODE_RRI_ARY[] =
};
// -=*# Resource for function ISREF #*=-
-const char* SC_OPCODE_IS_REF_ARY[] =
+const TranslateId SC_OPCODE_IS_REF_ARY[] =
{
NC_("SC_OPCODE_IS_REF", "Returns TRUE if value is a reference."),
NC_("SC_OPCODE_IS_REF", "Value"),
@@ -726,7 +726,7 @@ const char* SC_OPCODE_IS_REF_ARY[] =
};
// -=*# Resource for function ISERR #*=-
-const char* SC_OPCODE_IS_ERR_ARY[] =
+const TranslateId SC_OPCODE_IS_ERR_ARY[] =
{
NC_("SC_OPCODE_IS_ERR", "Returns TRUE if the value is an error value not equal to #N/A."),
NC_("SC_OPCODE_IS_ERR", "Value"),
@@ -734,7 +734,7 @@ const char* SC_OPCODE_IS_ERR_ARY[] =
};
// -=*# Resource for function ISERROR #*=-
-const char* SC_OPCODE_IS_ERROR_ARY[] =
+const TranslateId SC_OPCODE_IS_ERROR_ARY[] =
{
NC_("SC_OPCODE_IS_ERROR", "Returns TRUE if the value is an error value."),
NC_("SC_OPCODE_IS_ERROR", "Value"),
@@ -742,7 +742,7 @@ const char* SC_OPCODE_IS_ERROR_ARY[] =
};
// -=*# Resource for function ISBLANK #*=-
-const char* SC_OPCODE_IS_EMPTY_ARY[] =
+const TranslateId SC_OPCODE_IS_EMPTY_ARY[] =
{
NC_("SC_OPCODE_IS_EMPTY", "Returns TRUE if value refers to an empty cell."),
NC_("SC_OPCODE_IS_EMPTY", "Value"),
@@ -750,7 +750,7 @@ const char* SC_OPCODE_IS_EMPTY_ARY[] =
};
// -=*# Resource for function ISLOGICAL #*=-
-const char* SC_OPCODE_IS_LOGICAL_ARY[] =
+const TranslateId SC_OPCODE_IS_LOGICAL_ARY[] =
{
NC_("SC_OPCODE_IS_LOGICAL", "Returns TRUE if the value carries a logical number format."),
NC_("SC_OPCODE_IS_LOGICAL", "Value"),
@@ -758,7 +758,7 @@ const char* SC_OPCODE_IS_LOGICAL_ARY[] =
};
// -=*# Resource for function ISNA #*=-
-const char* SC_OPCODE_IS_NV_ARY[] =
+const TranslateId SC_OPCODE_IS_NV_ARY[] =
{
NC_("SC_OPCODE_IS_NV", "Returns TRUE if value equals #N/A."),
NC_("SC_OPCODE_IS_NV", "Value"),
@@ -766,7 +766,7 @@ const char* SC_OPCODE_IS_NV_ARY[] =
};
// -=*# Resource for function ISNONTEXT #*=-
-const char* SC_OPCODE_IS_NON_STRING_ARY[] =
+const TranslateId SC_OPCODE_IS_NON_STRING_ARY[] =
{
NC_("SC_OPCODE_IS_NON_STRING", "Returns TRUE if the value is not text."),
NC_("SC_OPCODE_IS_NON_STRING", "Value"),
@@ -774,7 +774,7 @@ const char* SC_OPCODE_IS_NON_STRING_ARY[] =
};
// -=*# Resource for function ISTEXT #*=-
-const char* SC_OPCODE_IS_STRING_ARY[] =
+const TranslateId SC_OPCODE_IS_STRING_ARY[] =
{
NC_("SC_OPCODE_IS_STRING", "Returns TRUE if value is text."),
NC_("SC_OPCODE_IS_STRING", "Value"),
@@ -782,7 +782,7 @@ const char* SC_OPCODE_IS_STRING_ARY[] =
};
// -=*# Resource for function ISNUMBER #*=-
-const char* SC_OPCODE_IS_VALUE_ARY[] =
+const TranslateId SC_OPCODE_IS_VALUE_ARY[] =
{
NC_("SC_OPCODE_IS_VALUE", "Returns TRUE if value is a number."),
NC_("SC_OPCODE_IS_VALUE", "Value"),
@@ -790,7 +790,7 @@ const char* SC_OPCODE_IS_VALUE_ARY[] =
};
// -=*# Resource for function ISFORMULA #*=-
-const char* SC_OPCODE_IS_FORMULA_ARY[] =
+const TranslateId SC_OPCODE_IS_FORMULA_ARY[] =
{
NC_("SC_OPCODE_IS_FORMULA", "Returns TRUE if the cell is a formula cell."),
NC_("SC_OPCODE_IS_FORMULA", "Reference"),
@@ -798,7 +798,7 @@ const char* SC_OPCODE_IS_FORMULA_ARY[] =
};
// -=*# Resource for function FORMULA #*=-
-const char* SC_OPCODE_FORMULA_ARY[] =
+const TranslateId SC_OPCODE_FORMULA_ARY[] =
{
NC_("SC_OPCODE_FORMULA", "Returns the formula of a formula cell."),
NC_("SC_OPCODE_FORMULA", "Reference"),
@@ -806,7 +806,7 @@ const char* SC_OPCODE_FORMULA_ARY[] =
};
// -=*# Resource for function N #*=-
-const char* SC_OPCODE_N_ARY[] =
+const TranslateId SC_OPCODE_N_ARY[] =
{
NC_("SC_OPCODE_N", "Converts a value to a number."),
NC_("SC_OPCODE_N", "Value"),
@@ -814,13 +814,13 @@ const char* SC_OPCODE_N_ARY[] =
};
// -=*# Resource for function NA #*=-
-const char* SC_OPCODE_NO_VALUE_ARY[] =
+const TranslateId SC_OPCODE_NO_VALUE_ARY[] =
{
NC_("SC_OPCODE_NO_VALUE", "Not available. Returns the error value #N/A.")
};
// -=*# Resource for function TYPE #*=-
-const char* SC_OPCODE_TYPE_ARY[] =
+const TranslateId SC_OPCODE_TYPE_ARY[] =
{
NC_("SC_OPCODE_TYPE", "Returns the data type of a value (1 = number, 2 = text, 4 = Boolean value, 8 = formula, 16 = error value, 64 = array)."),
NC_("SC_OPCODE_TYPE", "Value"),
@@ -828,7 +828,7 @@ const char* SC_OPCODE_TYPE_ARY[] =
};
// -=*# Resource for function CELL #*=-
-const char* SC_OPCODE_CELL_ARY[] =
+const TranslateId SC_OPCODE_CELL_ARY[] =
{
NC_("SC_OPCODE_CELL", "Determines information about address, formatting or contents of a cell."),
NC_("SC_OPCODE_CELL", "Info type"),
@@ -838,19 +838,19 @@ const char* SC_OPCODE_CELL_ARY[] =
};
// -=*# Resource for function CURRENT #*=-
-const char* SC_OPCODE_CURRENT_ARY[] =
+const TranslateId SC_OPCODE_CURRENT_ARY[] =
{
NC_("SC_OPCODE_CURRENT", "Calculates the current value of the formula at the present location.")
};
// -=*# Resource for function FALSE #*=-
-const char* SC_OPCODE_FALSE_ARY[] =
+const TranslateId SC_OPCODE_FALSE_ARY[] =
{
NC_("SC_OPCODE_FALSE", "Defines the logical value as FALSE.")
};
// -=*# Resource for function NOT #*=-
-const char* SC_OPCODE_NOT_ARY[] =
+const TranslateId SC_OPCODE_NOT_ARY[] =
{
NC_("SC_OPCODE_NOT", "Reverses the value of the argument."),
NC_("SC_OPCODE_NOT", "Logical value"),
@@ -858,13 +858,13 @@ const char* SC_OPCODE_NOT_ARY[] =
};
// -=*# Resource for function TRUE #*=-
-const char* SC_OPCODE_TRUE_ARY[] =
+const TranslateId SC_OPCODE_TRUE_ARY[] =
{
NC_("SC_OPCODE_TRUE", "Returns the logical value TRUE.")
};
// -=*# Resource for function IF #*=-
-const char* SC_OPCODE_IF_ARY[] =
+const TranslateId SC_OPCODE_IF_ARY[] =
{
NC_("SC_OPCODE_IF", "Specifies a logical test to be performed."),
NC_("SC_OPCODE_IF", "Test"),
@@ -876,7 +876,7 @@ const char* SC_OPCODE_IF_ARY[] =
};
// -=*# Resource for function IFERROR #*=-
-const char* SC_OPCODE_IF_ERROR_ARY[] =
+const TranslateId SC_OPCODE_IF_ERROR_ARY[] =
{
NC_("SC_OPCODE_IF_ERROR", "Returns value if not an error value, else alternative."),
NC_("SC_OPCODE_IF_ERROR", "Value"),
@@ -886,7 +886,7 @@ const char* SC_OPCODE_IF_ERROR_ARY[] =
};
// -=*# Resource for function IFNA #*=-
-const char* SC_OPCODE_IF_NA_ARY[] =
+const TranslateId SC_OPCODE_IF_NA_ARY[] =
{
NC_("SC_OPCODE_IF_NA", "Returns value if not a #N/A error, else alternative."),
NC_("SC_OPCODE_IF_NA", "Value"),
@@ -896,7 +896,7 @@ const char* SC_OPCODE_IF_NA_ARY[] =
};
// -=*# Resource for function OR #*=-
-const char* SC_OPCODE_OR_ARY[] =
+const TranslateId SC_OPCODE_OR_ARY[] =
{
NC_("SC_OPCODE_OR", "Returns TRUE if an argument is TRUE."),
NC_("SC_OPCODE_OR", "Logical value "),
@@ -904,7 +904,7 @@ const char* SC_OPCODE_OR_ARY[] =
};
// -=*# Resource for function XOR #*=-
-const char* SC_OPCODE_XOR_ARY[] =
+const TranslateId SC_OPCODE_XOR_ARY[] =
{
NC_("SC_OPCODE_XOR", "Returns TRUE if an odd number of arguments evaluates to TRUE."),
NC_("SC_OPCODE_XOR", "Logical value "),
@@ -912,7 +912,7 @@ const char* SC_OPCODE_XOR_ARY[] =
};
// -=*# Resource for function AND #*=-
-const char* SC_OPCODE_AND_ARY[] =
+const TranslateId SC_OPCODE_AND_ARY[] =
{
NC_("SC_OPCODE_AND", "Returns TRUE if all arguments are TRUE."),
NC_("SC_OPCODE_AND", "Logical value "),
@@ -920,7 +920,7 @@ const char* SC_OPCODE_AND_ARY[] =
};
// -=*# Resource for function ABS #*=-
-const char* SC_OPCODE_ABS_ARY[] =
+const TranslateId SC_OPCODE_ABS_ARY[] =
{
NC_("SC_OPCODE_ABS", "Absolute value of a number."),
NC_("SC_OPCODE_ABS", "Number"),
@@ -928,7 +928,7 @@ const char* SC_OPCODE_ABS_ARY[] =
};
// -=*# Resource for function POWER #*=-
-const char* SC_OPCODE_POWER_ARY[] =
+const TranslateId SC_OPCODE_POWER_ARY[] =
{
NC_("SC_OPCODE_POWER", "Returns a^b, base a raised to the power of exponent b."),
NC_("SC_OPCODE_POWER", "Base"),
@@ -938,7 +938,7 @@ const char* SC_OPCODE_POWER_ARY[] =
};
// -=*# Resource for function COUNTBLANK #*=-
-const char* SC_OPCODE_COUNT_EMPTY_CELLS_ARY[] =
+const TranslateId SC_OPCODE_COUNT_EMPTY_CELLS_ARY[] =
{
NC_("SC_OPCODE_COUNT_EMPTY_CELLS", "Counts the blank cells in a specified range."),
NC_("SC_OPCODE_COUNT_EMPTY_CELLS", "Range"),
@@ -946,13 +946,13 @@ const char* SC_OPCODE_COUNT_EMPTY_CELLS_ARY[] =
};
// -=*# Resource for function PI #*=-
-const char* SC_OPCODE_PI_ARY[] =
+const TranslateId SC_OPCODE_PI_ARY[] =
{
NC_("SC_OPCODE_PI", "Returns the value of the number Pi.")
};
// -=*# Resource for function SUM #*=-
-const char* SC_OPCODE_SUM_ARY[] =
+const TranslateId SC_OPCODE_SUM_ARY[] =
{
NC_("SC_OPCODE_SUM", "Returns the sum of all arguments."),
NC_("SC_OPCODE_SUM", "Number "),
@@ -960,7 +960,7 @@ const char* SC_OPCODE_SUM_ARY[] =
};
// -=*# Resource for function SUMSQ #*=-
-const char* SC_OPCODE_SUM_SQ_ARY[] =
+const TranslateId SC_OPCODE_SUM_SQ_ARY[] =
{
NC_("SC_OPCODE_SUM_SQ", "Returns the sum of the squares of the arguments."),
NC_("SC_OPCODE_SUM_SQ", "Number "),
@@ -968,7 +968,7 @@ const char* SC_OPCODE_SUM_SQ_ARY[] =
};
// -=*# Resource for function PRODUCT #*=-
-const char* SC_OPCODE_PRODUCT_ARY[] =
+const TranslateId SC_OPCODE_PRODUCT_ARY[] =
{
NC_("SC_OPCODE_PRODUCT", "Multiplies the arguments."),
NC_("SC_OPCODE_PRODUCT", "Number "),
@@ -976,7 +976,7 @@ const char* SC_OPCODE_PRODUCT_ARY[] =
};
// -=*# Resource for function SUMIF #*=-
-const char* SC_OPCODE_SUM_IF_ARY[] =
+const TranslateId SC_OPCODE_SUM_IF_ARY[] =
{
NC_("SC_OPCODE_SUM_IF", "Totals the arguments that meet the condition."),
NC_("SC_OPCODE_SUM_IF", "Range"),
@@ -988,7 +988,7 @@ const char* SC_OPCODE_SUM_IF_ARY[] =
};
// -=*# Resource for function AVERAGEIF #*=-
-const char* SC_OPCODE_AVERAGE_IF_ARY[] =
+const TranslateId SC_OPCODE_AVERAGE_IF_ARY[] =
{
NC_("SC_OPCODE_AVERAGE_IF", "Averages the arguments that meet the conditions."),
NC_("SC_OPCODE_AVERAGE_IF", "Range"),
@@ -999,7 +999,7 @@ const char* SC_OPCODE_AVERAGE_IF_ARY[] =
NC_("SC_OPCODE_AVERAGE_IF", "The range from which the values are to be averaged.")
};
-const char* SC_OPCODE_SUM_IFS_ARY[] =
+const TranslateId SC_OPCODE_SUM_IFS_ARY[] =
{
NC_("SC_OPCODE_SUM_IFS", "Totals the values of cells in a range that meet multiple criteria in multiple ranges."),
NC_("SC_OPCODE_SUM_IFS", "Sum range"),
@@ -1011,7 +1011,7 @@ const char* SC_OPCODE_SUM_IFS_ARY[] =
};
// -=*# Resource for function AVERAGEIFS #*=-
-const char* SC_OPCODE_AVERAGE_IFS_ARY[] =
+const TranslateId SC_OPCODE_AVERAGE_IFS_ARY[] =
{
NC_("SC_OPCODE_AVERAGE_IFS", "Averages the value of the cells that meet multiple criteria in multiple ranges."),
NC_("SC_OPCODE_AVERAGE_IFS", "Average range"),
@@ -1023,7 +1023,7 @@ const char* SC_OPCODE_AVERAGE_IFS_ARY[] =
};
// -=*# Resource for function COUNTIFS #*=-
-const char* SC_OPCODE_COUNT_IFS_ARY[] =
+const TranslateId SC_OPCODE_COUNT_IFS_ARY[] =
{
NC_("SC_OPCODE_COUNT_IFS", "Counts the cells that meet multiple criteria in multiple ranges."),
NC_("SC_OPCODE_COUNT_IFS", "Range "),
@@ -1033,7 +1033,7 @@ const char* SC_OPCODE_COUNT_IFS_ARY[] =
};
// -=*# Resource for function COUNTIF #*=-
-const char* SC_OPCODE_COUNT_IF_ARY[] =
+const TranslateId SC_OPCODE_COUNT_IF_ARY[] =
{
NC_("SC_OPCODE_COUNT_IF", "Counts the arguments which meet the set conditions."),
NC_("SC_OPCODE_COUNT_IF", "Range"),
@@ -1043,7 +1043,7 @@ const char* SC_OPCODE_COUNT_IF_ARY[] =
};
// -=*# Resource for function SQRT #*=-
-const char* SC_OPCODE_SQRT_ARY[] =
+const TranslateId SC_OPCODE_SQRT_ARY[] =
{
NC_("SC_OPCODE_SQRT", "Returns the square root of a number."),
NC_("SC_OPCODE_SQRT", "Number"),
@@ -1051,13 +1051,13 @@ const char* SC_OPCODE_SQRT_ARY[] =
};
// -=*# Resource for function RAND #*=-
-const char* SC_OPCODE_RANDOM_ARY[] =
+const TranslateId SC_OPCODE_RANDOM_ARY[] =
{
NC_("SC_OPCODE_RANDOM", "Returns a random number between 0 and 1.")
};
// -=*# Resource for function ISEVEN #*=-
-const char* SC_OPCODE_IS_EVEN_ARY[] =
+const TranslateId SC_OPCODE_IS_EVEN_ARY[] =
{
NC_("SC_OPCODE_IS_EVEN", "Returns TRUE if value is an even integer."),
NC_("SC_OPCODE_IS_EVEN", "Value"),
@@ -1065,7 +1065,7 @@ const char* SC_OPCODE_IS_EVEN_ARY[] =
};
// -=*# Resource for function ISODD #*=-
-const char* SC_OPCODE_IS_ODD_ARY[] =
+const TranslateId SC_OPCODE_IS_ODD_ARY[] =
{
NC_("SC_OPCODE_IS_ODD", "Returns TRUE if value is an odd integer."),
NC_("SC_OPCODE_IS_ODD", "Value"),
@@ -1073,7 +1073,7 @@ const char* SC_OPCODE_IS_ODD_ARY[] =
};
// -=*# Resource for function COMBIN #*=-
-const char* SC_OPCODE_COMBIN_ARY[] =
+const TranslateId SC_OPCODE_COMBIN_ARY[] =
{
NC_("SC_OPCODE_COMBIN", "Calculates the number of combinations for elements without repetition."),
NC_("SC_OPCODE_COMBIN", "Number 1"),
@@ -1083,7 +1083,7 @@ const char* SC_OPCODE_COMBIN_ARY[] =
};
// -=*# Resource for function COMBINA #*=-
-const char* SC_OPCODE_COMBIN_A_ARY[] =
+const TranslateId SC_OPCODE_COMBIN_A_ARY[] =
{
NC_("SC_OPCODE_COMBIN_A", "Calculates the number of combinations of elements including repetition."),
NC_("SC_OPCODE_COMBIN_A", "Number 1"),
@@ -1093,7 +1093,7 @@ const char* SC_OPCODE_COMBIN_A_ARY[] =
};
// -=*# Resource for function ARCCOS #*=-
-const char* SC_OPCODE_ARC_COS_ARY[] =
+const TranslateId SC_OPCODE_ARC_COS_ARY[] =
{
NC_("SC_OPCODE_ARC_COS", "Returns the arccosine of a number."),
NC_("SC_OPCODE_ARC_COS", "Number"),
@@ -1101,7 +1101,7 @@ const char* SC_OPCODE_ARC_COS_ARY[] =
};
// -=*# Resource for function ARCSIN #*=-
-const char* SC_OPCODE_ARC_SIN_ARY[] =
+const TranslateId SC_OPCODE_ARC_SIN_ARY[] =
{
NC_("SC_OPCODE_ARC_SIN", "Returns the arcsine of a number."),
NC_("SC_OPCODE_ARC_SIN", "Number"),
@@ -1109,7 +1109,7 @@ const char* SC_OPCODE_ARC_SIN_ARY[] =
};
// -=*# Resource for function ARCCOSHYP #*=-
-const char* SC_OPCODE_ARC_COS_HYP_ARY[] =
+const TranslateId SC_OPCODE_ARC_COS_HYP_ARY[] =
{
NC_("SC_OPCODE_ARC_COS_HYP", "Returns the inverse hyperbolic cosine of a number."),
NC_("SC_OPCODE_ARC_COS_HYP", "Number"),
@@ -1117,7 +1117,7 @@ const char* SC_OPCODE_ARC_COS_HYP_ARY[] =
};
// -=*# Resource for function ARCSINHYP #*=-
-const char* SC_OPCODE_ARC_SIN_HYP_ARY[] =
+const TranslateId SC_OPCODE_ARC_SIN_HYP_ARY[] =
{
NC_("SC_OPCODE_ARC_SIN_HYP", "Returns the inverse hyperbolic sine of a number."),
NC_("SC_OPCODE_ARC_SIN_HYP", "Number"),
@@ -1125,7 +1125,7 @@ const char* SC_OPCODE_ARC_SIN_HYP_ARY[] =
};
// -=*# Resource for function ARCCOT #*=-
-const char* SC_OPCODE_ARC_COT_ARY[] =
+const TranslateId SC_OPCODE_ARC_COT_ARY[] =
{
NC_("SC_OPCODE_ARC_COT", "Returns the inverse cotangent of a number."),
NC_("SC_OPCODE_ARC_COT", "Number"),
@@ -1133,7 +1133,7 @@ const char* SC_OPCODE_ARC_COT_ARY[] =
};
// -=*# Resource for function ARCTAN #*=-
-const char* SC_OPCODE_ARC_TAN_ARY[] =
+const TranslateId SC_OPCODE_ARC_TAN_ARY[] =
{
NC_("SC_OPCODE_ARC_TAN", "Returns the arctangent of a number."),
NC_("SC_OPCODE_ARC_TAN", "Number"),
@@ -1141,7 +1141,7 @@ const char* SC_OPCODE_ARC_TAN_ARY[] =
};
// -=*# Resource for function ARCCOTHYP #*=-
-const char* SC_OPCODE_ARC_COT_HYP_ARY[] =
+const TranslateId SC_OPCODE_ARC_COT_HYP_ARY[] =
{
NC_("SC_OPCODE_ARC_COT_HYP", "Returns the inverse hyperbolic cotangent of a number."),
NC_("SC_OPCODE_ARC_COT_HYP", "Number"),
@@ -1149,7 +1149,7 @@ const char* SC_OPCODE_ARC_COT_HYP_ARY[] =
};
// -=*# Resource for function ARCTANHYP #*=-
-const char* SC_OPCODE_ARC_TAN_HYP_ARY[] =
+const TranslateId SC_OPCODE_ARC_TAN_HYP_ARY[] =
{
NC_("SC_OPCODE_ARC_TAN_HYP", "Returns the inverse hyperbolic tangent of a number."),
NC_("SC_OPCODE_ARC_TAN_HYP", "Number"),
@@ -1157,7 +1157,7 @@ const char* SC_OPCODE_ARC_TAN_HYP_ARY[] =
};
// -=*# Resource for function COS #*=-
-const char* SC_OPCODE_COS_ARY[] =
+const TranslateId SC_OPCODE_COS_ARY[] =
{
NC_("SC_OPCODE_COS", "Returns the cosine of a number."),
NC_("SC_OPCODE_COS", "Number"),
@@ -1165,7 +1165,7 @@ const char* SC_OPCODE_COS_ARY[] =
};
// -=*# Resource for function SIN #*=-
-const char* SC_OPCODE_SIN_ARY[] =
+const TranslateId SC_OPCODE_SIN_ARY[] =
{
NC_("SC_OPCODE_SIN", "Returns the sine of a number."),
NC_("SC_OPCODE_SIN", "Number"),
@@ -1173,7 +1173,7 @@ const char* SC_OPCODE_SIN_ARY[] =
};
// -=*# Resource for function COT #*=-
-const char* SC_OPCODE_COT_ARY[] =
+const TranslateId SC_OPCODE_COT_ARY[] =
{
NC_("SC_OPCODE_COT", "Returns the cotangent of a number."),
NC_("SC_OPCODE_COT", "Number"),
@@ -1181,7 +1181,7 @@ const char* SC_OPCODE_COT_ARY[] =
};
// -=*# Resource for function TAN #*=-
-const char* SC_OPCODE_TAN_ARY[] =
+const TranslateId SC_OPCODE_TAN_ARY[] =
{
NC_("SC_OPCODE_TAN", "Returns the tangent of a number."),
NC_("SC_OPCODE_TAN", "Number"),
@@ -1189,7 +1189,7 @@ const char* SC_OPCODE_TAN_ARY[] =
};
// -=*# Resource for function COSHYP #*=-
-const char* SC_OPCODE_COS_HYP_ARY[] =
+const TranslateId SC_OPCODE_COS_HYP_ARY[] =
{
NC_("SC_OPCODE_COS_HYP", "Returns the hyperbolic cosine of a number."),
NC_("SC_OPCODE_COS_HYP", "Number"),
@@ -1197,7 +1197,7 @@ const char* SC_OPCODE_COS_HYP_ARY[] =
};
// -=*# Resource for function SINHYP #*=-
-const char* SC_OPCODE_SIN_HYP_ARY[] =
+const TranslateId SC_OPCODE_SIN_HYP_ARY[] =
{
NC_("SC_OPCODE_SIN_HYP", "Returns the hyperbolic sine of a number."),
NC_("SC_OPCODE_SIN_HYP", "Number"),
@@ -1205,7 +1205,7 @@ const char* SC_OPCODE_SIN_HYP_ARY[] =
};
// -=*# Resource for function COTHYP #*=-
-const char* SC_OPCODE_COT_HYP_ARY[] =
+const TranslateId SC_OPCODE_COT_HYP_ARY[] =
{
NC_("SC_OPCODE_COT_HYP", "Returns the hyperbolic cotangent of a number."),
NC_("SC_OPCODE_COT_HYP", "Number"),
@@ -1213,7 +1213,7 @@ const char* SC_OPCODE_COT_HYP_ARY[] =
};
// -=*# Resource for function TANHYP #*=-
-const char* SC_OPCODE_TAN_HYP_ARY[] =
+const TranslateId SC_OPCODE_TAN_HYP_ARY[] =
{
NC_("SC_OPCODE_TAN_HYP", "Returns the hyperbolic tangent of a number."),
NC_("SC_OPCODE_TAN_HYP", "Number"),
@@ -1221,7 +1221,7 @@ const char* SC_OPCODE_TAN_HYP_ARY[] =
};
// -=*# Resource for function ARCTAN2 #*=-
-const char* SC_OPCODE_ARC_TAN_2_ARY[] =
+const TranslateId SC_OPCODE_ARC_TAN_2_ARY[] =
{
NC_("SC_OPCODE_ARC_TAN_2", "Returns the arctangent for the specified coordinates."),
NC_("SC_OPCODE_ARC_TAN_2", "Number X"),
@@ -1231,7 +1231,7 @@ const char* SC_OPCODE_ARC_TAN_2_ARY[] =
};
// -=*# Resource for function CSC #*=-
-const char* SC_OPCODE_COSECANT_ARY[] =
+const TranslateId SC_OPCODE_COSECANT_ARY[] =
{
NC_("SC_OPCODE_COSECANT", "Return the cosecant of an angle. CSC(x)=1/SIN(x)"),
NC_("SC_OPCODE_COSECANT", "Angle"),
@@ -1239,7 +1239,7 @@ const char* SC_OPCODE_COSECANT_ARY[] =
};
// -=*# Resource for function SEC #*=-
-const char* SC_OPCODE_SECANT_ARY[] =
+const TranslateId SC_OPCODE_SECANT_ARY[] =
{
NC_("SC_OPCODE_SECANT", "Return the secant of an angle. SEC(x)=1/COS(x)"),
NC_("SC_OPCODE_SECANT", "Angle"),
@@ -1247,7 +1247,7 @@ const char* SC_OPCODE_SECANT_ARY[] =
};
// -=*# Resource for function CSCH #*=-
-const char* SC_OPCODE_COSECANT_HYP_ARY[] =
+const TranslateId SC_OPCODE_COSECANT_HYP_ARY[] =
{
NC_("SC_OPCODE_COSECANT_HYP", "Return the hyperbolic cosecant of a hyperbolic angle. CSCH(x)=1/SINH(x)"),
NC_("SC_OPCODE_COSECANT_HYP", "Angle"),
@@ -1255,7 +1255,7 @@ const char* SC_OPCODE_COSECANT_HYP_ARY[] =
};
// -=*# Resource for function SECH #*=-
-const char* SC_OPCODE_SECANT_HYP_ARY[] =
+const TranslateId SC_OPCODE_SECANT_HYP_ARY[] =
{
NC_("SC_OPCODE_SECANT_HYP", "Return the hyperbolic secant of a hyperbolic angle. SECH(x)=1/COSH(x)"),
NC_("SC_OPCODE_SECANT_HYP", "Angle"),
@@ -1263,7 +1263,7 @@ const char* SC_OPCODE_SECANT_HYP_ARY[] =
};
// -=*# Resource for function DEG #*=-
-const char* SC_OPCODE_DEG_ARY[] =
+const TranslateId SC_OPCODE_DEG_ARY[] =
{
NC_("SC_OPCODE_DEG", "Converts a radian to degrees"),
NC_("SC_OPCODE_DEG", "Number"),
@@ -1271,7 +1271,7 @@ const char* SC_OPCODE_DEG_ARY[] =
};
// -=*# Resource for function RAD #*=-
-const char* SC_OPCODE_RAD_ARY[] =
+const TranslateId SC_OPCODE_RAD_ARY[] =
{
NC_("SC_OPCODE_RAD", "Converts degrees to radians"),
NC_("SC_OPCODE_RAD", "Number"),
@@ -1279,7 +1279,7 @@ const char* SC_OPCODE_RAD_ARY[] =
};
// -=*# Resource for function EXP #*=-
-const char* SC_OPCODE_EXP_ARY[] =
+const TranslateId SC_OPCODE_EXP_ARY[] =
{
NC_("SC_OPCODE_EXP", "Calculates the exponent for basis e."),
NC_("SC_OPCODE_EXP", "Number"),
@@ -1287,7 +1287,7 @@ const char* SC_OPCODE_EXP_ARY[] =
};
// -=*# Resource for function LOG #*=-
-const char* SC_OPCODE_LOG_ARY[] =
+const TranslateId SC_OPCODE_LOG_ARY[] =
{
NC_("SC_OPCODE_LOG", "Calculates the logarithm to any specified base."),
NC_("SC_OPCODE_LOG", "Number"),
@@ -1297,7 +1297,7 @@ const char* SC_OPCODE_LOG_ARY[] =
};
// -=*# Resource for function LN #*=-
-const char* SC_OPCODE_LN_ARY[] =
+const TranslateId SC_OPCODE_LN_ARY[] =
{
NC_("SC_OPCODE_LN", "Calculates the natural logarithm of a number."),
NC_("SC_OPCODE_LN", "Number"),
@@ -1305,7 +1305,7 @@ const char* SC_OPCODE_LN_ARY[] =
};
// -=*# Resource for function LOG10 #*=-
-const char* SC_OPCODE_LOG10_ARY[] =
+const TranslateId SC_OPCODE_LOG10_ARY[] =
{
NC_("SC_OPCODE_LOG10", "Calculates the base-10 logarithm of a number."),
NC_("SC_OPCODE_LOG10", "Number"),
@@ -1313,7 +1313,7 @@ const char* SC_OPCODE_LOG10_ARY[] =
};
// -=*# Resource for function FACT #*=-
-const char* SC_OPCODE_FACT_ARY[] =
+const TranslateId SC_OPCODE_FACT_ARY[] =
{
NC_("SC_OPCODE_FACT", "Calculates the factorial of a number."),
NC_("SC_OPCODE_FACT", "Number"),
@@ -1321,7 +1321,7 @@ const char* SC_OPCODE_FACT_ARY[] =
};
// -=*# Resource for function MOD #*=-
-const char* SC_OPCODE_MOD_ARY[] =
+const TranslateId SC_OPCODE_MOD_ARY[] =
{
NC_("SC_OPCODE_MOD", "Calculates the remainder of a division."),
NC_("SC_OPCODE_MOD", "Dividend"),
@@ -1331,7 +1331,7 @@ const char* SC_OPCODE_MOD_ARY[] =
};
// -=*# Resource for function SIGN #*=-
-const char* SC_OPCODE_PLUS_MINUS_ARY[] =
+const TranslateId SC_OPCODE_PLUS_MINUS_ARY[] =
{
NC_("SC_OPCODE_PLUS_MINUS", "Returns the algebraic sign of a number."),
NC_("SC_OPCODE_PLUS_MINUS", "Number"),
@@ -1339,7 +1339,7 @@ const char* SC_OPCODE_PLUS_MINUS_ARY[] =
};
// -=*# Resource for function SUBTOTAL #*=-
-const char* SC_OPCODE_SUB_TOTAL_ARY[] =
+const TranslateId SC_OPCODE_SUB_TOTAL_ARY[] =
{
NC_("SC_OPCODE_SUB_TOTAL", "Calculates subtotals in a spreadsheet."),
NC_("SC_OPCODE_SUB_TOTAL", "Function"),
@@ -1349,7 +1349,7 @@ const char* SC_OPCODE_SUB_TOTAL_ARY[] =
};
// -=*# Resource for function AGGREGATE #*=-
-const char* SC_OPCODE_AGGREGATE_ARY[] =
+const TranslateId SC_OPCODE_AGGREGATE_ARY[] =
{
NC_("SC_OPCODE_AGGREGATE", "Calculates an aggregate in a spreadsheet."),
NC_("SC_OPCODE_AGGREGATE", "Function"),
@@ -1363,7 +1363,7 @@ const char* SC_OPCODE_AGGREGATE_ARY[] =
};
// -=*# Resource for function INT #*=-
-const char* SC_OPCODE_INT_ARY[] =
+const TranslateId SC_OPCODE_INT_ARY[] =
{
NC_("SC_OPCODE_INT", "Rounds a number down to the nearest integer."),
NC_("SC_OPCODE_INT", "Number"),
@@ -1371,7 +1371,7 @@ const char* SC_OPCODE_INT_ARY[] =
};
// -=*# Resource for function TRUNC #*=-
-const char* SC_OPCODE_TRUNC_ARY[] =
+const TranslateId SC_OPCODE_TRUNC_ARY[] =
{
NC_("SC_OPCODE_TRUNC", "Truncates the decimal places of a number."),
NC_("SC_OPCODE_TRUNC", "Number"),
@@ -1381,7 +1381,7 @@ const char* SC_OPCODE_TRUNC_ARY[] =
};
// -=*# Resource for function ROUND #*=-
-const char* SC_OPCODE_ROUND_ARY[] =
+const TranslateId SC_OPCODE_ROUND_ARY[] =
{
NC_("SC_OPCODE_ROUND", "Rounds a number to a predefined accuracy."),
NC_("SC_OPCODE_ROUND", "Number"),
@@ -1391,7 +1391,7 @@ const char* SC_OPCODE_ROUND_ARY[] =
};
// -=*# Resource for function ROUNDUP #*=-
-const char* SC_OPCODE_ROUND_UP_ARY[] =
+const TranslateId SC_OPCODE_ROUND_UP_ARY[] =
{
NC_("SC_OPCODE_ROUND_UP", "Rounds a number up to the predefined accuracy."),
NC_("SC_OPCODE_ROUND_UP", "Number"),
@@ -1401,7 +1401,7 @@ const char* SC_OPCODE_ROUND_UP_ARY[] =
};
// -=*# Resource for function ROUNDDOWN #*=-
-const char* SC_OPCODE_ROUND_DOWN_ARY[] =
+const TranslateId SC_OPCODE_ROUND_DOWN_ARY[] =
{
NC_("SC_OPCODE_ROUND_DOWN", "Rounds a number down to a predefined accuracy."),
NC_("SC_OPCODE_ROUND_DOWN", "Number"),
@@ -1411,7 +1411,7 @@ const char* SC_OPCODE_ROUND_DOWN_ARY[] =
};
// -=*# Resource for function EVEN #*=-
-const char* SC_OPCODE_EVEN_ARY[] =
+const TranslateId SC_OPCODE_EVEN_ARY[] =
{
NC_("SC_OPCODE_EVEN", "Rounds a positive number up and negative number down to the nearest even integer."),
NC_("SC_OPCODE_EVEN", "Number"),
@@ -1419,7 +1419,7 @@ const char* SC_OPCODE_EVEN_ARY[] =
};
// -=*# Resource for function ODD #*=-
-const char* SC_OPCODE_ODD_ARY[] =
+const TranslateId SC_OPCODE_ODD_ARY[] =
{
NC_("SC_OPCODE_ODD", "Rounds a positive number up and negative number down to the nearest odd integer."),
NC_("SC_OPCODE_ODD", "Number"),
@@ -1427,7 +1427,7 @@ const char* SC_OPCODE_ODD_ARY[] =
};
// -=*# Resource for function CEILING.XCL #*=-
-const char* SC_OPCODE_CEIL_MS_ARY[] =
+const TranslateId SC_OPCODE_CEIL_MS_ARY[] =
{
NC_("SC_OPCODE_CEIL_MS", "Rounds a number away from zero to the nearest multiple of significance.\nThis function exists for interoperability with Microsoft Excel 2007 or older versions."),
NC_("SC_OPCODE_CEIL_MS", "Number"),
@@ -1437,7 +1437,7 @@ const char* SC_OPCODE_CEIL_MS_ARY[] =
};
// -=*# Resource for function CEILING.PRECISE #*=-
-const char* SC_OPCODE_CEIL_PRECISE_ARY[] =
+const TranslateId SC_OPCODE_CEIL_PRECISE_ARY[] =
{
NC_("SC_OPCODE_CEIL_PRECISE", "Rounds a number up to the nearest multiple of significance, regardless of sign of significance."),
NC_("SC_OPCODE_CEIL_PRECISE", "Number"),
@@ -1447,7 +1447,7 @@ const char* SC_OPCODE_CEIL_PRECISE_ARY[] =
};
// -=*# Resource for function ISO.CEILING #*=-
-const char* SC_OPCODE_CEIL_ISO_ARY[] =
+const TranslateId SC_OPCODE_CEIL_ISO_ARY[] =
{
NC_("SC_OPCODE_CEIL_ISO", "Rounds a number up to the nearest multiple of significance, regardless of sign of significance."),
NC_("SC_OPCODE_CEIL_ISO", "Number"),
@@ -1457,7 +1457,7 @@ const char* SC_OPCODE_CEIL_ISO_ARY[] =
};
// -=*# Resource for function CEILING #*=-
-const char* SC_OPCODE_CEIL_ARY[] =
+const TranslateId SC_OPCODE_CEIL_ARY[] =
{
NC_("SC_OPCODE_CEIL", "Rounds a number up to the nearest multiple of significance."),
NC_("SC_OPCODE_CEIL", "Number"),
@@ -1469,7 +1469,7 @@ const char* SC_OPCODE_CEIL_ARY[] =
};
// -=*# Resource for function CEILING.MATH #*=-
-const char* SC_OPCODE_CEIL_MATH_ARY[] =
+const TranslateId SC_OPCODE_CEIL_MATH_ARY[] =
{
NC_("SC_OPCODE_CEIL_MATH", "Rounds a number up to the nearest multiple of significance."),
NC_("SC_OPCODE_CEIL_MATH", "Number"),
@@ -1481,7 +1481,7 @@ const char* SC_OPCODE_CEIL_MATH_ARY[] =
};
// -=*# Resource for function FLOOR #*=-
-const char* SC_OPCODE_FLOOR_ARY[] =
+const TranslateId SC_OPCODE_FLOOR_ARY[] =
{
NC_("SC_OPCODE_FLOOR", "Rounds number down to the nearest multiple of significance."),
NC_("SC_OPCODE_FLOOR", "Number"),
@@ -1493,7 +1493,7 @@ const char* SC_OPCODE_FLOOR_ARY[] =
};
// -=*# Resource for function FLOOR.XCL #*=-
-const char* SC_OPCODE_FLOOR_MS_ARY[] =
+const TranslateId SC_OPCODE_FLOOR_MS_ARY[] =
{
NC_("SC_OPCODE_FLOOR_MS", "Rounds number towards zero to the nearest multiple of absolute value of significance.\nThis function exists for interoperability with Microsoft Excel 2007 or older versions."),
NC_("SC_OPCODE_FLOOR_MS", "Number"),
@@ -1503,7 +1503,7 @@ const char* SC_OPCODE_FLOOR_MS_ARY[] =
};
// -=*# Resource for function FLOOR.MATH #*=-
-const char* SC_OPCODE_FLOOR_MATH_ARY[] =
+const TranslateId SC_OPCODE_FLOOR_MATH_ARY[] =
{
NC_("SC_OPCODE_FLOOR_MATH", "Rounds number down to the nearest multiple of significance, regardless of sign of significance."),
NC_("SC_OPCODE_FLOOR_MATH", "Number"),
@@ -1515,7 +1515,7 @@ const char* SC_OPCODE_FLOOR_MATH_ARY[] =
};
// -=*# Resource for function FLOOR.PRECISE #*=-
-const char* SC_OPCODE_FLOOR_PRECISE_ARY[] =
+const TranslateId SC_OPCODE_FLOOR_PRECISE_ARY[] =
{
NC_("SC_OPCODE_FLOOR_PRECISE", "Rounds number down (towards -∞) to the nearest multiple of significance."),
NC_("SC_OPCODE_FLOOR_PRECISE", "Number"),
@@ -1525,7 +1525,7 @@ const char* SC_OPCODE_FLOOR_PRECISE_ARY[] =
};
// -=*# Resource for function GCD #*=-
-const char* SC_OPCODE_GCD_ARY[] =
+const TranslateId SC_OPCODE_GCD_ARY[] =
{
NC_("SC_OPCODE_GCD", "Greatest Common Divisor"),
NC_("SC_OPCODE_GCD", "Integer "),
@@ -1533,7 +1533,7 @@ const char* SC_OPCODE_GCD_ARY[] =
};
// -=*# Resource for function LCM #*=-
-const char* SC_OPCODE_LCM_ARY[] =
+const TranslateId SC_OPCODE_LCM_ARY[] =
{
NC_("SC_OPCODE_LCM", "Lowest common multiple"),
NC_("SC_OPCODE_LCM", "Integer "),
@@ -1541,7 +1541,7 @@ const char* SC_OPCODE_LCM_ARY[] =
};
// -=*# Resource for function TRANSPOSE #*=-
-const char* SC_OPCODE_MAT_TRANS_ARY[] =
+const TranslateId SC_OPCODE_MAT_TRANS_ARY[] =
{
NC_("SC_OPCODE_MAT_TRANS", "Array transposition. Exchanges the rows and columns of an array."),
NC_("SC_OPCODE_MAT_TRANS", "Array"),
@@ -1549,7 +1549,7 @@ const char* SC_OPCODE_MAT_TRANS_ARY[] =
};
// -=*# Resource for function MMULT #*=-
-const char* SC_OPCODE_MAT_MULT_ARY[] =
+const TranslateId SC_OPCODE_MAT_MULT_ARY[] =
{
NC_("SC_OPCODE_MAT_MULT", "Array multiplication. Returns the product of two arrays."),
NC_("SC_OPCODE_MAT_MULT", "Array 1"),
@@ -1559,7 +1559,7 @@ const char* SC_OPCODE_MAT_MULT_ARY[] =
};
// -=*# Resource for function MDETERM #*=-
-const char* SC_OPCODE_MAT_DET_ARY[] =
+const TranslateId SC_OPCODE_MAT_DET_ARY[] =
{
NC_("SC_OPCODE_MAT_DET", "Returns the array determinant."),
NC_("SC_OPCODE_MAT_DET", "Array"),
@@ -1567,7 +1567,7 @@ const char* SC_OPCODE_MAT_DET_ARY[] =
};
// -=*# Resource for function MINVERSE #*=-
-const char* SC_OPCODE_MAT_INV_ARY[] =
+const TranslateId SC_OPCODE_MAT_INV_ARY[] =
{
NC_("SC_OPCODE_MAT_INV", "Returns the inverse of an array."),
NC_("SC_OPCODE_MAT_INV", "Array"),
@@ -1575,7 +1575,7 @@ const char* SC_OPCODE_MAT_INV_ARY[] =
};
// -=*# Resource for function MUNIT #*=-
-const char* SC_OPCODE_MATRIX_UNIT_ARY[] =
+const TranslateId SC_OPCODE_MATRIX_UNIT_ARY[] =
{
NC_("SC_OPCODE_MATRIX_UNIT", "Returns the unitary square array of a certain size."),
NC_("SC_OPCODE_MATRIX_UNIT", "Dimensions"),
@@ -1583,7 +1583,7 @@ const char* SC_OPCODE_MATRIX_UNIT_ARY[] =
};
// -=*# Resource for function SUMPRODUCT #*=-
-const char* SC_OPCODE_SUM_PRODUCT_ARY[] =
+const TranslateId SC_OPCODE_SUM_PRODUCT_ARY[] =
{
NC_("SC_OPCODE_SUM_PRODUCT", "(Inner products) Returns the sum of the products of array arguments."),
NC_("SC_OPCODE_SUM_PRODUCT", "Array "),
@@ -1591,7 +1591,7 @@ const char* SC_OPCODE_SUM_PRODUCT_ARY[] =
};
// -=*# Resource for function SUMX2MY2 #*=-
-const char* SC_OPCODE_SUM_X2MY2_ARY[] =
+const TranslateId SC_OPCODE_SUM_X2MY2_ARY[] =
{
NC_("SC_OPCODE_SUM_X2MY2", "Returns the sum of the difference of squares of two arrays."),
NC_("SC_OPCODE_SUM_X2MY2", "Array X"),
@@ -1601,7 +1601,7 @@ const char* SC_OPCODE_SUM_X2MY2_ARY[] =
};
// -=*# Resource for function SUMX2PY2 #*=-
-const char* SC_OPCODE_SUM_X2DY2_ARY[] =
+const TranslateId SC_OPCODE_SUM_X2DY2_ARY[] =
{
NC_("SC_OPCODE_SUM_X2DY2", "Returns the total of the square sum of two arrays."),
NC_("SC_OPCODE_SUM_X2DY2", "Array X"),
@@ -1611,7 +1611,7 @@ const char* SC_OPCODE_SUM_X2DY2_ARY[] =
};
// -=*# Resource for function SUMXMY2 #*=-
-const char* SC_OPCODE_SUM_XMY2_ARY[] =
+const TranslateId SC_OPCODE_SUM_XMY2_ARY[] =
{
NC_("SC_OPCODE_SUM_XMY2", "Returns the sum of squares of differences of two arrays."),
NC_("SC_OPCODE_SUM_XMY2", "Array X"),
@@ -1621,7 +1621,7 @@ const char* SC_OPCODE_SUM_XMY2_ARY[] =
};
// -=*# Resource for function FREQUENCY #*=-
-const char* SC_OPCODE_FREQUENCY_ARY[] =
+const TranslateId SC_OPCODE_FREQUENCY_ARY[] =
{
NC_("SC_OPCODE_FREQUENCY", "Returns a frequency distribution as a vertical array."),
NC_("SC_OPCODE_FREQUENCY", "Data"),
@@ -1631,7 +1631,7 @@ const char* SC_OPCODE_FREQUENCY_ARY[] =
};
// -=*# Resource for function LINEST #*=-
-const char* SC_OPCODE_LINEST_ARY[] =
+const TranslateId SC_OPCODE_LINEST_ARY[] =
{
NC_("SC_OPCODE_LINEST", "Calculates parameters of the linear regression as an array."),
NC_("SC_OPCODE_LINEST", "Data Y"),
@@ -1645,7 +1645,7 @@ const char* SC_OPCODE_LINEST_ARY[] =
};
// -=*# Resource for function LOGEST #*=-
-const char* SC_OPCODE_LOGEST_ARY[] =
+const TranslateId SC_OPCODE_LOGEST_ARY[] =
{
NC_("SC_OPCODE_LOGEST", "Calculates the parameters of the exponential regression curve as an array."),
NC_("SC_OPCODE_LOGEST", "Data Y"),
@@ -1659,7 +1659,7 @@ const char* SC_OPCODE_LOGEST_ARY[] =
};
// -=*# Resource for function TREND #*=-
-const char* SC_OPCODE_TREND_ARY[] =
+const TranslateId SC_OPCODE_TREND_ARY[] =
{
NC_("SC_OPCODE_TREND", "Calculates points along a regression line."),
NC_("SC_OPCODE_TREND", "Data Y"),
@@ -1673,7 +1673,7 @@ const char* SC_OPCODE_TREND_ARY[] =
};
// -=*# Resource for function GROWTH #*=-
-const char* SC_OPCODE_GROWTH_ARY[] =
+const TranslateId SC_OPCODE_GROWTH_ARY[] =
{
NC_("SC_OPCODE_GROWTH", "Calculates points on the exponential regression function."),
NC_("SC_OPCODE_GROWTH", "Data Y"),
@@ -1687,7 +1687,7 @@ const char* SC_OPCODE_GROWTH_ARY[] =
};
// -=*# Resource for function COUNT #*=-
-const char* SC_OPCODE_COUNT_ARY[] =
+const TranslateId SC_OPCODE_COUNT_ARY[] =
{
NC_("SC_OPCODE_COUNT", "Counts how many numbers are in the list of arguments."),
NC_("SC_OPCODE_COUNT", "Value "),
@@ -1695,7 +1695,7 @@ const char* SC_OPCODE_COUNT_ARY[] =
};
// -=*# Resource for function COUNTA #*=-
-const char* SC_OPCODE_COUNT_2_ARY[] =
+const TranslateId SC_OPCODE_COUNT_2_ARY[] =
{
NC_("SC_OPCODE_COUNT_2", "Counts how many values are in the list of arguments."),
NC_("SC_OPCODE_COUNT_2", "Value "),
@@ -1703,7 +1703,7 @@ const char* SC_OPCODE_COUNT_2_ARY[] =
};
// -=*# Resource for function MAX #*=-
-const char* SC_OPCODE_MAX_ARY[] =
+const TranslateId SC_OPCODE_MAX_ARY[] =
{
NC_("SC_OPCODE_MAX", "Returns the maximum value in a list of arguments."),
NC_("SC_OPCODE_MAX", "Number "),
@@ -1711,7 +1711,7 @@ const char* SC_OPCODE_MAX_ARY[] =
};
// -=*# Resource for function MAXA #*=-
-const char* SC_OPCODE_MAX_A_ARY[] =
+const TranslateId SC_OPCODE_MAX_A_ARY[] =
{
NC_("SC_OPCODE_MAX_A", "Returns the maximum value in a list of arguments. Text is evaluated as Zero."),
NC_("SC_OPCODE_MAX_A", "Value "),
@@ -1719,7 +1719,7 @@ const char* SC_OPCODE_MAX_A_ARY[] =
};
// -=*# Resource for function MIN #*=-
-const char* SC_OPCODE_MIN_ARY[] =
+const TranslateId SC_OPCODE_MIN_ARY[] =
{
NC_("SC_OPCODE_MIN", "Returns the minimum value in a list of arguments."),
NC_("SC_OPCODE_MIN", "Number "),
@@ -1727,7 +1727,7 @@ const char* SC_OPCODE_MIN_ARY[] =
};
// -=*# Resource for function MINA #*=-
-const char* SC_OPCODE_MIN_A_ARY[] =
+const TranslateId SC_OPCODE_MIN_A_ARY[] =
{
NC_("SC_OPCODE_MIN_A", "Returns the smallest value in a list of arguments. Text is evaluated as zero."),
NC_("SC_OPCODE_MIN_A", "Value "),
@@ -1735,7 +1735,7 @@ const char* SC_OPCODE_MIN_A_ARY[] =
};
// -=*# Resource for function VAR #*=-
-const char* SC_OPCODE_VAR_ARY[] =
+const TranslateId SC_OPCODE_VAR_ARY[] =
{
NC_("SC_OPCODE_VAR", "Calculates the variance based on a sample."),
NC_("SC_OPCODE_VAR", "Number "),
@@ -1743,7 +1743,7 @@ const char* SC_OPCODE_VAR_ARY[] =
};
// -=*# Resource for function VAR.S #*=-
-const char* SC_OPCODE_VAR_S_ARY[] =
+const TranslateId SC_OPCODE_VAR_S_ARY[] =
{
NC_("SC_OPCODE_VAR_S", "Calculates the variance based on a sample."),
NC_("SC_OPCODE_VAR_S", "Number "),
@@ -1751,7 +1751,7 @@ const char* SC_OPCODE_VAR_S_ARY[] =
};
// -=*# Resource for function VARA #*=-
-const char* SC_OPCODE_VAR_A_ARY[] =
+const TranslateId SC_OPCODE_VAR_A_ARY[] =
{
NC_("SC_OPCODE_VAR_A", "Returns the variance based on a sample. Text is evaluated as zero."),
NC_("SC_OPCODE_VAR_A", "Value "),
@@ -1759,7 +1759,7 @@ const char* SC_OPCODE_VAR_A_ARY[] =
};
// -=*# Resource for function VARP #*=-
-const char* SC_OPCODE_VAR_P_ARY[] =
+const TranslateId SC_OPCODE_VAR_P_ARY[] =
{
NC_("SC_OPCODE_VAR_P", "Calculates variance based on the entire population."),
NC_("SC_OPCODE_VAR_P", "Number "),
@@ -1767,7 +1767,7 @@ const char* SC_OPCODE_VAR_P_ARY[] =
};
// -=*# Resource for function VAR.P #*=-
-const char* SC_OPCODE_VAR_P_MS_ARY[] =
+const TranslateId SC_OPCODE_VAR_P_MS_ARY[] =
{
NC_("SC_OPCODE_VAR_P_MS", "Calculates variance based on the entire population."),
NC_("SC_OPCODE_VAR_P_MS", "Number "),
@@ -1775,7 +1775,7 @@ const char* SC_OPCODE_VAR_P_MS_ARY[] =
};
// -=*# Resource for function VARPA #*=-
-const char* SC_OPCODE_VAR_P_A_ARY[] =
+const TranslateId SC_OPCODE_VAR_P_A_ARY[] =
{
NC_("SC_OPCODE_VAR_P_A", "Returns the variance based on the entire population. Text is evaluated as zero."),
NC_("SC_OPCODE_VAR_P_A", "Value "),
@@ -1783,7 +1783,7 @@ const char* SC_OPCODE_VAR_P_A_ARY[] =
};
// -=*# Resource for function STDEV #*=-
-const char* SC_OPCODE_ST_DEV_ARY[] =
+const TranslateId SC_OPCODE_ST_DEV_ARY[] =
{
NC_("SC_OPCODE_ST_DEV", "Calculates the standard deviation based on a sample."),
NC_("SC_OPCODE_ST_DEV", "Number "),
@@ -1791,7 +1791,7 @@ const char* SC_OPCODE_ST_DEV_ARY[] =
};
// -=*# Resource for function STDEV.S #*=-
-const char* SC_OPCODE_ST_DEV_S_ARY[] =
+const TranslateId SC_OPCODE_ST_DEV_S_ARY[] =
{
NC_("SC_OPCODE_ST_DEV_S", "Calculates the standard deviation based on a sample."),
NC_("SC_OPCODE_ST_DEV_S", "Number "),
@@ -1799,7 +1799,7 @@ const char* SC_OPCODE_ST_DEV_S_ARY[] =
};
// -=*# Resource for function STDEVA #*=-
-const char* SC_OPCODE_ST_DEV_A_ARY[] =
+const TranslateId SC_OPCODE_ST_DEV_A_ARY[] =
{
NC_("SC_OPCODE_ST_DEV_A", "Returns the standard deviation based on a sample. Text is evaluated as zero."),
NC_("SC_OPCODE_ST_DEV_A", "Value "),
@@ -1807,7 +1807,7 @@ const char* SC_OPCODE_ST_DEV_A_ARY[] =
};
// -=*# Resource for function STDEVP #*=-
-const char* SC_OPCODE_ST_DEV_P_ARY[] =
+const TranslateId SC_OPCODE_ST_DEV_P_ARY[] =
{
NC_("SC_OPCODE_ST_DEV_P", "Calculates the standard deviation based on the entire population."),
NC_("SC_OPCODE_ST_DEV_P", "Number "),
@@ -1815,7 +1815,7 @@ const char* SC_OPCODE_ST_DEV_P_ARY[] =
};
// -=*# Resource for function STDEV.P #*=-
-const char* SC_OPCODE_ST_DEV_P_MS_ARY[] =
+const TranslateId SC_OPCODE_ST_DEV_P_MS_ARY[] =
{
NC_("SC_OPCODE_ST_DEV_P_MS", "Calculates the standard deviation based on the entire population."),
NC_("SC_OPCODE_ST_DEV_P_MS", "Number "),
@@ -1823,7 +1823,7 @@ const char* SC_OPCODE_ST_DEV_P_MS_ARY[] =
};
// -=*# Resource for function STDEVPA #*=-
-const char* SC_OPCODE_ST_DEV_P_A_ARY[] =
+const TranslateId SC_OPCODE_ST_DEV_P_A_ARY[] =
{
NC_("SC_OPCODE_ST_DEV_P_A", "Returns the standard deviation based on the entire population. Text is evaluated as zero."),
NC_("SC_OPCODE_ST_DEV_P_A", "Value "),
@@ -1831,7 +1831,7 @@ const char* SC_OPCODE_ST_DEV_P_A_ARY[] =
};
// -=*# Resource for function AVERAGE #*=-
-const char* SC_OPCODE_AVERAGE_ARY[] =
+const TranslateId SC_OPCODE_AVERAGE_ARY[] =
{
NC_("SC_OPCODE_AVERAGE", "Returns the average of a sample."),
NC_("SC_OPCODE_AVERAGE", "Number "),
@@ -1839,7 +1839,7 @@ const char* SC_OPCODE_AVERAGE_ARY[] =
};
// -=*# Resource for function AVERAGEA #*=-
-const char* SC_OPCODE_AVERAGE_A_ARY[] =
+const TranslateId SC_OPCODE_AVERAGE_A_ARY[] =
{
NC_("SC_OPCODE_AVERAGE_A", "Returns the average value for a sample. Text is evaluated as zero."),
NC_("SC_OPCODE_AVERAGE_A", "Value "),
@@ -1847,7 +1847,7 @@ const char* SC_OPCODE_AVERAGE_A_ARY[] =
};
// -=*# Resource for function DEVSQ #*=-
-const char* SC_OPCODE_DEV_SQ_ARY[] =
+const TranslateId SC_OPCODE_DEV_SQ_ARY[] =
{
NC_("SC_OPCODE_DEV_SQ", "Returns the sum of squares of deviations from the sample mean value"),
NC_("SC_OPCODE_DEV_SQ", "Number "),
@@ -1855,7 +1855,7 @@ const char* SC_OPCODE_DEV_SQ_ARY[] =
};
// -=*# Resource for function AVEDEV #*=-
-const char* SC_OPCODE_AVE_DEV_ARY[] =
+const TranslateId SC_OPCODE_AVE_DEV_ARY[] =
{
NC_("SC_OPCODE_AVE_DEV", "Returns the average of the absolute deviations of a sample from the mean."),
NC_("SC_OPCODE_AVE_DEV", "Number "),
@@ -1863,7 +1863,7 @@ const char* SC_OPCODE_AVE_DEV_ARY[] =
};
// -=*# Resource for function SKEW #*=-
-const char* SC_OPCODE_SKEW_ARY[] =
+const TranslateId SC_OPCODE_SKEW_ARY[] =
{
NC_("SC_OPCODE_SKEW", "Returns the skewness of a distribution."),
NC_("SC_OPCODE_SKEW", "Number "),
@@ -1871,7 +1871,7 @@ const char* SC_OPCODE_SKEW_ARY[] =
};
// -=*# Resource for function SKEWP #*=-
-const char* SC_OPCODE_SKEWP_ARY[] =
+const TranslateId SC_OPCODE_SKEWP_ARY[] =
{
NC_("SC_OPCODE_SKEWP", "Returns the skewness of a distribution using the population of a random variable."),
NC_("SC_OPCODE_SKEWP", "Number "),
@@ -1879,7 +1879,7 @@ const char* SC_OPCODE_SKEWP_ARY[] =
};
// -=*# Resource for function KURT #*=-
-const char* SC_OPCODE_KURT_ARY[] =
+const TranslateId SC_OPCODE_KURT_ARY[] =
{
NC_("SC_OPCODE_KURT", "Returns the kurtosis of a distribution."),
NC_("SC_OPCODE_KURT", "Number "),
@@ -1887,7 +1887,7 @@ const char* SC_OPCODE_KURT_ARY[] =
};
// -=*# Resource for function GEOMEAN #*=-
-const char* SC_OPCODE_GEO_MEAN_ARY[] =
+const TranslateId SC_OPCODE_GEO_MEAN_ARY[] =
{
NC_("SC_OPCODE_GEO_MEAN", "Returns the geometric mean of a sample."),
NC_("SC_OPCODE_GEO_MEAN", "Number "),
@@ -1895,7 +1895,7 @@ const char* SC_OPCODE_GEO_MEAN_ARY[] =
};
// -=*# Resource for function HARMEAN #*=-
-const char* SC_OPCODE_HAR_MEAN_ARY[] =
+const TranslateId SC_OPCODE_HAR_MEAN_ARY[] =
{
NC_("SC_OPCODE_HAR_MEAN", "Returns the harmonic mean of a sample."),
NC_("SC_OPCODE_HAR_MEAN", "Number "),
@@ -1903,7 +1903,7 @@ const char* SC_OPCODE_HAR_MEAN_ARY[] =
};
// -=*# Resource for function MODE #*=-
-const char* SC_OPCODE_MODAL_VALUE_ARY[] =
+const TranslateId SC_OPCODE_MODAL_VALUE_ARY[] =
{
NC_("SC_OPCODE_MODAL_VALUE", "Returns the most common value in a sample."),
NC_("SC_OPCODE_MODAL_VALUE", "Number "),
@@ -1911,7 +1911,7 @@ const char* SC_OPCODE_MODAL_VALUE_ARY[] =
};
// -=*# Resource for function MODE.SNGL #*=-
-const char* SC_OPCODE_MODAL_VALUE_MS_ARY[] =
+const TranslateId SC_OPCODE_MODAL_VALUE_MS_ARY[] =
{
NC_("SC_OPCODE_MODAL_VALUE_MS", "Returns the most common value in a sample."),
NC_("SC_OPCODE_MODAL_VALUE_MS", "Number "),
@@ -1919,7 +1919,7 @@ const char* SC_OPCODE_MODAL_VALUE_MS_ARY[] =
};
// -=*# Resource for function MODE.MULT #*=-
-const char* SC_OPCODE_MODAL_VALUE_MULTI_ARY[] =
+const TranslateId SC_OPCODE_MODAL_VALUE_MULTI_ARY[] =
{
NC_("SC_OPCODE_MODAL_VALUE_MULTI", "Returns the most common value in a sample."),
NC_("SC_OPCODE_MODAL_VALUE_MULTI", "Number "),
@@ -1927,7 +1927,7 @@ const char* SC_OPCODE_MODAL_VALUE_MULTI_ARY[] =
};
// -=*# Resource for function MEDIAN #*=-
-const char* SC_OPCODE_MEDIAN_ARY[] =
+const TranslateId SC_OPCODE_MEDIAN_ARY[] =
{
NC_("SC_OPCODE_MEDIAN", "Returns the median of a given sample."),
NC_("SC_OPCODE_MEDIAN", "Number "),
@@ -1935,7 +1935,7 @@ const char* SC_OPCODE_MEDIAN_ARY[] =
};
// -=*# Resource for function PERCENTILE #*=-
-const char* SC_OPCODE_PERCENTILE_ARY[] =
+const TranslateId SC_OPCODE_PERCENTILE_ARY[] =
{
NC_("SC_OPCODE_PERCENTILE", "Returns the alpha percentile of a sample."),
NC_("SC_OPCODE_PERCENTILE", "Data"),
@@ -1945,7 +1945,7 @@ const char* SC_OPCODE_PERCENTILE_ARY[] =
};
// -=*# Resource for function PERCENTILE.EXC #*=-
-const char* SC_OPCODE_PERCENTILE_EXC_ARY[] =
+const TranslateId SC_OPCODE_PERCENTILE_EXC_ARY[] =
{
NC_("SC_OPCODE_PERCENTILE_EXC", "Returns the alpha percentile of a sample."),
NC_("SC_OPCODE_PERCENTILE_EXC", "Data"),
@@ -1955,7 +1955,7 @@ const char* SC_OPCODE_PERCENTILE_EXC_ARY[] =
};
// -=*# Resource for function PERCENTILE.INC #*=-
-const char* SC_OPCODE_PERCENTILE_INC_ARY[] =
+const TranslateId SC_OPCODE_PERCENTILE_INC_ARY[] =
{
NC_("SC_OPCODE_PERCENTILE_INC", "Returns the alpha percentile of a sample."),
NC_("SC_OPCODE_PERCENTILE_INC", "Data"),
@@ -1965,7 +1965,7 @@ const char* SC_OPCODE_PERCENTILE_INC_ARY[] =
};
// -=*# Resource for function QUARTILE #*=-
-const char* SC_OPCODE_QUARTILE_ARY[] =
+const TranslateId SC_OPCODE_QUARTILE_ARY[] =
{
NC_("SC_OPCODE_QUARTILE", "Returns the quartile of a sample."),
NC_("SC_OPCODE_QUARTILE", "Data"),
@@ -1975,7 +1975,7 @@ const char* SC_OPCODE_QUARTILE_ARY[] =
};
// -=*# Resource for function QUARTILE.EXC #*=-
-const char* SC_OPCODE_QUARTILE_EXC_ARY[] =
+const TranslateId SC_OPCODE_QUARTILE_EXC_ARY[] =
{
NC_("SC_OPCODE_QUARTILE_EXC", "Returns the quartile of a sample."),
NC_("SC_OPCODE_QUARTILE_EXC", "Data"),
@@ -1985,7 +1985,7 @@ const char* SC_OPCODE_QUARTILE_EXC_ARY[] =
};
// -=*# Resource for function QUARTILE.INC #*=-
-const char* SC_OPCODE_QUARTILE_INC_ARY[] =
+const TranslateId SC_OPCODE_QUARTILE_INC_ARY[] =
{
NC_("SC_OPCODE_QUARTILE_INC", "Returns the quartile of a sample."),
NC_("SC_OPCODE_QUARTILE_INC", "Data"),
@@ -1995,7 +1995,7 @@ const char* SC_OPCODE_QUARTILE_INC_ARY[] =
};
// -=*# Resource for function LARGE #*=-
-const char* SC_OPCODE_LARGE_ARY[] =
+const TranslateId SC_OPCODE_LARGE_ARY[] =
{
NC_("SC_OPCODE_LARGE", "Returns the k-th largest value of a sample."),
NC_("SC_OPCODE_LARGE", "Data"),
@@ -2005,7 +2005,7 @@ const char* SC_OPCODE_LARGE_ARY[] =
};
// -=*# Resource for function SMALL #*=-
-const char* SC_OPCODE_SMALL_ARY[] =
+const TranslateId SC_OPCODE_SMALL_ARY[] =
{
NC_("SC_OPCODE_SMALL", "Returns the k-th smallest value of a sample."),
NC_("SC_OPCODE_SMALL", "Data"),
@@ -2015,7 +2015,7 @@ const char* SC_OPCODE_SMALL_ARY[] =
};
// -=*# Resource for function PERCENTRANK #*=-
-const char* SC_OPCODE_PERCENT_RANK_ARY[] =
+const TranslateId SC_OPCODE_PERCENT_RANK_ARY[] =
{
NC_("SC_OPCODE_PERCENT_RANK", "Returns the percentage rank of a value in a sample."),
NC_("SC_OPCODE_PERCENT_RANK", "Data"),
@@ -2027,7 +2027,7 @@ const char* SC_OPCODE_PERCENT_RANK_ARY[] =
};
// -=*# Resource for function PERCENTRANK.EXC #*=-
-const char* SC_OPCODE_PERCENT_RANK_EXC_ARY[] =
+const TranslateId SC_OPCODE_PERCENT_RANK_EXC_ARY[] =
{
NC_("SC_OPCODE_PERCENT_RANK_EXC", "Returns the percentage rank (0..1, exclusive) of a value in a sample."),
NC_("SC_OPCODE_PERCENT_RANK_EXC", "Data"),
@@ -2039,7 +2039,7 @@ const char* SC_OPCODE_PERCENT_RANK_EXC_ARY[] =
};
// -=*# Resource for function PERCENTRANK.INC #*=-
-const char* SC_OPCODE_PERCENT_RANK_INC_ARY[] =
+const TranslateId SC_OPCODE_PERCENT_RANK_INC_ARY[] =
{
NC_("SC_OPCODE_PERCENT_RANK_INC", "Returns the percentage rank (0..1, inclusive) of a value in a sample."),
NC_("SC_OPCODE_PERCENT_RANK_INC", "Data"),
@@ -2051,7 +2051,7 @@ const char* SC_OPCODE_PERCENT_RANK_INC_ARY[] =
};
// -=*# Resource for function RANK #*=-
-const char* SC_OPCODE_RANK_ARY[] =
+const TranslateId SC_OPCODE_RANK_ARY[] =
{
NC_("SC_OPCODE_RANK", "Returns the ranking of a value in a sample."),
NC_("SC_OPCODE_RANK", "Value"),
@@ -2063,7 +2063,7 @@ const char* SC_OPCODE_RANK_ARY[] =
};
// -=*# Resource for function RANK.EQ #*=-
-const char* SC_OPCODE_RANK_EQ_ARY[] =
+const TranslateId SC_OPCODE_RANK_EQ_ARY[] =
{
NC_("SC_OPCODE_RANK_EQ", "Returns the ranking of a value in a sample; if more than one value has the same rank, the top rank of that set of values is returned."),
NC_("SC_OPCODE_RANK_EQ", "Value"),
@@ -2075,7 +2075,7 @@ const char* SC_OPCODE_RANK_EQ_ARY[] =
};
// -=*# Resource for function RANK.AVG #*=-
-const char* SC_OPCODE_RANK_AVG_ARY[] =
+const TranslateId SC_OPCODE_RANK_AVG_ARY[] =
{
NC_("SC_OPCODE_RANK_AVG", "Returns the ranking of a value in a sample; if more than one value has the same rank, the average rank is returned."),
NC_("SC_OPCODE_RANK_AVG", "Value"),
@@ -2087,7 +2087,7 @@ const char* SC_OPCODE_RANK_AVG_ARY[] =
};
// -=*# Resource for function TRIMMEAN #*=-
-const char* SC_OPCODE_TRIM_MEAN_ARY[] =
+const TranslateId SC_OPCODE_TRIM_MEAN_ARY[] =
{
NC_("SC_OPCODE_TRIM_MEAN", "Returns the mean of a sample without including the marginal values."),
NC_("SC_OPCODE_TRIM_MEAN", "Data"),
@@ -2097,7 +2097,7 @@ const char* SC_OPCODE_TRIM_MEAN_ARY[] =
};
// -=*# Resource for function PROB #*=-
-const char* SC_OPCODE_PROB_ARY[] =
+const TranslateId SC_OPCODE_PROB_ARY[] =
{
NC_("SC_OPCODE_PROB", "Returns the discrete probability of an interval."),
NC_("SC_OPCODE_PROB", "Data"),
@@ -2111,7 +2111,7 @@ const char* SC_OPCODE_PROB_ARY[] =
};
// -=*# Resource for function B #*=-
-const char* SC_OPCODE_B_ARY[] =
+const TranslateId SC_OPCODE_B_ARY[] =
{
NC_("SC_OPCODE_B", "Returns the probability of a trial result using binomial distribution."),
NC_("SC_OPCODE_B", "Trials"),
@@ -2125,7 +2125,7 @@ const char* SC_OPCODE_B_ARY[] =
};
// -=*# Resource for function PHI #*=-
-const char* SC_OPCODE_PHI_ARY[] =
+const TranslateId SC_OPCODE_PHI_ARY[] =
{
NC_("SC_OPCODE_PHI", "Values of the distribution function for a standard normal distribution."),
NC_("SC_OPCODE_PHI", "Number"),
@@ -2133,7 +2133,7 @@ const char* SC_OPCODE_PHI_ARY[] =
};
// -=*# Resource for function GAUSS #*=-
-const char* SC_OPCODE_GAUSS_ARY[] =
+const TranslateId SC_OPCODE_GAUSS_ARY[] =
{
NC_("SC_OPCODE_GAUSS", "Returns the integral values of the standard normal cumulative distribution."),
NC_("SC_OPCODE_GAUSS", "Number"),
@@ -2141,7 +2141,7 @@ const char* SC_OPCODE_GAUSS_ARY[] =
};
// -=*# Resource for function FISHER #*=-
-const char* SC_OPCODE_FISHER_ARY[] =
+const TranslateId SC_OPCODE_FISHER_ARY[] =
{
NC_("SC_OPCODE_FISHER", "Returns the Fisher transformation."),
NC_("SC_OPCODE_FISHER", "Number"),
@@ -2149,7 +2149,7 @@ const char* SC_OPCODE_FISHER_ARY[] =
};
// -=*# Resource for function FISHERINV #*=-
-const char* SC_OPCODE_FISHER_INV_ARY[] =
+const TranslateId SC_OPCODE_FISHER_INV_ARY[] =
{
NC_("SC_OPCODE_FISHER_INV", "Returns the inverse of the Fisher transformation."),
NC_("SC_OPCODE_FISHER_INV", "Number"),
@@ -2157,7 +2157,7 @@ const char* SC_OPCODE_FISHER_INV_ARY[] =
};
// -=*# Resource for function BINOMDIST #*=-
-const char* SC_OPCODE_BINOM_DIST_ARY[] =
+const TranslateId SC_OPCODE_BINOM_DIST_ARY[] =
{
NC_("SC_OPCODE_BINOM_DIST", "Values of the binomial distribution."),
NC_("SC_OPCODE_BINOM_DIST", "X"),
@@ -2171,7 +2171,7 @@ const char* SC_OPCODE_BINOM_DIST_ARY[] =
};
// -=*# Resource for function BINOM.DIST #*=-
-const char* SC_OPCODE_BINOM_DIST_MS_ARY[] =
+const TranslateId SC_OPCODE_BINOM_DIST_MS_ARY[] =
{
NC_("SC_OPCODE_BINOM_DIST_MS", "Values of the binomial distribution."),
NC_("SC_OPCODE_BINOM_DIST_MS", "X"),
@@ -2185,7 +2185,7 @@ const char* SC_OPCODE_BINOM_DIST_MS_ARY[] =
};
// -=*# Resource for function NEGBINOMDIST #*=-
-const char* SC_OPCODE_NEG_BINOM_VERT_ARY[] =
+const TranslateId SC_OPCODE_NEG_BINOM_VERT_ARY[] =
{
NC_("SC_OPCODE_NEG_BINOM_VERT", "Values of the negative binomial distribution."),
NC_("SC_OPCODE_NEG_BINOM_VERT", "X"),
@@ -2197,7 +2197,7 @@ const char* SC_OPCODE_NEG_BINOM_VERT_ARY[] =
};
// -=*# Resource for function NEGBINOM.DIST #*=-
-const char* SC_OPCODE_NEG_BINOM_DIST_MS_ARY[] =
+const TranslateId SC_OPCODE_NEG_BINOM_DIST_MS_ARY[] =
{
NC_("SC_OPCODE_NEG_BINOM_DIST_MS", "Values of the negative binomial distribution."),
NC_("SC_OPCODE_NEG_BINOM_DIST_MS", "X"),
@@ -2211,7 +2211,7 @@ const char* SC_OPCODE_NEG_BINOM_DIST_MS_ARY[] =
};
// -=*# Resource for function CRITBINOM #*=-
-const char* SC_OPCODE_CRIT_BINOM_ARY[] =
+const TranslateId SC_OPCODE_CRIT_BINOM_ARY[] =
{
NC_("SC_OPCODE_CRIT_BINOM", "Returns the smallest value for which the cumulative binomial distribution is greater than or equal to a criterion value."),
NC_("SC_OPCODE_CRIT_BINOM", "Trials"),
@@ -2223,7 +2223,7 @@ const char* SC_OPCODE_CRIT_BINOM_ARY[] =
};
// -=*# Resource for function BINOM.INV #*=-
-const char* SC_OPCODE_BINOM_INV_ARY[] =
+const TranslateId SC_OPCODE_BINOM_INV_ARY[] =
{
NC_("SC_OPCODE_BINOM_INV", "Returns the smallest value for which the cumulative binomial distribution is greater than or equal to a criterion value."),
NC_("SC_OPCODE_BINOM_INV", "Trials"),
@@ -2235,7 +2235,7 @@ const char* SC_OPCODE_BINOM_INV_ARY[] =
};
// -=*# Resource for function POISSON #*=-
-const char* SC_OPCODE_POISSON_DIST_ARY[] =
+const TranslateId SC_OPCODE_POISSON_DIST_ARY[] =
{
NC_("SC_OPCODE_POISSON_DIST", "Returns the Poisson distribution."),
NC_("SC_OPCODE_POISSON_DIST", "Number"),
@@ -2247,7 +2247,7 @@ const char* SC_OPCODE_POISSON_DIST_ARY[] =
};
// -=*# Resource for function POISSON.DIST #*=-
-const char* SC_OPCODE_POISSON_DIST_MS_ARY[] =
+const TranslateId SC_OPCODE_POISSON_DIST_MS_ARY[] =
{
NC_("SC_OPCODE_POISSON_DIST_MS", "Returns the Poisson distribution."),
NC_("SC_OPCODE_POISSON_DIST_MS", "Number"),
@@ -2259,7 +2259,7 @@ const char* SC_OPCODE_POISSON_DIST_MS_ARY[] =
};
// -=*# Resource for function NORMDIST #*=-
-const char* SC_OPCODE_NORM_DIST_ARY[] =
+const TranslateId SC_OPCODE_NORM_DIST_ARY[] =
{
NC_("SC_OPCODE_NORM_DIST", "Values of the normal distribution."),
NC_("SC_OPCODE_NORM_DIST", "Number"),
@@ -2273,7 +2273,7 @@ const char* SC_OPCODE_NORM_DIST_ARY[] =
};
// -=*# Resource for function NORM.DIST #*=-
-const char* SC_OPCODE_NORM_DIST_MS_ARY[] =
+const TranslateId SC_OPCODE_NORM_DIST_MS_ARY[] =
{
NC_("SC_OPCODE_NORM_DIST_MS", "Values of the normal distribution."),
NC_("SC_OPCODE_NORM_DIST_MS", "Number"),
@@ -2287,7 +2287,7 @@ const char* SC_OPCODE_NORM_DIST_MS_ARY[] =
};
// -=*# Resource for function NORMINV #*=-
-const char* SC_OPCODE_NORM_INV_ARY[] =
+const TranslateId SC_OPCODE_NORM_INV_ARY[] =
{
NC_("SC_OPCODE_NORM_INV", "Values of the inverse normal distribution."),
NC_("SC_OPCODE_NORM_INV", "Number"),
@@ -2299,7 +2299,7 @@ const char* SC_OPCODE_NORM_INV_ARY[] =
};
// -=*# Resource for function NORM.INV #*=-
-const char* SC_OPCODE_NORM_INV_MS_ARY[] =
+const TranslateId SC_OPCODE_NORM_INV_MS_ARY[] =
{
NC_("SC_OPCODE_NORM_INV_MS", "Values of the inverse normal distribution."),
NC_("SC_OPCODE_NORM_INV_MS", "Number"),
@@ -2311,7 +2311,7 @@ const char* SC_OPCODE_NORM_INV_MS_ARY[] =
};
// -=*# Resource for function NORMSDIST #*=-
-const char* SC_OPCODE_STD_NORM_DIST_ARY[] =
+const TranslateId SC_OPCODE_STD_NORM_DIST_ARY[] =
{
NC_("SC_OPCODE_STD_NORM_DIST", "The values of the standard normal cumulative distribution."),
NC_("SC_OPCODE_STD_NORM_DIST", "Number"),
@@ -2319,7 +2319,7 @@ const char* SC_OPCODE_STD_NORM_DIST_ARY[] =
};
// -=*# Resource for function NORM.S.DIST #*=-
-const char* SC_OPCODE_STD_NORM_DIST_MS_ARY[] =
+const TranslateId SC_OPCODE_STD_NORM_DIST_MS_ARY[] =
{
NC_("SC_OPCODE_STD_NORM_DIST_MS", "The values of the standard normal distribution."),
NC_("SC_OPCODE_STD_NORM_DIST_MS", "Number"),
@@ -2329,7 +2329,7 @@ const char* SC_OPCODE_STD_NORM_DIST_MS_ARY[] =
};
// -=*# Resource for function NORMSINV #*=-
-const char* SC_OPCODE_S_NORM_INV_ARY[] =
+const TranslateId SC_OPCODE_S_NORM_INV_ARY[] =
{
NC_("SC_OPCODE_S_NORM_INV", "Values of the inverse standard normal distribution."),
NC_("SC_OPCODE_S_NORM_INV", "Number"),
@@ -2337,7 +2337,7 @@ const char* SC_OPCODE_S_NORM_INV_ARY[] =
};
// -=*# Resource for function NORM.S.INV #*=-
-const char* SC_OPCODE_S_NORM_INV_MS_ARY[] =
+const TranslateId SC_OPCODE_S_NORM_INV_MS_ARY[] =
{
NC_("SC_OPCODE_S_NORM_INV_MS", "Values of the inverse standard normal distribution."),
NC_("SC_OPCODE_S_NORM_INV_MS", "Number"),
@@ -2345,7 +2345,7 @@ const char* SC_OPCODE_S_NORM_INV_MS_ARY[] =
};
// -=*# Resource for function LOGNORMDIST #*=-
-const char* SC_OPCODE_LOG_NORM_DIST_ARY[] =
+const TranslateId SC_OPCODE_LOG_NORM_DIST_ARY[] =
{
NC_("SC_OPCODE_LOG_NORM_DIST", "Values of the log normal distribution."),
NC_("SC_OPCODE_LOG_NORM_DIST", "Number"),
@@ -2359,7 +2359,7 @@ const char* SC_OPCODE_LOG_NORM_DIST_ARY[] =
};
// -=*# Resource for function LOGNORM.DIST #*=-
-const char* SC_OPCODE_LOG_NORM_DIST_MS_ARY[] =
+const TranslateId SC_OPCODE_LOG_NORM_DIST_MS_ARY[] =
{
NC_("SC_OPCODE_LOG_NORM_DIST_MS", "Values of the log normal distribution."),
NC_("SC_OPCODE_LOG_NORM_DIST_MS", "Number"),
@@ -2373,7 +2373,7 @@ const char* SC_OPCODE_LOG_NORM_DIST_MS_ARY[] =
};
// -=*# Resource for function LOGINV #*=-
-const char* SC_OPCODE_LOG_INV_ARY[] =
+const TranslateId SC_OPCODE_LOG_INV_ARY[] =
{
NC_("SC_OPCODE_LOG_INV", "Values of the inverse of the lognormal distribution."),
NC_("SC_OPCODE_LOG_INV", "Number"),
@@ -2385,7 +2385,7 @@ const char* SC_OPCODE_LOG_INV_ARY[] =
};
// -=*# Resource for function LOGNORM.INV #*=-
-const char* SC_OPCODE_LOG_INV_MS_ARY[] =
+const TranslateId SC_OPCODE_LOG_INV_MS_ARY[] =
{
NC_("SC_OPCODE_LOG_INV_MS", "Values of the inverse of the lognormal distribution."),
NC_("SC_OPCODE_LOG_INV_MS", "Number"),
@@ -2397,7 +2397,7 @@ const char* SC_OPCODE_LOG_INV_MS_ARY[] =
};
// -=*# Resource for function EXPONDIST #*=-
-const char* SC_OPCODE_EXP_DIST_ARY[] =
+const TranslateId SC_OPCODE_EXP_DIST_ARY[] =
{
NC_("SC_OPCODE_EXP_DIST", "Values of the exponential distribution."),
NC_("SC_OPCODE_EXP_DIST", "Number"),
@@ -2409,7 +2409,7 @@ const char* SC_OPCODE_EXP_DIST_ARY[] =
};
// -=*# Resource for function EXPON.DIST #*=-
-const char* SC_OPCODE_EXP_DIST_MS_ARY[] =
+const TranslateId SC_OPCODE_EXP_DIST_MS_ARY[] =
{
NC_("SC_OPCODE_EXP_DIST_MS", "Values of the exponential distribution."),
NC_("SC_OPCODE_EXP_DIST_MS", "Number"),
@@ -2421,7 +2421,7 @@ const char* SC_OPCODE_EXP_DIST_MS_ARY[] =
};
// -=*# Resource for function GAMMADIST #*=-
-const char* SC_OPCODE_GAMMA_DIST_ARY[] =
+const TranslateId SC_OPCODE_GAMMA_DIST_ARY[] =
{
NC_("SC_OPCODE_GAMMA_DIST", "Returns the value of the probability density function or the cumulative distribution function for the Gamma distribution."),
NC_("SC_OPCODE_GAMMA_DIST", "Number"),
@@ -2435,7 +2435,7 @@ const char* SC_OPCODE_GAMMA_DIST_ARY[] =
};
// -=*# Resource for function GAMMA.DIST #*=-
-const char* SC_OPCODE_GAMMA_DIST_MS_ARY[] =
+const TranslateId SC_OPCODE_GAMMA_DIST_MS_ARY[] =
{
NC_("SC_OPCODE_GAMMA_DIST_MS", "Returns the value of the probability density function or the cumulative distribution function for the Gamma distribution."),
NC_("SC_OPCODE_GAMMA_DIST_MS", "Number"),
@@ -2449,7 +2449,7 @@ const char* SC_OPCODE_GAMMA_DIST_MS_ARY[] =
};
// -=*# Resource for function GAMMAINV #*=-
-const char* SC_OPCODE_GAMMA_INV_ARY[] =
+const TranslateId SC_OPCODE_GAMMA_INV_ARY[] =
{
NC_("SC_OPCODE_GAMMA_INV", "Values of the inverse gamma distribution."),
NC_("SC_OPCODE_GAMMA_INV", "Number"),
@@ -2461,7 +2461,7 @@ const char* SC_OPCODE_GAMMA_INV_ARY[] =
};
// -=*# Resource for function GAMMA.INV #*=-
-const char* SC_OPCODE_GAMMA_INV_MS_ARY[] =
+const TranslateId SC_OPCODE_GAMMA_INV_MS_ARY[] =
{
NC_("SC_OPCODE_GAMMA_INV_MS", "Values of the inverse gamma distribution."),
NC_("SC_OPCODE_GAMMA_INV_MS", "Number"),
@@ -2473,7 +2473,7 @@ const char* SC_OPCODE_GAMMA_INV_MS_ARY[] =
};
// -=*# Resource for function GAMMALN #*=-
-const char* SC_OPCODE_GAMMA_LN_ARY[] =
+const TranslateId SC_OPCODE_GAMMA_LN_ARY[] =
{
NC_("SC_OPCODE_GAMMA_LN", "Returns the natural logarithm of the gamma function."),
NC_("SC_OPCODE_GAMMA_LN", "Number"),
@@ -2481,7 +2481,7 @@ const char* SC_OPCODE_GAMMA_LN_ARY[] =
};
// -=*# Resource for function GAMMALN.PRECISE #*=-
-const char* SC_OPCODE_GAMMA_LN_MS_ARY[] =
+const TranslateId SC_OPCODE_GAMMA_LN_MS_ARY[] =
{
NC_("SC_OPCODE_GAMMA_LN_MS", "Returns the natural logarithm of the gamma function."),
NC_("SC_OPCODE_GAMMA_LN_MS", "Number"),
@@ -2490,7 +2490,7 @@ const char* SC_OPCODE_GAMMA_LN_MS_ARY[] =
// -=*# Resource for function GAMMA #*=-
-const char* SC_OPCODE_GAMMA_ARY[] =
+const TranslateId SC_OPCODE_GAMMA_ARY[] =
{
NC_("SC_OPCODE_GAMMA", "Returns the value of the Gamma function."),
NC_("SC_OPCODE_GAMMA", "Number"),
@@ -2499,7 +2499,7 @@ const char* SC_OPCODE_GAMMA_ARY[] =
// -=*# Resource for function BETADIST #*=-
-const char* SC_OPCODE_BETA_DIST_ARY[] =
+const TranslateId SC_OPCODE_BETA_DIST_ARY[] =
{
NC_("SC_OPCODE_BETA_DIST", "Values of the beta distribution."),
NC_("SC_OPCODE_BETA_DIST", "Number"),
@@ -2517,7 +2517,7 @@ const char* SC_OPCODE_BETA_DIST_ARY[] =
};
// -=*# Resource for function BETAINV #*=-
-const char* SC_OPCODE_BETA_INV_ARY[] =
+const TranslateId SC_OPCODE_BETA_INV_ARY[] =
{
NC_("SC_OPCODE_BETA_INV", "Values of the inverse beta distribution."),
NC_("SC_OPCODE_BETA_INV", "Number"),
@@ -2533,7 +2533,7 @@ const char* SC_OPCODE_BETA_INV_ARY[] =
};
// -=*# Resource for function BETA.DIST #*=-
-const char* SC_OPCODE_BETA_DIST_MS_ARY[] =
+const TranslateId SC_OPCODE_BETA_DIST_MS_ARY[] =
{
NC_("SC_OPCODE_BETA_DIST_MS", "Values of the beta distribution."),
NC_("SC_OPCODE_BETA_DIST_MS", "Number"),
@@ -2551,7 +2551,7 @@ const char* SC_OPCODE_BETA_DIST_MS_ARY[] =
};
// -=*# Resource for function BETA.INV #*=-
-const char* SC_OPCODE_BETA_INV_MS_ARY[] =
+const TranslateId SC_OPCODE_BETA_INV_MS_ARY[] =
{
NC_("SC_OPCODE_BETA_INV_MS", "Values of the inverse beta distribution."),
NC_("SC_OPCODE_BETA_INV_MS", "Number"),
@@ -2567,7 +2567,7 @@ const char* SC_OPCODE_BETA_INV_MS_ARY[] =
};
// -=*# Resource for function WEIBULL #*=-
-const char* SC_OPCODE_WEIBULL_ARY[] =
+const TranslateId SC_OPCODE_WEIBULL_ARY[] =
{
NC_("SC_OPCODE_WEIBULL", "Returns the values of the Weibull distribution."),
NC_("SC_OPCODE_WEIBULL", "Number"),
@@ -2581,7 +2581,7 @@ const char* SC_OPCODE_WEIBULL_ARY[] =
};
// -=*# Resource for function WEIBULL.DIST #*=-
-const char* SC_OPCODE_WEIBULL_MS_ARY[] =
+const TranslateId SC_OPCODE_WEIBULL_MS_ARY[] =
{
NC_("SC_OPCODE_WEIBULL_MS", "Returns the values of the Weibull distribution."),
NC_("SC_OPCODE_WEIBULL_MS", "Number"),
@@ -2595,7 +2595,7 @@ const char* SC_OPCODE_WEIBULL_MS_ARY[] =
};
// -=*# Resource for function HYPGEOMDIST #*=-
-const char* SC_OPCODE_HYP_GEOM_DIST_ARY[] =
+const TranslateId SC_OPCODE_HYP_GEOM_DIST_ARY[] =
{
NC_("SC_OPCODE_HYP_GEOM_DIST", "Values of the hypergeometric distribution."),
NC_("SC_OPCODE_HYP_GEOM_DIST", "X"),
@@ -2611,7 +2611,7 @@ const char* SC_OPCODE_HYP_GEOM_DIST_ARY[] =
};
// -=*# Resource for function HYPGEOM.DIST #*=-
-const char* SC_OPCODE_HYP_GEOM_DIST_MS_ARY[] =
+const TranslateId SC_OPCODE_HYP_GEOM_DIST_MS_ARY[] =
{
NC_("SC_OPCODE_HYP_GEOM_DIST_MS", "Values of the hypergeometric distribution."),
NC_("SC_OPCODE_HYP_GEOM_DIST_MS", "X"),
@@ -2627,7 +2627,7 @@ const char* SC_OPCODE_HYP_GEOM_DIST_MS_ARY[] =
};
// -=*# Resource for function TDIST #*=-
-const char* SC_OPCODE_T_DIST_ARY[] =
+const TranslateId SC_OPCODE_T_DIST_ARY[] =
{
NC_("SC_OPCODE_T_DIST", "Returns the t-distribution."),
NC_("SC_OPCODE_T_DIST", "Number"),
@@ -2639,7 +2639,7 @@ const char* SC_OPCODE_T_DIST_ARY[] =
};
// -=*# Resource for function T.DIST.2T #*=-
-const char* SC_OPCODE_T_DIST_2T_ARY[] =
+const TranslateId SC_OPCODE_T_DIST_2T_ARY[] =
{
NC_("SC_OPCODE_T_DIST_2T", "Returns the two-tailed t-distribution."),
NC_("SC_OPCODE_T_DIST_2T", "Number"),
@@ -2649,7 +2649,7 @@ const char* SC_OPCODE_T_DIST_2T_ARY[] =
};
// -=*# Resource for function T.DIST #*=-
-const char* SC_OPCODE_T_DIST_MS_ARY[] =
+const TranslateId SC_OPCODE_T_DIST_MS_ARY[] =
{
NC_("SC_OPCODE_T_DIST_MS", "Returns the t-distribution."),
NC_("SC_OPCODE_T_DIST_MS", "Number"),
@@ -2661,7 +2661,7 @@ const char* SC_OPCODE_T_DIST_MS_ARY[] =
};
// -=*# Resource for function T.DIST.RT #*=-
-const char* SC_OPCODE_T_DIST_RT_ARY[] =
+const TranslateId SC_OPCODE_T_DIST_RT_ARY[] =
{
NC_("SC_OPCODE_T_DIST_RT", "Returns the right-tailed t-distribution."),
NC_("SC_OPCODE_T_DIST_RT", "Number"),
@@ -2671,7 +2671,7 @@ const char* SC_OPCODE_T_DIST_RT_ARY[] =
};
// -=*# Resource for function TINV #*=-
-const char* SC_OPCODE_T_INV_ARY[] =
+const TranslateId SC_OPCODE_T_INV_ARY[] =
{
NC_("SC_OPCODE_T_INV", "Values of the inverse t-distribution."),
NC_("SC_OPCODE_T_INV", "Number"),
@@ -2681,7 +2681,7 @@ const char* SC_OPCODE_T_INV_ARY[] =
};
// -=*# Resource for function T.INV #*=-
-const char* SC_OPCODE_T_INV_MS_ARY[] =
+const TranslateId SC_OPCODE_T_INV_MS_ARY[] =
{
NC_("SC_OPCODE_T_INV_MS", "Values of the left-tailed inverse t-distribution."),
NC_("SC_OPCODE_T_INV_MS", "Number"),
@@ -2691,7 +2691,7 @@ const char* SC_OPCODE_T_INV_MS_ARY[] =
};
// -=*# Resource for function T.INV.2T #*=-
-const char* SC_OPCODE_T_INV_2T_ARY[] =
+const TranslateId SC_OPCODE_T_INV_2T_ARY[] =
{
NC_("SC_OPCODE_T_INV_2T", "Values of the two-tailed inverse t-distribution."),
NC_("SC_OPCODE_T_INV_2T", "Number"),
@@ -2701,7 +2701,7 @@ const char* SC_OPCODE_T_INV_2T_ARY[] =
};
// -=*# Resource for function FDIST #*=-
-const char* SC_OPCODE_F_DIST_ARY[] =
+const TranslateId SC_OPCODE_F_DIST_ARY[] =
{
NC_("SC_OPCODE_F_DIST", "Values of the F probability distribution."),
NC_("SC_OPCODE_F_DIST", "Number"),
@@ -2713,7 +2713,7 @@ const char* SC_OPCODE_F_DIST_ARY[] =
};
// -=*# Resource for function F.DIST #*=-
-const char* SC_OPCODE_F_DIST_LT_ARY[] =
+const TranslateId SC_OPCODE_F_DIST_LT_ARY[] =
{
NC_("SC_OPCODE_F_DIST_LT", "Values of the left tail F probability distribution."),
NC_("SC_OPCODE_F_DIST_LT", "Number"),
@@ -2727,7 +2727,7 @@ const char* SC_OPCODE_F_DIST_LT_ARY[] =
};
// -=*# Resource for function F.DIST.RT #*=-
-const char* SC_OPCODE_F_DIST_RT_ARY[] =
+const TranslateId SC_OPCODE_F_DIST_RT_ARY[] =
{
NC_("SC_OPCODE_F_DIST_RT", "Values of the right tail F probability distribution."),
NC_("SC_OPCODE_F_DIST_RT", "Number"),
@@ -2739,7 +2739,7 @@ const char* SC_OPCODE_F_DIST_RT_ARY[] =
};
// -=*# Resource for function FINV #*=-
-const char* SC_OPCODE_F_INV_ARY[] =
+const TranslateId SC_OPCODE_F_INV_ARY[] =
{
NC_("SC_OPCODE_F_INV", "Values of the inverse F distribution."),
NC_("SC_OPCODE_F_INV", "Number"),
@@ -2751,7 +2751,7 @@ const char* SC_OPCODE_F_INV_ARY[] =
};
// -=*# Resource for function F.INV #*=-
-const char* SC_OPCODE_F_INV_LT_ARY[] =
+const TranslateId SC_OPCODE_F_INV_LT_ARY[] =
{
NC_("SC_OPCODE_F_INV_LT", "Values of the inverse left tail F distribution."),
NC_("SC_OPCODE_F_INV_LT", "Number"),
@@ -2763,7 +2763,7 @@ const char* SC_OPCODE_F_INV_LT_ARY[] =
};
// -=*# Resource for function F.INV.RT #*=-
-const char* SC_OPCODE_F_INV_RT_ARY[] =
+const TranslateId SC_OPCODE_F_INV_RT_ARY[] =
{
NC_("SC_OPCODE_F_INV_RT", "Values of the inverse right tail F distribution."),
NC_("SC_OPCODE_F_INV_RT", "Number"),
@@ -2775,7 +2775,7 @@ const char* SC_OPCODE_F_INV_RT_ARY[] =
};
// -=*# Resource for function CHIDIST #*=-
-const char* SC_OPCODE_CHI_DIST_ARY[] =
+const TranslateId SC_OPCODE_CHI_DIST_ARY[] =
{
NC_("SC_OPCODE_CHI_DIST", "Returns the right-tail probability of the chi-square distribution."),
NC_("SC_OPCODE_CHI_DIST", "Number"),
@@ -2785,7 +2785,7 @@ const char* SC_OPCODE_CHI_DIST_ARY[] =
};
// -=*# Resource for function CHISQ.DIST.RT #*=-
-const char* SC_OPCODE_CHI_DIST_MS_ARY[] =
+const TranslateId SC_OPCODE_CHI_DIST_MS_ARY[] =
{
NC_("SC_OPCODE_CHI_DIST_MS", "Returns the right-tail probability of the chi-square distribution."),
NC_("SC_OPCODE_CHI_DIST_MS", "Number"),
@@ -2796,7 +2796,7 @@ const char* SC_OPCODE_CHI_DIST_MS_ARY[] =
// -=*# Resource for function CHISQDIST #*=-
-const char* SC_OPCODE_CHISQ_DIST_ARY[] =
+const TranslateId SC_OPCODE_CHISQ_DIST_ARY[] =
{
NC_("SC_OPCODE_CHISQ_DIST", "Returns left-tail probability of the cumulative distribution function or values of the probability density function of the chi-square distribution."),
NC_("SC_OPCODE_CHISQ_DIST", "Number"),
@@ -2809,7 +2809,7 @@ const char* SC_OPCODE_CHISQ_DIST_ARY[] =
// -=*# Resource for function CHISQ.DIST #*=-
-const char* SC_OPCODE_CHISQ_DIST_MS_ARY[] =
+const TranslateId SC_OPCODE_CHISQ_DIST_MS_ARY[] =
{
NC_("SC_OPCODE_CHISQ_DIST_MS", "Returns left-tail probability of the cumulative distribution function or values of the probability density function of the chi-square distribution."),
NC_("SC_OPCODE_CHISQ_DIST_MS", "Number"),
@@ -2822,7 +2822,7 @@ const char* SC_OPCODE_CHISQ_DIST_MS_ARY[] =
// -=*# Resource for function CHIINV #*=-
-const char* SC_OPCODE_CHI_INV_ARY[] =
+const TranslateId SC_OPCODE_CHI_INV_ARY[] =
{
NC_("SC_OPCODE_CHI_INV", "Values of the inverse of CHIDIST(x; DegreesOfFreedom)."),
NC_("SC_OPCODE_CHI_INV", "Number"),
@@ -2833,7 +2833,7 @@ const char* SC_OPCODE_CHI_INV_ARY[] =
// -=*# Resource for function CHISQ.INV.RT #*=-
-const char* SC_OPCODE_CHI_INV_MS_ARY[] =
+const TranslateId SC_OPCODE_CHI_INV_MS_ARY[] =
{
NC_("SC_OPCODE_CHI_INV_MS", "Values of the inverse of CHIDIST(x; DegreesOfFreedom)."),
NC_("SC_OPCODE_CHI_INV_MS", "Number"),
@@ -2844,7 +2844,7 @@ const char* SC_OPCODE_CHI_INV_MS_ARY[] =
// -=*# Resource for function CHISQINV #*=-
-const char* SC_OPCODE_CHISQ_INV_ARY[] =
+const TranslateId SC_OPCODE_CHISQ_INV_ARY[] =
{
NC_("SC_OPCODE_CHISQ_INV", "Values of the inverse of CHISQDIST(x;DegreesOfFreedom;TRUE())."),
NC_("SC_OPCODE_CHISQ_INV", "Probability"),
@@ -2855,7 +2855,7 @@ const char* SC_OPCODE_CHISQ_INV_ARY[] =
// -=*# Resource for function CHISQ.INV #*=-
-const char* SC_OPCODE_CHISQ_INV_MS_ARY[] =
+const TranslateId SC_OPCODE_CHISQ_INV_MS_ARY[] =
{
NC_("SC_OPCODE_CHISQ_INV_MS", "Values of the inverse of CHISQ.DIST(x;DegreesOfFreedom;TRUE())."),
NC_("SC_OPCODE_CHISQ_INV_MS", "Probability"),
@@ -2866,7 +2866,7 @@ const char* SC_OPCODE_CHISQ_INV_MS_ARY[] =
// -=*# Resource for function STANDARDIZE #*=-
-const char* SC_OPCODE_STANDARD_ARY[] =
+const TranslateId SC_OPCODE_STANDARD_ARY[] =
{
NC_("SC_OPCODE_STANDARD", "Converts a random variable to a normalized value."),
NC_("SC_OPCODE_STANDARD", "Number"),
@@ -2878,7 +2878,7 @@ const char* SC_OPCODE_STANDARD_ARY[] =
};
// -=*# Resource for function PERMUT #*=-
-const char* SC_OPCODE_PERMUT_ARY[] =
+const TranslateId SC_OPCODE_PERMUT_ARY[] =
{
NC_("SC_OPCODE_PERMUT", "Returns the number of permutations for a given number of elements without repetition."),
NC_("SC_OPCODE_PERMUT", "Count 1"),
@@ -2888,7 +2888,7 @@ const char* SC_OPCODE_PERMUT_ARY[] =
};
// -=*# Resource for function PERMUTATIONA #*=-
-const char* SC_OPCODE_PERMUTATION_A_ARY[] =
+const TranslateId SC_OPCODE_PERMUTATION_A_ARY[] =
{
NC_("SC_OPCODE_PERMUTATION_A", "Returns the number of permutations for a given number of objects (repetition allowed)."),
NC_("SC_OPCODE_PERMUTATION_A", "Count 1"),
@@ -2898,7 +2898,7 @@ const char* SC_OPCODE_PERMUTATION_A_ARY[] =
};
// -=*# Resource for function CONFIDENCE #*=-
-const char* SC_OPCODE_CONFIDENCE_ARY[] =
+const TranslateId SC_OPCODE_CONFIDENCE_ARY[] =
{
NC_("SC_OPCODE_CONFIDENCE", "Returns a (1-alpha) confidence interval for a normal distribution."),
NC_("SC_OPCODE_CONFIDENCE", "Alpha"),
@@ -2910,7 +2910,7 @@ const char* SC_OPCODE_CONFIDENCE_ARY[] =
};
// -=*# Resource for function CONFIDENCE.NORM #*=-
-const char* SC_OPCODE_CONFIDENCE_N_ARY[] =
+const TranslateId SC_OPCODE_CONFIDENCE_N_ARY[] =
{
NC_("SC_OPCODE_CONFIDENCE_N", "Returns a (1-alpha) confidence interval for a normal distribution."),
NC_("SC_OPCODE_CONFIDENCE_N", "Alpha"),
@@ -2922,7 +2922,7 @@ const char* SC_OPCODE_CONFIDENCE_N_ARY[] =
};
// -=*# Resource for function CONFIDENCE.T #*=-
-const char* SC_OPCODE_CONFIDENCE_T_ARY[] =
+const TranslateId SC_OPCODE_CONFIDENCE_T_ARY[] =
{
NC_("SC_OPCODE_CONFIDENCE_T", "Returns a (1-alpha) confidence interval for a Student's t distribution."),
NC_("SC_OPCODE_CONFIDENCE_T", "Alpha"),
@@ -2934,7 +2934,7 @@ const char* SC_OPCODE_CONFIDENCE_T_ARY[] =
};
// -=*# Resource for function ZTEST #*=-
-const char* SC_OPCODE_Z_TEST_ARY[] =
+const TranslateId SC_OPCODE_Z_TEST_ARY[] =
{
NC_("SC_OPCODE_Z_TEST", "Calculates the probability of observing a z-statistic greater than the one computed based on a sample."),
NC_("SC_OPCODE_Z_TEST", "Data"),
@@ -2946,7 +2946,7 @@ const char* SC_OPCODE_Z_TEST_ARY[] =
};
// -=*# Resource for function Z.TEST #*=-
-const char* SC_OPCODE_Z_TEST_MS_ARY[] =
+const TranslateId SC_OPCODE_Z_TEST_MS_ARY[] =
{
NC_("SC_OPCODE_Z_TEST_MS", "Calculates the probability of observing a z-statistic greater than the one computed based on a sample."),
NC_("SC_OPCODE_Z_TEST_MS", "Data"),
@@ -2958,7 +2958,7 @@ const char* SC_OPCODE_Z_TEST_MS_ARY[] =
};
// -=*# Resource for function CHITEST #*=-
-const char* SC_OPCODE_CHI_TEST_ARY[] =
+const TranslateId SC_OPCODE_CHI_TEST_ARY[] =
{
NC_("SC_OPCODE_CHI_TEST", "Returns the chi square independence test."),
NC_("SC_OPCODE_CHI_TEST", "Data B"),
@@ -2968,7 +2968,7 @@ const char* SC_OPCODE_CHI_TEST_ARY[] =
};
// -=*# Resource for function CHISQ.TEST #*=-
-const char* SC_OPCODE_CHI_TEST_MS_ARY[] =
+const TranslateId SC_OPCODE_CHI_TEST_MS_ARY[] =
{
NC_("SC_OPCODE_CHI_TEST_MS", "Returns the chi square independence test."),
NC_("SC_OPCODE_CHI_TEST_MS", "Data B"),
@@ -2978,7 +2978,7 @@ const char* SC_OPCODE_CHI_TEST_MS_ARY[] =
};
// -=*# Resource for function FTEST #*=-
-const char* SC_OPCODE_F_TEST_ARY[] =
+const TranslateId SC_OPCODE_F_TEST_ARY[] =
{
NC_("SC_OPCODE_F_TEST", "Calculates the F test."),
NC_("SC_OPCODE_F_TEST", "Data 1"),
@@ -2988,7 +2988,7 @@ const char* SC_OPCODE_F_TEST_ARY[] =
};
// -=*# Resource for function F.TEST #*=-
-const char* SC_OPCODE_F_TEST_MS_ARY[] =
+const TranslateId SC_OPCODE_F_TEST_MS_ARY[] =
{
NC_("SC_OPCODE_F_TEST_MS", "Calculates the F test."),
NC_("SC_OPCODE_F_TEST_MS", "Data 1"),
@@ -2998,7 +2998,7 @@ const char* SC_OPCODE_F_TEST_MS_ARY[] =
};
// -=*# Resource for function TTEST #*=-
-const char* SC_OPCODE_T_TEST_ARY[] =
+const TranslateId SC_OPCODE_T_TEST_ARY[] =
{
NC_("SC_OPCODE_T_TEST", "Calculates the T test."),
NC_("SC_OPCODE_T_TEST", "Data 1"),
@@ -3012,7 +3012,7 @@ const char* SC_OPCODE_T_TEST_ARY[] =
};
// -=*# Resource for function T.TEST #*=-
-const char* SC_OPCODE_T_TEST_MS_ARY[] =
+const TranslateId SC_OPCODE_T_TEST_MS_ARY[] =
{
NC_("SC_OPCODE_T_TEST_MS", "Calculates the T test."),
NC_("SC_OPCODE_T_TEST_MS", "Data 1"),
@@ -3026,7 +3026,7 @@ const char* SC_OPCODE_T_TEST_MS_ARY[] =
};
// -=*# Resource for function RSQ #*=-
-const char* SC_OPCODE_RSQ_ARY[] =
+const TranslateId SC_OPCODE_RSQ_ARY[] =
{
NC_("SC_OPCODE_RSQ", "Returns the square of the Pearson product moment correlation coefficient."),
NC_("SC_OPCODE_RSQ", "Data Y"),
@@ -3036,7 +3036,7 @@ const char* SC_OPCODE_RSQ_ARY[] =
};
// -=*# Resource for function INTERCEPT #*=-
-const char* SC_OPCODE_INTERCEPT_ARY[] =
+const TranslateId SC_OPCODE_INTERCEPT_ARY[] =
{
NC_("SC_OPCODE_INTERCEPT", "Returns the intercept of the linear regression line and the Y axis."),
NC_("SC_OPCODE_INTERCEPT", "Data Y"),
@@ -3046,7 +3046,7 @@ const char* SC_OPCODE_INTERCEPT_ARY[] =
};
// -=*# Resource for function SLOPE #*=-
-const char* SC_OPCODE_SLOPE_ARY[] =
+const TranslateId SC_OPCODE_SLOPE_ARY[] =
{
NC_("SC_OPCODE_SLOPE", "Returns the slope of the linear regression line."),
NC_("SC_OPCODE_SLOPE", "Data Y"),
@@ -3056,7 +3056,7 @@ const char* SC_OPCODE_SLOPE_ARY[] =
};
// -=*# Resource for function STEYX #*=-
-const char* SC_OPCODE_STEYX_ARY[] =
+const TranslateId SC_OPCODE_STEYX_ARY[] =
{
NC_("SC_OPCODE_STEYX", "Returns the standard error of the linear regression."),
NC_("SC_OPCODE_STEYX", "Data Y"),
@@ -3066,7 +3066,7 @@ const char* SC_OPCODE_STEYX_ARY[] =
};
// -=*# Resource for function PEARSON #*=-
-const char* SC_OPCODE_PEARSON_ARY[] =
+const TranslateId SC_OPCODE_PEARSON_ARY[] =
{
NC_("SC_OPCODE_PEARSON", "Returns the Pearson product moment correlation coefficient."),
NC_("SC_OPCODE_PEARSON", "Data 1"),
@@ -3076,7 +3076,7 @@ const char* SC_OPCODE_PEARSON_ARY[] =
};
// -=*# Resource for function CORREL #*=-
-const char* SC_OPCODE_CORREL_ARY[] =
+const TranslateId SC_OPCODE_CORREL_ARY[] =
{
NC_("SC_OPCODE_CORREL", "Returns the correlation coefficient."),
NC_("SC_OPCODE_CORREL", "Data 1"),
@@ -3086,7 +3086,7 @@ const char* SC_OPCODE_CORREL_ARY[] =
};
// -=*# Resource for function COVAR #*=-
-const char* SC_OPCODE_COVAR_ARY[] =
+const TranslateId SC_OPCODE_COVAR_ARY[] =
{
NC_("SC_OPCODE_COVAR", "Calculates the population covariance."),
NC_("SC_OPCODE_COVAR", "Data 1"),
@@ -3096,7 +3096,7 @@ const char* SC_OPCODE_COVAR_ARY[] =
};
// -=*# Resource for function COVARIANCE.P #*=-
-const char* SC_OPCODE_COVARIANCE_P_ARY[] =
+const TranslateId SC_OPCODE_COVARIANCE_P_ARY[] =
{
NC_("SC_OPCODE_COVARIANCE_P", "Calculates the population covariance."),
NC_("SC_OPCODE_COVARIANCE_P", "Data 1"),
@@ -3106,7 +3106,7 @@ const char* SC_OPCODE_COVARIANCE_P_ARY[] =
};
// -=*# Resource for function COVARIANCE.S #*=-
-const char* SC_OPCODE_COVARIANCE_S_ARY[] =
+const TranslateId SC_OPCODE_COVARIANCE_S_ARY[] =
{
NC_("SC_OPCODE_COVARIANCE_S", "Calculates the sample covariance."),
NC_("SC_OPCODE_COVARIANCE_S", "Data 1"),
@@ -3116,7 +3116,7 @@ const char* SC_OPCODE_COVARIANCE_S_ARY[] =
};
// -=*# Resource for function FORECAST #*=-
-const char* SC_OPCODE_FORECAST_ARY[] =
+const TranslateId SC_OPCODE_FORECAST_ARY[] =
{
NC_("SC_OPCODE_FORECAST", "Returns a value along a linear regression"),
NC_("SC_OPCODE_FORECAST", "Value"),
@@ -3128,7 +3128,7 @@ const char* SC_OPCODE_FORECAST_ARY[] =
};
// -=*# Resource for function FORECAST.ETS #*=-
-const char* SC_OPCODE_FORECAST_ETS_ADD_ARY[] =
+const TranslateId SC_OPCODE_FORECAST_ETS_ADD_ARY[] =
{
NC_("SC_OPCODE_FORECAST_ETS_ADD", "Calculates future value(s) using additive Exponential Smoothing algorithm."),
NC_("SC_OPCODE_FORECAST_ETS_ADD", "Target"),
@@ -3146,7 +3146,7 @@ const char* SC_OPCODE_FORECAST_ETS_ADD_ARY[] =
};
// -=*# Resource for function FORECAST.ETS.MULT #*=-
-const char* SC_OPCODE_FORECAST_ETS_MUL_ARY[] =
+const TranslateId SC_OPCODE_FORECAST_ETS_MUL_ARY[] =
{
NC_("SC_OPCODE_FORECAST_ETS_MUL", "Calculates future value(s) using multiplicative Exponential Smoothing algorithm."),
NC_("SC_OPCODE_FORECAST_ETS_MUL", "Target"),
@@ -3164,7 +3164,7 @@ const char* SC_OPCODE_FORECAST_ETS_MUL_ARY[] =
};
// -=*# Resource for function FORECAST.ETS.CONFINT #*=-
-const char* SC_OPCODE_FORECAST_ETS_PIA_ARY[] =
+const TranslateId SC_OPCODE_FORECAST_ETS_PIA_ARY[] =
{
NC_("SC_OPCODE_FORECAST_ETS_PIA", "Returns a prediction interval at the specified target value(s) for additive Exponential Smoothing method"),
NC_("SC_OPCODE_FORECAST_ETS_PIA", "Target"),
@@ -3184,7 +3184,7 @@ const char* SC_OPCODE_FORECAST_ETS_PIA_ARY[] =
};
// -=*# Resource for function FORECAST.ETS.PI.MULT #*=-
-const char* SC_OPCODE_FORECAST_ETS_PIM_ARY[] =
+const TranslateId SC_OPCODE_FORECAST_ETS_PIM_ARY[] =
{
NC_("SC_OPCODE_FORECAST_ETS_PIM", "Returns a prediction interval at the specified target value(s) for multiplicative Exponential Smoothing method"),
NC_("SC_OPCODE_FORECAST_ETS_PIM", "Target"),
@@ -3204,7 +3204,7 @@ const char* SC_OPCODE_FORECAST_ETS_PIM_ARY[] =
};
// -=*# Resource for function FORECAST.ETS.SEASONALITY #*=-
-const char* SC_OPCODE_FORECAST_ETS_SEA_ARY[] =
+const TranslateId SC_OPCODE_FORECAST_ETS_SEA_ARY[] =
{
NC_("SC_OPCODE_FORECAST_ETS_SEA", "Calculates the number of samples in period (season) using additive Exponential Triple Smoothing algorithm."),
NC_("SC_OPCODE_FORECAST_ETS_SEA", "Values"),
@@ -3218,7 +3218,7 @@ const char* SC_OPCODE_FORECAST_ETS_SEA_ARY[] =
};
// -=*# Resource for function FORECAST.ETS.STAT #*=-
-const char* SC_OPCODE_FORECAST_ETS_STA_ARY[] =
+const TranslateId SC_OPCODE_FORECAST_ETS_STA_ARY[] =
{
NC_("SC_OPCODE_FORECAST_ETS_STA", "Returns statistical value(s) using additive Exponential Smoothing algorithm."),
NC_("SC_OPCODE_FORECAST_ETS_STA", "Values"),
@@ -3236,7 +3236,7 @@ const char* SC_OPCODE_FORECAST_ETS_STA_ARY[] =
};
// -=*# Resource for function FORECAST.ETS.STAT.MULT #*=-
-const char* SC_OPCODE_FORECAST_ETS_STM_ARY[] =
+const TranslateId SC_OPCODE_FORECAST_ETS_STM_ARY[] =
{
NC_("SC_OPCODE_FORECAST_ETS_STM", "Returns statistical value(s) using multiplicative Exponential Smoothing algorithm."),
NC_("SC_OPCODE_FORECAST_ETS_STM", "Values"),
@@ -3254,7 +3254,7 @@ const char* SC_OPCODE_FORECAST_ETS_STM_ARY[] =
};
// -=*# Resource for function FORECAST.LINEAR #*=-
-const char* SC_OPCODE_FORECAST_LIN_ARY[] =
+const TranslateId SC_OPCODE_FORECAST_LIN_ARY[] =
{
NC_("SC_OPCODE_FORECAST_LIN", "Returns a value along a linear regression"),
NC_("SC_OPCODE_FORECAST_LIN", "Value"),
@@ -3266,7 +3266,7 @@ const char* SC_OPCODE_FORECAST_LIN_ARY[] =
};
// -=*# Resource for function ADDRESS #*=-
-const char* SC_OPCODE_ADDRESS_ARY[] =
+const TranslateId SC_OPCODE_ADDRESS_ARY[] =
{
NC_("SC_OPCODE_ADDRESS", "Returns the reference to a cell as text."),
NC_("SC_OPCODE_ADDRESS", "Row"),
@@ -3282,7 +3282,7 @@ const char* SC_OPCODE_ADDRESS_ARY[] =
};
// -=*# Resource for function AREAS #*=-
-const char* SC_OPCODE_AREAS_ARY[] =
+const TranslateId SC_OPCODE_AREAS_ARY[] =
{
NC_("SC_OPCODE_AREAS", "Returns the number of individual ranges that belong to a (multiple) range."),
NC_("SC_OPCODE_AREAS", "Reference"),
@@ -3290,7 +3290,7 @@ const char* SC_OPCODE_AREAS_ARY[] =
};
// -=*# Resource for function CHOOSE #*=-
-const char* SC_OPCODE_CHOOSE_ARY[] =
+const TranslateId SC_OPCODE_CHOOSE_ARY[] =
{
NC_("SC_OPCODE_CHOOSE", "Selects a value from a list of up to 30 value arguments."),
NC_("SC_OPCODE_CHOOSE", "Index"),
@@ -3300,7 +3300,7 @@ const char* SC_OPCODE_CHOOSE_ARY[] =
};
// -=*# Resource for function COLUMNS #*=-
-const char* SC_OPCODE_COLUMN_ARY[] =
+const TranslateId SC_OPCODE_COLUMN_ARY[] =
{
NC_("SC_OPCODE_COLUMN", "Returns the internal column number of a reference."),
NC_("SC_OPCODE_COLUMN", "Reference"),
@@ -3308,7 +3308,7 @@ const char* SC_OPCODE_COLUMN_ARY[] =
};
// -=*# Resource for function ROW #*=-
-const char* SC_OPCODE_ROW_ARY[] =
+const TranslateId SC_OPCODE_ROW_ARY[] =
{
NC_("SC_OPCODE_ROW", "Defines the internal row number of a reference."),
NC_("SC_OPCODE_ROW", "Reference"),
@@ -3316,7 +3316,7 @@ const char* SC_OPCODE_ROW_ARY[] =
};
// -=*# Resource for function SHEET #*=-
-const char* SC_OPCODE_SHEET_ARY[] =
+const TranslateId SC_OPCODE_SHEET_ARY[] =
{
NC_("SC_OPCODE_SHEET", "Returns the internal sheet number of a reference or a string."),
NC_("SC_OPCODE_SHEET", "Reference"),
@@ -3324,7 +3324,7 @@ const char* SC_OPCODE_SHEET_ARY[] =
};
// -=*# Resource for function COLUMNS #*=-
-const char* SC_OPCODE_COLUMNS_ARY[] =
+const TranslateId SC_OPCODE_COLUMNS_ARY[] =
{
NC_("SC_OPCODE_COLUMNS", "Returns the number of columns in an array or reference."),
NC_("SC_OPCODE_COLUMNS", "Array"),
@@ -3332,7 +3332,7 @@ const char* SC_OPCODE_COLUMNS_ARY[] =
};
// -=*# Resource for function ROWS #*=-
-const char* SC_OPCODE_ROWS_ARY[] =
+const TranslateId SC_OPCODE_ROWS_ARY[] =
{
NC_("SC_OPCODE_ROWS", "Returns the number of rows in a reference or array."),
NC_("SC_OPCODE_ROWS", "Array"),
@@ -3340,7 +3340,7 @@ const char* SC_OPCODE_ROWS_ARY[] =
};
// -=*# Resource for function SHEETS #*=-
-const char* SC_OPCODE_SHEETS_ARY[] =
+const TranslateId SC_OPCODE_SHEETS_ARY[] =
{
NC_("SC_OPCODE_SHEETS", "Returns the number of sheets of a given reference. If no parameter has been entered, the total number of sheets in the document is returned."),
NC_("SC_OPCODE_SHEETS", "Reference"),
@@ -3348,7 +3348,7 @@ const char* SC_OPCODE_SHEETS_ARY[] =
};
// -=*# Resource for function HLOOKUP #*=-
-const char* SC_OPCODE_H_LOOKUP_ARY[] =
+const TranslateId SC_OPCODE_H_LOOKUP_ARY[] =
{
NC_("SC_OPCODE_H_LOOKUP", "Horizontal search and reference to the cells located below."),
NC_("SC_OPCODE_H_LOOKUP", "Search criterion"),
@@ -3362,7 +3362,7 @@ const char* SC_OPCODE_H_LOOKUP_ARY[] =
};
// -=*# Resource for function VLOOKUP #*=-
-const char* SC_OPCODE_V_LOOKUP_ARY[] =
+const TranslateId SC_OPCODE_V_LOOKUP_ARY[] =
{
NC_("SC_OPCODE_V_LOOKUP", "Vertical search and reference to indicated cells."),
NC_("SC_OPCODE_V_LOOKUP", "Search criterion"),
@@ -3376,7 +3376,7 @@ const char* SC_OPCODE_V_LOOKUP_ARY[] =
};
// -=*# Resource for function INDEX #*=-
-const char* SC_OPCODE_INDEX_ARY[] =
+const TranslateId SC_OPCODE_INDEX_ARY[] =
{
NC_("SC_OPCODE_INDEX", "Returns a reference to a cell from a defined range."),
NC_("SC_OPCODE_INDEX", "Reference"),
@@ -3390,7 +3390,7 @@ const char* SC_OPCODE_INDEX_ARY[] =
};
// -=*# Resource for function INDIRECT #*=-
-const char* SC_OPCODE_INDIRECT_ARY[] =
+const TranslateId SC_OPCODE_INDIRECT_ARY[] =
{
NC_("SC_OPCODE_INDIRECT", "Returns the contents of a cell that is referenced in text form."),
NC_("SC_OPCODE_INDIRECT", "Reference"),
@@ -3400,7 +3400,7 @@ const char* SC_OPCODE_INDIRECT_ARY[] =
};
// -=*# Resource for function LOOKUP #*=-
-const char* SC_OPCODE_LOOKUP_ARY[] =
+const TranslateId SC_OPCODE_LOOKUP_ARY[] =
{
NC_("SC_OPCODE_LOOKUP", "Determines a value in a vector by comparison to values in another vector."),
NC_("SC_OPCODE_LOOKUP", "Search criterion"),
@@ -3412,7 +3412,7 @@ const char* SC_OPCODE_LOOKUP_ARY[] =
};
// -=*# Resource for function MATCH #*=-
-const char* SC_OPCODE_MATCH_ARY[] =
+const TranslateId SC_OPCODE_MATCH_ARY[] =
{
NC_("SC_OPCODE_MATCH", "Defines a position in an array after comparing values."),
NC_("SC_OPCODE_MATCH", "Search criterion"),
@@ -3424,7 +3424,7 @@ const char* SC_OPCODE_MATCH_ARY[] =
};
// -=*# Resource for function OFFSET #*=-
-const char* SC_OPCODE_OFFSET_ARY[] =
+const TranslateId SC_OPCODE_OFFSET_ARY[] =
{
NC_("SC_OPCODE_OFFSET", "Returns a reference which has been moved in relation to the starting point."),
NC_("SC_OPCODE_OFFSET", "Reference"),
@@ -3440,7 +3440,7 @@ const char* SC_OPCODE_OFFSET_ARY[] =
};
// -=*# Resource for function ERRORTYPE #*=-
-const char* SC_OPCODE_ERROR_TYPE_ARY[] =
+const TranslateId SC_OPCODE_ERROR_TYPE_ARY[] =
{
NC_("SC_OPCODE_ERROR_TYPE", "Returns a number corresponding to an error type"),
NC_("SC_OPCODE_ERROR_TYPE", "Reference"),
@@ -3448,7 +3448,7 @@ const char* SC_OPCODE_ERROR_TYPE_ARY[] =
};
// -=*# Resource for function ERROR.TYPE #*=-
-const char* SC_OPCODE_ERROR_TYPE_ODF_ARY[] =
+const TranslateId SC_OPCODE_ERROR_TYPE_ODF_ARY[] =
{
NC_("SC_OPCODE_ERROR_TYPE_ODF", "Returns a number corresponding to one of the error values or #N/A if no error exists"),
NC_("SC_OPCODE_ERROR_TYPE_ODF", "Expression"),
@@ -3456,7 +3456,7 @@ const char* SC_OPCODE_ERROR_TYPE_ODF_ARY[] =
};
// -=*# Resource for function STYLE #*=-
-const char* SC_OPCODE_STYLE_ARY[] =
+const TranslateId SC_OPCODE_STYLE_ARY[] =
{
NC_("SC_OPCODE_STYLE", "Applies a Style to the formula cell."),
NC_("SC_OPCODE_STYLE", "Style"),
@@ -3468,7 +3468,7 @@ const char* SC_OPCODE_STYLE_ARY[] =
};
// -=*# Resource for function DDE #*=-
-const char* SC_OPCODE_DDE_ARY[] =
+const TranslateId SC_OPCODE_DDE_ARY[] =
{
NC_("SC_OPCODE_DDE", "Result of a DDE link."),
NC_("SC_OPCODE_DDE", "Server"),
@@ -3482,7 +3482,7 @@ const char* SC_OPCODE_DDE_ARY[] =
};
// -=*# Resource for function HYPERLINK #*=-
-const char* SC_OPCODE_HYPERLINK_ARY[] =
+const TranslateId SC_OPCODE_HYPERLINK_ARY[] =
{
NC_("SC_OPCODE_HYPERLINK", "Construct a Hyperlink."),
NC_("SC_OPCODE_HYPERLINK", "URL"),
@@ -3492,7 +3492,7 @@ const char* SC_OPCODE_HYPERLINK_ARY[] =
};
// -=*# Resource for function GETPIVOTDATA #*=-
-const char* SC_OPCODE_GET_PIVOT_DATA_ARY[] =
+const TranslateId SC_OPCODE_GET_PIVOT_DATA_ARY[] =
{
NC_("SC_OPCODE_GET_PIVOT_DATA", "Extracts value(s) from a pivot table."),
NC_("SC_OPCODE_GET_PIVOT_DATA", "Data field"),
@@ -3504,7 +3504,7 @@ const char* SC_OPCODE_GET_PIVOT_DATA_ARY[] =
};
// -=*# Resource for function BAHTTEXT #*=-
-const char* SC_OPCODE_BAHTTEXT_ARY[] =
+const TranslateId SC_OPCODE_BAHTTEXT_ARY[] =
{
NC_("SC_OPCODE_BAHTTEXT", "Converts a number to text (Baht)."),
NC_("SC_OPCODE_BAHTTEXT", "Number"),
@@ -3512,7 +3512,7 @@ const char* SC_OPCODE_BAHTTEXT_ARY[] =
};
// -=*# Resource for function JIS #*=-
-const char* SC_OPCODE_JIS_ARY[] =
+const TranslateId SC_OPCODE_JIS_ARY[] =
{
NC_("SC_OPCODE_JIS", "Converts half-width ASCII and katakana characters to full-width."),
NC_("SC_OPCODE_JIS", "Text"),
@@ -3520,7 +3520,7 @@ const char* SC_OPCODE_JIS_ARY[] =
};
// -=*# Resource for function ASC #*=-
-const char* SC_OPCODE_ASC_ARY[] =
+const TranslateId SC_OPCODE_ASC_ARY[] =
{
NC_("SC_OPCODE_ASC", "Converts full-width ASCII and katakana characters to half-width."),
NC_("SC_OPCODE_ASC", "Text"),
@@ -3528,7 +3528,7 @@ const char* SC_OPCODE_ASC_ARY[] =
};
// -=*# Resource for function CODE #*=-
-const char* SC_OPCODE_CODE_ARY[] =
+const TranslateId SC_OPCODE_CODE_ARY[] =
{
NC_("SC_OPCODE_CODE", "Returns a numeric code for the first character in a text string."),
NC_("SC_OPCODE_CODE", "Text"),
@@ -3536,7 +3536,7 @@ const char* SC_OPCODE_CODE_ARY[] =
};
// -=*# Resource for function DOLLAR #*=-
-const char* SC_OPCODE_CURRENCY_ARY[] =
+const TranslateId SC_OPCODE_CURRENCY_ARY[] =
{
NC_("SC_OPCODE_CURRENCY", "Converts a number to text in currency format."),
NC_("SC_OPCODE_CURRENCY", "Value"),
@@ -3546,7 +3546,7 @@ const char* SC_OPCODE_CURRENCY_ARY[] =
};
// -=*# Resource for function CHAR #*=-
-const char* SC_OPCODE_CHAR_ARY[] =
+const TranslateId SC_OPCODE_CHAR_ARY[] =
{
NC_("SC_OPCODE_CHAR", "Converts a code number into a character or letter."),
NC_("SC_OPCODE_CHAR", "Number"),
@@ -3554,7 +3554,7 @@ const char* SC_OPCODE_CHAR_ARY[] =
};
// -=*# Resource for function CLEAN #*=-
-const char* SC_OPCODE_CLEAN_ARY[] =
+const TranslateId SC_OPCODE_CLEAN_ARY[] =
{
NC_("SC_OPCODE_CLEAN", "Removes all nonprintable characters from text."),
NC_("SC_OPCODE_CLEAN", "Text"),
@@ -3562,7 +3562,7 @@ const char* SC_OPCODE_CLEAN_ARY[] =
};
// -=*# Resource for function CONCATENATE #*=-
-const char* SC_OPCODE_CONCAT_ARY[] =
+const TranslateId SC_OPCODE_CONCAT_ARY[] =
{
NC_("SC_OPCODE_CONCAT", "Combines several text items into one."),
NC_("SC_OPCODE_CONCAT", "Text"),
@@ -3570,7 +3570,7 @@ const char* SC_OPCODE_CONCAT_ARY[] =
};
// -=*# Resource for function CONCAT #*=-
-const char* SC_OPCODE_CONCAT_MS_ARY[] =
+const TranslateId SC_OPCODE_CONCAT_MS_ARY[] =
{
NC_("SC_OPCODE_CONCAT_MS", "Combines several text items into one, accepts cell ranges as arguments."),
NC_("SC_OPCODE_CONCAT_MS", "Text"),
@@ -3578,7 +3578,7 @@ const char* SC_OPCODE_CONCAT_MS_ARY[] =
};
// -=*# Resource for function TEXTJOIN #*=-
-const char* SC_OPCODE_TEXTJOIN_MS_ARY[] =
+const TranslateId SC_OPCODE_TEXTJOIN_MS_ARY[] =
{
NC_("SC_OPCODE_TEXTJOIN_MS", "Combines several text items into one, accepts cell ranges as arguments. Uses delimiter between items."),
NC_("SC_OPCODE_TEXTJOIN_MS", "Delimiter"),
@@ -3590,7 +3590,7 @@ const char* SC_OPCODE_TEXTJOIN_MS_ARY[] =
};
// -=*# Resource for function IFS #*=-
-const char* SC_OPCODE_IFS_MS_ARY[] =
+const TranslateId SC_OPCODE_IFS_MS_ARY[] =
{
NC_("SC_OPCODE_IFS_MS", "Checks 1 or more conditions and returns a value corresponding to the first true condition."),
NC_("SC_OPCODE_IFS_MS", "Test"),
@@ -3600,7 +3600,7 @@ const char* SC_OPCODE_IFS_MS_ARY[] =
};
// -=*# Resource for function SWITCH #*=-
-const char* SC_OPCODE_SWITCH_MS_ARY[] =
+const TranslateId SC_OPCODE_SWITCH_MS_ARY[] =
{
NC_("SC_OPCODE_SWITCH_MS", "Compares expression against list of value/result pairs, and returns result for first value that matches the expression. If expression does not match any value, a default result is returned, if it is placed as final item in parameter list without a value."),
NC_("SC_OPCODE_SWITCH_MS", "Expression"),
@@ -3611,7 +3611,7 @@ const char* SC_OPCODE_SWITCH_MS_ARY[] =
NC_("SC_OPCODE_SWITCH_MS", "Value to return when corresponding value argument matches expression.")
};
-const char* SC_OPCODE_MINIFS_MS_ARY[] =
+const TranslateId SC_OPCODE_MINIFS_MS_ARY[] =
{
NC_("SC_OPCODE_MINIFS_MS", "Returns the minimum value in a range that meet multiple criteria in multiple ranges."),
NC_("SC_OPCODE_MINIFS_MS", "Min range"),
@@ -3622,7 +3622,7 @@ const char* SC_OPCODE_MINIFS_MS_ARY[] =
NC_("SC_OPCODE_MINIFS_MS", "Criteria 1, criteria 2,... are the criteria to be applied to the ranges given.")
};
-const char* SC_OPCODE_MAXIFS_MS_ARY[] =
+const TranslateId SC_OPCODE_MAXIFS_MS_ARY[] =
{
NC_("SC_OPCODE_MAXIFS_MS", "Returns the maximum value in a range that meet multiple criteria in multiple ranges."),
NC_("SC_OPCODE_MAXIFS_MS", "Max range"),
@@ -3634,7 +3634,7 @@ const char* SC_OPCODE_MAXIFS_MS_ARY[] =
};
// -=*# Resource for function EXACT #*=-
-const char* SC_OPCODE_EXACT_ARY[] =
+const TranslateId SC_OPCODE_EXACT_ARY[] =
{
NC_("SC_OPCODE_EXACT", "Specifies whether two texts are identical."),
NC_("SC_OPCODE_EXACT", "Text 1"),
@@ -3644,7 +3644,7 @@ const char* SC_OPCODE_EXACT_ARY[] =
};
// -=*# Resource for function FIND #*=-
-const char* SC_OPCODE_FIND_ARY[] =
+const TranslateId SC_OPCODE_FIND_ARY[] =
{
NC_("SC_OPCODE_FIND", "Looks for a string of text within another (case sensitive)"),
NC_("SC_OPCODE_FIND", "Find text"),
@@ -3656,7 +3656,7 @@ const char* SC_OPCODE_FIND_ARY[] =
};
// -=*# Resource for function SEARCH #*=-
-const char* SC_OPCODE_SEARCH_ARY[] =
+const TranslateId SC_OPCODE_SEARCH_ARY[] =
{
NC_("SC_OPCODE_SEARCH", "Looks for one text value within another (not case-sensitive)."),
NC_("SC_OPCODE_SEARCH", "Find text"),
@@ -3668,7 +3668,7 @@ const char* SC_OPCODE_SEARCH_ARY[] =
};
// -=*# Resource for function TRIM #*=-
-const char* SC_OPCODE_TRIM_ARY[] =
+const TranslateId SC_OPCODE_TRIM_ARY[] =
{
NC_("SC_OPCODE_TRIM", "Removes extra spaces from text."),
NC_("SC_OPCODE_TRIM", "Text"),
@@ -3676,7 +3676,7 @@ const char* SC_OPCODE_TRIM_ARY[] =
};
// -=*# Resource for function PROPER #*=-
-const char* SC_OPCODE_PROPER_ARY[] =
+const TranslateId SC_OPCODE_PROPER_ARY[] =
{
NC_("SC_OPCODE_PROPER", "Capitalizes the first letter in all words."),
NC_("SC_OPCODE_PROPER", "Text"),
@@ -3684,7 +3684,7 @@ const char* SC_OPCODE_PROPER_ARY[] =
};
// -=*# Resource for function UPPER #*=-
-const char* SC_OPCODE_UPPER_ARY[] =
+const TranslateId SC_OPCODE_UPPER_ARY[] =
{
NC_("SC_OPCODE_UPPER", "Converts text to uppercase."),
NC_("SC_OPCODE_UPPER", "Text"),
@@ -3692,7 +3692,7 @@ const char* SC_OPCODE_UPPER_ARY[] =
};
// -=*# Resource for function LOWER #*=-
-const char* SC_OPCODE_LOWER_ARY[] =
+const TranslateId SC_OPCODE_LOWER_ARY[] =
{
NC_("SC_OPCODE_LOWER", "Converts text to lowercase."),
NC_("SC_OPCODE_LOWER", "Text"),
@@ -3700,7 +3700,7 @@ const char* SC_OPCODE_LOWER_ARY[] =
};
// -=*# Resource for function VALUE #*=-
-const char* SC_OPCODE_VALUE_ARY[] =
+const TranslateId SC_OPCODE_VALUE_ARY[] =
{
NC_("SC_OPCODE_VALUE", "Converts text to a number."),
NC_("SC_OPCODE_VALUE", "Text"),
@@ -3708,7 +3708,7 @@ const char* SC_OPCODE_VALUE_ARY[] =
};
// -=*# Resource for function TEXT #*=-
-const char* SC_OPCODE_TEXT_ARY[] =
+const TranslateId SC_OPCODE_TEXT_ARY[] =
{
NC_("SC_OPCODE_TEXT", "Converts a number to text according to a given format."),
NC_("SC_OPCODE_TEXT", "Number"),
@@ -3718,7 +3718,7 @@ const char* SC_OPCODE_TEXT_ARY[] =
};
// -=*# Resource for function T #*=-
-const char* SC_OPCODE_T_ARY[] =
+const TranslateId SC_OPCODE_T_ARY[] =
{
NC_("SC_OPCODE_T", "Returns a value if it is text, otherwise an empty string."),
NC_("SC_OPCODE_T", "Value"),
@@ -3726,7 +3726,7 @@ const char* SC_OPCODE_T_ARY[] =
};
// -=*# Resource for function REPLACE #*=-
-const char* SC_OPCODE_REPLACE_ARY[] =
+const TranslateId SC_OPCODE_REPLACE_ARY[] =
{
NC_("SC_OPCODE_REPLACE", "Replaces characters within a text string with a different text string."),
NC_("SC_OPCODE_REPLACE", "Text"),
@@ -3740,7 +3740,7 @@ const char* SC_OPCODE_REPLACE_ARY[] =
};
// -=*# Resource for function FIXED #*=-
-const char* SC_OPCODE_FIXED_ARY[] =
+const TranslateId SC_OPCODE_FIXED_ARY[] =
{
NC_("SC_OPCODE_FIXED", "Formats a number with a fixed number of places after the decimal point and thousands separator."),
NC_("SC_OPCODE_FIXED", "Number"),
@@ -3752,7 +3752,7 @@ const char* SC_OPCODE_FIXED_ARY[] =
};
// -=*# Resource for function LEN #*=-
-const char* SC_OPCODE_LEN_ARY[] =
+const TranslateId SC_OPCODE_LEN_ARY[] =
{
NC_("SC_OPCODE_LEN", "Calculates length of a text string."),
NC_("SC_OPCODE_LEN", "Text"),
@@ -3760,7 +3760,7 @@ const char* SC_OPCODE_LEN_ARY[] =
};
// -=*# Resource for function LEFT #*=-
-const char* SC_OPCODE_LEFT_ARY[] =
+const TranslateId SC_OPCODE_LEFT_ARY[] =
{
NC_("SC_OPCODE_LEFT", "Returns the first character or characters of a text."),
NC_("SC_OPCODE_LEFT", "Text"),
@@ -3770,7 +3770,7 @@ const char* SC_OPCODE_LEFT_ARY[] =
};
// -=*# Resource for function RIGHT #*=-
-const char* SC_OPCODE_RIGHT_ARY[] =
+const TranslateId SC_OPCODE_RIGHT_ARY[] =
{
NC_("SC_OPCODE_RIGHT", "Returns the last character or characters of a text."),
NC_("SC_OPCODE_RIGHT", "Text"),
@@ -3780,7 +3780,7 @@ const char* SC_OPCODE_RIGHT_ARY[] =
};
// -=*# Resource for function MID #*=-
-const char* SC_OPCODE_MID_ARY[] =
+const TranslateId SC_OPCODE_MID_ARY[] =
{
NC_("SC_OPCODE_MID", "Returns a partial text string of a text."),
NC_("SC_OPCODE_MID", "Text"),
@@ -3792,7 +3792,7 @@ const char* SC_OPCODE_MID_ARY[] =
};
// -=*# Resource for function REPT #*=-
-const char* SC_OPCODE_REPT_ARY[] =
+const TranslateId SC_OPCODE_REPT_ARY[] =
{
NC_("SC_OPCODE_REPT", "Repeats text a given number of times."),
NC_("SC_OPCODE_REPT", "Text"),
@@ -3802,7 +3802,7 @@ const char* SC_OPCODE_REPT_ARY[] =
};
// -=*# Resource for function SUBSTITUTE #*=-
-const char* SC_OPCODE_SUBSTITUTE_ARY[] =
+const TranslateId SC_OPCODE_SUBSTITUTE_ARY[] =
{
NC_("SC_OPCODE_SUBSTITUTE", "Substitutes new text for old text in a string."),
NC_("SC_OPCODE_SUBSTITUTE", "Text"),
@@ -3816,7 +3816,7 @@ const char* SC_OPCODE_SUBSTITUTE_ARY[] =
};
// -=*# Resource for function REGEX #*=-
-const char* SC_OPCODE_REGEX_ARY[] =
+const TranslateId SC_OPCODE_REGEX_ARY[] =
{
NC_("SC_OPCODE_REGEX", "Matches and extracts or optionally replaces text using regular expressions."),
NC_("SC_OPCODE_REGEX", "Text"),
@@ -3830,7 +3830,7 @@ const char* SC_OPCODE_REGEX_ARY[] =
};
// -=*# Resource for function BASE #*=-
-const char* SC_OPCODE_BASE_ARY[] =
+const TranslateId SC_OPCODE_BASE_ARY[] =
{
NC_("SC_OPCODE_BASE", "Converts a positive integer to text from a number system to the base defined."),
NC_("SC_OPCODE_BASE", "Number"),
@@ -3842,7 +3842,7 @@ const char* SC_OPCODE_BASE_ARY[] =
};
// -=*# Resource for function DECIMAL #*=-
-const char* SC_OPCODE_DECIMAL_ARY[] =
+const TranslateId SC_OPCODE_DECIMAL_ARY[] =
{
NC_("SC_OPCODE_DECIMAL", "Converts a text of a specified number system to a positive integer in the base given."),
NC_("SC_OPCODE_DECIMAL", "Text"),
@@ -3852,7 +3852,7 @@ const char* SC_OPCODE_DECIMAL_ARY[] =
};
// -=*# Resource for function CONVERT_OOO #*=-
-const char* SC_OPCODE_CONVERT_OOO_ARY[] =
+const TranslateId SC_OPCODE_CONVERT_OOO_ARY[] =
{
NC_("SC_OPCODE_CONVERT_OOO", "Converts a value according to a conversion table in the configuration (main.xcd)."),
NC_("SC_OPCODE_CONVERT_OOO", "Value"),
@@ -3864,7 +3864,7 @@ const char* SC_OPCODE_CONVERT_OOO_ARY[] =
};
// -=*# Resource for function ROMAN #*=-
-const char* SC_OPCODE_ROMAN_ARY[] =
+const TranslateId SC_OPCODE_ROMAN_ARY[] =
{
NC_("SC_OPCODE_ROMAN", "Converts a number to a Roman numeral."),
NC_("SC_OPCODE_ROMAN", "Number"),
@@ -3874,35 +3874,35 @@ const char* SC_OPCODE_ROMAN_ARY[] =
};
// -=*# Resource for function ARABIC #*=-
-const char* SC_OPCODE_ARABIC_ARY[] =
+const TranslateId SC_OPCODE_ARABIC_ARY[] =
{
NC_("SC_OPCODE_ARABIC", "Calculates the value of a Roman numeral."),
NC_("SC_OPCODE_ARABIC", "Text"),
NC_("SC_OPCODE_ARABIC", "The text that represents a Roman numeral.")
};
-const char* SC_OPCODE_INFO_ARY[] =
+const TranslateId SC_OPCODE_INFO_ARY[] =
{
NC_("SC_OPCODE_INFO", "Returns information about the environment."),
NC_("SC_OPCODE_INFO", "Text"),
NC_("SC_OPCODE_INFO", "Can be \"osversion\", \"system\", \"release\", \"numfile\", and \"recalc\".")
};
-const char* SC_OPCODE_UNICODE_ARY[] =
+const TranslateId SC_OPCODE_UNICODE_ARY[] =
{
NC_("SC_OPCODE_UNICODE", "Returns the numeric code for the first Unicode character in a text string."),
NC_("SC_OPCODE_UNICODE", "Text"),
NC_("SC_OPCODE_UNICODE", "This is the text for which the code of the first character is to be found.")
};
-const char* SC_OPCODE_UNICHAR_ARY[] =
+const TranslateId SC_OPCODE_UNICHAR_ARY[] =
{
NC_("SC_OPCODE_UNICHAR", "Converts a code number into a Unicode character or letter."),
NC_("SC_OPCODE_UNICHAR", "Number"),
NC_("SC_OPCODE_UNICHAR", "The code value for the character.")
};
-const char* SC_OPCODE_EUROCONVERT_ARY[] =
+const TranslateId SC_OPCODE_EUROCONVERT_ARY[] =
{
NC_("SC_OPCODE_EUROCONVERT", "Converts a value from one to another Euro currency."),
NC_("SC_OPCODE_EUROCONVERT", "Value"),
@@ -3918,7 +3918,7 @@ const char* SC_OPCODE_EUROCONVERT_ARY[] =
NC_("SC_OPCODE_EUROCONVERT", "If given and >=3, the intermediate result of a triangular conversion is rounded to that precision. If omitted, the result is not rounded.")
};
-const char* SC_OPCODE_NUMBERVALUE_ARY[] =
+const TranslateId SC_OPCODE_NUMBERVALUE_ARY[] =
{
NC_("SC_OPCODE_NUMBERVALUE", "Converts text to a number, in a locale-independent way."),
NC_("SC_OPCODE_NUMBERVALUE", "Text"),
@@ -3930,7 +3930,7 @@ const char* SC_OPCODE_NUMBERVALUE_ARY[] =
};
-const char* SC_OPCODE_BITAND_ARY[] =
+const TranslateId SC_OPCODE_BITAND_ARY[] =
{
NC_("SC_OPCODE_BITAND", "Bitwise \"AND\" of two integers."),
NC_("SC_OPCODE_BITAND", "Number1"),
@@ -3939,7 +3939,7 @@ const char* SC_OPCODE_BITAND_ARY[] =
NC_("SC_OPCODE_BITAND", "Positive integer less than 2^48.")
};
-const char* SC_OPCODE_BITOR_ARY[] =
+const TranslateId SC_OPCODE_BITOR_ARY[] =
{
NC_("SC_OPCODE_BITOR", "Bitwise \"OR\" of two integers."),
NC_("SC_OPCODE_BITOR", "Number1"),
@@ -3948,7 +3948,7 @@ const char* SC_OPCODE_BITOR_ARY[] =
NC_("SC_OPCODE_BITOR", "Positive integer less than 2^48.")
};
-const char* SC_OPCODE_BITXOR_ARY[] =
+const TranslateId SC_OPCODE_BITXOR_ARY[] =
{
NC_("SC_OPCODE_BITXOR", "Bitwise \"exclusive OR\" of two integers."),
NC_("SC_OPCODE_BITXOR", "Number1"),
@@ -3957,7 +3957,7 @@ const char* SC_OPCODE_BITXOR_ARY[] =
NC_("SC_OPCODE_BITXOR", "Positive integer less than 2^48.")
};
-const char* SC_OPCODE_BITRSHIFT_ARY[] =
+const TranslateId SC_OPCODE_BITRSHIFT_ARY[] =
{
NC_("SC_OPCODE_BITRSHIFT", "Bitwise right shift of an integer value."),
NC_("SC_OPCODE_BITRSHIFT", "Number"),
@@ -3966,7 +3966,7 @@ const char* SC_OPCODE_BITRSHIFT_ARY[] =
NC_("SC_OPCODE_BITRSHIFT", "The integer number of bits the value is to be shifted.")
};
-const char* SC_OPCODE_BITLSHIFT_ARY[] =
+const TranslateId SC_OPCODE_BITLSHIFT_ARY[] =
{
NC_("SC_OPCODE_BITLSHIFT", "Bitwise left shift of an integer value."),
NC_("SC_OPCODE_BITLSHIFT", "Number"),
@@ -3975,14 +3975,14 @@ const char* SC_OPCODE_BITLSHIFT_ARY[] =
NC_("SC_OPCODE_BITLSHIFT", "The integer number of bits the value is to be shifted.")
};
-const char* SC_OPCODE_LENB_ARY[] =
+const TranslateId SC_OPCODE_LENB_ARY[] =
{
NC_("SC_OPCODE_LENB", "Calculates length of a text string, with DBCS"),
NC_("SC_OPCODE_LENB", "Text"),
NC_("SC_OPCODE_LENB", "The text in which the length is to be determined.")
};
-const char* SC_OPCODE_RIGHTB_ARY[] =
+const TranslateId SC_OPCODE_RIGHTB_ARY[] =
{
NC_("SC_OPCODE_RIGHTB", "Returns the last character or characters of a text,with DBCS"),
NC_("SC_OPCODE_RIGHTB", "Text"),
@@ -3991,7 +3991,7 @@ const char* SC_OPCODE_RIGHTB_ARY[] =
NC_("SC_OPCODE_RIGHTB", "The number of characters for the end text.")
};
-const char* SC_OPCODE_LEFTB_ARY[] =
+const TranslateId SC_OPCODE_LEFTB_ARY[] =
{
NC_("SC_OPCODE_LEFTB", "Returns the first character or characters of a text,with DBCS"),
NC_("SC_OPCODE_LEFTB", "Text"),
@@ -4000,7 +4000,7 @@ const char* SC_OPCODE_LEFTB_ARY[] =
NC_("SC_OPCODE_LEFTB", "The number of characters for the start text.")
};
-const char* SC_OPCODE_MIDB_ARY[] =
+const TranslateId SC_OPCODE_MIDB_ARY[] =
{
NC_("SC_OPCODE_MIDB", "Returns a partial text string of a text, with DBCS"),
NC_("SC_OPCODE_MIDB", "Text"),
@@ -4011,7 +4011,7 @@ const char* SC_OPCODE_MIDB_ARY[] =
NC_("SC_OPCODE_MIDB", "The number of characters for the text.")
};
-const char* SC_OPCODE_FILTERXML_ARY[] =
+const TranslateId SC_OPCODE_FILTERXML_ARY[] =
{
NC_("SC_OPCODE_FILTERXML", "Apply an XPath expression to an XML document"),
NC_("SC_OPCODE_FILTERXML", "XML Document"),
@@ -4020,7 +4020,7 @@ const char* SC_OPCODE_FILTERXML_ARY[] =
NC_("SC_OPCODE_FILTERXML", "String containing a valid XPath expression")
};
-const char* SC_OPCODE_COLOR_ARY[] =
+const TranslateId SC_OPCODE_COLOR_ARY[] =
{
NC_("SC_OPCODE_COLOR", "Returns an implementation defined value representing a RGBA color"),
NC_("SC_OPCODE_COLOR", "Red"),
@@ -4033,35 +4033,35 @@ const char* SC_OPCODE_COLOR_ARY[] =
NC_("SC_OPCODE_COLOR", "Value of alpha")
};
-const char* SC_OPCODE_WEBSERVICE_ARY[] =
+const TranslateId SC_OPCODE_WEBSERVICE_ARY[] =
{
NC_("SC_OPCODE_WEBSERVICE", "Get some web-content from a URI."),
NC_("SC_OPCODE_WEBSERVICE", "URI"),
NC_("SC_OPCODE_WEBSERVICE", "URI of the webservice")
};
-const char* SC_OPCODE_ENCODEURL_ARY[] =
+const TranslateId SC_OPCODE_ENCODEURL_ARY[] =
{
NC_("SC_OPCODE_ENCODEURL", "Return a URL-encoded string."),
NC_("SC_OPCODE_ENCODEURL", "Text"),
NC_("SC_OPCODE_ENCODEURL", "A string to be URL-encoded")
};
-const char* SC_OPCODE_ERF_MS_ARY[] =
+const TranslateId SC_OPCODE_ERF_MS_ARY[] =
{
NC_("SC_OPCODE_ERF_MS", "Returns the error function."),
NC_("SC_OPCODE_ERF_MS", "Lower limit"),
NC_("SC_OPCODE_ERF_MS", "The lower limit for integration")
};
-const char* SC_OPCODE_ERFC_MS_ARY[] =
+const TranslateId SC_OPCODE_ERFC_MS_ARY[] =
{
NC_("SC_OPCODE_ERFC_MS", "Returns the complementary error function."),
NC_("SC_OPCODE_ERFC_MS", "Lower limit"),
NC_("SC_OPCODE_ERFC_MS", "The lower limit for integration")
};
-const char* SC_OPCODE_RAWSUBTRACT_ARY[] =
+const TranslateId SC_OPCODE_RAWSUBTRACT_ARY[] =
{
NC_("SC_OPCODE_RAWSUBTRACT", "Returns the subtraction of numbers. Like a-b-c but without eliminating small roundoff errors."),
NC_("SC_OPCODE_RAWSUBTRACT", "Minuend"),
@@ -4071,7 +4071,7 @@ const char* SC_OPCODE_RAWSUBTRACT_ARY[] =
};
// -=*# Resource for function ROUNDSIG #*=-
-const char* SC_OPCODE_ROUNDSIG_ARY[] =
+const TranslateId SC_OPCODE_ROUNDSIG_ARY[] =
{
NC_("SC_OPCODE_ROUNDSIG", "Rounds a number to predefined significant digits."),
NC_("SC_OPCODE_ROUNDSIG", "Value"),
@@ -4080,7 +4080,7 @@ const char* SC_OPCODE_ROUNDSIG_ARY[] =
NC_("SC_OPCODE_ROUNDSIG", "The number of significant digits to which value is to be rounded.")
};
-const char* SC_OPCODE_REPLACEB_ARY[] =
+const TranslateId SC_OPCODE_REPLACEB_ARY[] =
{
NC_("SC_OPCODE_REPLACEB", "Replaces characters within a text string with a different text string, with DBCS."),
NC_("SC_OPCODE_REPLACEB", "Text"),
@@ -4094,7 +4094,7 @@ const char* SC_OPCODE_REPLACEB_ARY[] =
};
// -=*# Resource for function FINDB #*=-
-const char* SC_OPCODE_FINDB_ARY[] =
+const TranslateId SC_OPCODE_FINDB_ARY[] =
{
NC_("SC_OPCODE_FINDB", "Looks for a string of text within another (case sensitive), using byte positions."),
NC_("SC_OPCODE_FINDB", "Find text"),
@@ -4106,7 +4106,7 @@ const char* SC_OPCODE_FINDB_ARY[] =
};
// -=*# Resource for function SEARCHB #*=-
-const char* SC_OPCODE_SEARCHB_ARY[] =
+const TranslateId SC_OPCODE_SEARCHB_ARY[] =
{
NC_("SC_OPCODE_SEARCHB", "Looks for a string of text within another (not case sensitive), using byte positions."),
NC_("SC_OPCODE_SEARCHB", "Find text"),
@@ -4118,7 +4118,7 @@ const char* SC_OPCODE_SEARCHB_ARY[] =
};
// -=*# Resource for function FOURIER #*=-
-const char* SC_OPCODE_FOURIER_ARY[] =
+const TranslateId SC_OPCODE_FOURIER_ARY[] =
{
NC_("SC_OPCODE_FOURIER", "Computes the Discrete Fourier Transform (DFT) of an array"),
NC_("SC_OPCODE_FOURIER", "Array"),
@@ -4134,13 +4134,13 @@ const char* SC_OPCODE_FOURIER_ARY[] =
};
// -=*# Resource for function RAND.NV #*=-
-const char* SC_OPCODE_RANDOM_NV_ARY[] =
+const TranslateId SC_OPCODE_RANDOM_NV_ARY[] =
{
NC_("SC_OPCODE_RANDOM_NV", "Returns a random number between 0 and 1, non-volatile.")
};
// -=*# Resource for function RANDBETWEEN.NV #*=-
-const char* SC_OPCODE_RANDBETWEEN_NV_ARY[] =
+const TranslateId SC_OPCODE_RANDBETWEEN_NV_ARY[] =
{
NC_("SC_OPCODE_RANDBETWEEN_NV", "Returns a random integer between the numbers you specify, non-volatile."),
NC_("SC_OPCODE_RANDBETWEEN_NV", "Bottom"),
diff --git a/sc/inc/scresid.hxx b/sc/inc/scresid.hxx
index 017c7a91c5c8..99a392cdb63e 100644
--- a/sc/inc/scresid.hxx
+++ b/sc/inc/scresid.hxx
@@ -21,8 +21,9 @@
#include <rtl/ustring.hxx>
#include "scdllapi.h"
+#include <unotools/resmgr.hxx>
-OUString SC_DLLPUBLIC ScResId(std::string_view aId);
-OUString ScResId(std::string_view aId, int nCardinality);
+OUString SC_DLLPUBLIC ScResId(TranslateId aId);
+OUString ScResId(TranslateNId aContextSingularPlural, int nCardinality);
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/inc/scstyles.hrc b/sc/inc/scstyles.hrc
index 3022cc8afa05..2d11b56d713f 100644
--- a/sc/inc/scstyles.hrc
+++ b/sc/inc/scstyles.hrc
@@ -21,23 +21,23 @@
#include <svl/style.hxx>
-#define NC_(Context, String) reinterpret_cast<char const *>(Context "\004" u8##String)
+#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
-const std::pair<const char*, SfxStyleSearchBits> RID_CELLSTYLEFAMILY[] =
+const std::pair<TranslateId, SfxStyleSearchBits> RID_CELLSTYLEFAMILY[] =
{
{ NC_("RID_CELLSTYLEFAMILY", "All Styles") , SfxStyleSearchBits::AllVisible },
{ NC_("RID_CELLSTYLEFAMILY", "Hidden Styles") , SfxStyleSearchBits::Hidden },
{ NC_("RID_CELLSTYLEFAMILY", "Applied Styles") , SfxStyleSearchBits::Used },
{ NC_("RID_CELLSTYLEFAMILY", "Custom Styles") , SfxStyleSearchBits::UserDefined },
- { nullptr, SfxStyleSearchBits::Auto }
+ { {}, SfxStyleSearchBits::Auto }
};
-const std::pair<const char*, SfxStyleSearchBits> RID_PAGESTYLEFAMILY[] =
+const std::pair<TranslateId, SfxStyleSearchBits> RID_PAGESTYLEFAMILY[] =
{
{ NC_("RID_PAGESTYLEFAMILY", "All Styles") , SfxStyleSearchBits::All },
{ NC_("RID_PAGESTYLEFAMILY", "Hidden Styles") , SfxStyleSearchBits::Hidden },
{ NC_("RID_PAGESTYLEFAMILY", "Custom Styles") , SfxStyleSearchBits::UserDefined },
- { nullptr, SfxStyleSearchBits::Auto }
+ { {}, SfxStyleSearchBits::Auto }
};
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/inc/strings.hrc b/sc/inc/strings.hrc
index 2815c9aa6d74..649ffd4d4020 100644
--- a/sc/inc/strings.hrc
+++ b/sc/inc/strings.hrc
@@ -19,8 +19,8 @@
#pragma once
-#define NC_(Context, String) reinterpret_cast<char const *>(Context "\004" u8##String)
-#define NNC_(Context, StringSingular, StringPlural) reinterpret_cast<char const *>(Context "\004" u8##StringSingular "\004" u8##StringPlural)
+#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(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 -------------------------------------------
diff --git a/sc/inc/subtotals.hrc b/sc/inc/subtotals.hrc
index 488802d711a2..bbf7884fcbaf 100644
--- a/sc/inc/subtotals.hrc
+++ b/sc/inc/subtotals.hrc
@@ -19,9 +19,9 @@
#pragma once
-#define NC_(Context, String) reinterpret_cast<char const *>(Context "\004" u8##String)
+#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
-const char* SCSTR_SUBTOTALS[] =
+const TranslateId SCSTR_SUBTOTALS[] =
{
NC_("subtotalgrppage|liststore1", "Sum"),
NC_("subtotalgrppage|liststore1", "Count"),
diff --git a/sc/inc/units.hrc b/sc/inc/units.hrc
index cf90776bbdaa..426141fab788 100644
--- a/sc/inc/units.hrc
+++ b/sc/inc/units.hrc
@@ -19,13 +19,13 @@
#pragma once
-#define NC_(Context, String) reinterpret_cast<char const *>(Context "\004" u8##String)
+#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
#include <tools/fldunit.hxx>
#include <utility>
-const std::pair<const char*, FieldUnit> SCSTR_UNIT[] =
+const std::pair<TranslateId, FieldUnit> SCSTR_UNIT[] =
{
{ NC_("SCSTR_UNIT", "Millimeter") , FieldUnit::MM },
{ NC_("SCSTR_UNIT", "Centimeter") , FieldUnit::CM },
diff --git a/sc/qa/unit/ucalc_pivottable.cxx b/sc/qa/unit/ucalc_pivottable.cxx
index 62c971de6b22..2100e50d531a 100644
--- a/sc/qa/unit/ucalc_pivottable.cxx
+++ b/sc/qa/unit/ucalc_pivottable.cxx
@@ -466,8 +466,8 @@ void TestPivottable::testPivotTable()
// This time clear the cache to refresh the data from the source range.
CPPUNIT_ASSERT_MESSAGE("This datapilot should be based on sheet data.", pDPObj2->IsSheetData());
o3tl::sorted_vector<ScDPObject*> aRefs;
- const char* pErrId = pDPs->ReloadCache(pDPObj2, aRefs);
- CPPUNIT_ASSERT_EQUAL_MESSAGE("Cache reload failed.", static_cast<const char*>(nullptr), pErrId);
+ TranslateId pErrId = pDPs->ReloadCache(pDPObj2, aRefs);
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Cache reload failed.", false, bool(pErrId));
CPPUNIT_ASSERT_EQUAL_MESSAGE("Reloading a cache shouldn't remove any cache.",
static_cast<size_t>(1), pDPs->GetSheetCaches().size());
@@ -1718,7 +1718,7 @@ void TestPivottable::testPivotTableEmptyRows()
m_pDoc->SetString(1, 2, 0, "B");
o3tl::sorted_vector<ScDPObject*> aRefs;
- const char* pErr = pDPs->ReloadCache(pDPObj, aRefs);
+ TranslateId pErr = pDPs->ReloadCache(pDPObj, aRefs);
CPPUNIT_ASSERT_MESSAGE("Failed to reload cache.", !pErr);
CPPUNIT_ASSERT_EQUAL_MESSAGE("There should only be one pivot table linked to this cache.",
o3tl::sorted_vector<ScDPObject*>::size_type(1), aRefs.size());
diff --git a/sc/source/core/data/attrib.cxx b/sc/source/core/data/attrib.cxx
index 324c2c59c322..6bdee5cafc29 100644
--- a/sc/source/core/data/attrib.cxx
+++ b/sc/source/core/data/attrib.cxx
@@ -763,7 +763,7 @@ bool ScShrinkToFitCell::GetPresentation(SfxItemPresentation,
OUString& rText,
const IntlWrapper&) const
{
- const char* pId = GetValue() ? STR_SHRINKTOFITCELL_ON : STR_SHRINKTOFITCELL_OFF;
+ TranslateId pId = GetValue() ? STR_SHRINKTOFITCELL_ON : STR_SHRINKTOFITCELL_OFF;
rText = ScResId(pId);
return true;
}
@@ -783,7 +783,7 @@ bool ScVerticalStackCell::GetPresentation(SfxItemPresentation,
OUString& rText,
const IntlWrapper&) const
{
- const char* pId = GetValue() ? STR_VERTICALSTACKCELL_ON : STR_VERTICALSTACKCELL_OFF;
+ TranslateId pId = GetValue() ? STR_VERTICALSTACKCELL_ON : STR_VERTICALSTACKCELL_OFF;
rText = ScResId(pId);
return true;
}
@@ -803,7 +803,7 @@ bool ScLineBreakCell::GetPresentation(SfxItemPresentation,
OUString& rText,
const IntlWrapper&) const
{
- const char* pId = GetValue() ? STR_LINEBREAKCELL_ON : STR_LINEBREAKCELL_OFF;
+ TranslateId pId = GetValue() ? STR_LINEBREAKCELL_ON : STR_LINEBREAKCELL_OFF;
rText = ScResId(pId);
return true;
}
@@ -823,7 +823,7 @@ bool ScHyphenateCell::GetPresentation(SfxItemPresentation,
OUString& rText,
const IntlWrapper&) const
{
- const char* pId = GetValue() ? STR_HYPHENATECELL_ON : STR_HYPHENATECELL_OFF;
+ TranslateId pId = GetValue() ? STR_HYPHENATECELL_ON : STR_HYPHENATECELL_OFF;
rText = ScResId(pId);
return true;
}
diff --git a/sc/source/core/data/dpdimsave.cxx b/sc/source/core/data/dpdimsave.cxx
index fa9b2ded7d78..ec80ec3d664b 100644
--- a/sc/source/core/data/dpdimsave.cxx
+++ b/sc/source/core/data/dpdimsave.cxx
@@ -758,7 +758,7 @@ OUString ScDPDimensionSaveData::CreateGroupDimName(
namespace
{
- const char* aDatePartIds[] =
+ const TranslateId aDatePartIds[] =
{
STR_DPFIELD_GROUP_BY_SECONDS,
STR_DPFIELD_GROUP_BY_MINUTES,
diff --git a/sc/source/core/data/dpobject.cxx b/sc/source/core/data/dpobject.cxx
index 287ccbcd36f3..ea0929f5a18d 100644
--- a/sc/source/core/data/dpobject.cxx
+++ b/sc/source/core/data/dpobject.cxx
@@ -3365,7 +3365,7 @@ public:
}
-const char* ScDPCollection::ReloadCache(const ScDPObject* pDPObj, o3tl::sorted_vector<ScDPObject*>& rRefs)
+TranslateId ScDPCollection::ReloadCache(const ScDPObject* pDPObj, o3tl::sorted_vector<ScDPObject*>& rRefs)
{
if (!pDPObj)
return STR_ERR_DATAPILOTSOURCE;
@@ -3377,7 +3377,7 @@ const char* ScDPCollection::ReloadCache(const ScDPObject* pDPObj, o3tl::sorted_v
if (!pDesc)
return STR_ERR_DATAPILOTSOURCE;
- const char* pErrId = pDesc->CheckSourceRange();
+ TranslateId pErrId = pDesc->CheckSourceRange();
if (pErrId)
return pErrId;
@@ -3426,7 +3426,7 @@ const char* ScDPCollection::ReloadCache(const ScDPObject* pDPObj, o3tl::sorted_v
GetAllTables(pDesc->GetCommandType(), pDesc->aDBName, pDesc->aObject, rRefs);
}
}
- return nullptr;
+ return {};
}
bool ScDPCollection::ReloadGroupsInCache(const ScDPObject* pDPObj, o3tl::sorted_vector<ScDPObject*>& rRefs)
diff --git a/sc/source/core/data/dpoutput.cxx b/sc/source/core/data/dpoutput.cxx
index ca9b214b5605..ada646b361fc 100644
--- a/sc/source/core/data/dpoutput.cxx
+++ b/sc/source/core/data/dpoutput.cxx
@@ -284,7 +284,7 @@ void ScDPOutputImpl::OutputBlockFrame ( SCCOL nStartCol, SCROW nStartRow, SCCOL
void lcl_SetStyleById(ScDocument* pDoc, SCTAB nTab,
SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
- const char* pStrId)
+ TranslateId pStrId)
{
if ( nCol1 > nCol2 || nRow1 > nRow2 )
{
@@ -303,12 +303,12 @@ void lcl_SetStyleById(ScDocument* pDoc, SCTAB nTab,
SfxStyleSearchBits::UserDefined ) );
pStyle->SetParent( ScResId(STR_STYLENAME_STANDARD) );
SfxItemSet& rSet = pStyle->GetItemSet();
- if (strcmp(pStrId, STR_PIVOT_STYLENAME_RESULT) == 0 || strcmp(pStrId, STR_PIVOT_STYLENAME_TITLE) == 0){
+ if (pStrId == STR_PIVOT_STYLENAME_RESULT || pStrId == STR_PIVOT_STYLENAME_TITLE){
rSet.Put( SvxWeightItem( WEIGHT_BOLD, ATTR_FONT_WEIGHT ) );
rSet.Put( SvxWeightItem( WEIGHT_BOLD, ATTR_CJK_FONT_WEIGHT ) );
rSet.Put( SvxWeightItem( WEIGHT_BOLD, ATTR_CTL_FONT_WEIGHT ) );
}
- if (strcmp(pStrId, STR_PIVOT_STYLENAME_CATEGORY) == 0 || strcmp(pStrId, STR_PIVOT_STYLENAME_TITLE) == 0)
+ if (pStrId == STR_PIVOT_STYLENAME_CATEGORY || pStrId == STR_PIVOT_STYLENAME_TITLE)
rSet.Put( SvxHorJustifyItem( SvxCellHorJustify::Left, ATTR_HOR_JUSTIFY ) );
}
@@ -1483,7 +1483,7 @@ namespace {
OUString lcl_GetDataFieldName( std::u16string_view rSourceName, sal_Int16 eFunc )
{
- const char* pStrId = nullptr;
+ TranslateId pStrId;
switch ( eFunc )
{
case sheet::GeneralFunction2::SUM: pStrId = STR_FUN_TEXT_SUM; break;
diff --git a/sc/source/core/data/dpshttab.cxx b/sc/source/core/data/dpshttab.cxx
index c15ba043fffe..36060b282d0c 100644
--- a/sc/source/core/data/dpshttab.cxx
+++ b/sc/source/core/data/dpshttab.cxx
@@ -283,7 +283,7 @@ const ScDPCache* ScSheetSourceDesc::CreateCache(const ScDPDimensionSaveData* pDi
if (!mpDoc)
return nullptr;
- const char* pErrId = CheckSourceRange();
+ TranslateId pErrId = CheckSourceRange();
if (pErrId)
{
OSL_FAIL( "Error Create Cache" );
@@ -303,7 +303,7 @@ const ScDPCache* ScSheetSourceDesc::CreateCache(const ScDPDimensionSaveData* pDi
return rCaches.getCache(GetSourceRange(), pDimData);
}
-const char* ScSheetSourceDesc::CheckSourceRange() const
+TranslateId ScSheetSourceDesc::CheckSourceRange() const
{
if (!mpDoc)
return STR_ERR_DATAPILOTSOURCE;
@@ -316,7 +316,7 @@ const char* ScSheetSourceDesc::CheckSourceRange() const
if (rSrcRange.aStart.Col() > rSrcRange.aEnd.Col() || rSrcRange.aStart.Row() > rSrcRange.aEnd.Row())
return STR_ERR_DATAPILOTSOURCE;
- return nullptr;
+ return {};
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/data/dptabres.cxx b/sc/source/core/data/dptabres.cxx
index 46311e3570a8..4c8f38c8e558 100644
--- a/sc/source/core/data/dptabres.cxx
+++ b/sc/source/core/data/dptabres.cxx
@@ -59,9 +59,9 @@ using ::com::sun::star::uno::Sequence;
namespace {
-const char* aFuncStrIds[] = // matching enum ScSubTotalFunc
+const TranslateId aFuncStrIds[] = // matching enum ScSubTotalFunc
{
- nullptr, // SUBTOTAL_FUNC_NONE
+ {}, // SUBTOTAL_FUNC_NONE
STR_FUN_TEXT_AVG, // SUBTOTAL_FUNC_AVE
STR_FUN_TEXT_COUNT, // SUBTOTAL_FUNC_CNT
STR_FUN_TEXT_COUNT, // SUBTOTAL_FUNC_CNT2
@@ -74,7 +74,7 @@ const char* aFuncStrIds[] = // matching enum ScSubTotalFunc
STR_FUN_TEXT_VAR, // SUBTOTAL_FUNC_VAR
STR_FUN_TEXT_VAR, // SUBTOTAL_FUNC_VARP
STR_FUN_TEXT_MEDIAN, // SUBTOTAL_FUNC_MED
- nullptr // SUBTOTAL_FUNC_SELECTION_COUNT - not used for pivot table
+ {} // SUBTOTAL_FUNC_SELECTION_COUNT - not used for pivot table
};
bool lcl_SearchMember( const std::vector<std::unique_ptr<ScDPResultMember>>& list, SCROW nOrder, SCROW& rIndex)
diff --git a/sc/source/core/data/dputil.cxx b/sc/source/core/data/dputil.cxx
index 62d61a733055..07794c6c3a5d 100644
--- a/sc/source/core/data/dputil.cxx
+++ b/sc/source/core/data/dputil.cxx
@@ -362,8 +362,8 @@ sal_Int32 ScDPUtil::getDatePartValue(
namespace {
-const char* aFuncStrIds[] = {
- nullptr, // SUBTOTAL_FUNC_NONE
+const TranslateId aFuncStrIds[] = {
+ {}, // SUBTOTAL_FUNC_NONE
STR_FUN_TEXT_AVG, // SUBTOTAL_FUNC_AVE
STR_FUN_TEXT_COUNT, // SUBTOTAL_FUNC_CNT
STR_FUN_TEXT_COUNT, // SUBTOTAL_FUNC_CNT2
@@ -376,7 +376,7 @@ const char* aFuncStrIds[] = {
STR_FUN_TEXT_VAR, // SUBTOTAL_FUNC_VAR
STR_FUN_TEXT_VAR, // SUBTOTAL_FUNC_VARP
STR_FUN_TEXT_MEDIAN, // SUBTOTAL_FUNC_MED
- nullptr // SUBTOTAL_FUNC_SELECTION_COUNT - not used for pivot table
+ {} // SUBTOTAL_FUNC_SELECTION_COUNT - not used for pivot table
};
}
@@ -384,7 +384,7 @@ const char* aFuncStrIds[] = {
OUString ScDPUtil::getDisplayedMeasureName(const OUString& rName, ScSubTotalFunc eFunc)
{
assert(unsigned(eFunc) < SAL_N_ELEMENTS(aFuncStrIds));
- const char* pId = aFuncStrIds[eFunc];
+ TranslateId pId = aFuncStrIds[eFunc];
if (!pId)
return rName;
return ScResId(pId) + // function name
diff --git a/sc/source/core/data/funcdesc.cxx b/sc/source/core/data/funcdesc.cxx
index 4f3187d078e8..741b785e0869 100644
--- a/sc/source/core/data/funcdesc.cxx
+++ b/sc/source/core/data/funcdesc.cxx
@@ -49,7 +49,7 @@ struct ScFuncDescCore
/*
* Pointer to list of strings
*/
- const char** pResource;
+ const TranslateId* pResource;
/*
* Count of list of strings
*/
diff --git a/sc/source/core/data/global.cxx b/sc/source/core/data/global.cxx
index 8c18329ab67b..60f66f6fd97d 100644
--- a/sc/source/core/data/global.cxx
+++ b/sc/source/core/data/global.cxx
@@ -300,7 +300,7 @@ void ScGlobal::SetUserList( const ScUserList* pNewList )
OUString ScGlobal::GetErrorString(FormulaError nErr)
{
- const char* pErrNumber;
+ TranslateId pErrNumber;
switch (nErr)
{
case FormulaError::NoRef:
@@ -332,7 +332,7 @@ OUString ScGlobal::GetErrorString(FormulaError nErr)
OUString ScGlobal::GetLongErrorString(FormulaError nErr)
{
- const char* pErrNumber;
+ TranslateId pErrNumber;
switch (nErr)
{
case FormulaError::NONE:
diff --git a/sc/source/core/data/table3.cxx b/sc/source/core/data/table3.cxx
index 48c05bcaa40d..b3af3c17ec73 100644
--- a/sc/source/core/data/table3.cxx
+++ b/sc/source/core/data/table3.cxx
@@ -1914,7 +1914,7 @@ struct RowEntry
}
-static const char* lcl_GetSubTotalStrId(int id)
+static TranslateId lcl_GetSubTotalStrId(int id)
{
switch ( id )
{
@@ -2072,7 +2072,7 @@ bool ScTable::DoSubTotals( ScSubTotalParam& rParam )
if (aOutString.isEmpty())
aOutString = ScResId( STR_EMPTYDATA );
aOutString += " ";
- const char* pStrId = STR_TABLE_ERGEBNIS;
+ TranslateId pStrId = STR_TABLE_ERGEBNIS;
if ( nResCount == 1 )
pStrId = lcl_GetSubTotalStrId(pResFunc[0]);
aOutString += ScResId(pStrId);
diff --git a/sc/source/core/tool/autoform.cxx b/sc/source/core/tool/autoform.cxx
index 9e88957575b4..7430eff33c91 100644
--- a/sc/source/core/tool/autoform.cxx
+++ b/sc/source/core/tool/autoform.cxx
@@ -563,7 +563,7 @@ void ScAutoFormatData::GetFromItemSet( sal_uInt16 nIndex, const SfxItemSet& rIte
rField.SetRotateMode ( rItemSet.Get( ATTR_ROTATE_MODE ) );
}
-static const char* RID_SVXSTR_TBLAFMT[] =
+const TranslateId RID_SVXSTR_TBLAFMT[] =
{
RID_SVXSTR_TBLAFMT_3D,
RID_SVXSTR_TBLAFMT_BLACK1,
diff --git a/sc/source/core/tool/chgtrack.cxx b/sc/source/core/tool/chgtrack.cxx
index d68009446dcc..24da3d93cc3a 100644
--- a/sc/source/core/tool/chgtrack.cxx
+++ b/sc/source/core/tool/chgtrack.cxx
@@ -671,7 +671,7 @@ void ScChangeActionIns::GetDescription(
{
ScChangeAction::GetDescription( rStr, rDoc, bSplitRange, bWarning );
- const char* pWhatId;
+ TranslateId pWhatId;
switch ( GetType() )
{
case SC_CAT_INSERT_COLS :
@@ -905,7 +905,7 @@ void ScChangeActionDel::GetDescription(
{
ScChangeAction::GetDescription( rStr, rDoc, bSplitRange, bWarning );
- const char* pWhatId;
+ TranslateId pWhatId;
switch ( GetType() )
{
case SC_CAT_DELETE_COLS :
diff --git a/sc/source/filter/excel/xepivot.cxx b/sc/source/filter/excel/xepivot.cxx
index 8156b4579499..53a95144b3fc 100644
--- a/sc/source/filter/excel/xepivot.cxx
+++ b/sc/source/filter/excel/xepivot.cxx
@@ -870,7 +870,7 @@ OUString lclGetDataFieldCaption( std::u16string_view rFieldName, ScGeneralFuncti
{
OUString aCaption;
- const char* pResIdx = nullptr;
+ TranslateId pResIdx;
switch( eFunc )
{
case ScGeneralFunction::SUM: pResIdx = STR_FUN_TEXT_SUM; break;
diff --git a/sc/source/filter/ftools/fprogressbar.cxx b/sc/source/filter/ftools/fprogressbar.cxx
index 89301c14da56..3b84e84924dd 100644
--- a/sc/source/filter/ftools/fprogressbar.cxx
+++ b/sc/source/filter/ftools/fprogressbar.cxx
@@ -42,7 +42,7 @@ ScfProgressBar::ScfProgressBar( SfxObjectShell* pDocShell, const OUString& rText
Init( pDocShell );
}
-ScfProgressBar::ScfProgressBar(SfxObjectShell* pDocShell, const char* pResId)
+ScfProgressBar::ScfProgressBar(SfxObjectShell* pDocShell, TranslateId pResId)
: maText(ScResId(pResId))
{
Init( pDocShell );
@@ -200,7 +200,7 @@ ScfSimpleProgressBar::ScfSimpleProgressBar( std::size_t nSize, SfxObjectShell* p
Init( nSize );
}
-ScfSimpleProgressBar::ScfSimpleProgressBar(std::size_t nSize, SfxObjectShell* pDocShell, const char* pResId)
+ScfSimpleProgressBar::ScfSimpleProgressBar(std::size_t nSize, SfxObjectShell* pDocShell, TranslateId pResId)
: maProgress(pDocShell, pResId)
{
Init( nSize );
diff --git a/sc/source/filter/inc/fprogressbar.hxx b/sc/source/filter/inc/fprogressbar.hxx
index e5ae8aaf5d6c..71baa3766edf 100644
--- a/sc/source/filter/inc/fprogressbar.hxx
+++ b/sc/source/filter/inc/fprogressbar.hxx
@@ -23,6 +23,7 @@
#include <memory>
#include <rtl/ustring.hxx>
#include <progress.hxx>
+#include <unotools/resmgr.hxx>
class SfxObjectShell;
class SvStream;
@@ -105,7 +106,7 @@ public:
const ScfProgressBar operator=(const ScfProgressBar&) = delete;
explicit ScfProgressBar(SfxObjectShell* pDocShell, const OUString& rText);
- explicit ScfProgressBar(SfxObjectShell* pDocShell, const char* pResId);
+ explicit ScfProgressBar(SfxObjectShell* pDocShell, TranslateId pResId);
~ScfProgressBar();
/** Adds a new segment to the progress bar.
@@ -186,7 +187,7 @@ class ScfSimpleProgressBar
{
public:
explicit ScfSimpleProgressBar(std::size_t nSize, SfxObjectShell* pDocShell, const OUString& rText);
- explicit ScfSimpleProgressBar(std::size_t nSize, SfxObjectShell* pDocShell, const char* pResId);
+ explicit ScfSimpleProgressBar(std::size_t nSize, SfxObjectShell* pDocShell, TranslateId pResId);
/** Set progress bar to the specified position. */
void ProgressAbs( std::size_t nPos ) { maProgress.ProgressAbs( nPos ); }
diff --git a/sc/source/ui/StatisticsDialogs/AnalysisOfVarianceDialog.cxx b/sc/source/ui/StatisticsDialogs/AnalysisOfVarianceDialog.cxx
index 9c59007314af..f6871ccffa46 100644
--- a/sc/source/ui/StatisticsDialogs/AnalysisOfVarianceDialog.cxx
+++ b/sc/source/ui/StatisticsDialogs/AnalysisOfVarianceDialog.cxx
@@ -22,7 +22,7 @@ namespace
{
struct StatisticCalculation {
- const char* aLabelId;
+ TranslateId aLabelId;
const char* aFormula;
const char* aResultRangeName;
};
@@ -34,10 +34,10 @@ StatisticCalculation const lclBasicStatistics[] =
{ STRID_CALC_SUM, "=SUM(%RANGE%)", "SUM_RANGE" },
{ STRID_CALC_MEAN, "=AVERAGE(%RANGE%)", "MEAN_RANGE" },
{ STRID_CALC_VARIANCE, "=VAR(%RANGE%)", "VAR_RANGE" },
- { nullptr, nullptr, nullptr }
+ { {}, nullptr, nullptr }
};
-const char* lclAnovaLabels[] =
+const TranslateId lclAnovaLabels[] =
{
STR_ANOVA_LABEL_SOURCE_OF_VARIATION,
STR_ANOVA_LABEL_SS,
@@ -46,7 +46,7 @@ const char* lclAnovaLabels[] =
STR_ANOVA_LABEL_F,
STR_ANOVA_LABEL_P_VALUE,
STR_ANOVA_LABEL_F_CRITICAL,
- nullptr
+ {}
};
constexpr OUStringLiteral strWildcardRange = u"%RANGE%";
@@ -116,7 +116,7 @@ void ScAnalysisOfVarianceDialog::Close()
DoClose( ScAnalysisOfVarianceDialogWrapper::GetChildWindowId() );
}
-const char* ScAnalysisOfVarianceDialog::GetUndoNameId()
+TranslateId ScAnalysisOfVarianceDialog::GetUndoNameId()
{
return STR_ANALYSIS_OF_VARIANCE_UNDO_NAME;
}
@@ -164,7 +164,7 @@ void ScAnalysisOfVarianceDialog::RowColumn(ScRangeList& rRangeList, AddressWalke
}
else
{
- const char* pLabelId = (aGroupedBy == BY_COLUMN) ? STR_COLUMN_LABEL_TEMPLATE : STR_ROW_LABEL_TEMPLATE;
+ TranslateId pLabelId = (aGroupedBy == BY_COLUMN) ? STR_COLUMN_LABEL_TEMPLATE : STR_ROW_LABEL_TEMPLATE;
OUString aLabelTemplate(ScResId(pLabelId));
for (size_t i = 0; i < rRangeList.size(); i++)
diff --git a/sc/source/ui/StatisticsDialogs/ChiSquareTestDialog.cxx b/sc/source/ui/StatisticsDialogs/ChiSquareTestDialog.cxx
index 7fb2d50d7dee..cfcf53699df9 100644
--- a/sc/source/ui/StatisticsDialogs/ChiSquareTestDialog.cxx
+++ b/sc/source/ui/StatisticsDialogs/ChiSquareTestDialog.cxx
@@ -32,7 +32,7 @@ void ScChiSquareTestDialog::Close()
DoClose(ScChiSquareTestDialogWrapper::GetChildWindowId());
}
-const char* ScChiSquareTestDialog::GetUndoNameId()
+TranslateId ScChiSquareTestDialog::GetUndoNameId()
{
return STR_CHI_SQUARE_TEST;
}
diff --git a/sc/source/ui/StatisticsDialogs/CovarianceDialog.cxx b/sc/source/ui/StatisticsDialogs/CovarianceDialog.cxx
index 7abff79dc571..b2849d316c37 100644
--- a/sc/source/ui/StatisticsDialogs/CovarianceDialog.cxx
+++ b/sc/source/ui/StatisticsDialogs/CovarianceDialog.cxx
@@ -21,7 +21,7 @@ ScCovarianceDialog::ScCovarianceDialog(
"modules/scalc/ui/covariancedialog.ui", "CovarianceDialog")
{}
-const char* ScCovarianceDialog::GetUndoNameId()
+TranslateId ScCovarianceDialog::GetUndoNameId()
{
return STR_COVARIANCE_UNDO_NAME;
}
diff --git a/sc/source/ui/StatisticsDialogs/DescriptiveStatisticsDialog.cxx b/sc/source/ui/StatisticsDialogs/DescriptiveStatisticsDialog.cxx
index ca2da6458860..0924278c50d9 100644
--- a/sc/source/ui/StatisticsDialogs/DescriptiveStatisticsDialog.cxx
+++ b/sc/source/ui/StatisticsDialogs/DescriptiveStatisticsDialog.cxx
@@ -20,7 +20,7 @@ namespace
{
struct StatisticCalculation {
- const char* aCalculationNameId;
+ TranslateId aCalculationNameId;
const char* aFormula;
};
@@ -41,7 +41,7 @@ const StatisticCalculation lclCalcDefinitions[] =
{ STRID_CALC_MAX, "=MAX(%RANGE%)"},
{ STRID_CALC_SUM, "=SUM(%RANGE%)"},
{ STRID_CALC_COUNT, "=COUNT(%RANGE%)" },
- { nullptr, nullptr }
+ { {}, nullptr }
};
}
@@ -63,7 +63,7 @@ void ScDescriptiveStatisticsDialog::Close()
DoClose( ScDescriptiveStatisticsDialogWrapper::GetChildWindowId() );
}
-const char* ScDescriptiveStatisticsDialog::GetUndoNameId()
+TranslateId ScDescriptiveStatisticsDialog::GetUndoNameId()
{
return STR_DESCRIPTIVE_STATISTICS_UNDO_NAME;
}
diff --git a/sc/source/ui/StatisticsDialogs/ExponentialSmoothingDialog.cxx b/sc/source/ui/StatisticsDialogs/ExponentialSmoothingDialog.cxx
index df3aef026b50..1a87f5beb3cd 100644
--- a/sc/source/ui/StatisticsDialogs/ExponentialSmoothingDialog.cxx
+++ b/sc/source/ui/StatisticsDialogs/ExponentialSmoothingDialog.cxx
@@ -36,7 +36,7 @@ void ScExponentialSmoothingDialog::Close()
DoClose( ScExponentialSmoothingDialogWrapper::GetChildWindowId() );
}
-const char* ScExponentialSmoothingDialog::GetUndoNameId()
+TranslateId ScExponentialSmoothingDialog::GetUndoNameId()
{
return STR_EXPONENTIAL_SMOOTHING_UNDO_NAME;
}
diff --git a/sc/source/ui/StatisticsDialogs/FTestDialog.cxx b/sc/source/ui/StatisticsDialogs/FTestDialog.cxx
index d7b86bc4869f..76b2bade62db 100644
--- a/sc/source/ui/StatisticsDialogs/FTestDialog.cxx
+++ b/sc/source/ui/StatisticsDialogs/FTestDialog.cxx
@@ -34,7 +34,7 @@ void ScFTestDialog::Close()
DoClose( ScFTestDialogWrapper::GetChildWindowId() );
}
-const char* ScFTestDialog::GetUndoNameId()
+TranslateId ScFTestDialog::GetUndoNameId()
{
return STR_FTEST_UNDO_NAME;
}
diff --git a/sc/source/ui/StatisticsDialogs/FourierAnalysisDialog.cxx b/sc/source/ui/StatisticsDialogs/FourierAnalysisDialog.cxx
index 69da12adc126..13e622963f5b 100644
--- a/sc/source/ui/StatisticsDialogs/FourierAnalysisDialog.cxx
+++ b/sc/source/ui/StatisticsDialogs/FourierAnalysisDialog.cxx
@@ -49,7 +49,7 @@ void ScFourierAnalysisDialog::Close()
DoClose(ScFourierAnalysisDialogWrapper::GetChildWindowId());
}
-const char* ScFourierAnalysisDialog::GetUndoNameId() { return STR_FOURIER_ANALYSIS; }
+TranslateId ScFourierAnalysisDialog::GetUndoNameId() { return STR_FOURIER_ANALYSIS; }
ScRange ScFourierAnalysisDialog::ApplyOutput(ScDocShell* pDocShell)
{
diff --git a/sc/source/ui/StatisticsDialogs/MatrixComparisonGenerator.cxx b/sc/source/ui/StatisticsDialogs/MatrixComparisonGenerator.cxx
index 1b26119f8893..4345b816bb96 100644
--- a/sc/source/ui/StatisticsDialogs/MatrixComparisonGenerator.cxx
+++ b/sc/source/ui/StatisticsDialogs/MatrixComparisonGenerator.cxx
@@ -50,7 +50,7 @@ ScMatrixComparisonGenerator::ScMatrixComparisonGenerator(
ScMatrixComparisonGenerator::~ScMatrixComparisonGenerator()
{}
-const char* ScMatrixComparisonGenerator::GetUndoNameId()
+TranslateId ScMatrixComparisonGenerator::GetUndoNameId()
{
return STR_CORRELATION_UNDO_NAME;
}
diff --git a/sc/source/ui/StatisticsDialogs/MovingAverageDialog.cxx b/sc/source/ui/StatisticsDialogs/MovingAverageDialog.cxx
index 813378cab952..9d990ed5a406 100644
--- a/sc/source/ui/StatisticsDialogs/MovingAverageDialog.cxx
+++ b/sc/source/ui/StatisticsDialogs/MovingAverageDialog.cxx
@@ -37,7 +37,7 @@ void ScMovingAverageDialog::Close()
DoClose( ScMovingAverageDialogWrapper::GetChildWindowId() );
}
-const char* ScMovingAverageDialog::GetUndoNameId()
+TranslateId ScMovingAverageDialog::GetUndoNameId()
{
return STR_MOVING_AVERAGE_UNDO_NAME;
}
diff --git a/sc/source/ui/StatisticsDialogs/RandomNumberGeneratorDialog.cxx b/sc/source/ui/StatisticsDialogs/RandomNumberGeneratorDialog.cxx
index 3aa6b93626ee..91b43cbe0433 100644
--- a/sc/source/ui/StatisticsDialogs/RandomNumberGeneratorDialog.cxx
+++ b/sc/source/ui/StatisticsDialogs/RandomNumberGeneratorDialog.cxx
@@ -250,7 +250,7 @@ void ScRandomNumberGeneratorDialog::SelectGeneratorAndGenerateNumbers()
}
template<class RNG>
-void ScRandomNumberGeneratorDialog::GenerateNumbers(RNG& randomGenerator, const char* pDistributionStringId, std::optional<sal_Int8> aDecimalPlaces)
+void ScRandomNumberGeneratorDialog::GenerateNumbers(RNG& randomGenerator, TranslateId pDistributionStringId, std::optional<sal_Int8> aDecimalPlaces)
{
OUString aUndo = ScResId(STR_UNDO_DISTRIBUTION_TEMPLATE);
OUString aDistributionName = ScResId(pDistributionStringId);
diff --git a/sc/source/ui/StatisticsDialogs/RegressionDialog.cxx b/sc/source/ui/StatisticsDialogs/RegressionDialog.cxx
index 5a4002f97d62..fb4342444e95 100644
--- a/sc/source/ui/StatisticsDialogs/RegressionDialog.cxx
+++ b/sc/source/ui/StatisticsDialogs/RegressionDialog.cxx
@@ -103,7 +103,7 @@ namespace
POWER
};
- const char* constRegressionModel[] =
+ const TranslateId constRegressionModel[] =
{
STR_LABEL_LINEAR,
STR_LABEL_LOGARITHMIC,
@@ -167,7 +167,7 @@ void ScRegressionDialog::Close()
DoClose(ScRegressionDialogWrapper::GetChildWindowId());
}
-const char* ScRegressionDialog::GetUndoNameId()
+TranslateId ScRegressionDialog::GetUndoNameId()
{
return STR_REGRESSION_UNDO_NAME;
}
@@ -396,7 +396,7 @@ void ScRegressionDialog::WriteRegressionStatistics(AddressWalkerWriter& rOutput,
rOutput.writeString(ScResId(STR_LABEL_REGRESSION_STATISTICS));
rOutput.newLine();
- const char* aMeasureNames[] =
+ const TranslateId aMeasureNames[] =
{
STR_LABEL_RSQUARED,
STRID_CALC_STD_ERROR,
diff --git a/sc/source/ui/StatisticsDialogs/TTestDialog.cxx b/sc/source/ui/StatisticsDialogs/TTestDialog.cxx
index 9788fc192d4d..864d4ac4f6c2 100644
--- a/sc/source/ui/StatisticsDialogs/TTestDialog.cxx
+++ b/sc/source/ui/StatisticsDialogs/TTestDialog.cxx
@@ -34,7 +34,7 @@ void ScTTestDialog::Close()
DoClose( ScTTestDialogWrapper::GetChildWindowId() );
}
-const char* ScTTestDialog::GetUndoNameId()
+TranslateId ScTTestDialog::GetUndoNameId()
{
return STR_TTEST_UNDO_NAME;
}
diff --git a/sc/source/ui/StatisticsDialogs/ZTestDialog.cxx b/sc/source/ui/StatisticsDialogs/ZTestDialog.cxx
index 2421b3ef19f7..a1731fa8f055 100644
--- a/sc/source/ui/StatisticsDialogs/ZTestDialog.cxx
+++ b/sc/source/ui/StatisticsDialogs/ZTestDialog.cxx
@@ -34,7 +34,7 @@ void ScZTestDialog::Close()
DoClose( ScZTestDialogWrapper::GetChildWindowId() );
}
-const char* ScZTestDialog::GetUndoNameId()
+TranslateId ScZTestDialog::GetUndoNameId()
{
return STR_ZTEST_UNDO_NAME;
}
diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx
index b3e644fc8620..1dea0d05109e 100644
--- a/sc/source/ui/app/inputhdl.cxx
+++ b/sc/source/ui/app/inputhdl.cxx
@@ -2375,7 +2375,7 @@ bool ScInputHandler::StartTable( sal_Unicode cTyped, bool bFromCommand, bool bIn
// whether it's part of an array or not or whether explicit cell
// activation is requested (double-click or F2) or a click in input
// line.
- bool bShowError = (!bInputActivated || !aTester.GetMessageId() || strcmp(aTester.GetMessageId(), STR_PROTECTIONERR) != 0) &&
+ bool bShowError = (!bInputActivated || !aTester.GetMessageId() || aTester.GetMessageId() != STR_PROTECTIONERR) &&
!pActiveViewSh->GetViewData().GetDocShell()->IsReadOnly();
if (bShowError)
{
diff --git a/sc/source/ui/app/inputwin.cxx b/sc/source/ui/app/inputwin.cxx
index 7aa3084fe84e..252e2f21a745 100644
--- a/sc/source/ui/app/inputwin.cxx
+++ b/sc/source/ui/app/inputwin.cxx
@@ -2438,7 +2438,7 @@ IMPL_LINK_NOARG(ScPosWnd, ModifyHdl, weld::ComboBox&, void)
// determine the action that would be taken for the current input
ScNameInputType eType = lcl_GetInputType(m_xWidget->get_active_text()); // uses current view
- const char* pStrId = nullptr;
+ TranslateId pStrId;
switch ( eType )
{
case SC_NAME_INPUT_CELL:
@@ -2523,7 +2523,7 @@ void ScPosWnd::DoEnter()
ScNameInputType eType = lcl_GetInputType( aText );
if ( eType == SC_NAME_INPUT_BAD_NAME || eType == SC_NAME_INPUT_BAD_SELECTION )
{
- const char* pId = (eType == SC_NAME_INPUT_BAD_NAME) ? STR_NAME_ERROR_NAME : STR_NAME_ERROR_SELECTION;
+ TranslateId pId = (eType == SC_NAME_INPUT_BAD_NAME) ? STR_NAME_ERROR_NAME : STR_NAME_ERROR_SELECTION;
pViewSh->ErrorMessage(pId);
}
else if ( eType == SC_NAME_INPUT_DEFINE )
diff --git a/sc/source/ui/app/scdll.cxx b/sc/source/ui/app/scdll.cxx
index 2dbebc32f675..b7f58002f71b 100644
--- a/sc/source/ui/app/scdll.cxx
+++ b/sc/source/ui/app/scdll.cxx
@@ -86,14 +86,14 @@
#include <filter.hxx>
#include <scabstdlg.hxx>
-OUString ScResId(std::string_view aId)
+OUString ScResId(TranslateId aId)
{
return Translate::get(aId, SC_MOD()->GetResLocale());
}
-OUString ScResId(std::string_view aId, int nCardinality)
+OUString ScResId(TranslateNId aContextSingularPlural, int nCardinality)
{
- return Translate::nget(aId, nCardinality, SC_MOD()->GetResLocale());
+ return Translate::nget(aContextSingularPlural, nCardinality, SC_MOD()->GetResLocale());
}
void ScDLL::Init()
diff --git a/sc/source/ui/condformat/condformathelper.cxx b/sc/source/ui/condformat/condformathelper.cxx
index b595b6f8d157..00509b7e2559 100644
--- a/sc/source/ui/condformat/condformathelper.cxx
+++ b/sc/source/ui/condformat/condformathelper.cxx
@@ -103,7 +103,7 @@ OUString getExpression(sal_Int32 nIndex)
OUString getDateString(sal_Int32 nIndex)
{
- const char* aCondStrs[] =
+ const TranslateId aCondStrs[] =
{
STR_COND_TODAY,
STR_COND_YESTERDAY,
diff --git a/sc/source/ui/dbgui/PivotLayoutDialog.cxx b/sc/source/ui/dbgui/PivotLayoutDialog.cxx
index 39357771105d..05a9428eda5e 100644
--- a/sc/source/ui/dbgui/PivotLayoutDialog.cxx
+++ b/sc/source/ui/dbgui/PivotLayoutDialog.cxx
@@ -441,7 +441,7 @@ void ScPivotLayoutDialog::UpdateSourceRange()
return;
aSourceSheet.SetSourceRange(aSourceRange);
- if (aSourceSheet.CheckSourceRange() != nullptr)
+ if (aSourceSheet.CheckSourceRange())
{
mxSourceEdit->SetRefValid(false);
return;
diff --git a/sc/source/ui/dbgui/PivotLayoutTreeListData.cxx b/sc/source/ui/dbgui/PivotLayoutTreeListData.cxx
index 0e5b5bfd4021..a894a03d14c4 100644
--- a/sc/source/ui/dbgui/PivotLayoutTreeListData.cxx
+++ b/sc/source/ui/dbgui/PivotLayoutTreeListData.cxx
@@ -25,7 +25,7 @@ namespace
OUString lclGetFunctionMaskName(const PivotFunc nFunctionMask)
{
- const char* pStrId = nullptr;
+ TranslateId pStrId;
switch (nFunctionMask)
{
case PivotFunc::Sum: pStrId = STR_FUN_TEXT_SUM; break;
diff --git a/sc/source/ui/dbgui/consdlg.cxx b/sc/source/ui/dbgui/consdlg.cxx
index 3c63a9f14692..a4d02ac792b4 100644
--- a/sc/source/ui/dbgui/consdlg.cxx
+++ b/sc/source/ui/dbgui/consdlg.cxx
@@ -38,7 +38,7 @@
namespace
{
- void INFOBOX(weld::Window* pWindow, const char* id)
+ void INFOBOX(weld::Window* pWindow, TranslateId id)
{
std::unique_ptr<weld::MessageDialog> xInfoBox(Application::CreateMessageDialog(pWindow,
VclMessageType::Info, VclButtonsType::Ok,
diff --git a/sc/source/ui/dbgui/dpgroupdlg.cxx b/sc/source/ui/dbgui/dpgroupdlg.cxx
index 4846a9c48aed..550695cc3199 100644
--- a/sc/source/ui/dbgui/dpgroupdlg.cxx
+++ b/sc/source/ui/dbgui/dpgroupdlg.cxx
@@ -43,7 +43,7 @@ const sal_Int32 spnDateParts[] =
css::sheet::DataPilotFieldGroupBy::YEARS
};
-const char* aDatePartResIds[] =
+const TranslateId aDatePartResIds[] =
{
STR_DPFIELD_GROUP_BY_SECONDS,
STR_DPFIELD_GROUP_BY_MINUTES,
diff --git a/sc/source/ui/dbgui/sfiltdlg.cxx b/sc/source/ui/dbgui/sfiltdlg.cxx
index 4f47e4e940a1..030741e3e2bc 100644
--- a/sc/source/ui/dbgui/sfiltdlg.cxx
+++ b/sc/source/ui/dbgui/sfiltdlg.cxx
@@ -40,7 +40,7 @@
namespace
{
- void ERRORBOX(weld::Window* pParent, const char* rid)
+ void ERRORBOX(weld::Window* pParent, TranslateId rid)
{
std::unique_ptr<weld::MessageDialog> xBox(Application::CreateMessageDialog(pParent,
VclMessageType::Warning, VclButtonsType::Ok,
diff --git a/sc/source/ui/docshell/dbdocfun.cxx b/sc/source/ui/docshell/dbdocfun.cxx
index 6c374e1b09a3..b53d5842446c 100644
--- a/sc/source/ui/docshell/dbdocfun.cxx
+++ b/sc/source/ui/docshell/dbdocfun.cxx
@@ -1640,7 +1640,7 @@ void ScDBDocFunc::RefreshPivotTables(const ScDPObject* pDPObj, bool bApi)
return;
o3tl::sorted_vector<ScDPObject*> aRefs;
- const char* pErrId = pDPs->ReloadCache(pDPObj, aRefs);
+ TranslateId pErrId = pDPs->ReloadCache(pDPObj, aRefs);
if (pErrId)
return;
diff --git a/sc/source/ui/docshell/dbdocimp.cxx b/sc/source/ui/docshell/dbdocimp.cxx
index 2d8f7dce8ddb..42b20f3d2cb5 100644
--- a/sc/source/ui/docshell/dbdocimp.cxx
+++ b/sc/source/ui/docshell/dbdocimp.cxx
@@ -142,7 +142,7 @@ bool ScDBDocFunc::DoImport( SCTAB nTab, const ScImportParam& rParam,
bool bSuccess = false;
bool bTruncated = false; // for warning
- const char* pErrStringId = nullptr;
+ TranslateId pErrStringId;
OUString aErrorMessage;
SCCOL nCol = rParam.nCol1;
diff --git a/sc/source/ui/docshell/docfunc.cxx b/sc/source/ui/docshell/docfunc.cxx
index 2133ee93bd6e..ac011281dd36 100644
--- a/sc/source/ui/docshell/docfunc.cxx
+++ b/sc/source/ui/docshell/docfunc.cxx
@@ -5751,7 +5751,7 @@ void ScDocFunc::ConvertFormulaToValue( const ScRange& rRange, bool bInteraction
aModificator.SetDocumentModified();
}
-void ScDocFunc::EnterListAction(const char* pNameResId)
+void ScDocFunc::EnterListAction(TranslateId pNameResId)
{
OUString aUndo(ScResId(pNameResId));
ViewShellId nViewShellId(-1);
diff --git a/sc/source/ui/docshell/docsh5.cxx b/sc/source/ui/docshell/docsh5.cxx
index 08ac3b5f0fe0..3afc8c5b4fa5 100644
--- a/sc/source/ui/docshell/docsh5.cxx
+++ b/sc/source/ui/docshell/docsh5.cxx
@@ -67,7 +67,7 @@ using ::std::vector;
// former viewfunc/dbfunc methods
-void ScDocShell::ErrorMessage(const char* pGlobStrId)
+void ScDocShell::ErrorMessage(TranslateId pGlobStrId)
{
//! StopMarking at the (active) view?
@@ -75,7 +75,7 @@ void ScDocShell::ErrorMessage(const char* pGlobStrId)
weld::WaitObject aWaitOff( pParent );
bool bFocus = pParent && pParent->has_focus();
- if (pGlobStrId && strcmp(pGlobStrId, STR_PROTECTIONERR) == 0)
+ if (pGlobStrId && pGlobStrId == STR_PROTECTIONERR)
{
if (IsReadOnly())
{
diff --git a/sc/source/ui/docshell/editable.cxx b/sc/source/ui/docshell/editable.cxx
index 1de616790124..86bbb9f2e004 100644
--- a/sc/source/ui/docshell/editable.cxx
+++ b/sc/source/ui/docshell/editable.cxx
@@ -149,10 +149,10 @@ void ScEditableTester::TestBlockForAction(
}
}
-const char* ScEditableTester::GetMessageId() const
+TranslateId ScEditableTester::GetMessageId() const
{
if (mbIsEditable)
- return nullptr;
+ return {};
else if (mbOnlyMatrix)
return STR_MATRIXFRAGMENTERR;
else
diff --git a/sc/source/ui/drawfunc/fuconrec.cxx b/sc/source/ui/drawfunc/fuconrec.cxx
index 6e9056027009..c112617652b4 100644
--- a/sc/source/ui/drawfunc/fuconrec.cxx
+++ b/sc/source/ui/drawfunc/fuconrec.cxx
@@ -56,7 +56,7 @@ FuConstRectangle::~FuConstRectangle()
namespace {
-::basegfx::B2DPolyPolygon getPolygon(const char* pResId, const SdrModel& rModel)
+::basegfx::B2DPolyPolygon getPolygon(TranslateId pResId, const SdrModel& rModel)
{
::basegfx::B2DPolyPolygon aRetval;
XLineEndListRef pLineEndList(rModel.GetLineEndList());
diff --git a/sc/source/ui/inc/AnalysisOfVarianceDialog.hxx b/sc/source/ui/inc/AnalysisOfVarianceDialog.hxx
index 675cc422e1e6..35c53e72778f 100644
--- a/sc/source/ui/inc/AnalysisOfVarianceDialog.hxx
+++ b/sc/source/ui/inc/AnalysisOfVarianceDialog.hxx
@@ -54,7 +54,7 @@ public:
virtual void Close() override;
protected:
- virtual const char* GetUndoNameId() override;
+ virtual TranslateId GetUndoNameId() override;
virtual ScRange ApplyOutput(ScDocShell* pDocShell) override;
};
diff --git a/sc/source/ui/inc/ChiSquareTestDialog.hxx b/sc/source/ui/inc/ChiSquareTestDialog.hxx
index 584035c8e83c..20e7d696c95f 100644
--- a/sc/source/ui/inc/ChiSquareTestDialog.hxx
+++ b/sc/source/ui/inc/ChiSquareTestDialog.hxx
@@ -24,7 +24,7 @@ public:
virtual void Close() override;
protected:
- virtual const char* GetUndoNameId() override;
+ virtual TranslateId GetUndoNameId() override;
virtual ScRange ApplyOutput(ScDocShell* pDocShell) override;
};
diff --git a/sc/source/ui/inc/CovarianceDialog.hxx b/sc/source/ui/inc/CovarianceDialog.hxx
index ae30b34e086b..181bebeac154 100644
--- a/sc/source/ui/inc/CovarianceDialog.hxx
+++ b/sc/source/ui/inc/CovarianceDialog.hxx
@@ -24,7 +24,7 @@ public:
protected:
virtual OUString getLabel() override;
virtual OUString getTemplate() override;
- virtual const char* GetUndoNameId() override;
+ virtual TranslateId GetUndoNameId() override;
};
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/DescriptiveStatisticsDialog.hxx b/sc/source/ui/inc/DescriptiveStatisticsDialog.hxx
index 9edd1329021e..dd2488450beb 100644
--- a/sc/source/ui/inc/DescriptiveStatisticsDialog.hxx
+++ b/sc/source/ui/inc/DescriptiveStatisticsDialog.hxx
@@ -24,7 +24,7 @@ public:
virtual void Close() override;
protected:
- virtual const char* GetUndoNameId() override;
+ virtual TranslateId GetUndoNameId() override;
virtual ScRange ApplyOutput(ScDocShell* pDocShell) override;
};
diff --git a/sc/source/ui/inc/ExponentialSmoothingDialog.hxx b/sc/source/ui/inc/ExponentialSmoothingDialog.hxx
index 0d425fdbc0a2..54b877167805 100644
--- a/sc/source/ui/inc/ExponentialSmoothingDialog.hxx
+++ b/sc/source/ui/inc/ExponentialSmoothingDialog.hxx
@@ -30,7 +30,7 @@ public:
virtual void Close() override;
protected:
- virtual const char* GetUndoNameId() override;
+ virtual TranslateId GetUndoNameId() override;
virtual ScRange ApplyOutput(ScDocShell* pDocShell) override;
};
diff --git a/sc/source/ui/inc/FTestDialog.hxx b/sc/source/ui/inc/FTestDialog.hxx
index f1a0467b24d0..efd477ce08bb 100644
--- a/sc/source/ui/inc/FTestDialog.hxx
+++ b/sc/source/ui/inc/FTestDialog.hxx
@@ -24,7 +24,7 @@ public:
virtual void Close() override;
protected:
- virtual const char* GetUndoNameId() override;
+ virtual TranslateId GetUndoNameId() override;
virtual ScRange ApplyOutput(ScDocShell* pDocShell) override;
};
diff --git a/sc/source/ui/inc/FourierAnalysisDialog.hxx b/sc/source/ui/inc/FourierAnalysisDialog.hxx
index ab9507e31c49..f839b274e4d8 100644
--- a/sc/source/ui/inc/FourierAnalysisDialog.hxx
+++ b/sc/source/ui/inc/FourierAnalysisDialog.hxx
@@ -41,7 +41,7 @@ public:
virtual void Close() override;
protected:
- virtual const char* GetUndoNameId() override;
+ virtual TranslateId GetUndoNameId() override;
virtual ScRange ApplyOutput(ScDocShell* pDocShell) override;
virtual bool InputRangesValid() override;
diff --git a/sc/source/ui/inc/MatrixComparisonGenerator.hxx b/sc/source/ui/inc/MatrixComparisonGenerator.hxx
index e68d60772035..058b9611a758 100644
--- a/sc/source/ui/inc/MatrixComparisonGenerator.hxx
+++ b/sc/source/ui/inc/MatrixComparisonGenerator.hxx
@@ -26,7 +26,7 @@ public:
virtual ~ScMatrixComparisonGenerator() override;
protected:
- virtual const char* GetUndoNameId() override;
+ virtual TranslateId GetUndoNameId() override;
virtual ScRange ApplyOutput(ScDocShell* pDocShell) override;
virtual OUString getLabel() = 0;
diff --git a/sc/source/ui/inc/MovingAverageDialog.hxx b/sc/source/ui/inc/MovingAverageDialog.hxx
index fe03e2631d08..216b67c8b400 100644
--- a/sc/source/ui/inc/MovingAverageDialog.hxx
+++ b/sc/source/ui/inc/MovingAverageDialog.hxx
@@ -31,7 +31,7 @@ public:
virtual void Close() override;
protected:
- virtual const char* GetUndoNameId() override;
+ virtual TranslateId GetUndoNameId() override;
virtual ScRange ApplyOutput(ScDocShell* pDocShell) override;
};
diff --git a/sc/source/ui/inc/RandomNumberGeneratorDialog.hxx b/sc/source/ui/inc/RandomNumberGeneratorDialog.hxx
index 40a457732909..0f890fc79936 100644
--- a/sc/source/ui/inc/RandomNumberGeneratorDialog.hxx
+++ b/sc/source/ui/inc/RandomNumberGeneratorDialog.hxx
@@ -62,7 +62,7 @@ private:
template<class RNG>
- void GenerateNumbers(RNG& randomGenerator, const char* pDistributionStringId, const std::optional<sal_Int8> aDecimalPlaces);
+ void GenerateNumbers(RNG& randomGenerator, TranslateId pDistributionStringId, const std::optional<sal_Int8> aDecimalPlaces);
void SelectGeneratorAndGenerateNumbers();
diff --git a/sc/source/ui/inc/RegressionDialog.hxx b/sc/source/ui/inc/RegressionDialog.hxx
index cab704d96384..59accf265c3b 100644
--- a/sc/source/ui/inc/RegressionDialog.hxx
+++ b/sc/source/ui/inc/RegressionDialog.hxx
@@ -40,7 +40,7 @@ public:
virtual void Close() override;
protected:
- virtual const char* GetUndoNameId() override;
+ virtual TranslateId GetUndoNameId() override;
virtual ScRange ApplyOutput(ScDocShell* pDocShell) override;
virtual bool InputRangesValid() override;
diff --git a/sc/source/ui/inc/StatisticsInputOutputDialog.hxx b/sc/source/ui/inc/StatisticsInputOutputDialog.hxx
index 6f35e75472ea..2de05951b3ab 100644
--- a/sc/source/ui/inc/StatisticsInputOutputDialog.hxx
+++ b/sc/source/ui/inc/StatisticsInputOutputDialog.hxx
@@ -37,7 +37,7 @@ protected:
void CalculateInputAndWriteToOutput();
virtual ScRange ApplyOutput(ScDocShell* pDocShell) = 0;
- virtual const char* GetUndoNameId() = 0;
+ virtual TranslateId GetUndoNameId() = 0;
virtual bool InputRangesValid();
void ValidateDialogInput();
diff --git a/sc/source/ui/inc/StatisticsTwoVariableDialog.hxx b/sc/source/ui/inc/StatisticsTwoVariableDialog.hxx
index 8ac10b3c42df..3b1d5e46781f 100644
--- a/sc/source/ui/inc/StatisticsTwoVariableDialog.hxx
+++ b/sc/source/ui/inc/StatisticsTwoVariableDialog.hxx
@@ -36,7 +36,7 @@ protected:
void CalculateInputAndWriteToOutput();
virtual ScRange ApplyOutput(ScDocShell* pDocShell) = 0;
- virtual const char* GetUndoNameId() = 0;
+ virtual TranslateId GetUndoNameId() = 0;
virtual bool InputRangesValid();
void ValidateDialogInput();
diff --git a/sc/source/ui/inc/TTestDialog.hxx b/sc/source/ui/inc/TTestDialog.hxx
index 1cfa7475c2d1..0ed370dce2d4 100644
--- a/sc/source/ui/inc/TTestDialog.hxx
+++ b/sc/source/ui/inc/TTestDialog.hxx
@@ -24,7 +24,7 @@ public:
virtual void Close() override;
protected:
- virtual const char* GetUndoNameId() override;
+ virtual TranslateId GetUndoNameId() override;
virtual ScRange ApplyOutput(ScDocShell* pDocShell) override;
};
diff --git a/sc/source/ui/inc/ZTestDialog.hxx b/sc/source/ui/inc/ZTestDialog.hxx
index c9b62603ca48..2476c38f32a7 100644
--- a/sc/source/ui/inc/ZTestDialog.hxx
+++ b/sc/source/ui/inc/ZTestDialog.hxx
@@ -24,7 +24,7 @@ public:
virtual void Close() override;
protected:
- virtual const char* GetUndoNameId() override;
+ virtual TranslateId GetUndoNameId() override;
virtual ScRange ApplyOutput(ScDocShell* pDocShell) override;
};
diff --git a/sc/source/ui/inc/docfunc.hxx b/sc/source/ui/inc/docfunc.hxx
index 43839eb94d21..4a8cad6dc9d6 100644
--- a/sc/source/ui/inc/docfunc.hxx
+++ b/sc/source/ui/inc/docfunc.hxx
@@ -23,6 +23,7 @@
#include <global.hxx>
#include <formula/grammar.hxx>
#include <tabbgcolor.hxx>
+#include <unotools/resmgr.hxx>
#include <memory>
#include <vector>
@@ -73,7 +74,7 @@ public:
void NotifyDrawUndo(std::unique_ptr<SdrUndoAction>);
// for grouping multiple operations into one with a new name
- void EnterListAction(const char* pNameResId);
+ void EnterListAction(TranslateId pNameResId);
void EndListAction();
bool DetectiveAddPred(const ScAddress& rPos);
diff --git a/sc/source/ui/inc/docsh.hxx b/sc/source/ui/inc/docsh.hxx
index 57f172ef2b5e..83cd3a20857e 100644
--- a/sc/source/ui/inc/docsh.hxx
+++ b/sc/source/ui/inc/docsh.hxx
@@ -259,7 +259,7 @@ public:
void DoAutoStyle( const ScRange& rRange, const OUString& rStyle );
static weld::Window* GetActiveDialogParent();
- void ErrorMessage(const char* pGlobStrId);
+ void ErrorMessage(TranslateId pGlobStrId);
bool IsEditable() const;
bool AdjustRowHeight( SCROW nStartRow, SCROW nEndRow, SCTAB nTab );
diff --git a/sc/source/ui/inc/editable.hxx b/sc/source/ui/inc/editable.hxx
index e03a1235743a..1c229a1b11ef 100644
--- a/sc/source/ui/inc/editable.hxx
+++ b/sc/source/ui/inc/editable.hxx
@@ -20,6 +20,7 @@
#pragma once
#include <address.hxx>
+#include <unotools/resmgr.hxx>
class ScDocument;
class ScViewFunc;
@@ -82,7 +83,7 @@ public:
bool IsEditable() const { return mbIsEditable; }
bool IsFormatEditable() const { return mbIsEditable || mbOnlyMatrix; }
- const char* GetMessageId() const;
+ TranslateId GetMessageId() const;
};
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/tabview.hxx b/sc/source/ui/inc/tabview.hxx
index 93cedfee36ec..0bdc143d3e62 100644
--- a/sc/source/ui/inc/tabview.hxx
+++ b/sc/source/ui/inc/tabview.hxx
@@ -576,7 +576,7 @@ public:
void SplitAtPixel( const Point& rPixel );
void InvalidateSplit();
- void ErrorMessage(const char* pGlobStrId);
+ void ErrorMessage(TranslateId pGlobStrId);
void EnableRefInput(bool bFlag);
diff --git a/sc/source/ui/navipi/content.cxx b/sc/source/ui/navipi/content.cxx
index d477fef62439..a5d464821f12 100644
--- a/sc/source/ui/navipi/content.cxx
+++ b/sc/source/ui/navipi/content.cxx
@@ -163,7 +163,7 @@ ScContentTree::~ScContentTree()
}
}
-static const char* SCSTR_CONTENT_ARY[] =
+const TranslateId SCSTR_CONTENT_ARY[] =
{
SCSTR_CONTENT_ROOT,
SCSTR_CONTENT_TABLE,
diff --git a/sc/source/ui/pagedlg/areasdlg.cxx b/sc/source/ui/pagedlg/areasdlg.cxx
index e90f32408fcd..2c52fcdd868d 100644
--- a/sc/source/ui/pagedlg/areasdlg.cxx
+++ b/sc/source/ui/pagedlg/areasdlg.cxx
@@ -51,7 +51,7 @@ enum {
namespace
{
- void ERRORBOX(weld::Window* pParent, const char* rId)
+ void ERRORBOX(weld::Window* pParent, TranslateId rId)
{
std::unique_ptr<weld::MessageDialog> xBox(Application::CreateMessageDialog(pParent,
VclMessageType::Warning, VclButtonsType::Ok,
diff --git a/sc/source/ui/undo/undoblk.cxx b/sc/source/ui/undo/undoblk.cxx
index 6706b19adc0b..438cacb4884d 100644
--- a/sc/source/ui/undo/undoblk.cxx
+++ b/sc/source/ui/undo/undoblk.cxx
@@ -1986,7 +1986,7 @@ ScUndoIndent::~ScUndoIndent()
OUString ScUndoIndent::GetComment() const
{
- const char* pId = bIsIncrement ? STR_UNDO_INC_INDENT : STR_UNDO_DEC_INDENT;
+ TranslateId pId = bIsIncrement ? STR_UNDO_INC_INDENT : STR_UNDO_DEC_INDENT;
return ScResId(pId);
}
diff --git a/sc/source/ui/undo/undocell.cxx b/sc/source/ui/undo/undocell.cxx
index 583e2dd4e832..8323cd824612 100644
--- a/sc/source/ui/undo/undocell.cxx
+++ b/sc/source/ui/undo/undocell.cxx
@@ -893,7 +893,7 @@ ScUndoDetective::~ScUndoDetective()
OUString ScUndoDetective::GetComment() const
{
- const char* pId = STR_UNDO_DETDELALL;
+ TranslateId pId = STR_UNDO_DETDELALL;
if ( !bIsDelete )
switch ( static_cast<ScDetOpType>(nAction) )
{
diff --git a/sc/source/ui/undo/undodat.cxx b/sc/source/ui/undo/undodat.cxx
index cd92934d1b6c..5f6578f71ff1 100644
--- a/sc/source/ui/undo/undodat.cxx
+++ b/sc/source/ui/undo/undodat.cxx
@@ -1419,7 +1419,7 @@ ScUndoDataPilot::ScUndoDataPilot( ScDocShell* pNewDocShell,
OUString ScUndoDataPilot::GetComment() const
{
- const char* pResId;
+ TranslateId pResId;
if (xOldUndoDoc && xNewUndoDoc)
pResId = STR_UNDO_PIVOT_MODIFY;
else if (xNewUndoDoc)
diff --git a/sc/source/ui/undo/undostyl.cxx b/sc/source/ui/undo/undostyl.cxx
index 9596edb07a01..f110d0190051 100644
--- a/sc/source/ui/undo/undostyl.cxx
+++ b/sc/source/ui/undo/undostyl.cxx
@@ -83,7 +83,7 @@ ScUndoModifyStyle::~ScUndoModifyStyle()
OUString ScUndoModifyStyle::GetComment() const
{
- const char* pId = (eFamily == SfxStyleFamily::Para) ?
+ TranslateId pId = (eFamily == SfxStyleFamily::Para) ?
STR_UNDO_EDITCELLSTYLE :
STR_UNDO_EDITPAGESTYLE;
return ScResId(pId);
diff --git a/sc/source/ui/undo/undotab.cxx b/sc/source/ui/undo/undotab.cxx
index e0def882cea6..28f8188b34b0 100644
--- a/sc/source/ui/undo/undotab.cxx
+++ b/sc/source/ui/undo/undotab.cxx
@@ -1138,7 +1138,7 @@ bool ScUndoShowHideTab::CanRepeat(SfxRepeatTarget& rTarget) const
OUString ScUndoShowHideTab::GetComment() const
{
- const char* pId;
+ TranslateId pId;
if (undoTabs.size() > 1)
{
pId = bShow ? STR_UNDO_SHOWTABS : STR_UNDO_HIDETABS;
@@ -1214,7 +1214,7 @@ bool ScUndoDocProtect::CanRepeat(SfxRepeatTarget& /* rTarget */) const
OUString ScUndoDocProtect::GetComment() const
{
- const char* pId = mpProtectSettings->isProtected() ? STR_UNDO_PROTECT_DOC : STR_UNDO_UNPROTECT_DOC;
+ TranslateId pId = mpProtectSettings->isProtected() ? STR_UNDO_PROTECT_DOC : STR_UNDO_UNPROTECT_DOC;
return ScResId(pId);
}
@@ -1284,7 +1284,7 @@ bool ScUndoTabProtect::CanRepeat(SfxRepeatTarget& /* rTarget */) const
OUString ScUndoTabProtect::GetComment() const
{
- const char* pId = mpProtectSettings->isProtected() ? STR_UNDO_PROTECT_TAB : STR_UNDO_UNPROTECT_TAB;
+ TranslateId pId = mpProtectSettings->isProtected() ? STR_UNDO_PROTECT_TAB : STR_UNDO_UNPROTECT_TAB;
return ScResId(pId);
}
diff --git a/sc/source/ui/unoobj/styleuno.cxx b/sc/source/ui/unoobj/styleuno.cxx
index dfbee4752ae7..98568aa82994 100644
--- a/sc/source/ui/unoobj/styleuno.cxx
+++ b/sc/source/ui/unoobj/styleuno.cxx
@@ -894,7 +894,7 @@ uno::Any SAL_CALL ScStyleFamilyObj::getPropertyValue( const OUString& sPropertyN
}
SolarMutexGuard aGuard;
- const char* pResId = nullptr;
+ TranslateId pResId;
switch ( eFamily )
{
case SfxStyleFamily::Para:
diff --git a/sc/source/ui/unoobj/targuno.cxx b/sc/source/ui/unoobj/targuno.cxx
index 35e695451ce1..b7ecd021f369 100644
--- a/sc/source/ui/unoobj/targuno.cxx
+++ b/sc/source/ui/unoobj/targuno.cxx
@@ -43,7 +43,7 @@
using namespace ::com::sun::star;
-static const char* aTypeResIds[SC_LINKTARGETTYPE_COUNT] =
+const TranslateId aTypeResIds[SC_LINKTARGETTYPE_COUNT] =
{
SCSTR_CONTENT_TABLE, // SC_LINKTARGETTYPE_SHEET
SCSTR_CONTENT_RANGENAME, // SC_LINKTARGETTYPE_RANGENAME
diff --git a/sc/source/ui/view/cellsh1.cxx b/sc/source/ui/view/cellsh1.cxx
index fa0b55d75e66..972fe5675f54 100644
--- a/sc/source/ui/view/cellsh1.cxx
+++ b/sc/source/ui/view/cellsh1.cxx
@@ -3016,7 +3016,7 @@ void RunPivotLayoutDialog(ScModule* pScMod,
void SetupRangeForPivotTableDialog(const ScRange& rRange,
ScAddress& rDestPos,
ScDocument* pDoc,
- const char* pSrcErrorId,
+ TranslateId pSrcErrorId,
std::unique_ptr<ScDPObject>& pNewDPObject)
{
ScSheetSourceDesc aShtDesc(pDoc);
@@ -3035,7 +3035,7 @@ void SetupRangeForPivotTableDialog(const ScRange& rRange,
rRange.aStart.Tab() );
}
-void ErrorOrRunPivotLayoutDialog(const char* pSrcErrorId,
+void ErrorOrRunPivotLayoutDialog(TranslateId pSrcErrorId,
ScAddress& rDestPos,
ScModule* pScMod,
ScTabViewShell* pTabViewShell,
@@ -3171,7 +3171,7 @@ void ScCellShell::ExecuteDataPilotDialog()
}
else
{
- const char* pSrcErrorId = nullptr;
+ TranslateId pSrcErrorId;
if (pTypeDlg->IsNamedRange())
{
diff --git a/sc/source/ui/view/dbfunc3.cxx b/sc/source/ui/view/dbfunc3.cxx
index 8258b52d6846..31a922ff0613 100644
--- a/sc/source/ui/view/dbfunc3.cxx
+++ b/sc/source/ui/view/dbfunc3.cxx
@@ -1395,7 +1395,7 @@ void ScDBFunc::DataPilotInput( const ScAddress& rPos, const OUString& rString )
return;
}
- const char* pErrorId = nullptr;
+ TranslateId pErrorId;
pDPObj->BuildAllDimensionMembers();
ScDPSaveData aData( *pDPObj->GetSaveData() );
diff --git a/sc/source/ui/view/tabview2.cxx b/sc/source/ui/view/tabview2.cxx
index 0ec66ee6eb3c..ecfcd036c750 100644
--- a/sc/source/ui/view/tabview2.cxx
+++ b/sc/source/ui/view/tabview2.cxx
@@ -1410,7 +1410,7 @@ void ScTabView::MakeDrawLayer()
}
}
-void ScTabView::ErrorMessage(const char* pGlobStrId)
+void ScTabView::ErrorMessage(TranslateId pGlobStrId)
{
if ( SC_MOD()->IsInExecuteDrop() )
{
@@ -1424,7 +1424,7 @@ void ScTabView::ErrorMessage(const char* pGlobStrId)
weld::WaitObject aWaitOff( pParent );
bool bFocus = pParent && pParent->has_focus();
- if (pGlobStrId && strcmp(pGlobStrId, STR_PROTECTIONERR) == 0)
+ if (pGlobStrId && pGlobStrId == STR_PROTECTIONERR)
{
if (aViewData.GetDocShell()->IsReadOnly())
{
diff --git a/sc/source/ui/view/tabvwsha.cxx b/sc/source/ui/view/tabvwsha.cxx
index 07c915ad7b7f..a3f06eb69e63 100644
--- a/sc/source/ui/view/tabvwsha.cxx
+++ b/sc/source/ui/view/tabvwsha.cxx
@@ -86,7 +86,7 @@ bool ScTabViewShell::GetFunction( OUString& rFuncStr, FormulaError nErrCode )
return true;
}
- const char* pGlobStrId = nullptr;
+ TranslateId pGlobStrId;
switch (eFunc)
{
case SUBTOTAL_FUNC_AVE: pGlobStrId = STR_FUN_TEXT_AVG; break;
diff --git a/sc/source/ui/view/viewfunc.cxx b/sc/source/ui/view/viewfunc.cxx
index 4e5e149c9755..31e36774d187 100644
--- a/sc/source/ui/view/viewfunc.cxx
+++ b/sc/source/ui/view/viewfunc.cxx
@@ -1773,7 +1773,7 @@ void ScViewFunc::DeleteMulti( bool bRows )
// test if allowed
- const char* pErrorId = nullptr;
+ TranslateId pErrorId;
bool bNeedRefresh = false;
for (size_t i = 0, n = aSpans.size(); i < n && !pErrorId; ++i)
{
diff --git a/scaddins/inc/analysis.hrc b/scaddins/inc/analysis.hrc
index 0657898ac8b2..e20d7c73f22e 100644
--- a/scaddins/inc/analysis.hrc
+++ b/scaddins/inc/analysis.hrc
@@ -19,9 +19,11 @@
#pragma once
-#define NC_(Context, String) reinterpret_cast<char const *>(Context "\004" u8##String)
+#include <unotools/resmgr.hxx>
-const char* ANALYSIS_Workday[] =
+#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
+
+const TranslateId ANALYSIS_Workday[] =
{
NC_("ANALYSIS_Workday", "Returns the serial number of the date before or after a specified number of workdays"),
NC_("ANALYSIS_Workday", "Start date"),
@@ -32,7 +34,7 @@ const char* ANALYSIS_Workday[] =
NC_("ANALYSIS_Workday", "List of date values of days off (vacation, holidays, etc.)")
};
-const char* ANALYSIS_Yearfrac[] =
+const TranslateId ANALYSIS_Yearfrac[] =
{
NC_("ANALYSIS_Yearfrac", "Returns the number of years (including fractional part) between two dates"),
NC_("ANALYSIS_Yearfrac", "Start date"),
@@ -43,7 +45,7 @@ const char* ANALYSIS_Yearfrac[] =
NC_("ANALYSIS_Yearfrac", "Basis indicates the day-count convention to use in the calculation")
};
-const char* ANALYSIS_Edate[] =
+const TranslateId ANALYSIS_Edate[] =
{
NC_("ANALYSIS_Edate", "Returns the serial number of the date that is a specified number of months before or after the start date"),
NC_("ANALYSIS_Edate", "Start date"),
@@ -52,7 +54,7 @@ const char* ANALYSIS_Edate[] =
NC_("ANALYSIS_Edate", "Number of months before or after the start date")
};
-const char* ANALYSIS_Weeknum[] =
+const TranslateId ANALYSIS_Weeknum[] =
{
NC_("ANALYSIS_Weeknum", "Returns the number of the calendar week in which the specified date occurs.\nThis function exists for interoperability with older Microsoft Excel documents, for new documents use WEEKNUM instead."),
NC_("ANALYSIS_Weeknum", "Date"),
@@ -61,7 +63,7 @@ const char* ANALYSIS_Weeknum[] =
NC_("ANALYSIS_Weeknum", "Indicates the first day of the week (1 = Sunday, 2 = Monday)")
};
-const char* ANALYSIS_Eomonth[] =
+const TranslateId ANALYSIS_Eomonth[] =
{
NC_("ANALYSIS_Eomonth", "Returns the serial number of the last day of the month that comes a certain number of months before or after the start date"),
NC_("ANALYSIS_Eomonth", "Start date"),
@@ -70,7 +72,7 @@ const char* ANALYSIS_Eomonth[] =
NC_("ANALYSIS_Eomonth", "Number of months before or after the start date")
};
-const char* ANALYSIS_Networkdays[] =
+const TranslateId ANALYSIS_Networkdays[] =
{
NC_("ANALYSIS_Networkdays", "Returns the number of workdays between two dates.\nThis function exists for interoperability with older Microsoft Excel documents, for new documents use NETWORKDAYS instead."),
NC_("ANALYSIS_Networkdays", "Start date"),
@@ -81,28 +83,28 @@ const char* ANALYSIS_Networkdays[] =
NC_("ANALYSIS_Networkdays", "List of date values representing days off (vacation, holidays, etc.)")
};
-const char* ANALYSIS_Iseven[] =
+const TranslateId ANALYSIS_Iseven[] =
{
NC_("ANALYSIS_Iseven", "Returns the value 'true' if the number is even"),
NC_("ANALYSIS_Iseven", "Number"),
NC_("ANALYSIS_Iseven", "The number")
};
-const char* ANALYSIS_Isodd[] =
+const TranslateId ANALYSIS_Isodd[] =
{
NC_("ANALYSIS_Isodd", "Returns the value 'true' if the number is odd"),
NC_("ANALYSIS_Isodd", "Number"),
NC_("ANALYSIS_Isodd", "The number")
};
-const char* ANALYSIS_Multinomial[] =
+const TranslateId ANALYSIS_Multinomial[] =
{
NC_("ANALYSIS_Multinomial", "Returns the multinomial coefficient of a set of numbers"),
NC_("ANALYSIS_Multinomial", "Number"),
NC_("ANALYSIS_Multinomial", "Number or list of numbers for which you want the multinomial coefficient")
};
-const char* ANALYSIS_Seriessum[] =
+const TranslateId ANALYSIS_Seriessum[] =
{
NC_("ANALYSIS_Seriessum", "Returns the sum of a power series"),
NC_("ANALYSIS_Seriessum", "X"),
@@ -115,7 +117,7 @@ const char* ANALYSIS_Seriessum[] =
NC_("ANALYSIS_Seriessum", "Set of coefficients by which each successive power of the variable x is multiplied")
};
-const char* ANALYSIS_Quotient[] =
+const TranslateId ANALYSIS_Quotient[] =
{
NC_("ANALYSIS_Quotient", "Returns the integer portion of a division"),
NC_("ANALYSIS_Quotient", "Numerator"),
@@ -124,7 +126,7 @@ const char* ANALYSIS_Quotient[] =
NC_("ANALYSIS_Quotient", "The divisor")
};
-const char* ANALYSIS_Mround[] =
+const TranslateId ANALYSIS_Mround[] =
{
NC_("ANALYSIS_Mround", "Returns a number rounded to a specified multiple"),
NC_("ANALYSIS_Mround", "Number"),
@@ -133,14 +135,14 @@ const char* ANALYSIS_Mround[] =
NC_("ANALYSIS_Mround", "The multiple to which you want to round number")
};
-const char* ANALYSIS_Sqrtpi[] =
+const TranslateId ANALYSIS_Sqrtpi[] =
{
NC_("ANALYSIS_Sqrtpi", "Returns the square root of a number which has been multiplied by pi"),
NC_("ANALYSIS_Sqrtpi", "Number"),
NC_("ANALYSIS_Sqrtpi", "The number by which pi is multiplied")
};
-const char* ANALYSIS_Randbetween[] =
+const TranslateId ANALYSIS_Randbetween[] =
{
NC_("ANALYSIS_Randbetween", "Returns a random integer between the numbers you specify"),
NC_("ANALYSIS_Randbetween", "Bottom"),
@@ -149,21 +151,21 @@ const char* ANALYSIS_Randbetween[] =
NC_("ANALYSIS_Randbetween", "The largest integer returned")
};
-const char* ANALYSIS_Gcd[] =
+const TranslateId ANALYSIS_Gcd[] =
{
NC_("ANALYSIS_Gcd", "Returns the greatest common divisor.\nThis function exists for interoperability with older Microsoft Excel documents, for new documents use GCD instead."),
NC_("ANALYSIS_Gcd", "Number"),
NC_("ANALYSIS_Gcd", "Number or list of numbers")
};
-const char* ANALYSIS_Lcm[] =
+const TranslateId ANALYSIS_Lcm[] =
{
NC_("ANALYSIS_Lcm", "Returns the least common multiple.\nThis function exists for interoperability with older Microsoft Excel documents, for new documents use LCM instead."),
NC_("ANALYSIS_Lcm", "Number"),
NC_("ANALYSIS_Lcm", "Number or list of numbers")
};
-const char* ANALYSIS_Besseli[] =
+const TranslateId ANALYSIS_Besseli[] =
{
NC_("ANALYSIS_Besseli", "Returns the modified Bessel function In(x)"),
NC_("ANALYSIS_Besseli", "X"),
@@ -172,7 +174,7 @@ const char* ANALYSIS_Besseli[] =
NC_("ANALYSIS_Besseli", "The order of the Bessel function")
};
-const char* ANALYSIS_Besselj[] =
+const TranslateId ANALYSIS_Besselj[] =
{
NC_("ANALYSIS_Besselj", "Returns the Bessel function Jn(x)"),
NC_("ANALYSIS_Besselj", "X"),
@@ -181,7 +183,7 @@ const char* ANALYSIS_Besselj[] =
NC_("ANALYSIS_Besselj", "The order of the Bessel function")
};
-const char* ANALYSIS_Besselk[] =
+const TranslateId ANALYSIS_Besselk[] =
{
NC_("ANALYSIS_Besselk", "Returns the Bessel function Kn(x)"),
NC_("ANALYSIS_Besselk", "X"),
@@ -190,7 +192,7 @@ const char* ANALYSIS_Besselk[] =
NC_("ANALYSIS_Besselk", "The order of the Bessel function")
};
-const char* ANALYSIS_Bessely[] =
+const TranslateId ANALYSIS_Bessely[] =
{
NC_("ANALYSIS_Bessely", "Returns the Bessel function Yn(x)"),
NC_("ANALYSIS_Bessely", "X"),
@@ -199,7 +201,7 @@ const char* ANALYSIS_Bessely[] =
NC_("ANALYSIS_Bessely", "The order of the Bessel function")
};
-const char* ANALYSIS_Bin2Oct[] =
+const TranslateId ANALYSIS_Bin2Oct[] =
{
NC_("ANALYSIS_Bin2Oct", "Converts a binary number to an octal number"),
NC_("ANALYSIS_Bin2Oct", "Number"),
@@ -208,14 +210,14 @@ const char* ANALYSIS_Bin2Oct[] =
NC_("ANALYSIS_Bin2Oct", "Number of places used")
};
-const char* ANALYSIS_Bin2Dec[] =
+const TranslateId ANALYSIS_Bin2Dec[] =
{
NC_("ANALYSIS_Bin2Dec", "Converts a binary number to a decimal number"),
NC_("ANALYSIS_Bin2Dec", "Number"),
NC_("ANALYSIS_Bin2Dec", "The binary number to be converted (as text)")
};
-const char* ANALYSIS_Bin2Hex[] =
+const TranslateId ANALYSIS_Bin2Hex[] =
{
NC_("ANALYSIS_Bin2Hex", "Converts a binary number to a hexadecimal number"),
NC_("ANALYSIS_Bin2Hex", "Number"),
@@ -224,7 +226,7 @@ const char* ANALYSIS_Bin2Hex[] =
NC_("ANALYSIS_Bin2Hex", "Number of places used.")
};
-const char* ANALYSIS_Oct2Bin[] =
+const TranslateId ANALYSIS_Oct2Bin[] =
{
NC_("ANALYSIS_Oct2Bin", "Converts an octal number to a binary number"),
NC_("ANALYSIS_Oct2Bin", "Number"),
@@ -233,14 +235,14 @@ const char* ANALYSIS_Oct2Bin[] =
NC_("ANALYSIS_Oct2Bin", "Number of places used")
};
-const char* ANALYSIS_Oct2Dec[] =
+const TranslateId ANALYSIS_Oct2Dec[] =
{
NC_("ANALYSIS_Oct2Dec", "Converts an octal number to a decimal number"),
NC_("ANALYSIS_Oct2Dec", "Number"),
NC_("ANALYSIS_Oct2Dec", "The octal number to be converted (as text)")
};
-const char* ANALYSIS_Oct2Hex[] =
+const TranslateId ANALYSIS_Oct2Hex[] =
{
NC_("ANALYSIS_Oct2Hex", "Converts an octal number to a hexadecimal number"),
NC_("ANALYSIS_Oct2Hex", "Number"),
@@ -249,7 +251,7 @@ const char* ANALYSIS_Oct2Hex[] =
NC_("ANALYSIS_Oct2Hex", "Number of places used")
};
-const char* ANALYSIS_Dec2Bin[] =
+const TranslateId ANALYSIS_Dec2Bin[] =
{
NC_("ANALYSIS_Dec2Bin", "Converts a decimal number to a binary number"),
NC_("ANALYSIS_Dec2Bin", "Number"),
@@ -258,7 +260,7 @@ const char* ANALYSIS_Dec2Bin[] =
NC_("ANALYSIS_Dec2Bin", "Number of places used")
};
-const char* ANALYSIS_Dec2Hex[] =
+const TranslateId ANALYSIS_Dec2Hex[] =
{
NC_("ANALYSIS_Dec2Hex", "Converts a decimal number to a hexadecimal number"),
NC_("ANALYSIS_Dec2Hex", "Number"),
@@ -267,7 +269,7 @@ const char* ANALYSIS_Dec2Hex[] =
NC_("ANALYSIS_Dec2Hex", "Number of places used")
};
-const char* ANALYSIS_Dec2Oct[] =
+const TranslateId ANALYSIS_Dec2Oct[] =
{
NC_("ANALYSIS_Dec2Oct", "Converts a decimal number into an octal number"),
NC_("ANALYSIS_Dec2Oct", "Number"),
@@ -276,7 +278,7 @@ const char* ANALYSIS_Dec2Oct[] =
NC_("ANALYSIS_Dec2Oct", "Number of places used")
};
-const char* ANALYSIS_Hex2Bin[] =
+const TranslateId ANALYSIS_Hex2Bin[] =
{
NC_("ANALYSIS_Hex2Bin", "Converts a hexadecimal number to a binary number"),
NC_("ANALYSIS_Hex2Bin", "Number"),
@@ -285,14 +287,14 @@ const char* ANALYSIS_Hex2Bin[] =
NC_("ANALYSIS_Hex2Bin", "Number of places used")
};
-const char* ANALYSIS_Hex2Dec[] =
+const TranslateId ANALYSIS_Hex2Dec[] =
{
NC_("ANALYSIS_Hex2Dec", "Converts a hexadecimal number to a decimal number"),
NC_("ANALYSIS_Hex2Dec", "Number"),
NC_("ANALYSIS_Hex2Dec", "The hexadecimal number to be converted (as text)")
};
-const char* ANALYSIS_Hex2Oct[] =
+const TranslateId ANALYSIS_Hex2Oct[] =
{
NC_("ANALYSIS_Hex2Oct", "Converts a hexadecimal number to an octal number"),
NC_("ANALYSIS_Hex2Oct", "Number"),
@@ -301,7 +303,7 @@ const char* ANALYSIS_Hex2Oct[] =
NC_("ANALYSIS_Hex2Oct", "Number of places used")
};
-const char* ANALYSIS_Delta[] =
+const TranslateId ANALYSIS_Delta[] =
{
NC_("ANALYSIS_Delta", "Tests whether two values are equal"),
NC_("ANALYSIS_Delta", "Number 1"),
@@ -310,7 +312,7 @@ const char* ANALYSIS_Delta[] =
NC_("ANALYSIS_Delta", "The second number")
};
-const char* ANALYSIS_Erf[] =
+const TranslateId ANALYSIS_Erf[] =
{
NC_("ANALYSIS_Erf", "Returns the error function"),
NC_("ANALYSIS_Erf", "Lower limit"),
@@ -319,14 +321,14 @@ const char* ANALYSIS_Erf[] =
NC_("ANALYSIS_Erf", "The upper limit for integration")
};
-const char* ANALYSIS_Erfc[] =
+const TranslateId ANALYSIS_Erfc[] =
{
NC_("ANALYSIS_Erfc", "Returns the complementary error function"),
NC_("ANALYSIS_Erfc", "Lower limit"),
NC_("ANALYSIS_Erfc", "The lower limit for integration")
};
-const char* ANALYSIS_Gestep[] =
+const TranslateId ANALYSIS_Gestep[] =
{
NC_("ANALYSIS_Gestep", "Tests whether a number is greater than a threshold value"),
NC_("ANALYSIS_Gestep", "Number"),
@@ -335,28 +337,28 @@ const char* ANALYSIS_Gestep[] =
NC_("ANALYSIS_Gestep", "The threshold value")
};
-const char* ANALYSIS_Factdouble[] =
+const TranslateId ANALYSIS_Factdouble[] =
{
NC_("ANALYSIS_Factdouble", "Returns the double factorial of Number"),
NC_("ANALYSIS_Factdouble", "Number"),
NC_("ANALYSIS_Factdouble", "The number")
};
-const char* ANALYSIS_Imabs[] =
+const TranslateId ANALYSIS_Imabs[] =
{
NC_("ANALYSIS_Imabs", "Returns the absolute value (modulus) of a complex number"),
NC_("ANALYSIS_Imabs", "Complex number"),
NC_("ANALYSIS_Imabs", "The complex number")
};
-const char* ANALYSIS_Imaginary[] =
+const TranslateId ANALYSIS_Imaginary[] =
{
NC_("ANALYSIS_Imaginary", "Returns the imaginary coefficient of a complex number"),
NC_("ANALYSIS_Imaginary", "Complex number"),
NC_("ANALYSIS_Imaginary", "The complex number")
};
-const char* ANALYSIS_Impower[] =
+const TranslateId ANALYSIS_Impower[] =
{
NC_("ANALYSIS_Impower", "Returns a complex number raised to a real power"),
NC_("ANALYSIS_Impower", "Complex number"),
@@ -365,21 +367,21 @@ const char* ANALYSIS_Impower[] =
NC_("ANALYSIS_Impower", "Power to which the complex number is raised")
};
-const char* ANALYSIS_Imargument[] =
+const TranslateId ANALYSIS_Imargument[] =
{
NC_("ANALYSIS_Imargument", "Returns the argument theta, an angle expressed in radians"),
NC_("ANALYSIS_Imargument", "Complex number"),
NC_("ANALYSIS_Imargument", "A complex number")
};
-const char* ANALYSIS_Imcos[] =
+const TranslateId ANALYSIS_Imcos[] =
{
NC_("ANALYSIS_Imcos", "Returns the cosine of a complex number"),
NC_("ANALYSIS_Imcos", "Complex number"),
NC_("ANALYSIS_Imcos", "A complex number")
};
-const char* ANALYSIS_Imdiv[] =
+const TranslateId ANALYSIS_Imdiv[] =
{
NC_("ANALYSIS_Imdiv", "Returns the quotient of two complex numbers"),
NC_("ANALYSIS_Imdiv", "Numerator"),
@@ -388,42 +390,42 @@ const char* ANALYSIS_Imdiv[] =
NC_("ANALYSIS_Imdiv", "The divisor")
};
-const char* ANALYSIS_Imexp[] =
+const TranslateId ANALYSIS_Imexp[] =
{
NC_("ANALYSIS_Imexp", "Returns the algebraic form of the exponential of a complex number"),
NC_("ANALYSIS_Imexp", "Complex number"),
NC_("ANALYSIS_Imexp", "The complex number")
};
-const char* ANALYSIS_Imconjugate[] =
+const TranslateId ANALYSIS_Imconjugate[] =
{
NC_("ANALYSIS_Imconjugate", "Returns the complex conjugate of a complex number"),
NC_("ANALYSIS_Imconjugate", "Complex number"),
NC_("ANALYSIS_Imconjugate", "The complex number")
};
-const char* ANALYSIS_Imln[] =
+const TranslateId ANALYSIS_Imln[] =
{
NC_("ANALYSIS_Imln", "Returns the natural logarithm of a complex number"),
NC_("ANALYSIS_Imln", "Complex number"),
NC_("ANALYSIS_Imln", "The complex number")
};
-const char* ANALYSIS_Imlog10[] =
+const TranslateId ANALYSIS_Imlog10[] =
{
NC_("ANALYSIS_Imlog10", "Returns the base-10 logarithm of a complex number"),
NC_("ANALYSIS_Imlog10", "Complex number"),
NC_("ANALYSIS_Imlog10", "The complex number")
};
-const char* ANALYSIS_Imlog2[] =
+const TranslateId ANALYSIS_Imlog2[] =
{
NC_("ANALYSIS_Imlog2", "Returns the base-2 logarithm of a complex number"),
NC_("ANALYSIS_Imlog2", "Complex number"),
NC_("ANALYSIS_Imlog2", "The complex number")
};
-const char* ANALYSIS_Improduct[] =
+const TranslateId ANALYSIS_Improduct[] =
{
NC_("ANALYSIS_Improduct", "Returns the product of several complex numbers"),
NC_("ANALYSIS_Improduct", "Complex number"),
@@ -432,21 +434,21 @@ const char* ANALYSIS_Improduct[] =
NC_("ANALYSIS_Improduct", "Another complex number")
};
-const char* ANALYSIS_Imreal[] =
+const TranslateId ANALYSIS_Imreal[] =
{
NC_("ANALYSIS_Imreal", "Returns the real coefficient of a complex number"),
NC_("ANALYSIS_Imreal", "Complex number"),
NC_("ANALYSIS_Imreal", "The complex number")
};
-const char* ANALYSIS_Imsin[] =
+const TranslateId ANALYSIS_Imsin[] =
{
NC_("ANALYSIS_Imsin", "Returns the sine of a complex number"),
NC_("ANALYSIS_Imsin", "Complex number"),
NC_("ANALYSIS_Imsin", "The complex number")
};
-const char* ANALYSIS_Imsub[] =
+const TranslateId ANALYSIS_Imsub[] =
{
NC_("ANALYSIS_Imsub", "Returns the difference of two complex numbers"),
NC_("ANALYSIS_Imsub", "Complex number 1"),
@@ -455,77 +457,77 @@ const char* ANALYSIS_Imsub[] =
NC_("ANALYSIS_Imsub", "Complex number 2")
};
-const char* ANALYSIS_Imsqrt[] =
+const TranslateId ANALYSIS_Imsqrt[] =
{
NC_("ANALYSIS_Imsqrt", "Returns the square root of a complex number"),
NC_("ANALYSIS_Imsqrt", "Complex number"),
NC_("ANALYSIS_Imsqrt", "The complex number")
};
-const char* ANALYSIS_Imsum[] =
+const TranslateId ANALYSIS_Imsum[] =
{
NC_("ANALYSIS_Imsum", "Returns the sum of complex numbers"),
NC_("ANALYSIS_Imsum", "Complex number"),
NC_("ANALYSIS_Imsum", "The complex number")
};
-const char* ANALYSIS_Imtan[] =
+const TranslateId ANALYSIS_Imtan[] =
{
NC_("ANALYSIS_Imtan", "Returns the tangent of a complex number"),
NC_("ANALYSIS_Imtan", "Complex number"),
NC_("ANALYSIS_Imtan", "A complex number")
};
-const char* ANALYSIS_Imsec[] =
+const TranslateId ANALYSIS_Imsec[] =
{
NC_("ANALYSIS_Imsec", "Returns the secant of a complex number"),
NC_("ANALYSIS_Imsec", "Complex number"),
NC_("ANALYSIS_Imsec", "A complex number")
};
-const char* ANALYSIS_Imcsc[] =
+const TranslateId ANALYSIS_Imcsc[] =
{
NC_("ANALYSIS_Imcsc", "Returns the cosecant of a complex number"),
NC_("ANALYSIS_Imcsc", "Complex number"),
NC_("ANALYSIS_Imcsc", "A complex number")
};
-const char* ANALYSIS_Imcot[] =
+const TranslateId ANALYSIS_Imcot[] =
{
NC_("ANALYSIS_Imcot", "Returns the cotangent of a complex number"),
NC_("ANALYSIS_Imcot", "Complex number"),
NC_("ANALYSIS_Imcot", "A complex number")
};
-const char* ANALYSIS_Imsinh[] =
+const TranslateId ANALYSIS_Imsinh[] =
{
NC_("ANALYSIS_Imsinh", "Returns the hyperbolic sine of a complex number"),
NC_("ANALYSIS_Imsinh", "Complex number"),
NC_("ANALYSIS_Imsinh", "A complex number")
};
-const char* ANALYSIS_Imcosh[] =
+const TranslateId ANALYSIS_Imcosh[] =
{
NC_("ANALYSIS_Imcosh", "Returns the hyperbolic cosine of a complex number"),
NC_("ANALYSIS_Imcosh", "Complex number"),
NC_("ANALYSIS_Imcosh", "A complex number")
};
-const char* ANALYSIS_Imsech[] =
+const TranslateId ANALYSIS_Imsech[] =
{
NC_("ANALYSIS_Imsech", "Returns the hyperbolic secant of a complex number"),
NC_("ANALYSIS_Imsech", "Complex number"),
NC_("ANALYSIS_Imsech", "A complex number")
};
-const char* ANALYSIS_Imcsch[] =
+const TranslateId ANALYSIS_Imcsch[] =
{
NC_("ANALYSIS_Imcsch", "Returns the hyperbolic cosecant of a complex number"),
NC_("ANALYSIS_Imcsch", "Complex number"),
NC_("ANALYSIS_Imcsch", "A complex number")
};
-const char* ANALYSIS_Complex[] =
+const TranslateId ANALYSIS_Complex[] =
{
NC_("ANALYSIS_Complex", "Converts real and imaginary coefficients into a complex number"),
NC_("ANALYSIS_Complex", "Real num"),
@@ -536,7 +538,7 @@ const char* ANALYSIS_Complex[] =
NC_("ANALYSIS_Complex", "The suffix")
};
-const char* ANALYSIS_Convert[] =
+const TranslateId ANALYSIS_Convert[] =
{
NC_("ANALYSIS_Convert", "Converts a number from one measurement system to another"),
NC_("ANALYSIS_Convert", "Number"),
@@ -547,7 +549,7 @@ const char* ANALYSIS_Convert[] =
NC_("ANALYSIS_Convert", "Unit of measure for the result")
};
-const char* ANALYSIS_Amordegrc[] =
+const TranslateId ANALYSIS_Amordegrc[] =
{
NC_("ANALYSIS_Amordegrc", "Returns the prorated linear depreciation of an asset for each accounting period"),
NC_("ANALYSIS_Amordegrc", "Cost"),
@@ -566,7 +568,7 @@ const char* ANALYSIS_Amordegrc[] =
NC_("ANALYSIS_Amordegrc", "The year basis to be used")
};
-const char* ANALYSIS_Amorlinc[] =
+const TranslateId ANALYSIS_Amorlinc[] =
{
NC_("ANALYSIS_Amorlinc", "Returns the prorated linear depreciation of an asset for each accounting period"),
NC_("ANALYSIS_Amorlinc", "Cost"),
@@ -585,7 +587,7 @@ const char* ANALYSIS_Amorlinc[] =
NC_("ANALYSIS_Amorlinc", "The year basis to be used")
};
-const char* ANALYSIS_Accrint[] =
+const TranslateId ANALYSIS_Accrint[] =
{
NC_("ANALYSIS_Accrint", "Returns the accrued interest for a security that pays periodic interest"),
NC_("ANALYSIS_Accrint", "Issue"),
@@ -604,7 +606,7 @@ const char* ANALYSIS_Accrint[] =
NC_("ANALYSIS_Accrint", "The basis")
};
-const char* ANALYSIS_Accrintm[] =
+const TranslateId ANALYSIS_Accrintm[] =
{
NC_("ANALYSIS_Accrintm", "Returns the accrued interest for a security that pays interest at maturity"),
NC_("ANALYSIS_Accrintm", "Issue"),
@@ -619,7 +621,7 @@ const char* ANALYSIS_Accrintm[] =
NC_("ANALYSIS_Accrintm", "The basis")
};
-const char* ANALYSIS_Received[] =
+const TranslateId ANALYSIS_Received[] =
{
NC_("ANALYSIS_Received", "Returns the amount paid out at maturity for a fully invested security"),
NC_("ANALYSIS_Received", "Settlement"),
@@ -634,7 +636,7 @@ const char* ANALYSIS_Received[] =
NC_("ANALYSIS_Received", "The basis")
};
-const char* ANALYSIS_Disc[] =
+const TranslateId ANALYSIS_Disc[] =
{
NC_("ANALYSIS_Disc", "Returns the discount rate for a security"),
NC_("ANALYSIS_Disc", "Settlement"),
@@ -649,7 +651,7 @@ const char* ANALYSIS_Disc[] =
NC_("ANALYSIS_Disc", "The basis")
};
-const char* ANALYSIS_Duration[] =
+const TranslateId ANALYSIS_Duration[] =
{
NC_("ANALYSIS_Duration", "Returns the annual Macaulay duration of a security with periodic interest payments"),
NC_("ANALYSIS_Duration", "Settlement"),
@@ -666,7 +668,7 @@ const char* ANALYSIS_Duration[] =
NC_("ANALYSIS_Duration", "The basis")
};
-const char* ANALYSIS_Effect[] =
+const TranslateId ANALYSIS_Effect[] =
{
NC_("ANALYSIS_Effect", "Returns the effective annual interest rate"),
NC_("ANALYSIS_Effect", "Nominal rate"),
@@ -675,7 +677,7 @@ const char* ANALYSIS_Effect[] =
NC_("ANALYSIS_Effect", "The periods")
};
-const char* ANALYSIS_Cumprinc[] =
+const TranslateId ANALYSIS_Cumprinc[] =
{
NC_("ANALYSIS_Cumprinc", "Returns the cumulative principal on a loan to be paid between two periods"),
NC_("ANALYSIS_Cumprinc", "Rate"),
@@ -692,7 +694,7 @@ const char* ANALYSIS_Cumprinc[] =
NC_("ANALYSIS_Cumprinc", "The type of maturity")
};
-const char* ANALYSIS_Cumipmt[] =
+const TranslateId ANALYSIS_Cumipmt[] =
{
NC_("ANALYSIS_Cumipmt", "Returns the cumulative interest to be paid between two periods"),
NC_("ANALYSIS_Cumipmt", "Rate"),
@@ -709,7 +711,7 @@ const char* ANALYSIS_Cumipmt[] =
NC_("ANALYSIS_Cumipmt", "The type of maturity")
};
-const char* ANALYSIS_Price[] =
+const TranslateId ANALYSIS_Price[] =
{
NC_("ANALYSIS_Price", "Returns the price per 100 currency units face value of a security that pays periodic interest"),
NC_("ANALYSIS_Price", "Settlement"),
@@ -728,7 +730,7 @@ const char* ANALYSIS_Price[] =
NC_("ANALYSIS_Price", "The basis")
};
-const char* ANALYSIS_Pricedisc[] =
+const TranslateId ANALYSIS_Pricedisc[] =
{
NC_("ANALYSIS_Pricedisc", "Returns the price per 100 currency units face value of a discounted security"),
NC_("ANALYSIS_Pricedisc", "Settlement"),
@@ -743,7 +745,7 @@ const char* ANALYSIS_Pricedisc[] =
NC_("ANALYSIS_Pricedisc", "The basis")
};
-const char* ANALYSIS_Pricemat[] =
+const TranslateId ANALYSIS_Pricemat[] =
{
NC_("ANALYSIS_Pricemat", "Returns the price per 100 currency units face value of a security that pays interest at maturity"),
NC_("ANALYSIS_Pricemat", "Settlement"),
@@ -760,7 +762,7 @@ const char* ANALYSIS_Pricemat[] =
NC_("ANALYSIS_Pricemat", "The basis")
};
-const char* ANALYSIS_Mduration[] =
+const TranslateId ANALYSIS_Mduration[] =
{
NC_("ANALYSIS_Mduration", "Returns the Macaulay modified duration for a security with an assumed par value of 100 currency units"),
NC_("ANALYSIS_Mduration", "Settlement"),
@@ -777,7 +779,7 @@ const char* ANALYSIS_Mduration[] =
NC_("ANALYSIS_Mduration", "The basis")
};
-const char* ANALYSIS_Nominal[] =
+const TranslateId ANALYSIS_Nominal[] =
{
NC_("ANALYSIS_Nominal", "Returns the annual nominal interest rate"),
NC_("ANALYSIS_Nominal", "Effective rate"),
@@ -786,7 +788,7 @@ const char* ANALYSIS_Nominal[] =
NC_("ANALYSIS_Nominal", "The periods")
};
-const char* ANALYSIS_Dollarfr[] =
+const TranslateId ANALYSIS_Dollarfr[] =
{
NC_("ANALYSIS_Dollarfr", "Converts a price expressed as a decimal into a price expressed as a fraction"),
NC_("ANALYSIS_Dollarfr", "Decimal dollar"),
@@ -795,7 +797,7 @@ const char* ANALYSIS_Dollarfr[] =
NC_("ANALYSIS_Dollarfr", "The divisor")
};
-const char* ANALYSIS_Dollarde[] =
+const TranslateId ANALYSIS_Dollarde[] =
{
NC_("ANALYSIS_Dollarde", "Converts a price expressed as a fraction into a price expressed as a decimal"),
NC_("ANALYSIS_Dollarde", "Fractional dollar"),
@@ -804,7 +806,7 @@ const char* ANALYSIS_Dollarde[] =
NC_("ANALYSIS_Dollarde", "The divisor")
};
-const char* ANALYSIS_Yield[] =
+const TranslateId ANALYSIS_Yield[] =
{
NC_("ANALYSIS_Yield", "Returns the yield on a security that pays periodic interest"),
NC_("ANALYSIS_Yield", "Settlement"),
@@ -823,7 +825,7 @@ const char* ANALYSIS_Yield[] =
NC_("ANALYSIS_Yield", "The basis")
};
-const char* ANALYSIS_Yielddisc[] =
+const TranslateId ANALYSIS_Yielddisc[] =
{
NC_("ANALYSIS_Yielddisc", "Returns the annual yield for a discounted security"),
NC_("ANALYSIS_Yielddisc", "Settlement"),
@@ -838,7 +840,7 @@ const char* ANALYSIS_Yielddisc[] =
NC_("ANALYSIS_Yielddisc", "The basis")
};
-const char* ANALYSIS_Yieldmat[] =
+const TranslateId ANALYSIS_Yieldmat[] =
{
NC_("ANALYSIS_Yieldmat", "Returns the annual yield of a security that pays interest at maturity"),
NC_("ANALYSIS_Yieldmat", "Settlement"),
@@ -855,7 +857,7 @@ const char* ANALYSIS_Yieldmat[] =
NC_("ANALYSIS_Yieldmat", "The basis")
};
-const char* ANALYSIS_Tbilleq[] =
+const TranslateId ANALYSIS_Tbilleq[] =
{
NC_("ANALYSIS_Tbilleq", "Returns the bond-equivalent yield for a treasury bill"),
NC_("ANALYSIS_Tbilleq", "Settlement"),
@@ -866,7 +868,7 @@ const char* ANALYSIS_Tbilleq[] =
NC_("ANALYSIS_Tbilleq", "The discount rate")
};
-const char* ANALYSIS_Tbillprice[] =
+const TranslateId ANALYSIS_Tbillprice[] =
{
NC_("ANALYSIS_Tbillprice", "Returns the price of 100 currency units face value for a treasury bill"),
NC_("ANALYSIS_Tbillprice", "Settlement"),
@@ -877,7 +879,7 @@ const char* ANALYSIS_Tbillprice[] =
NC_("ANALYSIS_Tbillprice", "The discount rate")
};
-const char* ANALYSIS_Tbillyield[] =
+const TranslateId ANALYSIS_Tbillyield[] =
{
NC_("ANALYSIS_Tbillyield", "Returns the yield for a treasury bill"),
NC_("ANALYSIS_Tbillyield", "Settlement"),
@@ -888,7 +890,7 @@ const char* ANALYSIS_Tbillyield[] =
NC_("ANALYSIS_Tbillyield", "The price")
};
-const char* ANALYSIS_Oddfprice[] =
+const TranslateId ANALYSIS_Oddfprice[] =
{
NC_("ANALYSIS_Oddfprice", "Returns the price per $100 face value of a security with an odd first period"),
NC_("ANALYSIS_Oddfprice", "Settlement"),
@@ -911,7 +913,7 @@ const char* ANALYSIS_Oddfprice[] =
NC_("ANALYSIS_Oddfprice", "The basis")
};
-const char* ANALYSIS_Oddfyield[] =
+const TranslateId ANALYSIS_Oddfyield[] =
{
NC_("ANALYSIS_Oddfyield", "Returns the yield of a security with an odd first period"),
NC_("ANALYSIS_Oddfyield", "Settlement"),
@@ -934,7 +936,7 @@ const char* ANALYSIS_Oddfyield[] =
NC_("ANALYSIS_Oddfyield", "The basis")
};
-const char* ANALYSIS_Oddlprice[] =
+const TranslateId ANALYSIS_Oddlprice[] =
{
NC_("ANALYSIS_Oddlprice", "Returns the price per $100 face value of a security with an odd last period"),
NC_("ANALYSIS_Oddlprice", "Settlement"),
@@ -955,7 +957,7 @@ const char* ANALYSIS_Oddlprice[] =
NC_("ANALYSIS_Oddlprice", "The basis")
};
-const char* ANALYSIS_Oddlyield[] =
+const TranslateId ANALYSIS_Oddlyield[] =
{
NC_("ANALYSIS_Oddlyield", "Returns the yield of a security with an odd last period"),
NC_("ANALYSIS_Oddlyield", "Settlement"),
@@ -976,7 +978,7 @@ const char* ANALYSIS_Oddlyield[] =
NC_("ANALYSIS_Oddlyield", "The basis")
};
-const char* ANALYSIS_Xirr[] =
+const TranslateId ANALYSIS_Xirr[] =
{
NC_("ANALYSIS_Xirr", "Returns the internal rate of return for a non-periodic schedule of payments"),
NC_("ANALYSIS_Xirr", "Values"),
@@ -987,7 +989,7 @@ const char* ANALYSIS_Xirr[] =
NC_("ANALYSIS_Xirr", "The guess")
};
-const char* ANALYSIS_Xnpv[] =
+const TranslateId ANALYSIS_Xnpv[] =
{
NC_("ANALYSIS_Xnpv", "Returns the net present value for a non-periodic schedule of payments"),
NC_("ANALYSIS_Xnpv", "Rate"),
@@ -998,7 +1000,7 @@ const char* ANALYSIS_Xnpv[] =
NC_("ANALYSIS_Xnpv", "The dates")
};
-const char* ANALYSIS_Intrate[] =
+const TranslateId ANALYSIS_Intrate[] =
{
NC_("ANALYSIS_Intrate", "Returns the interest rate for a fully invested security"),
NC_("ANALYSIS_Intrate", "Settlement"),
@@ -1013,7 +1015,7 @@ const char* ANALYSIS_Intrate[] =
NC_("ANALYSIS_Intrate", "The basis")
};
-const char* ANALYSIS_Coupncd[] =
+const TranslateId ANALYSIS_Coupncd[] =
{
NC_("ANALYSIS_Coupncd", "Returns the first coupon date after the settlement date"),
NC_("ANALYSIS_Coupncd", "Settlement"),
@@ -1026,7 +1028,7 @@ const char* ANALYSIS_Coupncd[] =
NC_("ANALYSIS_Coupncd", "The basis")
};
-const char* ANALYSIS_Coupdays[] =
+const TranslateId ANALYSIS_Coupdays[] =
{
NC_("ANALYSIS_Coupdays", "Returns the number of days in the coupon period containing the settlement date"),
NC_("ANALYSIS_Coupdays", "Settlement"),
@@ -1039,7 +1041,7 @@ const char* ANALYSIS_Coupdays[] =
NC_("ANALYSIS_Coupdays", "The basis")
};
-const char* ANALYSIS_Coupdaysnc[] =
+const TranslateId ANALYSIS_Coupdaysnc[] =
{
NC_("ANALYSIS_Coupdaysnc", "Returns the number of days from the settlement date to the next coupon date"),
NC_("ANALYSIS_Coupdaysnc", "Settlement"),
@@ -1052,7 +1054,7 @@ const char* ANALYSIS_Coupdaysnc[] =
NC_("ANALYSIS_Coupdaysnc", "The basis")
};
-const char* ANALYSIS_Coupdaybs[] =
+const TranslateId ANALYSIS_Coupdaybs[] =
{
NC_("ANALYSIS_Coupdaybs", "Returns the number of days from the beginning of the coupon period to the settlement date"),
NC_("ANALYSIS_Coupdaybs", "Settlement"),
@@ -1065,7 +1067,7 @@ const char* ANALYSIS_Coupdaybs[] =
NC_("ANALYSIS_Coupdaybs", "The basis")
};
-const char* ANALYSIS_Couppcd[] =
+const TranslateId ANALYSIS_Couppcd[] =
{
NC_("ANALYSIS_Couppcd", "Returns the last coupon date preceding the settlement date"),
NC_("ANALYSIS_Couppcd", "Settlement"),
@@ -1078,7 +1080,7 @@ const char* ANALYSIS_Couppcd[] =
NC_("ANALYSIS_Couppcd", "The basis")
};
-const char* ANALYSIS_Coupnum[] =
+const TranslateId ANALYSIS_Coupnum[] =
{
NC_("ANALYSIS_Coupnum", "Returns the number of coupons payable between the settlement and maturity dates"),
NC_("ANALYSIS_Coupnum", "Settlement"),
@@ -1091,7 +1093,7 @@ const char* ANALYSIS_Coupnum[] =
NC_("ANALYSIS_Coupnum", "The basis")
};
-const char* ANALYSIS_Fvschedule[] =
+const TranslateId ANALYSIS_Fvschedule[] =
{
NC_("ANALYSIS_Fvschedule", "Returns the future value of the initial principal after a series of compound interest rates are applied"),
NC_("ANALYSIS_Fvschedule", "Principal"),
diff --git a/scaddins/inc/datefunc.hrc b/scaddins/inc/datefunc.hrc
index 8bcb9e0ccfb7..f4a370ae1e44 100644
--- a/scaddins/inc/datefunc.hrc
+++ b/scaddins/inc/datefunc.hrc
@@ -19,9 +19,11 @@
#pragma once
-#define NC_(Context, String) reinterpret_cast<char const *>(Context "\004" u8##String)
+#include <unotools/resmgr.hxx>
-const char* DATE_FUNCDESC_DiffWeeks[] =
+#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
+
+const TranslateId DATE_FUNCDESC_DiffWeeks[] =
{
NC_("DATE_FUNCDESC_DiffWeeks", "Calculates the number of weeks in a specific period"),
NC_("DATE_FUNCDESC_DiffWeeks", "Start date"),
@@ -32,7 +34,7 @@ const char* DATE_FUNCDESC_DiffWeeks[] =
NC_("DATE_FUNCDESC_DiffWeeks", "Type of calculation: Type=0 means the time interval, Type=1 means calendar weeks.")
};
-const char* DATE_FUNCDESC_DiffMonths[] =
+const TranslateId DATE_FUNCDESC_DiffMonths[] =
{
NC_("DATE_FUNCDESC_DiffMonths", "Determines the number of months in a specific period."),
NC_("DATE_FUNCDESC_DiffMonths", "Start date"),
@@ -43,7 +45,7 @@ const char* DATE_FUNCDESC_DiffMonths[] =
NC_("DATE_FUNCDESC_DiffMonths", "Type of calculation: Type=0 means the time interval, Type=1 means calendar months.")
};
-const char* DATE_FUNCDESC_DiffYears[] =
+const TranslateId DATE_FUNCDESC_DiffYears[] =
{
NC_("DATE_FUNCDESC_DiffYears", "Calculates the number of years in a specific period."),
NC_("DATE_FUNCDESC_DiffYears", "Start date"),
@@ -54,35 +56,35 @@ const char* DATE_FUNCDESC_DiffYears[] =
NC_("DATE_FUNCDESC_DiffYears", "Type of calculation: Type=0 means the time interval, Type=1 means calendar years.")
};
-const char* DATE_FUNCDESC_IsLeapYear[] =
+const TranslateId DATE_FUNCDESC_IsLeapYear[] =
{
NC_("DATE_FUNCDESC_IsLeapYear", "Returns 1 (TRUE) if the date is a day of a leap year, otherwise 0 (FALSE)."),
NC_("DATE_FUNCDESC_IsLeapYear", "Date"),
NC_("DATE_FUNCDESC_IsLeapYear", "Any day in the desired year")
};
-const char* DATE_FUNCDESC_DaysInMonth[] =
+const TranslateId DATE_FUNCDESC_DaysInMonth[] =
{
NC_("DATE_FUNCDESC_DaysInMonth", "Returns the number of days of the month in which the date entered occurs"),
NC_("DATE_FUNCDESC_DaysInMonth", "Date"),
NC_("DATE_FUNCDESC_DaysInMonth", "Any day in the desired month")
};
-const char* DATE_FUNCDESC_DaysInYear[] =
+const TranslateId DATE_FUNCDESC_DaysInYear[] =
{
NC_("DATE_FUNCDESC_DaysInYear", "Returns the number of days of the year in which the date entered occurs."),
NC_("DATE_FUNCDESC_DaysInYear", "Date"),
NC_("DATE_FUNCDESC_DaysInYear", "Any day in the desired year")
};
-const char* DATE_FUNCDESC_WeeksInYear[] =
+const TranslateId DATE_FUNCDESC_WeeksInYear[] =
{
NC_("DATE_FUNCDESC_WeeksInYear", "Returns the number of weeks of the year in which the date entered occurs"),
NC_("DATE_FUNCDESC_WeeksInYear", "Date"),
NC_("DATE_FUNCDESC_WeeksInYear", "Any day in the desired year")
};
-const char* DATE_FUNCDESC_Rot13[] =
+const TranslateId DATE_FUNCDESC_Rot13[] =
{
NC_("DATE_FUNCDESC_Rot13", "Encrypts or decrypts a text using the ROT13 algorithm"),
NC_("DATE_FUNCDESC_Rot13", "Text"),
diff --git a/scaddins/inc/pricing.hrc b/scaddins/inc/pricing.hrc
index 51e2b7898189..bb99748e6933 100644
--- a/scaddins/inc/pricing.hrc
+++ b/scaddins/inc/pricing.hrc
@@ -19,10 +19,12 @@
#pragma once
-#define NC_(Context, String) reinterpret_cast<char const *>(Context "\004" u8##String)
+#include <unotools/resmgr.hxx>
+
+#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
// function and parameter description
-const char* PRICING_FUNCDESC_OptBarrier[] =
+const TranslateId PRICING_FUNCDESC_OptBarrier[] =
{
NC_("PRICING_FUNCDESC_OptBarrier", "Pricing of a barrier option"),
NC_("PRICING_FUNCDESC_OptBarrier", "Spot"),
@@ -53,7 +55,7 @@ const char* PRICING_FUNCDESC_OptBarrier[] =
NC_("PRICING_FUNCDESC_OptBarrier", "Optional parameter, if left out then the function simply returns the option price; if set, the function returns price sensitivities (Greeks) to one of the input parameters; possible values are (d)elta, (g)amma, (t)heta, v(e)ga, v(o)lga, v(a)nna, (r)ho, rho(f)")
};
-const char* PRICING_FUNCDESC_OptTouch[] =
+const TranslateId PRICING_FUNCDESC_OptTouch[] =
{
NC_("PRICING_FUNCDESC_OptTouch", "Pricing of a touch/no-touch option"),
NC_("PRICING_FUNCDESC_OptTouch", "Spot"),
@@ -80,7 +82,7 @@ const char* PRICING_FUNCDESC_OptTouch[] =
NC_("PRICING_FUNCDESC_OptTouch", "Optional parameter, if left out then the function simply returns the option price; if set, the function returns price sensitivities (Greeks) to one of the input parameters; possible values are (d)elta, (g)amma, (t)heta, v(e)ga, v(o)lga, v(a)nna, (r)ho, rho(f)")
};
-const char* PRICING_FUNCDESC_OptProbHit[] =
+const TranslateId PRICING_FUNCDESC_OptProbHit[] =
{
NC_("PRICING_FUNCDESC_OptProbHit", "Probability that an asset hits a barrier assuming it follows dS/S = mu dt + vol dW"),
NC_("PRICING_FUNCDESC_OptProbHit", "Spot"),
@@ -97,7 +99,7 @@ const char* PRICING_FUNCDESC_OptProbHit[] =
NC_("PRICING_FUNCDESC_OptProbHit", "Upper barrier (set to 0 for no upper barrier)")
};
-const char* PRICING_FUNCDESC_OptProbInMoney[] =
+const TranslateId PRICING_FUNCDESC_OptProbInMoney[] =
{
NC_("PRICING_FUNCDESC_OptProbInMoney", "Probability that an asset will at maturity end up between two barrier levels, assuming it follows dS/S = mu dt + vol dW (if the last two optional parameters (Strike, PutCall) are specified, the probability of S_T in [Strike, UpperBarrier] for a Call and S_T in [LowerBarrier, Strike] for a Put will be returned)"),
NC_("PRICING_FUNCDESC_OptProbInMoney", "Spot"),
diff --git a/scaddins/inc/strings.hrc b/scaddins/inc/strings.hrc
index 359cab32af1e..ed7122b61056 100644
--- a/scaddins/inc/strings.hrc
+++ b/scaddins/inc/strings.hrc
@@ -19,7 +19,7 @@
#pragma once
-#define NC_(Context, String) reinterpret_cast<char const *>(Context "\004" u8##String)
+#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
// function names as accessible from cells
#define PRICING_FUNCNAME_OptBarrier NC_("PRICING_FUNCNAME_OptBarrier", "OPT_BARRIER")
diff --git a/scaddins/source/analysis/analysis.cxx b/scaddins/source/analysis/analysis.cxx
index 046580e14f7e..0b96bcc28430 100644
--- a/scaddins/source/analysis/analysis.cxx
+++ b/scaddins/source/analysis/analysis.cxx
@@ -40,7 +40,7 @@ using namespace ::com::sun::star;
using namespace sca::analysis;
using namespace std;
-OUString AnalysisAddIn::GetFuncDescrStr(const char** pResId, sal_uInt16 nStrIndex)
+OUString AnalysisAddIn::GetFuncDescrStr(const TranslateId* pResId, sal_uInt16 nStrIndex)
{
return AnalysisResId(pResId[nStrIndex - 1]);
}
@@ -1045,7 +1045,7 @@ double SAL_CALL AnalysisAddIn::getConvert( double f, const OUString& aFU, const
RETURN_FINITE( fRet );
}
-OUString AnalysisAddIn::AnalysisResId(std::string_view aResId)
+OUString AnalysisAddIn::AnalysisResId(TranslateId aResId)
{
return Translate::get(aResId, aResLocale);
}
diff --git a/scaddins/source/analysis/analysis.hxx b/scaddins/source/analysis/analysis.hxx
index 5a0d31f1b5a2..841979f99b36 100644
--- a/scaddins/source/analysis/analysis.hxx
+++ b/scaddins/source/analysis/analysis.hxx
@@ -28,6 +28,7 @@
#include <cppuhelper/compbase.hxx>
#include <cppuhelper/basemutex.hxx>
+#include <unotools/resmgr.hxx>
#include "analysishelper.hxx"
@@ -56,7 +57,7 @@ private:
sca::analysis::ScaAnyConverter aAnyConv;
/// @throws css::uno::RuntimeException
- OUString GetFuncDescrStr(const char** pResId, sal_uInt16 nStrIndex);
+ OUString GetFuncDescrStr(const TranslateId* pResId, sal_uInt16 nStrIndex);
void InitDefLocales();
inline const css::lang::Locale& GetLocale( sal_uInt32 nInd );
void InitData();
@@ -73,7 +74,7 @@ public:
explicit AnalysisAddIn(
const css::uno::Reference< css::uno::XComponentContext >& xContext );
- OUString AnalysisResId(std::string_view aId);
+ OUString AnalysisResId(TranslateId aId);
virtual ~AnalysisAddIn() override;
diff --git a/scaddins/source/analysis/analysishelper.hxx b/scaddins/source/analysis/analysishelper.hxx
index df80714034a3..7e0610493929 100644
--- a/scaddins/source/analysis/analysishelper.hxx
+++ b/scaddins/source/analysis/analysishelper.hxx
@@ -20,6 +20,7 @@
#include <com/sun/star/uno/Reference.hxx>
+#include <unotools/resmgr.hxx>
#include <math.h>
@@ -188,8 +189,8 @@ enum class FDCategory
struct FuncDataBase
{
const char* pIntName;
- const char* pUINameID; // resource ID to UI name
- const char** pDescrID; // resource ID to description, parameter names and ~ description
+ TranslateId pUINameID; // resource ID to UI name
+ const TranslateId* pDescrID; // resource ID to description, parameter names and ~ description
bool bDouble; // name already exist in Calc
bool bWithOpt; // first parameter is internal
const char** pCompListID; // list of valid names
@@ -203,8 +204,8 @@ class FuncData final
{
private:
OUString aIntName;
- const char* pUINameID;
- const char** pDescrID; // leads also to parameter descriptions!
+ TranslateId pUINameID;
+ const TranslateId* pDescrID; // leads also to parameter descriptions!
bool bDouble; // flag for names that already exist in Calc
bool bWithOpt; // has internal parameter on first position
@@ -216,8 +217,8 @@ private:
public:
FuncData(const FuncDataBase& rBaseData);
- inline const char* GetUINameID() const;
- inline const char** GetDescrID() const;
+ inline const TranslateId& GetUINameID() const;
+ inline const TranslateId* GetDescrID() const;
inline bool IsDouble() const;
inline const OUString& GetSuffix() const;
@@ -593,13 +594,13 @@ inline double GetYearFrac( const css::uno::Reference< css::beans::XPropertySet >
}
-inline const char* FuncData::GetUINameID() const
+inline const TranslateId& FuncData::GetUINameID() const
{
return pUINameID;
}
-inline const char** FuncData::GetDescrID() const
+inline const TranslateId* FuncData::GetDescrID() const
{
return pDescrID;
}
diff --git a/scaddins/source/datefunc/datefunc.cxx b/scaddins/source/datefunc/datefunc.cxx
index 0d1cff9e092e..dc015e5ef0bd 100644
--- a/scaddins/source/datefunc/datefunc.cxx
+++ b/scaddins/source/datefunc/datefunc.cxx
@@ -136,7 +136,7 @@ void ScaDateAddIn::InitData()
}
}
-OUString ScaDateAddIn::GetFuncDescrStr(const char** pResId, sal_uInt16 nStrIndex)
+OUString ScaDateAddIn::GetFuncDescrStr(const TranslateId* pResId, sal_uInt16 nStrIndex)
{
return ScaResId(pResId[nStrIndex - 1]);
}
@@ -717,7 +717,7 @@ OUString SAL_CALL ScaDateAddIn::getRot13( const OUString& aSrcString )
return aBuffer.makeStringAndClear();
}
-OUString ScaDateAddIn::ScaResId(std::string_view aId)
+OUString ScaDateAddIn::ScaResId(TranslateId aId)
{
return Translate::get(aId, aResLocale);
}
diff --git a/scaddins/source/datefunc/datefunc.hxx b/scaddins/source/datefunc/datefunc.hxx
index 74113e814ffe..0dd6b5fa2f1c 100644
--- a/scaddins/source/datefunc/datefunc.hxx
+++ b/scaddins/source/datefunc/datefunc.hxx
@@ -30,6 +30,7 @@
#include <com/sun/star/sheet/addin/XDateFunctions.hpp>
#include <com/sun/star/sheet/addin/XMiscFunctions.hpp>
#include <cppuhelper/implbase.hxx>
+#include <unotools/resmgr.hxx>
namespace com::sun::star::lang { class XMultiServiceFactory; }
@@ -46,8 +47,8 @@ enum class ScaCategory
struct ScaFuncDataBase
{
const char* pIntName; // internal name (get***)
- const char* pUINameID; // resource ID to UI name
- const char** pDescrID; // resource ID to description, parameter names and ~ description
+ TranslateId pUINameID; // resource ID to UI name
+ const TranslateId* pDescrID; // resource ID to description, parameter names and ~ description
const char** pCompListID; // list of valid names
sal_uInt16 nParamCount; // number of named / described parameters
ScaCategory eCat; // function category
@@ -59,8 +60,8 @@ class ScaFuncData final
{
private:
OUString aIntName; // internal name (get***)
- const char* pUINameID; // resource ID to UI name
- const char** pDescrID; // leads also to parameter descriptions!
+ TranslateId pUINameID; // resource ID to UI name
+ const TranslateId* pDescrID; // leads also to parameter descriptions!
sal_uInt16 nParamCount; // num of parameters
std::vector<OUString> aCompList; // list of all valid names
ScaCategory eCat; // function category
@@ -70,8 +71,8 @@ private:
public:
ScaFuncData(const ScaFuncDataBase& rBaseData);
- const char* GetUINameID() const { return pUINameID; }
- const char** GetDescrID() const { return pDescrID; }
+ const TranslateId & GetUINameID() const { return pUINameID; }
+ const TranslateId* GetDescrID() const { return pDescrID; }
ScaCategory GetCategory() const { return eCat; }
bool IsDouble() const { return bDouble; }
@@ -115,12 +116,12 @@ private:
void InitData();
/// @throws css::uno::RuntimeException
- OUString GetFuncDescrStr(const char** pResId, sal_uInt16 nStrIndex);
+ OUString GetFuncDescrStr(const TranslateId* pResId, sal_uInt16 nStrIndex);
public:
ScaDateAddIn();
- OUString ScaResId(std::string_view aId);
+ OUString ScaResId(TranslateId aId);
// XAddIn
virtual OUString SAL_CALL getProgrammaticFuntionName( const OUString& aDisplayName ) override;
diff --git a/scaddins/source/pricing/pricing.cxx b/scaddins/source/pricing/pricing.cxx
index cc7c713fc7f0..83cacff87fc8 100644
--- a/scaddins/source/pricing/pricing.cxx
+++ b/scaddins/source/pricing/pricing.cxx
@@ -134,7 +134,7 @@ void ScaPricingAddIn::InitData()
pDefLocales.reset();
}
-OUString ScaPricingAddIn::GetFuncDescrStr(const char** pResId, sal_uInt16 nStrIndex)
+OUString ScaPricingAddIn::GetFuncDescrStr(const TranslateId* pResId, sal_uInt16 nStrIndex)
{
return ScaResId(pResId[nStrIndex - 1]);
}
@@ -500,7 +500,7 @@ double SAL_CALL ScaPricingAddIn::getOptProbInMoney( double spot, double vol,
RETURN_FINITE( fRet );
}
-OUString ScaPricingAddIn::ScaResId(std::string_view aResId)
+OUString ScaPricingAddIn::ScaResId(TranslateId aResId)
{
return Translate::get(aResId, aResLocale);
}
diff --git a/scaddins/source/pricing/pricing.hxx b/scaddins/source/pricing/pricing.hxx
index 42f23dcc81a6..ee362a3b3df3 100644
--- a/scaddins/source/pricing/pricing.hxx
+++ b/scaddins/source/pricing/pricing.hxx
@@ -35,6 +35,7 @@
#include <com/sun/star/sheet/XCompatibilityNames.hpp>
#include <com/sun/star/sheet/addin/XPricingFunctions.hpp>
#include <cppuhelper/implbase.hxx>
+#include <unotools/resmgr.hxx>
namespace com::sun::star::lang { class XMultiServiceFactory; }
@@ -56,8 +57,8 @@ enum class ScaCategory
struct ScaFuncDataBase
{
const char* pIntName; // internal name (get***)
- const char* pUINameID; // resource ID to UI name
- const char** pDescrID; // resource ID to description, parameter names and ~ description
+ TranslateId pUINameID; // resource ID to UI name
+ const TranslateId* pDescrID; // resource ID to description, parameter names and ~ description
// pCompName was originally meant to be able to load Excel documents that for
// some time were stored with localized function names.
// This is not relevant to this add-in, so we only supply the same
@@ -74,8 +75,8 @@ class ScaFuncData final
{
private:
OUString aIntName; // internal name (get***)
- const char* pUINameID; // resource ID to UI name
- const char** pDescrID; // leads also to parameter descriptions!
+ TranslateId pUINameID; // resource ID to UI name
+ const TranslateId* pDescrID; // leads also to parameter descriptions!
sal_uInt16 nParamCount; // num of parameters
std::vector<OUString> aCompList; // list of all valid names
ScaCategory eCat; // function category
@@ -85,8 +86,8 @@ private:
public:
ScaFuncData(const ScaFuncDataBase& rBaseData);
- const char* GetUINameID() const { return pUINameID; }
- const char** GetDescrID() const { return pDescrID; }
+ const TranslateId& GetUINameID() const { return pUINameID; }
+ const TranslateId* GetDescrID() const { return pDescrID; }
ScaCategory GetCategory() const { return eCat; }
bool IsDouble() const { return bDouble; }
@@ -134,13 +135,13 @@ private:
void InitData();
/// @throws css::uno::RuntimeException
- OUString GetFuncDescrStr(const char** pResId, sal_uInt16 nStrIndex);
+ OUString GetFuncDescrStr(const TranslateId* pResId, sal_uInt16 nStrIndex);
public:
ScaPricingAddIn();
virtual ~ScaPricingAddIn() override;
- OUString ScaResId(std::string_view aResId);
+ OUString ScaResId(TranslateId aResId);
// XAddIn
virtual OUString SAL_CALL getProgrammaticFuntionName( const OUString& aDisplayName ) override;
diff --git a/sccomp/inc/strings.hrc b/sccomp/inc/strings.hrc
index 1ffff8a0446a..4fe4932debad 100644
--- a/sccomp/inc/strings.hrc
+++ b/sccomp/inc/strings.hrc
@@ -19,7 +19,7 @@
#pragma once
-#define NC_(Context, String) reinterpret_cast<char const *>(Context "\004" u8##String)
+#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(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")
diff --git a/sccomp/source/solver/CoinMPSolver.cxx b/sccomp/source/solver/CoinMPSolver.cxx
index 35ebf1fd19b2..2dd896e82bb1 100644
--- a/sccomp/source/solver/CoinMPSolver.cxx
+++ b/sccomp/source/solver/CoinMPSolver.cxx
@@ -25,6 +25,7 @@
#include <com/sun/star/frame/XModel.hpp>
#include <com/sun/star/table/CellAddress.hpp>
+#include <unotools/resmgr.hxx>
#include <rtl/math.hxx>
#include <stdexcept>
diff --git a/sccomp/source/solver/LpsolveSolver.cxx b/sccomp/source/solver/LpsolveSolver.cxx
index e53c685555d8..229c5f0c3dbe 100644
--- a/sccomp/source/solver/LpsolveSolver.cxx
+++ b/sccomp/source/solver/LpsolveSolver.cxx
@@ -56,6 +56,7 @@
#include <com/sun/star/frame/XModel.hpp>
#include <com/sun/star/table/CellAddress.hpp>
+#include <unotools/resmgr.hxx>
#include <rtl/math.hxx>
#include <memory>
#include <vector>
diff --git a/sccomp/source/solver/SolverComponent.cxx b/sccomp/source/solver/SolverComponent.cxx
index 7c92233522d4..e31a84073337 100644
--- a/sccomp/source/solver/SolverComponent.cxx
+++ b/sccomp/source/solver/SolverComponent.cxx
@@ -41,7 +41,7 @@ constexpr OUStringLiteral STR_LIMITBBDEPTH = u"LimitBBDepth";
// Resources from tools are used for translated strings
-OUString SolverComponent::GetResourceString(std::string_view aId)
+OUString SolverComponent::GetResourceString(TranslateId aId)
{
return Translate::get(aId, Translate::Create("scc"));
}
@@ -140,7 +140,7 @@ OUString SAL_CALL SolverComponent::getStatusDescription()
OUString SAL_CALL SolverComponent::getPropertyDescription( const OUString& rPropertyName )
{
- const char* pResId = nullptr;
+ TranslateId pResId;
sal_Int32 nHandle = getInfoHelper().getHandleByName( rPropertyName );
switch (nHandle)
{
diff --git a/sccomp/source/solver/SolverComponent.hxx b/sccomp/source/solver/SolverComponent.hxx
index 0c3869bdd4b4..4e10c038a474 100644
--- a/sccomp/source/solver/SolverComponent.hxx
+++ b/sccomp/source/solver/SolverComponent.hxx
@@ -27,6 +27,7 @@
#include <comphelper/broadcasthelper.hxx>
#include <comphelper/propertycontainer.hxx>
#include <comphelper/proparrhlp.hxx>
+#include <unotools/resmgr.hxx>
#include <unordered_map>
@@ -82,7 +83,7 @@ protected:
css::uno::Sequence< double > maSolution;
OUString maStatus;
- static OUString GetResourceString(std::string_view aId);
+ static OUString GetResourceString(TranslateId aId);
static css::uno::Reference<css::table::XCell> GetCell(
const css::uno::Reference<css::sheet::XSpreadsheetDocument>& xDoc,
const css::table::CellAddress& rPos );
diff --git a/sccomp/source/solver/SwarmSolver.cxx b/sccomp/source/solver/SwarmSolver.cxx
index 5ebeedfc032c..c0dad8a4471d 100644
--- a/sccomp/source/solver/SwarmSolver.cxx
+++ b/sccomp/source/solver/SwarmSolver.cxx
@@ -130,7 +130,7 @@ private:
std::vector<sheet::SolverConstraint> maNonBoundedConstraints;
private:
- static OUString getResourceString(std::string_view aId);
+ static OUString getResourceString(TranslateId aId);
uno::Reference<table::XCell> getCell(const table::CellAddress& rPosition);
void setValue(const table::CellAddress& rPosition, double fValue);
@@ -233,7 +233,7 @@ public:
virtual OUString SAL_CALL getPropertyDescription(const OUString& rPropertyName) override
{
- const char* pResId = "";
+ TranslateId pResId;
switch (getInfoHelper().getHandleByName(rPropertyName))
{
case PROP_NONNEGATIVE:
@@ -283,9 +283,9 @@ public:
};
}
-OUString SwarmSolver::getResourceString(std::string_view aId)
+OUString SwarmSolver::getResourceString(TranslateId aId)
{
- if (aId.empty())
+ if (!aId)
return OUString();
return Translate::get(aId, Translate::Create("scc"));
diff --git a/scripting/Library_dlgprov.mk b/scripting/Library_dlgprov.mk
index 02ea01118d0f..9ccdfa5ffa36 100644
--- a/scripting/Library_dlgprov.mk
+++ b/scripting/Library_dlgprov.mk
@@ -34,6 +34,7 @@ $(eval $(call gb_Library_use_libraries,dlgprov,\
sfx \
tl \
ucbhelper \
+ utl \
vbahelper \
vcl \
xmlscript \
diff --git a/sd/inc/DocumentRenderer.hrc b/sd/inc/DocumentRenderer.hrc
index 3cdd5b004f55..755fa5a66bbb 100644
--- a/sd/inc/DocumentRenderer.hrc
+++ b/sd/inc/DocumentRenderer.hrc
@@ -19,9 +19,11 @@
#pragma once
-#define NC_(Context, String) reinterpret_cast<char const *>(Context "\004" u8##String)
+#include <unotools/resmgr.hxx>
-const char* STR_IMPRESS_PRINT_UI_CONTENT_CHOICES[] =
+#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
+
+const TranslateId STR_IMPRESS_PRINT_UI_CONTENT_CHOICES[] =
{
NC_("STR_IMPRESS_PRINT_UI_CONTENT_CHOICES", "Slides"),
NC_("STR_IMPRESS_PRINT_UI_CONTENT_CHOICES", "Handouts"),
@@ -29,7 +31,7 @@ const char* STR_IMPRESS_PRINT_UI_CONTENT_CHOICES[] =
NC_("STR_IMPRESS_PRINT_UI_CONTENT_CHOICES", "Outline")
};
-const char* STR_IMPRESS_PRINT_UI_SLIDESPERPAGE_CHOICES[] =
+const TranslateId STR_IMPRESS_PRINT_UI_SLIDESPERPAGE_CHOICES[] =
{
NC_("STR_IMPRESS_PRINT_UI_SLIDESPERPAGE_CHOICES", "According to layout"),
NC_("STR_IMPRESS_PRINT_UI_SLIDESPERPAGE_CHOICES", "1"),
@@ -40,20 +42,20 @@ const char* STR_IMPRESS_PRINT_UI_SLIDESPERPAGE_CHOICES[] =
NC_("STR_IMPRESS_PRINT_UI_SLIDESPERPAGE_CHOICES", "9")
};
-const char* STR_IMPRESS_PRINT_UI_ORDER_CHOICES[] =
+const TranslateId STR_IMPRESS_PRINT_UI_ORDER_CHOICES[] =
{
NC_("STR_IMPRESS_PRINT_UI_ORDER_CHOICES", "Left to right, then down"),
NC_("STR_IMPRESS_PRINT_UI_ORDER_CHOICES", "Top to bottom, then right")
};
-const char* STR_IMPRESS_PRINT_UI_QUALITY_CHOICES[] =
+const TranslateId STR_IMPRESS_PRINT_UI_QUALITY_CHOICES[] =
{
NC_("STR_IMPRESS_PRINT_UI_QUALITY_CHOICES", "Original colors"),
NC_("STR_IMPRESS_PRINT_UI_QUALITY_CHOICES", "Grayscale"),
NC_("STR_IMPRESS_PRINT_UI_QUALITY_CHOICES", "Black & white")
};
-const char* STR_IMPRESS_PRINT_UI_PAGE_OPTIONS_CHOICES[] =
+const TranslateId STR_IMPRESS_PRINT_UI_PAGE_OPTIONS_CHOICES[] =
{
NC_("STR_IMPRESS_PRINT_UI_PAGE_OPTIONS_CHOICES", "Original size"),
NC_("STR_IMPRESS_PRINT_UI_PAGE_OPTIONS_CHOICES", "Fit to printable page"),
@@ -61,7 +63,7 @@ const char* STR_IMPRESS_PRINT_UI_PAGE_OPTIONS_CHOICES[] =
NC_("STR_IMPRESS_PRINT_UI_PAGE_OPTIONS_CHOICES", "Tile sheet of paper with repeated slides")
};
-const char* STR_IMPRESS_PRINT_UI_PAGE_OPTIONS_CHOICES_DRAW[] =
+const TranslateId STR_IMPRESS_PRINT_UI_PAGE_OPTIONS_CHOICES_DRAW[] =
{
NC_("STR_IMPRESS_PRINT_UI_PAGE_OPTIONS_CHOICES_DRAW", "Original size"),
NC_("STR_IMPRESS_PRINT_UI_PAGE_OPTIONS_CHOICES_DRAW", "Fit to printable page"),
@@ -69,21 +71,21 @@ const char* STR_IMPRESS_PRINT_UI_PAGE_OPTIONS_CHOICES_DRAW[] =
NC_("STR_IMPRESS_PRINT_UI_PAGE_OPTIONS_CHOICES_DRAW", "Tile sheet of paper with repeated pages")
};
-const char* STR_IMPRESS_PRINT_UI_BROCHURE_INCLUDE_LIST[] =
+const TranslateId STR_IMPRESS_PRINT_UI_BROCHURE_INCLUDE_LIST[] =
{
NC_("STR_IMPRESS_PRINT_UI_BROCHURE_INCLUDE_LIST", "All pages"),
NC_("STR_IMPRESS_PRINT_UI_BROCHURE_INCLUDE_LIST", "Front sides / right pages"),
NC_("STR_IMPRESS_PRINT_UI_BROCHURE_INCLUDE_LIST", "Back sides / left pages")
};
-const char* STR_IMPRESS_PRINT_UI_PAGE_RANGE_CHOICE[] =
+const TranslateId STR_IMPRESS_PRINT_UI_PAGE_RANGE_CHOICE[] =
{
NC_("STR_IMPRESS_PRINT_UI_PAGE_RANGE_CHOICE", "All ~Slides"),
NC_("STR_IMPRESS_PRINT_UI_PAGE_RANGE_CHOICE", "S~lides:"),
NC_("STR_IMPRESS_PRINT_UI_PAGE_RANGE_CHOICE", "~Selection")
};
-const char* STR_DRAW_PRINT_UI_PAGE_RANGE_CHOICE[] =
+const TranslateId STR_DRAW_PRINT_UI_PAGE_RANGE_CHOICE[] =
{
NC_("STR_DRAW_PRINT_UI_PAGE_RANGE_CHOICE", "All ~Pages"),
NC_("STR_DRAW_PRINT_UI_PAGE_RANGE_CHOICE", "~Pages:"),
diff --git a/sd/inc/errhdl.hrc b/sd/inc/errhdl.hrc
index affe12ac4331..ea7d4e7127d7 100644
--- a/sd/inc/errhdl.hrc
+++ b/sd/inc/errhdl.hrc
@@ -19,7 +19,7 @@
#pragma once
-#define NC_(Context, String) reinterpret_cast<char const *>(Context "\004" u8##String)
+#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
#include <svtools/ehdl.hxx>
#include <vcl/errcode.hxx>
@@ -33,7 +33,7 @@ const ErrMsgCode RID_SD_ERRHDL[] =
ERR_FORMAT_FILE_ROWCOL },
{ NC_("RID_SD_ERRHDL", "Format error discovered in the file in sub-document $(ARG1) at position $(ARG2)(row,col)."),
WARN_FORMAT_FILE_ROWCOL },
- { nullptr, ERRCODE_NONE }
+ { {}, ERRCODE_NONE }
};
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sd/inc/family.hrc b/sd/inc/family.hrc
index 28a1d4429b81..dcfd31e17d46 100644
--- a/sd/inc/family.hrc
+++ b/sd/inc/family.hrc
@@ -21,22 +21,22 @@
#include <svl/style.hxx>
-#define NC_(Context, String) reinterpret_cast<char const *>(Context "\004" u8##String)
+#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
-const std::pair<const char*, SfxStyleSearchBits> RID_GRAPHICSTYLEFAMILY[] =
+const std::pair<TranslateId, SfxStyleSearchBits> RID_GRAPHICSTYLEFAMILY[] =
{
{ NC_("RID_GRAPHICSTYLEFAMILY", "All Styles") , SfxStyleSearchBits::AllVisible },
{ NC_("RID_GRAPHICSTYLEFAMILY", "Hidden Styles") , SfxStyleSearchBits::Hidden },
{ NC_("RID_GRAPHICSTYLEFAMILY", "Applied Styles") , SfxStyleSearchBits::Used },
{ NC_("RID_GRAPHICSTYLEFAMILY", "Custom Styles") , SfxStyleSearchBits::UserDefined },
- { nullptr, SfxStyleSearchBits::Auto }
+ { {}, SfxStyleSearchBits::Auto }
};
-const std::pair<const char*, SfxStyleSearchBits> RID_PRESENTATIONSTYLEFAMILY[] =
+const std::pair<TranslateId, SfxStyleSearchBits> RID_PRESENTATIONSTYLEFAMILY[] =
{
{ NC_("RID_PRESENTATIONSTYLEFAMILY", "All Styles") , SfxStyleSearchBits::AllVisible },
{ NC_("RID_PRESENTATIONSTYLEFAMILY", "Hidden Styles") , SfxStyleSearchBits::Hidden },
- { nullptr, SfxStyleSearchBits::Auto }
+ { {}, SfxStyleSearchBits::Auto }
};
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sd/inc/pageformatpanel.hrc b/sd/inc/pageformatpanel.hrc
index 3eb2f5763ae2..bf29cc9b4602 100644
--- a/sd/inc/pageformatpanel.hrc
+++ b/sd/inc/pageformatpanel.hrc
@@ -11,13 +11,13 @@
#include <utility>
-#define NC_(Context, String) reinterpret_cast<char const *>(Context "\004" u8##String)
+#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
namespace sd
{
// To translators: this is a listbox labelled by "Margins:", inch units
-const std::pair<const char*, int> RID_PAGEFORMATPANEL_MARGINS_INCH[] =
+const std::pair<TranslateId, int> RID_PAGEFORMATPANEL_MARGINS_INCH[] =
{
{ NC_("RID_PAGEFORMATPANEL_MARGINS_INCH", "None"), 0 },
{ NC_("RID_PAGEFORMATPANEL_MARGINS_INCH", "Narrow"), 0 },
@@ -32,7 +32,7 @@ const std::pair<const char*, int> RID_PAGEFORMATPANEL_MARGINS_INCH[] =
};
// To translators: this is a listbox labelled by "Margins:", cm units
-const std::pair<const char*, int> RID_PAGEFORMATPANEL_MARGINS_CM[] =
+const std::pair<TranslateId, int> RID_PAGEFORMATPANEL_MARGINS_CM[] =
{
{ NC_("RID_PAGEFORMATPANEL_MARGINS_CM", "None"), 0 },
{ NC_("RID_PAGEFORMATPANEL_MARGINS_CM", "Narrow"), 0 },
diff --git a/sd/inc/sdresid.hxx b/sd/inc/sdresid.hxx
index 768b9a14998d..2ed8cd42cf20 100644
--- a/sd/inc/sdresid.hxx
+++ b/sd/inc/sdresid.hxx
@@ -21,8 +21,9 @@
#include <rtl/ustring.hxx>
#include "sddllapi.h"
+#include <unotools/resmgr.hxx>
-SD_DLLPUBLIC OUString SdResId(std::string_view aId);
-SD_DLLPUBLIC OUString SdResId(std::string_view aId, int nCardinality);
+SD_DLLPUBLIC OUString SdResId(TranslateId aId);
+SD_DLLPUBLIC OUString SdResId(TranslateNId aContextSingularPlural, int nCardinality);
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sd/inc/strings.hrc b/sd/inc/strings.hrc
index d55bf8824568..e1f9f0706930 100644
--- a/sd/inc/strings.hrc
+++ b/sd/inc/strings.hrc
@@ -19,8 +19,8 @@
#pragma once
-#define NC_(Context, String) reinterpret_cast<char const *>(Context "\004" u8##String)
-#define NNC_(Context, StringSingular, StringPlural) reinterpret_cast<char const *>(Context "\004" u8##StringSingular "\004" u8##StringPlural)
+#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(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")
#define STR_INSERTPAGE NC_("STR_INSERTPAGE", "Insert Slide")
diff --git a/sd/source/core/stlpool.cxx b/sd/source/core/stlpool.cxx
index d15aaf632b04..503bb3f184b5 100644
--- a/sd/source/core/stlpool.cxx
+++ b/sd/source/core/stlpool.cxx
@@ -929,7 +929,7 @@ void SdStyleSheetPool::UpdateStdNames()
SfxStyleFamily eFam = pStyle->GetFamily();
bool bHelpKnown = true;
- const char* pNameId = nullptr;
+ TranslateId pNameId;
switch( nHelpId )
{
case HID_STANDARD_STYLESHEET_NAME: pNameId = STR_STANDARD_STYLESHEET_NAME; break;
@@ -989,7 +989,7 @@ void SdStyleSheetPool::UpdateStdNames()
OUString aNewName;
if (pNameId)
{
- if (strcmp(pNameId, STR_PSEUDOSHEET_OUTLINE) == 0)
+ if (pNameId == STR_PSEUDOSHEET_OUTLINE)
{
aNewName += " " + OUString::number( sal_Int32( nHelpId - HID_PSEUDOSHEET_OUTLINE ) );
}
diff --git a/sd/source/filter/grf/sdgrffilter.cxx b/sd/source/filter/grf/sdgrffilter.cxx
index ebceaee3b10a..edf39df51513 100644
--- a/sd/source/filter/grf/sdgrffilter.cxx
+++ b/sd/source/filter/grf/sdgrffilter.cxx
@@ -110,7 +110,7 @@ void SdGRFFilter::HandleGraphicFilterError( ErrCode nFilterError, ErrCode nStrea
return;
}
- const char* pId;
+ TranslateId pId;
if( nFilterError == ERRCODE_GRFILTER_OPENERROR )
pId = STR_IMPORT_GRFILTER_OPENERROR;
@@ -123,11 +123,11 @@ void SdGRFFilter::HandleGraphicFilterError( ErrCode nFilterError, ErrCode nStrea
else if( nFilterError == ERRCODE_GRFILTER_TOOBIG )
pId = STR_IMPORT_GRFILTER_TOOBIG;
else if( nFilterError == ERRCODE_NONE )
- pId = nullptr;
+ ;
else
pId = STR_IMPORT_GRFILTER_FILTERERROR;
- if (pId && strcmp(pId, STR_IMPORT_GRFILTER_IOERROR) == 0)
+ if (pId && pId == STR_IMPORT_GRFILTER_IOERROR)
ErrorHandler::HandleError( ERRCODE_IO_GENERAL );
else
{
diff --git a/sd/source/filter/html/htmlex.cxx b/sd/source/filter/html/htmlex.cxx
index a0836ce8758b..9f6b80f1f4bf 100644
--- a/sd/source/filter/html/htmlex.cxx
+++ b/sd/source/filter/html/htmlex.cxx
@@ -3164,7 +3164,6 @@ void EasyFile::close()
// This class helps reporting errors during file i/o
HtmlErrorContext::HtmlErrorContext()
: ErrorContext(nullptr)
- , mpResId(nullptr)
{
}
@@ -3182,14 +3181,14 @@ bool HtmlErrorContext::GetString( ErrCode, OUString& rCtxStr )
return true;
}
-void HtmlErrorContext::SetContext(const char* pResId, const OUString& rURL)
+void HtmlErrorContext::SetContext(TranslateId pResId, const OUString& rURL)
{
mpResId = pResId;
maURL1 = rURL;
maURL2.clear();
}
-void HtmlErrorContext::SetContext(const char* pResId, const OUString& rURL1, const OUString& rURL2 )
+void HtmlErrorContext::SetContext(TranslateId pResId, const OUString& rURL1, const OUString& rURL2 )
{
mpResId = pResId;
maURL1 = rURL1;
diff --git a/sd/source/filter/html/htmlex.hxx b/sd/source/filter/html/htmlex.hxx
index aeef943cb8f6..5f6f06e49b27 100644
--- a/sd/source/filter/html/htmlex.hxx
+++ b/sd/source/filter/html/htmlex.hxx
@@ -24,6 +24,7 @@
#include <tools/color.hxx>
#include <tools/solar.h>
#include <vcl/errinf.hxx>
+#include <unotools/resmgr.hxx>
#include "htmlpublishmode.hxx"
@@ -63,7 +64,7 @@ class ButtonSet;
class HtmlErrorContext : public ErrorContext
{
private:
- const char* mpResId;
+ TranslateId mpResId;
OUString maURL1;
OUString maURL2;
@@ -72,8 +73,8 @@ public:
virtual bool GetString( ErrCode nErrId, OUString& rCtxStr ) override;
- void SetContext(const char* pResId, const OUString& rURL);
- void SetContext(const char* pResId, const OUString& rURL1, const OUString& rURL2);
+ void SetContext(TranslateId pResId, const OUString& rURL);
+ void SetContext(TranslateId pResId, const OUString& rURL1, const OUString& rURL2);
};
/// this class exports an Impress Document as a HTML Presentation.
diff --git a/sd/source/ui/annotations/annotationmanager.cxx b/sd/source/ui/annotations/annotationmanager.cxx
index 6da902023f3c..ca1fe2d84f24 100644
--- a/sd/source/ui/annotations/annotationmanager.cxx
+++ b/sd/source/ui/annotations/annotationmanager.cxx
@@ -826,7 +826,7 @@ void AnnotationManagerImpl::SelectNextAnnotation(bool bForward)
// The question text depends on the search direction.
bool bImpress = mpDoc->GetDocumentType() == DocumentType::Impress;
- const char* pStringId;
+ TranslateId pStringId;
if(bForward)
pStringId = bImpress ? STR_ANNOTATION_WRAP_FORWARD : STR_ANNOTATION_WRAP_FORWARD_DRAW;
else
diff --git a/sd/source/ui/app/sdmod.cxx b/sd/source/ui/app/sdmod.cxx
index 4d99ce7aacf3..73b01b282e32 100644
--- a/sd/source/ui/app/sdmod.cxx
+++ b/sd/source/ui/app/sdmod.cxx
@@ -80,14 +80,14 @@ SdModule::SdModule(SfxObjectFactory* pFact1, SfxObjectFactory* pFact2 )
mpVirtualRefDevice->SetReferenceDevice ( VirtualDevice::RefDevMode::Dpi600 );
}
-OUString SdResId(std::string_view aId)
+OUString SdResId(TranslateId aId)
{
return Translate::get(aId, SD_MOD()->GetResLocale());
}
-OUString SdResId(std::string_view aId, int nCardinality)
+OUString SdResId(TranslateNId aContextSingularPlural, int nCardinality)
{
- return Translate::nget(aId, nCardinality, SD_MOD()->GetResLocale());
+ return Translate::nget(aContextSingularPlural, nCardinality, SD_MOD()->GetResLocale());
}
// Dtor
diff --git a/sd/source/ui/controller/displaymodecontroller.cxx b/sd/source/ui/controller/displaymodecontroller.cxx
index 8dc1a743897b..4d794d8bcfdc 100644
--- a/sd/source/ui/controller/displaymodecontroller.cxx
+++ b/sd/source/ui/controller/displaymodecontroller.cxx
@@ -74,7 +74,7 @@ struct snewfoil_value_info
{
sal_uInt16 mnId;
const char* msBmpResId;
- const char* mpStrResId;
+ TranslateId mpStrResId;
const char* msUnoCommand;
};
@@ -98,7 +98,7 @@ const snewfoil_value_info editmodes[] =
BMP_DISPLAYMODE_SLIDE_SORTER,
STR_SLIDE_SORTER_MODE,
".uno:DiaMode" },
- {0, "", nullptr, "" }
+ {0, "", {}, "" }
};
const snewfoil_value_info mastermodes[] =
@@ -115,7 +115,7 @@ const snewfoil_value_info mastermodes[] =
BMP_DISPLAYMODE_HANDOUT_MASTER,
STR_HANDOUT_MASTER_MODE,
".uno:HandoutMode" },
- {0, "", nullptr, "" }
+ {0, "", {}, "" }
};
diff --git a/sd/source/ui/controller/slidelayoutcontroller.cxx b/sd/source/ui/controller/slidelayoutcontroller.cxx
index 41ab38cad0b1..26c0d5bebcb2 100644
--- a/sd/source/ui/controller/slidelayoutcontroller.cxx
+++ b/sd/source/ui/controller/slidelayoutcontroller.cxx
@@ -79,7 +79,7 @@ private:
struct snewfoil_value_info_layout
{
const char* msBmpResId;
- const char* mpStrResId;
+ TranslateId mpStrResId;
AutoLayout maAutoLayout;
};
@@ -88,7 +88,7 @@ struct snewfoil_value_info_layout
const snewfoil_value_info_layout notes[] =
{
{BMP_FOILN_01, STR_AUTOLAYOUT_NOTES, AUTOLAYOUT_NOTES},
- {nullptr, nullptr, AUTOLAYOUT_NONE},
+ {nullptr, {}, AUTOLAYOUT_NONE},
};
const snewfoil_value_info_layout handout[] =
@@ -99,7 +99,7 @@ const snewfoil_value_info_layout handout[] =
{BMP_FOILH_04, STR_AUTOLAYOUT_HANDOUT4, AUTOLAYOUT_HANDOUT4},
{BMP_FOILH_06, STR_AUTOLAYOUT_HANDOUT6, AUTOLAYOUT_HANDOUT6},
{BMP_FOILH_09, STR_AUTOLAYOUT_HANDOUT9, AUTOLAYOUT_HANDOUT9},
- {nullptr, nullptr, AUTOLAYOUT_NONE},
+ {nullptr, {}, AUTOLAYOUT_NONE},
};
const snewfoil_value_info_layout standard[] =
@@ -116,7 +116,7 @@ const snewfoil_value_info_layout standard[] =
{BMP_LAYOUT_HEAD02B, STR_AUTOLAYOUT_CONTENT_OVER_CONTENT, AUTOLAYOUT_TITLE_CONTENT_OVER_CONTENT },
{BMP_LAYOUT_HEAD04, STR_AUTOLAYOUT_4CONTENT, AUTOLAYOUT_TITLE_4CONTENT },
{BMP_LAYOUT_HEAD06, STR_AUTOLAYOUT_6CONTENT, AUTOLAYOUT_TITLE_6CONTENT },
- {nullptr, nullptr, AUTOLAYOUT_NONE}
+ {nullptr, {}, AUTOLAYOUT_NONE}
};
const snewfoil_value_info_layout v_standard[] =
@@ -126,7 +126,7 @@ const snewfoil_value_info_layout v_standard[] =
{BMP_LAYOUT_VERTICAL01, STR_AL_VERT_TITLE_VERT_OUTLINE, AUTOLAYOUT_VTITLE_VCONTENT },
{BMP_LAYOUT_HEAD02, STR_AL_TITLE_VERT_OUTLINE, AUTOLAYOUT_TITLE_VCONTENT },
{BMP_LAYOUT_HEAD02A, STR_AL_TITLE_VERT_OUTLINE_CLIPART, AUTOLAYOUT_TITLE_2VTEXT },
- {nullptr, nullptr, AUTOLAYOUT_NONE}
+ {nullptr, {}, AUTOLAYOUT_NONE}
};
static void fillLayoutValueSet( ValueSet* pValue, const snewfoil_value_info_layout* pInfo )
diff --git a/sd/source/ui/dlg/PaneChildWindows.cxx b/sd/source/ui/dlg/PaneChildWindows.cxx
index a40acd367d6c..7f73e005b4c5 100644
--- a/sd/source/ui/dlg/PaneChildWindows.cxx
+++ b/sd/source/ui/dlg/PaneChildWindows.cxx
@@ -40,7 +40,7 @@ PaneChildWindow::PaneChildWindow (
sal_uInt16 nId,
SfxBindings* pBindings,
SfxChildWinInfo* pInfo,
- const char* pTitleBarResId)
+ TranslateId pTitleBarResId)
: SfxChildWindow (pParentWindow, nId)
{
SetWindow( VclPtr<PaneDockingWindow>::Create(
diff --git a/sd/source/ui/dlg/tpaction.cxx b/sd/source/ui/dlg/tpaction.cxx
index 4cd0cf68af9d..46611d147eb6 100644
--- a/sd/source/ui/dlg/tpaction.cxx
+++ b/sd/source/ui/dlg/tpaction.cxx
@@ -232,7 +232,7 @@ void SdTPAction::Construct()
// fill Action-Listbox
for (const presentation::ClickAction & rAction : maCurrentActions)
{
- const char* pRId = GetClickActionSdResId(rAction);
+ TranslateId pRId = GetClickActionSdResId(rAction);
m_xLbAction->append_text(SdResId(pRId));
}
@@ -798,7 +798,7 @@ OUString SdTPAction::GetEditText( bool bFullDocDestination )
return aStr;
}
-const char* SdTPAction::GetClickActionSdResId( presentation::ClickAction eCA )
+TranslateId SdTPAction::GetClickActionSdResId( presentation::ClickAction eCA )
{
switch( eCA )
{
@@ -816,7 +816,7 @@ const char* SdTPAction::GetClickActionSdResId( presentation::ClickAction eCA )
case presentation::ClickAction_STOPPRESENTATION: return STR_CLICK_ACTION_STOPPRESENTATION;
default: OSL_FAIL( "No StringResource for ClickAction available!" );
}
- return nullptr;
+ return {};
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sd/source/ui/func/fuconrec.cxx b/sd/source/ui/func/fuconrec.cxx
index 26be546af0c9..b354138af287 100644
--- a/sd/source/ui/func/fuconrec.cxx
+++ b/sd/source/ui/func/fuconrec.cxx
@@ -648,7 +648,7 @@ void FuConstructRectangle::SetAttributes(SfxItemSet& rAttr, SdrObject* pObj)
/**
* set line starts and ends for the object to be created
*/
-static ::basegfx::B2DPolyPolygon getPolygon(const char* pResId, const SdrModel& rModel)
+static ::basegfx::B2DPolyPolygon getPolygon(TranslateId pResId, const SdrModel& rModel)
{
::basegfx::B2DPolyPolygon aRetval;
XLineEndListRef pLineEndList(rModel.GetLineEndList());
diff --git a/sd/source/ui/inc/PaneChildWindows.hxx b/sd/source/ui/inc/PaneChildWindows.hxx
index 4d6c8463996d..e323353ee187 100644
--- a/sd/source/ui/inc/PaneChildWindows.hxx
+++ b/sd/source/ui/inc/PaneChildWindows.hxx
@@ -20,6 +20,7 @@
#pragma once
#include <sfx2/childwin.hxx>
+#include <unotools/resmgr.hxx>
namespace sd {
@@ -33,7 +34,7 @@ public:
sal_uInt16 nId,
SfxBindings* pBindings,
SfxChildWinInfo* pInfo,
- const char* pTitleBarResId);
+ TranslateId pTitleBarResId);
virtual ~PaneChildWindow() override;
};
diff --git a/sd/source/ui/inc/tpaction.hxx b/sd/source/ui/inc/tpaction.hxx
index ac0c6fb8b0d0..22c4dd82a779 100644
--- a/sd/source/ui/inc/tpaction.hxx
+++ b/sd/source/ui/inc/tpaction.hxx
@@ -81,7 +81,7 @@ private:
void SetActualClickAction( css::presentation::ClickAction eCA );
void SetEditText( OUString const & rStr );
OUString GetEditText( bool bURL = false );
- static const char* GetClickActionSdResId(css::presentation::ClickAction eCA);
+ static TranslateId GetClickActionSdResId(css::presentation::ClickAction eCA);
public:
SdTPAction(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rInAttrs);
diff --git a/sd/source/ui/sidebar/LayoutMenu.cxx b/sd/source/ui/sidebar/LayoutMenu.cxx
index 0e2e8aae890f..8483616c5e10 100644
--- a/sd/source/ui/sidebar/LayoutMenu.cxx
+++ b/sd/source/ui/sidebar/LayoutMenu.cxx
@@ -75,7 +75,7 @@ namespace {
struct snewfoil_value_info
{
const char* msBmpResId;
- const char* mpStrResId;
+ TranslateId mpStrResId;
WritingMode meWritingMode;
AutoLayout maAutoLayout;
};
@@ -86,7 +86,7 @@ const snewfoil_value_info notes[] =
{
{BMP_FOILN_01, STR_AUTOLAYOUT_NOTES, WritingMode_LR_TB,
AUTOLAYOUT_NOTES},
- {"", nullptr, WritingMode_LR_TB, AUTOLAYOUT_NONE},
+ {"", {}, WritingMode_LR_TB, AUTOLAYOUT_NONE},
};
const snewfoil_value_info handout[] =
@@ -103,7 +103,7 @@ const snewfoil_value_info handout[] =
AUTOLAYOUT_HANDOUT6},
{BMP_FOILH_09, STR_AUTOLAYOUT_HANDOUT9, WritingMode_LR_TB,
AUTOLAYOUT_HANDOUT9},
- {"", nullptr, WritingMode_LR_TB, AUTOLAYOUT_NONE},
+ {"", {}, WritingMode_LR_TB, AUTOLAYOUT_NONE},
};
const snewfoil_value_info standard[] =
@@ -126,7 +126,7 @@ const snewfoil_value_info standard[] =
{BMP_LAYOUT_VERTICAL01, STR_AL_VERT_TITLE_VERT_OUTLINE, WritingMode_TB_RL, AUTOLAYOUT_VTITLE_VCONTENT},
{BMP_LAYOUT_HEAD02, STR_AL_TITLE_VERT_OUTLINE, WritingMode_TB_RL, AUTOLAYOUT_TITLE_VCONTENT},
{BMP_LAYOUT_HEAD02A, STR_AL_TITLE_VERT_OUTLINE_CLIPART, WritingMode_TB_RL, AUTOLAYOUT_TITLE_2VTEXT},
- {"", nullptr, WritingMode_LR_TB, AUTOLAYOUT_NONE}
+ {"", {}, WritingMode_LR_TB, AUTOLAYOUT_NONE}
};
class LayoutValueSet : public ValueSet
@@ -538,7 +538,7 @@ void LayoutMenu::Fill()
}
Clear();
- for (sal_uInt16 i=1; pInfo!=nullptr && pInfo->mpStrResId != nullptr; i++, pInfo++)
+ for (sal_uInt16 i=1; pInfo!=nullptr && pInfo->mpStrResId; i++, pInfo++)
{
if ((WritingMode_TB_RL != pInfo->meWritingMode) || bVertical)
{
diff --git a/sd/source/ui/sidebar/MasterPageContainer.cxx b/sd/source/ui/sidebar/MasterPageContainer.cxx
index a37b3b6ddeb0..3db225efba2d 100644
--- a/sd/source/ui/sidebar/MasterPageContainer.cxx
+++ b/sd/source/ui/sidebar/MasterPageContainer.cxx
@@ -157,7 +157,7 @@ private:
Size maSmallPreviewSizePixel;
Size maLargePreviewSizePixel;
- Image GetPreviewSubstitution(const char* pId, PreviewSize ePreviewSize);
+ Image GetPreviewSubstitution(TranslateId pId, PreviewSize ePreviewSize);
void CleanContainer();
};
@@ -841,14 +841,14 @@ SdDrawDocument* MasterPageContainer::Implementation::GetDocument()
}
Image MasterPageContainer::Implementation::GetPreviewSubstitution (
- const char* pId,
+ TranslateId pId,
PreviewSize ePreviewSize)
{
const ::osl::MutexGuard aGuard (maMutex);
Image aPreview;
- if (strcmp(pId, STR_TASKPANEL_PREPARING_PREVIEW_SUBSTITUTION) == 0)
+ if (pId == STR_TASKPANEL_PREPARING_PREVIEW_SUBSTITUTION)
{
Image& rPreview (ePreviewSize==SMALL
? maSmallPreviewBeingCreated
@@ -861,7 +861,7 @@ Image MasterPageContainer::Implementation::GetPreviewSubstitution (
}
aPreview = rPreview;
}
- else if (strcmp(pId, STR_TASKPANEL_NOT_AVAILABLE_SUBSTITUTION) == 0)
+ else if (pId == STR_TASKPANEL_NOT_AVAILABLE_SUBSTITUTION)
{
Image& rPreview (ePreviewSize==SMALL
? maSmallPreviewNotAvailable
diff --git a/sd/source/ui/view/DocumentRenderer.cxx b/sd/source/ui/view/DocumentRenderer.cxx
index d0cc984e249b..ed93441139a1 100644
--- a/sd/source/ui/view/DocumentRenderer.cxx
+++ b/sd/source/ui/view/DocumentRenderer.cxx
@@ -665,7 +665,7 @@ namespace {
maProperties.push_back( aVal );
}
- static Sequence<OUString> CreateChoice(const char** pResourceId, size_t nCount)
+ static Sequence<OUString> CreateChoice(const TranslateId* pResourceId, size_t nCount)
{
Sequence<OUString> aChoices (nCount);
for (size_t nIndex=0; nIndex < nCount; ++nIndex)
diff --git a/sd/source/ui/view/Outliner.cxx b/sd/source/ui/view/Outliner.cxx
index 66e25ad8438a..dd823204ced1 100644
--- a/sd/source/ui/view/Outliner.cxx
+++ b/sd/source/ui/view/Outliner.cxx
@@ -1439,7 +1439,7 @@ bool SdOutliner::ShowWrapAroundDialog()
// The question text depends on the search direction.
bool bImpress = mpDrawDocument && mpDrawDocument->GetDocumentType() == DocumentType::Impress;
- const char* pStringId;
+ TranslateId pStringId;
if (mbDirectionIsForward)
pStringId = bImpress ? STR_SAR_WRAP_FORWARD : STR_SAR_WRAP_FORWARD_DRAW;
else
diff --git a/sd/source/ui/view/drviews2.cxx b/sd/source/ui/view/drviews2.cxx
index b370a0d551bb..7a1c81c89bf7 100644
--- a/sd/source/ui/view/drviews2.cxx
+++ b/sd/source/ui/view/drviews2.cxx
@@ -2349,7 +2349,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
case SID_SHOW_NEXT_LEVEL:
{
- const char* const STR_PRESOBJ_MPOUTLINE_ARY[]
+ const TranslateId STR_PRESOBJ_MPOUTLINE_ARY[]
{
STR_PRESOBJ_MPOUTLINE,
STR_PRESOBJ_MPOUTLLAYER2,
diff --git a/sd/source/ui/view/viewoverlaymanager.cxx b/sd/source/ui/view/viewoverlaymanager.cxx
index d1db1e73a194..935d88555120 100644
--- a/sd/source/ui/view/viewoverlaymanager.cxx
+++ b/sd/source/ui/view/viewoverlaymanager.cxx
@@ -62,7 +62,7 @@ class ImageButtonHdl;
}
const sal_uInt16 gButtonSlots[] = { SID_INSERT_TABLE, SID_INSERT_DIAGRAM, SID_INSERT_GRAPHIC, SID_INSERT_AVMEDIA };
-static const char* gButtonToolTips[] = { STR_INSERT_TABLE, STR_INSERT_CHART, STR_INSERT_PICTURE, STR_INSERT_MOVIE };
+const TranslateId gButtonToolTips[] = { STR_INSERT_TABLE, STR_INSERT_CHART, STR_INSERT_PICTURE, STR_INSERT_MOVIE };
const std::u16string_view aSmallPlaceHolders[] =
{
diff --git a/sfx2/inc/dinfdlg.hrc b/sfx2/inc/dinfdlg.hrc
index a99ead5b6b91..5b838ce56652 100644
--- a/sfx2/inc/dinfdlg.hrc
+++ b/sfx2/inc/dinfdlg.hrc
@@ -20,9 +20,9 @@
#ifndef INCLUDED_SFX2_INC_DINFDLG_HRC
#define INCLUDED_SFX2_INC_DINFDLG_HRC
-#define NC_(Context, String) reinterpret_cast<char const *>(Context "\004" u8##String)
+#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
-const char* SFX_CB_PROPERTY_STRINGARRAY[] =
+const TranslateId SFX_CB_PROPERTY_STRINGARRAY[] =
{
NC_("SFX_CB_PROPERTY_STRINGARRAY", "Checked by"),
NC_("SFX_CB_PROPERTY_STRINGARRAY", "Client"),
@@ -64,7 +64,7 @@ const char* SFX_CB_PROPERTY_STRINGARRAY[] =
#define CUSTOM_TYPE_DURATION 5
#define CUSTOM_TYPE_DATETIME 6
-const std::pair<const char*, int> SFX_LB_PROPERTY_STRINGARRAY[] =
+const std::pair<TranslateId, int> SFX_LB_PROPERTY_STRINGARRAY[] =
{
{ NC_("SFX_CB_PROPERTY_STRINGARRAY", "Text") , CUSTOM_TYPE_TEXT },
{ NC_("SFX_CB_PROPERTY_STRINGARRAY", "DateTime") , CUSTOM_TYPE_DATETIME },
diff --git a/sfx2/inc/doctempl.hrc b/sfx2/inc/doctempl.hrc
index 46773035e9b7..ef2310d860de 100644
--- a/sfx2/inc/doctempl.hrc
+++ b/sfx2/inc/doctempl.hrc
@@ -20,9 +20,9 @@
#ifndef INCLUDED_SFX2_INC_DOCTEMPL_HRC
#define INCLUDED_SFX2_INC_DOCTEMPL_HRC
-#define NC_(Context, String) reinterpret_cast<char const *>(Context "\004" u8##String)
+#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
-const char* TEMPLATE_LONG_NAMES_ARY[] =
+const TranslateId TEMPLATE_LONG_NAMES_ARY[] =
{
NC_("TEMPLATE_LONG_NAMES_ARY", "My Templates"),
NC_("TEMPLATE_LONG_NAMES_ARY", "Styles"),
diff --git a/sfx2/source/appl/opengrf.cxx b/sfx2/source/appl/opengrf.cxx
index 59bf0e13c261..325c50422479 100644
--- a/sfx2/source/appl/opengrf.cxx
+++ b/sfx2/source/appl/opengrf.cxx
@@ -46,7 +46,7 @@ using namespace ::com::sun::star::ui::dialogs;
using namespace ::com::sun::star::uno;
using namespace ::cppu;
-static const char* SvxOpenGrfErr2ResId( ErrCode err )
+static TranslateId SvxOpenGrfErr2ResId( ErrCode err )
{
if (err == ERRCODE_GRFILTER_OPENERROR)
return RID_SVXSTR_GRFILTER_OPENERROR;
diff --git a/sfx2/source/bastyp/sfxresid.cxx b/sfx2/source/bastyp/sfxresid.cxx
index 2c60a31fe6e8..1bc6d68bbee4 100644
--- a/sfx2/source/bastyp/sfxresid.cxx
+++ b/sfx2/source/bastyp/sfxresid.cxx
@@ -18,8 +18,7 @@
*/
#include <sfx2/sfxresid.hxx>
-#include <unotools/resmgr.hxx>
-OUString SfxResId(std::string_view aId) { return Translate::get(aId, Translate::Create("sfx")); }
+OUString SfxResId(TranslateId aId) { return Translate::get(aId, Translate::Create("sfx")); }
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sfx2/source/control/msgpool.cxx b/sfx2/source/control/msgpool.cxx
index be4ebdaa67f9..f7a94203e6b7 100644
--- a/sfx2/source/control/msgpool.cxx
+++ b/sfx2/source/control/msgpool.cxx
@@ -51,7 +51,7 @@ SfxSlotPool::~SfxSlotPool()
namespace
{
- const char* getGidResId(SfxGroupId nId)
+ TranslateId getGidResId(SfxGroupId nId)
{
if (nId == SfxGroupId::Intern)
return STR_GID_INTERN;
@@ -105,7 +105,7 @@ namespace
return STR_GID_DRAWING;
else if (nId == SfxGroupId::Controls)
return STR_GID_CONTROLS;
- return nullptr;
+ return {};
}
}
@@ -193,7 +193,7 @@ OUString SfxSlotPool::SeekGroup( sal_uInt16 nNo )
}
}
- const char* pResId = getGidResId(_vGroups[_nCurGroup]);
+ TranslateId pResId = getGidResId(_vGroups[_nCurGroup]);
if (!pResId)
{
OSL_FAIL( "GroupId-Name not defined in SFX!" );
diff --git a/sfx2/source/devtools/DevToolsStrings.hrc b/sfx2/source/devtools/DevToolsStrings.hrc
index 764ae78712a0..4c3f3e9ceb33 100644
--- a/sfx2/source/devtools/DevToolsStrings.hrc
+++ b/sfx2/source/devtools/DevToolsStrings.hrc
@@ -9,7 +9,8 @@
*/
#pragma once
-#define NC_(Context, String) reinterpret_cast<char const *>(Context "\004" u8##String)
+
+#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
#define STR_TEXT_PORTION NC_("STR_TEXT_PORTION", "Text Portion %1")
#define STR_PARAGRAPH NC_("STR_PARAGRAPH", "Paragraph %1")
diff --git a/sfx2/source/dialog/styfitem.cxx b/sfx2/source/dialog/styfitem.cxx
index 5ae3017260eb..489c4d2df5e5 100644
--- a/sfx2/source/dialog/styfitem.cxx
+++ b/sfx2/source/dialog/styfitem.cxx
@@ -22,12 +22,12 @@
SfxStyleFamilyItem::SfxStyleFamilyItem(
SfxStyleFamily nFamily_, const OUString& rName, const OUString& rImage,
- const std::pair<const char*, SfxStyleSearchBits>* pStringArray, const std::locale& rResLocale)
+ const std::pair<TranslateId, SfxStyleSearchBits>* pStringArray, const std::locale& rResLocale)
: nFamily(nFamily_)
, aText(rName)
, aImage(rImage)
{
- for (const std::pair<const char*, SfxStyleSearchBits>* pItem = pStringArray; pItem->first;
+ for (const std::pair<TranslateId, SfxStyleSearchBits>* pItem = pStringArray; pItem->first;
++pItem)
aFilterList.emplace_back(Translate::get(pItem->first, rResLocale), pItem->second);
}
diff --git a/sfx2/source/doc/doctempl.cxx b/sfx2/source/doc/doctempl.cxx
index b4de76f63a38..bc2a2b34570c 100644
--- a/sfx2/source/doc/doctempl.cxx
+++ b/sfx2/source/doc/doctempl.cxx
@@ -494,7 +494,7 @@ OUString SfxDocumentTemplates::ConvertResourceString(const OUString& rString)
u"" STR_TEMPLATE_NAME30_DEF
};
- const char* STR_TEMPLATE_NAME[] =
+ TranslateId STR_TEMPLATE_NAME[] =
{
STR_TEMPLATE_NAME1,
STR_TEMPLATE_NAME2,
diff --git a/sfx2/source/doc/doctemplates.cxx b/sfx2/source/doc/doctemplates.cxx
index a35ce5269782..f381b8b7bcf1 100644
--- a/sfx2/source/doc/doctemplates.cxx
+++ b/sfx2/source/doc/doctemplates.cxx
@@ -2740,7 +2740,7 @@ OUString DocTemplLocaleHelper::GetStandardGroupString()
std::vector<OUString> DocTemplLocaleHelper::GetBuiltInGroupNames()
{
std::vector<OUString> aGroups;
- for(auto aGroupName : TEMPLATE_LONG_NAMES_ARY)
+ for(auto const & aGroupName : TEMPLATE_LONG_NAMES_ARY)
aGroups.push_back(SfxResId(aGroupName));
return aGroups;
}
diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx
index 75b77ef2cd2e..e7c9001e5b49 100644
--- a/sfx2/source/doc/objstor.cxx
+++ b/sfx2/source/doc/objstor.cxx
@@ -3026,7 +3026,7 @@ HiddenInformation SfxObjectShell::GetHiddenInformationState( HiddenInformation n
sal_Int16 SfxObjectShell::QueryHiddenInformation(HiddenWarningFact eFact, weld::Window* pParent)
{
sal_Int16 nRet = RET_YES;
- const char* pResId = nullptr;
+ TranslateId pResId;
SvtSecurityOptions::EOption eOption = SvtSecurityOptions::EOption();
switch ( eFact )
diff --git a/shell/inc/spsupp/spsuppStrings.hrc b/shell/inc/spsupp/spsuppStrings.hrc
index dc96fbb89459..a6ad2933c5fa 100644
--- a/shell/inc/spsupp/spsuppStrings.hrc
+++ b/shell/inc/spsupp/spsuppStrings.hrc
@@ -10,7 +10,7 @@
#ifndef INCLUDED_SHELL_INC_SPSUPP_STRINGS_HRC
#define INCLUDED_SHELL_INC_SPSUPP_STRINGS_HRC
-#define NC_(Context, String) reinterpret_cast<char const *>(Context "\004" u8##String)
+#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(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?")
diff --git a/shell/source/win32/spsupp/spsuppHelper.cxx b/shell/source/win32/spsupp/spsuppHelper.cxx
index 3f6c9f787961..595128ca7479 100644
--- a/shell/source/win32/spsupp/spsuppHelper.cxx
+++ b/shell/source/win32/spsupp/spsuppHelper.cxx
@@ -43,7 +43,7 @@ const OUString& GetSofficeExe()
return s_sPath;
}
-OUString GetString(const char* pResId)
+OUString GetString(TranslateId pResId)
{
static const std::locale s_pLocale = [] {
// Initialize soffice bootstrap: see getIniFileName_Impl for reference
diff --git a/solenv/bin/install-gdb-printers b/solenv/bin/install-gdb-printers
index aae4020a4532..3eae4d9efe2b 100755
--- a/solenv/bin/install-gdb-printers
+++ b/solenv/bin/install-gdb-printers
@@ -124,7 +124,7 @@ if [[ ${DESTDIR}${pythondir} != ${GDBDIR} ]]; then
fi
if [[ -n "${MERGELIBS}" ]]; then
- make_autoload merged program libmergedlo."$DYLIB" merge svl tl basegfx vcl
+ make_autoload merged program libmergedlo."$DYLIB" merge svl tl basegfx vcl utl
make_autoload cppu program libuno_cppu."$DYLIB".3
make_autoload sal program libuno_sal."$DYLIB".3
make_autoload sw program libswlo."$DYLIB"
@@ -135,6 +135,7 @@ else
make_autoload svl program libsvllo."$DYLIB"
make_autoload sw program libswlo."$DYLIB"
make_autoload tl program libtllo."$DYLIB"
+ make_autoload utl program libutllo."$DYLIB"
make_autoload vcl program libvcllo."$DYLIB"
fi
make_autoload writerfilter program libwriterfilterlo."$DYLIB"
diff --git a/solenv/gdb/libreoffice/utl.py b/solenv/gdb/libreoffice/utl.py
new file mode 100644
index 000000000000..0e6de6ff94ed
--- /dev/null
+++ b/solenv/gdb/libreoffice/utl.py
@@ -0,0 +1,39 @@
+# -*- tab-width: 4; indent-tabs-mode: nil; py-indent-offset: 4 -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+import gdb
+
+from libreoffice.util import printing
+
+class TranslateIdPrinter(object):
+ '''Prints a TranslateId.'''
+
+ def __init__(self, typename, value):
+ self.typename = typename
+ self.value = value
+
+ def to_string(self):
+ return self.value['mpContext'].format_string(format='s') + " " + self.value['mpId'].format_string(format='s')
+
+printer = None
+
+def build_pretty_printers():
+ global printer
+
+ printer = printing.Printer('libreoffice/utl')
+
+ # various types
+ printer.add('TranslateId', TranslateIdPrinter)
+
+def register_pretty_printers(obj):
+ printing.register_pretty_printer(printer, obj)
+
+build_pretty_printers()
+
+# vim:set shiftwidth=4 softtabstop=4 expandtab:
diff --git a/starmath/inc/ElementsDockingWindow.hxx b/starmath/inc/ElementsDockingWindow.hxx
index 249af40b1461..9f8849da4b82 100644
--- a/starmath/inc/ElementsDockingWindow.hxx
+++ b/starmath/inc/ElementsDockingWindow.hxx
@@ -22,6 +22,7 @@
#include <sfx2/dockwin.hxx>
#include <vcl/customweld.hxx>
#include <vcl/weld.hxx>
+#include <unotools/resmgr.hxx>
#include "parse.hxx"
#include "AccessibleSmElementsControl.hxx"
@@ -56,7 +57,7 @@ public:
bool isSeparator() const override { return true; }
};
-typedef std::pair<const char*, const char*> SmElementDescr;
+typedef std::pair<const char*, TranslateId> SmElementDescr;
class SmElementsControl : public weld::CustomWidgetController
{
@@ -74,7 +75,7 @@ class SmElementsControl : public weld::CustomWidgetController
static const SmElementDescr m_a5FormatsList[];
static const SmElementDescr m_a5OthersList[];
static const SmElementDescr m_a5ExamplesList[];
- static const std::tuple<const char*, const SmElementDescr*, size_t> m_a5Categories[];
+ static const std::tuple<TranslateId, const SmElementDescr*, size_t> m_a5Categories[];
static const size_t m_a5CategoriesSize;
// SmParser 6 elements
@@ -96,7 +97,7 @@ class SmElementsControl : public weld::CustomWidgetController
SmDocShell* mpDocShell;
SmFormat maFormat;
- OString msCurrentSetId;
+ TranslateId msCurrentSetId;
sal_uInt16 m_nCurrentElement;
sal_uInt16 m_nCurrentRolloverElement;
sal_uInt16 m_nCurrentOffset;
@@ -133,8 +134,8 @@ public:
static const auto& categories() { return m_a5Categories; }
static size_t categoriesSize() { return m_a5CategoriesSize; }
- const OString& elementSetId() const { return msCurrentSetId; }
- void setElementSetId(const char* pSetId);
+ const TranslateId& elementSetId() const { return msCurrentSetId; }
+ void setElementSetId(TranslateId pSetId);
void setVerticalMode(bool bVertical);
diff --git a/starmath/inc/parsebase.hxx b/starmath/inc/parsebase.hxx
index c8507db1dbbb..d655e7615096 100644
--- a/starmath/inc/parsebase.hxx
+++ b/starmath/inc/parsebase.hxx
@@ -24,6 +24,7 @@
#pragma once
#include <unotools/charclass.hxx>
+#include <unotools/resmgr.hxx>
#include "node.hxx"
@@ -83,7 +84,7 @@ public:
namespace starmathdatabase
{
// Must be in sync with SmParseError list
-extern const char* SmParseErrorDesc[16];
+extern const TranslateId SmParseErrorDesc[16];
OUString getParseErrorDesc(SmParseError err);
}
diff --git a/starmath/inc/smmod.hrc b/starmath/inc/smmod.hrc
index d581961ce2b4..69c7affb7acd 100644
--- a/starmath/inc/smmod.hrc
+++ b/starmath/inc/smmod.hrc
@@ -9,15 +9,15 @@
#pragma once
-#define NC_(Context, String) reinterpret_cast<char const *>(Context "\004" u8##String)
+#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
-const char* RID_UI_SYMBOLSET_NAMES[] =
+const TranslateId RID_UI_SYMBOLSET_NAMES[] =
{
NC_("RID_UI_SYMBOLSET_NAMES", "Greek"),
NC_("RID_UI_SYMBOLSET_NAMES", "Special")
};
-const char* RID_UI_SYMBOL_NAMES[] =
+const TranslateId RID_UI_SYMBOL_NAMES[] =
{
NC_("RID_UI_SYMBOL_NAMES", "alpha"),
NC_("RID_UI_SYMBOL_NAMES", "ALPHA"),
diff --git a/starmath/inc/smmod.hxx b/starmath/inc/smmod.hxx
index ca1fbb7c93e2..b968f9092124 100644
--- a/starmath/inc/smmod.hxx
+++ b/starmath/inc/smmod.hxx
@@ -46,7 +46,7 @@ class SvtSysLocale;
class VirtualDevice;
-OUString SmResId(std::string_view aId);
+OUString SmResId(TranslateId aId);
class SmLocalizedSymbolData
{
diff --git a/starmath/inc/strings.hrc b/starmath/inc/strings.hrc
index 85451b612aa3..963b182c211c 100644
--- a/starmath/inc/strings.hrc
+++ b/starmath/inc/strings.hrc
@@ -26,7 +26,7 @@
#pragma once
-#define NC_(Context, String) reinterpret_cast<char const *>(Context "\004" u8##String)
+#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
// clang-format off
#define RID_PLUSX_HELP NC_("RID_PLUSX_HELP", "+ Sign" )
diff --git a/starmath/source/AccessibleSmElementsControl.cxx b/starmath/source/AccessibleSmElementsControl.cxx
index 922c8097fd6a..1017d8468686 100644
--- a/starmath/source/AccessibleSmElementsControl.cxx
+++ b/starmath/source/AccessibleSmElementsControl.cxx
@@ -235,8 +235,8 @@ OUString AccessibleSmElementsControl::getAccessibleName()
{
SolarMutexGuard aGuard;
OUString aName;
- if (m_pControl)
- aName = SmResId(m_pControl->elementSetId().getStr());
+ if (m_pControl && m_pControl->elementSetId())
+ aName = SmResId(m_pControl->elementSetId());
return aName;
}
diff --git a/starmath/source/ElementsDockingWindow.cxx b/starmath/source/ElementsDockingWindow.cxx
index cd03a7f7d338..278b2287b40b 100644
--- a/starmath/source/ElementsDockingWindow.cxx
+++ b/starmath/source/ElementsDockingWindow.cxx
@@ -56,7 +56,7 @@ const SmElementDescr SmElementsControl::m_a5UnaryBinaryOperatorsList[] =
{
{RID_PLUSX, RID_PLUSX_HELP}, {RID_MINUSX, RID_MINUSX_HELP},
{RID_PLUSMINUSX, RID_PLUSMINUSX_HELP}, {RID_MINUSPLUSX, RID_MINUSPLUSX_HELP},
- {nullptr, nullptr},
+ {nullptr, {}},
{RID_XPLUSY, RID_XPLUSY_HELP}, {RID_XMINUSY, RID_XMINUSY_HELP},
{RID_XCDOTY, RID_XCDOTY_HELP}, {RID_XTIMESY, RID_XTIMESY_HELP},
{RID_XSYMTIMESY, RID_XSYMTIMESY_HELP}, {RID_XOVERY, RID_XOVERY_HELP},
@@ -66,7 +66,7 @@ const SmElementDescr SmElementsControl::m_a5UnaryBinaryOperatorsList[] =
{RID_XODOTY, RID_XODOTY_HELP}, {RID_XOTIMESY, RID_XOTIMESY_HELP},
{RID_XODIVIDEY, RID_XODIVIDEY_HELP}, {RID_XCIRCY, RID_XCIRCY_HELP},
{RID_XWIDESLASHY, RID_XWIDESLASHY_HELP}, {RID_XWIDEBSLASHY, RID_XWIDEBSLASHY_HELP},
- {nullptr, nullptr},
+ {nullptr, {}},
{RID_NEGX, RID_NEGX_HELP}, {RID_XANDY, RID_XANDY_HELP}, {RID_XORY, RID_XORY_HELP}
};
@@ -76,15 +76,15 @@ const SmElementDescr SmElementsControl::m_a5RelationsList[] =
{RID_XLEY, RID_XLEY_HELP}, {RID_XLESLANTY, RID_XLESLANTY_HELP}, {RID_XGTY, RID_XGTY_HELP},
{RID_XGEY, RID_XGEY_HELP}, {RID_XGESLANTY, RID_XGESLANTY_HELP},
{RID_XLLY, RID_XLLY_HELP}, {RID_XGGY, RID_XGGY_HELP},
- {nullptr, nullptr},
+ {nullptr, {}},
{RID_XAPPROXY, RID_XAPPROXY_HELP}, {RID_XSIMY, RID_XSIMY_HELP}, {RID_XSIMEQY, RID_XSIMEQY_HELP},
{RID_XEQUIVY, RID_XEQUIVY_HELP}, {RID_XPROPY, RID_XPROPY_HELP}, {RID_XPARALLELY, RID_XPARALLELY_HELP},
{RID_XORTHOY, RID_XORTHOY_HELP}, {RID_XDIVIDESY, RID_XDIVIDESY_HELP}, {RID_XNDIVIDESY, RID_XNDIVIDESY_HELP},
{RID_XTOWARDY, RID_XTOWARDY_HELP}, {RID_XTRANSLY, RID_XTRANSLY_HELP}, {RID_XTRANSRY, RID_XTRANSRY_HELP},
{RID_XDEFY, RID_XDEFY_HELP},
- {nullptr, nullptr},
+ {nullptr, {}},
{RID_DLARROW, RID_DLARROW_HELP}, {RID_DLRARROW, RID_DLRARROW_HELP}, {RID_DRARROW, RID_DRARROW_HELP},
- {nullptr, nullptr},
+ {nullptr, {}},
{RID_XPRECEDESY, RID_XPRECEDESY_HELP}, {RID_XSUCCEEDSY, RID_XSUCCEEDSY_HELP},
{RID_XPRECEDESEQUALY, RID_XPRECEDESEQUALY_HELP}, {RID_XSUCCEEDSEQUALY, RID_XSUCCEEDSEQUALY_HELP},
{RID_XPRECEDESEQUIVY, RID_XPRECEDESEQUIVY_HELP}, {RID_XSUCCEEDSEQUIVY, RID_XSUCCEEDSEQUIVY_HELP},
@@ -94,14 +94,14 @@ const SmElementDescr SmElementsControl::m_a5RelationsList[] =
const SmElementDescr SmElementsControl::m_a5SetOperationsList[] =
{
{RID_XINY, RID_XINY_HELP}, {RID_XNOTINY, RID_XNOTINY_HELP}, {RID_XOWNSY, RID_XOWNSY_HELP},
- {nullptr, nullptr},
+ {nullptr, {}},
{RID_XINTERSECTIONY, RID_XINTERSECTIONY_HELP}, {RID_XUNIONY, RID_XUNIONY_HELP},
{RID_XSETMINUSY, RID_XSETMINUSY_HELP}, {RID_XSETQUOTIENTY, RID_XSETQUOTIENTY_HELP},
{RID_XSUBSETY, RID_XSUBSETY_HELP}, {RID_XSUBSETEQY, RID_XSUBSETEQY_HELP},
{RID_XSUPSETY, RID_XSUPSETY_HELP}, {RID_XSUPSETEQY, RID_XSUPSETEQY_HELP},
{RID_XNSUBSETY, RID_XNSUBSETY_HELP}, {RID_XNSUBSETEQY, RID_XNSUBSETEQY_HELP},
{RID_XNSUPSETY, RID_XNSUPSETY_HELP}, {RID_XNSUPSETEQY, RID_XNSUPSETEQY_HELP},
- {nullptr, nullptr},
+ {nullptr, {}},
{RID_EMPTYSET, RID_EMPTYSET_HELP}, {RID_ALEPH, RID_ALEPH_HELP}, {RID_SETN, RID_SETN_HELP},
{RID_SETZ, RID_SETZ_HELP}, {RID_SETQ, RID_SETQ_HELP}, {RID_SETR, RID_SETR_HELP}, {RID_SETC, RID_SETC_HELP}
};
@@ -111,15 +111,15 @@ const SmElementDescr SmElementsControl::m_a5FunctionsList[] =
{RID_ABSX, RID_ABSX_HELP}, {RID_FACTX, RID_FACTX_HELP}, {RID_SQRTX, RID_SQRTX_HELP},
{RID_NROOTXY, RID_NROOTXY_HELP}, {RID_RSUPX, RID_RSUPX_HELP}, {RID_EX, RID_EX_HELP},
{RID_LNX, RID_LNX_HELP}, {RID_EXPX, RID_EXPX_HELP}, {RID_LOGX, RID_LOGX_HELP},
- {nullptr, nullptr},
+ {nullptr, {}},
{RID_SINX, RID_SINX_HELP}, {RID_COSX, RID_COSX_HELP}, {RID_TANX, RID_TANX_HELP}, {RID_COTX, RID_COTX_HELP},
{RID_SINHX, RID_SINHX_HELP}, {RID_COSHX, RID_COSHX_HELP}, {RID_TANHX, RID_TANHX_HELP},
{RID_COTHX, RID_COTHX_HELP},
- {nullptr, nullptr},
+ {nullptr, {}},
{RID_ARCSINX, RID_ARCSINX_HELP}, {RID_ARCCOSX, RID_ARCCOSX_HELP}, {RID_ARCTANX, RID_ARCTANX_HELP},
{RID_ARCCOTX, RID_ARCCOTX_HELP}, {RID_ARSINHX, RID_ARSINHX_HELP}, {RID_ARCOSHX, RID_ARCOSHX_HELP},
{RID_ARTANHX, RID_ARTANHX_HELP}, {RID_ARCOTHX, RID_ARCOTHX_HELP},
- {nullptr, nullptr},
+ {nullptr, {}},
{RID_FUNCX, RID_FUNCX_HELP}
};
@@ -127,40 +127,40 @@ const SmElementDescr SmElementsControl::m_a5OperatorsList[] =
{
{RID_LIMX, RID_LIMX_HELP}, {RID_LIM_FROMX, RID_LIM_FROMX_HELP},
{RID_LIM_TOX, RID_LIM_TOX_HELP}, {RID_LIM_FROMTOX, RID_LIM_FROMTOX_HELP},
- {nullptr, nullptr},
+ {nullptr, {}},
{RID_LIMINFX, RID_LIMINFX_HELP}, {RID_LIMINF_FROMX, RID_LIMINF_FROMX_HELP},
{RID_LIMINF_TOX, RID_LIMINF_TOX_HELP}, {RID_LIMINF_FROMTOX, RID_LIMINF_FROMTOX_HELP},
- {nullptr, nullptr},
+ {nullptr, {}},
{RID_LIMSUPX, RID_LIMSUPX_HELP}, {RID_LIMSUP_FROMX, RID_LIMSUP_FROMX_HELP},
{RID_LIMSUP_TOX, RID_LIMSUP_TOX_HELP}, {RID_LIMSUP_FROMTOX, RID_LIMSUP_FROMTOX_HELP},
- {nullptr, nullptr},
+ {nullptr, {}},
{RID_SUMX, RID_SUMX_HELP}, {RID_SUM_FROMX, RID_SUM_FROMX_HELP},
{RID_SUM_TOX, RID_SUM_TOX_HELP}, {RID_SUM_FROMTOX, RID_SUM_FROMTOX_HELP},
- {nullptr, nullptr},
+ {nullptr, {}},
{RID_PRODX, RID_PRODX_HELP}, {RID_PROD_FROMX, RID_PROD_FROMX_HELP},
{RID_PROD_TOX, RID_PROD_TOX_HELP}, {RID_PROD_FROMTOX, RID_PROD_FROMTOX_HELP},
- {nullptr, nullptr},
+ {nullptr, {}},
{RID_COPRODX, RID_COPRODX_HELP}, {RID_COPROD_FROMX, RID_COPROD_FROMX_HELP},
{RID_COPROD_TOX, RID_COPROD_TOX_HELP}, {RID_COPROD_FROMTOX, RID_COPROD_FROMTOX_HELP},
- {nullptr, nullptr},
+ {nullptr, {}},
{RID_INTX, RID_INTX_HELP}, {RID_INT_FROMX, RID_INT_FROMX_HELP},
{RID_INT_TOX, RID_INT_TOX_HELP}, {RID_INT_FROMTOX, RID_INT_FROMTOX_HELP},
- {nullptr, nullptr},
+ {nullptr, {}},
{RID_IINTX, RID_IINTX_HELP}, {RID_IINT_FROMX, RID_IINT_FROMX_HELP},
{RID_IINT_TOX, RID_IINT_TOX_HELP}, {RID_IINT_FROMTOX, RID_IINT_FROMTOX_HELP},
- {nullptr, nullptr},
+ {nullptr, {}},
{RID_IIINTX, RID_IIINTX_HELP}, {RID_IIINT_FROMX, RID_IIINT_FROMX_HELP},
{RID_IIINT_TOX, RID_IIINT_TOX_HELP}, {RID_IIINT_FROMTOX, RID_IIINT_FROMTOX_HELP},
- {nullptr, nullptr},
+ {nullptr, {}},
{RID_LINTX, RID_LINTX_HELP}, {RID_LINT_FROMX, RID_LINT_FROMX_HELP},
{RID_LINT_TOX, RID_LINT_TOX_HELP}, {RID_LINT_FROMTOX, RID_LINT_FROMTOX_HELP},
- {nullptr, nullptr},
+ {nullptr, {}},
{RID_LLINTX, RID_LLINTX_HELP}, {RID_LLINT_FROMX, RID_LLINT_FROMX_HELP},
{RID_LLINT_TOX, RID_LLINT_TOX_HELP}, {RID_LLINT_FROMTOX, RID_LLINT_FROMTOX_HELP},
- {nullptr, nullptr},
+ {nullptr, {}},
{RID_LLLINTX, RID_LLLINTX_HELP}, {RID_LLLINT_FROMX, RID_LLLINT_FROMX_HELP},
{RID_LLLINT_TOX, RID_LLLINT_TOX_HELP}, {RID_LLLINT_FROMTOX, RID_LLLINT_FROMTOX_HELP},
- {nullptr, nullptr},
+ {nullptr, {}},
{RID_OPERX, RID_OPERX_HELP}, {RID_OPER_FROMX, RID_OPER_FROMX_HELP},
{RID_OPER_TOX, RID_OPER_TOX_HELP}, {RID_OPER_FROMTOX, RID_OPER_FROMTOX_HELP}
};
@@ -172,14 +172,14 @@ const SmElementDescr SmElementsControl::m_a5AttributesList[] =
{RID_DDDOTX, RID_DDDOTX_HELP}, {RID_BARX, RID_BARX_HELP}, {RID_VECX, RID_VECX_HELP},
{RID_HARPOONX, RID_HARPOONX_HELP},
{RID_TILDEX, RID_TILDEX_HELP}, {RID_HATX, RID_HATX_HELP}, {RID_CHECKX, RID_CHECKX_HELP},
- {nullptr, nullptr},
+ {nullptr, {}},
{RID_WIDEVECX, RID_WIDEVECX_HELP}, {RID_WIDEHARPOONX, RID_WIDEHARPOONX_HELP},
{RID_WIDETILDEX, RID_WIDETILDEX_HELP}, {RID_WIDEHATX, RID_WIDEHATX_HELP},
{RID_OVERLINEX, RID_OVERLINEX_HELP}, {RID_UNDERLINEX, RID_UNDERLINEX_HELP}, {RID_OVERSTRIKEX, RID_OVERSTRIKEX_HELP},
- {nullptr, nullptr},
+ {nullptr, {}},
{RID_PHANTOMX, RID_PHANTOMX_HELP}, {RID_BOLDX, RID_BOLDX_HELP}, {RID_ITALX, RID_ITALX_HELP},
{RID_SIZEXY, RID_SIZEXY_HELP}, {RID_FONTXY, RID_FONTXY_HELP},
- {nullptr, nullptr},
+ {nullptr, {}},
{RID_COLORX_BLACK, RID_COLORX_BLACK_HELP}, {RID_COLORX_BLUE, RID_COLORX_BLUE_HELP},
{RID_COLORX_GREEN, RID_COLORX_GREEN_HELP}, {RID_COLORX_RED, RID_COLORX_RED_HELP},
{RID_COLORX_AQUA, RID_COLORX_AQUA_HELP}, {RID_COLORX_FUCHSIA, RID_COLORX_FUCHSIA_HELP},
@@ -189,7 +189,7 @@ const SmElementDescr SmElementsControl::m_a5AttributesList[] =
{RID_COLORX_PURPLE, RID_COLORX_PURPLE_HELP}, {RID_COLORX_SILVER, RID_COLORX_SILVER_HELP},
{RID_COLORX_TEAL, RID_COLORX_TEAL_HELP},{RID_COLORX_RGB, RID_COLORX_RGB_HELP},
{RID_COLORX_HEX, RID_COLORX_HEX_HELP},
- {nullptr, nullptr},
+ {nullptr, {}},
{RID_COLORX_CORAL, RID_COLORX_CORAL_HELP}, {RID_COLORX_MIDNIGHT, RID_COLORX_MIDNIGHT_HELP},
{RID_COLORX_CRIMSON, RID_COLORX_CRIMSON_HELP}, {RID_COLORX_VIOLET, RID_COLORX_VIOLET_HELP},
{RID_COLORX_ORANGE, RID_COLORX_ORANGE_HELP}, {RID_COLORX_ORANGERED, RID_COLORX_ORANGERED_HELP},
@@ -201,21 +201,21 @@ const SmElementDescr SmElementsControl::m_a5AttributesList[] =
const SmElementDescr SmElementsControl::m_a5BracketsList[] =
{
{RID_LRGROUPX, RID_LRGROUPX_HELP},
- {nullptr, nullptr},
+ {nullptr, {}},
{RID_LRPARENTX, RID_LRPARENTX_HELP}, {RID_LRBRACKETX, RID_LRBRACKETX_HELP},
{RID_LRDBRACKETX, RID_LRDBRACKETX_HELP}, {RID_LRBRACEX, RID_LRBRACEX_HELP},
{RID_LRANGLEX, RID_LRANGLEX_HELP}, {RID_LMRANGLEXY, RID_LMRANGLEXY_HELP},
{RID_LRCEILX, RID_LRCEILX_HELP}, {RID_LRFLOORX, RID_LRFLOORX_HELP},
{RID_LRLINEX, RID_LRLINEX_HELP}, {RID_LRDLINEX, RID_LRDLINEX_HELP},
- {nullptr, nullptr},
+ {nullptr, {}},
{RID_SLRPARENTX, RID_SLRPARENTX_HELP}, {RID_SLRBRACKETX, RID_SLRBRACKETX_HELP},
{RID_SLRDBRACKETX, RID_SLRDBRACKETX_HELP}, {RID_SLRBRACEX, RID_SLRBRACEX_HELP},
{RID_SLRANGLEX, RID_SLRANGLEX_HELP}, {RID_SLMRANGLEXY, RID_SLMRANGLEXY_HELP},
{RID_SLRCEILX, RID_SLRCEILX_HELP}, {RID_SLRFLOORX, RID_SLRFLOORX_HELP},
{RID_SLRLINEX, RID_SLRLINEX_HELP}, {RID_SLRDLINEX, RID_SLRDLINEX_HELP},
- {nullptr, nullptr},
+ {nullptr, {}},
{RID_XOVERBRACEY, RID_XOVERBRACEY_HELP}, {RID_XUNDERBRACEY, RID_XUNDERBRACEY_HELP},
- {nullptr, nullptr},
+ {nullptr, {}},
{RID_EVALX, RID_EVALUATEX_HELP}, {RID_EVAL_FROMX, RID_EVALUATE_FROMX_HELP},
{RID_EVAL_TOX, RID_EVALUATE_TOX_HELP}, {RID_EVAL_FROMTOX, RID_EVALUATE_FROMTOX_HELP},
};
@@ -224,11 +224,11 @@ const SmElementDescr SmElementsControl::m_a5FormatsList[] =
{
{RID_RSUPX, RID_RSUPX_HELP}, {RID_RSUBX, RID_RSUBX_HELP}, {RID_LSUPX, RID_LSUPX_HELP},
{RID_LSUBX, RID_LSUBX_HELP}, {RID_CSUPX, RID_CSUPX_HELP}, {RID_CSUBX, RID_CSUBX_HELP},
- {nullptr, nullptr},
+ {nullptr, {}},
{RID_NEWLINE, RID_NEWLINE_HELP}, {RID_SBLANK, RID_SBLANK_HELP}, {RID_BLANK, RID_BLANK_HELP},
{RID_NOSPACE, RID_NOSPACE_HELP},
{RID_ALIGNLX, RID_ALIGNLX_HELP}, {RID_ALIGNCX, RID_ALIGNCX_HELP}, {RID_ALIGNRX, RID_ALIGNRX_HELP},
- {nullptr, nullptr},
+ {nullptr, {}},
{RID_BINOMXY, RID_BINOMXY_HELP}, {RID_STACK, RID_STACK_HELP},
{RID_MATRIX, RID_MATRIX_HELP},
};
@@ -240,10 +240,10 @@ const SmElementDescr SmElementsControl::m_a5OthersList[] =
{RID_HBAR, RID_HBAR_HELP}, {RID_LAMBDABAR, RID_LAMBDABAR_HELP}, {RID_RE, RID_RE_HELP},
{RID_IM, RID_IM_HELP}, {RID_WP, RID_WP_HELP}, {RID_LAPLACE, RID_LAPLACE_HELP},
{RID_FOURIER, RID_FOURIER_HELP}, {RID_BACKEPSILON, RID_BACKEPSILON_HELP},
- {nullptr, nullptr},
+ {nullptr, {}},
{RID_LEFTARROW, RID_LEFTARROW_HELP}, {RID_RIGHTARROW, RID_RIGHTARROW_HELP}, {RID_UPARROW, RID_UPARROW_HELP},
{RID_DOWNARROW, RID_DOWNARROW_HELP},
- {nullptr, nullptr},
+ {nullptr, {}},
{RID_DOTSLOW, RID_DOTSLOW_HELP}, {RID_DOTSAXIS, RID_DOTSAXIS_HELP}, {RID_DOTSVERT, RID_DOTSVERT_HELP},
{RID_DOTSUP, RID_DOTSUP_HELP}, {RID_DOTSDOWN, RID_DOTSDOWN_HELP}
};
@@ -265,7 +265,7 @@ const SmElementDescr SmElementsControl::m_a5ExamplesList[] =
};
#define AS_PAIR(a) a, SAL_N_ELEMENTS(a)
-const std::tuple<const char*, const SmElementDescr*, size_t> SmElementsControl::m_a5Categories[] =
+const std::tuple<TranslateId, const SmElementDescr*, size_t> SmElementsControl::m_a5Categories[] =
{
{RID_CATEGORY_UNARY_BINARY_OPERATORS, AS_PAIR(m_a5UnaryBinaryOperatorsList)},
{RID_CATEGORY_RELATIONS, AS_PAIR(m_a5RelationsList)},
@@ -875,7 +875,7 @@ void SmElementsControl::addElement(const OUString& aElementVisual, const OUStrin
rDevice.Pop();
}
-void SmElementsControl::setElementSetId(const char* pSetId)
+void SmElementsControl::setElementSetId(TranslateId pSetId)
{
if (msCurrentSetId == pSetId)
return;
@@ -889,7 +889,7 @@ void SmElementsControl::addElements(const SmElementDescr aElementsArray[], sal_u
for (sal_uInt16 i = 0; i < aElementsArraySize ; i++)
{
const char* pElement = aElementsArray[i].first;
- const char* pElementHelp = aElementsArray[i].second;
+ TranslateId pElementHelp = aElementsArray[i].second;
if (!pElement) {
maElementList.push_back(std::make_unique<SmElementSeparator>());
} else {
@@ -1270,7 +1270,7 @@ IMPL_LINK( SmElementsDockingWindow, ElementSelectedHandle, weld::ComboBox&, rLis
{
for (size_t i = 0; i < SmElementsControl::categoriesSize(); ++i)
{
- const char *pCurrentCategory = std::get<0>(SmElementsControl::categories()[i]);
+ TranslateId pCurrentCategory = std::get<0>(SmElementsControl::categories()[i]);
OUString aCurrentCategoryString = SmResId(pCurrentCategory);
if (aCurrentCategoryString == rList.get_active_text())
{
diff --git a/starmath/source/parsebase.cxx b/starmath/source/parsebase.cxx
index 2e6d92694db5..31c1e40c9c5a 100644
--- a/starmath/source/parsebase.cxx
+++ b/starmath/source/parsebase.cxx
@@ -21,7 +21,7 @@
#include <strings.hrc>
#include <smmod.hxx>
-const char* starmathdatabase::SmParseErrorDesc[] = {
+const TranslateId starmathdatabase::SmParseErrorDesc[] = {
// clang-format off
RID_ERR_NONE,
RID_ERR_UNEXPECTEDCHARACTER,
diff --git a/starmath/source/smmod.cxx b/starmath/source/smmod.cxx
index 776a25657088..2365e877e992 100644
--- a/starmath/source/smmod.cxx
+++ b/starmath/source/smmod.cxx
@@ -23,7 +23,6 @@
#include <svl/whiter.hxx>
#include <sfx2/viewsh.hxx>
#include <svx/svxids.hrc>
-#include <unotools/resmgr.hxx>
#include <vcl/virdev.hxx>
#include <unotools/syslocale.hxx>
#include <smmod.hxx>
@@ -39,7 +38,7 @@
#define ShellClass_SmModule
#include <smslots.hxx>
-OUString SmResId(std::string_view aId)
+OUString SmResId(TranslateId aId)
{
return Translate::get(aId, SM_MOD()->GetResLocale());
}
@@ -50,7 +49,7 @@ OUString SmLocalizedSymbolData::GetUiSymbolName( const OUString &rExportName )
for (size_t i = 0; i < SAL_N_ELEMENTS(RID_UI_SYMBOL_NAMES); ++i)
{
- if (rExportName.equalsAscii(strchr(RID_UI_SYMBOL_NAMES[i], '\004') + 1))
+ if (rExportName.equalsAscii(RID_UI_SYMBOL_NAMES[i].mpId))
{
aRes = SmResId(RID_UI_SYMBOL_NAMES[i]);
break;
@@ -68,7 +67,7 @@ OUString SmLocalizedSymbolData::GetExportSymbolName( std::u16string_view rUiName
{
if (rUiName == SmResId(RID_UI_SYMBOL_NAMES[i]))
{
- const char *pKey = strchr(RID_UI_SYMBOL_NAMES[i], '\004') + 1;
+ const char *pKey = RID_UI_SYMBOL_NAMES[i].mpId;
aRes = OUString(pKey, strlen(pKey), RTL_TEXTENCODING_UTF8);
break;
}
@@ -83,7 +82,7 @@ OUString SmLocalizedSymbolData::GetUiSymbolSetName( const OUString &rExportName
for (size_t i = 0; i < SAL_N_ELEMENTS(RID_UI_SYMBOLSET_NAMES); ++i)
{
- if (rExportName.equalsAscii(strchr(RID_UI_SYMBOLSET_NAMES[i], '\004') + 1))
+ if (rExportName.equalsAscii(RID_UI_SYMBOLSET_NAMES[i].mpId))
{
aRes = SmResId(RID_UI_SYMBOLSET_NAMES[i]);
break;
@@ -101,7 +100,7 @@ OUString SmLocalizedSymbolData::GetExportSymbolSetName( std::u16string_view rUiN
{
if (rUiName == SmResId(RID_UI_SYMBOLSET_NAMES[i]))
{
- const char *pKey = strchr(RID_UI_SYMBOLSET_NAMES[i], '\004') + 1;
+ const char *pKey = RID_UI_SYMBOLSET_NAMES[i].mpId;
aRes = OUString(pKey, strlen(pKey), RTL_TEXTENCODING_UTF8);
break;
}
diff --git a/starmath/source/uiobject.cxx b/starmath/source/uiobject.cxx
index 5d7519816e52..e39de3cc6bbe 100644
--- a/starmath/source/uiobject.cxx
+++ b/starmath/source/uiobject.cxx
@@ -65,7 +65,7 @@ StringMap ElementSelectorUIObject::get_state()
if (pElement)
aMap["CurrentEntry"] = pElement->getText();
- aMap["CurrentSelection"] = OUString::fromUtf8(mpElementsSelector->msCurrentSetId);
+ aMap["CurrentSelection"] = OUString::fromUtf8(mpElementsSelector->msCurrentSetId.mpId);
return aMap;
}
diff --git a/svl/source/misc/getstringresource.cxx b/svl/source/misc/getstringresource.cxx
index 241600895d10..6b066c24da4a 100644
--- a/svl/source/misc/getstringresource.cxx
+++ b/svl/source/misc/getstringresource.cxx
@@ -23,6 +23,9 @@
#include <svl/svlresid.hxx>
#include <unotools/resmgr.hxx>
-OUString SvlResId(std::string_view id) { return Translate::get(id, Translate::Create("svl")); }
+OUString SvlResId(TranslateId sContextAndId)
+{
+ return Translate::get(sContextAndId, Translate::Create("svl"));
+}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svtools/inc/borderline.hrc b/svtools/inc/borderline.hrc
index 05bb3c78f729..84ab7cc98fda 100644
--- a/svtools/inc/borderline.hrc
+++ b/svtools/inc/borderline.hrc
@@ -10,9 +10,9 @@
#include <editeng/borderline.hxx>
-#define NC_(Context, String) reinterpret_cast<char const *>(Context "\004" u8##String)
+#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
-const std::pair<const char*, SvxBorderLineStyle> RID_SVXSTR_BORDERLINE[] =
+const std::pair<TranslateId, SvxBorderLineStyle> RID_SVXSTR_BORDERLINE[] =
{
{ NC_("RID_SVXSTR_BORDERLINE", "None"), SvxBorderLineStyle::NONE },
{ NC_("RID_SVXSTR_BORDERLINE", "Solid"), SvxBorderLineStyle::SOLID },
diff --git a/svtools/inc/errtxt.hrc b/svtools/inc/errtxt.hrc
index 009badd70b54..a5dce85f3092 100644
--- a/svtools/inc/errtxt.hrc
+++ b/svtools/inc/errtxt.hrc
@@ -22,7 +22,7 @@
#include <svtools/sfxecode.hxx>
#include <svtools/soerr.hxx>
-#define NC_(Context, String) reinterpret_cast<char const *>(Context "\004" u8##String)
+#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
const ErrMsgCode RID_ERRCTX[] =
{
@@ -41,10 +41,10 @@ const ErrMsgCode RID_ERRCTX[] =
{ NC_("RID_ERRCTX", "$(ERR) expanding entry") , ErrCode(ERRCTX_SFX_CREATEOBJSH) },
{ NC_("RID_ERRCTX", "$(ERR) loading BASIC of document $(ARG1)") , ErrCode(ERRCTX_SFX_LOADBASIC) },
{ NC_("RID_ERRCTX", "$(ERR) searching for an address"), ErrCode(ERRCTX_SFX_SEARCHADDRESS) },
- { nullptr, ERRCODE_NONE }
+ { {}, ERRCODE_NONE }
};
-const std::pair<const char*, ErrCodeClass> RID_ERRHDL_CLASS[] =
+const std::pair<TranslateId, ErrCodeClass> RID_ERRHDL_CLASS[] =
{
{ NC_("RID_ERRHDL", "Abort") , ErrCodeClass::Abort },
{ NC_("RID_ERRHDL", "Nonexistent object") , ErrCodeClass::NotExists },
@@ -65,7 +65,7 @@ const std::pair<const char*, ErrCodeClass> RID_ERRHDL_CLASS[] =
{ NC_("RID_ERRHDL", "Inadmissible value or data type") , ErrCodeClass::Sbx },
{ NC_("RID_ERRHDL", "BASIC runtime error") , ErrCodeClass::Runtime },
{ NC_("RID_ERRHDL", "BASIC syntax error") , ErrCodeClass::Compiler },
- { nullptr, ErrCodeClass::NONE }
+ { {}, ErrCodeClass::NONE }
};
const ErrMsgCode RID_ERRHDL[] =
@@ -132,7 +132,7 @@ const ErrMsgCode RID_ERRHDL[] =
{ NC_("RID_ERRHDL", "The password of a shared spreadsheet cannot be set or changed.\nDeactivate sharing mode first."), ERRCODE_SFX_SHARED_NOPASSWORDCHANGE },
{ NC_("RID_ERRHDL", "File format error found at $(ARG1)(row,col)."), ERRCODE_SFX_FORMAT_ROWCOL },
{ NC_("RID_ERRHDL", "The filter for this file format is disabled in configuration. Please contact your systems administrator."), ERRCODE_IO_FILTERDISABLED },
- { nullptr, ERRCODE_NONE }
+ { {}, ERRCODE_NONE }
};
const ErrMsgCode RID_SO_ERROR_HANDLER[] =
@@ -145,13 +145,13 @@ const ErrMsgCode RID_SO_ERROR_HANDLER[] =
ERRCODE_SO_NOVERBS },
{ NC_("RID_ERRHDL", "Object does not support this action."),
ERRCODE_SO_NOTIMPL },
- { nullptr, ERRCODE_NONE }
+ { {}, ERRCODE_NONE }
};
const ErrMsgCode RID_SO_ERRCTX[] =
{
{ NC_("RID_ERRHDL", "$(ERR) activating object") , ErrCode(ERRCTX_SO_DOVERB) },
- { nullptr, ERRCODE_NONE }
+ { {}, ERRCODE_NONE }
};
diff --git a/svtools/inc/langtab.hrc b/svtools/inc/langtab.hrc
index e66375e115ac..d44b38294f5a 100644
--- a/svtools/inc/langtab.hrc
+++ b/svtools/inc/langtab.hrc
@@ -21,9 +21,9 @@
#include <i18nlangtag/lang.h>
-#define NC_(Context, String) reinterpret_cast<char const *>(Context "\004" u8##String)
+#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
-const std::pair<const char*, LanguageType> STR_ARR_SVT_LANGUAGE_TABLE[] =
+const std::pair<TranslateId, LanguageType> STR_ARR_SVT_LANGUAGE_TABLE[] =
{
{ NC_("STR_ARR_SVT_LANGUAGE_TABLE", "[None]") , LANGUAGE_NONE },
{ NC_("STR_ARR_SVT_LANGUAGE_TABLE", "Unknown") , LANGUAGE_DONTKNOW },
diff --git a/svtools/source/dialogs/insdlg.cxx b/svtools/source/dialogs/insdlg.cxx
index 91a9822c3248..adaa1b905275 100644
--- a/svtools/source/dialogs/insdlg.cxx
+++ b/svtools/source/dialogs/insdlg.cxx
@@ -200,7 +200,7 @@ OUString SvPasteObjectHelper::GetSotFormatUIName( SotClipboardFormatId nId )
struct SotResourcePair
{
SotClipboardFormatId mnSotId;
- const char* mpResId;
+ TranslateId mpResId;
};
static const SotResourcePair aSotResourcePairs[] =
@@ -276,7 +276,7 @@ OUString SvPasteObjectHelper::GetSotFormatUIName( SotClipboardFormatId nId )
{ SotClipboardFormatId::PNG, STR_FORMAT_ID_PNG_BITMAP },
};
- const char* pResId = nullptr;
+ TranslateId pResId;
sal_uInt32 const nCount = SAL_N_ELEMENTS( aSotResourcePairs );
for (sal_uInt32 i = 0; ( i < nCount ) && !pResId; ++i)
diff --git a/svtools/source/dialogs/prnsetup.cxx b/svtools/source/dialogs/prnsetup.cxx
index 054a7b0f077d..fd7fca5ba098 100644
--- a/svtools/source/dialogs/prnsetup.cxx
+++ b/svtools/source/dialogs/prnsetup.cxx
@@ -134,7 +134,7 @@ static OUString ImplPrnDlgAddString(const OUString& rStr, std::u16string_view rA
}
-static OUString ImplPrnDlgAddResString(const OUString& rStr, const char* pResId)
+static OUString ImplPrnDlgAddResString(const OUString& rStr, TranslateId pResId)
{
return ImplPrnDlgAddString(rStr, SvtResId(pResId));
}
diff --git a/svtools/source/misc/ehdl.cxx b/svtools/source/misc/ehdl.cxx
index 1dcfbc9909d6..dab1544eeffd 100644
--- a/svtools/source/misc/ehdl.cxx
+++ b/svtools/source/misc/ehdl.cxx
@@ -193,7 +193,7 @@ void SfxErrorHandler::GetClassString(ErrCodeClass lClassId, OUString &rStr)
*/
{
- for (const std::pair<const char*, ErrCodeClass>* pItem = RID_ERRHDL_CLASS; pItem->first; ++pItem)
+ for (const std::pair<TranslateId, ErrCodeClass>* pItem = RID_ERRHDL_CLASS; pItem->first; ++pItem)
{
if (pItem->second == lClassId)
{
diff --git a/svtools/source/misc/imagemgr.cxx b/svtools/source/misc/imagemgr.cxx
index ff7fe554d869..58cba39f574f 100644
--- a/svtools/source/misc/imagemgr.cxx
+++ b/svtools/source/misc/imagemgr.cxx
@@ -50,7 +50,7 @@ struct SvtExtensionResIdMapping_Impl
{
const char* _pExt;
bool _bExt;
- const char* pStrId;
+ TranslateId pStrId;
SvImageId _nImgId;
};
@@ -91,7 +91,7 @@ SvtExtensionResIdMapping_Impl const ExtensionMap_Impl[] =
{ "jpg", true, STR_DESCRIPTION_GRAPHIC_DOC, SvImageId::JPG },
{ "lha", true, STR_DESCRIPTION_ARCHIVFILE, SvImageId::NONE },
#ifdef _WIN32
- { "lnk", false, nullptr, SvImageId::NONE },
+ { "lnk", false, {}, SvImageId::NONE },
#endif
{ "log", true, STR_DESCRIPTION_LOGFILE, SvImageId::NONE },
{ "lst", true, STR_DESCRIPTION_LOGFILE, SvImageId::NONE },
@@ -118,20 +118,20 @@ SvtExtensionResIdMapping_Impl const ExtensionMap_Impl[] =
{ "png", true, STR_DESCRIPTION_GRAPHIC_DOC, SvImageId::PNG },
{ "rar", true, STR_DESCRIPTION_ARCHIVFILE, SvImageId::NONE },
{ "rtf", false, STR_DESCRIPTION_WORD_DOC, SvImageId::Writer },
- { "sbl", false, nullptr, SvImageId::NONE },
- { "sch", false, nullptr, SvImageId::NONE },
- { "sda", false, STR_DESCRIPTION_SDRAW_DOC, SvImageId::Draw },
+ { "sbl", false, {}, SvImageId::NONE },
+ { "sch", false, {}, SvImageId::NONE },
+ { "sda", false, { nullptr, STR_DESCRIPTION_SDRAW_DOC}, SvImageId::Draw },
{ "sdb", false, STR_DESCRIPTION_SDATABASE_DOC, SvImageId::Database },
- { "sdc", false, STR_DESCRIPTION_SCALC_DOC, SvImageId::Calc },
- { "sdd", false, STR_DESCRIPTION_SIMPRESS_DOC, SvImageId::Impress },
- { "sdp", false, STR_DESCRIPTION_SIMPRESS_DOC, SvImageId::NONE },
- { "sds", false, STR_DESCRIPTION_SCHART_DOC, SvImageId::NONE },
- { "sdw", false, STR_DESCRIPTION_SWRITER_DOC, SvImageId::Writer },
- { "sga", false, nullptr, SvImageId::NONE },
+ { "sdc", false, { nullptr, STR_DESCRIPTION_SCALC_DOC}, SvImageId::Calc },
+ { "sdd", false, { nullptr, STR_DESCRIPTION_SIMPRESS_DOC}, SvImageId::Impress },
+ { "sdp", false, { nullptr, STR_DESCRIPTION_SIMPRESS_DOC}, SvImageId::NONE },
+ { "sds", false, { nullptr, STR_DESCRIPTION_SCHART_DOC}, SvImageId::NONE },
+ { "sdw", false, { nullptr, STR_DESCRIPTION_SWRITER_DOC}, SvImageId::Writer },
+ { "sga", false, {}, SvImageId::NONE },
{ "sgl", false, STR_DESCRIPTION_GLOBALDOC, SvImageId::GlobalDoc },
{ "shtml", false, STR_DESCRIPTION_HTMLFILE, SvImageId::HTML },
{ "sim", false, STR_DESCRIPTION_SIMAGE_DOC, SvImageId::SIM },
- { "smf", false, STR_DESCRIPTION_SMATH_DOC, SvImageId::Math },
+ { "smf", false, { nullptr, STR_DESCRIPTION_SMATH_DOC}, SvImageId::Math },
{ "src", true, STR_DESCRIPTION_SOURCEFILE, SvImageId::NONE },
{ "svh", false, STR_DESCRIPTION_HELP_DOC, SvImageId::NONE },
{ "svm", true, STR_DESCRIPTION_GRAPHIC_DOC, SvImageId::SVM },
@@ -168,7 +168,7 @@ SvtExtensionResIdMapping_Impl const ExtensionMap_Impl[] =
{ "pps", false, STR_DESCRIPTION_POWERPOINT_SHOW, SvImageId::Impress },
{ "pptx", false, STR_DESCRIPTION_POWERPOINT, SvImageId::Impress },
{ "oxt", false, STR_DESCRIPTION_EXTENSION, SvImageId::Extension },
- { nullptr, false, nullptr, SvImageId::NONE }
+ { nullptr, false, {}, SvImageId::NONE }
};
namespace {
@@ -431,9 +431,9 @@ static SvImageId GetImageId_Impl(
return nImage;
}
-static const char* GetDescriptionId_Impl( const OUString& rExtension, bool& rbShowExt )
+static TranslateId GetDescriptionId_Impl( const OUString& rExtension, bool& rbShowExt )
{
- const char* pId = nullptr;
+ TranslateId pId;
sal_Int32 nIndex = GetIndexOfExtension_Impl( rExtension );
if ( nIndex != NO_INDEX )
{
@@ -446,7 +446,7 @@ static const char* GetDescriptionId_Impl( const OUString& rExtension, bool& rbSh
static OUString GetDescriptionByFactory_Impl( const OUString& rFactory )
{
- const char* pResId = nullptr;
+ TranslateId pResId;
if ( rFactory.startsWithIgnoreAsciiCase( "swriter" ) )
pResId = STR_DESCRIPTION_FACTORY_WRITER;
else if ( rFactory.startsWithIgnoreAsciiCase( "scalc" ) )
@@ -471,9 +471,9 @@ static OUString GetDescriptionByFactory_Impl( const OUString& rFactory )
return OUString();
}
-static const char* GetFolderDescriptionId_Impl( const OUString& rURL )
+static TranslateId GetFolderDescriptionId_Impl( const OUString& rURL )
{
- const char* pRet = STR_DESCRIPTION_FOLDER;
+ TranslateId pRet = STR_DESCRIPTION_FOLDER;
try
{
::ucbhelper::Content aCnt( rURL, css::uno::Reference< css::ucb::XCommandEnvironment >(), comphelper::getProcessComponentContext() );
@@ -742,7 +742,7 @@ OUString SvFileInformationManager::GetDescription_Impl( const INetURLObject& rOb
{
OUString sExtension(rObject.getExtension());
OUString sDescription, sURL( rObject.GetMainURL( INetURLObject::DecodeMechanism::NONE ) );
- const char* pResId = nullptr;
+ TranslateId pResId;
bool bShowExt = false, bOnlyFile = false;
bool bFolder = bDetectFolder && CONTENT_HELPER::IsFolder( sURL );
if ( !bFolder )
@@ -866,7 +866,7 @@ OUString SvFileInformationManager::GetFileDescription( const INetURLObject& rObj
OUString SvFileInformationManager::GetFolderDescription( const svtools::VolumeInfo& rInfo )
{
- const char* pResId = STR_DESCRIPTION_FOLDER;
+ TranslateId pResId = STR_DESCRIPTION_FOLDER;
if ( rInfo.m_bIsRemote )
pResId = STR_DESCRIPTION_REMOTE_VOLUME;
else if ( rInfo.m_bIsFloppy )
diff --git a/svtools/source/misc/svtresid.cxx b/svtools/source/misc/svtresid.cxx
index e6dd8d45677f..5d886a01bfee 100644
--- a/svtools/source/misc/svtresid.cxx
+++ b/svtools/source/misc/svtresid.cxx
@@ -17,11 +17,10 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#include <unotools/resmgr.hxx>
#include <svtools/svtresid.hxx>
std::locale SvtResLocale() { return Translate::Create("svt"); }
-OUString SvtResId(std::string_view aId) { return Translate::get(aId, SvtResLocale()); }
+OUString SvtResId(TranslateId aId) { return Translate::get(aId, SvtResLocale()); }
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svx/inc/DescriptionGenerator.hxx b/svx/inc/DescriptionGenerator.hxx
index daf169f9b478..8b3ac3f5cac2 100644
--- a/svx/inc/DescriptionGenerator.hxx
+++ b/svx/inc/DescriptionGenerator.hxx
@@ -21,6 +21,7 @@
#include <com/sun/star/uno/Reference.hxx>
#include <rtl/ustrbuf.hxx>
+#include <unotools/resmgr.hxx>
namespace com::sun::star::beans
{
@@ -75,7 +76,7 @@ public:
shape that is made more specific by later calls to
<member>addProperty</member>.
*/
- void Initialize(const char* pResourceId);
+ void Initialize(TranslateId pResourceId);
/** Returns the description string and then resets it. Usually called
as last method before destroying the object.
diff --git a/svx/inc/fieldunit.hrc b/svx/inc/fieldunit.hrc
index f16238550efe..28c160c7fcf0 100644
--- a/svx/inc/fieldunit.hrc
+++ b/svx/inc/fieldunit.hrc
@@ -23,9 +23,9 @@
#include <tools/fldunit.hxx>
#include <utility>
-#define NC_(Context, String) reinterpret_cast<char const *>(Context "\004" u8##String)
+#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
-const std::pair<const char*, FieldUnit> RID_SVXSTR_FIELDUNIT_TABLE[] =
+const std::pair<TranslateId, FieldUnit> RID_SVXSTR_FIELDUNIT_TABLE[] =
{
{ NC_("RID_SVXSTR_FIELDUNIT_TABLE", "Millimeter") , FieldUnit::MM },
{ NC_("RID_SVXSTR_FIELDUNIT_TABLE", "Centimeter") , FieldUnit::CM },
diff --git a/svx/inc/fmstring.hrc b/svx/inc/fmstring.hrc
index 7a78d0ae2623..08f78b7f2cc3 100644
--- a/svx/inc/fmstring.hrc
+++ b/svx/inc/fmstring.hrc
@@ -20,9 +20,9 @@
#ifndef INCLUDED_SVX_INC_FMSTRING_HRC
#define INCLUDED_SVX_INC_FMSTRING_HRC
-#define NC_(Context, String) reinterpret_cast<char const *>(Context "\004" u8##String)
+#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
-const char* RID_RSC_SQL_INTERNATIONAL[] =
+const TranslateId RID_RSC_SQL_INTERNATIONAL[] =
{
NC_("RID_RSC_SQL_INTERNATIONAL", "LIKE"),
NC_("RID_RSC_SQL_INTERNATIONAL", "NOT"),
diff --git a/svx/inc/formnavi.hrc b/svx/inc/formnavi.hrc
index f105cca63292..3326bc69517c 100644
--- a/svx/inc/formnavi.hrc
+++ b/svx/inc/formnavi.hrc
@@ -20,9 +20,9 @@
#ifndef INCLUDED_SVX_INC_FRMSEL_HRC
#define INCLUDED_SVX_INC_FRMSEL_HRC
-#define NC_(Context, String) reinterpret_cast<char const *>(Context "\004" u8##String)
+#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
-const char* RID_SVXSW_CONVERTMENU[] =
+const TranslateId RID_SVXSW_CONVERTMENU[] =
{
NC_("RID_SVXSW_CONVERTMENU|ConvertToEdit", "~Text Box"),
NC_("RID_SVXSW_CONVERTMENU|ConvertToButton", "~Button"),
diff --git a/svx/inc/frmsel.hrc b/svx/inc/frmsel.hrc
index 893d84de2faa..147d4fa9cb08 100644
--- a/svx/inc/frmsel.hrc
+++ b/svx/inc/frmsel.hrc
@@ -23,9 +23,9 @@
#include <utility>
#include <sal/types.h>
-#define NC_(Context, String) reinterpret_cast<char const *>(Context "\004" u8##String)
+#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
-std::pair<const char*, sal_uInt16> RID_SVXSTR_FRMSEL_TEXTS[] =
+std::pair<TranslateId, sal_uInt16> RID_SVXSTR_FRMSEL_TEXTS[] =
{
{ NC_("RID_SVXSTR_FRMSEL_TEXTS", "Border setting") , 0 },
{ NC_("RID_SVXSTR_FRMSEL_TEXTS", "Left border line") , 1 },
@@ -38,7 +38,7 @@ std::pair<const char*, sal_uInt16> RID_SVXSTR_FRMSEL_TEXTS[] =
{ NC_("RID_SVXSTR_FRMSEL_TEXTS", "Diagonal border line from bottom left to top right") , 8 },
};
-std::pair<const char*, sal_uInt16> RID_SVXSTR_FRMSEL_DESCRIPTIONS[] =
+std::pair<TranslateId, sal_uInt16> RID_SVXSTR_FRMSEL_DESCRIPTIONS[] =
{
{ NC_("RID_SVXSTR_FRMSEL_DESCRIPTIONS", "Border setting") , 0 },
{ NC_("RID_SVXSTR_FRMSEL_DESCRIPTIONS", "Left border line") , 1 },
diff --git a/svx/inc/inspectorvalues.hrc b/svx/inc/inspectorvalues.hrc
index 863b13b899e8..0c09dc4a060d 100644
--- a/svx/inc/inspectorvalues.hrc
+++ b/svx/inc/inspectorvalues.hrc
@@ -9,8 +9,8 @@
#pragma once
-#define NC_(Context, String) reinterpret_cast<char const *>(Context "\004" u8##String)
-#define NNC_(Context, StringSingular, StringPlural) reinterpret_cast<char const *>(Context "\004" u8##StringSingular "\004" u8##StringPlural)
+#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
+#define NNC_(Context, StringSingular, StringPlural) TranslateNId(Context, reinterpret_cast<char const *>(u8##StringSingular), reinterpret_cast<char const *>(u8##StringPlural))
/*--------------------------------------------------------------------
Description: API names for Paragraph, Character
diff --git a/svx/inc/numberingtype.hrc b/svx/inc/numberingtype.hrc
index 7181aeb385e9..404a7534e00b 100644
--- a/svx/inc/numberingtype.hrc
+++ b/svx/inc/numberingtype.hrc
@@ -22,9 +22,9 @@
#include <utility>
-#define NC_(Context, String) reinterpret_cast<char const *>(Context "\004" u8##String)
+#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
-const std::pair<const char*, int> RID_SVXSTRARY_NUMBERINGTYPE[] =
+const std::pair<TranslateId, int> RID_SVXSTRARY_NUMBERINGTYPE[] =
{
{ /* SVX_NUM_NUMBER_NONE */ NC_("RID_SVXSTRARY_NUMBERINGTYPE", "None") , 5 },
{ /* SVX_NUM_CHAR_SPECIAL */ NC_("RID_SVXSTRARY_NUMBERINGTYPE", "Bullet") , 6 },
diff --git a/svx/inc/rotationstrings.hrc b/svx/inc/rotationstrings.hrc
index 229f2bee53c5..bb9a81c6b68b 100644
--- a/svx/inc/rotationstrings.hrc
+++ b/svx/inc/rotationstrings.hrc
@@ -10,9 +10,9 @@
#ifndef INCLUDED_SVX_INC_ROTATIONSTRINGS_HRC
#define INCLUDED_SVX_INC_ROTATIONSTRINGS_HRC
-#define NC_(Context, String) reinterpret_cast<char const *>(Context "\004" u8##String)
+#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
-const char* RID_SVXITEMS_ROTATE_MODE[] =
+const TranslateId RID_SVXITEMS_ROTATE_MODE[] =
{
// enum SvxRotateMode ----------------------------------------------------
NC_("RID_SVXITEMS_ROTATE_MODE_STANDARD", "Rotation only within cell"),
diff --git a/svx/inc/samecontent.hrc b/svx/inc/samecontent.hrc
index b4a6bc8d667d..99ff7a37c040 100644
--- a/svx/inc/samecontent.hrc
+++ b/svx/inc/samecontent.hrc
@@ -11,9 +11,9 @@
#include <utility>
-#define NC_(Context, String) reinterpret_cast<char const *>(Context "\004" u8##String)
+#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
-const std::pair<const char*, int> RID_SVXSTRARY_SAMECONTENT[] =
+const std::pair<TranslateId, int> RID_SVXSTRARY_SAMECONTENT[] =
{
{ NC_("RID_SVXSTRARY_SAMECONTENT", "All Pages"), 0 },
{ NC_("RID_SVXSTRARY_SAMECONTENT", "First Page"), 1 },
diff --git a/svx/inc/spacing.hrc b/svx/inc/spacing.hrc
index 8c9ba6da29a2..280e534b4896 100644
--- a/svx/inc/spacing.hrc
+++ b/svx/inc/spacing.hrc
@@ -9,11 +9,11 @@
#ifndef INCLUDED_SVX_INC_SPACING_HRC
#define INCLUDED_SVX_INC_SPACING_HRC
-#define NC_(Context, String) reinterpret_cast<char const *>(Context "\004" u8##String)
+#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
struct measurement
{
- const char* key;
+ TranslateId key;
int twips;
int human;
};
@@ -29,7 +29,7 @@ const measurement RID_SVXSTRARY_SPACING_INCH[] =
{ NC_("RID_SVXSTRARY_SPACING_INCH", "Medium Large (1/2″)"), 720, 0 },
{ NC_("RID_SVXSTRARY_SPACING_INCH", "Large (3/4″)"), 1077, 0 },
{ NC_("RID_SVXSTRARY_SPACING_INCH", "Extra Large (1″)"), 1440, 0 },
- { nullptr, 0, 0 }
+ { {}, 0, 0 }
};
// To translators: this is a listbox labelled by "Spacing:", cm units
@@ -50,7 +50,7 @@ const measurement RID_SVXSTRARY_SPACING_CM[] =
{ NC_("RID_SVXSTRARY_SPACING_CM", "Large (%1)"), 1077, 190 },
// Extra Large (2.54 cm)
{ NC_("RID_SVXSTRARY_SPACING_CM", "Extra Large (%1)"), 1440, 254 },
- { nullptr, 0, 0 }
+ { {}, 0, 0 }
};
// To translators: this is a listbox labelled by "Margins:", inch units
@@ -64,7 +64,7 @@ const measurement RID_SVXSTRARY_MARGINS_INCH[] =
{ NC_("RID_SVXSTRARY_MARGINS_INCH", "Medium Large (1/2″)"), 720, 0 },
{ NC_("RID_SVXSTRARY_MARGINS_INCH", "Large (3/4″)"), 1077, 0 },
{ NC_("RID_SVXSTRARY_MARGINS_INCH", "Extra Large (1″)"), 1440, 0 },
- { nullptr, 0, 0 }
+ { {}, 0, 0 }
};
// To translators: this is a listbox labelled by "Margins:", cm units
@@ -85,7 +85,7 @@ const measurement RID_SVXSTRARY_MARGINS_CM[] =
{ NC_("RID_SVXSTRARY_MARGINS_CM", "Large (%1)"), 1077, 190 },
// Extra Large (2.54 cm)
{ NC_("RID_SVXSTRARY_MARGINS_CM", "Extra Large (%1)"), 1440, 254 },
- { nullptr, 0, 0 }
+ { {}, 0, 0 }
};
#endif
diff --git a/svx/inc/svxerr.hrc b/svx/inc/svxerr.hrc
index 9691386c94e7..40066df41531 100644
--- a/svx/inc/svxerr.hrc
+++ b/svx/inc/svxerr.hrc
@@ -20,7 +20,7 @@
#ifndef INCLUDED_SVX_INC_SVXERR_HRC
#define INCLUDED_SVX_INC_SVXERR_HRC
-#define NC_(Context, String) reinterpret_cast<char const *>(Context "\004" u8##String)
+#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
#include <svx/svxerr.hxx>
#include <editeng/editerr.hxx>
@@ -40,7 +40,7 @@ const ErrMsgCode RID_SVXERRCTX[] =
ErrCode(ERRCTX_SVX_BACKGROUND) },
{ NC_("RID_SVXERRCTX", "$(ERR) loading the graphics.") ,
ErrCode(ERRCTX_SVX_IMPORT_GRAPHIC) },
- { nullptr, ERRCODE_NONE }
+ { {}, ERRCODE_NONE }
};
// Error-Code ------------------------------------------------------------
@@ -70,7 +70,7 @@ const ErrMsgCode RID_SVXERRCODE[] =
ERRCODE_SVX_READ_FILTER_PPOINT },
{ NC_("RID_SVXERRCODE", "Password protection is not supported when documents are saved in a Microsoft Office format.\nDo you want to save the document without password protection?"),
ERRCODE_SVX_EXPORT_FILTER_CRYPT },
- { nullptr, ERRCODE_NONE }
+ { {}, ERRCODE_NONE }
};
#endif
diff --git a/svx/inc/swframeposstrings.hrc b/svx/inc/swframeposstrings.hrc
index 1d3da664b208..b89608350e32 100644
--- a/svx/inc/swframeposstrings.hrc
+++ b/svx/inc/swframeposstrings.hrc
@@ -20,10 +20,10 @@
#ifndef INCLUDED_SVX_INC_SWFRAMEPOSSTRINGS_HRC
#define INCLUDED_SVX_INC_SWFRAMEPOSSTRINGS_HRC
-#define NC_(Context, String) reinterpret_cast<char const *>(Context "\004" u8##String)
+#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
//the following string have to match the (enum values) positions in svx/swframeposstrings.hxx!
-const char* RID_SVXSW_FRAMEPOSITIONS[] =
+const TranslateId RID_SVXSW_FRAMEPOSITIONS[] =
{
NC_("RID_SVXSW_FRAMEPOSITIONS", "Left"),
NC_("RID_SVXSW_FRAMEPOSITIONS", "Right"),
diff --git a/svx/inc/tabwin.hrc b/svx/inc/tabwin.hrc
index 8ab1888038da..dd609a5bcb58 100644
--- a/svx/inc/tabwin.hrc
+++ b/svx/inc/tabwin.hrc
@@ -20,9 +20,9 @@
#ifndef INCLUDED_SVX_INC_TABWIN_HRC
#define INCLUDED_SVX_INC_TABWIN_HRC
-#define NC_(Context, String) reinterpret_cast<char const *>(Context "\004" u8##String)
+#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
-const char* RID_RSC_TABWIN_PREFIX[] =
+const TranslateId RID_RSC_TABWIN_PREFIX[] =
{
NC_("RID_RSC_TABWIN_PREFIX", "Table"),
NC_("RID_RSC_TABWIN_PREFIX", "Query"),
diff --git a/svx/inc/txenctab.hrc b/svx/inc/txenctab.hrc
index e7171fbd1097..e140015a7eb3 100644
--- a/svx/inc/txenctab.hrc
+++ b/svx/inc/txenctab.hrc
@@ -23,11 +23,11 @@
#include <rtl/textenc.h>
#include <utility>
-#define NC_(Context, String) reinterpret_cast<char const *>(Context "\004" u8##String)
+#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
// Encodings for which no conversion exist yet are commented out.
-const std::pair<const char*, rtl_TextEncoding> RID_SVXSTR_TEXTENCODING_TABLE[] =
+const std::pair<TranslateId, rtl_TextEncoding> RID_SVXSTR_TEXTENCODING_TABLE[] =
{
{ NC_("RID_SVXSTR_TEXTENCODING_TABLE", "Western Europe (Windows-1252/WinLatin 1)") , RTL_TEXTENCODING_MS_1252 },
{ NC_("RID_SVXSTR_TEXTENCODING_TABLE", "Western Europe (Apple Macintosh)") , RTL_TEXTENCODING_APPLE_ROMAN },
diff --git a/svx/source/accessibility/DescriptionGenerator.cxx b/svx/source/accessibility/DescriptionGenerator.cxx
index 2a473ed40563..430f22c98c01 100644
--- a/svx/source/accessibility/DescriptionGenerator.cxx
+++ b/svx/source/accessibility/DescriptionGenerator.cxx
@@ -44,7 +44,7 @@ DescriptionGenerator::DescriptionGenerator(const uno::Reference<drawing::XShape>
DescriptionGenerator::~DescriptionGenerator() {}
-void DescriptionGenerator::Initialize(const char* pResourceId)
+void DescriptionGenerator::Initialize(TranslateId pResourceId)
{
// Get the string from the resource for the specified id.
OUString sPrefix;
diff --git a/svx/source/accessibility/ShapeTypeHandler.cxx b/svx/source/accessibility/ShapeTypeHandler.cxx
index 368c2f698ee9..1a485b503772 100644
--- a/svx/source/accessibility/ShapeTypeHandler.cxx
+++ b/svx/source/accessibility/ShapeTypeHandler.cxx
@@ -191,7 +191,7 @@ tools::Long ShapeTypeHandler::GetSlotId (const uno::Reference<drawing::XShape>&
/// get the accessible base name for an object
OUString ShapeTypeHandler::CreateAccessibleBaseName (const uno::Reference<drawing::XShape>& rxShape)
{
- const char* pResourceId;
+ TranslateId pResourceId;
OUString sName;
switch (ShapeTypeHandler::Instance().GetTypeId (rxShape))
@@ -276,7 +276,7 @@ OUString ShapeTypeHandler::CreateAccessibleBaseName (const uno::Reference<drawin
pResourceId = STR_ObjNameSingulFONTWORK;
else
{
- pResourceId = nullptr;
+ pResourceId = {};
sName = pCustomShape->GetCustomShapeName();
}
}
@@ -286,7 +286,7 @@ OUString ShapeTypeHandler::CreateAccessibleBaseName (const uno::Reference<drawin
pResourceId = STR_ObjNameSingulTEXT;
break;
default:
- pResourceId = nullptr;
+ pResourceId = {};
sName = "UnknownAccessibleShape";
if (rxShape.is())
sName += ": " + rxShape->getShapeType();
diff --git a/svx/source/accessibility/svxrectctaccessiblecontext.cxx b/svx/source/accessibility/svxrectctaccessiblecontext.cxx
index cd8c9af53988..bca421c29a51 100644
--- a/svx/source/accessibility/svxrectctaccessiblecontext.cxx
+++ b/svx/source/accessibility/svxrectctaccessiblecontext.cxx
@@ -52,8 +52,8 @@ namespace
{
struct ChildIndexToPointData
{
- const char* pResIdName;
- const char* pResIdDescr;
+ TranslateId pResIdName;
+ TranslateId pResIdDescr;
RectPoint ePoint;
};
}
diff --git a/svx/source/dialog/dialmgr.cxx b/svx/source/dialog/dialmgr.cxx
index 1281324eaad9..9fdd50ddab08 100644
--- a/svx/source/dialog/dialmgr.cxx
+++ b/svx/source/dialog/dialmgr.cxx
@@ -17,11 +17,10 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#include <unotools/resmgr.hxx>
#include <svx/dialmgr.hxx>
std::locale SvxResLocale() { return Translate::Create("svx"); }
-OUString SvxResId(std::string_view aId) { return Translate::get(aId, SvxResLocale()); }
+OUString SvxResId(TranslateId aId) { return Translate::get(aId, SvxResLocale()); }
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svx/source/dialog/docrecovery.cxx b/svx/source/dialog/docrecovery.cxx
index 1eab1accf726..1c86f078042f 100644
--- a/svx/source/dialog/docrecovery.cxx
+++ b/svx/source/dialog/docrecovery.cxx
@@ -622,7 +622,7 @@ void SaveProgressDialog::end()
m_xDialog->response(DLG_RET_OK);
}
-static short impl_askUserForWizardCancel(weld::Widget* pParent, const char* pRes)
+static short impl_askUserForWizardCancel(weld::Widget* pParent, TranslateId pRes)
{
std::unique_ptr<weld::MessageDialog> xQuery(Application::CreateMessageDialog(pParent,
VclMessageType::Question, VclButtonsType::YesNo, SvxResId(pRes)));
diff --git a/svx/source/dialog/page.hrc b/svx/source/dialog/page.hrc
index ec845957e31f..c5e9a75b1cc6 100644
--- a/svx/source/dialog/page.hrc
+++ b/svx/source/dialog/page.hrc
@@ -23,9 +23,9 @@
#include <i18nutil/paper.hxx>
#include <utility>
-#define NC_(Context, String) reinterpret_cast<char const *>(Context "\004" u8##String)
+#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
-const std::pair<const char*, int> RID_SVXSTRARY_PAPERSIZE_STD[] =
+const std::pair<TranslateId, int> RID_SVXSTRARY_PAPERSIZE_STD[] =
{
{ NC_("RID_SVXSTRARY_PAPERSIZE_STD", "A6") , PAPER_A6 },
{ NC_("RID_SVXSTRARY_PAPERSIZE_STD", "A5") , PAPER_A5 },
@@ -59,7 +59,7 @@ const std::pair<const char*, int> RID_SVXSTRARY_PAPERSIZE_STD[] =
{ NC_("RID_SVXSTRARY_PAPERSIZE_STD", "Japanese Postcard") , PAPER_POSTCARD_JP}
};
-const std::pair<const char*, int> RID_SVXSTRARY_PAPERSIZE_DRAW[] =
+const std::pair<TranslateId, int> RID_SVXSTRARY_PAPERSIZE_DRAW[] =
{
{ NC_("RID_SVXSTRARY_PAPERSIZE_DRAW", "A6") , PAPER_A6 },
{ NC_("RID_SVXSTRARY_PAPERSIZE_DRAW", "A5") , PAPER_A5 },
diff --git a/svx/source/dialog/papersizelistbox.cxx b/svx/source/dialog/papersizelistbox.cxx
index f746a023c38d..fc0211a8bad4 100644
--- a/svx/source/dialog/papersizelistbox.cxx
+++ b/svx/source/dialog/papersizelistbox.cxx
@@ -29,7 +29,7 @@ SvxPaperSizeListBox::SvxPaperSizeListBox(std::unique_ptr<weld::ComboBox> pContro
void SvxPaperSizeListBox::FillPaperSizeEntries( PaperSizeApp eApp )
{
- const std::pair<const char*, int>* pPaperAry = eApp == PaperSizeApp::Std ?
+ const std::pair<TranslateId, int>* pPaperAry = eApp == PaperSizeApp::Std ?
RID_SVXSTRARY_PAPERSIZE_STD : RID_SVXSTRARY_PAPERSIZE_DRAW;
sal_uInt32 nCnt = eApp == PaperSizeApp::Std ?
SAL_N_ELEMENTS(RID_SVXSTRARY_PAPERSIZE_STD) : SAL_N_ELEMENTS(RID_SVXSTRARY_PAPERSIZE_DRAW);
diff --git a/svx/source/dialog/svxbmpnumvalueset.cxx b/svx/source/dialog/svxbmpnumvalueset.cxx
index 5698c99ba090..9736b5703317 100644
--- a/svx/source/dialog/svxbmpnumvalueset.cxx
+++ b/svx/source/dialog/svxbmpnumvalueset.cxx
@@ -95,7 +95,7 @@ static void lcl_PaintLevel(OutputDevice* pVDev, sal_Int16 nNumberingType,
}
}
-static const char* RID_SVXSTR_BULLET_DESCRIPTIONS[] =
+ const TranslateId RID_SVXSTR_BULLET_DESCRIPTIONS[] =
{
RID_SVXSTR_BULLET_DESCRIPTION_0,
RID_SVXSTR_BULLET_DESCRIPTION_1,
@@ -107,7 +107,7 @@ static const char* RID_SVXSTR_BULLET_DESCRIPTIONS[] =
RID_SVXSTR_BULLET_DESCRIPTION_7
};
-static const char* RID_SVXSTR_SINGLENUM_DESCRIPTIONS[] =
+const TranslateId RID_SVXSTR_SINGLENUM_DESCRIPTIONS[] =
{
RID_SVXSTR_SINGLENUM_DESCRIPTION_0,
RID_SVXSTR_SINGLENUM_DESCRIPTION_1,
@@ -119,7 +119,7 @@ static const char* RID_SVXSTR_SINGLENUM_DESCRIPTIONS[] =
RID_SVXSTR_SINGLENUM_DESCRIPTION_7
};
-static const char* RID_SVXSTR_OUTLINENUM_DESCRIPTIONS[] =
+const TranslateId RID_SVXSTR_OUTLINENUM_DESCRIPTIONS[] =
{
RID_SVXSTR_OUTLINENUM_DESCRIPTION_0,
RID_SVXSTR_OUTLINENUM_DESCRIPTION_1,
diff --git a/svx/source/dialog/svxruler.cxx b/svx/source/dialog/svxruler.cxx
index e6b57aac5fb7..43000ea7279c 100644
--- a/svx/source/dialog/svxruler.cxx
+++ b/svx/source/dialog/svxruler.cxx
@@ -3280,7 +3280,7 @@ void SvxRuler::TabMenuSelect(const OString& rIdent)
}
}
-static const char* RID_SVXSTR_RULER_TAB[] =
+const TranslateId RID_SVXSTR_RULER_TAB[] =
{
RID_SVXSTR_RULER_TAB_LEFT,
RID_SVXSTR_RULER_TAB_RIGHT,
diff --git a/svx/source/fmcomp/fmgridcl.cxx b/svx/source/fmcomp/fmgridcl.cxx
index 0e1a6a87389a..a3bcd5816214 100644
--- a/svx/source/fmcomp/fmgridcl.cxx
+++ b/svx/source/fmcomp/fmgridcl.cxx
@@ -410,7 +410,7 @@ IMPL_LINK_NOARG( FmGridHeader, OnAsyncExecuteDrop, void*, void )
// Create Column based on type, default textfield
std::vector<OString> aPossibleTypes;
std::vector<OUString> aImgResId;
- std::vector<const char*> aStrResId;
+ std::vector<TranslateId> aStrResId;
switch (nDataType)
{
@@ -512,7 +512,7 @@ IMPL_LINK_NOARG( FmGridHeader, OnAsyncExecuteDrop, void*, void )
int nMenuPos = 0;
std::vector<OString>::const_iterator iter;
- std::vector<const char*>::const_iterator striter;
+ std::vector<TranslateId>::const_iterator striter;
std::vector<OUString>::const_iterator imgiter;
for (iter = aPossibleTypes.begin(), imgiter = aImgResId.begin(), striter = aStrResId.begin();
iter != aPossibleTypes.end(); ++iter, ++striter, ++imgiter)
diff --git a/svx/source/form/datanavi.cxx b/svx/source/form/datanavi.cxx
index b400918b4bc8..93ecd07b9d60 100644
--- a/svx/source/form/datanavi.cxx
+++ b/svx/source/form/datanavi.cxx
@@ -413,7 +413,7 @@ namespace svxform
std::unique_ptr<ItemNode> pNode;
Reference< css::xml::dom::XNode > xParentNode;
Reference< XPropertySet > xNewBinding;
- const char* pResId = nullptr;
+ TranslateId pResId;
bool bIsElement = true;
if ( DGTInstance == m_eGroup )
{
@@ -583,7 +583,7 @@ namespace svxform
AddDataItemDialog aDlg(m_pNaviWin->GetFrameWeld(), pNode, m_xUIHelper);
DataItemType eType = DITElement;
- const char* pResId = RID_STR_DATANAV_EDIT_ELEMENT;
+ TranslateId pResId = RID_STR_DATANAV_EDIT_ELEMENT;
if ( pNode && pNode->m_xNode.is() )
{
try
@@ -871,7 +871,7 @@ namespace svxform
DBG_ASSERT( pNode->m_xNode.is(), "XFormsPage::RemoveEntry(): no XNode" );
css::xml::dom::NodeType eChildType = pNode->m_xNode->getNodeType();
bool bIsElement = ( eChildType == css::xml::dom::NodeType_ELEMENT_NODE );
- const char* pResId = bIsElement ? RID_STR_QRY_REMOVE_ELEMENT : RID_STR_QRY_REMOVE_ATTRIBUTE;
+ TranslateId pResId = bIsElement ? RID_STR_QRY_REMOVE_ELEMENT : RID_STR_QRY_REMOVE_ATTRIBUTE;
OUString sVar = bIsElement ? OUString(ELEMENTNAME) : OUString(ATTRIBUTENAME);
std::unique_ptr<weld::MessageDialog> xQBox(Application::CreateMessageDialog(m_pNaviWin->GetFrameWeld(),
VclMessageType::Question, VclButtonsType::YesNo,
@@ -906,7 +906,7 @@ namespace svxform
{
DBG_ASSERT( pNode->m_xPropSet.is(), "XFormsPage::RemoveEntry(): no propset" );
bool bSubmission = ( DGTSubmission == m_eGroup );
- const char* pResId = bSubmission ? RID_STR_QRY_REMOVE_SUBMISSION : RID_STR_QRY_REMOVE_BINDING;
+ TranslateId pResId = bSubmission ? RID_STR_QRY_REMOVE_SUBMISSION : RID_STR_QRY_REMOVE_BINDING;
OUString sProperty = bSubmission ? OUString(PN_SUBMISSION_ID) : OUString(PN_BINDING_ID);
OUString sSearch = bSubmission ? OUString(SUBMISSIONNAME) : OUString(BINDINGNAME);
OUString sName;
@@ -1221,8 +1221,8 @@ namespace svxform
if ( DGTInstance != m_eGroup )
return;
- const char* pResId1 = RID_STR_DATANAV_EDIT_ELEMENT;
- const char* pResId2 = RID_STR_DATANAV_REMOVE_ELEMENT;
+ TranslateId pResId1 = RID_STR_DATANAV_EDIT_ELEMENT;
+ TranslateId pResId2 = RID_STR_DATANAV_REMOVE_ELEMENT;
if (bEntry)
{
ItemNode* pNode = reinterpret_cast<ItemNode*>(m_xItemList->get_id(*xEntry).toInt64());
diff --git a/svx/source/form/fmPropBrw.cxx b/svx/source/form/fmPropBrw.cxx
index 8f793c4ce7f8..1f083fa49f88 100644
--- a/svx/source/form/fmPropBrw.cxx
+++ b/svx/source/form/fmPropBrw.cxx
@@ -92,7 +92,7 @@ FmPropBrwMgr::FmPropBrwMgr( vcl::Window* _pParent, sal_uInt16 _nId,
static OUString GetUIHeadlineName(sal_Int16 nClassId, const Any& aUnoObj)
{
- const char* pClassNameResourceId = nullptr;
+ TranslateId pClassNameResourceId;
switch ( nClassId )
{
diff --git a/svx/source/form/formcontrolfactory.cxx b/svx/source/form/formcontrolfactory.cxx
index 009bafb85b5d..e98da0466786 100644
--- a/svx/source/form/formcontrolfactory.cxx
+++ b/svx/source/form/formcontrolfactory.cxx
@@ -456,7 +456,7 @@ namespace svxform
OUString sInitialLabel;
OSL_VERIFY( _rxControlModel->getPropertyValue( FM_PROP_NAME ) >>= sInitialLabel );
- const char* pTitleResId = nullptr;
+ TranslateId pTitleResId;
switch ( nClassId )
{
case FormComponentType::COMMANDBUTTON: pTitleResId = RID_STR_PROPTITLE_PUSHBUTTON; break;
@@ -630,7 +630,7 @@ namespace svxform
OUString FormControlFactory::getDefaultName( sal_Int16 _nClassId, const Reference< XServiceInfo >& _rxObject )
{
- const char* pResId(nullptr);
+ TranslateId pResId;
switch ( _nClassId )
{
diff --git a/svx/source/gallery2/gallery1.cxx b/svx/source/gallery2/gallery1.cxx
index b6b5b00d9a0f..ceb8a0fea7b4 100644
--- a/svx/source/gallery2/gallery1.cxx
+++ b/svx/source/gallery2/gallery1.cxx
@@ -63,7 +63,7 @@ const std::pair<sal_uInt16, const char*> aUnlocalized[] =
{ GALLERY_THEME_FONTWORK_VERTICAL, RID_GALLERYSTR_THEME_FONTWORK_VERTICAL }
};
-const std::pair<sal_uInt16, const char*> aLocalized[] =
+const std::pair<sal_uInt16, TranslateId> aLocalized[] =
{
{ RID_GALLERY_THEME_3D, RID_GALLERYSTR_THEME_3D },
{ RID_GALLERY_THEME_ANIMATIONS, RID_GALLERYSTR_THEME_ANIMATIONS },
diff --git a/svx/source/items/algitem.cxx b/svx/source/items/algitem.cxx
index d432963f4b3d..470096993f47 100644
--- a/svx/source/items/algitem.cxx
+++ b/svx/source/items/algitem.cxx
@@ -110,7 +110,8 @@ bool SvxOrientationItem::PutValue( const uno::Any& rVal, sal_uInt8 /*nMemberId*/
OUString SvxOrientationItem::GetValueText( SvxCellOrientation nVal )
{
- return SvxResId(RID_SVXITEMS_ORI_STANDARD + static_cast<int>(nVal));
+ OString id = OString::Concat(RID_SVXITEMS_ORI_STANDARD.mpId) + OString::number(static_cast<int>(nVal));
+ return SvxResId(TranslateId(RID_SVXITEMS_ORI_STANDARD.mpContext, id.getStr()));
}
SvxOrientationItem* SvxOrientationItem::Clone( SfxItemPool* ) const
diff --git a/svx/source/items/pageitem.cxx b/svx/source/items/pageitem.cxx
index db45b3e9fe62..ad600c68fc0e 100644
--- a/svx/source/items/pageitem.cxx
+++ b/svx/source/items/pageitem.cxx
@@ -87,7 +87,7 @@ static OUString GetUsageText( const SvxPageUsage eU )
}
}
-static const char* RID_SVXITEMS_PAGE_NUMS[] =
+const TranslateId RID_SVXITEMS_PAGE_NUMS[] =
{
RID_SVXITEMS_PAGE_NUM_CHR_UPPER,
RID_SVXITEMS_PAGE_NUM_CHR_LOWER,
diff --git a/svx/source/sidebar/nbdtmg.cxx b/svx/source/sidebar/nbdtmg.cxx
index fbbc3b3da03a..f53ebb677a0a 100644
--- a/svx/source/sidebar/nbdtmg.cxx
+++ b/svx/source/sidebar/nbdtmg.cxx
@@ -263,7 +263,8 @@ void BulletsTypeMgr::Init()
pActualBullets[i] = new BulletsSettings;
pActualBullets[i]->cBulletChar = aDefaultBulletTypes[i];
pActualBullets[i]->aFont = rActBulletFont;
- pActualBullets[i]->sDescription = SvxResId( RID_SVXSTR_BULLET_DESCRIPTION_0 + i );
+ OString id = OString::Concat(RID_SVXSTR_BULLET_DESCRIPTION_0.mpId) + OString::number(i);
+ pActualBullets[i]->sDescription = SvxResId( TranslateId(RID_SVXSTR_BULLET_DESCRIPTION_0.mpContext, id.getStr()) );
}
}
sal_uInt16 BulletsTypeMgr::GetNBOIndexForNumRule(SvxNumRule& aNum,sal_uInt16 mLevel,sal_uInt16 nFromIndex)
@@ -380,7 +381,7 @@ NumberingTypeMgr::~NumberingTypeMgr()
{
}
-static const char* RID_SVXSTR_SINGLENUM_DESCRIPTIONS[] =
+const TranslateId RID_SVXSTR_SINGLENUM_DESCRIPTIONS[] =
{
RID_SVXSTR_SINGLENUM_DESCRIPTION_0,
RID_SVXSTR_SINGLENUM_DESCRIPTION_1,
@@ -588,7 +589,8 @@ void OutlineTypeMgr::Init()
{
pOutlineSettingsArrs[ nItem ] = new OutlineSettings_Impl;
OutlineSettings_Impl* pItemArr = pOutlineSettingsArrs[ nItem ];
- pItemArr->sDescription = SvxResId( RID_SVXSTR_OUTLINENUM_DESCRIPTION_0 + nItem );
+ OString id = OString::Concat(RID_SVXSTR_OUTLINENUM_DESCRIPTION_0.mpId) + 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];
for(sal_Int32 nLevel = 0; nLevel < xLevel->getCount() && nLevel < 5; nLevel++)
diff --git a/svx/source/stbctrls/modctrl.cxx b/svx/source/stbctrls/modctrl.cxx
index fa91f98588cf..2d3fc7a5d133 100644
--- a/svx/source/stbctrls/modctrl.cxx
+++ b/svx/source/stbctrls/modctrl.cxx
@@ -90,7 +90,7 @@ void SvxModifyControl::StateChangedAtStatusBarControl( sal_uInt16, SfxItemState
_repaint();
- const char* pResId = modified ? RID_SVXSTR_DOC_MODIFIED_YES : RID_SVXSTR_DOC_MODIFIED_NO;
+ TranslateId pResId = modified ? RID_SVXSTR_DOC_MODIFIED_YES : RID_SVXSTR_DOC_MODIFIED_NO;
GetStatusBar().SetQuickHelpText(GetId(), SvxResId(pResId));
if ( start )
diff --git a/svx/source/stbctrls/xmlsecctrl.cxx b/svx/source/stbctrls/xmlsecctrl.cxx
index b79afa7eeaff..e85868cda947 100644
--- a/svx/source/stbctrls/xmlsecctrl.cxx
+++ b/svx/source/stbctrls/xmlsecctrl.cxx
@@ -84,7 +84,7 @@ void XmlSecStatusBarControl::StateChangedAtStatusBarControl( sal_uInt16, SfxItem
GetStatusBar().SetItemText( GetId(), "" ); // necessary ?
- const char* pResId = RID_SVXSTR_XMLSEC_NO_SIG;
+ TranslateId pResId = RID_SVXSTR_XMLSEC_NO_SIG;
if ( mpImpl->mnState == SignatureState::OK )
pResId = RID_SVXSTR_XMLSEC_SIG_OK;
else if ( mpImpl->mnState == SignatureState::BROKEN )
diff --git a/svx/source/svdraw/ActionDescriptionProvider.cxx b/svx/source/svdraw/ActionDescriptionProvider.cxx
index a471f3e85763..0dc5e895c755 100644
--- a/svx/source/svdraw/ActionDescriptionProvider.cxx
+++ b/svx/source/svdraw/ActionDescriptionProvider.cxx
@@ -25,7 +25,7 @@
OUString ActionDescriptionProvider::createDescription( ActionType eActionType
, std::u16string_view rObjectName )
{
- const char* pResID = nullptr;
+ TranslateId pResID;
switch( eActionType )
{
case ActionType::Insert:
diff --git a/svx/source/svdraw/svdattr.cxx b/svx/source/svdraw/svdattr.cxx
index 411294962d45..982e6d7e8c18 100644
--- a/svx/source/svdraw/svdattr.cxx
+++ b/svx/source/svdraw/svdattr.cxx
@@ -403,7 +403,7 @@ bool SdrItemPool::GetPresentation(
OUString SdrItemPool::GetItemName(sal_uInt16 nWhich)
{
- const char* pResId = SIP_UNKNOWN_ATTR;
+ TranslateId pResId = SIP_UNKNOWN_ATTR;
switch (nWhich)
{
@@ -938,7 +938,7 @@ sal_uInt16 SdrCaptionTypeItem::GetValueCount() const { return 4; }
OUString SdrCaptionTypeItem::GetValueTextByPos(sal_uInt16 nPos)
{
- static const char* ITEMVALCAPTIONTYPES[] =
+ static TranslateId ITEMVALCAPTIONTYPES[] =
{
STR_ItemValCAPTIONTYPE1,
STR_ItemValCAPTIONTYPE2,
@@ -966,7 +966,7 @@ sal_uInt16 SdrCaptionEscDirItem::GetValueCount() const { return 3; }
OUString SdrCaptionEscDirItem::GetValueTextByPos(sal_uInt16 nPos)
{
- static const char* ITEMVALCAPTIONTYPES[] =
+ static TranslateId ITEMVALCAPTIONTYPES[] =
{
STR_ItemValCAPTIONESCHORI,
STR_ItemValCAPTIONESCVERT,
@@ -1010,7 +1010,7 @@ sal_uInt16 SdrTextFitToSizeTypeItem::GetValueCount() const { return 4; }
OUString SdrTextFitToSizeTypeItem::GetValueTextByPos(sal_uInt16 nPos)
{
- static const char* ITEMVALFITTISIZETYPES[] =
+ static TranslateId ITEMVALFITTISIZETYPES[] =
{
STR_ItemValFITTOSIZENONE,
STR_ItemValFITTOSIZEPROP,
@@ -1072,7 +1072,7 @@ sal_uInt16 SdrTextVertAdjustItem::GetValueCount() const { return 5; }
OUString SdrTextVertAdjustItem::GetValueTextByPos(sal_uInt16 nPos)
{
- static const char* ITEMVALTEXTVADJTYPES[] =
+ static TranslateId ITEMVALTEXTVADJTYPES[] =
{
STR_ItemValTEXTVADJTOP,
STR_ItemValTEXTVADJCENTER,
@@ -1131,7 +1131,7 @@ sal_uInt16 SdrTextHorzAdjustItem::GetValueCount() const { return 5; }
OUString SdrTextHorzAdjustItem::GetValueTextByPos(sal_uInt16 nPos)
{
- static const char* ITEMVALTEXTHADJTYPES[] =
+ static TranslateId ITEMVALTEXTHADJTYPES[] =
{
STR_ItemValTEXTHADJLEFT,
STR_ItemValTEXTHADJCENTER,
@@ -1183,7 +1183,7 @@ sal_uInt16 SdrTextAniKindItem::GetValueCount() const { return 5; }
OUString SdrTextAniKindItem::GetValueTextByPos(sal_uInt16 nPos)
{
- static const char* ITEMVALTEXTANITYPES[] =
+ static TranslateId ITEMVALTEXTANITYPES[] =
{
STR_ItemValTEXTANI_NONE,
STR_ItemValTEXTANI_BLINK,
@@ -1234,7 +1234,7 @@ sal_uInt16 SdrTextAniDirectionItem::GetValueCount() const { return 4; }
OUString SdrTextAniDirectionItem::GetValueTextByPos(sal_uInt16 nPos)
{
- static const char* ITEMVALTEXTANITYPES[] =
+ static TranslateId ITEMVALTEXTANITYPES[] =
{
STR_ItemValTEXTANI_LEFT,
STR_ItemValTEXTANI_UP,
@@ -1387,7 +1387,7 @@ sal_uInt16 SdrEdgeKindItem::GetValueCount() const { return 4; }
OUString SdrEdgeKindItem::GetValueTextByPos(sal_uInt16 nPos)
{
- static const char* ITEMVALEDGES[] =
+ static TranslateId ITEMVALEDGES[] =
{
STR_ItemValEDGE_ORTHOLINES,
STR_ItemValEDGE_THREELINES,
@@ -1555,7 +1555,7 @@ sal_uInt16 SdrMeasureKindItem::GetValueCount() const { return 2; }
OUString SdrMeasureKindItem::GetValueTextByPos(sal_uInt16 nPos)
{
- static const char* ITEMVALMEASURETYPES[] =
+ static TranslateId ITEMVALMEASURETYPES[] =
{
STR_ItemValMEASURE_STD,
STR_ItemValMEASURE_RADIUS
@@ -1603,7 +1603,7 @@ sal_uInt16 SdrMeasureTextHPosItem::GetValueCount() const { return 4; }
OUString SdrMeasureTextHPosItem::GetValueTextByPos(sal_uInt16 nPos)
{
- static const char* ITEMVALMEASURETEXTTYPES[] =
+ static TranslateId ITEMVALMEASURETEXTTYPES[] =
{
STR_ItemValMEASURE_TEXTHAUTO,
STR_ItemValMEASURE_TEXTLEFTOUTSIDE,
@@ -1652,7 +1652,7 @@ sal_uInt16 SdrMeasureTextVPosItem::GetValueCount() const { return 5; }
OUString SdrMeasureTextVPosItem::GetValueTextByPos(sal_uInt16 nPos)
{
- static const char* ITEMVALMEASURETEXTTYPES[] =
+ static TranslateId ITEMVALMEASURETEXTTYPES[] =
{
STR_ItemValMEASURE_TEXTVAUTO,
STR_ItemValMEASURE_ABOVE,
@@ -1741,7 +1741,7 @@ sal_uInt16 SdrCircKindItem::GetValueCount() const { return 4; }
OUString SdrCircKindItem::GetValueTextByPos(sal_uInt16 nPos)
{
- static const char* ITEMVALCIRCTYPES[] =
+ static TranslateId ITEMVALCIRCTYPES[] =
{
STR_ItemValCIRC_FULL,
STR_ItemValCIRC_SECT,
diff --git a/svx/source/svdraw/svddrgmt.cxx b/svx/source/svdraw/svddrgmt.cxx
index b0ec9365712d..36ec07b795f3 100644
--- a/svx/source/svdraw/svddrgmt.cxx
+++ b/svx/source/svdraw/svddrgmt.cxx
@@ -552,7 +552,7 @@ void SdrDragMethod::createSdrDragEntries_GlueDrag()
}
}
-OUString SdrDragMethod::ImpGetDescriptionStr(const char* pStrCacheID) const
+OUString SdrDragMethod::ImpGetDescriptionStr(TranslateId pStrCacheID) const
{
ImpGetDescriptionOptions nOpt=ImpGetDescriptionOptions::NONE;
if (IsDraggingPoints()) {
diff --git a/svx/source/svdraw/svdedtv2.cxx b/svx/source/svdraw/svdedtv2.cxx
index 5d29b1b3dc4f..d8ba459c4d2e 100644
--- a/svx/source/svdraw/svdedtv2.cxx
+++ b/svx/source/svdraw/svdedtv2.cxx
@@ -2000,7 +2000,7 @@ void SdrEditView::ImpConvertTo(bool bPath, bool bLineToArea)
bool bMrkChg = false;
const size_t nMarkCount=GetMarkedObjectCount();
- const char* pDscrID = nullptr;
+ TranslateId pDscrID;
if(bLineToArea)
{
if(nMarkCount == 1)
diff --git a/svx/source/svdraw/svdmrkv.cxx b/svx/source/svdraw/svdmrkv.cxx
index 495a0bd64c74..41778c8af6cf 100644
--- a/svx/source/svdraw/svdmrkv.cxx
+++ b/svx/source/svdraw/svdmrkv.cxx
@@ -2593,7 +2593,7 @@ const tools::Rectangle& SdrMarkView::GetMarkedObjRect() const
}
-OUString SdrMarkView::ImpGetDescriptionString(const char* pStrCacheID, ImpGetDescriptionOptions nOpt) const
+OUString SdrMarkView::ImpGetDescriptionString(TranslateId pStrCacheID, ImpGetDescriptionOptions nOpt) const
{
OUString sStr = SvxResId(pStrCacheID);
const sal_Int32 nPos = sStr.indexOf("%1");
diff --git a/svx/source/svdraw/svdobj.cxx b/svx/source/svdraw/svdobj.cxx
index 15b9cc6dcfcf..b6c39ed1d762 100644
--- a/svx/source/svdraw/svdobj.cxx
+++ b/svx/source/svdraw/svdobj.cxx
@@ -1097,7 +1097,7 @@ OUString SdrObject::TakeObjNamePlural() const
return SvxResId(STR_ObjNamePluralNONE);
}
-OUString SdrObject::ImpGetDescriptionStr(const char* pStrCacheID) const
+OUString SdrObject::ImpGetDescriptionStr(TranslateId pStrCacheID) const
{
OUString aStr = SvxResId(pStrCacheID);
sal_Int32 nPos = aStr.indexOf("%1");
diff --git a/svx/source/svdraw/svdocirc.cxx b/svx/source/svdraw/svdocirc.cxx
index 6739e6082a57..9254c2bcefef 100644
--- a/svx/source/svdraw/svdocirc.cxx
+++ b/svx/source/svdraw/svdocirc.cxx
@@ -319,7 +319,7 @@ void SdrCircObj::RecalcXPoly()
OUString SdrCircObj::TakeObjNameSingul() const
{
- const char* pID=STR_ObjNameSingulCIRC;
+ TranslateId pID=STR_ObjNameSingulCIRC;
if (maRect.GetWidth() == maRect.GetHeight() && maGeo.nShearAngle==0_deg100)
{
switch (meCircleKind) {
@@ -348,7 +348,7 @@ OUString SdrCircObj::TakeObjNameSingul() const
OUString SdrCircObj::TakeObjNamePlural() const
{
- const char* pID=STR_ObjNamePluralCIRC;
+ TranslateId pID=STR_ObjNamePluralCIRC;
if (maRect.GetWidth() == maRect.GetHeight() && maGeo.nShearAngle==0_deg100)
{
switch (meCircleKind) {
diff --git a/svx/source/svdraw/svdograf.cxx b/svx/source/svdraw/svdograf.cxx
index 5ec2219cbef3..3de8f5fa7f5f 100644
--- a/svx/source/svdraw/svdograf.cxx
+++ b/svx/source/svdraw/svdograf.cxx
@@ -645,7 +645,7 @@ OUString SdrGrafObj::TakeObjNameSingul() const
{
case GraphicType::Bitmap:
{
- const char* pId = ( ( mpGraphicObject->IsTransparent() || GetObjectItem( SDRATTR_GRAFTRANSPARENCE ).GetValue() ) ?
+ TranslateId pId = ( ( mpGraphicObject->IsTransparent() || GetObjectItem( SDRATTR_GRAFTRANSPARENCE ).GetValue() ) ?
( IsLinkedGraphic() ? STR_ObjNameSingulGRAFBMPTRANSLNK : STR_ObjNameSingulGRAFBMPTRANS ) :
( IsLinkedGraphic() ? STR_ObjNameSingulGRAFBMPLNK : STR_ObjNameSingulGRAFBMP ) );
@@ -720,7 +720,7 @@ OUString SdrGrafObj::TakeObjNamePlural() const
{
case GraphicType::Bitmap:
{
- const char* pId = ( ( mpGraphicObject->IsTransparent() || GetObjectItem( SDRATTR_GRAFTRANSPARENCE ).GetValue() ) ?
+ TranslateId pId = ( ( mpGraphicObject->IsTransparent() || GetObjectItem( SDRATTR_GRAFTRANSPARENCE ).GetValue() ) ?
( IsLinkedGraphic() ? STR_ObjNamePluralGRAFBMPTRANSLNK : STR_ObjNamePluralGRAFBMPTRANS ) :
( IsLinkedGraphic() ? STR_ObjNamePluralGRAFBMPLNK : STR_ObjNamePluralGRAFBMP ) );
diff --git a/svx/source/svdraw/svdopath.cxx b/svx/source/svdraw/svdopath.cxx
index 7f2b4f1fb77c..1c36760ae929 100644
--- a/svx/source/svdraw/svdopath.cxx
+++ b/svx/source/svdraw/svdopath.cxx
@@ -1836,7 +1836,7 @@ OUString SdrPathObj::TakeObjNameSingul() const
if(OBJ_LINE == meKind)
{
- const char* pId(STR_ObjNameSingulLINE);
+ TranslateId pId(STR_ObjNameSingulLINE);
if(lcl_ImpIsLine(GetPathPoly()))
{
@@ -1872,7 +1872,7 @@ OUString SdrPathObj::TakeObjNameSingul() const
else if(OBJ_PLIN == meKind || OBJ_POLY == meKind)
{
const bool bClosed(OBJ_POLY == meKind);
- const char* pId(nullptr);
+ TranslateId pId;
if(mpDAC && mpDAC->IsCreating())
{
diff --git a/svx/source/svdraw/svdorect.cxx b/svx/source/svdraw/svdorect.cxx
index 7221a3c71b76..cd91f6f06c31 100644
--- a/svx/source/svdraw/svdorect.cxx
+++ b/svx/source/svdraw/svdorect.cxx
@@ -209,7 +209,7 @@ OUString SdrRectObj::TakeObjNameSingul() const
}
bool bRounded = GetEckenradius() != 0; // rounded down
- const char* pResId = bRounded ? STR_ObjNameSingulRECTRND : STR_ObjNameSingulRECT;
+ TranslateId pResId = bRounded ? STR_ObjNameSingulRECTRND : STR_ObjNameSingulRECT;
if (maGeo.nShearAngle)
{
pResId = bRounded ? STR_ObjNameSingulPARALRND : STR_ObjNameSingulPARAL; // parallelogram or, maybe, rhombus
@@ -235,7 +235,7 @@ OUString SdrRectObj::TakeObjNamePlural() const
}
bool bRounded = GetEckenradius() != 0; // rounded down
- const char* pResId = bRounded ? STR_ObjNamePluralRECTRND : STR_ObjNamePluralRECT;
+ TranslateId pResId = bRounded ? STR_ObjNamePluralRECTRND : STR_ObjNamePluralRECT;
if (maGeo.nShearAngle)
{
pResId = bRounded ? STR_ObjNamePluralPARALRND : STR_ObjNamePluralPARAL; // parallelogram or rhombus
diff --git a/svx/source/svdraw/svdundo.cxx b/svx/source/svdraw/svdundo.cxx
index 2e81d8acd91f..2fac21a7fa22 100644
--- a/svx/source/svdraw/svdundo.cxx
+++ b/svx/source/svdraw/svdundo.cxx
@@ -195,7 +195,7 @@ SdrUndoObj::SdrUndoObj(SdrObject& rNewObj)
{
}
-OUString SdrUndoObj::GetDescriptionStringForObject( const SdrObject& _rForObject, const char* pStrCacheID, bool bRepeat )
+OUString SdrUndoObj::GetDescriptionStringForObject( const SdrObject& _rForObject, TranslateId pStrCacheID, bool bRepeat )
{
const OUString rStr {SvxResId(pStrCacheID)};
@@ -209,7 +209,7 @@ OUString SdrUndoObj::GetDescriptionStringForObject( const SdrObject& _rForObject
return rStr.replaceAt(nPos, 2, _rForObject.TakeObjNameSingul());
}
-OUString SdrUndoObj::ImpGetDescriptionStr(const char* pStrCacheID, bool bRepeat) const
+OUString SdrUndoObj::ImpGetDescriptionStr(TranslateId pStrCacheID, bool bRepeat) const
{
if ( pObj )
return GetDescriptionStringForObject( *pObj, pStrCacheID, bRepeat );
@@ -1330,7 +1330,7 @@ void SdrUndoPage::ImpMovePage(sal_uInt16 nOldNum, sal_uInt16 nNewNum)
}
}
-OUString SdrUndoPage::ImpGetDescriptionStr(const char* pStrCacheID)
+OUString SdrUndoPage::ImpGetDescriptionStr(TranslateId pStrCacheID)
{
return SvxResId(pStrCacheID);
}
diff --git a/svx/source/tbxctrls/extrusioncontrols.cxx b/svx/source/tbxctrls/extrusioncontrols.cxx
index 6e040da5b1dd..bed16752433f 100644
--- a/svx/source/tbxctrls/extrusioncontrols.cxx
+++ b/svx/source/tbxctrls/extrusioncontrols.cxx
@@ -99,7 +99,7 @@ const std::u16string_view aDirectionBmps[] =
u"" RID_SVXBMP_DIRECTION_DIRECTION_SE
};
-static const char* aDirectionStrs[] =
+static TranslateId aDirectionStrs[] =
{
RID_SVXSTR_DIRECTION_NW,
RID_SVXSTR_DIRECTION_N,
@@ -382,7 +382,7 @@ void ExtrusionDepthWindow::implFillStrings( FieldUnit eUnit )
{
meUnit = eUnit;
- const char* aDepths[] =
+ const TranslateId aDepths[] =
{
RID_SVXSTR_DEPTH_0,
RID_SVXSTR_DEPTH_1,
@@ -391,7 +391,7 @@ void ExtrusionDepthWindow::implFillStrings( FieldUnit eUnit )
RID_SVXSTR_DEPTH_4
};
- const char* aDepthsInch[] =
+ const TranslateId aDepthsInch[] =
{
RID_SVXSTR_DEPTH_0_INCH,
RID_SVXSTR_DEPTH_1_INCH,
@@ -402,7 +402,7 @@ void ExtrusionDepthWindow::implFillStrings( FieldUnit eUnit )
assert(SAL_N_ELEMENTS(aDepths) == SAL_N_ELEMENTS(aDepthsInch));
- const char** pResource = IsMetric(eUnit) ? aDepths : aDepthsInch;
+ const TranslateId* pResource = IsMetric(eUnit) ? aDepths : aDepthsInch;
mxDepth0->set_label(SvxResId(pResource[0]));
mxDepth1->set_label(SvxResId(pResource[1]));
diff --git a/svx/source/tbxctrls/lboxctrl.cxx b/svx/source/tbxctrls/lboxctrl.cxx
index 9c31edf4e7a3..7adb99ecaaa2 100644
--- a/svx/source/tbxctrls/lboxctrl.cxx
+++ b/svx/source/tbxctrls/lboxctrl.cxx
@@ -99,7 +99,7 @@ SvxPopupWindowListBox::SvxPopupWindowListBox(SvxUndoRedoControl* pControl, weld:
void SvxUndoRedoControl::SetInfo( sal_Int32 nCount )
{
- const char* pId;
+ TranslateId pId;
if (nCount == 1)
pId = getCommandURL() == ".uno:Undo" ? RID_SVXSTR_NUM_UNDO_ACTION : RID_SVXSTR_NUM_REDO_ACTION;
else
diff --git a/svx/source/toolbars/extrusionbar.cxx b/svx/source/toolbars/extrusionbar.cxx
index 51fecface297..90af6561d6ff 100644
--- a/svx/source/toolbars/extrusionbar.cxx
+++ b/svx/source/toolbars/extrusionbar.cxx
@@ -454,7 +454,7 @@ static void impl_execute( SfxRequest const & rReq, SdrCustomShapeGeometryItem& r
void ExtrusionBar::execute( SdrView* pSdrView, SfxRequest const & rReq, SfxBindings& rBindings )
{
sal_uInt16 nSID = rReq.GetSlot();
- const char* pStrResId = nullptr;
+ TranslateId pStrResId;
const bool bUndo = pSdrView && pSdrView->IsUndoEnabled();
diff --git a/svx/source/toolbars/fontworkbar.cxx b/svx/source/toolbars/fontworkbar.cxx
index 0f27578eab18..7ec966ab4f09 100644
--- a/svx/source/toolbars/fontworkbar.cxx
+++ b/svx/source/toolbars/fontworkbar.cxx
@@ -409,7 +409,7 @@ static void GetGeometryForCustomShape( SdrCustomShapeGeometryItem& rGeometryItem
void FontworkBar::execute( SdrView& rSdrView, SfxRequest const & rReq, SfxBindings& rBindings )
{
- const char* pStrResId = nullptr;
+ TranslateId pStrResId;
sal_uInt16 nSID = rReq.GetSlot();
switch( nSID )
diff --git a/svx/source/unodraw/unoprov.cxx b/svx/source/unodraw/unoprov.cxx
index 9cc61bcea7ae..a421268cdd4a 100644
--- a/svx/source/unodraw/unoprov.cxx
+++ b/svx/source/unodraw/unoprov.cxx
@@ -1118,7 +1118,7 @@ static const char* RID_SVXSTR_BMP_DEF[] =
RID_SVXSTR_BMP92_DEF
};
-static const char* RID_SVXSTR_BMP[] =
+const TranslateId RID_SVXSTR_BMP[] =
{
RID_SVXSTR_BMP0,
RID_SVXSTR_BMP1,
@@ -1251,7 +1251,7 @@ static const char* RID_SVXSTR_DASH_DEF[] =
};
-static const char* RID_SVXSTR_DASH[] =
+const TranslateId RID_SVXSTR_DASH[] =
{
RID_SVXSTR_DASH0,
RID_SVXSTR_DASH1,
@@ -1322,7 +1322,7 @@ static const char* RID_SVXSTR_LEND_DEF[] =
RID_SVXSTR_LEND31_DEF
};
-static const char* RID_SVXSTR_LEND[] =
+const TranslateId RID_SVXSTR_LEND[] =
{
RID_SVXSTR_LEND0,
RID_SVXSTR_LEND1,
@@ -1447,7 +1447,7 @@ static const char* RID_SVXSTR_GRDT_DEF[] =
RID_SVXSTR_GRDT84_DEF
};
-static const char* RID_SVXSTR_GRDT[] =
+const TranslateId RID_SVXSTR_GRDT[] =
{
RID_SVXSTR_GRDT0,
RID_SVXSTR_GRDT1,
@@ -1556,7 +1556,7 @@ static const char* RID_SVXSTR_HATCHS_DEF[] =
RID_SVXSTR_HATCH15_DEF
};
-static const char* RID_SVXSTR_HATCHS[] =
+const TranslateId RID_SVXSTR_HATCHS[] =
{
RID_SVXSTR_HATCH0,
RID_SVXSTR_HATCH1,
@@ -1581,12 +1581,12 @@ static const char* RID_SVXSTR_TRASNGR_DEF[] =
RID_SVXSTR_TRASNGR0_DEF
};
-static const char* RID_SVXSTR_TRASNGR[] =
+const TranslateId RID_SVXSTR_TRASNGR[] =
{
RID_SVXSTR_TRASNGR0
};
-static bool SvxUnoGetResourceRanges( const sal_uInt16 nWhich, const char**& pApiResIds, const char**& pIntResIds, int& nCount ) noexcept
+static bool SvxUnoGetResourceRanges( const sal_uInt16 nWhich, const char**& pApiResIds, const TranslateId*& pIntResIds, int& nCount ) noexcept
{
switch( nWhich )
{
@@ -1633,7 +1633,7 @@ static bool SvxUnoGetResourceRanges( const sal_uInt16 nWhich, const char**& pApi
}
/// @throws std::exception
-static bool SvxUnoConvertResourceString(const char **pSourceResIds, const char** pDestResIds, int nCount, OUString& rString, bool bToApi)
+static bool SvxUnoConvertResourceStringToApi(const TranslateId* pSourceResIds, const char** pDestResIds, int nCount, OUString& rString)
{
// first, calculate the search string length without an optional number after the name
sal_Int32 nLength = rString.getLength();
@@ -1663,39 +1663,67 @@ static bool SvxUnoConvertResourceString(const char **pSourceResIds, const char**
for (int i = 0; i < nCount; ++i)
{
- if (bToApi)
+ const OUString & aCompare = SvxResId(pSourceResIds[i]);
+ if( aShortString == aCompare )
{
- const OUString & aCompare = SvxResId(pSourceResIds[i]);
- if( aShortString == aCompare )
- {
- rString = rString.replaceAt( 0, aShortString.getLength(), OUString::createFromAscii(pDestResIds[i]) );
- return true;
- }
- else if( rString == aCompare )
- {
- rString = OUString::createFromAscii(pDestResIds[i]);
- return true;
- }
+ rString = rString.replaceAt( 0, aShortString.getLength(), OUString::createFromAscii(pDestResIds[i]) );
+ return true;
}
- else
+ else if( rString == aCompare )
{
- auto pCompare = pSourceResIds[i];
- if( aShortString.equalsAscii(pCompare) )
- {
- rString = rString.replaceAt( 0, aShortString.getLength(), SvxResId(pDestResIds[i]) );
- return true;
- }
- else if( rString.equalsAscii(pCompare) )
- {
- rString = SvxResId(pDestResIds[i]);
- return true;
- }
+ rString = OUString::createFromAscii(pDestResIds[i]);
+ return true;
}
}
return false;
}
+static bool SvxUnoConvertResourceStringFromApi(const char** pSourceResIds, const TranslateId* pDestResIds, int nCount, OUString& rString)
+{
+ // first, calculate the search string length without an optional number after the name
+ sal_Int32 nLength = rString.getLength();
+ while( nLength > 0 )
+ {
+ const sal_Unicode nChar = rString[ nLength - 1 ];
+ if( (nChar < '0') || (nChar > '9') )
+ break;
+
+ nLength--;
+ }
+
+ // if we cut off a number, also cut of some spaces
+ if( nLength != rString.getLength() )
+ {
+ while( nLength > 0 )
+ {
+ const sal_Unicode nChar = rString[ nLength - 1 ];
+ if( nChar != ' ' )
+ break;
+
+ nLength--;
+ }
+ }
+
+ const OUString aShortString( rString.copy( 0, nLength ) );
+
+ for (int i = 0; i < nCount; ++i)
+ {
+ auto pCompare = pSourceResIds[i];
+ if( aShortString.equalsAscii(pCompare) )
+ {
+ rString = rString.replaceAt( 0, aShortString.getLength(), SvxResId(pDestResIds[i]) );
+ return true;
+ }
+ else if( rString.equalsAscii(pCompare) )
+ {
+ rString = SvxResId(pDestResIds[i]);
+ return true;
+ }
+ }
+
+ return false;
+}
// #i122649# Some comments on the below arrays:
// - They need to have the same order and count of items
@@ -1812,7 +1840,7 @@ static const char* SvxUnoColorNameDefResId[] =
RID_SVXSTR_COLOR_LIBRE_YELLOW_ACCENT_DEF
};
-static const char* SvxUnoColorNameResId[] =
+const TranslateId SvxUnoColorNameResId[] =
{
RID_SVXSTR_COLOR_BLUEGREY,
RID_SVXSTR_COLOR_BLACK,
@@ -1917,7 +1945,7 @@ static const char* SvxUnoColorNameResId[] =
};
/// @throws std::exception
-static bool SvxUnoConvertResourceStringBuiltIn(const char** pSourceResIds, const char** pDestResIds, int nCount, OUString& rString, bool bToApi)
+static bool SvxUnoConvertResourceStringBuiltInToApi(const TranslateId* pSourceResIds, const char** pDestResIds, int nCount, OUString& rString)
{
//We replace e.g. "Gray 10%" with the translation of Gray, but we shouldn't
//replace "Red Hat 1" with the translation of Red :-)
@@ -1933,24 +1961,39 @@ static bool SvxUnoConvertResourceStringBuiltIn(const char** pSourceResIds, const
for(int i = 0; i < nCount; ++i )
{
- if (bToApi)
+ OUString aStrDefName = SvxResId(pSourceResIds[i]);
+ if( sStr == aStrDefName )
{
- OUString aStrDefName = SvxResId(pSourceResIds[i]);
- if( sStr == aStrDefName )
- {
- OUString aReplace = OUString::createFromAscii(pDestResIds[i]);
- rString = rString.replaceAt( 0, aStrDefName.getLength(), aReplace );
- return true;
- }
+ OUString aReplace = OUString::createFromAscii(pDestResIds[i]);
+ rString = rString.replaceAt( 0, aStrDefName.getLength(), aReplace );
+ return true;
}
- else
+ }
+
+ return false;
+}
+
+static bool SvxUnoConvertResourceStringBuiltInFromApi(const char** pSourceResIds, const TranslateId* pDestResIds, int nCount, OUString& rString)
+{
+ //We replace e.g. "Gray 10%" with the translation of Gray, but we shouldn't
+ //replace "Red Hat 1" with the translation of Red :-)
+ sal_Int32 nLength = rString.getLength();
+ while( nLength > 0 )
+ {
+ const sal_Unicode nChar = rString[nLength-1];
+ if (nChar != '%' && (nChar < '0' || nChar > '9'))
+ break;
+ nLength--;
+ }
+ OUString sStr = rString.copy(0, nLength).trim();
+
+ for(int i = 0; i < nCount; ++i )
+ {
+ if( sStr.equalsAscii(pSourceResIds[i]) )
{
- if( sStr.equalsAscii(pSourceResIds[i]) )
- {
- OUString aReplace = SvxResId(pDestResIds[i]);
- rString = rString.replaceAt( 0, strlen(pSourceResIds[i]), aReplace );
- return true;
- }
+ OUString aReplace = SvxResId(pDestResIds[i]);
+ rString = rString.replaceAt( 0, strlen(pSourceResIds[i]), aReplace );
+ return true;
}
}
@@ -1966,7 +2009,7 @@ OUString SvxUnogetApiNameForItem(const sal_uInt16 nWhich, const OUString& rInter
if( nWhich == sal_uInt16(XATTR_LINECOLOR) )
{
- if (SvxUnoConvertResourceStringBuiltIn(SvxUnoColorNameResId, SvxUnoColorNameDefResId, SAL_N_ELEMENTS(SvxUnoColorNameResId), aNew, true))
+ if (SvxUnoConvertResourceStringBuiltInToApi(SvxUnoColorNameResId, SvxUnoColorNameDefResId, SAL_N_ELEMENTS(SvxUnoColorNameResId), aNew))
{
return aNew;
}
@@ -1974,12 +2017,12 @@ OUString SvxUnogetApiNameForItem(const sal_uInt16 nWhich, const OUString& rInter
else
{
const char** pApiResIds;
- const char** pIntResIds;
+ const TranslateId* pIntResIds;
int nCount;
if( SvxUnoGetResourceRanges(nWhich, pApiResIds, pIntResIds, nCount))
{
- if (SvxUnoConvertResourceString(pIntResIds, pApiResIds, nCount, aNew, true))
+ if (SvxUnoConvertResourceStringToApi(pIntResIds, pApiResIds, nCount, aNew))
{
return aNew;
}
@@ -1999,7 +2042,7 @@ OUString SvxUnogetInternalNameForItem(const sal_uInt16 nWhich, const OUString& r
if( nWhich == sal_uInt16(XATTR_LINECOLOR) )
{
- if (SvxUnoConvertResourceStringBuiltIn(SvxUnoColorNameDefResId, SvxUnoColorNameResId, SAL_N_ELEMENTS(SvxUnoColorNameResId), aNew, false))
+ if (SvxUnoConvertResourceStringBuiltInFromApi(SvxUnoColorNameDefResId, SvxUnoColorNameResId, SAL_N_ELEMENTS(SvxUnoColorNameResId), aNew))
{
return aNew;
}
@@ -2007,12 +2050,12 @@ OUString SvxUnogetInternalNameForItem(const sal_uInt16 nWhich, const OUString& r
else
{
const char** pApiResIds;
- const char** pIntResIds;
+ const TranslateId* pIntResIds;
int nCount;
if (SvxUnoGetResourceRanges(nWhich, pApiResIds, pIntResIds, nCount))
{
- if (SvxUnoConvertResourceString(pApiResIds, pIntResIds, nCount, aNew, false))
+ if (SvxUnoConvertResourceStringFromApi(pApiResIds, pIntResIds, nCount, aNew))
{
return aNew;
}
diff --git a/svx/source/xoutdev/xattr.cxx b/svx/source/xoutdev/xattr.cxx
index 3057a8406038..fe9c280a62b2 100644
--- a/svx/source/xoutdev/xattr.cxx
+++ b/svx/source/xoutdev/xattr.cxx
@@ -125,7 +125,7 @@ NameOrIndex* NameOrIndex::Clone(SfxItemPool* /*pPool*/) const
Argument pPool2 can be null.
If returned string equals NameOrIndex->GetName(), the name was already unique.
*/
-OUString NameOrIndex::CheckNamedItem( const NameOrIndex* pCheckItem, const sal_uInt16 nWhich, const SfxItemPool* pPool1, SvxCompareValueFunc pCompareValueFunc, const char* pPrefixResId, const XPropertyListRef &pDefaults )
+OUString NameOrIndex::CheckNamedItem( const NameOrIndex* pCheckItem, const sal_uInt16 nWhich, const SfxItemPool* pPool1, SvxCompareValueFunc pCompareValueFunc, TranslateId pPrefixResId, const XPropertyListRef &pDefaults )
{
bool bForceNew = false;
@@ -354,7 +354,7 @@ bool XLineStyleItem::GetPresentation
{
rText.clear();
- const char* pId = nullptr;
+ TranslateId pId;
switch( GetValue() )
{
@@ -1756,7 +1756,7 @@ bool XFillStyleItem::GetPresentation
{
rText.clear();
- const char* pId = nullptr;
+ TranslateId pId;
switch( GetValue() )
{
diff --git a/svx/source/xoutdev/xattr2.cxx b/svx/source/xoutdev/xattr2.cxx
index f64230ef8134..30517283c748 100644
--- a/svx/source/xoutdev/xattr2.cxx
+++ b/svx/source/xoutdev/xattr2.cxx
@@ -101,7 +101,7 @@ bool XLineJointItem::GetPresentation( SfxItemPresentation /*ePres*/, MapUnit /*e
{
rText.clear();
- const char* pId = nullptr;
+ TranslateId pId;
switch( GetValue() )
{
@@ -256,7 +256,7 @@ XLineCapItem* XLineCapItem::Clone(SfxItemPool* /*pPool*/) const
bool XLineCapItem::GetPresentation( SfxItemPresentation /*ePres*/, MapUnit /*eCoreUnit*/,
MapUnit /*ePresUnit*/, OUString& rText, const IntlWrapper&) const
{
- const char* pId;
+ TranslateId pId;
switch( GetValue() )
{
diff --git a/svx/source/xoutdev/xattrbmp.cxx b/svx/source/xoutdev/xattrbmp.cxx
index b0f3e7ee49c3..97f0468f3ace 100644
--- a/svx/source/xoutdev/xattrbmp.cxx
+++ b/svx/source/xoutdev/xattrbmp.cxx
@@ -35,6 +35,7 @@
#include <com/sun/star/beans/PropertyValue.hpp>
#include <vcl/BitmapTools.hxx>
#include <vcl/GraphicLoader.hxx>
+#include <unotools/resmgr.hxx>
#include <libxml/xmlwriter.h>
diff --git a/sw/inc/AccessibilityCheckStrings.hrc b/sw/inc/AccessibilityCheckStrings.hrc
index 97e8c2120cad..2c098e50edc8 100644
--- a/sw/inc/AccessibilityCheckStrings.hrc
+++ b/sw/inc/AccessibilityCheckStrings.hrc
@@ -11,7 +11,7 @@
#ifndef INCLUDED_SW_INC_ACCESSIBILITY_CHECK_STRINGS_HRC
#define INCLUDED_SW_INC_ACCESSIBILITY_CHECK_STRINGS_HRC
-#define NC_(Context, String) reinterpret_cast<char const *>(Context "\004" u8##String)
+#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
#define STR_NO_ALT NC_("STR_NO_ALT", "No alt text for graphic '%OBJECT_NAME%'")
#define STR_TABLE_MERGE_SPLIT NC_("STR_TABLE_MERGE_SPLIT", "Table '%OBJECT_NAME%' contains merges or splits")
diff --git a/sw/inc/app.hrc b/sw/inc/app.hrc
index 9b195c02e60d..c5b32d444b9d 100644
--- a/sw/inc/app.hrc
+++ b/sw/inc/app.hrc
@@ -20,11 +20,11 @@
#ifndef INCLUDED_SW_INC_APP_HRC
#define INCLUDED_SW_INC_APP_HRC
-#define NC_(Context, String) reinterpret_cast<char const *>(Context "\004" u8##String)
+#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
#include <svl/style.hxx>
-const std::pair<const char*, SfxStyleSearchBits> RID_PARAGRAPHSTYLEFAMILY[] =
+const std::pair<TranslateId, SfxStyleSearchBits> RID_PARAGRAPHSTYLEFAMILY[] =
{
{ NC_("RID_PARAGRAPHSTYLEFAMILY", "All Styles") , SfxStyleSearchBits::AllVisible },
{ NC_("RID_PARAGRAPHSTYLEFAMILY", "Hidden Styles") , SfxStyleSearchBits::Hidden },
@@ -38,52 +38,52 @@ const std::pair<const char*, SfxStyleSearchBits> RID_PARAGRAPHSTYLEFAMILY[] =
{ NC_("RID_PARAGRAPHSTYLEFAMILY", "Special Styles") , SfxStyleSearchBits::SwExtra },
{ NC_("RID_PARAGRAPHSTYLEFAMILY", "HTML Styles") , SfxStyleSearchBits::SwHtml },
{ NC_("RID_PARAGRAPHSTYLEFAMILY", "Conditional Styles") , SfxStyleSearchBits::SwCondColl },
- { nullptr, SfxStyleSearchBits::Auto }
+ { {}, SfxStyleSearchBits::Auto }
};
-const std::pair<const char*, SfxStyleSearchBits> RID_CHARACTERSTYLEFAMILY[] =
+const std::pair<TranslateId, SfxStyleSearchBits> RID_CHARACTERSTYLEFAMILY[] =
{
{ NC_("RID_CHARACTERSTYLEFAMILY", "All Styles") , SfxStyleSearchBits::AllVisible },
{ NC_("RID_CHARACTERSTYLEFAMILY", "Hidden Styles") , SfxStyleSearchBits::Hidden },
{ NC_("RID_CHARACTERSTYLEFAMILY", "Applied Styles") , SfxStyleSearchBits::Used },
{ NC_("RID_CHARACTERSTYLEFAMILY", "Custom Styles") , SfxStyleSearchBits::UserDefined },
- { nullptr, SfxStyleSearchBits::Auto }
+ { {}, SfxStyleSearchBits::Auto }
};
-const std::pair<const char*, SfxStyleSearchBits> RID_FRAMESTYLEFAMILY[] =
+const std::pair<TranslateId, SfxStyleSearchBits> RID_FRAMESTYLEFAMILY[] =
{
{ NC_("RID_FRAMESTYLEFAMILY", "All Styles") , SfxStyleSearchBits::AllVisible },
{ NC_("RID_FRAMESTYLEFAMILY", "Hidden Styles") , SfxStyleSearchBits::Hidden },
{ NC_("RID_FRAMESTYLEFAMILY", "Applied Styles") , SfxStyleSearchBits::Used },
{ NC_("RID_FRAMESTYLEFAMILY", "Custom Styles") , SfxStyleSearchBits::UserDefined },
- { nullptr, SfxStyleSearchBits::Auto }
+ { {}, SfxStyleSearchBits::Auto }
};
-const std::pair<const char*, SfxStyleSearchBits> RID_PAGESTYLEFAMILY[] =
+const std::pair<TranslateId, SfxStyleSearchBits> RID_PAGESTYLEFAMILY[] =
{
{ NC_("RID_PAGESTYLEFAMILY", "All Styles") , SfxStyleSearchBits::AllVisible },
{ NC_("RID_PAGESTYLEFAMILY", "Hidden Styles") , SfxStyleSearchBits::Hidden },
{ NC_("RID_PAGESTYLEFAMILY", "Applied Styles") , SfxStyleSearchBits::Used },
{ NC_("RID_PAGESTYLEFAMILY", "Custom Styles") , SfxStyleSearchBits::UserDefined },
- { nullptr, SfxStyleSearchBits::Auto }
+ { {}, SfxStyleSearchBits::Auto }
};
-const std::pair<const char*, SfxStyleSearchBits> RID_LISTSTYLEFAMILY[] =
+const std::pair<TranslateId, SfxStyleSearchBits> RID_LISTSTYLEFAMILY[] =
{
{ NC_("RID_LISTSTYLEFAMILY", "All Styles") , SfxStyleSearchBits::AllVisible },
{ NC_("RID_LISTSTYLEFAMILY", "Hidden Styles") , SfxStyleSearchBits::Hidden },
{ NC_("RID_LISTSTYLEFAMILY", "Applied Styles") , SfxStyleSearchBits::Used },
{ NC_("RID_LISTSTYLEFAMILY", "Custom Styles") , SfxStyleSearchBits::UserDefined },
- { nullptr, SfxStyleSearchBits::Auto }
+ { {}, SfxStyleSearchBits::Auto }
};
-const std::pair<const char*, SfxStyleSearchBits> RID_TABLESTYLEFAMILY[] =
+const std::pair<TranslateId, SfxStyleSearchBits> RID_TABLESTYLEFAMILY[] =
{
{ NC_("RID_TABLESTYLEFAMILY", "All Styles") , SfxStyleSearchBits::AllVisible },
{ NC_("RID_TABLESTYLEFAMILY", "Hidden Styles") , SfxStyleSearchBits::Hidden },
{ NC_("RID_TABLESTYLEFAMILY", "Applied Styles") , SfxStyleSearchBits::Used },
{ NC_("RID_TABLESTYLEFAMILY", "Custom Styles") , SfxStyleSearchBits::UserDefined },
- { nullptr, SfxStyleSearchBits::Auto }
+ { {}, SfxStyleSearchBits::Auto }
};
#endif
diff --git a/sw/inc/cnttab.hrc b/sw/inc/cnttab.hrc
index f0823fd24997..ccb469092899 100644
--- a/sw/inc/cnttab.hrc
+++ b/sw/inc/cnttab.hrc
@@ -22,9 +22,9 @@
#include "tox.hxx"
-#define NC_(Context, String) reinterpret_cast<char const *>(Context "\004" u8##String)
+#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
-const std::pair<const char*, SwTOOElements> RES_SRCTYPES[] =
+const std::pair<TranslateId, SwTOOElements> RES_SRCTYPES[] =
{
{ NC_("RES_SRCTYPES", "%PRODUCTNAME Math"), SwTOOElements::Math},
{ NC_("RES_SRCTYPES", "%PRODUCTNAME Chart"), SwTOOElements::Chart},
diff --git a/sw/inc/dbui.hrc b/sw/inc/dbui.hrc
index 778f229ed4f3..4abc1148755d 100644
--- a/sw/inc/dbui.hrc
+++ b/sw/inc/dbui.hrc
@@ -21,8 +21,10 @@
#define INCLUDED_SW_INC_DBUI_HRC
#include <utility>
+#include <unotools/resmgr.hxx>
-#define NC_(Context, String) reinterpret_cast<char const *>(Context "\004" u8##String)
+
+#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
// Elements -----------------------------------------------------------------
#define MM_PART_TITLE 0
@@ -40,7 +42,7 @@
#define MM_PART_E_MAIL 12
#define MM_PART_GENDER 13
-const std::pair<const char*, int> SA_ADDRESS_HEADER[] =
+const std::pair<TranslateId, int> SA_ADDRESS_HEADER[] =
{
{ NC_("SA_ADDRESS_HEADER", "Title") , MM_PART_TITLE },
{ NC_("SA_ADDRESS_HEADER", "First Name") , MM_PART_FIRSTNAME },
diff --git a/sw/inc/error.hrc b/sw/inc/error.hrc
index b2d55025ca25..c6db37c65fea 100644
--- a/sw/inc/error.hrc
+++ b/sw/inc/error.hrc
@@ -25,7 +25,7 @@
#include "swerror.h"
-#define NC_(Context, String) reinterpret_cast<char const *>(Context "\004" u8##String)
+#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
#define ERR_CODE( class, err ) ErrCode(ErrCodeArea::Sw, class, err.GetCode())
#define WARN_CODE( class, err ) ErrCode(ErrCodeArea::Sw, class, err.GetCode())
@@ -58,7 +58,7 @@ const ErrMsgCode RID_SW_ERRHDL[] =
{ NC_("RID_SW_ERRHDL", "This HTML document contains Basic macros.\nThey were not saved with the current export settings."), WARN_SWG_HTML_NO_MACROS },
{ NC_("RID_SW_ERRHDL", "Error in writing sub-document $(ARG1)."), WARN_WRITE_ERROR_FILE },
{ NC_("RID_SW_ERRHDL", "Format error discovered in the file in sub-document $(ARG1) at $(ARG2)(row,col)."), WARN_FORMAT_FILE_ROWCOL },
- { nullptr, ERRCODE_NONE }
+ { {}, ERRCODE_NONE }
};
#endif
diff --git a/sw/inc/flddinf.hrc b/sw/inc/flddinf.hrc
index c9b1f3f6ac43..bc9dfcc69f57 100644
--- a/sw/inc/flddinf.hrc
+++ b/sw/inc/flddinf.hrc
@@ -20,9 +20,9 @@
#ifndef INCLUDED_SW_INC_FLDDINF_HRC
#define INCLUDED_SW_INC_FLDDINF_HRC
-#define NC_(Context, String) reinterpret_cast<char const *>(Context "\004" u8##String)
+#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
-const char* FLD_SELECT[] =
+const TranslateId FLD_SELECT[] =
{
NC_("flddocinfopage|liststore1", "Author"),
NC_("flddocinfopage|liststore1", "Time"),
diff --git a/sw/inc/fldref.hrc b/sw/inc/fldref.hrc
index 9dca24fa88c1..ad519bcbbf2d 100644
--- a/sw/inc/fldref.hrc
+++ b/sw/inc/fldref.hrc
@@ -20,9 +20,9 @@
#ifndef INCLUDED_SW_INC_FLDREF_HRC
#define INCLUDED_SW_INC_FLDREF_HRC
-#define NC_(Context, String) reinterpret_cast<char const *>(Context "\004" u8##String)
+#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
-const char* FLD_REF_PAGE_TYPES[] =
+const TranslateId FLD_REF_PAGE_TYPES[] =
{
NC_("fldrefpage|liststore1", "Bookmarks"),
NC_("fldrefpage|liststore1", "Footnotes"),
diff --git a/sw/inc/inspectorproperties.hrc b/sw/inc/inspectorproperties.hrc
index 0def6ab41780..03c2cc8c60b4 100644
--- a/sw/inc/inspectorproperties.hrc
+++ b/sw/inc/inspectorproperties.hrc
@@ -19,8 +19,8 @@
#pragma once
-#define NC_(Context, String) reinterpret_cast<char const *>(Context "\004" u8##String)
-#define NNC_(Context, StringSingular, StringPlural) reinterpret_cast<char const *>(Context "\004" u8##StringSingular "\004" u8##StringPlural)
+#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
+#define NNC_(Context, StringSingular, StringPlural) TranslateNId(Context, reinterpret_cast<char const *>(u8##StringSingular), reinterpret_cast<char const *>(u8##StringPlural))
/*--------------------------------------------------------------------
Description: API names for Paragraph, Character
diff --git a/sw/inc/mdiexp.hxx b/sw/inc/mdiexp.hxx
index dea2b4361825..4706810617fe 100644
--- a/sw/inc/mdiexp.hxx
+++ b/sw/inc/mdiexp.hxx
@@ -23,6 +23,7 @@
#include <tools/long.hxx>
#include "tblenum.hxx"
#include "swdllapi.h"
+#include <unotools/resmgr.hxx>
class SwRect;
class Size;
@@ -39,7 +40,7 @@ extern void PageNumNotify(SwViewShell const * pVwSh);
enum FlyMode { FLY_DRAG_START, FLY_DRAG, FLY_DRAG_END };
extern void FrameNotify( SwViewShell* pVwSh, FlyMode eMode = FLY_DRAG );
-SW_DLLPUBLIC void StartProgress(const char* pMessId, tools::Long nStartVal, tools::Long nEndVal, SwDocShell *pDocSh = nullptr);
+SW_DLLPUBLIC void StartProgress(TranslateId pMessId, tools::Long nStartVal, tools::Long nEndVal, SwDocShell *pDocSh = nullptr);
SW_DLLPUBLIC void EndProgress ( SwDocShell const *pDocSh );
SW_DLLPUBLIC void SetProgressState ( tools::Long nPosition, SwDocShell const *pDocShell );
void RescheduleProgress( SwDocShell const *pDocShell );
diff --git a/sw/inc/mmaddressblockpage.hrc b/sw/inc/mmaddressblockpage.hrc
index ba026a890411..a1b914c6eea4 100644
--- a/sw/inc/mmaddressblockpage.hrc
+++ b/sw/inc/mmaddressblockpage.hrc
@@ -20,16 +20,16 @@
#ifndef INCLUDED_SW_INC_MMADDRESSBLOCK_HRC
#define INCLUDED_SW_INC_MMADDRESSBLOCK_HRC
-#define NC_(Context, String) reinterpret_cast<char const *>(Context "\004" u8##String)
+#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
-const char* RA_SALUTATION[] =
+const TranslateId RA_SALUTATION[] =
{
NC_("RA_SALUTATION", "Dear"),
NC_("RA_SALUTATION", "Hello"),
NC_("RA_SALUTATION", "Hi")
};
-const char* RA_PUNCTUATION[] =
+const TranslateId RA_PUNCTUATION[] =
{
NC_("RA_PUNCTUATION", ","),
NC_("RA_PUNCTUATION", ":"),
diff --git a/sw/inc/optload.hrc b/sw/inc/optload.hrc
index 201fbff5986c..a86d7ac57246 100644
--- a/sw/inc/optload.hrc
+++ b/sw/inc/optload.hrc
@@ -23,9 +23,9 @@
#include <tools/fldunit.hxx>
#include <utility>
-#define NC_(Context, String) reinterpret_cast<char const *>(Context "\004" u8##String)
+#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
-const std::pair<const char*, FieldUnit> STR_ARR_METRIC[] =
+const std::pair<TranslateId, FieldUnit> STR_ARR_METRIC[] =
{
{ NC_("STR_ARR_METRIC", "Millimeter") , FieldUnit::MM },
{ NC_("STR_ARR_METRIC", "Centimeter") , FieldUnit::CM },
diff --git a/sw/inc/outline.hrc b/sw/inc/outline.hrc
index c3202a39e404..65c180cac3e0 100644
--- a/sw/inc/outline.hrc
+++ b/sw/inc/outline.hrc
@@ -20,9 +20,9 @@
#ifndef INCLUDED_SW_INC_OUTLINE_HRC
#define INCLUDED_SW_INC_OUTLINE_HRC
-#define NC_(Context, String) reinterpret_cast<char const *>(Context "\004" u8##String)
+#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
-const char* OUTLINE_STYLE[] =
+const TranslateId OUTLINE_STYLE[] =
{
NC_("numberingnamedialog|liststore1", "Untitled 1"),
NC_("numberingnamedialog|liststore1", "Untitled 2"),
diff --git a/sw/inc/pageformatpanel.hrc b/sw/inc/pageformatpanel.hrc
index 97ccdee9e844..34296c7615e6 100644
--- a/sw/inc/pageformatpanel.hrc
+++ b/sw/inc/pageformatpanel.hrc
@@ -10,7 +10,7 @@
#ifndef INCLUDED_SW_INC_PAGEFORMATPANEL_HRC
#define INCLUDED_SW_INC_PAGEFORMATPANEL_HRC
-#define NC_(Context, String) reinterpret_cast<char const *>(Context "\004" u8##String)
+#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
#include <utility>
@@ -18,7 +18,7 @@ namespace sw
{
// To translators: this is a listbox labelled by "Margins:", inch units
-const std::pair<const char*, int> RID_PAGEFORMATPANEL_MARGINS_INCH[] =
+const std::pair<TranslateId, int> RID_PAGEFORMATPANEL_MARGINS_INCH[] =
{
{ NC_("RID_PAGEFORMATPANEL_MARGINS_INCH", "None"), 0 },
{ NC_("RID_PAGEFORMATPANEL_MARGINS_INCH", "Narrow"), 0 },
@@ -34,7 +34,7 @@ const std::pair<const char*, int> RID_PAGEFORMATPANEL_MARGINS_INCH[] =
};
// To translators: this is a listbox labelled by "Margins:", cm units
-const std::pair<const char*, int> RID_PAGEFORMATPANEL_MARGINS_CM[] =
+const std::pair<TranslateId, int> RID_PAGEFORMATPANEL_MARGINS_CM[] =
{
{ NC_("RID_PAGEFORMATPANEL_MARGINS_CM", "None"), 0 },
{ NC_("RID_PAGEFORMATPANEL_MARGINS_CM", "Narrow"), 0 },
diff --git a/sw/inc/strings.hrc b/sw/inc/strings.hrc
index a7981f2c9929..4d374a5591f5 100644
--- a/sw/inc/strings.hrc
+++ b/sw/inc/strings.hrc
@@ -20,8 +20,8 @@
#ifndef INCLUDED_SW_INC_STRINGS_HRC
#define INCLUDED_SW_INC_STRINGS_HRC
-#define NC_(Context, String) reinterpret_cast<char const *>(Context "\004" u8##String)
-#define NNC_(Context, StringSingular, StringPlural) reinterpret_cast<char const *>(Context "\004" u8##StringSingular "\004" u8##StringPlural)
+#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
+#define NNC_(Context, StringSingular, StringPlural) TranslateNId(Context, reinterpret_cast<char const *>(u8##StringSingular), reinterpret_cast<char const *>(u8##StringPlural))
// Dialog buttons
#define STR_STANDARD_LABEL NC_("STR_STANDARD_LABEL", "Reset to ~Parent")
diff --git a/sw/inc/swtypes.hxx b/sw/inc/swtypes.hxx
index dd15ce03bb88..81ad502b82be 100644
--- a/sw/inc/swtypes.hxx
+++ b/sw/inc/swtypes.hxx
@@ -28,6 +28,7 @@
#include <i18nlangtag/lang.h>
#include <vcl/outdev.hxx>
#include <svx/flagsdef.hxx>
+#include <unotools/resmgr.hxx>
namespace com::sun::star {
namespace linguistic2{
@@ -109,8 +110,8 @@ constexpr short lOutlineMinTextDistance = 216; // 0.15 inch = 0.38 cm
#define INIT_SEQ_FLDTYPES 5
// defined in sw/source/uibase/app/swmodule.cxx
-SW_DLLPUBLIC OUString SwResId(std::string_view aId);
-OUString SwResId(std::string_view aId, int nCardinality);
+SW_DLLPUBLIC OUString SwResId(TranslateId aId);
+OUString SwResId(TranslateNId aContextSingularPlural, int nCardinality);
css::uno::Reference< css::linguistic2::XSpellChecker1 > GetSpellChecker();
css::uno::Reference< css::linguistic2::XHyphenator > GetHyphenator();
diff --git a/sw/inc/utlui.hrc b/sw/inc/utlui.hrc
index 5bf81226392d..a14e1452bc38 100644
--- a/sw/inc/utlui.hrc
+++ b/sw/inc/utlui.hrc
@@ -20,9 +20,9 @@
#ifndef INCLUDED_SW_INC_UTLUI_HRC
#define INCLUDED_SW_INC_UTLUI_HRC
-#define NC_(Context, String) reinterpret_cast<char const *>(Context "\004" u8##String)
+#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
-const char* RID_SHELLRES_AUTOFMTSTRS[] =
+const TranslateId RID_SHELLRES_AUTOFMTSTRS[] =
{
NC_("RID_SHELLRES_AUTOFMTSTRS", "Remove empty paragraphs"),
NC_("RID_SHELLRES_AUTOFMTSTRS", "Use replacement table"),
diff --git a/sw/source/core/access/acccontext.cxx b/sw/source/core/access/acccontext.cxx
index dde550ef2b9e..ecfcc65b60bc 100644
--- a/sw/source/core/access/acccontext.cxx
+++ b/sw/source/core/access/acccontext.cxx
@@ -1434,7 +1434,7 @@ bool SwAccessibleContext::Select( SwPaM *pPaM, SdrObject *pObj,
return bRet;
}
-OUString SwAccessibleContext::GetResource(const char* pResId,
+OUString SwAccessibleContext::GetResource(TranslateId pResId,
const OUString *pArg1,
const OUString *pArg2)
{
diff --git a/sw/source/core/access/acccontext.hxx b/sw/source/core/access/acccontext.hxx
index a77cf6cb74b6..999f57374afc 100644
--- a/sw/source/core/access/acccontext.hxx
+++ b/sw/source/core/access/acccontext.hxx
@@ -26,6 +26,7 @@
#include <com/sun/star/accessibility/XAccessibleEventBroadcaster.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <cppuhelper/implbase.hxx>
+#include <unotools/resmgr.hxx>
#include <memory>
#include <mutex>
@@ -353,7 +354,7 @@ public:
virtual bool SetSelectedState(bool bSeleted);
bool IsSeletedInDoc() const { return m_isSelectedInDoc; }
- static OUString GetResource(const char* pResId,
+ static OUString GetResource(TranslateId pResId,
const OUString *pArg1 = nullptr,
const OUString *pArg2 = nullptr);
};
diff --git a/sw/source/core/access/accfootnote.cxx b/sw/source/core/access/accfootnote.cxx
index 43d8a2b6e10c..6fb7ebca864c 100644
--- a/sw/source/core/access/accfootnote.cxx
+++ b/sw/source/core/access/accfootnote.cxx
@@ -46,7 +46,7 @@ SwAccessibleFootnote::SwAccessibleFootnote(
bIsEndnote ? AccessibleRole::END_NOTE : AccessibleRole::FOOTNOTE,
pFootnoteFrame )
{
- const char* pResId = bIsEndnote ? STR_ACCESS_ENDNOTE_NAME
+ TranslateId pResId = bIsEndnote ? STR_ACCESS_ENDNOTE_NAME
: STR_ACCESS_FOOTNOTE_NAME;
OUString sArg;
@@ -71,7 +71,7 @@ OUString SAL_CALL SwAccessibleFootnote::getAccessibleDescription()
ThrowIfDisposed();
- const char* pResId = AccessibleRole::END_NOTE == GetRole()
+ TranslateId pResId = AccessibleRole::END_NOTE == GetRole()
? STR_ACCESS_ENDNOTE_DESC
: STR_ACCESS_FOOTNOTE_DESC ;
diff --git a/sw/source/core/access/accheaderfooter.cxx b/sw/source/core/access/accheaderfooter.cxx
index bf1f8bf6d2ad..d07b2c80255e 100644
--- a/sw/source/core/access/accheaderfooter.cxx
+++ b/sw/source/core/access/accheaderfooter.cxx
@@ -62,7 +62,7 @@ OUString SAL_CALL SwAccessibleHeaderFooter::getAccessibleDescription()
ThrowIfDisposed();
- const char* pResId = AccessibleRole::HEADER == GetRole()
+ TranslateId pResId = AccessibleRole::HEADER == GetRole()
? STR_ACCESS_HEADER_DESC
: STR_ACCESS_FOOTER_DESC ;
diff --git a/sw/source/core/doc/DocumentStylePoolManager.cxx b/sw/source/core/doc/DocumentStylePoolManager.cxx
index 9238622db126..c69df3adc003 100644
--- a/sw/source/core/doc/DocumentStylePoolManager.cxx
+++ b/sw/source/core/doc/DocumentStylePoolManager.cxx
@@ -280,7 +280,7 @@ namespace
}
}
-static const char* STR_POOLCOLL_TEXT_ARY[] =
+const TranslateId STR_POOLCOLL_TEXT_ARY[] =
{
// Category Text
STR_POOLCOLL_STANDARD,
@@ -306,7 +306,7 @@ static const char* STR_POOLCOLL_TEXT_ARY[] =
STR_POOLCOLL_HEADLINE10
};
-static const char* STR_POOLCOLL_LISTS_ARY[]
+const TranslateId STR_POOLCOLL_LISTS_ARY[]
{
// Category Lists
STR_POOLCOLL_NUMBER_BULLET_BASE,
@@ -356,7 +356,7 @@ static const char* STR_POOLCOLL_LISTS_ARY[]
};
// Special Areas
-static const char* STR_POOLCOLL_EXTRA_ARY[]
+const TranslateId STR_POOLCOLL_EXTRA_ARY[]
{
// Subcategory Header
STR_POOLCOLL_HEADERFOOTER,
@@ -385,7 +385,7 @@ static const char* STR_POOLCOLL_EXTRA_ARY[]
STR_POOLCOLL_LABEL_DRAWING
};
-static const char* STR_POOLCOLL_REGISTER_ARY[] =
+const TranslateId STR_POOLCOLL_REGISTER_ARY[] =
{
// Category Directories
STR_POOLCOLL_REGISTER_BASE,
@@ -435,7 +435,7 @@ static const char* STR_POOLCOLL_REGISTER_ARY[] =
STR_POOLCOLL_TOX_USER10
};
-static const char* STR_POOLCOLL_DOC_ARY[] =
+const TranslateId STR_POOLCOLL_DOC_ARY[] =
{
// Category Chapter/Document
STR_POOLCOLL_DOC_TITLE,
@@ -443,7 +443,7 @@ static const char* STR_POOLCOLL_DOC_ARY[] =
STR_POOLCOLL_DOC_APPENDIX
};
-static const char* STR_POOLCOLL_HTML_ARY[] =
+const TranslateId STR_POOLCOLL_HTML_ARY[] =
{
// Category HTML-Templates
STR_POOLCOLL_HTML_BLOCKQUOTE,
@@ -453,7 +453,7 @@ static const char* STR_POOLCOLL_HTML_ARY[] =
STR_POOLCOLL_HTML_DT
};
-static const char* STR_POOLCHR_ARY[] =
+const TranslateId STR_POOLCHR_ARY[] =
{
STR_POOLCHR_FOOTNOTE,
STR_POOLCHR_PAGENO,
@@ -474,7 +474,7 @@ static const char* STR_POOLCHR_ARY[] =
STR_POOLCHR_VERT_NUM
};
-static const char* STR_POOLCHR_HTML_ARY[] =
+const TranslateId STR_POOLCHR_HTML_ARY[] =
{
STR_POOLCHR_HTML_EMPHASIS,
STR_POOLCHR_HTML_CITATION,
@@ -487,7 +487,7 @@ static const char* STR_POOLCHR_HTML_ARY[] =
STR_POOLCHR_HTML_TELETYPE
};
-static const char* STR_POOLFRM_ARY[] =
+const TranslateId STR_POOLFRM_ARY[] =
{
STR_POOLFRM_FRAME,
STR_POOLFRM_GRAPHIC,
@@ -498,7 +498,7 @@ static const char* STR_POOLFRM_ARY[] =
STR_POOLFRM_LABEL
};
-static const char* STR_POOLPAGE_ARY[] =
+const TranslateId STR_POOLPAGE_ARY[] =
{
// Page styles
STR_POOLPAGE_STANDARD,
@@ -513,7 +513,7 @@ static const char* STR_POOLPAGE_ARY[] =
STR_POOLPAGE_LANDSCAPE
};
-static const char* STR_POOLNUMRULE_NUM_ARY[] =
+const TranslateId STR_POOLNUMRULE_NUM_ARY[] =
{
// Numbering styles
STR_POOLNUMRULE_NOLIST,
@@ -532,7 +532,7 @@ static const char* STR_POOLNUMRULE_NUM_ARY[] =
// XXX MUST match the entries of TableStyleProgNameTable in
// sw/source/core/doc/SwStyleNameMapper.cxx and MUST match the order of
// RES_POOL_TABLESTYLE_TYPE in sw/inc/poolfmt.hxx
-static const char* STR_TABSTYLE_ARY[] =
+const TranslateId STR_TABSTYLE_ARY[] =
{
// XXX MUST be in order, Writer first, then Svx old, then Svx new
// 1 Writer resource string
@@ -610,7 +610,7 @@ SwTextFormatColl* DocumentStylePoolManager::GetTextCollFromPool( sal_uInt16 nId,
}
// Didn't find it until here -> create anew
- const char* pResId = nullptr;
+ TranslateId pResId;
if (RES_POOLCOLL_TEXT_BEGIN <= nId && nId < RES_POOLCOLL_TEXT_END)
{
static_assert(SAL_N_ELEMENTS(STR_POOLCOLL_TEXT_ARY) == RES_POOLCOLL_TEXT_END - RES_POOLCOLL_TEXT_BEGIN, "### unexpected size!");
@@ -1437,7 +1437,7 @@ SwFormat* DocumentStylePoolManager::GetFormatFromPool( sal_uInt16 nId )
SwFormatsBase* pArray[ 2 ];
sal_uInt16 nArrCnt = 1;
- const char* pRCId = nullptr;
+ TranslateId pRCId;
WhichRangesContainer const* pWhichRange;
switch( nId & (COLL_GET_RANGE_BITS + POOLGRP_NOCOLLID) )
@@ -2574,7 +2574,7 @@ DocumentStylePoolManager::~DocumentStylePoolManager()
}
static std::vector<OUString>
-lcl_NewUINameArray(const char** pIds, const size_t nLen, const size_t nSvxIds = 0)
+lcl_NewUINameArray(const TranslateId* pIds, const size_t nLen, const size_t nSvxIds = 0)
{
assert(nSvxIds <= nLen);
const size_t nWriterIds = nLen - nSvxIds;
diff --git a/sw/source/core/doc/doclay.cxx b/sw/source/core/doc/doclay.cxx
index a566ee51e112..091fc3bc743f 100644
--- a/sw/source/core/doc/doclay.cxx
+++ b/sw/source/core/doc/doclay.cxx
@@ -1326,7 +1326,7 @@ namespace
}
}
-static OUString lcl_GetUniqueFlyName(const SwDoc& rDoc, const char* pDefStrId, sal_uInt16 eType)
+static OUString lcl_GetUniqueFlyName(const SwDoc& rDoc, TranslateId pDefStrId, sal_uInt16 eType)
{
assert(eType >= RES_FMT_BEGIN && eType < RES_FMT_END);
if (rDoc.IsInMailMerge())
@@ -1388,7 +1388,7 @@ OUString SwDoc::GetUniqueShapeName() const
OUString SwDoc::GetUniqueDrawObjectName() const
{
- return lcl_GetUniqueFlyName(*this, "DrawObject", RES_DRAWFRMFMT);
+ return lcl_GetUniqueFlyName(*this, TranslateId(nullptr, "DrawObject"), RES_DRAWFRMFMT);
}
const SwFlyFrameFormat* SwDoc::FindFlyByName( const OUString& rName, SwNodeType nNdTyp ) const
@@ -1422,7 +1422,7 @@ void SwDoc::SetFlyName( SwFlyFrameFormat& rFormat, const OUString& rName )
OUString sName( rName );
if( sName.isEmpty() || FindFlyByName( sName ) )
{
- const char* pTyp = STR_FRAME_DEFNAME;
+ TranslateId pTyp = STR_FRAME_DEFNAME;
const SwNodeIndex* pIdx = rFormat.GetContent().GetContentIdx();
if( pIdx && pIdx->GetNode().GetNodes().IsDocNodes() )
{
diff --git a/sw/source/core/doc/docredln.cxx b/sw/source/core/doc/docredln.cxx
index 72dff3406e96..27fbb81534f5 100644
--- a/sw/source/core/doc/docredln.cxx
+++ b/sw/source/core/doc/docredln.cxx
@@ -966,7 +966,7 @@ void SwRedlineData::SetExtraData( const SwRedlineExtraData* pData )
m_pExtraData = nullptr;
}
-static const char* STR_REDLINE_ARY[] =
+const TranslateId STR_REDLINE_ARY[] =
{
STR_UNDO_REDLINE_INSERT,
STR_UNDO_REDLINE_DELETE,
diff --git a/sw/source/core/doc/notxtfrm.cxx b/sw/source/core/doc/notxtfrm.cxx
index d95314b19961..40556d557612 100644
--- a/sw/source/core/doc/notxtfrm.cxx
+++ b/sw/source/core/doc/notxtfrm.cxx
@@ -1306,7 +1306,7 @@ void SwNoTextFrame::PaintPicture( vcl::RenderContext* pOut, const SwRect &rGrfAr
}
else
{
- const char* pResId = nullptr;
+ TranslateId pResId;
if( GraphicType::NONE == rGrfObj.GetType() )
pResId = STR_COMCORE_READERROR;
diff --git a/sw/source/core/fields/reffld.cxx b/sw/source/core/fields/reffld.cxx
index 2340c1313d0f..330e5871c3ac 100644
--- a/sw/source/core/fields/reffld.cxx
+++ b/sw/source/core/fields/reffld.cxx
@@ -1038,7 +1038,7 @@ void SwGetRefField::ConvertProgrammaticToUIName()
return;
sal_uInt16 nPoolId = SwStyleNameMapper::GetPoolIdFromProgName( rPar1, SwGetPoolIdFromName::TxtColl );
- const char* pResId = nullptr;
+ TranslateId pResId;
switch( nPoolId )
{
case RES_POOLCOLL_LABEL_ABB:
diff --git a/sw/source/core/frmedt/feshview.cxx b/sw/source/core/frmedt/feshview.cxx
index ab185b70d893..cf9832887d33 100644
--- a/sw/source/core/frmedt/feshview.cxx
+++ b/sw/source/core/frmedt/feshview.cxx
@@ -110,7 +110,7 @@ using namespace com::sun::star;
namespace {
-::basegfx::B2DPolyPolygon getPolygon(const char* pResId, const SdrModel& rModel)
+::basegfx::B2DPolyPolygon getPolygon(TranslateId pResId, const SdrModel& rModel)
{
::basegfx::B2DPolyPolygon aRetval;
XLineEndListRef pLineEndList(rModel.GetLineEndList());
diff --git a/sw/source/core/layout/pagedesc.cxx b/sw/source/core/layout/pagedesc.cxx
index 036f20da411c..120b43f10963 100644
--- a/sw/source/core/layout/pagedesc.cxx
+++ b/sw/source/core/layout/pagedesc.cxx
@@ -558,7 +558,7 @@ void SwPageDesc::RemoveStashedFormat(bool bHeader, bool bLeft, bool bFirst)
}
// Page styles
-static const char* STR_POOLPAGE[] =
+const TranslateId STR_POOLPAGE[] =
{
STR_POOLPAGE_STANDARD,
STR_POOLPAGE_FIRST,
diff --git a/sw/source/core/tox/tox.cxx b/sw/source/core/tox/tox.cxx
index d789f91f171b..f24cfdaab814 100644
--- a/sw/source/core/tox/tox.cxx
+++ b/sw/source/core/tox/tox.cxx
@@ -226,7 +226,7 @@ SwTOXType::SwTOXType(const SwTOXType& rCopy)
pRegisteredIn->Add(this);
}
-static const char* STR_POOLCOLL_TOX_ARY[] =
+const TranslateId STR_POOLCOLL_TOX_ARY[] =
{
// Subcategory Index-Directories
STR_POOLCOLL_TOX_IDXH,
@@ -236,7 +236,7 @@ static const char* STR_POOLCOLL_TOX_ARY[] =
STR_POOLCOLL_TOX_IDXBREAK
};
-static const char* STR_POOLCOLL_TOX_CNTNT_ARY[] =
+const TranslateId STR_POOLCOLL_TOX_CNTNT_ARY[] =
{
// Subcategory Tables of Contents
STR_POOLCOLL_TOX_CNTNTH,
@@ -247,7 +247,7 @@ static const char* STR_POOLCOLL_TOX_CNTNT_ARY[] =
STR_POOLCOLL_TOX_CNTNT5
};
-static const char* STR_POOLCOLL_TOX_CNTNT_EXTRA_ARY[] =
+const TranslateId STR_POOLCOLL_TOX_CNTNT_EXTRA_ARY[] =
{
// Subcategory Table of Contents more Levels 5 - 10
STR_POOLCOLL_TOX_CNTNT6,
@@ -257,7 +257,7 @@ static const char* STR_POOLCOLL_TOX_CNTNT_EXTRA_ARY[] =
STR_POOLCOLL_TOX_CNTNT10
};
-static const char* STR_POOLCOLL_TOX_USER_ARY[] =
+const TranslateId STR_POOLCOLL_TOX_USER_ARY[] =
{
// Subcategory User-Directories:
STR_POOLCOLL_TOX_USERH,
@@ -268,7 +268,7 @@ static const char* STR_POOLCOLL_TOX_USER_ARY[] =
STR_POOLCOLL_TOX_USER5
};
-static const char* STR_POOLCOLL_TOX_USER_EXTRA_ARY[] =
+const TranslateId STR_POOLCOLL_TOX_USER_EXTRA_ARY[] =
{
// Subcategory User-Directories more Levels 5 - 10
STR_POOLCOLL_TOX_USER6,
@@ -278,35 +278,35 @@ static const char* STR_POOLCOLL_TOX_USER_EXTRA_ARY[] =
STR_POOLCOLL_TOX_USER10
};
-static const char* STR_POOLCOLL_TOX_ILLUS_ARY[] =
+const TranslateId STR_POOLCOLL_TOX_ILLUS_ARY[] =
{
// Illustrations Index
STR_POOLCOLL_TOX_ILLUSH,
STR_POOLCOLL_TOX_ILLUS1
};
-static const char* STR_POOLCOLL_TOX_OBJECT_ARY[] =
+const TranslateId STR_POOLCOLL_TOX_OBJECT_ARY[] =
{
// Object Index
STR_POOLCOLL_TOX_OBJECTH,
STR_POOLCOLL_TOX_OBJECT1
};
-static const char* STR_POOLCOLL_TOX_TABLES_ARY[] =
+const TranslateId STR_POOLCOLL_TOX_TABLES_ARY[] =
{
// Tables Index
STR_POOLCOLL_TOX_TABLESH,
STR_POOLCOLL_TOX_TABLES1
};
-static const char* STR_POOLCOLL_TOX_AUTHORITIES_ARY[] =
+const TranslateId STR_POOLCOLL_TOX_AUTHORITIES_ARY[] =
{
// Index of Authorities
STR_POOLCOLL_TOX_AUTHORITIESH,
STR_POOLCOLL_TOX_AUTHORITIES1
};
-static const char* STR_POOLCOLL_TOX_CITATION_ARY[] =
+const TranslateId STR_POOLCOLL_TOX_CITATION_ARY[] =
{
STR_POOLCOLL_TOX_CITATION
};
@@ -325,7 +325,7 @@ SwForm::SwForm( TOXTypes eTyp ) // #i21237#
// Keyword has 3 levels + headings+ separator
// Indexes of tables, object illustrations and authorities consist of a heading and one level
- const char** pPoolId;
+ const TranslateId* pPoolId;
switch( m_eType )
{
case TOX_INDEX: pPoolId = STR_POOLCOLL_TOX_ARY; break;
diff --git a/sw/source/core/tox/txmsrt.cxx b/sw/source/core/tox/txmsrt.cxx
index a67906d0e4ad..ebe5e18a7952 100644
--- a/sw/source/core/tox/txmsrt.cxx
+++ b/sw/source/core/tox/txmsrt.cxx
@@ -594,7 +594,7 @@ TextAndReading SwTOXPara::GetText_Impl(SwRootFrame const*const pLayout) const
return TextAndReading(pFly->GetName(), OUString());
OSL_ENSURE( false, "Graphic/object without name" );
- const char* pId = SwTOXElement::Ole == eType
+ TranslateId pId = SwTOXElement::Ole == eType
? STR_OBJECT_DEFNAME
: SwTOXElement::Graphic == eType
? STR_GRAPHIC_DEFNAME
diff --git a/sw/source/core/undo/undobj.cxx b/sw/source/core/undo/undobj.cxx
index 02d2a5327c38..a9566b770ae8 100644
--- a/sw/source/core/undo/undobj.cxx
+++ b/sw/source/core/undo/undobj.cxx
@@ -271,7 +271,7 @@ void SwUndo::RepeatImpl( ::sw::RepeatContext & )
OUString GetUndoComment(SwUndoId eId)
{
- const char *pId = nullptr;
+ TranslateId pId;
switch (eId)
{
case SwUndoId::EMPTY:
diff --git a/sw/source/core/unocore/unosett.cxx b/sw/source/core/unocore/unosett.cxx
index 91cdb37a8c53..50aa72b76894 100644
--- a/sw/source/core/unocore/unosett.cxx
+++ b/sw/source/core/unocore/unosett.cxx
@@ -1226,7 +1226,7 @@ sal_Bool SwXNumberingRules::hasElements()
return true;
}
-static const char* STR_POOLCOLL_HEADLINE_ARY[]
+const TranslateId STR_POOLCOLL_HEADLINE_ARY[]
{
STR_POOLCOLL_HEADLINE1,
STR_POOLCOLL_HEADLINE2,
diff --git a/sw/source/core/unocore/unostyle.cxx b/sw/source/core/unocore/unostyle.cxx
index 3012637bbe4c..f2f3f3e43b13 100644
--- a/sw/source/core/unocore/unostyle.cxx
+++ b/sw/source/core/unocore/unostyle.cxx
@@ -136,11 +136,11 @@ class SwStyleProperties_Impl;
uno::Reference<beans::XPropertySetInfo> m_xPSInfo;
SwGetPoolIdFromName m_aPoolId;
OUString m_sName;
- const char* m_pResId;
+ TranslateId m_pResId;
GetCountOrName_t m_fGetCountOrName;
CreateStyle_t m_fCreateStyle;
TranslateIndex_t m_fTranslateIndex;
- StyleFamilyEntry(SfxStyleFamily eFamily, sal_uInt16 nPropMapType, SwGetPoolIdFromName aPoolId, OUString const& sName, const char* pResId, GetCountOrName_t const & fGetCountOrName, CreateStyle_t const & fCreateStyle, TranslateIndex_t const & fTranslateIndex)
+ StyleFamilyEntry(SfxStyleFamily eFamily, sal_uInt16 nPropMapType, SwGetPoolIdFromName aPoolId, OUString const& sName, TranslateId pResId, GetCountOrName_t const & fGetCountOrName, CreateStyle_t const & fCreateStyle, TranslateIndex_t const & fTranslateIndex)
: m_eFamily(eFamily)
, m_nPropMapType(nPropMapType)
, m_xPSInfo(aSwMapProvider.GetPropertySet(nPropMapType)->getPropertySetInfo())
@@ -1546,7 +1546,7 @@ public:
};
};
- const char* STR_POOLPAGE_ARY[] =
+ const TranslateId STR_POOLPAGE_ARY[] =
{
// Page styles
STR_POOLPAGE_STANDARD,
diff --git a/sw/source/ui/fldui/flddok.cxx b/sw/source/ui/fldui/flddok.cxx
index e7d5ad8a3930..9fcc33c77ac9 100644
--- a/sw/source/ui/fldui/flddok.cxx
+++ b/sw/source/ui/fldui/flddok.cxx
@@ -426,7 +426,7 @@ IMPL_LINK_NOARG(SwFieldDokPage, SubTypeHdl, weld::TreeView&, void)
const SwFieldTypesEnum nTypeId = static_cast<SwFieldTypesEnum>(m_xSelectionLB->get_id(nPos).toUInt32());
FillFormatLB(nTypeId);
- const char* pTextRes = nullptr;
+ TranslateId pTextRes;
switch (nTypeId)
{
case SwFieldTypesEnum::Chapter:
diff --git a/sw/source/ui/fldui/fldfunc.cxx b/sw/source/ui/fldui/fldfunc.cxx
index 9e61530b172a..9679691a6323 100644
--- a/sw/source/ui/fldui/fldfunc.cxx
+++ b/sw/source/ui/fldui/fldfunc.cxx
@@ -174,7 +174,7 @@ void SwFieldFuncPage::Reset(const SfxItemSet* )
}
}
-static const char* FMT_MARK_ARY[] =
+const TranslateId FMT_MARK_ARY[] =
{
FMT_MARK_TEXT,
FMT_MARK_TABLE,
diff --git a/sw/source/ui/fldui/fldref.cxx b/sw/source/ui/fldui/fldref.cxx
index 21dcb0ca39fd..94f3397046fc 100644
--- a/sw/source/ui/fldui/fldref.cxx
+++ b/sw/source/ui/fldui/fldref.cxx
@@ -747,7 +747,7 @@ enum FMT_REF_IDX
}
-static const char* FMT_REF_ARY[] =
+const TranslateId FMT_REF_ARY[] =
{
FMT_REF_PAGE,
FMT_REF_CHAPTER,
diff --git a/sw/source/ui/index/cnttab.cxx b/sw/source/ui/index/cnttab.cxx
index 0477ab25600f..397e062d7da5 100644
--- a/sw/source/ui/index/cnttab.cxx
+++ b/sw/source/ui/index/cnttab.cxx
@@ -1727,7 +1727,7 @@ IMPL_LINK_NOARG(SwTOXButton, FocusInHdl, weld::Widget&, void)
namespace
{
- const char* STR_AUTH_FIELD_ARY[] =
+ const TranslateId STR_AUTH_FIELD_ARY[] =
{
STR_AUTH_FIELD_IDENTIFIER,
STR_AUTH_FIELD_AUTHORITY_TYPE,
@@ -2521,13 +2521,13 @@ void SwTOXEntryTabPage::SetWrtShell(SwWrtShell& rSh)
RES_POOLCHR_IDX_MAIN_ENTRY, OUString()));
}
-static const char* STR_TOKEN_ARY[] =
+ const TranslateId STR_TOKEN_ARY[] =
{
STR_TOKEN_ENTRY_NO,
STR_TOKEN_ENTRY, //mapped from original STR_TOKEN_ENTRY_TEXT,
STR_TOKEN_ENTRY,
STR_TOKEN_TAB_STOP,
- nullptr,
+ {},
STR_TOKEN_PAGE_NUMS,
STR_TOKEN_CHAPTER_INFO,
STR_TOKEN_LINK_START,
@@ -2535,7 +2535,7 @@ static const char* STR_TOKEN_ARY[] =
STR_TOKEN_AUTHORITY
};
-static const char* STR_TOKEN_HELP_ARY[] =
+ const TranslateId STR_TOKEN_HELP_ARY[] =
{
STR_TOKEN_HELP_ENTRY_NO,
STR_TOKEN_HELP_ENTRY, // mapped from original STR_TOKEN_HELP_ENTRY_TEXT,
@@ -2569,11 +2569,11 @@ SwTokenWindow::SwTokenWindow(std::unique_ptr<weld::Container> xParent)
for (sal_uInt32 i = 0; i < TOKEN_END; ++i)
{
- const char* pTextId = STR_TOKEN_ARY[i];
+ TranslateId pTextId = STR_TOKEN_ARY[i];
if (pTextId)
m_aButtonTexts[i] = SwResId(pTextId);
- const char* pHelpId = STR_TOKEN_HELP_ARY[i];
+ TranslateId pHelpId = STR_TOKEN_HELP_ARY[i];
m_aButtonHelpTexts[i] = SwResId(pHelpId);
}
diff --git a/sw/source/ui/index/swuiidxmrk.cxx b/sw/source/ui/index/swuiidxmrk.cxx
index 291ff0572e6c..d090a1cf2028 100644
--- a/sw/source/ui/index/swuiidxmrk.cxx
+++ b/sw/source/ui/index/swuiidxmrk.cxx
@@ -1526,7 +1526,7 @@ void SwAuthorMarkPane::Activate()
namespace
{
- const char* STR_AUTH_FIELD_ARY[] =
+ const TranslateId STR_AUTH_FIELD_ARY[] =
{
STR_AUTH_FIELD_IDENTIFIER,
STR_AUTH_FIELD_AUTHORITY_TYPE,
diff --git a/sw/source/uibase/app/docsh2.cxx b/sw/source/uibase/app/docsh2.cxx
index 8e297f06298f..c581f56b50e7 100644
--- a/sw/source/uibase/app/docsh2.cxx
+++ b/sw/source/uibase/app/docsh2.cxx
@@ -972,7 +972,7 @@ void SwDocShell::Execute(SfxRequest& rReq)
uno::Reference < XFilePicker3 > xFP = aDlgHelper.GetFilePicker();
std::shared_ptr<const SfxFilter> pFlt;
- const char* pStrId;
+ TranslateId pStrId;
if( bCreateHtml )
{
diff --git a/sw/source/uibase/app/mainwn.cxx b/sw/source/uibase/app/mainwn.cxx
index dbb6da6e405e..7c21797f8e3d 100644
--- a/sw/source/uibase/app/mainwn.cxx
+++ b/sw/source/uibase/app/mainwn.cxx
@@ -49,7 +49,7 @@ static SwProgress *lcl_SwFindProgress( SwDocShell const *pDocShell )
return nullptr;
}
-void StartProgress( const char* pMessResId, tools::Long nStartValue, tools::Long nEndValue,
+void StartProgress( TranslateId pMessResId, tools::Long nStartValue, tools::Long nEndValue,
SwDocShell *pDocShell )
{
if( SW_MOD()->IsEmbeddedLoadSave() )
diff --git a/sw/source/uibase/app/swmodule.cxx b/sw/source/uibase/app/swmodule.cxx
index b0c68b7d72c0..51052b8f82b6 100644
--- a/sw/source/uibase/app/swmodule.cxx
+++ b/sw/source/uibase/app/swmodule.cxx
@@ -162,14 +162,14 @@ SwModule::SwModule( SfxObjectFactory* pWebFact,
}
}
-OUString SwResId(std::string_view aId)
+OUString SwResId(TranslateId aId)
{
return Translate::get(aId, SW_MOD()->GetResLocale());
}
-OUString SwResId(std::string_view aId, int nCardinality)
+OUString SwResId(TranslateNId aContextSingularPlural, int nCardinality)
{
- return Translate::nget(aId, nCardinality, SW_MOD()->GetResLocale());
+ return Translate::nget(aContextSingularPlural, nCardinality, SW_MOD()->GetResLocale());
}
uno::Reference< scanner::XScannerManager2 > const &
diff --git a/sw/source/uibase/dochdl/swdtflvr.cxx b/sw/source/uibase/dochdl/swdtflvr.cxx
index c36b6d87837b..bae05b03ac66 100644
--- a/sw/source/uibase/dochdl/swdtflvr.cxx
+++ b/sw/source/uibase/dochdl/swdtflvr.cxx
@@ -2095,7 +2095,7 @@ SotExchangeDest SwTransferable::GetSotDestination( const SwWrtShell& rSh )
bool SwTransferable::PasteFileContent( TransferableDataHelper& rData,
SwWrtShell& rSh, SotClipboardFormatId nFormat, bool bMsg, bool bIgnoreComments )
{
- const char* pResId = STR_CLPBRD_FORMAT_ERROR;
+ TranslateId pResId = STR_CLPBRD_FORMAT_ERROR;
bool bRet = false;
MSE40HTMLClipFormatObj aMSE40ClpObj;
@@ -2173,7 +2173,7 @@ bool SwTransferable::PasteFileContent( TransferableDataHelper& rData,
pResId = STR_ERROR_CLPBRD_READ;
else
{
- pResId = nullptr;
+ pResId = TranslateId();
bRet = true;
}
@@ -3436,19 +3436,17 @@ void SwTransferable::PrePasteSpecial( const SwWrtShell& rSh, TransferableDataHel
if( pClipboard )
{
aDesc = pClipboard->m_aObjDesc;
- const char* pResId;
+ TranslateId pResId;
if( pClipboard->m_eBufferType & TransferBufferType::Document )
pResId = STR_PRIVATETEXT;
else if( pClipboard->m_eBufferType & TransferBufferType::Graphic )
pResId = STR_PRIVATEGRAPHIC;
else if( pClipboard->m_eBufferType == TransferBufferType::Ole )
pResId = STR_PRIVATEOLE;
- else
- pResId = nullptr;
if (pResId)
{
- if (strcmp(STR_PRIVATEOLE, pResId) == 0 || strcmp(STR_PRIVATEGRAPHIC, pResId) == 0)
+ if (STR_PRIVATEOLE == pResId || STR_PRIVATEGRAPHIC == pResId)
{
// add SotClipboardFormatId::EMBED_SOURCE to the formats. This
// format display then the private format name.
@@ -3492,15 +3490,13 @@ void SwTransferable::FillClipFormatItem( const SwWrtShell& rSh,
SwTransferable *pClipboard = GetSwTransferable( rData );
if( pClipboard )
{
- const char* pResId;
+ TranslateId pResId;
if( pClipboard->m_eBufferType & TransferBufferType::Document )
pResId = STR_PRIVATETEXT;
else if( pClipboard->m_eBufferType & TransferBufferType::Graphic )
pResId = STR_PRIVATEGRAPHIC;
else if( pClipboard->m_eBufferType == TransferBufferType::Ole )
pResId = STR_PRIVATEOLE;
- else
- pResId = nullptr;
if (pResId)
rToFill.AddClipbrdFormat(SotClipboardFormatId::EMBED_SOURCE,
diff --git a/sw/source/uibase/docvw/SidebarTxtControl.cxx b/sw/source/uibase/docvw/SidebarTxtControl.cxx
index 06aa389891b6..b9dde38dc1a7 100644
--- a/sw/source/uibase/docvw/SidebarTxtControl.cxx
+++ b/sw/source/uibase/docvw/SidebarTxtControl.cxx
@@ -170,12 +170,12 @@ OUString SidebarTextControl::RequestHelp(tools::Rectangle& rHelpRect)
}
}
- const char* pResId = nullptr;
+ TranslateId pResId;
switch( mrSidebarWin.GetLayoutStatus() )
{
case SwPostItHelper::INSERTED: pResId = STR_REDLINE_INSERT; break;
case SwPostItHelper::DELETED: pResId = STR_REDLINE_DELETE; break;
- default: pResId = nullptr;
+ default: break;
}
SwContentAtPos aContentAtPos( IsAttrAtPos::Redline );
diff --git a/sw/source/uibase/docvw/edtwin2.cxx b/sw/source/uibase/docvw/edtwin2.cxx
index c2c196c329b8..4f98553cd38c 100644
--- a/sw/source/uibase/docvw/edtwin2.cxx
+++ b/sw/source/uibase/docvw/edtwin2.cxx
@@ -57,7 +57,7 @@
static OUString lcl_GetRedlineHelp( const SwRangeRedline& rRedl, bool bBalloon )
{
- const char* pResId = nullptr;
+ TranslateId pResId;
switch( rRedl.GetType() )
{
case RedlineType::Insert: pResId = STR_REDLINE_INSERT; break;
diff --git a/sw/source/uibase/fldui/fldmgr.cxx b/sw/source/uibase/fldui/fldmgr.cxx
index 5279ee15b144..99ac9ec5b577 100644
--- a/sw/source/uibase/fldui/fldmgr.cxx
+++ b/sw/source/uibase/fldui/fldmgr.cxx
@@ -127,7 +127,7 @@ const sal_uInt16 VF_COUNT = 1; // { 0 }
const sal_uInt16 VF_USR_COUNT = 2; // { 0, nsSwExtendedSubType::SUB_CMD }
const sal_uInt16 VF_DB_COUNT = 1; // { nsSwExtendedSubType::SUB_OWN_FMT }
-static const char* FLD_EU_ARY[] =
+const TranslateId FLD_EU_ARY[] =
{
FLD_EU_COMPANY,
FLD_EU_GIVENNAME,
@@ -146,25 +146,25 @@ static const char* FLD_EU_ARY[] =
FLD_EU_REGION
};
-static const char* FMT_AUTHOR_ARY[] =
+const TranslateId FMT_AUTHOR_ARY[] =
{
FMT_AUTHOR_NAME,
FMT_AUTHOR_SCUT
};
-static const char* FLD_DATE_ARY[] =
+const TranslateId FLD_DATE_ARY[] =
{
FLD_DATE_FIX,
FLD_DATE_STD,
};
-static const char* FLD_TIME_ARY[] =
+const TranslateId FLD_TIME_ARY[] =
{
FLD_TIME_FIX,
FLD_TIME_STD
};
-static const char* FMT_NUM_ARY[] =
+const TranslateId FMT_NUM_ARY[] =
{
FMT_NUM_ABC,
FMT_NUM_SABC,
@@ -177,7 +177,7 @@ static const char* FMT_NUM_ARY[] =
FMT_NUM_PAGESPECIAL
};
-static const char* FMT_FF_ARY[] =
+const TranslateId FMT_FF_ARY[] =
{
FMT_FF_NAME,
FMT_FF_PATHNAME,
@@ -187,7 +187,7 @@ static const char* FMT_FF_ARY[] =
FMT_FF_UI_RANGE
};
-static const char* FLD_STAT_ARY[] =
+const TranslateId FLD_STAT_ARY[] =
{
FLD_STAT_PAGE,
FLD_STAT_PARA,
@@ -198,7 +198,7 @@ static const char* FLD_STAT_ARY[] =
FLD_STAT_OBJ
};
-static const char* FMT_CHAPTER_ARY[] =
+const TranslateId FMT_CHAPTER_ARY[] =
{
FMT_CHAPTER_NO,
FMT_CHAPTER_NAME,
@@ -206,12 +206,12 @@ static const char* FMT_CHAPTER_ARY[] =
FMT_CHAPTER_NO_NOSEPARATOR
};
-static const char* FLD_INPUT_ARY[] =
+const TranslateId FLD_INPUT_ARY[] =
{
FLD_INPUT_TEXT
};
-static const char* FMT_MARK_ARY[] =
+const TranslateId FMT_MARK_ARY[] =
{
FMT_MARK_TEXT,
FMT_MARK_TABLE,
@@ -220,7 +220,7 @@ static const char* FMT_MARK_ARY[] =
FMT_MARK_OLE
};
-static const char* FMT_REF_ARY[] =
+const TranslateId FMT_REF_ARY[] =
{
FMT_REF_PAGE,
FMT_REF_CHAPTER,
@@ -235,44 +235,44 @@ static const char* FMT_REF_ARY[] =
FMT_REF_NUMBER_FULL_CONTEXT
};
-static const char* FMT_REG_ARY[] =
+const TranslateId FMT_REG_ARY[] =
{
FMT_REG_AUTHOR,
FMT_REG_TIME,
FMT_REG_DATE
};
-static const char* FMT_DBFLD_ARY[] =
+const TranslateId FMT_DBFLD_ARY[] =
{
FMT_DBFLD_DB,
FMT_DBFLD_SYS
};
-static const char* FMT_SETVAR_ARY[] =
+const TranslateId FMT_SETVAR_ARY[] =
{
FMT_SETVAR_SYS,
FMT_SETVAR_TEXT
};
-static const char* FMT_GETVAR_ARY[] =
+const TranslateId FMT_GETVAR_ARY[] =
{
FMT_GETVAR_TEXT,
FMT_GETVAR_NAME
};
-static const char* FMT_DDE_ARY[] =
+const TranslateId FMT_DDE_ARY[] =
{
FMT_DDE_NORMAL,
FMT_DDE_HOT
};
-static const char* FLD_PAGEREF_ARY[] =
+const TranslateId FLD_PAGEREF_ARY[] =
{
FLD_PAGEREF_OFF,
FLD_PAGEREF_ON
};
-static const char* FMT_USERVAR_ARY[] =
+const TranslateId FMT_USERVAR_ARY[] =
{
FMT_USERVAR_TEXT,
FMT_USERVAR_CMD
@@ -285,10 +285,10 @@ struct SwFieldPack
{
SwFieldTypesEnum nTypeId;
- const char** pSubTypeResIds;
+ const TranslateId* pSubTypeResIds;
size_t nSubTypeLength;
- const char** pFormatResIds;
+ const TranslateId* pFormatResIds;
size_t nFormatLength;
};
@@ -684,17 +684,17 @@ sal_uInt16 SwFieldMgr::GetFormatCount(SwFieldTypesEnum nTypeId, bool bHtmlMode)
if (nTypeId == SwFieldTypesEnum::Filename)
nCount -= 2; // no range or template
- const char** pStart = aSwFields[nPos].pFormatResIds;
+ const TranslateId* pStart = aSwFields[nPos].pFormatResIds;
if (!pStart)
return nCount;
- if (strcmp(*pStart, FMT_GETVAR_ARY[0]) == 0 || strcmp(*pStart, FMT_SETVAR_ARY[0]) == 0)
+ if (*pStart == FMT_GETVAR_ARY[0] || *pStart == FMT_SETVAR_ARY[0])
return VF_COUNT;
- else if (strcmp(*pStart, FMT_USERVAR_ARY[0]) == 0)
+ else if (*pStart == FMT_USERVAR_ARY[0])
return VF_USR_COUNT;
- else if (strcmp(*pStart, FMT_DBFLD_ARY[0]) == 0)
+ else if (*pStart == FMT_DBFLD_ARY[0])
return VF_DB_COUNT;
- else if (strcmp(*pStart, FMT_NUM_ARY[0]) == 0)
+ else if (*pStart == FMT_NUM_ARY[0])
{
GetNumberingInfo();
if(m_xNumberingInfo.is())
@@ -721,7 +721,7 @@ OUString SwFieldMgr::GetFormatStr(SwFieldTypesEnum nTypeId, sal_uInt32 nFormatId
if (nPos == USHRT_MAX)
return OUString();
- const char** pStart = aSwFields[nPos].pFormatResIds;
+ const TranslateId* pStart = aSwFields[nPos].pFormatResIds;
if (!pStart)
return OUString();
@@ -774,7 +774,7 @@ sal_uInt16 SwFieldMgr::GetFormatId(SwFieldTypesEnum nTypeId, sal_uInt32 nFormatI
{
case SwFieldTypesEnum::DocumentInfo:
{
- const OString sId(aSwFields[GetPos(nTypeId)].pFormatResIds[nFormatId]);
+ TranslateId sId = aSwFields[GetPos(nTypeId)].pFormatResIds[nFormatId];
if (sId == FMT_REG_AUTHOR)
nId = DI_SUB_AUTHOR;
else if (sId == FMT_REG_TIME)
@@ -794,7 +794,7 @@ sal_uInt16 SwFieldMgr::GetFormatId(SwFieldTypesEnum nTypeId, sal_uInt32 nFormatI
sal_uInt16 nPos = GetPos(nTypeId);
if (nFormatId < aSwFields[nPos].nFormatLength)
{
- const OString sId(aSwFields[nPos].pFormatResIds[nFormatId]);
+ const TranslateId sId = aSwFields[nPos].pFormatResIds[nFormatId];
if (sId == FMT_NUM_ABC)
nId = SVX_NUM_CHARS_UPPER_LETTER;
else if (sId == FMT_NUM_SABC)
@@ -836,7 +836,7 @@ sal_uInt16 SwFieldMgr::GetFormatId(SwFieldTypesEnum nTypeId, sal_uInt32 nFormatI
}
case SwFieldTypesEnum::DDE:
{
- const OString sId(aSwFields[GetPos(nTypeId)].pFormatResIds[nFormatId]);
+ const TranslateId sId = aSwFields[GetPos(nTypeId)].pFormatResIds[nFormatId];
if (sId == FMT_DDE_NORMAL)
nId = static_cast<sal_uInt16>(SfxLinkUpdateMode::ONCALL);
else if (sId == FMT_DDE_HOT)
@@ -1743,7 +1743,7 @@ LanguageType SwFieldMgr::GetCurrLanguage() const
void SwFieldType::GetFieldName_()
{
- static const char* coFieldNms[] =
+ static const TranslateId coFieldNms[] =
{
FLD_DATE_STD,
FLD_TIME_STD,
@@ -1795,7 +1795,7 @@ void SwFieldType::GetFieldName_()
// insert infos for fields
SwFieldType::s_pFieldNames = new std::vector<OUString>;
SwFieldType::s_pFieldNames->reserve(SAL_N_ELEMENTS(coFieldNms));
- for (const char* id : coFieldNms)
+ for (const TranslateId & id : coFieldNms)
{
const OUString aTmp(SwResId(id));
SwFieldType::s_pFieldNames->push_back(MnemonicGenerator::EraseAllMnemonicChars( aTmp ));
diff --git a/sw/source/uibase/misc/redlndlg.cxx b/sw/source/uibase/misc/redlndlg.cxx
index bc334e1303ac..bcfdf3ed4de6 100644
--- a/sw/source/uibase/misc/redlndlg.cxx
+++ b/sw/source/uibase/misc/redlndlg.cxx
@@ -1091,7 +1091,7 @@ IMPL_LINK(SwRedlineAcceptDlg, CommandHdl, const CommandEvent&, rCEvt, bool)
pDlg->HideAuthor();
- const char* pResId = nullptr;
+ TranslateId pResId;
switch( rRedline.GetType() )
{
case RedlineType::Insert:
diff --git a/sw/source/uibase/misc/swruler.cxx b/sw/source/uibase/misc/swruler.cxx
index b53987593c4f..e26e9aa41d5c 100644
--- a/sw/source/uibase/misc/swruler.cxx
+++ b/sw/source/uibase/misc/swruler.cxx
@@ -301,7 +301,7 @@ void SwCommentRuler::Update()
void SwCommentRuler::UpdateCommentHelpText()
{
- const char* pTooltipResId;
+ TranslateId pTooltipResId;
if (mpViewShell->GetPostItMgr()->ShowNotes())
pTooltipResId = STR_HIDE_COMMENTS;
else
diff --git a/sw/source/uibase/ribbar/workctrl.cxx b/sw/source/uibase/ribbar/workctrl.cxx
index 2c7e08c23a56..ed95ca1cdb1b 100644
--- a/sw/source/uibase/ribbar/workctrl.cxx
+++ b/sw/source/uibase/ribbar/workctrl.cxx
@@ -209,7 +209,7 @@ std::u16string_view const aNavigationImgIds[ NAVI_ENTRIES ] =
u"" RID_BMP_RIBBAR_FIELD_BYTYPE
};
-static const char* aNavigationStrIds[ NAVI_ENTRIES ] =
+const TranslateId aNavigationStrIds[ NAVI_ENTRIES ] =
{
ST_TBL,
ST_FRM,
@@ -235,7 +235,7 @@ static const char* aNavigationStrIds[ NAVI_ENTRIES ] =
};
// these are global strings
-static const char* STR_IMGBTN_ARY[] =
+const TranslateId STR_IMGBTN_ARY[] =
{
STR_IMGBTN_TBL_DOWN,
STR_IMGBTN_FRM_DOWN,
@@ -362,13 +362,13 @@ SwZoomBox_Impl::SwZoomBox_Impl(vcl::Window* pParent, sal_uInt16 nSlot)
m_xWidget->connect_entry_activate(LINK(this, SwZoomBox_Impl, ActivateHdl));
m_xWidget->connect_focus_out(LINK(this, SwZoomBox_Impl, FocusOutHdl));
- const char* const aZoomValues[] =
+ const TranslateId aZoomValues[] =
{ RID_SVXSTR_ZOOM_25 , RID_SVXSTR_ZOOM_50 ,
RID_SVXSTR_ZOOM_75 , RID_SVXSTR_ZOOM_100 ,
RID_SVXSTR_ZOOM_150 , RID_SVXSTR_ZOOM_200 ,
RID_SVXSTR_ZOOM_WHOLE_PAGE, RID_SVXSTR_ZOOM_PAGE_WIDTH ,
RID_SVXSTR_ZOOM_OPTIMAL_VIEW };
- for(const char* pZoomValue : aZoomValues)
+ for(const TranslateId& pZoomValue : aZoomValues)
{
OUString sEntry = SvxResId(pZoomValue);
m_xWidget->append_text(sEntry);
@@ -761,7 +761,7 @@ void NavElementBox_Base::UpdateBox()
{
if ( nMoveType == aNavigationInsertIds[i] )
{
- const char* id = aNavigationStrIds[i];
+ TranslateId id = aNavigationStrIds[i];
OUString sText = SwResId( id );
m_xWidget->set_active_text(sText);
break;
diff --git a/sw/source/uibase/shells/textfld.cxx b/sw/source/uibase/shells/textfld.cxx
index 3c7fe4317632..184fe96e5d8f 100644
--- a/sw/source/uibase/shells/textfld.cxx
+++ b/sw/source/uibase/shells/textfld.cxx
@@ -70,7 +70,7 @@ static OUString lcl_BuildTitleWithRedline( const SwRangeRedline *pRedline )
{
const OUString sTitle(SwResId(STR_REDLINE_COMMENT));
- const char* pResId = nullptr;
+ TranslateId pResId;
switch( pRedline->GetType() )
{
case RedlineType::Insert:
diff --git a/sw/source/uibase/sidebar/WriterInspectorTextPanel.cxx b/sw/source/uibase/sidebar/WriterInspectorTextPanel.cxx
index a59143ba8d48..bd7274bde397 100644
--- a/sw/source/uibase/sidebar/WriterInspectorTextPanel.cxx
+++ b/sw/source/uibase/sidebar/WriterInspectorTextPanel.cxx
@@ -80,7 +80,7 @@ WriterInspectorTextPanel::~WriterInspectorTextPanel() { m_pShell->SetChgLnk(m_ol
static OUString PropertyNametoRID(const OUString& rName)
{
- static const std::map<OUString, const char*> aNameToRID = {
+ static const std::map<OUString, TranslateId> aNameToRID = {
{ "BorderDistance", RID_BORDER_DISTANCE },
{ "BottomBorder", RID_BOTTOM_BORDER },
{ "BottomBorderDistance", RID_BOTTOM_BORDER_DISTANCE },
diff --git a/sw/source/uibase/uiview/view2.cxx b/sw/source/uibase/uiview/view2.cxx
index a6953b7c1e59..ca1751702b71 100644
--- a/sw/source/uibase/uiview/view2.cxx
+++ b/sw/source/uibase/uiview/view2.cxx
@@ -492,7 +492,7 @@ bool SwView::InsertGraphicDlg( SfxRequest& rReq )
rSh.SetFrameFormat( pFormat );
}
- const char* pResId(nullptr);
+ TranslateId pResId;
if( nError == ERRCODE_GRFILTER_OPENERROR )
pResId = STR_GRFILTER_OPENERROR;
else if( nError == ERRCODE_GRFILTER_IOERROR )
@@ -1522,9 +1522,9 @@ void SwView::StateStatusLine(SfxItemSet &rSet)
sal_uLong nWord = selectionStats.nWord ? selectionStats.nWord : documentStats.nWord;
sal_uLong nChar = selectionStats.nChar ? selectionStats.nChar : documentStats.nChar;
- const char* pResId = selectionStats.nWord ? STR_WORDCOUNT : STR_WORDCOUNT_NO_SELECTION;
- const char* pWordResId = selectionStats.nWord ? STR_WORDCOUNT_WORDARG : STR_WORDCOUNT_WORDARG_NO_SELECTION;
- const char* pCharResId = selectionStats.nWord ? STR_WORDCOUNT_CHARARG : STR_WORDCOUNT_CHARARG_NO_SELECTION;
+ TranslateId pResId = selectionStats.nWord ? STR_WORDCOUNT : STR_WORDCOUNT_NO_SELECTION;
+ TranslateNId pWordResId = selectionStats.nWord ? STR_WORDCOUNT_WORDARG : STR_WORDCOUNT_WORDARG_NO_SELECTION;
+ TranslateNId pCharResId = selectionStats.nWord ? STR_WORDCOUNT_CHARARG : STR_WORDCOUNT_CHARARG_NO_SELECTION;
const LocaleDataWrapper& rLocaleData = Application::GetSettings().GetUILocaleDataWrapper();
OUString aWordArg = SwResId(pWordResId, nWord).replaceAll("$1", rLocaleData.getNum(nWord, 0));
diff --git a/sw/source/uibase/uiview/viewprt.cxx b/sw/source/uibase/uiview/viewprt.cxx
index 98ca19acd8b8..1921c30d045a 100644
--- a/sw/source/uibase/uiview/viewprt.cxx
+++ b/sw/source/uibase/uiview/viewprt.cxx
@@ -189,7 +189,7 @@ void SwView::ExecutePrint(SfxRequest& rReq)
std::unique_ptr<weld::MessageDialog> xInfoBox(Application::CreateMessageDialog(GetEditWin().GetFrameWeld(),
VclMessageType::Info, VclButtonsType::Ok,
SwResId(STR_ERR_NO_FAX)));
- const char* pResId = bWeb ? STR_WEBOPTIONS : STR_TEXTOPTIONS;
+ TranslateId pResId = bWeb ? STR_WEBOPTIONS : STR_TEXTOPTIONS;
xInfoBox->set_primary_text(xInfoBox->get_primary_text().replaceFirst("%1", SwResId(pResId)));
xInfoBox->run();
SfxUInt16Item aDefPage(SID_SW_EDITOPTIONS, TP_OPTPRINT_PAGE);
diff --git a/sw/source/uibase/utlui/attrdesc.cxx b/sw/source/uibase/utlui/attrdesc.cxx
index e20b38787f97..71fdd4ab5436 100644
--- a/sw/source/uibase/utlui/attrdesc.cxx
+++ b/sw/source/uibase/utlui/attrdesc.cxx
@@ -175,7 +175,7 @@ bool SwRegisterItem::GetPresentation
const IntlWrapper& /*rIntl*/
) const
{
- const char* pId = GetValue() ? STR_REGISTER_ON : STR_REGISTER_OFF;
+ TranslateId pId = GetValue() ? STR_REGISTER_ON : STR_REGISTER_OFF;
rText = SwResId(pId);
return true;
}
@@ -205,7 +205,7 @@ bool SwParaConnectBorderItem::GetPresentation
const IntlWrapper& /*rIntl*/
) const
{
- const char* pId = GetValue() ? STR_CONNECT_BORDER_ON : STR_CONNECT_BORDER_OFF;
+ TranslateId pId = GetValue() ? STR_CONNECT_BORDER_ON : STR_CONNECT_BORDER_OFF;
rText = SwResId(pId);
return true;
}
@@ -234,7 +234,7 @@ bool SwFormatFrameSize::GetPresentation
}
if ( SwFrameSize::Variable != GetHeightSizeType() )
{
- const char* pId = SwFrameSize::Fixed == m_eFrameHeightType ?
+ TranslateId pId = SwFrameSize::Fixed == m_eFrameHeightType ?
STR_FRM_FIXEDHEIGHT : STR_FRM_MINHEIGHT;
rText += ", " + SwResId(pId) + " ";
if ( GetHeightPercent() )
@@ -263,7 +263,7 @@ bool SwFormatHeader::GetPresentation
const IntlWrapper& /*rIntl*/
) const
{
- const char* pId = GetHeaderFormat() ? STR_HEADER : STR_NO_HEADER;
+ TranslateId pId = GetHeaderFormat() ? STR_HEADER : STR_NO_HEADER;
rText = SwResId(pId);
return true;
}
@@ -280,7 +280,7 @@ bool SwFormatFooter::GetPresentation
const IntlWrapper& /*rIntl*/
) const
{
- const char* pId = GetFooterFormat() ? STR_FOOTER : STR_NO_FOOTER;
+ TranslateId pId = GetFooterFormat() ? STR_FOOTER : STR_NO_FOOTER;
rText = SwResId(pId);
return true;
}
@@ -294,7 +294,7 @@ bool SwFormatSurround::GetPresentation
const IntlWrapper& /*rIntl*/
) const
{
- const char* pId = nullptr;
+ TranslateId pId;
switch ( GetValue() )
{
case css::text::WrapTextMode_NONE:
@@ -338,7 +338,7 @@ bool SwFormatVertOrient::GetPresentation
const IntlWrapper& rIntl
) const
{
- const char* pId = nullptr;
+ TranslateId pId;
switch ( GetVertOrient() )
{
case text::VertOrientation::NONE:
@@ -384,7 +384,7 @@ bool SwFormatHoriOrient::GetPresentation
const IntlWrapper& rIntl
) const
{
- const char* pId = nullptr;
+ TranslateId pId;
switch ( GetHoriOrient() )
{
case text::HoriOrientation::NONE:
@@ -430,7 +430,7 @@ bool SwFormatAnchor::GetPresentation
const IntlWrapper& /*rIntl*/
) const
{
- const char* pId = nullptr;
+ TranslateId pId;
switch ( GetAnchorId() )
{
case RndStdIds::FLY_AT_PARA:
@@ -641,7 +641,7 @@ bool SwTextGridItem::GetPresentation
const IntlWrapper& /*rIntl*/
) const
{
- const char* pId = nullptr;
+ TranslateId pId;
switch ( GetGridType() )
{
@@ -678,14 +678,14 @@ bool SwMirrorGrf::GetPresentation(
SfxItemPresentation /*ePres*/, MapUnit /*eCoreUnit*/, MapUnit /*ePresUnit*/,
OUString& rText, const IntlWrapper& /*rIntl*/ ) const
{
- const char* pId;
+ TranslateId pId;
switch( GetValue() )
{
case MirrorGraph::Dont: pId = STR_NO_MIRROR; break;
case MirrorGraph::Vertical: pId = STR_VERT_MIRROR; break;
case MirrorGraph::Horizontal: pId = STR_HORI_MIRROR; break;
case MirrorGraph::Both: pId = STR_BOTH_MIRROR; break;
- default: pId = nullptr; break;
+ default: break;
}
if (pId)
{
@@ -740,13 +740,13 @@ bool SwChannelGrf::GetPresentation(
{
if( SfxItemPresentation::Complete == ePres )
{
- const char* pId;
+ TranslateId pId;
switch ( Which() )
{
case RES_GRFATR_CHANNELR: pId = STR_CHANNELR; break;
case RES_GRFATR_CHANNELG: pId = STR_CHANNELG; break;
case RES_GRFATR_CHANNELB: pId = STR_CHANNELB; break;
- default: pId = nullptr; break;
+ default: break;
}
if (pId)
rText = SwResId(pId);
@@ -780,7 +780,7 @@ bool SwInvertGrf::GetPresentation(
rText.clear();
if( SfxItemPresentation::Complete == ePres )
{
- const char* pId = GetValue() ? STR_INVERT : STR_INVERT_NOT;
+ TranslateId pId = GetValue() ? STR_INVERT : STR_INVERT_NOT;
rText = SwResId(pId);
}
return true;
@@ -806,7 +806,7 @@ bool SwDrawModeGrf::GetPresentation(
rText.clear();
if( SfxItemPresentation::Complete == ePres )
{
- const char* pId;
+ TranslateId pId;
switch ( GetValue() )
{
@@ -829,7 +829,7 @@ bool SwFormatFollowTextFlow::GetPresentation( SfxItemPresentation ePres,
rText.clear();
if( SfxItemPresentation::Complete == ePres )
{
- const char* pId = GetValue() ? STR_FOLLOW_TEXT_FLOW : STR_DONT_FOLLOW_TEXT_FLOW;
+ TranslateId pId = GetValue() ? STR_FOLLOW_TEXT_FLOW : STR_DONT_FOLLOW_TEXT_FLOW;
rText = SwResId(pId);
}
return true;
diff --git a/sw/source/uibase/utlui/content.cxx b/sw/source/uibase/utlui/content.cxx
index 08c8b8764dc0..0a14d3d12abb 100644
--- a/sw/source/uibase/utlui/content.cxx
+++ b/sw/source/uibase/utlui/content.cxx
@@ -238,7 +238,7 @@ SwTOXBaseContent::~SwTOXBaseContent()
{
}
-static const char* STR_CONTENT_TYPE_ARY[] =
+const TranslateId STR_CONTENT_TYPE_ARY[] =
{
STR_CONTENT_TYPE_OUTLINE,
STR_CONTENT_TYPE_TABLE,
@@ -255,7 +255,7 @@ static const char* STR_CONTENT_TYPE_ARY[] =
STR_CONTENT_TYPE_TEXTFIELD
};
-static const char* STR_CONTENT_TYPE_SINGLE_ARY[] =
+const TranslateId STR_CONTENT_TYPE_SINGLE_ARY[] =
{
STR_CONTENT_TYPE_SINGLE_OUTLINE,
STR_CONTENT_TYPE_SINGLE_TABLE,
@@ -1038,7 +1038,7 @@ enum STR_CONTEXT_IDX
}
-static const char* STR_CONTEXT_ARY[] =
+const TranslateId STR_CONTEXT_ARY[] =
{
STR_OUTLINE_LEVEL,
STR_DRAGMODE,
diff --git a/sw/source/uibase/utlui/glbltree.cxx b/sw/source/uibase/utlui/glbltree.cxx
index 516e0789fe4a..ab8beedabc41 100644
--- a/sw/source/uibase/utlui/glbltree.cxx
+++ b/sw/source/uibase/utlui/glbltree.cxx
@@ -105,7 +105,7 @@ enum GLOBAL_CONTEXT_IDX
}
-static const char* GLOBAL_CONTEXT_ARY[] =
+const TranslateId GLOBAL_CONTEXT_ARY[] =
{
STR_UPDATE,
STR_EDIT_CONTENT,
diff --git a/sw/source/uibase/utlui/initui.cxx b/sw/source/uibase/utlui/initui.cxx
index 4a07f75678e2..740152dd89ad 100644
--- a/sw/source/uibase/utlui/initui.cxx
+++ b/sw/source/uibase/utlui/initui.cxx
@@ -91,7 +91,7 @@ void InitUI()
SwEditWin::InitStaticData();
}
-static const char* FLD_DOCINFO_ARY[] =
+const TranslateId FLD_DOCINFO_ARY[] =
{
FLD_DOCINFO_TITLE,
FLD_DOCINFO_SUBJECT,
@@ -202,7 +202,7 @@ void ShellResource::GetAutoFormatNameLst_() const
namespace
{
- const char* STR_AUTH_FIELD_ARY[] =
+ const TranslateId STR_AUTH_FIELD_ARY[] =
{
STR_AUTH_FIELD_IDENTIFIER,
STR_AUTH_FIELD_AUTHORITY_TYPE,
@@ -251,7 +251,7 @@ OUString const & SwAuthorityFieldType::GetAuthFieldName(ToxAuthorityField eType)
return (*pAuthFieldNameList)[static_cast< sal_uInt16 >(eType)];
}
-static const char* STR_AUTH_TYPE_ARY[] =
+const TranslateId STR_AUTH_TYPE_ARY[] =
{
STR_AUTH_TYPE_ARTICLE,
STR_AUTH_TYPE_BOOK,
diff --git a/sw/source/uibase/utlui/navipi.cxx b/sw/source/uibase/utlui/navipi.cxx
index 1567f7605d7e..186934f0fc75 100644
--- a/sw/source/uibase/utlui/navipi.cxx
+++ b/sw/source/uibase/utlui/navipi.cxx
@@ -542,14 +542,14 @@ SwNavigationPI::SwNavigationPI(weld::Widget* pParent,
m_xContent1ToolBox->set_item_visible("contenttoggle", false);
}
- const char* REGIONNAME_ARY[] =
+ const TranslateId REGIONNAME_ARY[] =
{
STR_HYPERLINK,
STR_LINK_REGION,
STR_COPY_REGION
};
- const char* REGIONMODE_ARY[] =
+ const TranslateId REGIONMODE_ARY[] =
{
STR_HIDDEN,
STR_ACTIVE,
diff --git a/sw/source/uibase/wrtsh/wrtundo.cxx b/sw/source/uibase/wrtsh/wrtundo.cxx
index 6b087fad7b6d..82bb28109c60 100644
--- a/sw/source/uibase/wrtsh/wrtundo.cxx
+++ b/sw/source/uibase/wrtsh/wrtundo.cxx
@@ -95,7 +95,7 @@ void SwWrtShell::Do( DoType eDoType, sal_uInt16 nCnt )
OUString SwWrtShell::GetDoString( DoType eDoType ) const
{
OUString aUndoStr;
- const char* pResStr = STR_UNDO;
+ TranslateId pResStr = STR_UNDO;
switch( eDoType )
{
case UNDO:
diff --git a/unotools/source/i18n/resmgr.cxx b/unotools/source/i18n/resmgr.cxx
index 7095316859f7..62991153f01c 100644
--- a/unotools/source/i18n/resmgr.cxx
+++ b/unotools/source/i18n/resmgr.cxx
@@ -198,63 +198,6 @@ namespace Translate
return aRet;
}
- OUString get(std::string_view sContextAndId, const std::locale &loc)
- {
- constexpr int BUFLEN = 128;
- // this function is performance-sensitive, so we allocate string data on stack
- std::array<char, BUFLEN> sStackBuffer;
- std::unique_ptr<char[]> xHeapBuffer;
- char* pBuffer;
- if (sContextAndId.size() < BUFLEN - 1)
- pBuffer = sStackBuffer.data();
- else
- {
- xHeapBuffer = std::make_unique<char[]>(sContextAndId.size()+1);
- pBuffer = xHeapBuffer.get();
- }
-
- const char* pContext;
- const char* pId;
- auto idx = sContextAndId.find('\004');
- memcpy(pBuffer, sContextAndId.data(), sContextAndId.size());
- if (idx == std::string_view::npos)
- {
- pBuffer[sContextAndId.size()] = 0;
- // point pContext at the null byte so it is an empty string
- pContext = pBuffer + sContextAndId.size();
- pId = pBuffer;
- }
- else
- {
- // stick a null byte in the middle to split it into two null-terminated strings
- pBuffer[idx] = 0;
- pBuffer[sContextAndId.size()] = 0;
- pContext = pBuffer;
- pId = pBuffer + idx + 1;
- assert(!strchr(pId, '\004') && "should be using nget, not get");
- }
-
- //if it's a key id locale, generate it here
- if (std::use_facet<boost::locale::info>(loc).language() == "qtz")
- {
- OString sKeyId(genKeyId(OString(sContextAndId).replace('\004', '|')));
- return OUString::fromUtf8(sKeyId) + u"\u2016" + createFromUtf8(pId, strlen(pId));
- }
-
- //otherwise translate it
- const std::string ret = boost::locale::pgettext(pContext, pId, loc);
- OUString result(ExpandVariables(createFromUtf8(ret.data(), ret.size())));
-
- if (comphelper::LibreOfficeKit::isActive())
- {
- // If it is de-CH, change sharp s to double s.
- if (std::use_facet<boost::locale::info>(loc).country() == "CH" &&
- std::use_facet<boost::locale::info>(loc).language() == "de")
- result = result.replaceAll(OUString::fromUtf8("\xC3\x9F"), "ss");
- }
- return result;
- }
-
OUString get(TranslateId sContextAndId, const std::locale &loc)
{
assert(!strchr(sContextAndId.mpId, '\004') && "should be using nget, not get");
@@ -280,39 +223,6 @@ namespace Translate
return result;
}
- OUString nget(std::string_view aContextAndIds, int n, const std::locale &loc)
- {
- OString sContextIdId(aContextAndIds);
- std::vector<OString> aContextIdId;
- sal_Int32 nIndex = 0;
- do
- {
- aContextIdId.push_back(sContextIdId.getToken(0, '\004', nIndex));
- }
- while (nIndex >= 0);
- assert(aContextIdId.size() == 3 && "should be using get, not nget");
-
- //if it's a key id locale, generate it here
- if (std::use_facet<boost::locale::info>(loc).language() == "qtz")
- {
- OString sKeyId(genKeyId(aContextIdId[0] + "|" + aContextIdId[1]));
- int nForm = n == 0 ? 1 : 2;
- return OUString::fromUtf8(sKeyId) + u"\u2016" + createFromUtf8(aContextIdId[nForm].getStr(), aContextIdId[nForm].getLength());
- }
-
- //otherwise translate it
- const std::string ret = boost::locale::npgettext(aContextIdId[0].getStr(), aContextIdId[1].getStr(), aContextIdId[2].getStr(), n, loc);
- OUString result(ExpandVariables(createFromUtf8(ret.data(), ret.size())));
-
- if (comphelper::LibreOfficeKit::isActive())
- {
- if (std::use_facet<boost::locale::info>(loc).country() == "CH" &&
- std::use_facet<boost::locale::info>(loc).language() == "de")
- result = result.replaceAll(OUString::fromUtf8("\xC3\x9F"), "ss");
- }
- return result;
- }
-
OUString nget(TranslateNId aContextSingularPlural, int n, const std::locale &loc)
{
//if it's a key id locale, generate it here
@@ -358,14 +268,44 @@ namespace Translate
bool TranslateId::operator==(const TranslateId& other) const
{
- return strcmp(mpContext, other.mpContext) == 0 && strcmp(mpId,other.mpId) == 0;
+ if (mpContext == nullptr || other.mpContext == nullptr)
+ {
+ if (mpContext != other.mpContext)
+ return false;
+ }
+ else if (strcmp(mpContext, other.mpContext) != 0)
+ return false;
+
+ if (mpId == nullptr || other.mpId == nullptr)
+ {
+ return mpId == other.mpId;
+ }
+ return strcmp(mpId,other.mpId) == 0;
}
bool TranslateNId::operator==(const TranslateNId& other) const
{
- return strcmp(mpContext, other.mpContext) == 0
- && strcmp(mpSingular, other.mpSingular) == 0
- && strcmp(mpPlural, other.mpPlural) == 0;
+ if (mpContext == nullptr || other.mpContext == nullptr)
+ {
+ if (mpContext != other.mpContext)
+ return false;
+ }
+ else if (strcmp(mpContext, other.mpContext) != 0)
+ return false;
+
+ if (mpSingular == nullptr || other.mpSingular == nullptr)
+ {
+ if (mpSingular != other.mpSingular)
+ return false;
+ }
+ else if (strcmp(mpSingular, other.mpSingular) != 0)
+ return false;
+
+ if (mpPlural == nullptr || other.mpPlural == nullptr)
+ {
+ return mpPlural == other.mpPlural;
+ }
+ return strcmp(mpPlural,other.mpPlural) == 0;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/uui/inc/ids.hrc b/uui/inc/ids.hrc
index 6ab1882b3611..89fb6bda1dcb 100644
--- a/uui/inc/ids.hrc
+++ b/uui/inc/ids.hrc
@@ -25,9 +25,9 @@
#include "ids.hxx"
-#define NC_(Context, String) reinterpret_cast<char const *>(Context "\004" u8##String)
+#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
-const std::pair<const char*, ErrCode> RID_UUI_ERRHDL[] =
+const std::pair<TranslateId, ErrCode> RID_UUI_ERRHDL[] =
{
{ NC_("RID_UUI_ERRHDL", "The operation executed on $(ARG1) was aborted."),
ERRCODE_UUI_IO_ABORT },
@@ -159,7 +159,7 @@ const std::pair<const char*, ErrCode> RID_UUI_ERRHDL[] =
ERRCODE_UUI_LOCKING_LOCK_EXPIRED },
{ NC_("RID_UUI_ERRHDL", "Component cannot be loaded, possibly broken or incomplete installation.\nFull error message:\n\n $(ARG1)."),
ERRCODE_UUI_CANNOT_ACTIVATE_FACTORY },
- { nullptr, ERRCODE_NONE }
+ { {}, ERRCODE_NONE }
};
#define STR_UUI_UNKNOWNAUTH_UNTRUSTED NC_("STR_UUI_UNKNOWNAUTH_UNTRUSTED", "Unable to verify the identity of $(ARG1) site.\n\nBefore accepting this certificate, you should examine this site's certificate carefully. Are you willing to accept this certificate for the purpose of identifying the Web site $(ARG1)?")
diff --git a/uui/inc/strings.hrc b/uui/inc/strings.hrc
index 096d7ef977a1..8eaa68cb23f6 100644
--- a/uui/inc/strings.hrc
+++ b/uui/inc/strings.hrc
@@ -19,7 +19,7 @@
#pragma once
-#define NC_(Context, String) reinterpret_cast<char const *>(Context "\004" u8##String)
+#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
#define STR_ENTER_PASSWORD_TO_OPEN NC_("STR_ENTER_PASSWORD_TO_OPEN", "Enter password to open file: \n")
#define STR_ENTER_PASSWORD_TO_MODIFY NC_("STR_ENTER_PASSWORD_TO_MODIFY", "Enter password to modify file: \n")
diff --git a/uui/source/iahndl-ssl.cxx b/uui/source/iahndl-ssl.cxx
index df156bc44e3a..b0bdbb98eb38 100644
--- a/uui/source/iahndl-ssl.cxx
+++ b/uui/source/iahndl-ssl.cxx
@@ -176,8 +176,8 @@ executeSSLWarnDialog(
// Get correct resource string
std::vector< OUString > aArguments_1;
- char const * pMessageKey = nullptr;
- char const * pTitleKey = nullptr;
+ TranslateId pMessageKey;
+ TranslateId pTitleKey;
switch( failure )
{
diff --git a/uui/source/iahndl.cxx b/uui/source/iahndl.cxx
index 2897a582c3e9..2c6465c9e0ff 100644
--- a/uui/source/iahndl.cxx
+++ b/uui/source/iahndl.cxx
@@ -1246,7 +1246,7 @@ UUIInteractionHelper::handleBrokenPackageRequest(
// ErrorResource Implementation
bool ErrorResource::getString(ErrCode nErrorCode, OUString &rString) const
{
- for (const std::pair<const char*, ErrCode>* pStringArray = m_pStringArray; pStringArray->first != nullptr; ++pStringArray)
+ for (const std::pair<TranslateId, ErrCode>* pStringArray = m_pStringArray; pStringArray->first; ++pStringArray)
{
if (nErrorCode.StripWarningAndDynamic() == pStringArray->second.StripWarningAndDynamic())
{
diff --git a/uui/source/iahndl.hxx b/uui/source/iahndl.hxx
index 8dc828a7dd5f..5a8227b990a5 100644
--- a/uui/source/iahndl.hxx
+++ b/uui/source/iahndl.hxx
@@ -29,6 +29,7 @@
#include <com/sun/star/task/InteractionClassification.hpp>
#include <vcl/errcode.hxx>
+#include <unotools/resmgr.hxx>
#include <unordered_map>
#include <vector>
@@ -251,10 +252,10 @@ private:
class ErrorResource
{
- const std::pair<const char*, ErrCode>* m_pStringArray;
+ const std::pair<TranslateId, ErrCode>* m_pStringArray;
const std::locale& m_rResLocale;
public:
- explicit ErrorResource(const std::pair<const char*, ErrCode>* pStringArray, const std::locale& rResLocale)
+ explicit ErrorResource(const std::pair<TranslateId, ErrCode>* pStringArray, const std::locale& rResLocale)
: m_pStringArray(pStringArray)
, m_rResLocale(rResLocale)
{
diff --git a/uui/source/passworddlg.cxx b/uui/source/passworddlg.cxx
index 694e717216b1..fb4c95e623f6 100644
--- a/uui/source/passworddlg.cxx
+++ b/uui/source/passworddlg.cxx
@@ -46,8 +46,8 @@ PasswordDialog::PasswordDialog(weld::Window* pParent,
if( nDialogMode == task::PasswordRequestMode_PASSWORD_REENTER )
{
- const char* pOpenToModifyErrStrId = bOpenToModify ? STR_ERROR_PASSWORD_TO_MODIFY_WRONG : STR_ERROR_PASSWORD_TO_OPEN_WRONG;
- const char* pErrStrId = bIsSimplePasswordRequest ? STR_ERROR_SIMPLE_PASSWORD_WRONG : pOpenToModifyErrStrId;
+ TranslateId pOpenToModifyErrStrId = bOpenToModify ? STR_ERROR_PASSWORD_TO_MODIFY_WRONG : STR_ERROR_PASSWORD_TO_OPEN_WRONG;
+ TranslateId pErrStrId = bIsSimplePasswordRequest ? STR_ERROR_SIMPLE_PASSWORD_WRONG : pOpenToModifyErrStrId;
OUString aErrorMsg(Translate::get(pErrStrId, rResLocale));
std::unique_ptr<weld::MessageDialog> xBox(Application::CreateMessageDialog(pParent,
VclMessageType::Warning, VclButtonsType::Ok, aErrorMsg));
@@ -76,7 +76,7 @@ PasswordDialog::PasswordDialog(weld::Window* pParent,
m_xDialog->set_title(aTitle);
- const char* pStrId = bOpenToModify ? STR_ENTER_PASSWORD_TO_MODIFY : STR_ENTER_PASSWORD_TO_OPEN;
+ TranslateId pStrId = bOpenToModify ? STR_ENTER_PASSWORD_TO_MODIFY : STR_ENTER_PASSWORD_TO_OPEN;
OUString aMessage(Translate::get(pStrId, rResLocale));
INetURLObject url(aDocURL);
diff --git a/writerperfect/inc/WPFTResMgr.hxx b/writerperfect/inc/WPFTResMgr.hxx
index f1825f87b781..5780dd30ff6f 100644
--- a/writerperfect/inc/WPFTResMgr.hxx
+++ b/writerperfect/inc/WPFTResMgr.hxx
@@ -4,9 +4,6 @@
#include <unotools/resmgr.hxx>
-inline OUString WpResId(std::string_view aId)
-{
- return Translate::get(aId, Translate::Create("wpt"));
-}
+inline OUString WpResId(TranslateId aId) { return Translate::get(aId, Translate::Create("wpt")); }
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/writerperfect/inc/strings.hrc b/writerperfect/inc/strings.hrc
index 822d4e129957..a9373d23731e 100644
--- a/writerperfect/inc/strings.hrc
+++ b/writerperfect/inc/strings.hrc
@@ -9,7 +9,7 @@
#pragma once
-#define NC_(Context, String) reinterpret_cast<char const *>(Context "\004" u8##String)
+#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
#define STR_ENCODING_DIALOG_TITLE NC_("STR_ENCODING_DIALOG_TITLE", "Import file")
#define STR_ENCODING_DIALOG_TITLE_MSMULTIPLAN NC_("STR_ENCODING_DIALOG_TITLE_MSMULTIPLAN", "Import MS Multiplan for DOS file")
diff --git a/xmlsecurity/inc/certificatechooser.hxx b/xmlsecurity/inc/certificatechooser.hxx
index fd943fbd4a81..9ced0ac39a64 100644
--- a/xmlsecurity/inc/certificatechooser.hxx
+++ b/xmlsecurity/inc/certificatechooser.hxx
@@ -21,6 +21,7 @@
#include <com/sun/star/uno/Sequence.hxx>
#include <vcl/weld.hxx>
+#include <unotools/resmgr.hxx>
namespace com::sun::star {
namespace security { class XCertificate; }
@@ -71,7 +72,7 @@ private:
void ImplShowCertificateDetails();
void ImplInitialize();
- static void HandleOneUsageBit(OUString& string, int& bits, int bit, const char *name);
+ static void HandleOneUsageBit(OUString& string, int& bits, int bit, TranslateId name);
public:
CertificateChooser(weld::Window* pParent,
diff --git a/xmlsecurity/inc/resourcemanager.hxx b/xmlsecurity/inc/resourcemanager.hxx
index 2999d5fd44ff..1dc5b2987484 100644
--- a/xmlsecurity/inc/resourcemanager.hxx
+++ b/xmlsecurity/inc/resourcemanager.hxx
@@ -21,9 +21,6 @@
#include <unotools/resmgr.hxx>
-inline OUString XsResId(std::string_view aId)
-{
- return Translate::get(aId, Translate::Create("xsc"));
-}
+inline OUString XsResId(TranslateId aId) { return Translate::get(aId, Translate::Create("xsc")); }
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmlsecurity/inc/strings.hrc b/xmlsecurity/inc/strings.hrc
index 648758825054..8cf89b211773 100644
--- a/xmlsecurity/inc/strings.hrc
+++ b/xmlsecurity/inc/strings.hrc
@@ -19,7 +19,7 @@
#pragma once
-#define NC_(Context, String) reinterpret_cast<char const *>(Context "\004" u8##String)
+#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
#define STR_CERTIFICATE_NOT_VALIDATED NC_("STR_CERTIFICATE_NOT_VALIDATED", "The certificate could not be validated.")
#define STR_VERSION NC_("STR_VERSION", "Version")
diff --git a/xmlsecurity/source/dialogs/certificatechooser.cxx b/xmlsecurity/source/dialogs/certificatechooser.cxx
index 1483b9bda0f8..fb2f7a578254 100644
--- a/xmlsecurity/source/dialogs/certificatechooser.cxx
+++ b/xmlsecurity/source/dialogs/certificatechooser.cxx
@@ -95,7 +95,7 @@ short CertificateChooser::run()
return GenericDialogController::run();
}
-void CertificateChooser::HandleOneUsageBit(OUString& string, int& bits, int bit, const char *pResId)
+void CertificateChooser::HandleOneUsageBit(OUString& string, int& bits, int bit, TranslateId pResId)
{
if (bits & bit)
{