avmedia/inc/strings.hrc | 2 avmedia/source/inc/mediamisc.hxx | 2 basctl/inc/strings.hrc | 2 basctl/source/basicide/iderdll.cxx | 2 basctl/source/inc/iderid.hxx | 4 basic/inc/basic.hrc | 6 basic/inc/strings.hrc | 2 basic/source/classes/sb.cxx | 4 basic/source/sbx/sbxscan.cxx | 2 chart2/inc/chart.hrc | 4 chart2/inc/strings.hrc | 2 chart2/source/controller/dialogs/dlg_CreationWizard.cxx | 2 chart2/source/controller/dialogs/tp_Scale.cxx | 6 chart2/source/controller/dialogs/tp_Scale.hxx | 3 chart2/source/controller/main/ChartController_Tools.cxx | 2 chart2/source/controller/main/DrawCommandDispatch.cxx | 2 chart2/source/inc/ResId.hxx | 4 chart2/source/tools/ResId.cxx | 3 connectivity/CppunitTest_connectivity_sharedresources.mk | 1 connectivity/Library_ado.mk | 1 connectivity/Library_mysql_jdbc.mk | 1 connectivity/Library_odbc.mk | 1 connectivity/inc/strings.hrc | 2 connectivity/source/commontools/TConnection.cxx | 2 connectivity/source/commontools/sqlerror.cxx | 4 connectivity/source/drivers/dbase/DIndex.cxx | 2 connectivity/source/drivers/dbase/DTable.cxx | 2 connectivity/source/drivers/file/FResultSet.cxx | 2 connectivity/source/drivers/macab/MacabStatement.cxx | 2 connectivity/source/drivers/macab/macabutilities.hxx | 3 connectivity/source/inc/TConnection.hxx | 2 connectivity/source/inc/dbase/DIndex.hxx | 2 connectivity/source/inc/dbase/DTable.hxx | 2 connectivity/source/inc/resource/sharedresources.hxx | 12 connectivity/source/resource/sharedresources.cxx | 14 cui/inc/numcategories.hrc | 6 cui/inc/strings.hrc | 2 cui/inc/tipoftheday.hrc | 5 cui/inc/toolbarmode.hrc | 5 cui/inc/treeopt.hrc | 26 cui/inc/twolines.hrc | 6 cui/source/dialogs/about.cxx | 2 cui/source/dialogs/cuifmsearch.cxx | 6 cui/source/factory/cuiresmgr.cxx | 2 cui/source/inc/border.hxx | 3 cui/source/inc/dialmgr.hxx | 3 cui/source/inc/macropg.hxx | 5 cui/source/options/optpath.cxx | 2 cui/source/options/treeopt.cxx | 1 cui/source/tabpages/border.cxx | 6 dbaccess/inc/core_resource.hxx | 7 dbaccess/inc/query.hrc | 4 dbaccess/inc/strings.hrc | 4 dbaccess/inc/templwin.hrc | 5 dbaccess/source/core/dataaccess/datasource.cxx | 2 dbaccess/source/core/resource/core_resource.cxx | 6 dbaccess/source/ui/app/AppDetailView.cxx | 8 dbaccess/source/ui/app/AppDetailView.hxx | 8 dbaccess/source/ui/app/AppIconControl.cxx | 2 dbaccess/source/ui/app/AppTitleWindow.cxx | 4 dbaccess/source/ui/app/AppTitleWindow.hxx | 5 dbaccess/source/ui/control/FieldControls.cxx | 8 dbaccess/source/ui/control/FieldDescControl.cxx | 2 dbaccess/source/ui/dlg/ConnectionPage.cxx | 2 dbaccess/source/ui/dlg/ConnectionPageSetup.cxx | 10 dbaccess/source/ui/dlg/ConnectionPageSetup.hxx | 5 dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx | 6 dbaccess/source/ui/dlg/DBSetupConnectionPages.hxx | 8 dbaccess/source/ui/dlg/dbadmin.cxx | 2 dbaccess/source/ui/dlg/dbwiz.cxx | 2 dbaccess/source/ui/dlg/detailpages.cxx | 2 dbaccess/source/ui/dlg/generalpage.cxx | 2 dbaccess/source/ui/dlg/sqlmessage.cxx | 4 dbaccess/source/ui/inc/FieldControls.hxx | 9 dbaccess/source/ui/inc/FieldDescControl.hxx | 3 dbaccess/source/ui/inc/GeneralUndo.hxx | 2 dbaccess/source/ui/inc/UITools.hxx | 3 dbaccess/source/ui/inc/dbadmin.hxx | 3 dbaccess/source/ui/misc/UITools.cxx | 2 dbaccess/source/ui/querydesign/QueryDesignFieldUndoAct.hxx | 4 dbaccess/source/ui/querydesign/QueryDesignUndoAction.hxx | 2 dbaccess/source/ui/querydesign/QueryDesignView.cxx | 2 dbaccess/source/ui/querydesign/QueryTabConnUndoAction.cxx | 2 dbaccess/source/ui/querydesign/QueryTabConnUndoAction.hxx | 2 dbaccess/source/ui/querydesign/QueryTabWinUndoAct.cxx | 4 dbaccess/source/ui/querydesign/QueryTabWinUndoAct.hxx | 2 dbaccess/source/ui/querydesign/querycontroller.cxx | 2 dbaccess/source/ui/querydesign/querydlg.cxx | 2 dbaccess/source/ui/tabledesign/TableUndo.cxx | 4 dbaccess/source/ui/tabledesign/TableUndo.hxx | 4 desktop/inc/dp_shared.hxx | 2 desktop/inc/strings.hrc | 2 desktop/source/deployment/gui/dp_gui_dialog2.cxx | 2 desktop/source/deployment/gui/dp_gui_dialog2.hxx | 3 desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx | 8 desktop/source/deployment/registry/help/dp_help.cxx | 4 editeng/inc/strings.hrc | 8 editeng/source/editeng/eerdll.cxx | 2 editeng/source/items/borderline.cxx | 4 editeng/source/items/charhiddenitem.cxx | 3 editeng/source/items/frmitems.cxx | 22 editeng/source/items/itemtype.cxx | 6 editeng/source/items/paraitem.cxx | 10 editeng/source/items/textitem.cxx | 34 editeng/source/misc/splwrap.cxx | 2 editeng/source/misc/unolingu.cxx | 2 extensions/inc/command.hrc | 6 extensions/inc/showhide.hrc | 4 extensions/inc/stringarrays.hrc | 60 extensions/inc/strings.hrc | 4 extensions/inc/yesno.hrc | 6 extensions/source/abpilot/abspilot.cxx | 2 extensions/source/bibliography/bibmod.cxx | 2 extensions/source/bibliography/bibresid.hxx | 4 extensions/source/dbpilots/controlwizard.cxx | 2 extensions/source/inc/componentmodule.cxx | 2 extensions/source/inc/componentmodule.hxx | 3 extensions/source/propctrlr/defaultforminspection.cxx | 2 extensions/source/propctrlr/eventhandler.cxx | 2 extensions/source/propctrlr/eventhandler.hxx | 3 extensions/source/propctrlr/formcomponenthandler.cxx | 2 extensions/source/propctrlr/formmetadata.cxx | 2 extensions/source/propctrlr/handlerhelper.cxx | 2 extensions/source/propctrlr/handlerhelper.hxx | 3 extensions/source/propctrlr/modulepcr.cxx | 2 extensions/source/propctrlr/modulepcr.hxx | 4 extensions/source/scanner/sanedlg.cxx | 2 filter/inc/strings.hrc | 2 filter/source/pdf/impdialog.cxx | 2 filter/source/t602/t602filter.cxx | 2 filter/source/t602/t602filter.hxx | 3 filter/source/xsltdialog/xmlfiltercommon.hxx | 3 filter/source/xsltdialog/xmlfiltersettingsdialog.cxx | 2 filter/source/xsltdialog/xmlfiltertabdialog.cxx | 7 forms/inc/strings.hrc | 4 forms/source/inc/frm_resource.hxx | 4 forms/source/resource/frm_resource.cxx | 3 forms/source/runtime/formoperations.cxx | 4 forms/source/runtime/formoperations.hxx | 3 forms/source/solar/control/navtoolbar.cxx | 2 forms/source/xforms/datatypes.cxx | 46 forms/source/xforms/datatypes.hxx | 23 forms/source/xforms/resourcehelper.cxx | 8 forms/source/xforms/resourcehelper.hxx | 11 formula/inc/core_resource.hrc | 18 formula/inc/core_resource.hxx | 4 formula/inc/strings.hrc | 2 formula/source/core/api/FormulaCompiler.cxx | 83 - formula/source/core/resource/core_resource.cxx | 3 fpicker/inc/fpsofficeResMgr.hxx | 5 fpicker/inc/strings.hrc | 2 fpicker/source/aqua/resourceprovider.mm | 8 fpicker/source/office/iodlg.cxx | 4 fpicker/source/win32/resourceprovider.cxx | 8 framework/inc/classes/fwkresid.hxx | 4 framework/inc/strings.hrc | 2 framework/source/fwe/classes/fwkresid.cxx | 3 framework/source/uielement/controlmenucontroller.cxx | 2 include/basic/sbdef.hxx | 5 include/editeng/editrids.hrc | 2 include/editeng/eerdll.hxx | 3 include/editeng/frmdir.hxx | 3 include/editeng/itemtype.hxx | 3 include/fpicker/strings.hrc | 2 include/sfx2/sfxresid.hxx | 4 include/sfx2/strings.hrc | 2 include/sfx2/styfitem.hxx | 3 include/svl/svl.hrc | 2 include/svl/svlresid.hxx | 4 include/svtools/ehdl.hxx | 2 include/svtools/strings.hrc | 2 include/svtools/svtresid.hxx | 3 include/svx/dialmgr.hxx | 3 include/svx/strings.hrc | 2 include/svx/svddrgmt.hxx | 2 include/svx/svdmrkv.hxx | 4 include/svx/svdobj.hxx | 3 include/svx/svdundo.hxx | 7 include/svx/svxitems.hrc | 4 include/svx/xit.hxx | 3 include/unotools/resmgr.hxx | 18 oox/inc/ooxresid.hxx | 4 oox/inc/strings.hrc | 4 oox/source/helper/ooxresid.cxx | 4 reportdesign/inc/UndoActions.hxx | 8 reportdesign/inc/core_resource.hxx | 4 reportdesign/inc/stringarray.hrc | 34 reportdesign/inc/strings.hrc | 2 reportdesign/source/core/resource/core_resource.cxx | 3 reportdesign/source/core/sdr/ReportUndoFactory.cxx | 2 reportdesign/source/core/sdr/UndoActions.cxx | 10 reportdesign/source/ui/dlg/GroupsSorting.cxx | 4 reportdesign/source/ui/inc/GeometryHandler.hxx | 5 reportdesign/source/ui/inc/ReportController.hxx | 8 reportdesign/source/ui/inc/RptUndo.hxx | 6 reportdesign/source/ui/inc/SectionWindow.hxx | 4 reportdesign/source/ui/inspection/DataProviderHandler.cxx | 2 reportdesign/source/ui/inspection/DefaultInspection.cxx | 2 reportdesign/source/ui/inspection/GeometryHandler.cxx | 16 reportdesign/source/ui/misc/RptUndo.cxx | 8 reportdesign/source/ui/report/ReportController.cxx | 12 reportdesign/source/ui/report/SectionWindow.cxx | 4 reportdesign/source/ui/report/propbrw.cxx | 2 sc/inc/compiler.hrc | 6 sc/inc/dpobject.hxx | 3 sc/inc/dpshttab.hxx | 3 sc/inc/globstr.hrc | 4 sc/inc/pvfundlg.hrc | 4 sc/inc/scerrors.hrc | 4 sc/inc/scfuncs.hrc | 792 +++++----- sc/inc/scresid.hxx | 5 sc/inc/scstyles.hrc | 10 sc/inc/strings.hrc | 4 sc/inc/subtotals.hrc | 4 sc/inc/units.hrc | 4 sc/qa/unit/ucalc_pivottable.cxx | 6 sc/source/core/data/attrib.cxx | 8 sc/source/core/data/dpdimsave.cxx | 2 sc/source/core/data/dpobject.cxx | 6 sc/source/core/data/dpoutput.cxx | 8 sc/source/core/data/dpshttab.cxx | 6 sc/source/core/data/dptabres.cxx | 6 sc/source/core/data/dputil.cxx | 8 sc/source/core/data/funcdesc.cxx | 2 sc/source/core/data/global.cxx | 4 sc/source/core/data/table3.cxx | 4 sc/source/core/tool/autoform.cxx | 2 sc/source/core/tool/chgtrack.cxx | 4 sc/source/filter/excel/xepivot.cxx | 2 sc/source/filter/ftools/fprogressbar.cxx | 4 sc/source/filter/inc/fprogressbar.hxx | 5 sc/source/ui/StatisticsDialogs/AnalysisOfVarianceDialog.cxx | 12 sc/source/ui/StatisticsDialogs/ChiSquareTestDialog.cxx | 2 sc/source/ui/StatisticsDialogs/CovarianceDialog.cxx | 2 sc/source/ui/StatisticsDialogs/DescriptiveStatisticsDialog.cxx | 6 sc/source/ui/StatisticsDialogs/ExponentialSmoothingDialog.cxx | 2 sc/source/ui/StatisticsDialogs/FTestDialog.cxx | 2 sc/source/ui/StatisticsDialogs/FourierAnalysisDialog.cxx | 2 sc/source/ui/StatisticsDialogs/MatrixComparisonGenerator.cxx | 2 sc/source/ui/StatisticsDialogs/MovingAverageDialog.cxx | 2 sc/source/ui/StatisticsDialogs/RandomNumberGeneratorDialog.cxx | 2 sc/source/ui/StatisticsDialogs/RegressionDialog.cxx | 6 sc/source/ui/StatisticsDialogs/TTestDialog.cxx | 2 sc/source/ui/StatisticsDialogs/ZTestDialog.cxx | 2 sc/source/ui/app/inputhdl.cxx | 2 sc/source/ui/app/inputwin.cxx | 4 sc/source/ui/app/scdll.cxx | 6 sc/source/ui/condformat/condformathelper.cxx | 2 sc/source/ui/dbgui/PivotLayoutDialog.cxx | 2 sc/source/ui/dbgui/PivotLayoutTreeListData.cxx | 2 sc/source/ui/dbgui/consdlg.cxx | 2 sc/source/ui/dbgui/dpgroupdlg.cxx | 2 sc/source/ui/dbgui/sfiltdlg.cxx | 2 sc/source/ui/docshell/dbdocfun.cxx | 2 sc/source/ui/docshell/dbdocimp.cxx | 2 sc/source/ui/docshell/docfunc.cxx | 2 sc/source/ui/docshell/docsh5.cxx | 4 sc/source/ui/docshell/editable.cxx | 4 sc/source/ui/drawfunc/fuconrec.cxx | 2 sc/source/ui/inc/AnalysisOfVarianceDialog.hxx | 2 sc/source/ui/inc/ChiSquareTestDialog.hxx | 2 sc/source/ui/inc/CovarianceDialog.hxx | 2 sc/source/ui/inc/DescriptiveStatisticsDialog.hxx | 2 sc/source/ui/inc/ExponentialSmoothingDialog.hxx | 2 sc/source/ui/inc/FTestDialog.hxx | 2 sc/source/ui/inc/FourierAnalysisDialog.hxx | 2 sc/source/ui/inc/MatrixComparisonGenerator.hxx | 2 sc/source/ui/inc/MovingAverageDialog.hxx | 2 sc/source/ui/inc/RandomNumberGeneratorDialog.hxx | 2 sc/source/ui/inc/RegressionDialog.hxx | 2 sc/source/ui/inc/StatisticsInputOutputDialog.hxx | 2 sc/source/ui/inc/StatisticsTwoVariableDialog.hxx | 2 sc/source/ui/inc/TTestDialog.hxx | 2 sc/source/ui/inc/ZTestDialog.hxx | 2 sc/source/ui/inc/docfunc.hxx | 3 sc/source/ui/inc/docsh.hxx | 2 sc/source/ui/inc/editable.hxx | 3 sc/source/ui/inc/tabview.hxx | 2 sc/source/ui/navipi/content.cxx | 2 sc/source/ui/pagedlg/areasdlg.cxx | 2 sc/source/ui/undo/undoblk.cxx | 2 sc/source/ui/undo/undocell.cxx | 2 sc/source/ui/undo/undodat.cxx | 2 sc/source/ui/undo/undostyl.cxx | 2 sc/source/ui/undo/undotab.cxx | 6 sc/source/ui/unoobj/styleuno.cxx | 2 sc/source/ui/unoobj/targuno.cxx | 2 sc/source/ui/view/cellsh1.cxx | 6 sc/source/ui/view/dbfunc3.cxx | 2 sc/source/ui/view/tabview2.cxx | 4 sc/source/ui/view/tabvwsha.cxx | 2 sc/source/ui/view/viewfunc.cxx | 2 scaddins/inc/analysis.hrc | 206 +- scaddins/inc/datefunc.hrc | 20 scaddins/inc/pricing.hrc | 12 scaddins/inc/strings.hrc | 2 scaddins/source/analysis/analysis.cxx | 4 scaddins/source/analysis/analysis.hxx | 5 scaddins/source/analysis/analysishelper.hxx | 17 scaddins/source/datefunc/datefunc.cxx | 4 scaddins/source/datefunc/datefunc.hxx | 17 scaddins/source/pricing/pricing.cxx | 4 scaddins/source/pricing/pricing.hxx | 17 sccomp/inc/strings.hrc | 2 sccomp/source/solver/CoinMPSolver.cxx | 1 sccomp/source/solver/LpsolveSolver.cxx | 1 sccomp/source/solver/SolverComponent.cxx | 4 sccomp/source/solver/SolverComponent.hxx | 3 sccomp/source/solver/SwarmSolver.cxx | 8 scripting/Library_dlgprov.mk | 1 sd/inc/DocumentRenderer.hrc | 22 sd/inc/errhdl.hrc | 4 sd/inc/family.hrc | 10 sd/inc/pageformatpanel.hrc | 6 sd/inc/sdresid.hxx | 5 sd/inc/strings.hrc | 4 sd/source/core/stlpool.cxx | 4 sd/source/filter/grf/sdgrffilter.cxx | 6 sd/source/filter/html/htmlex.cxx | 5 sd/source/filter/html/htmlex.hxx | 7 sd/source/ui/annotations/annotationmanager.cxx | 2 sd/source/ui/app/sdmod.cxx | 6 sd/source/ui/controller/displaymodecontroller.cxx | 6 sd/source/ui/controller/slidelayoutcontroller.cxx | 10 sd/source/ui/dlg/PaneChildWindows.cxx | 2 sd/source/ui/dlg/tpaction.cxx | 6 sd/source/ui/func/fuconrec.cxx | 2 sd/source/ui/inc/PaneChildWindows.hxx | 3 sd/source/ui/inc/tpaction.hxx | 2 sd/source/ui/sidebar/LayoutMenu.cxx | 10 sd/source/ui/sidebar/MasterPageContainer.cxx | 8 sd/source/ui/view/DocumentRenderer.cxx | 2 sd/source/ui/view/Outliner.cxx | 2 sd/source/ui/view/drviews2.cxx | 2 sd/source/ui/view/viewoverlaymanager.cxx | 2 sfx2/inc/dinfdlg.hrc | 6 sfx2/inc/doctempl.hrc | 4 sfx2/source/appl/opengrf.cxx | 2 sfx2/source/bastyp/sfxresid.cxx | 3 sfx2/source/control/msgpool.cxx | 6 sfx2/source/devtools/DevToolsStrings.hrc | 3 sfx2/source/dialog/styfitem.cxx | 4 sfx2/source/doc/doctempl.cxx | 2 sfx2/source/doc/doctemplates.cxx | 2 sfx2/source/doc/objstor.cxx | 2 shell/inc/spsupp/spsuppStrings.hrc | 2 shell/source/win32/spsupp/spsuppHelper.cxx | 2 solenv/bin/install-gdb-printers | 3 solenv/gdb/libreoffice/utl.py | 39 starmath/inc/ElementsDockingWindow.hxx | 11 starmath/inc/parsebase.hxx | 3 starmath/inc/smmod.hrc | 6 starmath/inc/smmod.hxx | 2 starmath/inc/strings.hrc | 2 starmath/source/AccessibleSmElementsControl.cxx | 4 starmath/source/ElementsDockingWindow.cxx | 76 starmath/source/parsebase.cxx | 2 starmath/source/smmod.cxx | 11 starmath/source/uiobject.cxx | 2 svl/source/misc/getstringresource.cxx | 5 svtools/inc/borderline.hrc | 4 svtools/inc/errtxt.hrc | 14 svtools/inc/langtab.hrc | 4 svtools/source/dialogs/insdlg.cxx | 4 svtools/source/dialogs/prnsetup.cxx | 2 svtools/source/misc/ehdl.cxx | 2 svtools/source/misc/imagemgr.cxx | 40 svtools/source/misc/svtresid.cxx | 3 svx/inc/DescriptionGenerator.hxx | 3 svx/inc/fieldunit.hrc | 4 svx/inc/fmstring.hrc | 4 svx/inc/formnavi.hrc | 4 svx/inc/frmsel.hrc | 6 svx/inc/inspectorvalues.hrc | 4 svx/inc/numberingtype.hrc | 4 svx/inc/rotationstrings.hrc | 4 svx/inc/samecontent.hrc | 4 svx/inc/spacing.hrc | 12 svx/inc/svxerr.hrc | 6 svx/inc/swframeposstrings.hrc | 4 svx/inc/tabwin.hrc | 4 svx/inc/txenctab.hrc | 4 svx/source/accessibility/DescriptionGenerator.cxx | 2 svx/source/accessibility/ShapeTypeHandler.cxx | 6 svx/source/accessibility/svxrectctaccessiblecontext.cxx | 4 svx/source/dialog/dialmgr.cxx | 3 svx/source/dialog/docrecovery.cxx | 2 svx/source/dialog/page.hrc | 6 svx/source/dialog/papersizelistbox.cxx | 2 svx/source/dialog/svxbmpnumvalueset.cxx | 6 svx/source/dialog/svxruler.cxx | 2 svx/source/fmcomp/fmgridcl.cxx | 4 svx/source/form/datanavi.cxx | 12 svx/source/form/fmPropBrw.cxx | 2 svx/source/form/formcontrolfactory.cxx | 4 svx/source/gallery2/gallery1.cxx | 2 svx/source/items/algitem.cxx | 3 svx/source/items/pageitem.cxx | 2 svx/source/sidebar/nbdtmg.cxx | 8 svx/source/stbctrls/modctrl.cxx | 2 svx/source/stbctrls/xmlsecctrl.cxx | 2 svx/source/svdraw/ActionDescriptionProvider.cxx | 2 svx/source/svdraw/svdattr.cxx | 26 svx/source/svdraw/svddrgmt.cxx | 2 svx/source/svdraw/svdedtv2.cxx | 2 svx/source/svdraw/svdmrkv.cxx | 2 svx/source/svdraw/svdobj.cxx | 2 svx/source/svdraw/svdocirc.cxx | 4 svx/source/svdraw/svdograf.cxx | 4 svx/source/svdraw/svdopath.cxx | 4 svx/source/svdraw/svdorect.cxx | 4 svx/source/svdraw/svdundo.cxx | 6 svx/source/tbxctrls/extrusioncontrols.cxx | 8 svx/source/tbxctrls/lboxctrl.cxx | 2 svx/source/toolbars/extrusionbar.cxx | 2 svx/source/toolbars/fontworkbar.cxx | 2 svx/source/unodraw/unoprov.cxx | 153 + svx/source/xoutdev/xattr.cxx | 6 svx/source/xoutdev/xattr2.cxx | 4 svx/source/xoutdev/xattrbmp.cxx | 1 sw/inc/AccessibilityCheckStrings.hrc | 2 sw/inc/app.hrc | 26 sw/inc/cnttab.hrc | 4 sw/inc/dbui.hrc | 6 sw/inc/error.hrc | 4 sw/inc/flddinf.hrc | 4 sw/inc/fldref.hrc | 4 sw/inc/inspectorproperties.hrc | 4 sw/inc/mdiexp.hxx | 3 sw/inc/mmaddressblockpage.hrc | 6 sw/inc/optload.hrc | 4 sw/inc/outline.hrc | 4 sw/inc/pageformatpanel.hrc | 6 sw/inc/strings.hrc | 4 sw/inc/swtypes.hxx | 5 sw/inc/utlui.hrc | 4 sw/source/core/access/acccontext.cxx | 2 sw/source/core/access/acccontext.hxx | 3 sw/source/core/access/accfootnote.cxx | 4 sw/source/core/access/accheaderfooter.cxx | 2 sw/source/core/doc/DocumentStylePoolManager.cxx | 30 sw/source/core/doc/doclay.cxx | 6 sw/source/core/doc/docredln.cxx | 2 sw/source/core/doc/notxtfrm.cxx | 2 sw/source/core/fields/reffld.cxx | 2 sw/source/core/frmedt/feshview.cxx | 2 sw/source/core/layout/pagedesc.cxx | 2 sw/source/core/tox/tox.cxx | 22 sw/source/core/tox/txmsrt.cxx | 2 sw/source/core/undo/undobj.cxx | 2 sw/source/core/unocore/unosett.cxx | 2 sw/source/core/unocore/unostyle.cxx | 6 sw/source/ui/fldui/flddok.cxx | 2 sw/source/ui/fldui/fldfunc.cxx | 2 sw/source/ui/fldui/fldref.cxx | 2 sw/source/ui/index/cnttab.cxx | 12 sw/source/ui/index/swuiidxmrk.cxx | 2 sw/source/uibase/app/docsh2.cxx | 2 sw/source/uibase/app/mainwn.cxx | 2 sw/source/uibase/app/swmodule.cxx | 6 sw/source/uibase/dochdl/swdtflvr.cxx | 14 sw/source/uibase/docvw/SidebarTxtControl.cxx | 4 sw/source/uibase/docvw/edtwin2.cxx | 2 sw/source/uibase/fldui/fldmgr.cxx | 62 sw/source/uibase/misc/redlndlg.cxx | 2 sw/source/uibase/misc/swruler.cxx | 2 sw/source/uibase/ribbar/workctrl.cxx | 10 sw/source/uibase/shells/textfld.cxx | 2 sw/source/uibase/sidebar/WriterInspectorTextPanel.cxx | 2 sw/source/uibase/uiview/view2.cxx | 8 sw/source/uibase/uiview/viewprt.cxx | 2 sw/source/uibase/utlui/attrdesc.cxx | 34 sw/source/uibase/utlui/content.cxx | 6 sw/source/uibase/utlui/glbltree.cxx | 2 sw/source/uibase/utlui/initui.cxx | 6 sw/source/uibase/utlui/navipi.cxx | 4 sw/source/uibase/wrtsh/wrtundo.cxx | 2 unotools/source/i18n/resmgr.cxx | 128 - uui/inc/ids.hrc | 6 uui/inc/strings.hrc | 2 uui/source/iahndl-ssl.cxx | 4 uui/source/iahndl.cxx | 2 uui/source/iahndl.hxx | 5 uui/source/passworddlg.cxx | 6 writerperfect/inc/WPFTResMgr.hxx | 5 writerperfect/inc/strings.hrc | 2 xmlsecurity/inc/certificatechooser.hxx | 3 xmlsecurity/inc/resourcemanager.hxx | 5 xmlsecurity/inc/strings.hrc | 2 xmlsecurity/source/dialogs/certificatechooser.cxx | 2 490 files changed, 1993 insertions(+), 1849 deletions(-)
New commits: commit 14cfff500e93f0d6cbf8412065feea85c01ea81d Author: Noel Grandin <[email protected]> AuthorDate: Mon Jul 19 13:18:49 2021 +0200 Commit: Noel Grandin <[email protected]> CommitDate: Thu Aug 5 09:39:11 2021 +0200 Pass context and resource string down to boost::locale separately because this is often on a hot path, and we can avoid the splitting and joining of strings like this. Change-Id: Ia36047209368ca53431178c2e8723a18cfe8260a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119220 Tested-by: Jenkins Reviewed-by: Noel Grandin <[email protected]> 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!" ); ... etc. - the rest is truncated
