summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--basic/source/classes/sb.cxx2
-rw-r--r--chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx2
-rw-r--r--chart2/source/controller/dialogs/tp_DataSource.cxx4
-rw-r--r--chart2/source/controller/itemsetwrapper/GraphicPropertyItemConverter.cxx4
-rw-r--r--chart2/source/controller/main/DrawCommandDispatch.cxx5
-rw-r--r--chart2/source/model/template/PieChartTypeTemplate.cxx2
-rw-r--r--chart2/source/tools/InternalDataProvider.cxx2
-rw-r--r--chart2/source/tools/RegressionCurveHelper.cxx2
-rw-r--r--chart2/source/tools/StatisticsHelper.cxx2
-rw-r--r--chart2/source/tools/UncachedDataSequence.cxx2
-rw-r--r--chart2/source/view/axes/VCartesianAxis.cxx2
-rw-r--r--chart2/source/view/main/VLegend.cxx2
-rw-r--r--comphelper/source/misc/backupfilehelper.cxx6
-rw-r--r--connectivity/qa/connectivity/ado/DriverTest.cxx6
-rw-r--r--connectivity/source/commontools/DateConversion.cxx2
-rw-r--r--connectivity/source/commontools/dbtools.cxx2
-rw-r--r--connectivity/source/commontools/formattedcolumnvalue.cxx2
-rw-r--r--connectivity/source/commontools/statementcomposer.cxx4
-rw-r--r--connectivity/source/drivers/evoab2/NDatabaseMetaData.cxx2
-rw-r--r--connectivity/source/drivers/hsqldb/HDriver.cxx2
-rw-r--r--cpputools/source/unoexe/unoexe.cxx2
-rw-r--r--cui/source/dialogs/hlmarkwn.cxx6
-rw-r--r--cui/source/tabpages/chardlg.cxx2
-rw-r--r--dbaccess/qa/extras/dialog-save.cxx2
-rw-r--r--dbaccess/qa/extras/empty-stdlib-save.cxx2
-rw-r--r--dbaccess/qa/extras/nolib-save.cxx2
-rw-r--r--dbaccess/source/core/api/FilteredContainer.cxx6
-rw-r--r--dbaccess/source/core/recovery/subcomponentrecovery.cxx2
-rw-r--r--dbaccess/source/filter/xml/xmlExport.cxx2
-rw-r--r--dbaccess/source/ui/dlg/DbAdminImpl.cxx2
-rw-r--r--dbaccess/source/ui/dlg/queryorder.cxx4
-rw-r--r--desktop/source/app/crashreport.cxx4
-rw-r--r--desktop/source/deployment/registry/help/dp_help.cxx2
-rw-r--r--desktop/source/deployment/registry/package/dp_package.cxx6
-rw-r--r--desktop/source/lib/init.cxx2
-rw-r--r--desktop/source/migration/migration.cxx18
-rw-r--r--drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx2
-rw-r--r--editeng/source/misc/unolingu.cxx2
-rw-r--r--editeng/source/xml/xmltxtexp.cxx2
-rw-r--r--editeng/source/xml/xmltxtimp.cxx2
-rw-r--r--embeddedobj/source/commonembedding/persistence.cxx2
-rw-r--r--extensions/source/abpilot/fieldmappingimpl.cxx4
-rw-r--r--filter/source/msfilter/escherex.cxx18
-rw-r--r--filter/source/msfilter/msdffimp.cxx12
-rw-r--r--filter/source/pdf/pdfexport.cxx4
-rw-r--r--filter/source/svg/svgwriter.cxx8
-rw-r--r--filter/source/xsltdialog/typedetectionexport.cxx40
-rw-r--r--forms/source/component/Columns.cxx4
-rw-r--r--fpicker/source/office/iodlg.cxx2
-rw-r--r--fpicker/source/win32/shared.hxx6
-rw-r--r--fpicker/source/win32/workbench/Test_fps.cxx2
-rw-r--r--framework/source/accelerators/acceleratorconfiguration.cxx2
-rw-r--r--framework/source/fwe/classes/addonsoptions.cxx8
-rw-r--r--framework/source/uielement/fontmenucontroller.cxx2
-rw-r--r--framework/source/uielement/fontsizemenucontroller.cxx2
-rw-r--r--framework/source/uielement/headermenucontroller.cxx4
-rw-r--r--framework/source/uielement/langselectionmenucontroller.cxx2
-rw-r--r--framework/source/uielement/langselectionstatusbarcontroller.cxx2
-rw-r--r--framework/source/uielement/macrosmenucontroller.cxx6
-rw-r--r--framework/source/uielement/objectmenucontroller.cxx2
-rw-r--r--framework/source/uielement/recentfilesmenucontroller.cxx2
-rw-r--r--framework/source/uifactory/uicontrollerfactory.cxx2
-rw-r--r--i18npool/source/collator/chaptercollator.cxx2
-rw-r--r--linguistic/source/lngsvcmgr.cxx8
-rw-r--r--oox/source/core/filterbase.cxx6
-rw-r--r--oox/source/drawingml/customshapeproperties.cxx6
-rw-r--r--oox/source/drawingml/hyperlinkcontext.cxx4
-rw-r--r--oox/source/drawingml/shape.cxx8
-rw-r--r--oox/source/export/shapes.cxx2
-rw-r--r--oox/source/helper/propertymap.cxx2
-rw-r--r--oox/source/ole/vbacontrol.cxx2
-rw-r--r--oox/source/ole/vbaexport.cxx2
-rw-r--r--oox/source/ppt/pptshape.cxx2
-rw-r--r--oox/source/ppt/presentationfragmenthandler.cxx8
-rw-r--r--oox/source/ppt/slidepersist.cxx8
-rw-r--r--oox/source/vml/vmlshape.cxx2
-rw-r--r--package/source/manifest/ManifestExport.cxx36
-rw-r--r--package/source/zippackage/ZipPackage.cxx38
-rw-r--r--package/source/zippackage/ZipPackageStream.cxx10
-rw-r--r--reportdesign/source/core/misc/conditionalexpression.cxx6
-rw-r--r--reportdesign/source/core/sdr/formatnormalizer.cxx2
-rw-r--r--reportdesign/source/ui/inspection/DataProviderHandler.cxx4
-rw-r--r--reportdesign/source/ui/inspection/GeometryHandler.cxx6
-rw-r--r--reportdesign/source/ui/inspection/ReportComponentHandler.cxx4
-rw-r--r--reportdesign/source/ui/report/ReportController.cxx7
-rw-r--r--sal/qa/rtl/process/rtl_Process.cxx8
-rw-r--r--sc/qa/extras/macros-test.cxx12
-rw-r--r--sc/qa/unit/screenshots/screenshots.cxx2
-rw-r--r--sc/qa/unit/subsequent_filters-test.cxx2
-rw-r--r--sc/source/filter/excel/xechart.cxx4
-rw-r--r--sc/source/filter/excel/xicontent.cxx2
-rw-r--r--sc/source/filter/oox/querytablebuffer.cxx2
-rw-r--r--sc/source/filter/xcl97/xcl97esc.cxx2
-rw-r--r--sc/source/filter/xml/XMLStylesExportHelper.cxx2
-rw-r--r--sc/source/ui/StatisticsDialogs/MatrixComparisonGenerator.cxx2
-rw-r--r--sc/source/ui/dbgui/validate.cxx2
-rw-r--r--sc/source/ui/docshell/datastream.cxx2
-rw-r--r--sc/source/ui/docshell/docsh4.cxx8
-rw-r--r--sc/source/ui/vba/vbasheetobject.cxx5
-rw-r--r--sd/qa/unit/SVGExportTests.cxx2
-rw-r--r--sd/qa/unit/export-tests-ooxml2.cxx9
-rw-r--r--sd/qa/unit/misc-tests.cxx2
-rw-r--r--sd/source/core/CustomAnimationEffect.cxx2
-rw-r--r--sd/source/filter/eppt/pptx-epptooxml.cxx2
-rw-r--r--sd/source/filter/grf/sdgrffilter.cxx2
-rw-r--r--sd/source/filter/xml/sdxmlwrp.cxx4
-rw-r--r--sd/source/ui/animations/CustomAnimationDialog.cxx2
-rw-r--r--sd/source/ui/animations/CustomAnimationList.cxx4
-rw-r--r--sd/source/ui/animations/CustomAnimationPane.cxx4
-rw-r--r--sd/source/ui/docshell/docshel3.cxx8
-rw-r--r--sd/source/ui/docshell/docshel4.cxx4
-rw-r--r--sd/source/ui/framework/configuration/ConfigurationTracer.cxx2
-rw-r--r--sd/source/ui/sidebar/RecentlyUsedMasterPages.cxx8
-rw-r--r--sd/source/ui/unoidl/unomodel.cxx4
-rw-r--r--sd/source/ui/unoidl/unopage.cxx2
-rw-r--r--sd/source/ui/view/DocumentRenderer.cxx2
-rw-r--r--sd/source/ui/view/drviewsf.cxx8
-rw-r--r--sdext/source/minimizer/informationdialog.cxx6
-rw-r--r--sdext/source/presenter/PresenterController.cxx6
-rw-r--r--sdext/source/presenter/PresenterSlideSorter.cxx2
-rw-r--r--sfx2/source/appl/sfxhelp.cxx2
-rw-r--r--sfx2/source/dialog/dinfdlg.cxx2
-rw-r--r--sfx2/source/dialog/mailmodel.cxx2
-rw-r--r--sfx2/source/doc/docmacromode.cxx4
-rw-r--r--sfx2/source/doc/doctemplates.cxx6
-rw-r--r--sfx2/source/doc/doctemplateslocal.cxx4
-rw-r--r--sfx2/source/doc/guisaveas.cxx14
-rw-r--r--sfx2/source/doc/objstor.cxx30
-rw-r--r--sfx2/source/doc/sfxbasemodel.cxx10
-rw-r--r--sfx2/source/view/viewfrm.cxx4
-rw-r--r--starmath/source/edit.cxx2
-rw-r--r--starmath/source/mathml/mathmlimport.cxx6
-rw-r--r--svl/source/numbers/zformat.cxx4
-rw-r--r--svtools/source/config/extcolorcfg.cxx10
-rw-r--r--svtools/source/dialogs/colrdlg.cxx2
-rw-r--r--svtools/source/filter/exportdialog.cxx4
-rw-r--r--svx/qa/unit/gallery/test_gallery.cxx14
-rw-r--r--svx/source/core/graphichelper.cxx2
-rw-r--r--svx/source/customshapes/EnhancedCustomShape2d.cxx2
-rw-r--r--svx/source/dialog/svxbmpnumvalueset.cxx2
-rw-r--r--svx/source/fmcomp/gridcols.cxx4
-rw-r--r--svx/source/form/formcontrolfactory.cxx2
-rw-r--r--svx/source/mnuctrls/smarttagmenu.cxx2
-rw-r--r--svx/source/svdraw/svdoashp.cxx30
-rw-r--r--svx/source/table/cellcursor.cxx4
-rw-r--r--svx/source/table/svdotable.cxx6
-rw-r--r--svx/source/table/tablecontroller.cxx2
-rw-r--r--svx/source/table/tablelayouter.cxx4
-rw-r--r--svx/source/table/tablemodel.cxx4
-rw-r--r--svx/source/table/tablertfimporter.cxx2
-rw-r--r--svx/source/tbxctrls/tbcontrl.cxx2
-rw-r--r--svx/source/tbxctrls/tbunosearchcontrollers.cxx6
-rw-r--r--svx/source/toolbars/fontworkbar.cxx14
-rw-r--r--svx/source/unodraw/unomod.cxx2
-rw-r--r--sw/qa/core/uwriter.cxx2
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport4.cxx4
-rw-r--r--sw/qa/extras/ooxmlimport/ooxmlimport.cxx2
-rw-r--r--sw/qa/extras/unowriter/unowriter.cxx12
-rw-r--r--sw/source/core/doc/DocumentContentOperationsManager.cxx2
-rw-r--r--sw/source/core/doc/docfld.cxx4
-rw-r--r--sw/source/core/doc/doclay.cxx2
-rw-r--r--sw/source/core/edit/edfcol.cxx2
-rw-r--r--sw/source/core/unocore/unodraw.cxx8
-rw-r--r--sw/source/core/view/printdata.cxx4
-rw-r--r--sw/source/filter/html/swhtml.cxx4
-rw-r--r--sw/source/filter/html/wrthtml.cxx2
-rw-r--r--sw/source/filter/ww8/ww8par5.cxx2
-rw-r--r--sw/source/filter/ww8/ww8toolbar.cxx2
-rw-r--r--sw/source/filter/xml/swxml.cxx12
-rw-r--r--sw/source/filter/xml/xmlexp.cxx4
-rw-r--r--sw/source/filter/xml/xmlimp.cxx10
-rw-r--r--sw/source/ui/envelp/mailmrge.cxx2
-rw-r--r--sw/source/ui/misc/glosbib.cxx2
-rw-r--r--sw/source/ui/misc/glossary.cxx2
-rw-r--r--sw/source/ui/vba/vbaparagraphformat.cxx2
-rw-r--r--sw/source/uibase/app/docstyle.cxx2
-rw-r--r--sw/source/uibase/shells/langhelper.cxx6
-rw-r--r--sw/source/uibase/shells/textsh1.cxx14
-rw-r--r--sw/source/uibase/uno/unomailmerge.cxx2
-rw-r--r--test/source/sheet/cellarealink.cxx10
-rw-r--r--test/source/sheet/databaserange.cxx22
-rw-r--r--test/source/sheet/datapilotitem.cxx4
-rw-r--r--test/source/sheet/xarrayformularange.cxx2
-rw-r--r--test/source/sheet/xspreadsheets2.cxx2
-rw-r--r--test/source/text/textsettings.cxx6
-rw-r--r--ucb/source/core/ucbcmds.cxx2
-rw-r--r--ucb/source/core/ucbstore.cxx12
-rw-r--r--ucb/source/ucp/ext/ucpext_provider.cxx2
-rw-r--r--ucb/source/ucp/file/bc.cxx2
-rw-r--r--unodevtools/source/unodevtools/options.cxx2
-rw-r--r--vcl/source/filter/FilterConfigItem.cxx5
-rw-r--r--vcl/source/image/ImplImageTree.cxx2
-rw-r--r--vcl/source/treelist/transfer.cxx22
-rw-r--r--vcl/unx/gtk3_kde5/gtk3_kde5_filepicker_ipc.cxx2
-rw-r--r--vcl/win/dtrans/MimeAttrib.hxx10
-rw-r--r--writerfilter/source/dmapper/DomainMapper_Impl.cxx2
-rw-r--r--xmloff/source/chart/SchXMLSeries2Context.cxx2
-rw-r--r--xmloff/source/chart/SchXMLTableContext.cxx2
-rw-r--r--xmloff/source/chart/SchXMLTools.cxx8
-rw-r--r--xmloff/source/core/SettingsExportHelper.cxx30
-rw-r--r--xmloff/source/core/xmlexp.cxx8
-rw-r--r--xmloff/source/draw/XMLGraphicsDefaultStyle.cxx2
-rw-r--r--xmloff/source/draw/layerexp.cxx12
-rw-r--r--xmloff/source/draw/sdxmlexp.cxx8
-rw-r--r--xmloff/source/draw/shapeexport.cxx16
-rw-r--r--xmloff/source/draw/xexptran.cxx24
-rw-r--r--xmloff/source/draw/ximppage.cxx8
-rw-r--r--xmloff/source/draw/ximpshap.cxx16
-rw-r--r--xmloff/source/meta/xmlmetai.cxx6
-rw-r--r--xmloff/source/style/XMLPageExport.cxx2
-rw-r--r--xmloff/source/style/xmlnume.cxx2
-rw-r--r--xmloff/source/table/XMLTableExport.cxx2
-rw-r--r--xmloff/source/text/XMLSectionExport.cxx2
-rw-r--r--xmloff/source/text/XMLTextFrameContext.cxx4
-rw-r--r--xmloff/source/text/XMLTextHeaderFooterContext.cxx2
-rw-r--r--xmloff/source/text/txtimp.cxx12
-rw-r--r--xmloff/source/text/txtparae.cxx4
-rw-r--r--xmlsecurity/source/helper/documentsignaturemanager.cxx6
218 files changed, 590 insertions, 597 deletions
diff --git a/basic/source/classes/sb.cxx b/basic/source/classes/sb.cxx
index 790cbb993c89..10d7f4281271 100644
--- a/basic/source/classes/sb.cxx
+++ b/basic/source/classes/sb.cxx
@@ -1877,7 +1877,7 @@ Reference< frame::XModel > StarBASIC::GetModelFromBasic( SbxObject* pBasic )
// look for the ThisComponent variable, first in the parent (which
// might be the document's Basic), then in the parent's parent (which might be
// the application Basic)
- const OUString sThisComponent( "ThisComponent");
+ static const OUStringLiteral sThisComponent( u"ThisComponent");
SbxVariable* pThisComponent = nullptr;
SbxObject* pLookup = pBasic->GetParent();
diff --git a/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx b/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx
index aa12dbc27eea..8b068a9a57c7 100644
--- a/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx
+++ b/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx
@@ -468,7 +468,7 @@ sal_Int32 lcl_getNewAPIIndexForOldAPIIndex(
OUString lcl_getDiagramType( const OUString & rTemplateServiceName )
{
- const OUString aPrefix("com.sun.star.chart2.template.");
+ static const OUStringLiteral aPrefix(u"com.sun.star.chart2.template.");
if( rTemplateServiceName.match( aPrefix ))
{
diff --git a/chart2/source/controller/dialogs/tp_DataSource.cxx b/chart2/source/controller/dialogs/tp_DataSource.cxx
index 90eb974ca0d5..8586bd7260c7 100644
--- a/chart2/source/controller/dialogs/tp_DataSource.cxx
+++ b/chart2/source/controller/dialogs/tp_DataSource.cxx
@@ -355,7 +355,7 @@ void DataSourceTabPage::fillSeriesListBox()
OUString aResString(::chart::SchResId( STR_DATA_UNNAMED_SERIES_WITH_INDEX ));
// replace index of unnamed series
- const OUString aReplacementStr( "%NUMBER" );
+ static const OUStringLiteral aReplacementStr( u"%NUMBER" );
sal_Int32 nIndex = aResString.indexOf( aReplacementStr );
if( nIndex != -1 )
aLabel = aResString.replaceAt(
@@ -485,7 +485,7 @@ IMPL_LINK_NOARG(DataSourceTabPage, RoleSelectionChangedHdl, weld::TreeView&, voi
OUString aSelectedRange = lcl_GetSelectedRolesRange( *m_xLB_ROLE );
// replace role in fixed text label
- const OUString aReplacementStr( "%VALUETYPE" );
+ static const OUStringLiteral aReplacementStr( u"%VALUETYPE" );
sal_Int32 nIndex = m_aFixedTextRange.indexOf( aReplacementStr );
if( nIndex != -1 )
{
diff --git a/chart2/source/controller/itemsetwrapper/GraphicPropertyItemConverter.cxx b/chart2/source/controller/itemsetwrapper/GraphicPropertyItemConverter.cxx
index 55e954e946d9..f553ff16bc34 100644
--- a/chart2/source/controller/itemsetwrapper/GraphicPropertyItemConverter.cxx
+++ b/chart2/source/controller/itemsetwrapper/GraphicPropertyItemConverter.cxx
@@ -426,7 +426,7 @@ bool GraphicPropertyItemConverter::ApplySpecialItem(
case XATTR_FILLBMP_STRETCH:
if( lcl_supportsFillProperties( m_GraphicObjectType ))
{
- const OUString aModePropName("FillBitmapMode");
+ static const OUStringLiteral aModePropName(u"FillBitmapMode");
bool bStretched = rItemSet.Get( XATTR_FILLBMP_STRETCH ).GetValue();
drawing::BitmapMode aMode =
(bStretched ? drawing::BitmapMode_STRETCH : drawing::BitmapMode_NO_REPEAT);
@@ -448,7 +448,7 @@ bool GraphicPropertyItemConverter::ApplySpecialItem(
case XATTR_FILLBMP_TILE:
if( lcl_supportsFillProperties( m_GraphicObjectType ))
{
- const OUString aModePropName("FillBitmapMode");
+ static const OUStringLiteral aModePropName(u"FillBitmapMode");
bool bTiled = rItemSet.Get( XATTR_FILLBMP_TILE ).GetValue();
drawing::BitmapMode aMode =
(bTiled ? drawing::BitmapMode_REPEAT : drawing::BitmapMode_NO_REPEAT);
diff --git a/chart2/source/controller/main/DrawCommandDispatch.cxx b/chart2/source/controller/main/DrawCommandDispatch.cxx
index ef0bdfd5af5b..f2011022595f 100644
--- a/chart2/source/controller/main/DrawCommandDispatch.cxx
+++ b/chart2/source/controller/main/DrawCommandDispatch.cxx
@@ -350,12 +350,11 @@ void DrawCommandDispatch::execute( const OUString& rCommand, const Sequence< bea
pDrawViewWrapper->SetCreateMode();
}
- const OUString sKeyModifier( "KeyModifier" );
const beans::PropertyValue* pIter = rArgs.getConstArray();
const beans::PropertyValue* pEnd = pIter + rArgs.getLength();
const beans::PropertyValue* pKeyModifier = std::find_if(pIter, pEnd,
- [&sKeyModifier](const beans::PropertyValue& lhs)
- {return lhs.Name == sKeyModifier;} );
+ [](const beans::PropertyValue& lhs)
+ {return lhs.Name == "KeyModifier";} );
sal_Int16 nKeyModifier = 0;
if ( !(pKeyModifier != pEnd && ( pKeyModifier->Value >>= nKeyModifier ) && nKeyModifier == KEY_MOD1) )
return;
diff --git a/chart2/source/model/template/PieChartTypeTemplate.cxx b/chart2/source/model/template/PieChartTypeTemplate.cxx
index bf71bfc48fc1..0848f0e98239 100644
--- a/chart2/source/model/template/PieChartTypeTemplate.cxx
+++ b/chart2/source/model/template/PieChartTypeTemplate.cxx
@@ -478,7 +478,7 @@ void SAL_CALL PieChartTypeTemplate::applyStyle(
if( nSeriesIndex == nOuterSeriesIndex ) //@todo in future this will depend on Orientation of the radius axis scale
{
- const OUString aOffsetPropName( "Offset" );
+ static const OUStringLiteral aOffsetPropName( u"Offset" );
// get offset mode
chart2::PieChartOffsetMode ePieOffsetMode;
getFastPropertyValue( PROP_PIE_TEMPLATE_OFFSET_MODE ) >>= ePieOffsetMode;
diff --git a/chart2/source/tools/InternalDataProvider.cxx b/chart2/source/tools/InternalDataProvider.cxx
index edbef2f39401..1b2f6ae28351 100644
--- a/chart2/source/tools/InternalDataProvider.cxx
+++ b/chart2/source/tools/InternalDataProvider.cxx
@@ -1227,7 +1227,7 @@ OUString SAL_CALL InternalDataProvider::convertRangeFromXML( const OUString& aXM
return "";
}
- const OUString aPivotTableID("PT@");
+ static const OUStringLiteral aPivotTableID(u"PT@");
if (aXMLRange.startsWith(aPivotTableID))
return aXMLRange.copy(aPivotTableID.getLength());
diff --git a/chart2/source/tools/RegressionCurveHelper.cxx b/chart2/source/tools/RegressionCurveHelper.cxx
index 66f56725133b..61f155011664 100644
--- a/chart2/source/tools/RegressionCurveHelper.cxx
+++ b/chart2/source/tools/RegressionCurveHelper.cxx
@@ -712,7 +712,7 @@ void RegressionCurveHelper::resetEquationPosition(
try
{
- const OUString aPosPropertyName( "RelativePosition" );
+ static const OUStringLiteral aPosPropertyName( u"RelativePosition" );
Reference< beans::XPropertySet > xEqProp( xCurve->getEquationProperties()); // since m233: , uno::UNO_SET_THROW );
if( xEqProp->getPropertyValue( aPosPropertyName ).hasValue())
xEqProp->setPropertyValue( aPosPropertyName, uno::Any());
diff --git a/chart2/source/tools/StatisticsHelper.cxx b/chart2/source/tools/StatisticsHelper.cxx
index 02dab3b9bd89..ef9c141208a1 100644
--- a/chart2/source/tools/StatisticsHelper.cxx
+++ b/chart2/source/tools/StatisticsHelper.cxx
@@ -146,7 +146,7 @@ void lcl_setXMLRangePropertyAtDataSequence(
{
try
{
- const OUString aXMLRangePropName( "CachedXMLRange");
+ static const OUStringLiteral aXMLRangePropName( u"CachedXMLRange");
Reference< beans::XPropertySet > xProp( xDataSequence, uno::UNO_QUERY_THROW );
Reference< beans::XPropertySetInfo > xInfo( xProp->getPropertySetInfo());
if( xInfo.is() && xInfo->hasPropertyByName( aXMLRangePropName ))
diff --git a/chart2/source/tools/UncachedDataSequence.cxx b/chart2/source/tools/UncachedDataSequence.cxx
index 40412ffa16ae..1eae8def8f4e 100644
--- a/chart2/source/tools/UncachedDataSequence.cxx
+++ b/chart2/source/tools/UncachedDataSequence.cxx
@@ -214,7 +214,7 @@ Sequence< OUString > SAL_CALL UncachedDataSequence::generateLabel( chart2::data:
// auto-generated label
sal_Int32 nSeries = m_aSourceRepresentation.toInt32() + 1;
OUString aResString(::chart::SchResId(STR_DATA_UNNAMED_SERIES_WITH_INDEX));
- const OUString aReplacementStr("%NUMBER");
+ static const OUStringLiteral aReplacementStr(u"%NUMBER");
sal_Int32 nIndex = aResString.indexOf(aReplacementStr);
OUString aName;
if( nIndex != -1 )
diff --git a/chart2/source/view/axes/VCartesianAxis.cxx b/chart2/source/view/axes/VCartesianAxis.cxx
index cb57a6a62207..ebd045a24845 100644
--- a/chart2/source/view/axes/VCartesianAxis.cxx
+++ b/chart2/source/view/axes/VCartesianAxis.cxx
@@ -97,7 +97,7 @@ static void lcl_ResizeTextShapeToFitAvailableSpace( Reference< drawing::XShape >
if( !nAvgCharWidth )
return;
- const OUString sDots = "...";
+ static const OUStringLiteral sDots = u"...";
const sal_Int32 nCharsToRemove = ( nTextSize - nMaxLabelsSize ) / nAvgCharWidth + 1;
sal_Int32 nNewLen = rLabel.getLength() - nCharsToRemove - sDots.getLength();
// Prevent from showing only dots
diff --git a/chart2/source/view/main/VLegend.cxx b/chart2/source/view/main/VLegend.cxx
index e05aa94db702..0e3ea7de79e9 100644
--- a/chart2/source/view/main/VLegend.cxx
+++ b/chart2/source/view/main/VLegend.cxx
@@ -419,7 +419,7 @@ awt::Size lcl_placeLegendEntries(
try
{
OUString aLabelString = rEntries[0].aLabel[0]->getString();
- const OUString sDots = "...";
+ static const OUStringLiteral sDots = u"...";
ShapeFactory* pShapeFactory = ShapeFactory::getOrCreateShapeFactory(xShapeFactory);
for (sal_Int32 nNewLen = aLabelString.getLength() - sDots.getLength(); nNewLen > 0; nNewLen--)
{
diff --git a/comphelper/source/misc/backupfilehelper.cxx b/comphelper/source/misc/backupfilehelper.cxx
index c7bcd4253ed0..5cdf2bf6dc7f 100644
--- a/comphelper/source/misc/backupfilehelper.cxx
+++ b/comphelper/source/misc/backupfilehelper.cxx
@@ -666,8 +666,8 @@ namespace
const ExtensionInfoEntryVector& rToBeEnabled,
const ExtensionInfoEntryVector& rToBeDisabled)
{
- const OUString aRegPathFront("/uno_packages/cache/registry/com.sun.star.comp.deployment.");
- const OUString aRegPathBack(".PackageRegistryBackend/backenddb.xml");
+ static const OUStringLiteral aRegPathFront(u"/uno_packages/cache/registry/com.sun.star.comp.deployment.");
+ static const OUStringLiteral aRegPathBack(u".PackageRegistryBackend/backenddb.xml");
// first appearance to check
{
const OUString aUnoPackagReg(OUString::Concat(rUserConfigWorkURL) + aRegPathFront + "bundle" + aRegPathBack);
@@ -1482,7 +1482,7 @@ namespace comphelper
// points to registrymodifications.xcu
OUString conf("${CONFIGURATION_LAYERS}");
rtl::Bootstrap::expandMacros(conf);
- const OUString aTokenUser("user:");
+ static const OUStringLiteral aTokenUser(u"user:");
sal_Int32 nStart(conf.indexOf(aTokenUser));
if (-1 != nStart)
diff --git a/connectivity/qa/connectivity/ado/DriverTest.cxx b/connectivity/qa/connectivity/ado/DriverTest.cxx
index 1be8c04c7fb5..abe4da67b012 100644
--- a/connectivity/qa/connectivity/ado/DriverTest.cxx
+++ b/connectivity/qa/connectivity/ado/DriverTest.cxx
@@ -93,8 +93,8 @@ void AdoDriverTest::test_metadata()
}
const Any catalog;
- const OUString schemaPattern = "%";
- const OUString tableNamePattern = "%";
+ static const OUStringLiteral schemaPattern = u"%";
+ static const OUStringLiteral tableNamePattern = u"%";
const Sequence< OUString > types;
Reference< XResultSet > xResultSet =
@@ -107,7 +107,7 @@ void AdoDriverTest::test_metadata()
void AdoDriverTest::test_select_default_all()
{
- const OUString sql = "select \"FirstName\" from \"Students\" ORDER BY \"FirstName\"";
+ static const OUStringLiteral sql = u"select \"FirstName\" from \"Students\" ORDER BY \"FirstName\"";
Reference< XPreparedStatement > xStatement = m_xConnection->prepareStatement(sql);
if (!xStatement.is())
{
diff --git a/connectivity/source/commontools/DateConversion.cxx b/connectivity/source/commontools/DateConversion.cxx
index 09b80f62653c..81338b3dc9fa 100644
--- a/connectivity/source/commontools/DateConversion.cxx
+++ b/connectivity/source/commontools/DateConversion.cxx
@@ -84,7 +84,7 @@ OUString DBTypeConversion::toSQLString(sal_Int32 eType, const Any& _rVal,
OUString aTemp;
_rxTypeConverter->convertToSimpleType(_rVal, TypeClass_STRING) >>= aTemp;
sal_Int32 nIndex = sal_Int32(-2);
- const OUString sQuot("\'");
+ static const OUStringLiteral sQuot(u"\'");
do
{
nIndex += 2;
diff --git a/connectivity/source/commontools/dbtools.cxx b/connectivity/source/commontools/dbtools.cxx
index fef22a3b2196..e5e5dcdabbb3 100644
--- a/connectivity/source/commontools/dbtools.cxx
+++ b/connectivity/source/commontools/dbtools.cxx
@@ -394,7 +394,7 @@ static SharedConnection lcl_connectRowSet(const Reference< XRowSet>& _rxRowSet,
// build a connection with its current settings (4. data source name, or 5. URL)
- const OUString sUserProp( "User" );
+ static const OUStringLiteral sUserProp( u"User" );
OUString sDataSourceName;
xRowSetProps->getPropertyValue("DataSourceName") >>= sDataSourceName;
OUString sURL;
diff --git a/connectivity/source/commontools/formattedcolumnvalue.cxx b/connectivity/source/commontools/formattedcolumnvalue.cxx
index de317c43b4ab..fea5b4906e4e 100644
--- a/connectivity/source/commontools/formattedcolumnvalue.cxx
+++ b/connectivity/source/commontools/formattedcolumnvalue.cxx
@@ -150,7 +150,7 @@ namespace dbtools
// get the format key of our bound field
Reference< XPropertySetInfo > xPSI( _rxColumn->getPropertySetInfo(), UNO_SET_THROW );
bool bHaveFieldFormat = false;
- const OUString sFormatKeyProperty( "FormatKey" );
+ static const OUStringLiteral sFormatKeyProperty( u"FormatKey" );
if ( xPSI->hasPropertyByName( sFormatKeyProperty ) )
{
bHaveFieldFormat = ( _rxColumn->getPropertyValue( sFormatKeyProperty ) >>= _rData.m_nFormatKey );
diff --git a/connectivity/source/commontools/statementcomposer.cxx b/connectivity/source/commontools/statementcomposer.cxx
index 01f20e9c1e3c..b0aaaa460f64 100644
--- a/connectivity/source/commontools/statementcomposer.cxx
+++ b/connectivity/source/commontools/statementcomposer.cxx
@@ -169,7 +169,7 @@ namespace dbtools
xComposer->setElementaryQuery( sStatement );
// the sort order
- const OUString sPropOrder( "Order" );
+ static const OUStringLiteral sPropOrder( u"Order" );
if ( ::comphelper::hasProperty( sPropOrder, xQuery ) )
{
OUString sOrder;
@@ -179,7 +179,7 @@ namespace dbtools
// the filter
bool bApplyFilter = true;
- const OUString sPropApply( "ApplyFilter" );
+ static const OUStringLiteral sPropApply( u"ApplyFilter" );
if ( ::comphelper::hasProperty( sPropApply, xQuery ) )
{
OSL_VERIFY( xQuery->getPropertyValue( sPropApply ) >>= bApplyFilter );
diff --git a/connectivity/source/drivers/evoab2/NDatabaseMetaData.cxx b/connectivity/source/drivers/evoab2/NDatabaseMetaData.cxx
index 631e9b254bc8..d677c4fe9ae7 100644
--- a/connectivity/source/drivers/evoab2/NDatabaseMetaData.cxx
+++ b/connectivity/source/drivers/evoab2/NDatabaseMetaData.cxx
@@ -1081,7 +1081,7 @@ Reference< XResultSet > SAL_CALL OEvoabDatabaseMetaData::getTables(
// check if any type is given
// when no types are given then we have to return all tables e.g. TABLE
- const OUString aTable("TABLE");
+ static const OUStringLiteral aTable(u"TABLE");
bool bTableFound = true;
sal_Int32 nLength = types.getLength();
diff --git a/connectivity/source/drivers/hsqldb/HDriver.cxx b/connectivity/source/drivers/hsqldb/HDriver.cxx
index b34256d2d34b..8ac7db04a367 100644
--- a/connectivity/source/drivers/hsqldb/HDriver.cxx
+++ b/connectivity/source/drivers/hsqldb/HDriver.cxx
@@ -242,7 +242,7 @@ namespace connectivity
OUString sMessage;
try
{
- const OUString sProperties( "properties" );
+ static const OUStringLiteral sProperties( u"properties" );
if ( !bIsNewDatabase && xStorage->isStreamElement(sProperties) )
{
Reference<XStream > xStream = xStorage->openStreamElement(sProperties,ElementModes::READ);
diff --git a/cpputools/source/unoexe/unoexe.cxx b/cpputools/source/unoexe/unoexe.cxx
index b5be9ff175ff..add2d0e4a192 100644
--- a/cpputools/source/unoexe/unoexe.cxx
+++ b/cpputools/source/unoexe/unoexe.cxx
@@ -91,7 +91,7 @@ const char arUsingText[] =
static bool readOption( OUString * pValue, const char * pOpt,
sal_uInt32 * pnIndex, const OUString & aArg)
{
- const OUString dash("-");
+ static const OUStringLiteral dash(u"-");
if(!aArg.startsWith(dash))
return false;
diff --git a/cui/source/dialogs/hlmarkwn.cxx b/cui/source/dialogs/hlmarkwn.cxx
index cdc1039cab18..1f6a85494e82 100644
--- a/cui/source/dialogs/hlmarkwn.cxx
+++ b/cui/source/dialogs/hlmarkwn.cxx
@@ -291,9 +291,9 @@ int SvxHlinkDlgMarkWnd::FillTree( const uno::Reference< container::XNameAccess >
const sal_Int32 nLinks = aNames.getLength();
const OUString* pNames = aNames.getConstArray();
- const OUString aProp_LinkDisplayName( "LinkDisplayName" );
- const OUString aProp_LinkTarget( "com.sun.star.document.LinkTarget" );
- const OUString aProp_LinkDisplayBitmap( "LinkDisplayBitmap" );
+ static const OUStringLiteral aProp_LinkDisplayName( u"LinkDisplayName" );
+ static const OUStringLiteral aProp_LinkTarget( u"com.sun.star.document.LinkTarget" );
+ static const OUStringLiteral aProp_LinkDisplayBitmap( u"LinkDisplayBitmap" );
for( sal_Int32 i = 0; i < nLinks; i++ )
{
uno::Any aAny;
diff --git a/cui/source/tabpages/chardlg.cxx b/cui/source/tabpages/chardlg.cxx
index 836739d44f86..8c9c9825373d 100644
--- a/cui/source/tabpages/chardlg.cxx
+++ b/cui/source/tabpages/chardlg.cxx
@@ -2993,7 +2993,7 @@ bool SvxCharPositionPage::FillItemSet( SfxItemSet* rSet )
void SvxCharPositionPage::FillUserData()
{
- const OUString cTok( ";" );
+ static const OUStringLiteral cTok( u";" );
OUString sUser = OUString::number( m_nSuperEsc ) + cTok +
OUString::number( m_nSubEsc ) + cTok +
diff --git a/dbaccess/qa/extras/dialog-save.cxx b/dbaccess/qa/extras/dialog-save.cxx
index fc34768bd10f..1eb4720cbcd1 100644
--- a/dbaccess/qa/extras/dialog-save.cxx
+++ b/dbaccess/qa/extras/dialog-save.cxx
@@ -66,7 +66,7 @@ void DialogSaveTest::test()
uno::Reference< script::XStorageBasedLibraryContainer > xStorDlgLib(xDocScr->getDialogLibraries());
CPPUNIT_ASSERT(xStorDlgLib.is());
uno::Reference< script::XLibraryContainer > xDlgLib(xStorDlgLib, UNO_QUERY_THROW);
- const OUString sStandard("Standard");
+ static const OUStringLiteral sStandard(u"Standard");
xBasLib->loadLibrary(sStandard);
CPPUNIT_ASSERT(xBasLib->isLibraryLoaded(sStandard));
// the whole point of this test is to test the "save" operation
diff --git a/dbaccess/qa/extras/empty-stdlib-save.cxx b/dbaccess/qa/extras/empty-stdlib-save.cxx
index 978045a2e2e1..9339d3c4307e 100644
--- a/dbaccess/qa/extras/empty-stdlib-save.cxx
+++ b/dbaccess/qa/extras/empty-stdlib-save.cxx
@@ -64,7 +64,7 @@ void DialogSaveTest::test()
uno::Reference< script::XStorageBasedLibraryContainer > xStorDlgLib(xDocScr->getDialogLibraries());
CPPUNIT_ASSERT(xStorDlgLib.is());
uno::Reference< script::XLibraryContainer > xDlgLib(xStorDlgLib, UNO_QUERY_THROW);
- const OUString sStandard("Standard");
+ static const OUStringLiteral sStandard(u"Standard");
xBasLib->loadLibrary(sStandard);
xDlgLib->loadLibrary(sStandard);
CPPUNIT_ASSERT(xBasLib->isLibraryLoaded(sStandard));
diff --git a/dbaccess/qa/extras/nolib-save.cxx b/dbaccess/qa/extras/nolib-save.cxx
index 4443bfd4e2b7..f441b608b31e 100644
--- a/dbaccess/qa/extras/nolib-save.cxx
+++ b/dbaccess/qa/extras/nolib-save.cxx
@@ -64,7 +64,7 @@ void DialogSaveTest::test()
uno::Reference< script::XStorageBasedLibraryContainer > xStorDlgLib(xDocScr->getDialogLibraries());
CPPUNIT_ASSERT(xStorDlgLib.is());
uno::Reference< script::XLibraryContainer > xDlgLib(xStorDlgLib, UNO_QUERY_THROW);
- const OUString sStandard("Standard");
+ static const OUStringLiteral sStandard(u"Standard");
xBasLib->loadLibrary(sStandard);
xDlgLib->loadLibrary(sStandard);
CPPUNIT_ASSERT(xBasLib->isLibraryLoaded(sStandard));
diff --git a/dbaccess/source/core/api/FilteredContainer.cxx b/dbaccess/source/core/api/FilteredContainer.cxx
index 1b08eb8fa7ca..3c923a706b8b 100644
--- a/dbaccess/source/core/api/FilteredContainer.cxx
+++ b/dbaccess/source/core/api/FilteredContainer.cxx
@@ -432,9 +432,9 @@ static sal_Int32 createWildCardVector(Sequence< OUString >& _rTableFilter, std::
OSL_VERIFY( aFilterModeSetting >>= nFilterMode );
}
- const OUString sAll( "%" );
- const OUString sView( "VIEW" );
- const OUString sTable( "TABLE" );
+ static const OUStringLiteral sAll( u"%" );
+ static const OUStringLiteral sView( u"VIEW" );
+ static const OUStringLiteral sTable( u"TABLE" );
switch ( nFilterMode )
{
diff --git a/dbaccess/source/core/recovery/subcomponentrecovery.cxx b/dbaccess/source/core/recovery/subcomponentrecovery.cxx
index e47ef6a0e6ce..e7ffffd61452 100644
--- a/dbaccess/source/core/recovery/subcomponentrecovery.cxx
+++ b/dbaccess/source/core/recovery/subcomponentrecovery.cxx
@@ -480,7 +480,7 @@ namespace dbaccess
StorageXMLOutputStream aDesignOutput( m_rContext, i_rObjectStorage, sSettingsStreamName );
SettingsExportContext aSettingsExportContext( m_rContext, aDesignOutput );
- const OUString sWhitespace( " " );
+ static const OUStringLiteral sWhitespace( u" " );
aDesignOutput.startElement( "office:settings" );
aDesignOutput.ignorableWhitespace( sWhitespace );
diff --git a/dbaccess/source/filter/xml/xmlExport.cxx b/dbaccess/source/filter/xml/xmlExport.cxx
index 9668dcbd4e38..58aa2b4decf7 100644
--- a/dbaccess/source/filter/xml/xmlExport.cxx
+++ b/dbaccess/source/filter/xml/xmlExport.cxx
@@ -560,7 +560,7 @@ void ODBExport::exportConnectionData()
Reference< XPropertySetInfo > xSettingsInfo( xDataSourceSettings->getPropertySetInfo(), UNO_SET_THROW );
- const OUString sPropertyName = "LocalSocket";
+ static const OUStringLiteral sPropertyName = u"LocalSocket";
if ( xSettingsInfo->hasPropertyByName( sPropertyName ) )
{
OUString sPropertyValue;
diff --git a/dbaccess/source/ui/dlg/DbAdminImpl.cxx b/dbaccess/source/ui/dlg/DbAdminImpl.cxx
index fe25fa3f6f2c..215a8c8f53c4 100644
--- a/dbaccess/source/ui/dlg/DbAdminImpl.cxx
+++ b/dbaccess/source/ui/dlg/DbAdminImpl.cxx
@@ -632,7 +632,7 @@ void ODbDataSourceAdministrationHelper::translateProperties(const SfxItemSet& _r
try { xInfo = _rxDest->getPropertySetInfo(); }
catch(Exception&) { }
- const OUString sUrlProp("URL");
+ static const OUStringLiteral sUrlProp(u"URL");
// transfer the direct properties
for (auto const& elem : m_aDirectPropTranslator)
{
diff --git a/dbaccess/source/ui/dlg/queryorder.cxx b/dbaccess/source/ui/dlg/queryorder.cxx
index f06935f5e72b..40b25cdd3d54 100644
--- a/dbaccess/source/ui/dlg/queryorder.cxx
+++ b/dbaccess/source/ui/dlg/queryorder.cxx
@@ -126,8 +126,8 @@ void DlgOrderCrit::impl_initializeOrderList_nothrow()
{
try
{
- const OUString sNameProperty = "Name";
- const OUString sAscendingProperty = "IsAscending";
+ static const OUStringLiteral sNameProperty = u"Name";
+ static const OUStringLiteral sAscendingProperty = u"IsAscending";
Reference< XIndexAccess > xOrderColumns( m_xQueryComposer->getOrderColumns(), UNO_SET_THROW );
sal_Int32 nColumns = xOrderColumns->getCount();
diff --git a/desktop/source/app/crashreport.cxx b/desktop/source/app/crashreport.cxx
index 82300fa19ddc..ff9c80c51996 100644
--- a/desktop/source/app/crashreport.cxx
+++ b/desktop/source/app/crashreport.cxx
@@ -127,8 +127,8 @@ void CrashReporter::writeCommonInfo()
ucbhelper::InternetProxyDecider proxy_decider(::comphelper::getProcessComponentContext());
- const OUString protocol = "https";
- const OUString url = "crashreport.libreoffice.org";
+ static const OUStringLiteral protocol = u"https";
+ static const OUStringLiteral url = u"crashreport.libreoffice.org";
const sal_Int32 port = 443;
const ucbhelper::InternetProxyServer proxy_server = proxy_decider.getProxy(protocol, url, port);
diff --git a/desktop/source/deployment/registry/help/dp_help.cxx b/desktop/source/deployment/registry/help/dp_help.cxx
index 1f1eb5f2fe90..b1367a335fa2 100644
--- a/desktop/source/deployment/registry/help/dp_help.cxx
+++ b/desktop/source/deployment/registry/help/dp_help.cxx
@@ -420,7 +420,7 @@ void BackendImpl::implProcessHelp(
&langFolderContent,
langFolderDest, xCmdEnv);
- const OUString aHelpStr("help");
+ static const OUStringLiteral aHelpStr(u"help");
OUString aJarFile(
makeURL(sHelpFolder, langFolderURLSegment + "/" + aHelpStr + ".jar"));
diff --git a/desktop/source/deployment/registry/package/dp_package.cxx b/desktop/source/deployment/registry/package/dp_package.cxx
index 20571efa8947..3cdf121438e9 100644
--- a/desktop/source/deployment/registry/package/dp_package.cxx
+++ b/desktop/source/deployment/registry/package/dp_package.cxx
@@ -1059,9 +1059,9 @@ void BackendImpl::PackageImpl::exportTo(
manifest.reserve( bundle.getLength() );
sal_Int32 baseURLlen = m_url_expanded.getLength();
Reference<deployment::XPackage> const *pbundle = bundle.getConstArray();
- const OUString strMediaType( "MediaType" );
- const OUString strFullPath( "FullPath" );
- const OUString strIsFolder( "IsFolder" );
+ static const OUStringLiteral strMediaType( u"MediaType" );
+ static const OUStringLiteral strFullPath( u"FullPath" );
+ static const OUStringLiteral strIsFolder( u"IsFolder" );
for ( sal_Int32 pos = bundle.getLength(); pos--; )
{
Reference<deployment::XPackage> const & xPackage = pbundle[ pos ];
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 12eff83a4bc3..031bd2625b22 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -4744,7 +4744,7 @@ static char* getStyles(LibreOfficeKitDocument* pThis, const char* pCommand)
{
boost::property_tree::ptree aChild;
boost::property_tree::ptree aChildren;
- const OUString sPageStyles("PageStyles");
+ static const OUStringLiteral sPageStyles(u"PageStyles");
uno::Reference<beans::XPropertySet> xProperty;
uno::Reference<container::XNameContainer> xContainer;
diff --git a/desktop/source/migration/migration.cxx b/desktop/source/migration/migration.cxx
index ef4b6688d4c2..92b07f754e17 100644
--- a/desktop/source/migration/migration.cxx
+++ b/desktop/source/migration/migration.cxx
@@ -189,8 +189,8 @@ bool MigrationImpl::doMigration()
copyFiles();
- const OUString sMenubarResourceURL("private:resource/menubar/menubar");
- const OUString sToolbarResourcePre("private:resource/toolbar/");
+ static const OUStringLiteral sMenubarResourceURL(u"private:resource/menubar/menubar");
+ static const OUStringLiteral sToolbarResourcePre(u"private:resource/toolbar/");
for (MigrationModuleInfo & i : vModulesInfo) {
OUString sModuleIdentifier = mapModuleShortNameToIdentifier(i.sModuleShortName);
if (sModuleIdentifier.isEmpty())
@@ -306,8 +306,8 @@ void MigrationImpl::readAvailableMigrations(migrations_available& rAvailableMigr
uno::Reference< XNameAccess > aMigrationAccess(getConfigAccess("org.openoffice.Setup/Migration/SupportedVersions"), uno::UNO_SET_THROW);
const uno::Sequence< OUString > seqSupportedVersions = aMigrationAccess->getElementNames();
- const OUString aVersionIdentifiers( "VersionIdentifiers" );
- const OUString aPriorityIdentifier( "Priority" );
+ static const OUStringLiteral aVersionIdentifiers( u"VersionIdentifiers" );
+ static const OUStringLiteral aPriorityIdentifier( u"Priority" );
for (OUString const & supportedVersion :seqSupportedVersions) {
sal_Int32 nPriority( 0 );
@@ -803,8 +803,8 @@ void MigrationImpl::runServices()
std::vector< MigrationModuleInfo > MigrationImpl::detectUIChangesForAllModules() const
{
std::vector< MigrationModuleInfo > vModulesInfo;
- const OUString MENUBAR("menubar");
- const OUString TOOLBAR("toolbar");
+ static const OUStringLiteral MENUBAR(u"menubar");
+ static const OUStringLiteral TOOLBAR(u"toolbar");
uno::Sequence< uno::Any > lArgs {uno::makeAny(m_aInfo.userdata + "/user/config/soffice.cfg/modules"),
uno::makeAny(embed::ElementModes::READ)};
@@ -864,7 +864,7 @@ void MigrationImpl::compareOldAndNewConfig(const OUString& sParent,
const uno::Reference< container::XIndexContainer >& xIndexNew,
const OUString& sResourceURL)
{
- const OUString MENU_SEPARATOR(" | ");
+ static const OUStringLiteral MENU_SEPARATOR(u" | ");
std::vector< MigrationItem > vOldItems;
std::vector< MigrationItem > vNewItems;
@@ -1072,8 +1072,8 @@ void NewVersionUIInfo::init(const std::vector< MigrationModuleInfo >& vModulesIn
m_lNewVersionMenubarSettingsSeq.realloc(vModulesInfo.size());
m_lNewVersionToolbarSettingsSeq.realloc(vModulesInfo.size());
- const OUString sMenubarResourceURL("private:resource/menubar/menubar");
- const OUString sToolbarResourcePre("private:resource/toolbar/");
+ static const OUStringLiteral sMenubarResourceURL(u"private:resource/menubar/menubar");
+ static const OUStringLiteral sToolbarResourcePre(u"private:resource/toolbar/");
uno::Reference< ui::XModuleUIConfigurationManagerSupplier > xModuleCfgSupplier = ui::theModuleUIConfigurationManagerSupplier::get( ::comphelper::getProcessComponentContext() );
diff --git a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
index 7cf4fc4b2cd2..6f690ca55f46 100644
--- a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
+++ b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
@@ -1088,7 +1088,7 @@ void VclMetafileProcessor2D::processControlPrimitive2D(
uno::Reference<beans::XPropertySetInfo> xPropertyInfo(
xModelProperties.is() ? xModelProperties->getPropertySetInfo()
: uno::Reference<beans::XPropertySetInfo>());
- const OUString sPrintablePropertyName("Printable");
+ static const OUStringLiteral sPrintablePropertyName(u"Printable");
if (xPropertyInfo.is() && xPropertyInfo->hasPropertyByName(sPrintablePropertyName))
{
diff --git a/editeng/source/misc/unolingu.cxx b/editeng/source/misc/unolingu.cxx
index a65af50b37e1..b72fae9ebb67 100644
--- a/editeng/source/misc/unolingu.cxx
+++ b/editeng/source/misc/unolingu.cxx
@@ -632,7 +632,7 @@ uno::Reference< XDictionary > LinguMgr::GetStandard()
if (!xTmpDicList.is())
return nullptr;
- const OUString aDicName( "standard.dic" );
+ static const OUStringLiteral aDicName( u"standard.dic" );
uno::Reference< XDictionary > xDic = xTmpDicList->getDictionaryByName( aDicName );
if (!xDic.is())
{
diff --git a/editeng/source/xml/xmltxtexp.cxx b/editeng/source/xml/xmltxtexp.cxx
index 4ad23b10abae..b6f3f5cf14b0 100644
--- a/editeng/source/xml/xmltxtexp.cxx
+++ b/editeng/source/xml/xmltxtexp.cxx
@@ -305,7 +305,7 @@ void SvxWriteXML( EditEngine& rEditEngine, SvStream& rStream, const ESelection&
uno::Reference<io::XOutputStream> xOut( new utl::OOutputStreamWrapper( rStream ) );
/* testcode
- const OUString aURL( "file:///e:/test.xml" );
+ static const OUStringLiteral aURL( u"file:///e:/test.xml" );
SvFileStream aStream(aURL, StreamMode::WRITE | StreamMode::TRUNC);
xOut = new utl::OOutputStreamWrapper(aStream);
*/
diff --git a/editeng/source/xml/xmltxtimp.cxx b/editeng/source/xml/xmltxtimp.cxx
index f5532f009196..e45c505e1675 100644
--- a/editeng/source/xml/xmltxtimp.cxx
+++ b/editeng/source/xml/xmltxtimp.cxx
@@ -169,7 +169,7 @@ EditPaM SvxReadXML( EditEngine& rEditEngine, SvStream& rStream, const ESelection
uno::Reference<io::XInputStream> xInputStream = new utl::OInputStreamWrapper( rStream );
/* testcode
- const OUString aURL( "file:///e:/test.xml" );
+ static const OUStringLiteral aURL( u"file:///e:/test.xml" );
SfxMedium aMedium( aURL, StreamMode::READ | STREAM_NOCREATE, sal_True );
uno::Reference<io::XOutputStream> xOut( new utl::OOutputStreamWrapper( *aMedium.GetOutStream() ) );
diff --git a/embeddedobj/source/commonembedding/persistence.cxx b/embeddedobj/source/commonembedding/persistence.cxx
index 6dda3c67830b..dd7099c01a77 100644
--- a/embeddedobj/source/commonembedding/persistence.cxx
+++ b/embeddedobj/source/commonembedding/persistence.cxx
@@ -176,7 +176,7 @@ static void TransferMediaType( const uno::Reference< embed::XStorage >& i_rSourc
{
const uno::Reference< beans::XPropertySet > xSourceProps( i_rSource, uno::UNO_QUERY_THROW );
const uno::Reference< beans::XPropertySet > xTargetProps( i_rTarget, uno::UNO_QUERY_THROW );
- const OUString sMediaTypePropName( "MediaType" );
+ static const OUStringLiteral sMediaTypePropName( u"MediaType" );
xTargetProps->setPropertyValue( sMediaTypePropName, xSourceProps->getPropertyValue( sMediaTypePropName ) );
}
catch( const uno::Exception& )
diff --git a/extensions/source/abpilot/fieldmappingimpl.cxx b/extensions/source/abpilot/fieldmappingimpl.cxx
index 8047053dc51d..04fa95028b18 100644
--- a/extensions/source/abpilot/fieldmappingimpl.cxx
+++ b/extensions/source/abpilot/fieldmappingimpl.cxx
@@ -222,8 +222,8 @@ namespace abp
const OUString* pExistentFields = aExistentFields.getConstArray();
const OUString* pExistentFieldsEnd = pExistentFields + aExistentFields.getLength();
- const OUString sProgrammaticNodeName( "ProgrammaticFieldName" );
- const OUString sAssignedNodeName( "AssignedFieldName" );
+ static const OUStringLiteral sProgrammaticNodeName( u"ProgrammaticFieldName" );
+ static const OUStringLiteral sAssignedNodeName( u"AssignedFieldName" );
for ( ; pExistentFields != pExistentFieldsEnd; ++pExistentFields )
{
diff --git a/filter/source/msfilter/escherex.cxx b/filter/source/msfilter/escherex.cxx
index 536b94ce8cf6..64bfe3e0d9de 100644
--- a/filter/source/msfilter/escherex.cxx
+++ b/filter/source/msfilter/escherex.cxx
@@ -600,7 +600,7 @@ void EscherPropertyContainer::CreateFillProperties(
uno::Any aAny;
AddOpt( ESCHER_Prop_WrapText, ESCHER_WrapNone );
AddOpt( ESCHER_Prop_AnchorText, ESCHER_AnchorMiddle );
- const OUString aPropName( "FillStyle" );
+ static const OUStringLiteral aPropName( u"FillStyle" );
if ( EscherPropertyValueHelper::GetPropertyValue(
aAny, rXPropSet, aPropName ) )
@@ -2592,14 +2592,14 @@ void EscherPropertyContainer::CreateCustomShapeProperties( const MSO_SPT eShapeT
if ( !(aGeoPropSet >>= aGeoPropSeq) )
return;
- const OUString sViewBox ( "ViewBox" );
- const OUString sTextRotateAngle ( "TextRotateAngle" );
- const OUString sExtrusion ( "Extrusion" );
- const OUString sEquations ( "Equations" );
- const OUString sPath ( "Path" );
- const OUString sTextPath ( "TextPath" );
- const OUString sHandles ( "Handles" );
- const OUString sAdjustmentValues ( "AdjustmentValues" );
+ static const OUStringLiteral sViewBox ( u"ViewBox" );
+ static const OUStringLiteral sTextRotateAngle ( u"TextRotateAngle" );
+ static const OUStringLiteral sExtrusion ( u"Extrusion" );
+ static const OUStringLiteral sEquations ( u"Equations" );
+ static const OUStringLiteral sPath ( u"Path" );
+ static const OUStringLiteral sTextPath ( u"TextPath" );
+ static const OUStringLiteral sHandles ( u"Handles" );
+ static const OUStringLiteral sAdjustmentValues ( u"AdjustmentValues" );
bool bAdjustmentValuesProp = false;
uno::Any aAdjustmentValuesProp;
diff --git a/filter/source/msfilter/msdffimp.cxx b/filter/source/msfilter/msdffimp.cxx
index 91b36b230129..5ed426de2ab6 100644
--- a/filter/source/msfilter/msdffimp.cxx
+++ b/filter/source/msfilter/msdffimp.cxx
@@ -601,7 +601,7 @@ void SvxMSDffManager::SolveSolver( const SvxMSDffSolverContainer& rSolver )
{
const SfxPoolItem& aCustomShape = static_cast<SdrObjCustomShape*>(pO)->GetMergedItem( SDRATTR_CUSTOMSHAPE_GEOMETRY );
SdrCustomShapeGeometryItem aGeometryItem( static_cast<const SdrCustomShapeGeometryItem&>(aCustomShape) );
- const OUString sPath( "Path" );
+ static const OUStringLiteral sPath( u"Path" );
sal_Int16 nGluePointType = EnhancedCustomShapeGluePointType::SEGMENTS;
css::uno::Any* pAny = aGeometryItem.GetPropertyValueByName( sPath, "GluePointType" );
if ( pAny )
@@ -723,7 +723,7 @@ void SvxMSDffManager::SolveSolver( const SvxMSDffSolverContainer& rSolver )
sal_Int32 nX = 0, nY = 0;
if ( ( rPara.First.Value >>= nX ) && ( rPara.Second.Value >>= nY ) )
{
- const OUString sGluePoints( "GluePoints" );
+ static const OUStringLiteral sGluePoints( u"GluePoints" );
css::uno::Sequence< css::drawing::EnhancedCustomShapeParameterPair > aGluePoints;
pAny = aGeometryItem.GetPropertyValueByName( sPath, sGluePoints );
if ( pAny )
@@ -2762,7 +2762,7 @@ void DffPropertyReader::CheckAndCorrectExcelTextRotation( SvStream& rIn, SfxItem
const css::uno::Any* pAny;
SdrCustomShapeGeometryItem aGeometryItem(rSet.Get( SDRATTR_CUSTOMSHAPE_GEOMETRY ));
- const OUString sTextRotateAngle( "TextRotateAngle" );
+ static const OUStringLiteral sTextRotateAngle( u"TextRotateAngle" );
pAny = aGeometryItem.GetPropertyValueByName( sTextRotateAngle );
double fExtraTextRotateAngle = 0.0;
if ( pAny )
@@ -4506,9 +4506,9 @@ SdrObject* SvxMSDffManager::ImportShape( const DffRecordHeader& rHd, SvStream& r
// applies only if importing arcs from MS Office.
if ( aObjData.eShapeType == mso_sptArc )
{
- const OUString sAdjustmentValues( "AdjustmentValues" );
- const OUString sViewBox( "ViewBox" );
- const OUString sPath( "Path" );
+ static const OUStringLiteral sAdjustmentValues( u"AdjustmentValues" );
+ static const OUStringLiteral sViewBox( u"ViewBox" );
+ static const OUStringLiteral sPath( u"Path" );
SdrCustomShapeGeometryItem aGeometryItem( static_cast<SdrObjCustomShape*>(pRet)->GetMergedItem( SDRATTR_CUSTOMSHAPE_GEOMETRY ) );
PropertyValue aPropVal;
diff --git a/filter/source/pdf/pdfexport.cxx b/filter/source/pdf/pdfexport.cxx
index 5af0c03775c8..d3452998c7bd 100644
--- a/filter/source/pdf/pdfexport.cxx
+++ b/filter/source/pdf/pdfexport.cxx
@@ -893,9 +893,9 @@ bool PDFExport::Export( const OUString& rFile, const Sequence< PropertyValue >&
}
bool bExportNotesPages = false;
bool bReChangeToNormalView = false;
- const OUString sShowOnlineLayout( "ShowOnlineLayout" );
+ static const OUStringLiteral sShowOnlineLayout( u"ShowOnlineLayout" );
bool bReHideWhitespace = false;
- const OUString sHideWhitespace("HideWhitespace");
+ static const OUStringLiteral sHideWhitespace(u"HideWhitespace");
uno::Reference< beans::XPropertySet > xViewProperties;
if ( aCreator == "Writer" )
diff --git a/filter/source/svg/svgwriter.cxx b/filter/source/svg/svgwriter.cxx
index 47dbce93bbd5..c3ec4a8971d4 100644
--- a/filter/source/svg/svgwriter.cxx
+++ b/filter/source/svg/svgwriter.cxx
@@ -1152,8 +1152,8 @@ bool SVGTextWriter::nextTextPortion()
Reference < XTextField > xTextField( xRangePropSet->getPropertyValue( "TextField" ), UNO_QUERY );
if( xTextField.is() )
{
- const OUString sServicePrefix("com.sun.star.text.textfield.");
- const OUString sPresentationServicePrefix("com.sun.star.presentation.TextField.");
+ static const OUStringLiteral sServicePrefix(u"com.sun.star.text.textfield.");
+ static const OUStringLiteral sPresentationServicePrefix(u"com.sun.star.presentation.TextField.");
Reference< XServiceInfo > xService( xTextField, UNO_QUERY );
const Sequence< OUString > aServices = xService->getSupportedServiceNames();
@@ -1870,8 +1870,8 @@ tools::PolyPolygon& SVGActionWriter::ImplMap( const tools::PolyPolygon& rPolyPol
OUString SVGActionWriter::GetPathString( const tools::PolyPolygon& rPolyPoly, bool bLine )
{
OUStringBuffer aPathData;
- const OUString aBlank( " " );
- const OUString aComma( "," );
+ static const OUStringLiteral aBlank( u" " );
+ static const OUStringLiteral aComma( u"," );
Point aPolyPoint;
for( tools::Long i = 0, nCount = rPolyPoly.Count(); i < nCount; i++ )
diff --git a/filter/source/xsltdialog/typedetectionexport.cxx b/filter/source/xsltdialog/typedetectionexport.cxx
index 51be4018fef7..300d4a0fb6d8 100644
--- a/filter/source/xsltdialog/typedetectionexport.cxx
+++ b/filter/source/xsltdialog/typedetectionexport.cxx
@@ -79,18 +79,18 @@ void TypeDetectionExporter::doExport( const Reference< XOutputStream >& xOS, co
{
try
{
- const OUString sComponentData ( "oor:component-data" );
- const OUString sNode ( "node" );
- const OUString sName ( "oor:name" );
- const OUString sWhiteSpace ( " " );
- const OUString sUIName ( "UIName" );
- const OUString sComma ( "," );
- const OUString sDelim ( ";" );
- const OUString sData ( "Data" );
- const OUString sDocTypePrefix ( "doctype:" );
- const OUString sFilterAdaptorService( "com.sun.star.comp.Writer.XmlFilterAdaptor" );
- const OUString sXSLTFilterService ( "com.sun.star.documentconversion.XSLTFilter" );
- const OUString sCdataAttribute ( "CDATA" );
+ static const OUStringLiteral sComponentData ( u"oor:component-data" );
+ static const OUStringLiteral sNode ( u"node" );
+ static const OUStringLiteral sName ( u"oor:name" );
+ static const OUStringLiteral sWhiteSpace ( u" " );
+ static const OUStringLiteral sUIName ( u"UIName" );
+ static const OUStringLiteral sComma ( u"," );
+ static const OUStringLiteral sDelim ( u";" );
+ static const OUStringLiteral sData ( u"Data" );
+ static const OUStringLiteral sDocTypePrefix ( u"doctype:" );
+ static const OUStringLiteral sFilterAdaptorService( u"com.sun.star.comp.Writer.XmlFilterAdaptor" );
+ static const OUStringLiteral sXSLTFilterService ( u"com.sun.star.documentconversion.XSLTFilter" );
+ static const OUStringLiteral sCdataAttribute ( u"CDATA" );
// set up sax writer and connect to given output stream
@@ -208,10 +208,10 @@ void TypeDetectionExporter::addProperty( const Reference< XWriter >& xHandler, c
{
try
{
- const OUString sCdataAttribute( "CDATA" );
- const OUString sProp( "prop" );
- const OUString sValue( "value" );
- const OUString sWhiteSpace ( " " );
+ static const OUStringLiteral sCdataAttribute( u"CDATA" );
+ static const OUStringLiteral sProp( u"prop" );
+ static const OUStringLiteral sValue( u"value" );
+ static const OUStringLiteral sWhiteSpace ( u" " );
rtl::Reference<::comphelper::AttributeList>pAttrList = new ::comphelper::AttributeList;
pAttrList->AddAttribute ( "oor:name", sCdataAttribute, rName );
@@ -236,10 +236,10 @@ void TypeDetectionExporter::addLocaleProperty( const Reference< XWriter >& xHand
{
try
{
- const OUString sCdataAttribute( "CDATA" );
- const OUString sProp( "prop" );
- const OUString sValue( "value" );
- const OUString sWhiteSpace ( " " );
+ static const OUStringLiteral sCdataAttribute( u"CDATA" );
+ static const OUStringLiteral sProp( u"prop" );
+ static const OUStringLiteral sValue( u"value" );
+ static const OUStringLiteral sWhiteSpace ( u" " );
rtl::Reference<::comphelper::AttributeList> pAttrList = new ::comphelper::AttributeList;
pAttrList->AddAttribute ( "oor:name", sCdataAttribute, rName );
diff --git a/forms/source/component/Columns.cxx b/forms/source/component/Columns.cxx
index 50a9e05875d6..3195fde4d44e 100644
--- a/forms/source/component/Columns.cxx
+++ b/forms/source/component/Columns.cxx
@@ -81,8 +81,8 @@ const css::uno::Sequence<OUString>& getColumnTypes()
sal_Int32 getColumnTypeByModelName(const OUString& aModelName)
{
- const OUString aModelPrefix ("com.sun.star.form.component.");
- const OUString aCompatibleModelPrefix ("stardiv.one.form.component.");
+ static const OUStringLiteral aModelPrefix (u"com.sun.star.form.component.");
+ static const OUStringLiteral aCompatibleModelPrefix (u"stardiv.one.form.component.");
sal_Int32 nTypeId = -1;
if (aModelName == FRM_COMPONENT_EDIT)
diff --git a/fpicker/source/office/iodlg.cxx b/fpicker/source/office/iodlg.cxx
index fe199ae5a530..98c89e2b2e5e 100644
--- a/fpicker/source/office/iodlg.cxx
+++ b/fpicker/source/office/iodlg.cxx
@@ -235,7 +235,7 @@ namespace
if ( xProviderProps.is() )
{
Reference< XPropertySetInfo > xPropInfo = xProviderProps->getPropertySetInfo();
- const OUString sHomeDirPropertyName( "HomeDirectory" );
+ static const OUStringLiteral sHomeDirPropertyName( u"HomeDirectory" );
if ( !xPropInfo.is() || xPropInfo->hasPropertyByName( sHomeDirPropertyName ) )
{
OUString sHomeDirectory;
diff --git a/fpicker/source/win32/shared.hxx b/fpicker/source/win32/shared.hxx
index 4f822b742149..aa211a6057c1 100644
--- a/fpicker/source/win32/shared.hxx
+++ b/fpicker/source/win32/shared.hxx
@@ -21,9 +21,9 @@
#include <rtl/ustring.hxx>
-const OUString BACKSLASH("\\");
-const OUString FILTER_SEPARATOR("------------------------------------------");
-const OUString ALL_FILES_WILDCARD("*.*");
+static const OUStringLiteral BACKSLASH(u"\\");
+static const OUStringLiteral FILTER_SEPARATOR(u"------------------------------------------");
+static const OUStringLiteral ALL_FILES_WILDCARD(u"*.*");
const bool ALLOW_DUPLICATES = true;
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/fpicker/source/win32/workbench/Test_fps.cxx b/fpicker/source/win32/workbench/Test_fps.cxx
index 62bc00550cca..899f208f1f61 100644
--- a/fpicker/source/win32/workbench/Test_fps.cxx
+++ b/fpicker/source/win32/workbench/Test_fps.cxx
@@ -78,7 +78,7 @@ void TestFilterManager( Reference< XFilePicker > xFilePicker );
Reference< XMultiServiceFactory > g_xFactory;
-const OUString BMP_EXTENSION( "bmp" );
+static const OUStringLiteral BMP_EXTENSION( u"bmp" );
// a test client
diff --git a/framework/source/accelerators/acceleratorconfiguration.cxx b/framework/source/accelerators/acceleratorconfiguration.cxx
index 821b1137259c..35047ef8d3d6 100644
--- a/framework/source/accelerators/acceleratorconfiguration.cxx
+++ b/framework/source/accelerators/acceleratorconfiguration.cxx
@@ -957,7 +957,7 @@ void XCUBasedAcceleratorConfiguration::impl_ts_load( bool bPreferred, const css:
}
const OUString sIsoLang = impl_ts_getLocale();
- const OUString sDefaultLocale("en-US");
+ static const OUStringLiteral sDefaultLocale(u"en-US");
css::uno::Reference< css::container::XNameAccess > xKey;
css::uno::Reference< css::container::XNameAccess > xCommand;
diff --git a/framework/source/fwe/classes/addonsoptions.cxx b/framework/source/fwe/classes/addonsoptions.cxx
index a8aed7ab7e4d..49eab738c1cc 100644
--- a/framework/source/fwe/classes/addonsoptions.cxx
+++ b/framework/source/fwe/classes/addonsoptions.cxx
@@ -934,7 +934,7 @@ OUString AddonsOptions_Impl::GeneratePrefixURL()
void AddonsOptions_Impl::ReadMenuMergeInstructions( MergeMenuInstructionContainer& aContainer )
{
- const OUString aMenuMergeRootName( "AddonUI/OfficeMenuBarMerging/" );
+ static const OUStringLiteral aMenuMergeRootName( u"AddonUI/OfficeMenuBarMerging/" );
Sequence< OUString > aAddonMergeNodesSeq = GetNodeNames( aMenuMergeRootName );
@@ -1011,7 +1011,7 @@ void AddonsOptions_Impl::ReadMergeMenuData( std::u16string_view aMergeAddonInstr
void AddonsOptions_Impl::ReadToolbarMergeInstructions( ToolbarMergingInstructions& rCachedToolbarMergingInstructions )
{
- const OUString aToolbarMergeRootName( "AddonUI/OfficeToolbarMerging/" );
+ static const OUStringLiteral aToolbarMergeRootName( u"AddonUI/OfficeToolbarMerging/" );
Sequence< OUString > aAddonMergeNodesSeq = GetNodeNames( aToolbarMergeRootName );
sal_uInt32 nCount = aAddonMergeNodesSeq.getLength();
@@ -1088,7 +1088,7 @@ bool AddonsOptions_Impl::ReadMergeToolbarData( std::u16string_view aMergeAddonIn
void AddonsOptions_Impl::ReadNotebookBarMergeInstructions(
NotebookBarMergingInstructions& rCachedNotebookBarMergingInstructions)
{
- const OUString aNotebookBarMergeRootName("AddonUI/OfficeNotebookBarMerging/");
+ static const OUStringLiteral aNotebookBarMergeRootName(u"AddonUI/OfficeNotebookBarMerging/");
Sequence<OUString> aAddonMergeNodesSeq = GetNodeNames(aNotebookBarMergeRootName);
sal_uInt32 nCount = aAddonMergeNodesSeq.getLength();
@@ -1169,7 +1169,7 @@ bool AddonsOptions_Impl::ReadMergeNotebookBarData(
void AddonsOptions_Impl::ReadStatusbarMergeInstructions( MergeStatusbarInstructionContainer& aContainer )
{
- const OUString aStatusbarMergeRootName( "AddonUI/OfficeStatusbarMerging/" );
+ static const OUStringLiteral aStatusbarMergeRootName( u"AddonUI/OfficeStatusbarMerging/" );
Sequence< OUString > aAddonMergeNodesSeq = GetNodeNames( aStatusbarMergeRootName );
sal_uInt32 nCount = aAddonMergeNodesSeq.getLength();
diff --git a/framework/source/uielement/fontmenucontroller.cxx b/framework/source/uielement/fontmenucontroller.cxx
index 5b53720852a5..b0fbd9797368 100644
--- a/framework/source/uielement/fontmenucontroller.cxx
+++ b/framework/source/uielement/fontmenucontroller.cxx
@@ -105,7 +105,7 @@ void FontMenuController::fillPopupMenu( const Sequence< OUString >& rFontNameSeq
}
sort(aVector.begin(), aVector.end(), lcl_I18nCompareString );
- const OUString aFontNameCommandPrefix( ".uno:CharFontName?CharFontName.FamilyName:string=" );
+ static const OUStringLiteral aFontNameCommandPrefix( u".uno:CharFontName?CharFontName.FamilyName:string=" );
const sal_Int16 nCount = static_cast<sal_Int16>(aVector.size());
for ( sal_Int16 i = 0; i < nCount; i++ )
{
diff --git a/framework/source/uielement/fontsizemenucontroller.cxx b/framework/source/uielement/fontsizemenucontroller.cxx
index a217cc8ff9ed..edc17b084069 100644
--- a/framework/source/uielement/fontsizemenucontroller.cxx
+++ b/framework/source/uielement/fontsizemenucontroller.cxx
@@ -169,7 +169,7 @@ void FontSizeMenuController::fillPopupMenu( Reference< css::awt::XPopupMenu > co
nSizeCount++;
sal_uInt16 nPos = 0;
- const OUString aFontHeightCommand( ".uno:FontHeight?FontHeight.Height:float=" );
+ static const OUStringLiteral aFontHeightCommand( u".uno:FontHeight?FontHeight.Height:float=" );
// first insert font size names (for simplified/traditional chinese)
float fPoint;
diff --git a/framework/source/uielement/headermenucontroller.cxx b/framework/source/uielement/headermenucontroller.cxx
index 6a049994852f..213aa2a94566 100644
--- a/framework/source/uielement/headermenucontroller.cxx
+++ b/framework/source/uielement/headermenucontroller.cxx
@@ -102,8 +102,8 @@ void HeaderMenuController::fillPopupMenu( const Reference< css::frame::XModel >&
aCmd = ".uno:InsertPageFooter";
aHeaderFooterIsOnStr = "FooterIsOn";
}
- const OUString aIsPhysicalStr( "IsPhysical" );
- const OUString aDisplayNameStr( "DisplayName" );
+ static const OUStringLiteral aIsPhysicalStr( u"IsPhysical" );
+ static const OUStringLiteral aDisplayNameStr( u"DisplayName" );
try
{
diff --git a/framework/source/uielement/langselectionmenucontroller.cxx b/framework/source/uielement/langselectionmenucontroller.cxx
index d19bf519a28e..edcfbae5c6c2 100644
--- a/framework/source/uielement/langselectionmenucontroller.cxx
+++ b/framework/source/uielement/langselectionmenucontroller.cxx
@@ -199,7 +199,7 @@ void LanguageSelectionMenuController::fillPopupMenu( Reference< css::awt::XPopup
// for aCmd_Dialog and aCmd_Language
sal_Int16 nItemId = 1; // in this control the item id is not important for executing the command
- const OUString sAsterisk("*"); // multiple languages in current selection
+ static const OUStringLiteral sAsterisk(u"*"); // multiple languages in current selection
const OUString sNone( SvtLanguageTable::GetLanguageString( LANGUAGE_NONE ));
for (auto const& langItem : aLangItems)
{
diff --git a/framework/source/uielement/langselectionstatusbarcontroller.cxx b/framework/source/uielement/langselectionstatusbarcontroller.cxx
index deccb5d77bcc..807806364f34 100644
--- a/framework/source/uielement/langselectionstatusbarcontroller.cxx
+++ b/framework/source/uielement/langselectionstatusbarcontroller.cxx
@@ -133,7 +133,7 @@ void LangSelectionStatusbarController::LangMenu(
// add first few entries to main menu
sal_Int16 nItemId = static_cast< sal_Int16 >(MID_LANG_SEL_1);
- const OUString sAsterisk("*"); // multiple languages in current selection
+ static const OUStringLiteral sAsterisk(u"*"); // multiple languages in current selection
const OUString sNone( SvtLanguageTable::GetLanguageString( LANGUAGE_NONE ));
std::map< sal_Int16, OUString > aLangMap;
for (auto const& langItem : aLangItems)
diff --git a/framework/source/uielement/macrosmenucontroller.cxx b/framework/source/uielement/macrosmenucontroller.cxx
index 0549ff3a0299..856e3985b1cb 100644
--- a/framework/source/uielement/macrosmenucontroller.cxx
+++ b/framework/source/uielement/macrosmenucontroller.cxx
@@ -126,9 +126,9 @@ void SAL_CALL MacrosMenuController::statusChanged( const FeatureStateEvent& )
void MacrosMenuController::addScriptItems( PopupMenu* pPopupMenu, sal_uInt16 startItemId )
{
- const OUString aCmdBase(".uno:ScriptOrganizer?ScriptOrganizer.Language:string=");
- const OUString ellipsis( "..." );
- const OUString providerKey("com.sun.star.script.provider.ScriptProviderFor");
+ static const OUStringLiteral aCmdBase(u".uno:ScriptOrganizer?ScriptOrganizer.Language:string=");
+ static const OUStringLiteral ellipsis( u"..." );
+ static const OUStringLiteral providerKey(u"com.sun.star.script.provider.ScriptProviderFor");
sal_uInt16 itemId = startItemId;
Reference< XContentEnumerationAccess > xEnumAccess( m_xContext->getServiceManager(), UNO_QUERY_THROW );
Reference< XEnumeration > xEnum = xEnumAccess->createContentEnumeration ( "com.sun.star.script.provider.LanguageScriptProvider" );
diff --git a/framework/source/uielement/objectmenucontroller.cxx b/framework/source/uielement/objectmenucontroller.cxx
index 80215acb8d06..00b0692f1eae 100644
--- a/framework/source/uielement/objectmenucontroller.cxx
+++ b/framework/source/uielement/objectmenucontroller.cxx
@@ -93,7 +93,7 @@ void ObjectMenuController::fillPopupMenu( const Sequence< css::embed::VerbDescri
if ( !pVCLPopupMenu )
return;
- const OUString aVerbCommand( ".uno:ObjectMenue?VerbID:short=" );
+ static const OUStringLiteral aVerbCommand( u".uno:ObjectMenue?VerbID:short=" );
for ( sal_Int32 i = 0; i < rVerbCommandSeq.getLength(); i++ )
{
const css::embed::VerbDescriptor& rVerb = pVerbCommandArray[i];
diff --git a/framework/source/uielement/recentfilesmenucontroller.cxx b/framework/source/uielement/recentfilesmenucontroller.cxx
index 9e1d9d84bfdb..a5792d29b224 100644
--- a/framework/source/uielement/recentfilesmenucontroller.cxx
+++ b/framework/source/uielement/recentfilesmenucontroller.cxx
@@ -357,7 +357,7 @@ void SAL_CALL RecentFilesMenuController::dispatch(
if ( nQueryPart <= 0 )
return;
- const OUString aEntryArgStr( "entry=" );
+ static const OUStringLiteral aEntryArgStr( u"entry=" );
sal_Int32 nEntryArg = aURL.Complete.indexOf( aEntryArgStr, nQueryPart );
sal_Int32 nEntryPos = nEntryArg + aEntryArgStr.getLength();
if (( nEntryArg <= 0 ) || ( nEntryPos >= aURL.Complete.getLength() ))
diff --git a/framework/source/uifactory/uicontrollerfactory.cxx b/framework/source/uifactory/uicontrollerfactory.cxx
index 4b5d36948bc3..0566a90c1db8 100644
--- a/framework/source/uifactory/uicontrollerfactory.cxx
+++ b/framework/source/uifactory/uicontrollerfactory.cxx
@@ -122,7 +122,7 @@ Reference< XInterface > SAL_CALL UIControllerFactory::createInstanceWithArgument
const Sequence< Any >& Arguments,
const Reference< XComponentContext >& )
{
- const OUString aPropModuleName( "ModuleIdentifier" );
+ static const OUStringLiteral aPropModuleName( u"ModuleIdentifier" );
OUString aPropName;
PropertyValue aPropValue;
diff --git a/i18npool/source/collator/chaptercollator.cxx b/i18npool/source/collator/chaptercollator.cxx
index d5d9b48bd1ba..729045ac59e0 100644
--- a/i18npool/source/collator/chaptercollator.cxx
+++ b/i18npool/source/collator/chaptercollator.cxx
@@ -61,7 +61,7 @@ ChapterCollator::compareSubstring( const OUString& str1, sal_Int32 off1, sal_Int
if( ans != 0 )
return ans;
- const OUString aAddAllowed("?");
+ static const OUStringLiteral aAddAllowed(u"?");
ParseResult res1, res2;
// since parseAnyToken does not take length as parameter, we have to copy
// it to a temp. string.
diff --git a/linguistic/source/lngsvcmgr.cxx b/linguistic/source/lngsvcmgr.cxx
index d289a7d0077b..b4b8d3836f6e 100644
--- a/linguistic/source/lngsvcmgr.cxx
+++ b/linguistic/source/lngsvcmgr.cxx
@@ -712,10 +712,10 @@ void LngSvcMgr::UpdateAll()
void LngSvcMgr::Notify( const uno::Sequence< OUString > &rPropertyNames )
{
- const OUString aSpellCheckerList( "ServiceManager/SpellCheckerList" );
- const OUString aGrammarCheckerList( "ServiceManager/GrammarCheckerList" );
- const OUString aHyphenatorList( "ServiceManager/HyphenatorList" );
- const OUString aThesaurusList( "ServiceManager/ThesaurusList" );
+ static const OUStringLiteral aSpellCheckerList( u"ServiceManager/SpellCheckerList" );
+ static const OUStringLiteral aGrammarCheckerList( u"ServiceManager/GrammarCheckerList" );
+ static const OUStringLiteral aHyphenatorList( u"ServiceManager/HyphenatorList" );
+ static const OUStringLiteral aThesaurusList( u"ServiceManager/ThesaurusList" );
const uno::Sequence< OUString > aSpellCheckerListEntries( GetNodeNames( aSpellCheckerList ) );
const uno::Sequence< OUString > aGrammarCheckerListEntries( GetNodeNames( aGrammarCheckerList ) );
diff --git a/oox/source/core/filterbase.cxx b/oox/source/core/filterbase.cxx
index 3e90a66158db..1fd2ebc4f010 100644
--- a/oox/source/core/filterbase.cxx
+++ b/oox/source/core/filterbase.cxx
@@ -266,10 +266,10 @@ OUString FilterBase::getAbsoluteUrl( const OUString& rUrl ) const
{
// handle some special cases before calling ::rtl::Uri::convertRelToAbs()
- const OUString aFileSchema = "file:";
- const OUString aFilePrefix = "file:///";
+ static const OUStringLiteral aFileSchema = u"file:";
+ static const OUStringLiteral aFilePrefix = u"file:///";
const sal_Int32 nFilePrefixLen = aFilePrefix.getLength();
- const OUString aUncPrefix = "//";
+ static const OUStringLiteral aUncPrefix = u"//";
/* (1) convert all backslashes to slashes, and check that passed URL is
not empty. */
diff --git a/oox/source/drawingml/customshapeproperties.cxx b/oox/source/drawingml/customshapeproperties.cxx
index fd39bb36e30e..1066b67aac76 100644
--- a/oox/source/drawingml/customshapeproperties.cxx
+++ b/oox/source/drawingml/customshapeproperties.cxx
@@ -152,8 +152,8 @@ void CustomShapeProperties::pushToPropSet(
Sequence< PropertyValue > aSeq = aPropertyMap.makePropertyValueSequence();
aPropSet.setProperty( PROP_CustomShapeGeometry, aSeq );
- const OUString sCustomShapeGeometry("CustomShapeGeometry");
- const OUString sAdjustmentValues("AdjustmentValues");
+ static const OUStringLiteral sCustomShapeGeometry(u"CustomShapeGeometry");
+ static const OUStringLiteral sAdjustmentValues(u"AdjustmentValues");
uno::Any aGeoPropSet = xPropSet->getPropertyValue( sCustomShapeGeometry );
uno::Sequence< beans::PropertyValue > aGeoPropSeq;
@@ -177,7 +177,7 @@ void CustomShapeProperties::pushToPropSet(
if ( !maAdjustmentGuideList.empty() )
{
- const OUString sType = "Type";
+ static const OUStringLiteral sType = u"Type";
if ( aGeoPropSet >>= aGeoPropSeq )
{
for ( auto& rGeoProp : aGeoPropSeq )
diff --git a/oox/source/drawingml/hyperlinkcontext.cxx b/oox/source/drawingml/hyperlinkcontext.cxx
index d0a09b140dcf..be2336be5ba7 100644
--- a/oox/source/drawingml/hyperlinkcontext.cxx
+++ b/oox/source/drawingml/hyperlinkcontext.cxx
@@ -78,7 +78,7 @@ HyperLinkContext::HyperLinkContext( ContextHandler2Helper const & rParent,
// ppaction://macro?name=MACRO_NAME
// ppaction://program
- const OUString sPPAction( "ppaction://" );
+ static const OUStringLiteral sPPAction( u"ppaction://" );
if ( aAction.matchIgnoreAsciiCase( sPPAction ) )
{
OUString aPPAct( aAction.copy( sPPAction.getLength() ) );
@@ -87,7 +87,7 @@ HyperLinkContext::HyperLinkContext( ContextHandler2Helper const & rParent,
if ( aPPAction.match( "hlinkshowjump" ) )
{
- const OUString sJump( "jump=" );
+ static const OUStringLiteral sJump( u"jump=" );
if ( aPPAct.match( sJump, nIndex + 1 ) )
{
OUString aDestination( aPPAct.copy( nIndex + 1 + sJump.getLength() ) );
diff --git a/oox/source/drawingml/shape.cxx b/oox/source/drawingml/shape.cxx
index b11ccbb5f97c..bc2d7b59f1d8 100644
--- a/oox/source/drawingml/shape.cxx
+++ b/oox/source/drawingml/shape.cxx
@@ -607,9 +607,9 @@ static void lcl_createPresetShape(const uno::Reference<drawing::XShape>& xShape,
aGeomPropSeq );
// Reset old properties
- const OUString sTextPath( "TextPath" );
- const OUString sAdjustmentValues( "AdjustmentValues" );
- const OUString sPresetTextWarp( "PresetTextWarp" );
+ static const OUStringLiteral sTextPath( u"TextPath" );
+ static const OUStringLiteral sAdjustmentValues( u"AdjustmentValues" );
+ static const OUStringLiteral sPresetTextWarp( u"PresetTextWarp" );
lcl_resetPropertyValue( aGeomPropVec, "CoordinateSize" );
lcl_resetPropertyValue( aGeomPropVec, "Equations" );
@@ -1169,7 +1169,7 @@ Reference< XShape > const & Shape::createAndInsert(
if(mnRotation)
{
uno::Reference<beans::XPropertySet> xPropertySet(mxShape, uno::UNO_QUERY);
- const OUString aGrabBagPropName = "FrameInteropGrabBag";
+ static const OUStringLiteral aGrabBagPropName = u"FrameInteropGrabBag";
uno::Sequence<beans::PropertyValue> aGrabBag;
xPropertySet->getPropertyValue(aGrabBagPropName) >>= aGrabBag;
beans::PropertyValue aPair;
diff --git a/oox/source/export/shapes.cxx b/oox/source/export/shapes.cxx
index e889901c477c..0f9e13fbb6e4 100644
--- a/oox/source/export/shapes.cxx
+++ b/oox/source/export/shapes.cxx
@@ -635,7 +635,7 @@ static void lcl_AnalyzeHandles( const uno::Sequence<beans::PropertyValues> & rHa
{
for ( const Sequence< PropertyValue >& rPropSeq : rHandles )
{
- const OUString sPosition( "Position" );
+ static const OUStringLiteral sPosition( u"Position" );
bool bPosition = false;
EnhancedCustomShapeParameterPair aPosition;
for ( const PropertyValue& rPropVal: rPropSeq )
diff --git a/oox/source/helper/propertymap.cxx b/oox/source/helper/propertymap.cxx
index 3bc994aabc19..15d8f65f1175 100644
--- a/oox/source/helper/propertymap.cxx
+++ b/oox/source/helper/propertymap.cxx
@@ -896,7 +896,7 @@ void PropertyMap::dumpCode( const Reference< XPropertySet >& rXPropSet )
{
Reference< XPropertySetInfo > info = rXPropSet->getPropertySetInfo ();
const Sequence< Property > props = info->getProperties ();
- const OUString sType = "Type";
+ static const OUStringLiteral sType = u"Type";
for (const Property& rProp : props) {
diff --git a/oox/source/ole/vbacontrol.cxx b/oox/source/ole/vbacontrol.cxx
index 07c91483c773..88d7f28617ef 100644
--- a/oox/source/ole/vbacontrol.cxx
+++ b/oox/source/ole/vbacontrol.cxx
@@ -800,7 +800,7 @@ void VbaUserForm::importForm( const Reference< XNameContainer >& rxDialogLib,
// scan for the line 'Begin {GUID} <FormName>'
TextInputStream aFrameTextStrm( mxContext, aInStrm, eTextEnc );
- const OUString aBegin = "Begin";
+ static const OUStringLiteral aBegin = u"Begin";
OUString aLine;
bool bBeginFound = false;
while( !bBeginFound && !aFrameTextStrm.isEof() )
diff --git a/oox/source/ole/vbaexport.cxx b/oox/source/ole/vbaexport.cxx
index 4b3e1f092c3c..372f821aa0b7 100644
--- a/oox/source/ole/vbaexport.cxx
+++ b/oox/source/ole/vbaexport.cxx
@@ -764,7 +764,7 @@ void exportDirStream(SvStream& rStrm, const css::uno::Reference<css::container::
aDirStream.WriteUInt32(0x00000000); // reserved
#if VBA_EXPORT_DEBUG
- const OUString aDirFileName("/tmp/vba_dir_out.bin");
+ static const OUStringLiteral aDirFileName(u"/tmp/vba_dir_out.bin");
SvFileStream aDirStreamDebug(aDirFileName, StreamMode::READWRITE);
aDirStream.Seek(0);
aDirStreamDebug.WriteStream(aDirStream);
diff --git a/oox/source/ppt/pptshape.cxx b/oox/source/ppt/pptshape.cxx
index 96ca319f2a8e..62a070e5c840 100644
--- a/oox/source/ppt/pptshape.cxx
+++ b/oox/source/ppt/pptshape.cxx
@@ -134,7 +134,7 @@ void PPTShape::addShape(
if (sServiceName != "com.sun.star.drawing.GraphicObjectShape" &&
sServiceName != "com.sun.star.drawing.OLE2Shape")
{
- const OUString sOutlinerShapeService("com.sun.star.presentation.OutlinerShape");
+ static const OUStringLiteral sOutlinerShapeService(u"com.sun.star.presentation.OutlinerShape");
SAL_INFO("oox.ppt","has master: " << std::hex << rSlidePersist.getMasterPersist().get());
switch (mnSubType)
{
diff --git a/oox/source/ppt/presentationfragmenthandler.cxx b/oox/source/ppt/presentationfragmenthandler.cxx
index 2683905b8a74..aced17a2523b 100644
--- a/oox/source/ppt/presentationfragmenthandler.cxx
+++ b/oox/source/ppt/presentationfragmenthandler.cxx
@@ -108,7 +108,7 @@ static void ResolveTextFields( XmlFilterBase const & rFilter )
const Reference< frame::XModel >& xModel( rFilter.getModel() );
for (auto const& textField : rTextFields)
{
- const OUString sURL = "URL";
+ static const OUStringLiteral sURL = u"URL";
Reference< drawing::XDrawPagesSupplier > xDPS( xModel, uno::UNO_QUERY_THROW );
Reference< drawing::XDrawPages > xDrawPages( xDPS->getDrawPages(), uno::UNO_SET_THROW );
@@ -120,8 +120,8 @@ static void ResolveTextFields( XmlFilterBase const & rFilter )
OUString aURL;
if ( xPropSet->getPropertyValue( sURL ) >>= aURL )
{
- const OUString sSlide = "#Slide ";
- const OUString sNotes = "#Notes ";
+ static const OUStringLiteral sSlide = u"#Slide ";
+ static const OUStringLiteral sNotes = u"#Notes ";
bool bNotes = false;
sal_Int32 nPageNumber = 0;
if ( aURL.match( sSlide ) )
@@ -171,7 +171,7 @@ void PresentationFragmentHandler::saveThemeToGrabBag(const oox::drawingml::Theme
{
uno::Reference<beans::XPropertySetInfo> xPropsInfo = xDocProps->getPropertySetInfo();
- const OUString aGrabBagPropName = "InteropGrabBag";
+ static const OUStringLiteral aGrabBagPropName = u"InteropGrabBag";
if (xPropsInfo.is() && xPropsInfo->hasPropertyByName(aGrabBagPropName))
{
// get existing grab bag
diff --git a/oox/source/ppt/slidepersist.cxx b/oox/source/ppt/slidepersist.cxx
index c6be45e71ce1..2b4169bf6062 100644
--- a/oox/source/ppt/slidepersist.cxx
+++ b/oox/source/ppt/slidepersist.cxx
@@ -246,10 +246,10 @@ void SlidePersist::applyTextStyles( const XmlFilterBase& rFilterBase )
OUString aStyle;
OUString aFamily;
- const OUString sOutline( "outline1" );
- const OUString sTitle( "title" );
- const OUString sStandard( "standard" );
- const OUString sSubtitle( "subtitle" );
+ static const OUStringLiteral sOutline( u"outline1" );
+ static const OUStringLiteral sTitle( u"title" );
+ static const OUStringLiteral sStandard( u"standard" );
+ static const OUStringLiteral sSubtitle( u"subtitle" );
for( int i = 0; i < 4; i++ ) // todo: aggregation of bodystyle (subtitle)
{
diff --git a/oox/source/vml/vmlshape.cxx b/oox/source/vml/vmlshape.cxx
index 2d4e99c7be3f..d5ad6963ff85 100644
--- a/oox/source/vml/vmlshape.cxx
+++ b/oox/source/vml/vmlshape.cxx
@@ -311,7 +311,7 @@ void ShapeBase::finalizeFragmentImport()
else {
// Temporary fix, shapetype not found if referenced from different substream
// FIXME: extend scope of ShapeContainer to store all shapetypes from the document
- const OUString sShapeTypePrefix = "shapetype_";
+ static const OUStringLiteral sShapeTypePrefix = u"shapetype_";
OUString tmp;
if (aType.startsWith(sShapeTypePrefix)) {
maTypeModel.moShapeType = aType.copy(sShapeTypePrefix.getLength()).toInt32();
diff --git a/package/source/manifest/ManifestExport.cxx b/package/source/manifest/ManifestExport.cxx
index c3c4be339646..7ac46874f7ae 100644
--- a/package/source/manifest/ManifestExport.cxx
+++ b/package/source/manifest/ManifestExport.cxx
@@ -89,24 +89,24 @@ ManifestExport::ManifestExport( uno::Reference< xml::sax::XDocumentHandler > con
const OUString sAlgorithmAttribute13 ( ATTRIBUTE_ALGORITHM13 );
const OUString sCipherDataElement13 ( ELEMENT_CIPHERDATA13 );
const OUString sCipherValueElement13 ( ELEMENT_CIPHERVALUE13 );
- const OUString sKeyInfo ( "KeyInfo" );
- const OUString sPgpKeyIDProperty ( "KeyId" );
- const OUString sPgpKeyPacketProperty ( "KeyPacket" );
- const OUString sCipherValueProperty ( "CipherValue" );
- const OUString sFullPathProperty ( "FullPath" );
- const OUString sVersionProperty ( "Version" );
- const OUString sMediaTypeProperty ( "MediaType" );
- const OUString sIterationCountProperty ( "IterationCount" );
- const OUString sDerivedKeySizeProperty ( "DerivedKeySize" );
- const OUString sSaltProperty ( "Salt" );
- const OUString sInitialisationVectorProperty( "InitialisationVector" );
- const OUString sSizeProperty ( "Size" );
- const OUString sDigestProperty ( "Digest" );
- const OUString sEncryptionAlgProperty ( "EncryptionAlgorithm" );
- const OUString sStartKeyAlgProperty ( "StartKeyAlgorithm" );
- const OUString sDigestAlgProperty ( "DigestAlgorithm" );
-
- const OUString sWhiteSpace ( " " );
+ static const OUStringLiteral sKeyInfo ( u"KeyInfo" );
+ static const OUStringLiteral sPgpKeyIDProperty ( u"KeyId" );
+ static const OUStringLiteral sPgpKeyPacketProperty ( u"KeyPacket" );
+ static const OUStringLiteral sCipherValueProperty ( u"CipherValue" );
+ static const OUStringLiteral sFullPathProperty ( u"FullPath" );
+ static const OUStringLiteral sVersionProperty ( u"Version" );
+ static const OUStringLiteral sMediaTypeProperty ( u"MediaType" );
+ static const OUStringLiteral sIterationCountProperty ( u"IterationCount" );
+ static const OUStringLiteral sDerivedKeySizeProperty ( u"DerivedKeySize" );
+ static const OUStringLiteral sSaltProperty ( u"Salt" );
+ static const OUStringLiteral sInitialisationVectorProperty( u"InitialisationVector" );
+ static const OUStringLiteral sSizeProperty ( u"Size" );
+ static const OUStringLiteral sDigestProperty ( u"Digest" );
+ static const OUStringLiteral sEncryptionAlgProperty ( u"EncryptionAlgorithm" );
+ static const OUStringLiteral sStartKeyAlgProperty ( u"StartKeyAlgorithm" );
+ static const OUStringLiteral sDigestAlgProperty ( u"DigestAlgorithm" );
+
+ static const OUStringLiteral sWhiteSpace ( u" " );
const OUString sSHA256_URL_ODF12 ( SHA256_URL_ODF12 );
const OUString sSHA1_Name ( SHA1_NAME );
diff --git a/package/source/zippackage/ZipPackage.cxx b/package/source/zippackage/ZipPackage.cxx
index 3de64f6502b2..c31697f24184 100644
--- a/package/source/zippackage/ZipPackage.cxx
+++ b/package/source/zippackage/ZipPackage.cxx
@@ -174,11 +174,11 @@ void ZipPackage::parseManifest()
return;
bool bManifestParsed = false;
- const OUString sMeta ("META-INF");
+ static const OUStringLiteral sMeta (u"META-INF");
if ( m_xRootFolder->hasByName( sMeta ) )
{
try {
- const OUString sManifest ("manifest.xml");
+ static const OUStringLiteral sManifest (u"manifest.xml");
uno::Reference< XUnoTunnel > xTunnel;
Any aAny = m_xRootFolder->getByName( sMeta );
aAny >>= xTunnel;
@@ -192,19 +192,19 @@ void ZipPackage::parseManifest()
{
uno::Reference < XManifestReader > xReader = ManifestReader::create( m_xContext );
- const OUString sPropFullPath ("FullPath");
- const OUString sPropVersion ("Version");
- const OUString sPropMediaType ("MediaType");
- const OUString sPropInitialisationVector ("InitialisationVector");
- const OUString sPropSalt ("Salt");
- const OUString sPropIterationCount ("IterationCount");
- const OUString sPropSize ("Size");
- const OUString sPropDigest ("Digest");
- const OUString sPropDerivedKeySize ("DerivedKeySize");
- const OUString sPropDigestAlgorithm ("DigestAlgorithm");
- const OUString sPropEncryptionAlgorithm ("EncryptionAlgorithm");
- const OUString sPropStartKeyAlgorithm ("StartKeyAlgorithm");
- const OUString sKeyInfo ("KeyInfo");
+ static const OUStringLiteral sPropFullPath (u"FullPath");
+ static const OUStringLiteral sPropVersion (u"Version");
+ static const OUStringLiteral sPropMediaType (u"MediaType");
+ static const OUStringLiteral sPropInitialisationVector (u"InitialisationVector");
+ static const OUStringLiteral sPropSalt (u"Salt");
+ static const OUStringLiteral sPropIterationCount (u"IterationCount");
+ static const OUStringLiteral sPropSize (u"Size");
+ static const OUStringLiteral sPropDigest (u"Digest");
+ static const OUStringLiteral sPropDerivedKeySize (u"DerivedKeySize");
+ static const OUStringLiteral sPropDigestAlgorithm (u"DigestAlgorithm");
+ static const OUStringLiteral sPropEncryptionAlgorithm (u"EncryptionAlgorithm");
+ static const OUStringLiteral sPropStartKeyAlgorithm (u"StartKeyAlgorithm");
+ static const OUStringLiteral sKeyInfo (u"KeyInfo");
const uno::Sequence < uno::Sequence < PropertyValue > > aManifestSequence = xReader->readManifestSequence ( xSink->getInputStream() );
ZipPackageStream *pStream = nullptr;
@@ -380,7 +380,7 @@ void ZipPackage::parseManifest()
throw ZipIOException(
THROW_WHERE "Could not parse manifest.xml" );
- const OUString sMimetype ("mimetype");
+ static const OUStringLiteral sMimetype (u"mimetype");
if ( m_xRootFolder->hasByName( sMimetype ) )
{
// get mediatype from the "mimetype" stream
@@ -458,7 +458,7 @@ void ZipPackage::parseContentType()
return;
try {
- const OUString aContentTypes("[Content_Types].xml");
+ static const OUStringLiteral aContentTypes(u"[Content_Types].xml");
// the content type must exist in OFOPXML format!
if ( !m_xRootFolder->hasByName( aContentTypes ) )
throw io::IOException(THROW_WHERE "Wrong format!" );
@@ -1015,7 +1015,7 @@ uno::Reference< XInterface > SAL_CALL ZipPackage::createInstanceWithArguments( c
void ZipPackage::WriteMimetypeMagicFile( ZipOutputStream& aZipOut )
{
- const OUString sMime ("mimetype");
+ static const OUStringLiteral sMime (u"mimetype");
if ( m_xRootFolder->hasByName( sMime ) )
m_xRootFolder->removeByName( sMime );
@@ -1229,7 +1229,7 @@ uno::Reference< io::XInputStream > ZipPackage::writeTempFile()
if ( m_xRootFolder->hasByName( sMeta ) )
{
- const OUString sManifest ("manifest.xml");
+ static const OUStringLiteral sManifest (u"manifest.xml");
uno::Reference< XUnoTunnel > xTunnel;
Any aAny = m_xRootFolder->getByName( sMeta );
diff --git a/package/source/zippackage/ZipPackageStream.cxx b/package/source/zippackage/ZipPackageStream.cxx
index fb1794841809..19cc550a3e85 100644
--- a/package/source/zippackage/ZipPackageStream.cxx
+++ b/package/source/zippackage/ZipPackageStream.cxx
@@ -452,11 +452,11 @@ bool ZipPackageStream::saveChild(
{
bool bSuccess = true;
- const OUString sDigestProperty ("Digest");
- const OUString sEncryptionAlgProperty ("EncryptionAlgorithm");
- const OUString sStartKeyAlgProperty ("StartKeyAlgorithm");
- const OUString sDigestAlgProperty ("DigestAlgorithm");
- const OUString sDerivedKeySizeProperty ("DerivedKeySize");
+ static const OUStringLiteral sDigestProperty (u"Digest");
+ static const OUStringLiteral sEncryptionAlgProperty (u"EncryptionAlgorithm");
+ static const OUStringLiteral sStartKeyAlgProperty (u"StartKeyAlgorithm");
+ static const OUStringLiteral sDigestAlgProperty (u"DigestAlgorithm");
+ static const OUStringLiteral sDerivedKeySizeProperty (u"DerivedKeySize");
uno::Sequence < beans::PropertyValue > aPropSet (PKG_SIZE_NOENCR_MNFST);
diff --git a/reportdesign/source/core/misc/conditionalexpression.cxx b/reportdesign/source/core/misc/conditionalexpression.cxx
index d68c25c95a63..97284c8b0d64 100644
--- a/reportdesign/source/core/misc/conditionalexpression.cxx
+++ b/reportdesign/source/core/misc/conditionalexpression.cxx
@@ -71,7 +71,7 @@ namespace rptui
// Okay, let's start with replacing all $$ in our pattern with the actual field data source
OUString sMatchExpression( m_sPattern );
- const OUString sFieldDataPattern( "$$" );
+ static const OUStringLiteral sFieldDataPattern( u"$$" );
sal_Int32 nIndex( sMatchExpression.indexOf( sFieldDataPattern ) );
while ( nIndex != -1 )
{
@@ -79,8 +79,8 @@ namespace rptui
nIndex = sMatchExpression.indexOf( sFieldDataPattern, nIndex + _rFieldDataSource.getLength() );
}
- const OUString sLHSPattern( "$1" );
- const OUString sRHSPattern( "$2" );
+ static const OUStringLiteral sLHSPattern( u"$1" );
+ static const OUStringLiteral sRHSPattern( u"$2" );
sal_Int32 nLHSIndex( sMatchExpression.indexOf( sLHSPattern ) );
sal_Int32 nRHSIndex( sMatchExpression.indexOf( sRHSPattern ) );
diff --git a/reportdesign/source/core/sdr/formatnormalizer.cxx b/reportdesign/source/core/sdr/formatnormalizer.cxx
index 195582503839..c4d22941fbf3 100644
--- a/reportdesign/source/core/sdr/formatnormalizer.cxx
+++ b/reportdesign/source/core/sdr/formatnormalizer.cxx
@@ -220,7 +220,7 @@ namespace rptui
return;
OUString sDataField( _rxFormatted->getDataField() );
- const OUString sFieldPrefix( "field:[" );
+ static const OUStringLiteral sFieldPrefix( u"field:[" );
if ( sDataField.indexOf( sFieldPrefix ) != 0 )
// not bound to a table field
// TODO: we might also do this kind of thing for functions and expressions ...
diff --git a/reportdesign/source/ui/inspection/DataProviderHandler.cxx b/reportdesign/source/ui/inspection/DataProviderHandler.cxx
index bcc6be58ff29..dd770ff9fd5b 100644
--- a/reportdesign/source/ui/inspection/DataProviderHandler.cxx
+++ b/reportdesign/source/ui/inspection/DataProviderHandler.cxx
@@ -111,11 +111,11 @@ void SAL_CALL DataProviderHandler::inspect(const uno::Reference< uno::XInterface
try
{
uno::Reference< container::XNameContainer > xNameCont(Component,uno::UNO_QUERY);
- const OUString sFormComponent("FormComponent");
+ static const OUStringLiteral sFormComponent(u"FormComponent");
if ( xNameCont->hasByName(sFormComponent) )
{
uno::Reference<beans::XPropertySet> xProp(xNameCont->getByName(sFormComponent),uno::UNO_QUERY);
- const OUString sModel("Model");
+ static const OUStringLiteral sModel(u"Model");
if ( xProp.is() && xProp->getPropertySetInfo()->hasPropertyByName(sModel) )
{
m_xChartModel.set(xProp->getPropertyValue(sModel),uno::UNO_QUERY);
diff --git a/reportdesign/source/ui/inspection/GeometryHandler.cxx b/reportdesign/source/ui/inspection/GeometryHandler.cxx
index 9ac2957f356e..2392f6e6b6a9 100644
--- a/reportdesign/source/ui/inspection/GeometryHandler.cxx
+++ b/reportdesign/source/ui/inspection/GeometryHandler.cxx
@@ -282,7 +282,7 @@ void SAL_CALL GeometryHandler::inspect( const uno::Reference< uno::XInterface >
const uno::Reference< container::XNameContainer > xObjectAsContainer( _rxInspectee, uno::UNO_QUERY );
m_xReportComponent.set( xObjectAsContainer->getByName("ReportComponent"), uno::UNO_QUERY );
- const OUString sRowSet("RowSet");
+ static const OUStringLiteral sRowSet(u"RowSet");
if ( xObjectAsContainer->hasByName( sRowSet ) )
{
const uno::Any aRowSet( xObjectAsContainer->getByName(sRowSet) );
@@ -2090,8 +2090,8 @@ void GeometryHandler::impl_createFunction(const OUString& _sFunctionName,std::u1
m_xFunction.set(report::Function::create(m_xContext));
m_xFunction->setName( _sFunctionName );
- const OUString sPlaceHolder1("%Column");
- const OUString sPlaceHolder2("%FunctionName");
+ static const OUStringLiteral sPlaceHolder1(u"%Column");
+ static const OUStringLiteral sPlaceHolder2(u"%FunctionName");
OUString sFormula(_aFunction.m_sFormula);
sFormula = sFormula.replaceAll(sPlaceHolder1,_sDataField);
sFormula = sFormula.replaceAll(sPlaceHolder2,_sFunctionName);
diff --git a/reportdesign/source/ui/inspection/ReportComponentHandler.cxx b/reportdesign/source/ui/inspection/ReportComponentHandler.cxx
index 3e4fe9ae6884..28b33acc4133 100644
--- a/reportdesign/source/ui/inspection/ReportComponentHandler.cxx
+++ b/reportdesign/source/ui/inspection/ReportComponentHandler.cxx
@@ -85,10 +85,10 @@ void SAL_CALL ReportComponentHandler::inspect(const uno::Reference< uno::XInterf
try
{
uno::Reference< container::XNameContainer > xNameCont(Component,uno::UNO_QUERY);
- const OUString sFormComponent("FormComponent");
+ static const OUStringLiteral sFormComponent(u"FormComponent");
if ( xNameCont->hasByName(sFormComponent) )
xNameCont->getByName(sFormComponent) >>= m_xFormComponent;
- const OUString sRowSet("RowSet");
+ static const OUStringLiteral sRowSet(u"RowSet");
if ( xNameCont->hasByName(sRowSet) )
{
uno::Reference<beans::XPropertySet> xProp(m_xFormComponentHandler,uno::UNO_QUERY);
diff --git a/reportdesign/source/ui/report/ReportController.cxx b/reportdesign/source/ui/report/ReportController.cxx
index 46a23a3a4f9a..475bef77a29f 100644
--- a/reportdesign/source/ui/report/ReportController.cxx
+++ b/reportdesign/source/ui/report/ReportController.cxx
@@ -3972,12 +3972,11 @@ void OReportController::createDefaultControl(const uno::Sequence< beans::Propert
if ( !xSection.is() )
return;
- const OUString sKeyModifier("KeyModifier");
const beans::PropertyValue* pIter = _aArgs.getConstArray();
const beans::PropertyValue* pEnd = pIter + _aArgs.getLength();
const beans::PropertyValue* pKeyModifier = ::std::find_if(pIter, pEnd,
- [&sKeyModifier] (const beans::PropertyValue& x) -> bool {
- return x.Name == sKeyModifier;
+ [] (const beans::PropertyValue& x) -> bool {
+ return x.Name == "KeyModifier";
});
sal_Int16 nKeyModifier = 0;
if ( pKeyModifier == pEnd || ((pKeyModifier->Value >>= nKeyModifier) && nKeyModifier == KEY_MOD1) )
@@ -4002,7 +4001,7 @@ void OReportController::checkChartEnabled()
::utl::OConfigurationTreeRoot::createWithComponentContext( m_xContext, "/org.openoffice.Office.ReportDesign" ) );
bool bChartEnabled = false;
- const OUString sPropertyName( "UserData/Chart" );
+ static const OUStringLiteral sPropertyName( u"UserData/Chart" );
if ( aConfiguration.hasByHierarchicalName(sPropertyName) )
aConfiguration.getNodeValue( sPropertyName ) >>= bChartEnabled;
m_bChartEnabled = bChartEnabled;
diff --git a/sal/qa/rtl/process/rtl_Process.cxx b/sal/qa/rtl/process/rtl_Process.cxx
index 5c19760b2313..f117c3a2a959 100644
--- a/sal/qa/rtl/process/rtl_Process.cxx
+++ b/sal/qa/rtl/process/rtl_Process.cxx
@@ -69,9 +69,9 @@ public:
void getAppCommandArg_001()
{
#if defined(_WIN32)
- const OUString EXECUTABLE_NAME("child_process.exe");
+ static const OUStringLiteral EXECUTABLE_NAME(u"child_process.exe");
#else
- const OUString EXECUTABLE_NAME("child_process");
+ static const OUStringLiteral EXECUTABLE_NAME(u"child_process");
#endif
OUString suCWD = getModulePath();
// OUString suCWD2 = getExecutableDirectory();
@@ -194,9 +194,9 @@ public:
void getGlobalProcessId_002()
{
#if defined(_WIN32)
- const OUString EXEC_NAME("child_process_id.exe");
+ static const OUStringLiteral EXEC_NAME(u"child_process_id.exe");
#else
- const OUString EXEC_NAME("child_process_id");
+ static const OUStringLiteral EXEC_NAME(u"child_process_id");
#endif
sal_uInt8 pTargetUUID1[16];
rtl_getGlobalProcessId( pTargetUUID1 );
diff --git a/sc/qa/extras/macros-test.cxx b/sc/qa/extras/macros-test.cxx
index 771b71edf399..14cb8c6d8101 100644
--- a/sc/qa/extras/macros-test.cxx
+++ b/sc/qa/extras/macros-test.cxx
@@ -512,9 +512,9 @@ void ScMacrosTest::testTdf131562()
void ScMacrosTest::testPasswordProtectedUnicodeString()
{
const OUString sCorrectString(u"English Русский 中文");
- const OUString sMacroURL(
- "vnd.sun.Star.script:Protected.Module1.TestUnicodeString?language=Basic&location=document");
- const OUString sLibName("Protected");
+ static const OUStringLiteral sMacroURL(
+ u"vnd.sun.Star.script:Protected.Module1.TestUnicodeString?language=Basic&location=document");
+ static const OUStringLiteral sLibName(u"Protected");
OUString aFileName;
createFileURL(u"tdf57113.ods", aFileName);
@@ -571,9 +571,9 @@ void ScMacrosTest::testPasswordProtectedUnicodeString()
void ScMacrosTest::testPasswordProtectedArrayInUserType()
{
- const OUString sMacroURL(
- "vnd.sun.Star.script:Protected.Module1.TestMyType?language=Basic&location=document");
- const OUString sLibName("Protected");
+ static const OUStringLiteral sMacroURL(
+ u"vnd.sun.Star.script:Protected.Module1.TestMyType?language=Basic&location=document");
+ static const OUStringLiteral sLibName(u"Protected");
OUString aFileName;
createFileURL(u"ProtectedArrayInCustomType.ods", aFileName);
diff --git a/sc/qa/unit/screenshots/screenshots.cxx b/sc/qa/unit/screenshots/screenshots.cxx
index 2286e0a86955..b22eb2a3ed46 100644
--- a/sc/qa/unit/screenshots/screenshots.cxx
+++ b/sc/qa/unit/screenshots/screenshots.cxx
@@ -132,7 +132,7 @@ VclPtr<VclAbstractDialog> ScScreenshotTest::createDialogByID(sal_uInt32 nID)
{
VclPtr<VclAbstractDialog> pReturnDialog;
////FIXME: translatable string here
- const OUString aDefaultSheetName("Sheet1");
+ static const OUStringLiteral aDefaultSheetName(u"Sheet1");
switch ( nID )
{
diff --git a/sc/qa/unit/subsequent_filters-test.cxx b/sc/qa/unit/subsequent_filters-test.cxx
index fd55c00f6a89..0807f29a3587 100644
--- a/sc/qa/unit/subsequent_filters-test.cxx
+++ b/sc/qa/unit/subsequent_filters-test.cxx
@@ -1884,7 +1884,7 @@ void ScFiltersTest::testBrokenQuotesCSV()
void ScFiltersTest::testCellValueXLSX()
{
- const OUString aFileNameBase("cell-value.");
+ static const OUStringLiteral aFileNameBase(u"cell-value.");
OUString aFileExtension(getFileFormats()[FORMAT_XLSX].pName, strlen(getFileFormats()[FORMAT_XLSX].pName), RTL_TEXTENCODING_UTF8 );
OUString aFilterName(getFileFormats()[FORMAT_XLSX].pFilterName, strlen(getFileFormats()[FORMAT_XLSX].pFilterName), RTL_TEXTENCODING_UTF8) ;
OUString aFileName;
diff --git a/sc/source/filter/excel/xechart.cxx b/sc/source/filter/excel/xechart.cxx
index ad829a913f31..fb1a5f35d793 100644
--- a/sc/source/filter/excel/xechart.cxx
+++ b/sc/source/filter/excel/xechart.cxx
@@ -1912,8 +1912,8 @@ bool XclExpChSeries::ConvertDataSeries(
Reference< XColorScheme > xColorScheme = xDiagram->getDefaultColorScheme();
if( xColorScheme.is() )
{
- const OUString aFillStyleName = "FillStyle";
- const OUString aColorName = "Color";
+ static const OUStringLiteral aFillStyleName = u"FillStyle";
+ static const OUStringLiteral aColorName = u"Color";
namespace cssd = ::com::sun::star::drawing;
for( sal_Int32 nPointIdx = 0; nPointIdx < nMaxPointCount; ++nPointIdx )
{
diff --git a/sc/source/filter/excel/xicontent.cxx b/sc/source/filter/excel/xicontent.cxx
index 6c6ec113873d..52123b499935 100644
--- a/sc/source/filter/excel/xicontent.cxx
+++ b/sc/source/filter/excel/xicontent.cxx
@@ -994,7 +994,7 @@ void XclImpWebQuery::ReadWqtables( XclImpStream& rStrm )
OUString aTables( rStrm.ReadUniString() );
const sal_Unicode cSep = ';';
- const OUString aQuotedPairs( "\"\"" );
+ static const OUStringLiteral aQuotedPairs( u"\"\"" );
maTables.clear();
for ( sal_Int32 nStringIx {aTables.isEmpty() ? -1 : 0}; nStringIx>=0; )
{
diff --git a/sc/source/filter/oox/querytablebuffer.cxx b/sc/source/filter/oox/querytablebuffer.cxx
index a3800acd5a81..b6614068c2ff 100644
--- a/sc/source/filter/oox/querytablebuffer.cxx
+++ b/sc/source/filter/oox/querytablebuffer.cxx
@@ -246,7 +246,7 @@ void QueryTable::finalizeImport()
PropertySet aDocProps( getDocument() );
Reference< XAreaLinks > xAreaLinks( aDocProps.getAnyProperty( PROP_AreaLinks ), UNO_QUERY_THROW );
CellAddress aDestPos( aDestRange.aStart.Tab(), aDestRange.aStart.Col(), aDestRange.aStart.Row() );
- const OUString aFilterName = "calc_HTML_WebQuery";
+ static const OUStringLiteral aFilterName = u"calc_HTML_WebQuery";
xAreaLinks->insertAtPosition( aDestPos, aFileUrl, aTables, aFilterName, /*aFilterOptions*/"" );
// set refresh interval (convert minutes to seconds)
sal_Int32 nRefreshPeriod = xConnection->getModel().mnInterval * 60;
diff --git a/sc/source/filter/xcl97/xcl97esc.cxx b/sc/source/filter/xcl97/xcl97esc.cxx
index 97129cdda671..33363d6cdb4a 100644
--- a/sc/source/filter/xcl97/xcl97esc.cxx
+++ b/sc/source/filter/xcl97/xcl97esc.cxx
@@ -168,7 +168,7 @@ bool lcl_IsFontwork( const SdrObject* pObj )
bool bIsFontwork = false;
if( pObj->GetObjIdentifier() == OBJ_CUSTOMSHAPE )
{
- const OUString aTextPath = "TextPath";
+ static const OUStringLiteral aTextPath = u"TextPath";
const SdrCustomShapeGeometryItem& rGeometryItem =
pObj->GetMergedItem( SDRATTR_CUSTOMSHAPE_GEOMETRY );
if( const Any* pAny = rGeometryItem.GetPropertyValueByName( aTextPath, aTextPath ) )
diff --git a/sc/source/filter/xml/XMLStylesExportHelper.cxx b/sc/source/filter/xml/XMLStylesExportHelper.cxx
index cb00b0074538..cfd41b9be146 100644
--- a/sc/source/filter/xml/XMLStylesExportHelper.cxx
+++ b/sc/source/filter/xml/XMLStylesExportHelper.cxx
@@ -402,7 +402,7 @@ void ScMyValidationsContainer::WriteValidations(ScXMLExport& rExport)
// and the property name is "MacroName".
bool bScriptURL = SfxApplication::IsXScriptURL( rValidation.sErrorTitle );
- const OUString sScript("Script");
+ static const OUStringLiteral sScript(u"Script");
uno::Sequence<beans::PropertyValue> aSeq( comphelper::InitPropertySequence({
{ "EventType", uno::Any(bScriptURL ? sScript : OUString("StarBasic")) },
{ "Library", uno::Any(OUString()) },
diff --git a/sc/source/ui/StatisticsDialogs/MatrixComparisonGenerator.cxx b/sc/source/ui/StatisticsDialogs/MatrixComparisonGenerator.cxx
index bb2bf4a1ed49..1b26119f8893 100644
--- a/sc/source/ui/StatisticsDialogs/MatrixComparisonGenerator.cxx
+++ b/sc/source/ui/StatisticsDialogs/MatrixComparisonGenerator.cxx
@@ -71,7 +71,7 @@ ScRange ScMatrixComparisonGenerator::ApplyOutput(ScDocShell* pDocShell)
output.writeString(getLabel());
output.nextColumn();
- const OUString strWildcardNumber("%NUMBER%");
+ static const OUStringLiteral strWildcardNumber(u"%NUMBER%");
// write labels to columns
for (size_t i = 0; i < aRangeList.size(); i++)
diff --git a/sc/source/ui/dbgui/validate.cxx b/sc/source/ui/dbgui/validate.cxx
index cd9097c0ff48..2abb8e53e441 100644
--- a/sc/source/ui/dbgui/validate.cxx
+++ b/sc/source/ui/dbgui/validate.cxx
@@ -315,7 +315,7 @@ void lclGetFormulaFromStringList( OUString& rFmlaStr, const OUString& rStringLis
@return true = Conversion successful. */
bool lclGetStringListFromFormula( OUString& rStringList, const OUString& rFmlaStr, sal_Unicode cFmlaSep )
{
- const OUString aQuotes( "\"\"" );
+ static const OUStringLiteral aQuotes( u"\"\"" );
rStringList.clear();
bool bIsStringList = !rFmlaStr.isEmpty();
diff --git a/sc/source/ui/docshell/datastream.cxx b/sc/source/ui/docshell/datastream.cxx
index 1a9e0a0c197b..26a5a77300d7 100644
--- a/sc/source/ui/docshell/datastream.cxx
+++ b/sc/source/ui/docshell/datastream.cxx
@@ -251,7 +251,7 @@ void DataStream::MakeToolbarVisible()
if (!xLayoutManager.is())
return;
- const OUString sResourceURL( "private:resource/toolbar/datastreams" );
+ static const OUStringLiteral sResourceURL( u"private:resource/toolbar/datastreams" );
css::uno::Reference< css::ui::XUIElement > xUIElement = xLayoutManager->getElement(sResourceURL);
if (!xUIElement.is())
{
diff --git a/sc/source/ui/docshell/docsh4.cxx b/sc/source/ui/docshell/docsh4.cxx
index bc2edefd3115..f716048d8399 100644
--- a/sc/source/ui/docshell/docsh4.cxx
+++ b/sc/source/ui/docshell/docsh4.cxx
@@ -1170,9 +1170,9 @@ void ScDocShell::Execute( SfxRequest& rReq )
if ( !aLangText.isEmpty() )
{
LanguageType eLang, eLatin, eCjk, eCtl;
- const OUString aSelectionLangPrefix("Current_");
- const OUString aParagraphLangPrefix("Paragraph_");
- const OUString aDocLangPrefix("Default_");
+ static const OUStringLiteral aSelectionLangPrefix(u"Current_");
+ static const OUStringLiteral aParagraphLangPrefix(u"Paragraph_");
+ static const OUStringLiteral aDocLangPrefix(u"Default_");
bool bSelection = false;
bool bParagraph = false;
@@ -1320,7 +1320,7 @@ void ScDocShell::Execute( SfxRequest& rReq )
if (pItem2)
sApplyText = pItem2->GetValue();
- const OUString sSpellingRule("Spelling_");
+ static const OUStringLiteral sSpellingRule(u"Spelling_");
sal_Int32 nPos = 0;
if(-1 != (nPos = sApplyText.indexOf( sSpellingRule )))
{
diff --git a/sc/source/ui/vba/vbasheetobject.cxx b/sc/source/ui/vba/vbasheetobject.cxx
index 400a1b88b47a..52513095fac4 100644
--- a/sc/source/ui/vba/vbasheetobject.cxx
+++ b/sc/source/ui/vba/vbasheetobject.cxx
@@ -323,12 +323,11 @@ OUString SAL_CALL ScVbaControlObjectBase::getOnAction()
const uno::Sequence< script::ScriptEventDescriptor > aEvents = xEventMgr->getScriptEvents( nIndex );
if( aEvents.hasElements() )
{
- const OUString aScriptType = "Script";
const script::ScriptEventDescriptor* pEvent = std::find_if(aEvents.begin(), aEvents.end(),
- [&aScriptType](const script::ScriptEventDescriptor& rEvent) {
+ [](const script::ScriptEventDescriptor& rEvent) {
return (rEvent.ListenerType == gaListenerType)
&& (rEvent.EventMethod == gaEventMethod)
- && (rEvent.ScriptType == aScriptType);
+ && (rEvent.ScriptType == "Script");
});
if (pEvent != aEvents.end())
return extractMacroName( pEvent->ScriptCode );
diff --git a/sd/qa/unit/SVGExportTests.cxx b/sd/qa/unit/SVGExportTests.cxx
index 7bb9126d5d21..dd9364643f08 100644
--- a/sd/qa/unit/SVGExportTests.cxx
+++ b/sd/qa/unit/SVGExportTests.cxx
@@ -311,7 +311,7 @@ public:
void testSVGPlaceholderLocale()
{
- const OUString aLangISO("it-IT");
+ static const OUStringLiteral aLangISO(u"it-IT");
SvtSysLocaleOptions aSysLocaleOptions;
aSysLocaleOptions.SetLocaleConfigString(aLangISO);
aSysLocaleOptions.SetUILocaleConfigString(aLangISO);
diff --git a/sd/qa/unit/export-tests-ooxml2.cxx b/sd/qa/unit/export-tests-ooxml2.cxx
index 3d8e93b8b003..839b9553a00e 100644
--- a/sd/qa/unit/export-tests-ooxml2.cxx
+++ b/sd/qa/unit/export-tests-ooxml2.cxx
@@ -2242,10 +2242,9 @@ static double getAdjustmentValue( const uno::Reference<beans::XPropertySet>& xSe
= comphelper::sequenceToContainer<std::vector<beans::PropertyValue>>(
aGeomPropSeq );
- const OUString sName = "AdjustmentValues";
auto aIterator = std::find_if(
aGeomPropVec.begin(), aGeomPropVec.end(),
- [sName]( const beans::PropertyValue& rValue ) { return rValue.Name == sName; } );
+ []( const beans::PropertyValue& rValue ) { return rValue.Name == "AdjustmentValues"; } );
if (aIterator != aGeomPropVec.end())
{
@@ -2269,19 +2268,17 @@ static bool getScaleXValue(const uno::Reference<beans::XPropertySet>& xSet)
= comphelper::sequenceToContainer<std::vector<beans::PropertyValue>>(
aGeomPropSeq);
- const OUString sName = "TextPath";
auto aIterator = std::find_if(
aGeomPropVec.begin(), aGeomPropVec.end(),
- [sName](const beans::PropertyValue& rValue) { return rValue.Name == sName; });
+ [](const beans::PropertyValue& rValue) { return rValue.Name == "TextPath"; });
if (aIterator != aGeomPropVec.end())
{
uno::Sequence<beans::PropertyValue> aTextPathProperties;
aIterator->Value >>= aTextPathProperties;
- const OUString sScaleX = "ScaleX";
auto aIterator2 = std::find_if(
aTextPathProperties.begin(), aTextPathProperties.end(),
- [sScaleX](const beans::PropertyValue& rValue) { return rValue.Name == sScaleX; });
+ [](const beans::PropertyValue& rValue) { return rValue.Name == "ScaleX"; });
if (aIterator2 != aTextPathProperties.end())
{
diff --git a/sd/qa/unit/misc-tests.cxx b/sd/qa/unit/misc-tests.cxx
index d7fbf74ef58a..6afebe7edc0f 100644
--- a/sd/qa/unit/misc-tests.cxx
+++ b/sd/qa/unit/misc-tests.cxx
@@ -862,7 +862,7 @@ void SdMiscTest::testTdf129898LayerDrawnInSlideshow()
CPPUNIT_ASSERT_MESSAGE("Failed to load file.", xDocShRef.is());
// Verify model
- const OUString sName = "DrawnInSlideshow";
+ static const OUStringLiteral sName = u"DrawnInSlideshow";
SdrLayerAdmin& rLayerAdmin = xDocShRef->GetDoc()->GetLayerAdmin();
SdrLayer* pLayer = rLayerAdmin.GetLayer(sName);
CPPUNIT_ASSERT_MESSAGE("No layer DrawnInSlideshow", pLayer);
diff --git a/sd/source/core/CustomAnimationEffect.cxx b/sd/source/core/CustomAnimationEffect.cxx
index bbff1b9f6fdc..b28b9c512fa3 100644
--- a/sd/source/core/CustomAnimationEffect.cxx
+++ b/sd/source/core/CustomAnimationEffect.cxx
@@ -306,7 +306,7 @@ sal_Int32 CustomAnimationEffect::getNumberOfSubitems( const Any& aTarget, sal_In
Reference< XEnumerationAccess > xEA( xShape, UNO_QUERY_THROW );
Reference< XEnumeration > xEnumeration( xEA->createEnumeration(), UNO_SET_THROW );
css::lang::Locale aLocale;
- const OUString aStrLocaleName( "CharLocale" );
+ static const OUStringLiteral aStrLocaleName( u"CharLocale" );
Reference< XTextRange > xParagraph;
sal_Int32 nPara = 0;
diff --git a/sd/source/filter/eppt/pptx-epptooxml.cxx b/sd/source/filter/eppt/pptx-epptooxml.cxx
index 4028523698ac..13ec3572b701 100644
--- a/sd/source/filter/eppt/pptx-epptooxml.cxx
+++ b/sd/source/filter/eppt/pptx-epptooxml.cxx
@@ -1773,7 +1773,7 @@ bool PowerPointExport::WriteColorSchemes(const FSHelperPtr& pFS, const OUString&
{
uno::Reference<beans::XPropertySetInfo> xPropsInfo = xDocProps->getPropertySetInfo();
- const OUString aGrabBagPropName = "InteropGrabBag";
+ static const OUStringLiteral aGrabBagPropName = u"InteropGrabBag";
if (xPropsInfo.is() && xPropsInfo->hasPropertyByName(aGrabBagPropName))
{
comphelper::SequenceAsHashMap aGrabBag(xDocProps->getPropertyValue(aGrabBagPropName));
diff --git a/sd/source/filter/grf/sdgrffilter.cxx b/sd/source/filter/grf/sdgrffilter.cxx
index c8d9183d152f..32ef963e1ed6 100644
--- a/sd/source/filter/grf/sdgrffilter.cxx
+++ b/sd/source/filter/grf/sdgrffilter.cxx
@@ -242,7 +242,7 @@ bool SdGRFFilter::Export()
beans::PropertyValues aArgs;
TransformItems( SID_SAVEASDOC, *pSet, aArgs );
- const OUString sFilterName( "FilterName" );
+ static const OUStringLiteral sFilterName( u"FilterName" );
OUString sShortName( rGraphicFilter.GetExportFormatShortName( nFilter ) );
bool bFilterNameFound = false;
diff --git a/sd/source/filter/xml/sdxmlwrp.cxx b/sd/source/filter/xml/sdxmlwrp.cxx
index 0e6a1b5ad8f9..4bd5b043e089 100644
--- a/sd/source/filter/xml/sdxmlwrp.cxx
+++ b/sd/source/filter/xml/sdxmlwrp.cxx
@@ -673,7 +673,7 @@ bool SdXMLFilter::Import( ErrCode& nError )
{
try
{
- const OUString aName("~clear~" );
+ static const OUStringLiteral aName(u"~clear~" );
uno::Reference< container::XNameContainer > xGradient( xModelFactory->createInstance( "com.sun.star.drawing.GradientTable" ), uno::UNO_QUERY );
if( xGradient.is() )
xGradient->removeByName( aName );
@@ -711,7 +711,7 @@ bool SdXMLFilter::Import( ErrCode& nError )
if( xModelSet.is() )
{
uno::Reference< beans::XPropertySetInfo > xModelSetInfo( xModelSet->getPropertySetInfo() );
- const OUString sPropName( "BuildId" );
+ static const OUStringLiteral sPropName( u"BuildId" );
OUString sBuildId;
xInfoSet->getPropertyValue(sPropName) >>= sBuildId;
diff --git a/sd/source/ui/animations/CustomAnimationDialog.cxx b/sd/source/ui/animations/CustomAnimationDialog.cxx
index b202ddbfc931..7f0e74f358e6 100644
--- a/sd/source/ui/animations/CustomAnimationDialog.cxx
+++ b/sd/source/ui/animations/CustomAnimationDialog.cxx
@@ -1563,7 +1563,7 @@ CustomAnimationDurationTabPage::CustomAnimationDurationTabPage(weld::Container*
if( !xCurrentPage.is() )
return;
- const OUString aStrIsEmptyPresObj( "IsEmptyPresentationObject" );
+ static const OUStringLiteral aStrIsEmptyPresObj( u"IsEmptyPresentationObject" );
sal_Int32 nShape, nCount = xCurrentPage->getCount();
for( nShape = 0; nShape < nCount; nShape++ )
diff --git a/sd/source/ui/animations/CustomAnimationList.cxx b/sd/source/ui/animations/CustomAnimationList.cxx
index d4fcbb1c852b..3c67edc5c831 100644
--- a/sd/source/ui/animations/CustomAnimationList.cxx
+++ b/sd/source/ui/animations/CustomAnimationList.cxx
@@ -132,13 +132,13 @@ OUString getShapeDescription( const Reference< XShape >& xShape, bool bWithText
Reference<XPropertySetInfo> xInfo(xSet->getPropertySetInfo());
if (xInfo.is())
{
- const OUString aPropName1("Name");
+ static const OUStringLiteral aPropName1(u"Name");
if(xInfo->hasPropertyByName(aPropName1))
xSet->getPropertyValue(aPropName1) >>= aDescription;
bAppendIndex = aDescription.isEmpty();
- const OUString aPropName2("UINameSingular");
+ static const OUStringLiteral aPropName2(u"UINameSingular");
if(xInfo->hasPropertyByName(aPropName2))
xSet->getPropertyValue(aPropName2) >>= aDescription;
}
diff --git a/sd/source/ui/animations/CustomAnimationPane.cxx b/sd/source/ui/animations/CustomAnimationPane.cxx
index 4d1481872ae4..485d4de91e3d 100644
--- a/sd/source/ui/animations/CustomAnimationPane.cxx
+++ b/sd/source/ui/animations/CustomAnimationPane.cxx
@@ -931,7 +931,7 @@ Any CustomAnimationPane::getProperty1Value( sal_Int32 nType, const CustomAnimati
case nPropertyTypeCharHeight:
{
- const OUString aAttributeName( "CharHeight" );
+ static const OUStringLiteral aAttributeName( u"CharHeight" );
Any aValue( pEffect->getProperty( AnimationNodeType::SET, aAttributeName, EValue::To ) );
if( !aValue.hasValue() )
aValue = pEffect->getProperty( AnimationNodeType::ANIMATE, aAttributeName, EValue::To );
@@ -1003,7 +1003,7 @@ bool CustomAnimationPane::setProperty1Value( sal_Int32 nType, const CustomAnimat
case nPropertyTypeCharHeight:
{
- const OUString aAttributeName( "CharHeight" );
+ static const OUStringLiteral aAttributeName( u"CharHeight" );
bEffectChanged = pEffect->setProperty( AnimationNodeType::SET, aAttributeName, EValue::To, rValue );
if( !bEffectChanged )
bEffectChanged = pEffect->setProperty( AnimationNodeType::ANIMATE, aAttributeName, EValue::To, rValue );
diff --git a/sd/source/ui/docshell/docshel3.cxx b/sd/source/ui/docshell/docshel3.cxx
index 0d1b336acd02..b3c142d06750 100644
--- a/sd/source/ui/docshell/docshel3.cxx
+++ b/sd/source/ui/docshell/docshel3.cxx
@@ -297,9 +297,9 @@ void DrawDocShell::Execute( SfxRequest& rReq )
// setting the new language...
if (!aNewLangTxt.isEmpty())
{
- const OUString aSelectionLangPrefix("Current_");
- const OUString aParagraphLangPrefix("Paragraph_");
- const OUString aDocumentLangPrefix("Default_");
+ static const OUStringLiteral aSelectionLangPrefix(u"Current_");
+ static const OUStringLiteral aParagraphLangPrefix(u"Paragraph_");
+ static const OUStringLiteral aDocumentLangPrefix(u"Default_");
bool bSelection = false;
bool bParagraph = false;
@@ -406,7 +406,7 @@ void DrawDocShell::Execute( SfxRequest& rReq )
if (pItem2)
sApplyText = pItem2->GetValue();
- const OUString sSpellingRule("Spelling_");
+ static const OUStringLiteral sSpellingRule(u"Spelling_");
sal_Int32 nPos = 0;
if(-1 != (nPos = sApplyText.indexOf( sSpellingRule )))
{
diff --git a/sd/source/ui/docshell/docshel4.cxx b/sd/source/ui/docshell/docshel4.cxx
index f616e1da2157..8175c00892b3 100644
--- a/sd/source/ui/docshell/docshel4.cxx
+++ b/sd/source/ui/docshell/docshel4.cxx
@@ -698,10 +698,10 @@ void DrawDocShell::GotoBookmark(const OUString& rBookmark)
sal_uInt16 nPageNumber = SDRPAGE_NOTFOUND;
SdrObject* pObj = nullptr;
- const OUString sInteraction( "action?" );
+ static const OUStringLiteral sInteraction( u"action?" );
if ( rBookmark.match( sInteraction ) )
{
- const OUString sJump( "jump=" );
+ static const OUStringLiteral sJump( u"jump=" );
if ( rBookmark.match( sJump, sInteraction.getLength() ) )
{
OUString aDestination( rBookmark.copy( sInteraction.getLength() + sJump.getLength() ) );
diff --git a/sd/source/ui/framework/configuration/ConfigurationTracer.cxx b/sd/source/ui/framework/configuration/ConfigurationTracer.cxx
index 11533fde3e2a..00ddd5ff1b39 100644
--- a/sd/source/ui/framework/configuration/ConfigurationTracer.cxx
+++ b/sd/source/ui/framework/configuration/ConfigurationTracer.cxx
@@ -56,7 +56,7 @@ void ConfigurationTracer::TraceBoundResources (
{
const Sequence<Reference<XResourceId> > aResourceList (
rxConfiguration->getResources(rxResourceId, OUString(), AnchorBindingMode_DIRECT));
- const OUString sIndentation (" ");
+ static const OUStringLiteral sIndentation (u" ");
for (Reference<XResourceId> const & resourceId : aResourceList)
{
OUString sLine (resourceId->getResourceURL());
diff --git a/sd/source/ui/sidebar/RecentlyUsedMasterPages.cxx b/sd/source/ui/sidebar/RecentlyUsedMasterPages.cxx
index bb170c0d845d..07fafaa667c7 100644
--- a/sd/source/ui/sidebar/RecentlyUsedMasterPages.cxx
+++ b/sd/source/ui/sidebar/RecentlyUsedMasterPages.cxx
@@ -118,8 +118,8 @@ void RecentlyUsedMasterPages::LoadPersistentValues()
if ( ! xSet.is())
return;
- const OUString sURLMemberName("URL");
- const OUString sNameMemberName("Name");
+ static const OUStringLiteral sURLMemberName(u"URL");
+ static const OUStringLiteral sNameMemberName(u"Name");
OUString sURL;
OUString sName;
@@ -186,8 +186,8 @@ void RecentlyUsedMasterPages::SavePersistentValues()
xSet->removeByName (rKey);
// Fill it with the URLs of this object.
- const OUString sURLMemberName("URL");
- const OUString sNameMemberName("Name");
+ static const OUStringLiteral sURLMemberName(u"URL");
+ static const OUStringLiteral sNameMemberName(u"Name");
Any aValue;
Reference<lang::XSingleServiceFactory> xChildFactory (
xSet, UNO_QUERY);
diff --git a/sd/source/ui/unoidl/unomodel.cxx b/sd/source/ui/unoidl/unomodel.cxx
index 62b35a5cbfe9..62df5ec84a62 100644
--- a/sd/source/ui/unoidl/unomodel.cxx
+++ b/sd/source/ui/unoidl/unomodel.cxx
@@ -2007,8 +2007,8 @@ void SAL_CALL SdXImpressDocument::render( sal_Int32 nRenderer, const uno::Any& r
// exporting transition effects to pdf
if ( mbImpressDoc && !pPDFExtOutDevData->GetIsExportNotesPages() && pPDFExtOutDevData->GetIsExportTransitionEffects() )
{
- const OUString sEffect( "Effect" );
- const OUString sSpeed ( "Speed" );
+ static const OUStringLiteral sEffect( u"Effect" );
+ static const OUStringLiteral sSpeed ( u"Speed" );
sal_Int32 nTime = 800;
presentation::AnimationSpeed aAs;
if ( xPagePropSet->getPropertySetInfo( )->hasPropertyByName( sSpeed ) )
diff --git a/sd/source/ui/unoidl/unopage.cxx b/sd/source/ui/unoidl/unopage.cxx
index 26db26b2a12e..0eed74c000ab 100644
--- a/sd/source/ui/unoidl/unopage.cxx
+++ b/sd/source/ui/unoidl/unopage.cxx
@@ -405,7 +405,7 @@ SdrObject * SdGenericDrawPage::CreateSdrObject_( const Reference< drawing::XShap
return nullptr;
OUString aType( xShape->getShapeType() );
- const OUString aPrefix( "com.sun.star.presentation." );
+ static const OUStringLiteral aPrefix( u"com.sun.star.presentation." );
if( !aType.startsWith( aPrefix ) )
{
SdrObject* pObj = SvxFmDrawPage::CreateSdrObject_( xShape );
diff --git a/sd/source/ui/view/DocumentRenderer.cxx b/sd/source/ui/view/DocumentRenderer.cxx
index 7d8e8c6fdb25..747521ec210e 100644
--- a/sd/source/ui/view/DocumentRenderer.cxx
+++ b/sd/source/ui/view/DocumentRenderer.cxx
@@ -980,7 +980,7 @@ namespace {
SdPage& rHandoutPage (*rDocument.GetSdPage(0, PageKind::Handout));
Reference< css::beans::XPropertySet > xHandoutPage( rHandoutPage.getUnoPage(), UNO_QUERY );
- const OUString sPageNumber( "Number" );
+ static const OUStringLiteral sPageNumber( u"Number" );
// Collect the page objects of the handout master.
std::vector<SdrPageObj*> aHandoutPageObjects;
diff --git a/sd/source/ui/view/drviewsf.cxx b/sd/source/ui/view/drviewsf.cxx
index 58b5ca0da82a..c9cbbbd0b77d 100644
--- a/sd/source/ui/view/drviewsf.cxx
+++ b/sd/source/ui/view/drviewsf.cxx
@@ -120,13 +120,13 @@ void DrawViewShell::GetCtrlState(SfxItemSet &rSet)
uno::Reference< beans::XPropertySetInfo > xPropInfo( xPropSet->getPropertySetInfo(), uno::UNO_SET_THROW );
form::FormButtonType eButtonType = form::FormButtonType_URL;
- const OUString sButtonType( "ButtonType" );
+ static const OUStringLiteral sButtonType( u"ButtonType" );
if(xPropInfo->hasPropertyByName( sButtonType ) && (xPropSet->getPropertyValue( sButtonType ) >>= eButtonType ) )
{
OUString aString;
// Label
- const OUString sLabel( "Label" );
+ static const OUStringLiteral sLabel( u"Label" );
if(xPropInfo->hasPropertyByName(sLabel))
{
if( xPropSet->getPropertyValue(sLabel) >>= aString )
@@ -134,7 +134,7 @@ void DrawViewShell::GetCtrlState(SfxItemSet &rSet)
}
// URL
- const OUString sTargetURL( "TargetURL" );
+ static const OUStringLiteral sTargetURL( u"TargetURL" );
if(xPropInfo->hasPropertyByName(sTargetURL))
{
if( xPropSet->getPropertyValue(sTargetURL) >>= aString )
@@ -142,7 +142,7 @@ void DrawViewShell::GetCtrlState(SfxItemSet &rSet)
}
// Target
- const OUString sTargetFrame( "TargetFrame" );
+ static const OUStringLiteral sTargetFrame( u"TargetFrame" );
if(xPropInfo->hasPropertyByName(sTargetFrame) )
{
if( xPropSet->getPropertyValue(sTargetFrame) >>= aString )
diff --git a/sdext/source/minimizer/informationdialog.cxx b/sdext/source/minimizer/informationdialog.cxx
index 736802475167..4f823eaee75d 100644
--- a/sdext/source/minimizer/informationdialog.cxx
+++ b/sdext/source/minimizer/informationdialog.cxx
@@ -259,7 +259,7 @@ void InformationDialog::InitDialog()
aURL.Complete = maSaveAsURL;
xURLTransformer->parseSmart( aURL, OUString() );
- const OUString sFileProtocol( "file:///" );
+ static const OUStringLiteral sFileProtocol( u"file:///" );
aPresentationURL.Complete = sFileProtocol + aURL.Name;
aTitle = xURLTransformer->getPresentation( aPresentationURL, false );
@@ -268,8 +268,8 @@ void InformationDialog::InitDialog()
}
OUString aInfoString( getString( eInfoString ) );
- const OUString aOldSizePlaceholder( "%OLDFILESIZE" );
- const OUString aNewSizePlaceholder( "%NEWFILESIZE" );
+ static const OUStringLiteral aOldSizePlaceholder( u"%OLDFILESIZE" );
+ static const OUStringLiteral aNewSizePlaceholder( u"%NEWFILESIZE" );
const OUString aTitlePlaceholder( !aTitle.isEmpty() ? OUString("%TITLE" )
: OUString("'%TITLE'") );
diff --git a/sdext/source/presenter/PresenterController.cxx b/sdext/source/presenter/PresenterController.cxx
index 58f423def0aa..e1ddf110c895 100644
--- a/sdext/source/presenter/PresenterController.cxx
+++ b/sdext/source/presenter/PresenterController.cxx
@@ -317,9 +317,9 @@ void PresenterController::UpdatePaneTitles()
return;
// Get placeholders and their values.
- const OUString sCurrentSlideNumberPlaceholder ("CURRENT_SLIDE_NUMBER");
- const OUString sCurrentSlideNamePlaceholder ("CURRENT_SLIDE_NAME");
- const OUString sSlideCountPlaceholder ("SLIDE_COUNT");
+ static const OUStringLiteral sCurrentSlideNumberPlaceholder (u"CURRENT_SLIDE_NUMBER");
+ static const OUStringLiteral sCurrentSlideNamePlaceholder (u"CURRENT_SLIDE_NAME");
+ static const OUStringLiteral sSlideCountPlaceholder (u"SLIDE_COUNT");
// Get string for slide count.
OUString sSlideCount ("---");
diff --git a/sdext/source/presenter/PresenterSlideSorter.cxx b/sdext/source/presenter/PresenterSlideSorter.cxx
index 1f8adc555693..493e33a39ce9 100644
--- a/sdext/source/presenter/PresenterSlideSorter.cxx
+++ b/sdext/source/presenter/PresenterSlideSorter.cxx
@@ -1605,7 +1605,7 @@ OUString PresenterSlideSorter::MouseOverManager::GetFittingText (
double nBestWidth (0);
OUString sBestCandidate;
sal_Int32 nLength (round(rsText.getLength() * nMaximalWidth / nTextWidth));
- const OUString sEllipses ("...");
+ static const OUStringLiteral sEllipses (u"...");
while (true)
{
const OUString sCandidate (rsText.subView(0,nLength) + sEllipses);
diff --git a/sfx2/source/appl/sfxhelp.cxx b/sfx2/source/appl/sfxhelp.cxx
index e16d5cab7865..8df199b55649 100644
--- a/sfx2/source/appl/sfxhelp.cxx
+++ b/sfx2/source/appl/sfxhelp.cxx
@@ -206,7 +206,7 @@ static OUString const & HelpLocaleString()
if (!aLocaleStr.isEmpty())
return aLocaleStr;
- const OUString aEnglish("en-US");
+ static const OUStringLiteral aEnglish(u"en-US");
// detect installed locale
aLocaleStr = utl::ConfigManager::getUILocale();
diff --git a/sfx2/source/dialog/dinfdlg.cxx b/sfx2/source/dialog/dinfdlg.cxx
index 5e63fa018c00..c08c0dfa5cd8 100644
--- a/sfx2/source/dialog/dinfdlg.cxx
+++ b/sfx2/source/dialog/dinfdlg.cxx
@@ -150,7 +150,7 @@ OUString ConvertDateTime_Impl( const OUString& rName,
{
Date aD(uDT);
tools::Time aT(uDT);
- const OUString aDelim( ", " );
+ static const OUStringLiteral aDelim( u", " );
OUString aStr = rWrapper.getDate( aD )
+ aDelim
+ rWrapper.getTime( aT );
diff --git a/sfx2/source/dialog/mailmodel.cxx b/sfx2/source/dialog/mailmodel.cxx
index 87ad643da40d..5e5d079fd934 100644
--- a/sfx2/source/dialog/mailmodel.cxx
+++ b/sfx2/source/dialog/mailmodel.cxx
@@ -462,7 +462,7 @@ SfxMailModel::SaveResult SfxMailModel::SaveDocumentAsFormat(
OUString aFileURL = aFilePathObj.GetMainURL( INetURLObject::DecodeMechanism::NONE );
sal_Int32 nNumArgs(0);
- const OUString aPasswordPropName( "Password" );
+ static const OUStringLiteral aPasswordPropName( u"Password" );
css::uno::Sequence< css::beans::PropertyValue > aArgs( ++nNumArgs );
aArgs[nNumArgs-1].Name = "FilterName";
aArgs[nNumArgs-1].Value <<= aFilterName;
diff --git a/sfx2/source/doc/docmacromode.cxx b/sfx2/source/doc/docmacromode.cxx
index 6bc0af19f2c5..0e1ad424831e 100644
--- a/sfx2/source/doc/docmacromode.cxx
+++ b/sfx2/source/doc/docmacromode.cxx
@@ -327,8 +327,8 @@ namespace sfx2
bHasMacroLib = false;
else
{
- const OUString aStdLibName( "Standard" );
- const OUString aVBAProject( "VBAProject" );
+ static const OUStringLiteral aStdLibName( u"Standard" );
+ static const OUStringLiteral aVBAProject( u"VBAProject" );
const Sequence< OUString > aElements = xContainer->getElementNames();
for( const OUString& aElement : aElements )
{
diff --git a/sfx2/source/doc/doctemplates.cxx b/sfx2/source/doc/doctemplates.cxx
index 4c1e99bde06d..ae7d21d2728f 100644
--- a/sfx2/source/doc/doctemplates.cxx
+++ b/sfx2/source/doc/doctemplates.cxx
@@ -543,8 +543,8 @@ void SfxDocTplService_Impl::getDirList()
maTemplateDirs = Sequence< OUString >( nCount );
uno::Reference< util::XMacroExpander > xExpander = util::theMacroExpander::get(mxContext);
- const OUString aPrefix(
- "vnd.sun.star.expand:" );
+ static const OUStringLiteral aPrefix(
+ u"vnd.sun.star.expand:" );
sal_Int32 nIdx{ 0 };
for (auto& rTemplateDir : maTemplateDirs)
@@ -1950,7 +1950,7 @@ bool SfxDocTplService_Impl::addTemplate( const OUString& rGroupName,
Content aResultContent;
if ( Content::create( aNewTemplateTargetURL, xEnv, comphelper::getProcessComponentContext(), aResultContent ) )
{
- const OUString aPropertyName( "IsReadOnly" );
+ static const OUStringLiteral aPropertyName( u"IsReadOnly" );
uno::Any aProperty;
bool bReadOnly = false;
if ( getProperty( aResultContent, aPropertyName, aProperty ) && ( aProperty >>= bReadOnly ) && bReadOnly )
diff --git a/sfx2/source/doc/doctemplateslocal.cxx b/sfx2/source/doc/doctemplateslocal.cxx
index 41561925bd6b..5a55df72a45a 100644
--- a/sfx2/source/doc/doctemplateslocal.cxx
+++ b/sfx2/source/doc/doctemplateslocal.cxx
@@ -58,8 +58,8 @@ void DocTemplLocaleHelper::WriteGroupLocalizationSequence( const uno::Reference<
xWriterHandler->setOutputStream( xOutStream );
- const OUString aCDATAString( "CDATA" );
- const OUString aWhiteSpace( " " );
+ static const OUStringLiteral aCDATAString( u"CDATA" );
+ static const OUStringLiteral aWhiteSpace( u" " );
// write the namespace
rtl::Reference<::comphelper::AttributeList> pRootAttrList = new ::comphelper::AttributeList;
diff --git a/sfx2/source/doc/guisaveas.cxx b/sfx2/source/doc/guisaveas.cxx
index 9def55f25e67..e2a2209e7b38 100644
--- a/sfx2/source/doc/guisaveas.cxx
+++ b/sfx2/source/doc/guisaveas.cxx
@@ -648,13 +648,13 @@ sal_Int8 ModelData_Impl::CheckStateForSave()
// check acceptable entries for media descriptor
::comphelper::SequenceAsHashMap aAcceptedArgs;
- const OUString aVersionCommentString("VersionComment");
- const OUString aAuthorString("Author");
- const OUString aDontTerminateEdit("DontTerminateEdit");
- const OUString aInteractionHandlerString("InteractionHandler");
- const OUString aStatusIndicatorString("StatusIndicator");
- const OUString aFailOnWarningString("FailOnWarning");
- const OUString aNoFileSync("NoFileSync");
+ static const OUStringLiteral aVersionCommentString(u"VersionComment");
+ static const OUStringLiteral aAuthorString(u"Author");
+ static const OUStringLiteral aDontTerminateEdit(u"DontTerminateEdit");
+ static const OUStringLiteral aInteractionHandlerString(u"InteractionHandler");
+ static const OUStringLiteral aStatusIndicatorString(u"StatusIndicator");
+ static const OUStringLiteral aFailOnWarningString(u"FailOnWarning");
+ static const OUStringLiteral aNoFileSync(u"NoFileSync");
if ( GetMediaDescr().find( aVersionCommentString ) != GetMediaDescr().end() )
aAcceptedArgs[ aVersionCommentString ] = GetMediaDescr()[ aVersionCommentString ];
diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx
index 653ea8877a94..f303bc6e5e97 100644
--- a/sfx2/source/doc/objstor.cxx
+++ b/sfx2/source/doc/objstor.cxx
@@ -723,7 +723,7 @@ bool SfxObjectShell::DoLoad( SfxMedium *pMed )
&& !bPdfiumImport)
{
uno::Reference < beans::XPropertySet > xSet( GetModel(), uno::UNO_QUERY );
- const OUString sLockUpdates("LockUpdates");
+ static const OUStringLiteral sLockUpdates(u"LockUpdates");
bool bSetProperty = true;
try
{
@@ -765,9 +765,9 @@ bool SfxObjectShell::DoLoad( SfxMedium *pMed )
css::uno::Reference < XPropertySetInfo > xProps = aContent.getProperties();
if ( xProps.is() )
{
- const OUString aAuthor( "Author" );
- const OUString aKeywords( "Keywords" );
- const OUString aSubject( "Subject" );
+ static const OUStringLiteral aAuthor( u"Author" );
+ static const OUStringLiteral aKeywords( u"Keywords" );
+ static const OUStringLiteral aSubject( u"Subject" );
Any aAny;
OUString aValue;
uno::Reference<document::XDocumentPropertiesSupplier> xDPS(
@@ -1029,8 +1029,8 @@ bool SfxObjectShell::DoSave()
if ( !xTmpStorage.is() )
throw uno::RuntimeException();
- const OUString aBasicStorageName( "Basic" );
- const OUString aDialogsStorageName( "Dialogs" );
+ static const OUStringLiteral aBasicStorageName( u"Basic" );
+ static const OUStringLiteral aDialogsStorageName( u"Dialogs" );
if ( GetMedium()->GetStorage()->hasByName( aBasicStorageName ) )
GetMedium()->GetStorage()->copyElementTo( aBasicStorageName, xTmpStorage, aBasicStorageName );
if ( GetMedium()->GetStorage()->hasByName( aDialogsStorageName ) )
@@ -1464,7 +1464,7 @@ bool SfxObjectShell::SaveTo_Impl
if ( aVersions.hasElements() )
{
// copy the version streams
- const OUString aVersionsName( "Versions" );
+ static const OUStringLiteral aVersionsName( u"Versions" );
uno::Reference< embed::XStorage > xNewVerStor = xMedStorage->openStorageElement(
aVersionsName,
embed::ElementModes::READWRITE );
@@ -1701,9 +1701,9 @@ bool SfxObjectShell::SaveTo_Impl
css::uno::Reference < XPropertySetInfo > xProps = aContent.getProperties();
if ( xProps.is() )
{
- const OUString aAuthor( "Author" );
- const OUString aKeywords( "Keywords" );
- const OUString aSubject( "Subject" );
+ static const OUStringLiteral aAuthor( u"Author" );
+ static const OUStringLiteral aKeywords( u"Keywords" );
+ static const OUStringLiteral aSubject( u"Subject" );
uno::Reference<document::XDocumentPropertiesSupplier> xDPS(
GetModel(), uno::UNO_QUERY_THROW);
@@ -2205,7 +2205,7 @@ bool SfxObjectShell::ImportFrom(SfxMedium& rMedium,
css::uno::Sequence < css::beans::PropertyValue > aArgs ( lDescriptor.getLength() );
css::beans::PropertyValue * pNewValue = aArgs.getArray();
const css::beans::PropertyValue * pOldValue = lDescriptor.getConstArray();
- const OUString sInputStream ( "InputStream" );
+ static const OUStringLiteral sInputStream ( u"InputStream" );
bool bHasInputStream = false;
bool bHasBaseURL = false;
@@ -2385,8 +2385,8 @@ bool SfxObjectShell::ExportTo( SfxMedium& rMedium )
css::beans::PropertyValue * pNewValue = aArgs.getArray();
// put in the REAL file name, and copy all PropertyValues
- const OUString sOutputStream ( "OutputStream" );
- const OUString sStream ( "StreamForOutput" );
+ static const OUStringLiteral sOutputStream ( u"OutputStream" );
+ static const OUStringLiteral sStream ( u"StreamForOutput" );
bool bHasOutputStream = false;
bool bHasStream = false;
bool bHasBaseURL = false;
@@ -3346,7 +3346,7 @@ static bool StoragesOfUnknownMediaTypeAreCopied_Impl( const uno::Reference< embe
if ( xSource->isStorageElement( rSubElement ) )
{
OUString aMediaType;
- const OUString aMediaTypePropName( "MediaType" );
+ static const OUStringLiteral aMediaTypePropName( u"MediaType" );
bool bGotMediaType = false;
try
@@ -3483,7 +3483,7 @@ bool SfxObjectShell::CopyStoragesOfUnknownMediaType(const uno::Reference< embed:
else if (xSource->isStorageElement(rSubElement))
{
OUString aMediaType;
- const OUString aMediaTypePropName( "MediaType" );
+ static const OUStringLiteral aMediaTypePropName( u"MediaType" );
bool bGotMediaType = false;
try
diff --git a/sfx2/source/doc/sfxbasemodel.cxx b/sfx2/source/doc/sfxbasemodel.cxx
index 5971b7729413..fa5d405dfdd0 100644
--- a/sfx2/source/doc/sfxbasemodel.cxx
+++ b/sfx2/source/doc/sfxbasemodel.cxx
@@ -2692,7 +2692,7 @@ void SfxBaseModel::loadCmisProperties( )
utl::UCBContentHelper::getDefaultCommandEnvironment(),
comphelper::getProcessComponentContext() );
Reference < beans::XPropertySetInfo > xProps = aContent.getProperties();
- const OUString aCmisProps( "CmisProperties" );
+ static const OUStringLiteral aCmisProps( u"CmisProperties" );
if ( xProps->hasPropertyByName( aCmisProps ) )
{
Sequence< document::CmisProperty> aCmisProperties;
@@ -2796,7 +2796,7 @@ void SfxBaseModel::Notify( SfxBroadcaster& rBC ,
&& m_pData->m_pObjectShell->GetCreateMode() != SfxObjectCreateMode::EMBEDDED )
{
Reference< embed::XStorage > xConfigStorage;
- const OUString aUIConfigFolderName( "Configurations2" );
+ static const OUStringLiteral aUIConfigFolderName( u"Configurations2" );
xConfigStorage = getDocumentSubStorage( aUIConfigFolderName, embed::ElementModes::READWRITE );
if ( !xConfigStorage.is() )
@@ -2965,7 +2965,7 @@ void SfxBaseModel::impl_store( const OUString& sURL
// this is the same file URL as the current document location, try to use storeOwn if possible
::comphelper::SequenceAsHashMap aArgHash( seqArguments );
- const OUString aFilterString( "FilterName" );
+ static const OUStringLiteral aFilterString( u"FilterName" );
const OUString aFilterName( aArgHash.getUnpackedValueOrDefault( aFilterString, OUString() ) );
if ( !aFilterName.isEmpty() )
{
@@ -3551,7 +3551,7 @@ Reference< ui::XUIConfigurationManager2 > SfxBaseModel::getUIConfigurationManage
xConfigStorage = getDocumentSubStorage( aUIConfigFolderName, embed::ElementModes::READWRITE );
if ( xConfigStorage.is() )
{
- const OUString aMediaTypeProp( "MediaType" );
+ static const OUStringLiteral aMediaTypeProp( u"MediaType" );
OUString aMediaType;
Reference< beans::XPropertySet > xPropSet( xConfigStorage, UNO_QUERY );
Any a = xPropSet->getPropertyValue( aMediaTypeProp );
@@ -3936,7 +3936,7 @@ OUString SAL_CALL SfxBaseModel::getTitle()
= aContent.getProperties();
if ( xProps.is() )
{
- const OUString aServerTitle( "TitleOnServer" );
+ static const OUStringLiteral aServerTitle( u"TitleOnServer" );
if ( xProps->hasPropertyByName( aServerTitle ) )
{
Any aAny = aContent.getPropertyValue( aServerTitle );
diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx
index 170ce543da3b..360ed8f75adb 100644
--- a/sfx2/source/view/viewfrm.cxx
+++ b/sfx2/source/view/viewfrm.cxx
@@ -2811,7 +2811,7 @@ void SfxViewFrame::MiscExec_Impl( SfxRequest& rReq )
case SID_RECORDMACRO :
{
// try to find any active recorder on this frame
- const OUString sProperty("DispatchRecorderSupplier");
+ static const OUStringLiteral sProperty(u"DispatchRecorderSupplier");
css::uno::Reference< css::frame::XFrame > xFrame =
GetFrame().GetFrameInterface();
@@ -2890,7 +2890,7 @@ void SfxViewFrame::MiscExec_Impl( SfxRequest& rReq )
if ( xLayoutManager.is() )
{
- const OUString aStatusbarResString( "private:resource/statusbar/statusbar" );
+ static const OUStringLiteral aStatusbarResString( u"private:resource/statusbar/statusbar" );
// Evaluate parameter.
const SfxBoolItem* pShowItem = rReq.GetArg<SfxBoolItem>(rReq.GetSlot());
bool bShow( true );
diff --git a/starmath/source/edit.cxx b/starmath/source/edit.cxx
index fb9cee21447e..d06c1dbf4bab 100644
--- a/starmath/source/edit.cxx
+++ b/starmath/source/edit.cxx
@@ -801,7 +801,7 @@ void SmEditWindow::SelPrevMark()
sal_Int32 nPara = eSelection.nStartPara;
sal_Int32 nMax = eSelection.nStartPos;
OUString aText(pEditEngine->GetText(nPara));
- const OUString aMark("<?>");
+ static const OUStringLiteral aMark(u"<?>");
sal_Int32 nPos;
while ( (nPos = aText.lastIndexOf(aMark, nMax)) < 0 )
diff --git a/starmath/source/mathml/mathmlimport.cxx b/starmath/source/mathml/mathmlimport.cxx
index f224f14f77b2..57787dc5404a 100644
--- a/starmath/source/mathml/mathmlimport.cxx
+++ b/starmath/source/mathml/mathmlimport.cxx
@@ -2641,9 +2641,9 @@ void SmXMLImport::SetConfigurationSettings(const Sequence<PropertyValue>& aConfP
if (!xInfo.is())
return;
- const OUString sFormula("Formula");
- const OUString sBasicLibraries("BasicLibraries");
- const OUString sDialogLibraries("DialogLibraries");
+ static const OUStringLiteral sFormula(u"Formula");
+ static const OUStringLiteral sBasicLibraries(u"BasicLibraries");
+ static const OUStringLiteral sDialogLibraries(u"DialogLibraries");
for (const PropertyValue& rValue : aConfProps)
{
if (rValue.Name != sFormula && rValue.Name != sBasicLibraries
diff --git a/svl/source/numbers/zformat.cxx b/svl/source/numbers/zformat.cxx
index f74b178a0419..32fd79aea59b 100644
--- a/svl/source/numbers/zformat.cxx
+++ b/svl/source/numbers/zformat.cxx
@@ -1726,8 +1726,8 @@ short SvNumberformat::ImpNextSymbol(OUStringBuffer& rString,
break;
default:
{
- const OUString aNatNum("NATNUM");
- const OUString aDBNum("DBNUM");
+ static const OUStringLiteral aNatNum(u"NATNUM");
+ static const OUStringLiteral aDBNum(u"DBNUM");
const OUString aBufStr( rString.toString());
sal_Int32 nNatNumNum;
sal_Int32 nDBNum;
diff --git a/svtools/source/config/extcolorcfg.cxx b/svtools/source/config/extcolorcfg.cxx
index 1fa91e645dc2..45bf2a1f18fe 100644
--- a/svtools/source/config/extcolorcfg.cxx
+++ b/svtools/source/config/extcolorcfg.cxx
@@ -306,7 +306,7 @@ void ExtendedColorConfig_Impl::Load(const OUString& rScheme)
void ExtendedColorConfig_Impl::FillComponentColors(const uno::Sequence < OUString >& _rComponents,const TDisplayNames& _rDisplayNames)
{
- const OUString sColorEntries("/Entries");
+ static const OUStringLiteral sColorEntries(u"/Entries");
for(OUString const & component : _rComponents)
{
OUString sComponentName = component.copy(component.lastIndexOf('/')+1);
@@ -317,7 +317,7 @@ void ExtendedColorConfig_Impl::FillComponentColors(const uno::Sequence < OUStrin
uno::Sequence < OUString > aColorNames = GetPropertyNames(sEntry);
uno::Sequence < OUString > aDefaultColorNames = aColorNames;
- const OUString sColor("/Color");
+ static const OUStringLiteral sColor(u"/Color");
lcl_addString(aColorNames,sColor);
lcl_addString(aDefaultColorNames,u"/DefaultColor");
uno::Sequence< uno::Any > aColors = GetProperties( aColorNames );
@@ -383,11 +383,11 @@ void ExtendedColorConfig_Impl::ImplCommit()
{
if ( m_sLoadedScheme.isEmpty() )
return;
- const OUString sColorEntries("Entries");
- const OUString sColor("/Color");
+ static const OUStringLiteral sColorEntries(u"Entries");
+ static const OUStringLiteral sColor(u"/Color");
OUString sBase = "ExtendedColorScheme/ColorSchemes/"
+ m_sLoadedScheme;
- const OUString s_sSep("/");
+ static const OUStringLiteral s_sSep(u"/");
for (auto const& configValue : m_aConfigValues)
{
diff --git a/svtools/source/dialogs/colrdlg.cxx b/svtools/source/dialogs/colrdlg.cxx
index ea448ffd86e2..dbd7bd143ce9 100644
--- a/svtools/source/dialogs/colrdlg.cxx
+++ b/svtools/source/dialogs/colrdlg.cxx
@@ -58,7 +58,7 @@ short SvColorDialog::Execute(weld::Window* pParent)
short ret = 0;
try
{
- const OUString sColor( "Color" );
+ static const OUStringLiteral sColor( u"Color" );
Reference< XComponentContext > xContext( ::comphelper::getProcessComponentContext() );
Reference<css::awt::XWindow> xParent;
diff --git a/svtools/source/filter/exportdialog.cxx b/svtools/source/filter/exportdialog.cxx
index 5f062bf14803..86fd9fdfeff3 100644
--- a/svtools/source/filter/exportdialog.cxx
+++ b/svtools/source/filter/exportdialog.cxx
@@ -192,8 +192,8 @@ uno::Sequence< beans::PropertyValue > ExportDialog::GetFilterData( bool bUpdateC
pFilterOptions = new FilterConfigItem( &aFilterData );
}
- const OUString sLogicalWidth("LogicalWidth");
- const OUString sLogicalHeight("LogicalHeight");
+ static const OUStringLiteral sLogicalWidth(u"LogicalWidth");
+ static const OUStringLiteral sLogicalHeight(u"LogicalHeight");
if ( mbIsPixelFormat )
{
pFilterOptions->WriteInt32("PixelWidth", maSize.Width );
diff --git a/svx/qa/unit/gallery/test_gallery.cxx b/svx/qa/unit/gallery/test_gallery.cxx
index 641101e11a50..072361232dc7 100644
--- a/svx/qa/unit/gallery/test_gallery.cxx
+++ b/svx/qa/unit/gallery/test_gallery.cxx
@@ -69,7 +69,7 @@ void GalleryObjTest::TestCreateTheme()
std::unique_ptr<Gallery> pGallery(new Gallery(aGalleryURL));
CPPUNIT_ASSERT_MESSAGE("Could not create gallery instance", (pGallery != nullptr));
- const OUString myThemeName = "addytesttheme";
+ static const OUStringLiteral myThemeName = u"addytesttheme";
CPPUNIT_ASSERT_MESSAGE("Could not create theme", pGallery->CreateTheme(myThemeName));
CPPUNIT_ASSERT_MESSAGE("Could not find theme", pGallery->HasTheme(myThemeName));
@@ -94,7 +94,7 @@ void GalleryObjTest::TestDeleteTheme()
std::unique_ptr<Gallery> pGallery(new Gallery(aGalleryURL));
CPPUNIT_ASSERT_MESSAGE("Could not create gallery instance", (pGallery != nullptr));
- const OUString myThemeName = "addytesttheme";
+ static const OUStringLiteral myThemeName = u"addytesttheme";
CPPUNIT_ASSERT_MESSAGE("Could not create theme", pGallery->CreateTheme(myThemeName));
CPPUNIT_ASSERT_MESSAGE("Could not find theme", pGallery->HasTheme(myThemeName));
@@ -130,12 +130,12 @@ void GalleryObjTest::TestSetThemeName()
std::unique_ptr<Gallery> pGallery(new Gallery(aGalleryURL));
CPPUNIT_ASSERT_MESSAGE("Could not create gallery instance", (pGallery != nullptr));
- const OUString myThemeName = "addytesttheme";
+ static const OUStringLiteral myThemeName = u"addytesttheme";
CPPUNIT_ASSERT_MESSAGE("Could not create theme", pGallery->CreateTheme(myThemeName));
CPPUNIT_ASSERT_MESSAGE("Could not find theme", pGallery->HasTheme(myThemeName));
// Rename theme
- const OUString myNewThemeName = "addytestthemenew";
+ static const OUStringLiteral myNewThemeName = u"addytestthemenew";
pGallery->RenameTheme(myThemeName, myNewThemeName);
CPPUNIT_ASSERT_MESSAGE("Could not rename theme because old theme name still exists",
!pGallery->HasTheme(myThemeName));
@@ -298,7 +298,7 @@ void GalleryObjTest::TestInsertGalleryObject()
std::unique_ptr<Gallery> pGallery(new Gallery(aGalleryURL));
CPPUNIT_ASSERT_MESSAGE("Could not create gallery instance", (pGallery != nullptr));
- const OUString myThemeName = "addytesttheme";
+ static const OUStringLiteral myThemeName = u"addytesttheme";
CPPUNIT_ASSERT_MESSAGE("Could not create theme", pGallery->CreateTheme(myThemeName));
CPPUNIT_ASSERT_MESSAGE("Could not find theme", pGallery->HasTheme(myThemeName));
@@ -343,7 +343,7 @@ void GalleryObjTest::TestRemoveGalleryObject()
std::unique_ptr<Gallery> pGallery(new Gallery(aGalleryURL));
CPPUNIT_ASSERT_MESSAGE("Could not create gallery instance", (pGallery != nullptr));
- const OUString myThemeName = "addytesttheme";
+ static const OUStringLiteral myThemeName = u"addytesttheme";
CPPUNIT_ASSERT_MESSAGE("Could not create theme", pGallery->CreateTheme(myThemeName));
CPPUNIT_ASSERT_MESSAGE("Could not find theme", pGallery->HasTheme(myThemeName));
@@ -398,7 +398,7 @@ void GalleryObjTest::TestChangePositionGalleryObject()
std::unique_ptr<Gallery> pGallery(new Gallery(aGalleryURL));
CPPUNIT_ASSERT_MESSAGE("Could not create gallery instance", (pGallery != nullptr));
- const OUString myThemeName = "addytesttheme";
+ static const OUStringLiteral myThemeName = u"addytesttheme";
CPPUNIT_ASSERT_MESSAGE("Could not create theme", pGallery->CreateTheme(myThemeName));
CPPUNIT_ASSERT_MESSAGE("Could not find theme", pGallery->HasTheme(myThemeName));
diff --git a/svx/source/core/graphichelper.cxx b/svx/source/core/graphichelper.cxx
index 2c97da419c98..997644b6260a 100644
--- a/svx/source/core/graphichelper.cxx
+++ b/svx/source/core/graphichelper.cxx
@@ -398,7 +398,7 @@ void GraphicHelper::SaveShapeAsGraphic(weld::Window* pParent, const Reference<
// populate filter dialog filter list and select default filter to match graphic mime type
GraphicFilter& rGraphicFilter = GraphicFilter::GetGraphicFilter();
- const OUString aDefaultMimeType("image/png");
+ static const OUStringLiteral aDefaultMimeType(u"image/png");
OUString aDefaultFormatName;
sal_uInt16 nCount = rGraphicFilter.GetExportFormatCount();
diff --git a/svx/source/customshapes/EnhancedCustomShape2d.cxx b/svx/source/customshapes/EnhancedCustomShape2d.cxx
index c33031a86605..736634c42205 100644
--- a/svx/source/customshapes/EnhancedCustomShape2d.cxx
+++ b/svx/source/customshapes/EnhancedCustomShape2d.cxx
@@ -554,7 +554,7 @@ void EnhancedCustomShape2d::ApplyShapeAttributes( const SdrCustomShapeGeometryIt
nCoordWidthG = std::abs( aViewBox.Width );
nCoordHeightG = std::abs( aViewBox.Height);
}
- const OUString sPath( "Path" );
+ static const OUStringLiteral sPath( u"Path" );
// Path/Coordinates
diff --git a/svx/source/dialog/svxbmpnumvalueset.cxx b/svx/source/dialog/svxbmpnumvalueset.cxx
index b848fa63672b..a1deb9dcaceb 100644
--- a/svx/source/dialog/svxbmpnumvalueset.cxx
+++ b/svx/source/dialog/svxbmpnumvalueset.cxx
@@ -213,7 +213,7 @@ void SvxNumValueSet::UserDraw( const UserDrawEvent& rUDEvt )
aOrgRect.TopLeft(), aRectSize,
*pVDev );
// Now comes the text
- const OUString sValue("Value");
+ static const OUStringLiteral sValue(u"Value");
if( NumberingPageType::SINGLENUM == ePageType ||
NumberingPageType::BULLET == ePageType )
{
diff --git a/svx/source/fmcomp/gridcols.cxx b/svx/source/fmcomp/gridcols.cxx
index 1e44ece8973d..e937c08a6b33 100644
--- a/svx/source/fmcomp/gridcols.cxx
+++ b/svx/source/fmcomp/gridcols.cxx
@@ -76,8 +76,8 @@ namespace
sal_Int32 getColumnTypeByModelName(const OUString& aModelName)
{
- const OUString aModelPrefix("com.sun.star.form.component.");
- const OUString aCompatibleModelPrefix("stardiv.one.form.component.");
+ static const OUStringLiteral aModelPrefix(u"com.sun.star.form.component.");
+ static const OUStringLiteral aCompatibleModelPrefix(u"stardiv.one.form.component.");
sal_Int32 nTypeId = -1;
if (aModelName == FM_COMPONENT_EDIT)
diff --git a/svx/source/form/formcontrolfactory.cxx b/svx/source/form/formcontrolfactory.cxx
index de1e56303aab..780171aa5cf9 100644
--- a/svx/source/form/formcontrolfactory.cxx
+++ b/svx/source/form/formcontrolfactory.cxx
@@ -449,7 +449,7 @@ namespace svxform
case FormComponentType::IMAGEBUTTON:
case FormComponentType::IMAGECONTROL:
{
- const OUString sScaleModeProperty( "ScaleMode" );
+ static const OUStringLiteral sScaleModeProperty( u"ScaleMode" );
if ( xPSI->hasPropertyByName( sScaleModeProperty ) )
_rxControlModel->setPropertyValue( sScaleModeProperty, makeAny( ImageScaleMode::ISOTROPIC ) );
}
diff --git a/svx/source/mnuctrls/smarttagmenu.cxx b/svx/source/mnuctrls/smarttagmenu.cxx
index 6010750bfee9..fda61882a42b 100644
--- a/svx/source/mnuctrls/smarttagmenu.cxx
+++ b/svx/source/mnuctrls/smarttagmenu.cxx
@@ -184,7 +184,7 @@ void SmartTagMenuController::FillMenu()
if ( 0 < pVCLMenu->GetItemCount() )
{
- const OUString aCommand = ".uno:AutoCorrectDlg?OpenSmartTag:bool=true";
+ static const OUStringLiteral aCommand = u".uno:AutoCorrectDlg?OpenSmartTag:bool=true";
pVCLMenu->InsertSeparator();
auto aProperties = vcl::CommandInfoProvider::GetCommandProperties(aCommand, m_aModuleName);
pVCLMenu->InsertItem( nMenuId, vcl::CommandInfoProvider::GetPopupLabelForCommand(aProperties) );
diff --git a/svx/source/svdraw/svdoashp.cxx b/svx/source/svdraw/svdoashp.cxx
index fd5b0c3082c5..0db559b15eea 100644
--- a/svx/source/svdraw/svdoashp.cxx
+++ b/svx/source/svdraw/svdoashp.cxx
@@ -442,7 +442,7 @@ const SdrObject* SdrObjCustomShape::GetSdrObjectShadowFromCustomShape() const
bool SdrObjCustomShape::IsTextPath() const
{
- const OUString sTextPath( "TextPath" );
+ static const OUStringLiteral sTextPath( u"TextPath" );
bool bTextPathOn = false;
const SdrCustomShapeGeometryItem& rGeometryItem = GetMergedItem( SDRATTR_CUSTOMSHAPE_GEOMETRY );
const Any* pAny = rGeometryItem.GetPropertyValueByName( sTextPath, sTextPath );
@@ -455,7 +455,7 @@ bool SdrObjCustomShape::UseNoFillStyle() const
{
bool bRet = false;
OUString sShapeType;
- const OUString sType( "Type" );
+ static const OUStringLiteral sType( u"Type" );
const SdrCustomShapeGeometryItem& rGeometryItem( GetMergedItem( SDRATTR_CUSTOMSHAPE_GEOMETRY ) );
const Any* pAny = rGeometryItem.GetPropertyValueByName( sType );
if ( pAny )
@@ -820,7 +820,7 @@ void SdrObjCustomShape::MergeDefaultAttributes( const OUString* pType )
{
PropertyValue aPropVal;
OUString sShapeType;
- const OUString sType( "Type" );
+ static const OUStringLiteral sType( u"Type" );
SdrCustomShapeGeometryItem aGeometryItem( GetMergedItem( SDRATTR_CUSTOMSHAPE_GEOMETRY ) );
if ( pType && !pType->isEmpty() )
{
@@ -852,7 +852,7 @@ void SdrObjCustomShape::MergeDefaultAttributes( const OUString* pType )
// AdjustmentValues
- const OUString sAdjustmentValues( "AdjustmentValues" );
+ static const OUStringLiteral sAdjustmentValues( u"AdjustmentValues" );
const Any* pAny = aGeometryItem.GetPropertyValueByName( sAdjustmentValues );
if ( pAny )
*pAny >>= seqAdjustmentValues;
@@ -888,7 +888,7 @@ void SdrObjCustomShape::MergeDefaultAttributes( const OUString* pType )
// Coordsize
- const OUString sViewBox( "ViewBox" );
+ static const OUStringLiteral sViewBox( u"ViewBox" );
const Any* pViewBox = aGeometryItem.GetPropertyValueByName( sViewBox );
css::awt::Rectangle aViewBox;
if ( !pViewBox || !(*pViewBox >>= aViewBox ) )
@@ -905,12 +905,12 @@ void SdrObjCustomShape::MergeDefaultAttributes( const OUString* pType )
}
}
- const OUString sPath( "Path" );
+ static const OUStringLiteral sPath( u"Path" );
// Path/Coordinates
- const OUString sCoordinates( "Coordinates" );
+ static const OUStringLiteral sCoordinates( u"Coordinates" );
pAny = aGeometryItem.GetPropertyValueByName( sPath, sCoordinates );
if ( !pAny && pDefCustomShape && pDefCustomShape->nVertices && pDefCustomShape->pVertices )
{
@@ -929,7 +929,7 @@ void SdrObjCustomShape::MergeDefaultAttributes( const OUString* pType )
}
// Path/GluePoints
- const OUString sGluePoints( "GluePoints" );
+ static const OUStringLiteral sGluePoints( u"GluePoints" );
pAny = aGeometryItem.GetPropertyValueByName( sPath, sGluePoints );
if ( !pAny && pDefCustomShape && pDefCustomShape->nGluePoints && pDefCustomShape->pGluePoints )
{
@@ -947,7 +947,7 @@ void SdrObjCustomShape::MergeDefaultAttributes( const OUString* pType )
}
// Path/Segments
- const OUString sSegments( "Segments" );
+ static const OUStringLiteral sSegments( u"Segments" );
pAny = aGeometryItem.GetPropertyValueByName( sPath, sSegments );
if ( !pAny && pDefCustomShape && pDefCustomShape->nElements && pDefCustomShape->pElements )
{
@@ -967,7 +967,7 @@ void SdrObjCustomShape::MergeDefaultAttributes( const OUString* pType )
}
// Path/StretchX
- const OUString sStretchX( "StretchX" );
+ static const OUStringLiteral sStretchX( u"StretchX" );
pAny = aGeometryItem.GetPropertyValueByName( sPath, sStretchX );
if ( !pAny && pDefCustomShape )
{
@@ -981,7 +981,7 @@ void SdrObjCustomShape::MergeDefaultAttributes( const OUString* pType )
}
// Path/StretchY
- const OUString sStretchY( "StretchY" );
+ static const OUStringLiteral sStretchY( u"StretchY" );
pAny = aGeometryItem.GetPropertyValueByName( sPath, sStretchY );
if ( !pAny && pDefCustomShape )
{
@@ -995,7 +995,7 @@ void SdrObjCustomShape::MergeDefaultAttributes( const OUString* pType )
}
// Path/TextFrames
- const OUString sTextFrames( "TextFrames" );
+ static const OUStringLiteral sTextFrames( u"TextFrames" );
pAny = aGeometryItem.GetPropertyValueByName( sPath, sTextFrames );
if ( !pAny && pDefCustomShape && pDefCustomShape->nTextRect && pDefCustomShape->pTextRect )
{
@@ -1017,7 +1017,7 @@ void SdrObjCustomShape::MergeDefaultAttributes( const OUString* pType )
}
// Equations
- const OUString sEquations( "Equations" );
+ static const OUStringLiteral sEquations( u"Equations" );
pAny = aGeometryItem.GetPropertyValueByName( sEquations );
if ( !pAny && pDefCustomShape && pDefCustomShape->nCalculation && pDefCustomShape->pCalculation )
{
@@ -1034,7 +1034,7 @@ void SdrObjCustomShape::MergeDefaultAttributes( const OUString* pType )
}
// Handles
- const OUString sHandles( "Handles" );
+ static const OUStringLiteral sHandles( u"Handles" );
pAny = aGeometryItem.GetPropertyValueByName( sHandles );
if ( !pAny && pDefCustomShape && pDefCustomShape->nHandles && pDefCustomShape->pHandles )
{
@@ -1110,7 +1110,7 @@ bool SdrObjCustomShape::IsDefaultGeometry( const DefaultType eDefaultType ) cons
MSO_SPT eSpType = EnhancedCustomShapeTypeNames::Get( sShapeType );
const mso_CustomShape* pDefCustomShape = GetCustomShapeContent( eSpType );
- const OUString sPath( "Path" );
+ static const OUStringLiteral sPath( u"Path" );
switch( eDefaultType )
{
case DefaultType::Viewbox :
diff --git a/svx/source/table/cellcursor.cxx b/svx/source/table/cellcursor.cxx
index 6aa3e7cb66ef..313ec63dfa08 100644
--- a/svx/source/table/cellcursor.cxx
+++ b/svx/source/table/cellcursor.cxx
@@ -284,7 +284,7 @@ void CellCursor::split_column( sal_Int32 nCol, sal_Int32 nColumns, std::vector<
if( nNewCols > 0 )
{
- const OUString sWidth("Width");
+ static const OUStringLiteral sWidth(u"Width");
Reference< XTableColumns > xCols( mxTable->getColumns(), UNO_SET_THROW );
Reference< XPropertySet > xRefColumn( xCols->getByIndex( nCol ), UNO_QUERY_THROW );
sal_Int32 nWidth = 0;
@@ -398,7 +398,7 @@ void CellCursor::split_row( sal_Int32 nRow, sal_Int32 nRows, std::vector< sal_In
if( nNewRows > 0 )
{
- const OUString sHeight("Height");
+ static const OUStringLiteral sHeight(u"Height");
Reference< XTableRows > xRows( mxTable->getRows(), UNO_SET_THROW );
Reference< XPropertySet > xRefRow( xRows->getByIndex( nRow ), UNO_QUERY_THROW );
sal_Int32 nHeight = 0;
diff --git a/svx/source/table/svdotable.cxx b/svx/source/table/svdotable.cxx
index 66be795a8817..5d387afc5236 100644
--- a/svx/source/table/svdotable.cxx
+++ b/svx/source/table/svdotable.cxx
@@ -323,7 +323,7 @@ void SdrTableObjImpl::CropTableModelToSelection(const CellPos& rStart, const Cel
// copy row heights
Reference< XTableRows > xNewRows(mxTable->getRows(), css::uno::UNO_SET_THROW );
- const OUString sHeight( "Height" );
+ static const OUStringLiteral sHeight( u"Height" );
for( sal_Int32 nRow = 0; nRow < nRows; ++nRow )
{
Reference< XPropertySet > xNewSet( xNewRows->getByIndex( nRow ), UNO_QUERY_THROW );
@@ -332,7 +332,7 @@ void SdrTableObjImpl::CropTableModelToSelection(const CellPos& rStart, const Cel
// copy column widths
Reference< XTableColumns > xNewColumns( mxTable->getColumns(), css::uno::UNO_SET_THROW );
- const OUString sWidth( "Width" );
+ static const OUStringLiteral sWidth( u"Width" );
for( sal_Int32 nCol = 0; nCol < nColumns; ++nCol )
{
Reference< XPropertySet > xNewSet( xNewColumns->getByIndex( nCol ), UNO_QUERY_THROW );
@@ -591,7 +591,7 @@ void SdrTableObjImpl::DragEdge( bool mbHorizontal, int nEdge, sal_Int32 nOffset
try
{
- const OUString sSize( "Size" );
+ static const OUStringLiteral sSize( u"Size" );
if( mbHorizontal )
{
if (nEdge <= getRowCount())
diff --git a/svx/source/table/tablecontroller.cxx b/svx/source/table/tablecontroller.cxx
index 429b2e58da43..453259c35068 100644
--- a/svx/source/table/tablecontroller.cxx
+++ b/svx/source/table/tablecontroller.cxx
@@ -562,7 +562,7 @@ void SvxTableController::onInsert( sal_uInt16 nSId, const SfxItemSet* pArgs )
RemoveSelection();
- const OUString sSize( "Size" );
+ static const OUStringLiteral sSize( u"Size" );
const bool bUndo(rModel.IsUndoEnabled());
switch( nSId )
diff --git a/svx/source/table/tablelayouter.cxx b/svx/source/table/tablelayouter.cxx
index ed944fb3c1e1..0c517707f4f8 100644
--- a/svx/source/table/tablelayouter.cxx
+++ b/svx/source/table/tablelayouter.cxx
@@ -582,7 +582,7 @@ void TableLayouter::LayoutTableWidth( tools::Rectangle& rArea, bool bFit )
MergeVector aMergedCells( nColCount );
std::vector<sal_Int32> aOptimalColumns;
- const OUString sOptimalSize("OptimalSize");
+ static const OUStringLiteral sOptimalSize(u"OptimalSize");
if( sal::static_int_cast< sal_Int32 >( maColumns.size() ) != nColCount )
maColumns.resize( nColCount );
@@ -734,7 +734,7 @@ void TableLayouter::LayoutTableHeight( tools::Rectangle& rArea, bool bFit )
MergeVector aMergedCells( nRowCount );
std::vector<sal_Int32> aOptimalRows;
- const OUString sOptimalSize("OptimalSize");
+ static const OUStringLiteral sOptimalSize(u"OptimalSize");
// first calculate current height and initial minimum size per column,
// merged cells will be counted later
diff --git a/svx/source/table/tablemodel.cxx b/svx/source/table/tablemodel.cxx
index 2ede658f6a40..9104a0a2d378 100644
--- a/svx/source/table/tablemodel.cxx
+++ b/svx/source/table/tablemodel.cxx
@@ -986,7 +986,7 @@ void TableModel::optimize()
{
try
{
- const OUString sWidth("Width");
+ static const OUStringLiteral sWidth(u"Width");
sal_Int32 nWidth1 = 0, nWidth2 = 0;
Reference< XPropertySet > xSet1( static_cast< XCellRange* >( maColumns[nCol].get() ), UNO_QUERY_THROW );
Reference< XPropertySet > xSet2( static_cast< XCellRange* >( maColumns[nCol-1].get() ), UNO_QUERY_THROW );
@@ -1023,7 +1023,7 @@ void TableModel::optimize()
{
try
{
- const OUString sHeight("Height");
+ static const OUStringLiteral sHeight(u"Height");
sal_Int32 nHeight1 = 0, nHeight2 = 0;
Reference< XPropertySet > xSet1( static_cast< XCellRange* >( maRows[nRow].get() ), UNO_QUERY_THROW );
Reference< XPropertySet > xSet2( static_cast< XCellRange* >( maRows[nRow-1].get() ), UNO_QUERY_THROW );
diff --git a/svx/source/table/tablertfimporter.cxx b/svx/source/table/tablertfimporter.cxx
index 74e127b03f91..7b8bf0c3d65b 100644
--- a/svx/source/table/tablertfimporter.cxx
+++ b/svx/source/table/tablertfimporter.cxx
@@ -281,7 +281,7 @@ void SdrTableRTFParser::FillTable()
nColCount = mxTable->getColumnCount();
}
- const OUString sWidth("Width");
+ static const OUStringLiteral sWidth(u"Width");
sal_Int32 nCol, nLastEdge = 0;
for( nCol = 0; nCol < nColCount; nCol++ )
{
diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx
index 5d57508a9bc1..fbac6172a92e 100644
--- a/svx/source/tbxctrls/tbcontrl.cxx
+++ b/svx/source/tbxctrls/tbcontrl.cxx
@@ -3752,7 +3752,7 @@ void SvxCurrencyToolBoxControl::GetCurrencySymbols( std::vector<OUString>& rList
CollatorWrapper aCollator( ::comphelper::getProcessComponentContext() );
aCollator.loadDefaultCollator( Application::GetSettings().GetLanguageTag().getLocale(), 0 );
- const OUString aTwoSpace(" ");
+ static const OUStringLiteral aTwoSpace(u" ");
for( sal_uInt16 i = 1; i < nCount; ++i )
{
diff --git a/svx/source/tbxctrls/tbunosearchcontrollers.cxx b/svx/source/tbxctrls/tbunosearchcontrollers.cxx
index 1b2606ed393a..3e38304727c7 100644
--- a/svx/source/tbxctrls/tbunosearchcontrollers.cxx
+++ b/svx/source/tbxctrls/tbunosearchcontrollers.cxx
@@ -288,7 +288,7 @@ IMPL_LINK(FindTextFieldControl, KeyInputHdl, const KeyEvent&, rKeyEvent, bool)
aValue >>= xLayoutManager;
if (xLayoutManager.is())
{
- const OUString sResourceURL( "private:resource/toolbar/findbar" );
+ static const OUStringLiteral sResourceURL( u"private:resource/toolbar/findbar" );
xLayoutManager->hideElement( sResourceURL );
xLayoutManager->destroyElement( sResourceURL );
}
@@ -1268,7 +1268,7 @@ void SAL_CALL ExitSearchToolboxController::execute( sal_Int16 /*KeyModifier*/ )
aValue >>= xLayoutManager;
if (xLayoutManager.is())
{
- const OUString sResourceURL( "private:resource/toolbar/findbar" );
+ static const OUStringLiteral sResourceURL( u"private:resource/toolbar/findbar" );
xLayoutManager->hideElement( sResourceURL );
xLayoutManager->destroyElement( sResourceURL );
}
@@ -1538,7 +1538,7 @@ void SAL_CALL FindbarDispatcher::dispatch( const css::util::URL& aURL, const css
if (!xLayoutManager.is())
return;
- const OUString sResourceURL( "private:resource/toolbar/findbar" );
+ static const OUStringLiteral sResourceURL( u"private:resource/toolbar/findbar" );
css::uno::Reference< css::ui::XUIElement > xUIElement = xLayoutManager->getElement(sResourceURL);
if (!xUIElement.is())
{
diff --git a/svx/source/toolbars/fontworkbar.cxx b/svx/source/toolbars/fontworkbar.cxx
index 3399b20d79ea..8f7029204006 100644
--- a/svx/source/toolbars/fontworkbar.cxx
+++ b/svx/source/toolbars/fontworkbar.cxx
@@ -302,19 +302,19 @@ static void impl_execute( SfxRequest const & rReq, SdrCustomShapeGeometryItem& r
static void GetGeometryForCustomShape( SdrCustomShapeGeometryItem& rGeometryItem, const OUString& rCustomShape )
{
- const OUString sType( "Type" );
+ static const OUStringLiteral sType( u"Type" );
css::beans::PropertyValue aPropVal;
aPropVal.Name = sType;
aPropVal.Value <<= rCustomShape;
rGeometryItem.SetPropertyValue( aPropVal );
- const OUString sAdjustmentValues( "AdjustmentValues" );
- const OUString sCoordinateOrigin( "CoordinateOrigin" );
- const OUString sCoordinateSize( "CoordinateSize" );
- const OUString sEquations( "Equations" );
- const OUString sHandles( "Handles" );
- const OUString sPath( "Path" );
+ static const OUStringLiteral sAdjustmentValues( u"AdjustmentValues" );
+ static const OUStringLiteral sCoordinateOrigin( u"CoordinateOrigin" );
+ static const OUStringLiteral sCoordinateSize( u"CoordinateSize" );
+ static const OUStringLiteral sEquations( u"Equations" );
+ static const OUStringLiteral sHandles( u"Handles" );
+ static const OUStringLiteral sPath( u"Path" );
rGeometryItem.ClearPropertyValue( sAdjustmentValues );
rGeometryItem.ClearPropertyValue( sCoordinateOrigin );
rGeometryItem.ClearPropertyValue( sCoordinateSize );
diff --git a/svx/source/unodraw/unomod.cxx b/svx/source/unodraw/unomod.cxx
index 9de42e8a693b..dcdc1b0983a1 100644
--- a/svx/source/unodraw/unomod.cxx
+++ b/svx/source/unodraw/unomod.cxx
@@ -381,7 +381,7 @@ uno::Reference< uno::XInterface > SAL_CALL SvxUnoDrawingModel::createInstance( c
uno::Reference< uno::XInterface > xRet;
- const OUString aPackagePrefix( "com.sun.star.presentation." );
+ static const OUStringLiteral aPackagePrefix( u"com.sun.star.presentation." );
if( aServiceSpecifier.startsWith( aPackagePrefix ) )
{
SvxShape* pShape = nullptr;
diff --git a/sw/qa/core/uwriter.cxx b/sw/qa/core/uwriter.cxx
index 5a9ae1b04ac5..ade0a9d8170b 100644
--- a/sw/qa/core/uwriter.cxx
+++ b/sw/qa/core/uwriter.cxx
@@ -2013,7 +2013,7 @@ void SwDocTest::test64kPageDescs()
CPPUNIT_ASSERT_EQUAL( OUString("Page65535"), rDesc.GetName() );
SwPageDesc aDesc( rDesc );
- const OUString aChanged("Changed01");
+ static const OUStringLiteral aChanged(u"Changed01");
aDesc.SetName( aChanged );
m_pDoc->ChgPageDesc( nPageDescCount, aDesc );
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport4.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport4.cxx
index c39059e7904d..5289ddf23413 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport4.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport4.cxx
@@ -683,8 +683,8 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf38778, "tdf38778_properties_in_run_fo
{
xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
- const OUString psz("20");
- const OUString pszCs("20");
+ static const OUStringLiteral psz(u"20");
+ static const OUStringLiteral pszCs(u"20");
// w:fldCharType="begin"
assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:r[3]/w:rPr/w:sz", "val", psz);
diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
index 8163c0c10377..b8f725a9d109 100644
--- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
+++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
@@ -1616,7 +1616,7 @@ DECLARE_OOXMLIMPORT_TEST(testTdf108806, "tdf108806.docx")
DECLARE_OOXMLIMPORT_TEST(testTdf87533_bidi, "tdf87533_bidi.docx")
{
// "w:bidi" (specified inside Default paragraph properties) should not be ignored
- const OUString writingMode = "WritingMode"; //getPropertyName(PROP_WRITING_MODE);
+ static const OUStringLiteral writingMode = u"WritingMode"; //getPropertyName(PROP_WRITING_MODE);
// check: "Default Style" master-style has RTL
{
diff --git a/sw/qa/extras/unowriter/unowriter.cxx b/sw/qa/extras/unowriter/unowriter.cxx
index 8e45a006f19a..f0ed93e85941 100644
--- a/sw/qa/extras/unowriter/unowriter.cxx
+++ b/sw/qa/extras/unowriter/unowriter.cxx
@@ -318,11 +318,11 @@ CPPUNIT_TEST_FIXTURE(SwUnoWriter, testXAutoTextGroup)
uno::Reference<text::XTextRange> xTextRange = getRun(getParagraph(1), 1);
- const OUString sGroupName = "TestGroup*1";
- const OUString sTextName = "TEST";
- const OUString sTextNameNew = "TESTRENAMED";
- const OUString sTextTitle = "Test Auto Text";
- const OUString sTextTitleNew = "Test Auto Text Renamed";
+ static const OUStringLiteral sGroupName = u"TestGroup*1";
+ static const OUStringLiteral sTextName = u"TEST";
+ static const OUStringLiteral sTextNameNew = u"TESTRENAMED";
+ static const OUStringLiteral sTextTitle = u"Test Auto Text";
+ static const OUStringLiteral sTextTitleNew = u"Test Auto Text Renamed";
// Create new temporary group
uno::Reference<text::XAutoTextGroup> xAutoTextGroup
@@ -1156,7 +1156,7 @@ CPPUNIT_TEST_FIXTURE(SwUnoWriter, testTdf129841)
// Get SwXCellRange for the same cell
css::uno::Reference<css::beans::XPropertySet> xCellRange(
xTableCellRange->getCellRangeByName("A1:A1"), css::uno::UNO_QUERY_THROW);
- const OUString sBackColor = "BackColor";
+ static const OUStringLiteral sBackColor = u"BackColor";
// Apply background color to table cursor, and read background color from cell range
css::uno::Any aRefColor(sal_Int32(0x00FF0000));
xTableCursor->setPropertyValue(sBackColor, aRefColor);
diff --git a/sw/source/core/doc/DocumentContentOperationsManager.cxx b/sw/source/core/doc/DocumentContentOperationsManager.cxx
index e66ed8e4a673..88fd7872a41b 100644
--- a/sw/source/core/doc/DocumentContentOperationsManager.cxx
+++ b/sw/source/core/doc/DocumentContentOperationsManager.cxx
@@ -1100,7 +1100,7 @@ namespace
if( bRegExpRplc )
{
sal_Int32 nPos = 0;
- const OUString sPara("\\n");
+ static const OUStringLiteral sPara(u"\\n");
for (;;)
{
nPos = rStr.indexOf( sPara, nPos );
diff --git a/sw/source/core/doc/docfld.cxx b/sw/source/core/doc/docfld.cxx
index 3fb49544a76e..9df71b52e704 100644
--- a/sw/source/core/doc/docfld.cxx
+++ b/sw/source/core/doc/docfld.cxx
@@ -862,8 +862,8 @@ void SwDocUpdateField::MakeFieldList_( SwDoc& rDoc, int eGetMode )
}
}
- const OUString sTrue("TRUE");
- const OUString sFalse("FALSE");
+ static const OUStringLiteral sTrue(u"TRUE");
+ static const OUStringLiteral sFalse(u"FALSE");
#if HAVE_FEATURE_DBCONNECTIVITY
bool bIsDBManager = nullptr != rDoc.GetDBManager();
diff --git a/sw/source/core/doc/doclay.cxx b/sw/source/core/doc/doclay.cxx
index c034a2b477a3..72f8b6883073 100644
--- a/sw/source/core/doc/doclay.cxx
+++ b/sw/source/core/doc/doclay.cxx
@@ -123,7 +123,7 @@ SdrObject* SwDoc::CloneSdrObj( const SdrObject& rObj, bool bMoveWithinDoc,
uno::Reference< awt::XControlModel > xModel = static_cast<SdrUnoObj*>(pObj)->GetUnoControlModel();
uno::Any aVal;
uno::Reference< beans::XPropertySet > xSet(xModel, uno::UNO_QUERY);
- const OUString sName("Name");
+ static const OUStringLiteral sName(u"Name");
if( xSet.is() )
aVal = xSet->getPropertyValue( sName );
if( bInsInPage )
diff --git a/sw/source/core/edit/edfcol.cxx b/sw/source/core/edit/edfcol.cxx
index bcff20b8b243..03d5b1ccebd4 100644
--- a/sw/source/core/edit/edfcol.cxx
+++ b/sw/source/core/edit/edfcol.cxx
@@ -1312,7 +1312,7 @@ static std::vector<svx::ClassificationResult> lcl_CollectParagraphClassification
uno::Reference<text::XTextRange> xTextRange(xField, uno::UNO_QUERY);
const OUString aName = rdfNamePair.first;
const OUString aValue = rdfNamePair.second;
- const OUString sBlank("");
+ static const OUStringLiteral sBlank(u"");
if (aKeyCreator.isMarkingTextKey(aName))
{
aResult.push_back({ svx::ClassificationType::TEXT, aValue, sBlank, sBlank });
diff --git a/sw/source/core/unocore/unodraw.cxx b/sw/source/core/unocore/unodraw.cxx
index cf1059dd9fbc..581b76455d1d 100644
--- a/sw/source/core/unocore/unodraw.cxx
+++ b/sw/source/core/unocore/unodraw.cxx
@@ -2540,7 +2540,7 @@ void SwXShape::AdjustPositionProperties( const awt::Point& rPosition )
if ( eTextAnchorType != text::TextContentAnchorType_AS_CHARACTER )
{
// determine current x-position
- const OUString aHoriPosPropStr("HoriOrientPosition");
+ static const OUStringLiteral aHoriPosPropStr(u"HoriOrientPosition");
uno::Any aHoriPos( getPropertyValue( aHoriPosPropStr ) );
sal_Int32 dCurrX = 0;
aHoriPos >>= dCurrX;
@@ -2549,7 +2549,7 @@ void SwXShape::AdjustPositionProperties( const awt::Point& rPosition )
{
// adjust x-position orientation to text::HoriOrientation::NONE, if needed
// Note: has to be done before setting x-position attribute
- const OUString aHoriOrientPropStr("HoriOrient");
+ static const OUStringLiteral aHoriOrientPropStr(u"HoriOrient");
uno::Any aHoriOrient( getPropertyValue( aHoriOrientPropStr ) );
sal_Int16 eHoriOrient;
if (aHoriOrient >>= eHoriOrient) // may be void
@@ -2570,7 +2570,7 @@ void SwXShape::AdjustPositionProperties( const awt::Point& rPosition )
// handle y-position
{
// determine current y-position
- const OUString aVertPosPropStr("VertOrientPosition");
+ static const OUStringLiteral aVertPosPropStr(u"VertOrientPosition");
uno::Any aVertPos( getPropertyValue( aVertPosPropStr ) );
sal_Int32 dCurrY = 0;
aVertPos >>= dCurrY;
@@ -2579,7 +2579,7 @@ void SwXShape::AdjustPositionProperties( const awt::Point& rPosition )
{
// adjust y-position orientation to text::VertOrientation::NONE, if needed
// Note: has to be done before setting y-position attribute
- const OUString aVertOrientPropStr("VertOrient");
+ static const OUStringLiteral aVertOrientPropStr(u"VertOrient");
uno::Any aVertOrient( getPropertyValue( aVertOrientPropStr ) );
sal_Int16 eVertOrient;
if (aVertOrient >>= eVertOrient) // may be void
diff --git a/sw/source/core/view/printdata.cxx b/sw/source/core/view/printdata.cxx
index 03526c134e56..ad101ee6abf2 100644
--- a/sw/source/core/view/printdata.cxx
+++ b/sw/source/core/view/printdata.cxx
@@ -272,7 +272,7 @@ SwPrintUIOptions::SwPrintUIOptions(
aPrintRangeOpt );
// create a choice for the content to create
- const OUString aPrintRangeName( "PrintContent" );
+ static const OUStringLiteral aPrintRangeName( u"PrintContent" );
uno::Sequence< OUString > aChoices( 3 );
uno::Sequence< sal_Bool > aChoicesDisabled( 3 );
uno::Sequence< OUString > aHelpIds( 3 );
@@ -341,7 +341,7 @@ SwPrintUIOptions::SwPrintUIOptions(
// create a bool option for brochure
bDefaultVal = rDefaultPrintData.IsPrintProspect();
- const OUString aBrochurePropertyName( "PrintProspect" );
+ static const OUStringLiteral aBrochurePropertyName( u"PrintProspect" );
m_aUIProperties[ nIdx++ ].Value = setBoolControlOpt("brochure", SwResId( STR_PRINTOPTUI_BROCHURE),
".HelpID:vcl:PrintDialog:PrintProspect:CheckBox",
aBrochurePropertyName,
diff --git a/sw/source/filter/html/swhtml.cxx b/sw/source/filter/html/swhtml.cxx
index 231ad8443fce..466e0d6e8c71 100644
--- a/sw/source/filter/html/swhtml.cxx
+++ b/sw/source/filter/html/swhtml.cxx
@@ -169,7 +169,7 @@ OUString HTMLReader::GetTemplateName(SwDoc& rDoc) const
// HTML import into Writer, avoid loading the Writer/Web template.
return OUString();
- const OUString sTemplateWithoutExt("internal/html");
+ static const OUStringLiteral sTemplateWithoutExt(u"internal/html");
SvtPathOptions aPathOpt;
// first search for OpenDocument Writer/Web template
@@ -5590,7 +5590,7 @@ void HTMLReader::SetupFilterOptions()
return;
OUString aFilterOptions = pItem->GetValue();
- const OUString aXhtmlNsKey("xhtmlns=");
+ static const OUStringLiteral aXhtmlNsKey(u"xhtmlns=");
if (aFilterOptions.startsWith(aXhtmlNsKey))
{
OUString aNamespace = aFilterOptions.copy(aXhtmlNsKey.getLength());
diff --git a/sw/source/filter/html/wrthtml.cxx b/sw/source/filter/html/wrthtml.cxx
index 741448d96f7f..1094f3ac36c9 100644
--- a/sw/source/filter/html/wrthtml.cxx
+++ b/sw/source/filter/html/wrthtml.cxx
@@ -220,7 +220,7 @@ void SwHTMLWriter::SetupFilterOptions(const OUString& rFilterOptions)
}
const uno::Sequence<OUString> aOptionSeq = comphelper::string::convertCommaSeparated(rFilterOptions);
- const OUString aXhtmlNsKey("xhtmlns=");
+ static const OUStringLiteral aXhtmlNsKey(u"xhtmlns=");
for (const auto& rOption : aOptionSeq)
{
if (rOption == "XHTML")
diff --git a/sw/source/filter/ww8/ww8par5.cxx b/sw/source/filter/ww8/ww8par5.cxx
index 88b952099e6a..4db9924e2b40 100644
--- a/sw/source/filter/ww8/ww8par5.cxx
+++ b/sw/source/filter/ww8/ww8par5.cxx
@@ -2200,7 +2200,7 @@ eF_ResT SwWW8ImplReader::Read_F_PgRef( WW8FieldDesc*, OUString& rStr )
}
OUString sURL = "#" + sBookmarkName;
SwFormatINetFormat aURL( sURL, "" );
- const OUString sLinkStyle("Index Link");
+ static const OUStringLiteral sLinkStyle(u"Index Link");
const sal_uInt16 nPoolId =
SwStyleNameMapper::GetPoolIdFromUIName( sLinkStyle, SwGetPoolIdFromName::ChrFmt );
aURL.SetVisitedFormatAndId( sLinkStyle, nPoolId);
diff --git a/sw/source/filter/ww8/ww8toolbar.cxx b/sw/source/filter/ww8/ww8toolbar.cxx
index fea93ae66850..95970314240d 100644
--- a/sw/source/filter/ww8/ww8toolbar.cxx
+++ b/sw/source/filter/ww8/ww8toolbar.cxx
@@ -263,7 +263,7 @@ bool Customization::ImportMenu( SwCTBWrapper& rWrapper, CustomToolBarImportHelpe
if ( pCust )
{
// currently only support built-in menu
- const OUString sMenuBar( "private:resource/menubar/menubar" );
+ static const OUStringLiteral sMenuBar( u"private:resource/menubar/menubar" );
// Get menu name
SwTBC* pTBC = pWrapper->GetTBCAtOffset( rTBDelta.TBCStreamOffset() );
diff --git a/sw/source/filter/xml/swxml.cxx b/sw/source/filter/xml/swxml.cxx
index 7893321829c6..4d965aca3bf3 100644
--- a/sw/source/filter/xml/swxml.cxx
+++ b/sw/source/filter/xml/swxml.cxx
@@ -606,7 +606,7 @@ ErrCode XMLReader::Read( SwDoc &rDoc, const OUString& rBaseURL, SwPaM &rPaM, con
if( xParentSet.is() )
{
uno::Reference< beans::XPropertySetInfo > xPropSetInfo( xParentSet->getPropertySetInfo() );
- const OUString sPropName("BuildId" );
+ static const OUStringLiteral sPropName(u"BuildId" );
if( xPropSetInfo.is() && xPropSetInfo->hasPropertyByName(sPropName) )
{
xInfoSet->setPropertyValue( sPropName, xParentSet->getPropertyValue(sPropName) );
@@ -744,9 +744,9 @@ ErrCode XMLReader::Read( SwDoc &rDoc, const OUString& rBaseURL, SwPaM &rPaM, con
ErrCode nRet = ERRCODE_NONE;
// save redline mode into import info property set
- const OUString sShowChanges("ShowChanges");
- const OUString sRecordChanges("RecordChanges");
- const OUString sRedlineProtectionKey("RedlineProtectionKey");
+ static const OUStringLiteral sShowChanges(u"ShowChanges");
+ static const OUStringLiteral sRecordChanges(u"RecordChanges");
+ static const OUStringLiteral sRedlineProtectionKey(u"RedlineProtectionKey");
xInfoSet->setPropertyValue( sShowChanges,
makeAny(IDocumentRedlineAccess::IsShowChanges(rDoc.getIDocumentRedlineAccess().GetRedlineFlags())) );
xInfoSet->setPropertyValue( sRecordChanges,
@@ -947,7 +947,7 @@ ErrCode XMLReader::Read( SwDoc &rDoc, const OUString& rBaseURL, SwPaM &rPaM, con
if( xModelSet.is() )
{
uno::Reference< beans::XPropertySetInfo > xModelSetInfo( xModelSet->getPropertySetInfo() );
- const OUString sName("BuildId" );
+ static const OUStringLiteral sName(u"BuildId" );
if( xModelSetInfo.is() && xModelSetInfo->hasPropertyByName(sName) )
{
xModelSet->setPropertyValue( sName, xInfoSet->getPropertyValue(sName) );
@@ -980,7 +980,7 @@ size_t XMLReader::GetSectionList( SfxMedium& rMedium,
try
{
xml::sax::InputSource aParserInput;
- const OUString sDocName( "content.xml" );
+ static const OUStringLiteral sDocName( u"content.xml" );
aParserInput.sSystemId = sDocName;
uno::Reference < io::XStream > xStm = xStg2->openStreamElement( sDocName, embed::ElementModes::READ );
diff --git a/sw/source/filter/xml/xmlexp.cxx b/sw/source/filter/xml/xmlexp.cxx
index d8e4ba10df5a..d1751940dfb4 100644
--- a/sw/source/filter/xml/xmlexp.cxx
+++ b/sw/source/filter/xml/xmlexp.cxx
@@ -104,7 +104,7 @@ ErrCode SwXMLExport::exportDoc( enum XMLTokenEnum eClass )
Reference<XPropertySet> rInfoSet = getExportInfo();
if( rInfoSet.is() )
{
- const OUString sAutoTextMode("AutoTextMode");
+ static const OUStringLiteral sAutoTextMode(u"AutoTextMode");
if( rInfoSet->getPropertySetInfo()->hasPropertyByName(
sAutoTextMode ) )
{
@@ -370,7 +370,7 @@ void SwXMLExport::GetViewSettings(Sequence<PropertyValue>& aProps)
Reference<XPropertySet> xInfoSet( getExportInfo() );
if ( xInfoSet.is() )
{
- const OUString sShowChanges( "ShowChanges" );
+ static const OUStringLiteral sShowChanges( u"ShowChanges" );
if( xInfoSet->getPropertySetInfo()->hasPropertyByName( sShowChanges ) )
{
bShowRedlineChanges = *o3tl::doAccess<bool>(xInfoSet->
diff --git a/sw/source/filter/xml/xmlimp.cxx b/sw/source/filter/xml/xmlimp.cxx
index 226b08f22384..526402d0aa63 100644
--- a/sw/source/filter/xml/xmlimp.cxx
+++ b/sw/source/filter/xml/xmlimp.cxx
@@ -433,7 +433,7 @@ void SwXMLImport::startDocument()
}
bool bOverwrite = false;
- const OUString sStyleInsertModeOverwrite("StyleInsertModeOverwrite");
+ static const OUStringLiteral sStyleInsertModeOverwrite(u"StyleInsertModeOverwrite");
if( xPropertySetInfo->hasPropertyByName(sStyleInsertModeOverwrite) )
{
aAny = xImportInfo->getPropertyValue(sStyleInsertModeOverwrite);
@@ -449,7 +449,7 @@ void SwXMLImport::startDocument()
}
// text insert mode?
- const OUString sTextInsertModeRange("TextInsertModeRange");
+ static const OUStringLiteral sTextInsertModeRange(u"TextInsertModeRange");
if( xPropertySetInfo->hasPropertyByName(sTextInsertModeRange) )
{
aAny = xImportInfo->getPropertyValue(sTextInsertModeRange);
@@ -459,7 +459,7 @@ void SwXMLImport::startDocument()
}
// auto text mode
- const OUString sAutoTextMode("AutoTextMode");
+ static const OUStringLiteral sAutoTextMode(u"AutoTextMode");
if( xPropertySetInfo->hasPropertyByName(sAutoTextMode) )
{
aAny = xImportInfo->getPropertyValue(sAutoTextMode);
@@ -471,7 +471,7 @@ void SwXMLImport::startDocument()
}
// organizer mode
- const OUString sOrganizerMode("OrganizerMode");
+ static const OUStringLiteral sOrganizerMode(u"OrganizerMode");
if( xPropertySetInfo->hasPropertyByName(sOrganizerMode) )
{
aAny = xImportInfo->getPropertyValue(sOrganizerMode);
@@ -483,7 +483,7 @@ void SwXMLImport::startDocument()
}
// default document properties
- const OUString sDefSettings("DefaultDocumentSettings");
+ static const OUStringLiteral sDefSettings(u"DefaultDocumentSettings");
if (xPropertySetInfo->hasPropertyByName(sDefSettings))
{
aAny = xImportInfo->getPropertyValue(sDefSettings);
diff --git a/sw/source/ui/envelp/mailmrge.cxx b/sw/source/ui/envelp/mailmrge.cxx
index 972f7d04a6cc..19c570514a25 100644
--- a/sw/source/ui/envelp/mailmrge.cxx
+++ b/sw/source/ui/envelp/mailmrge.cxx
@@ -315,7 +315,7 @@ SwMailMergeDlg::SwMailMergeDlg(weld::Window* pParent, SwWrtShell& rShell,
+ OUString::number(static_cast<sal_Int32>(SfxFilterFlags::NOTINFILEDLG))
+ ":default_first");
uno::Reference< container::XEnumeration > xList = xQuery->createSubSetEnumerationByQuery(sCommand);
- const OUString sName("Name");
+ static const OUStringLiteral sName(u"Name");
sal_Int32 nODT = -1;
while(xList->hasMoreElements()) {
comphelper::SequenceAsHashMap aFilter(xList->nextElement());
diff --git a/sw/source/ui/misc/glosbib.cxx b/sw/source/ui/misc/glosbib.cxx
index f84bdf6f3954..c32605370b06 100644
--- a/sw/source/ui/misc/glosbib.cxx
+++ b/sw/source/ui/misc/glosbib.cxx
@@ -91,7 +91,7 @@ SwGlossaryGroupDlg::SwGlossaryGroupDlg(weld::Window * pParent,
const size_t nCount = pHdl->GetGroupCnt();
/* tdf#111870 "My AutoText" comes from mytexts.bau but should be translated
here as well, see also SwGlossaryDlg::Init */
- const OUString sMyAutoTextEnglish("My AutoText");
+ static const OUStringLiteral sMyAutoTextEnglish(u"My AutoText");
for( size_t i = 0; i < nCount; ++i)
{
OUString sTitle;
diff --git a/sw/source/ui/misc/glossary.cxx b/sw/source/ui/misc/glossary.cxx
index 7b173f63e449..04ceb412bb78 100644
--- a/sw/source/ui/misc/glossary.cxx
+++ b/sw/source/ui/misc/glossary.cxx
@@ -697,7 +697,7 @@ void SwGlossaryDlg::Init()
const OUString sSelStr(::GetCurrGlosGroup().getToken(0, GLOS_DELIM));
const sal_Int32 nSelPath = ::GetCurrGlosGroup().getToken(1, GLOS_DELIM).toInt32();
// #i66304# - "My AutoText" comes from mytexts.bau, but should be translated
- const OUString sMyAutoTextEnglish("My AutoText");
+ static const OUStringLiteral sMyAutoTextEnglish(u"My AutoText");
const OUString sMyAutoTextTranslated(SwResId(STR_MY_AUTOTEXT));
for(size_t nId = 0; nId < nCnt; ++nId )
{
diff --git a/sw/source/ui/vba/vbaparagraphformat.cxx b/sw/source/ui/vba/vbaparagraphformat.cxx
index 74742af3867e..683a3a5befcc 100644
--- a/sw/source/ui/vba/vbaparagraphformat.cxx
+++ b/sw/source/ui/vba/vbaparagraphformat.cxx
@@ -182,7 +182,7 @@ sal_Int32 SAL_CALL SwVbaParagraphFormat::getOutlineLevel()
{
sal_Int32 nLevel = word::WdOutlineLevel::wdOutlineLevelBodyText;
OUString aHeading;
- const OUString HEADING = "Heading";
+ static const OUStringLiteral HEADING = u"Heading";
mxParaProps->getPropertyValue("ParaStyleName") >>= aHeading;
if( aHeading.startsWith( HEADING ) )
{
diff --git a/sw/source/uibase/app/docstyle.cxx b/sw/source/uibase/app/docstyle.cxx
index e173eddfbc3d..87824949ffdf 100644
--- a/sw/source/uibase/app/docstyle.cxx
+++ b/sw/source/uibase/app/docstyle.cxx
@@ -824,7 +824,7 @@ OUString SwDocStyleSheet::GetDescription(MapUnit eUnit)
{
IntlWrapper aIntlWrapper(SvtSysLocale().GetUILanguageTag());
- const OUString sPlus(" + ");
+ static const OUStringLiteral sPlus(u" + ");
if ( SfxStyleFamily::Page == nFamily )
{
if( !pSet )
diff --git a/sw/source/uibase/shells/langhelper.cxx b/sw/source/uibase/shells/langhelper.cxx
index b5ceb23e5ddb..c5db2c5cceb1 100644
--- a/sw/source/uibase/shells/langhelper.cxx
+++ b/sw/source/uibase/shells/langhelper.cxx
@@ -121,9 +121,9 @@ namespace SwLangHelper
// setting the new language...
if (!aNewLangText.isEmpty())
{
- const OUString aSelectionLangPrefix("Current_");
- const OUString aParagraphLangPrefix("Paragraph_");
- const OUString aDocumentLangPrefix("Default_");
+ static const OUStringLiteral aSelectionLangPrefix(u"Current_");
+ static const OUStringLiteral aParagraphLangPrefix(u"Paragraph_");
+ static const OUStringLiteral aDocumentLangPrefix(u"Default_");
sal_Int32 nPos = 0;
bool bForSelection = true;
diff --git a/sw/source/uibase/shells/textsh1.cxx b/sw/source/uibase/shells/textsh1.cxx
index 1b2cd56fb2f0..93a9bc35b522 100644
--- a/sw/source/uibase/shells/textsh1.cxx
+++ b/sw/source/uibase/shells/textsh1.cxx
@@ -438,9 +438,9 @@ void SwTextShell::Execute(SfxRequest &rReq)
// setting the new language...
if (!aNewLangText.isEmpty())
{
- const OUString aSelectionLangPrefix("Current_");
- const OUString aParagraphLangPrefix("Paragraph_");
- const OUString aDocumentLangPrefix("Default_");
+ static const OUStringLiteral aSelectionLangPrefix(u"Current_");
+ static const OUStringLiteral aParagraphLangPrefix(u"Paragraph_");
+ static const OUStringLiteral aDocumentLangPrefix(u"Default_");
SfxItemSet aCoreSet( GetPool(),
svl::Items<RES_CHRATR_LANGUAGE, RES_CHRATR_LANGUAGE,
@@ -1518,8 +1518,8 @@ void SwTextShell::Execute(SfxRequest &rReq)
if (pItem2)
sApplyText = pItem2->GetValue();
- const OUString sSpellingRule("Spelling_");
- const OUString sGrammarRule("Grammar_");
+ static const OUStringLiteral sSpellingRule(u"Spelling_");
+ static const OUStringLiteral sGrammarRule(u"Grammar_");
bool bGrammar = false;
sal_Int32 nPos = 0;
@@ -1860,8 +1860,8 @@ void SwTextShell::GetState( SfxItemSet &rSet )
OUString aStyleName;
std::vector<OUString> aList;
- const OUString sPhysical("IsPhysical");
- const OUString sDisplay("DisplayName");
+ static const OUStringLiteral sPhysical(u"IsPhysical");
+ static const OUStringLiteral sDisplay(u"DisplayName");
const OUString sHeaderOn(nWhich == FN_INSERT_PAGEHEADER ? OUString("HeaderIsOn") : OUString("FooterIsOn"));
uno::Reference< XStyleFamiliesSupplier > xSupplier(GetView().GetDocShell()->GetBaseModel(), uno::UNO_QUERY);
diff --git a/sw/source/uibase/uno/unomailmerge.cxx b/sw/source/uibase/uno/unomailmerge.cxx
index 65a4aabf5bf9..cb4df33075c6 100644
--- a/sw/source/uibase/uno/unomailmerge.cxx
+++ b/sw/source/uibase/uno/unomailmerge.cxx
@@ -716,7 +716,7 @@ uno::Any SAL_CALL SwXMailMerge::execute(
aURLObj.SetSmartURL( aCurOutputURL );
OUString aPath = aURLObj.GetMainURL( INetURLObject::DecodeMechanism::ToIUri );
- const OUString aDelim( "/" );
+ static const OUStringLiteral aDelim( u"/" );
if (!aPath.isEmpty() && !aPath.endsWith(aDelim))
aPath += aDelim;
if (bCurFileNameFromColumn)
diff --git a/test/source/sheet/cellarealink.cxx b/test/source/sheet/cellarealink.cxx
index d73f4e09ce8e..bfaf4c3fe99b 100644
--- a/test/source/sheet/cellarealink.cxx
+++ b/test/source/sheet/cellarealink.cxx
@@ -22,7 +22,7 @@ void CellAreaLink::testUrl()
{
uno::Reference<beans::XPropertySet> xCellAreaLink(init(), uno::UNO_QUERY_THROW);
- const OUString propName("Url");
+ static const OUStringLiteral propName(u"Url");
OUString aUrl;
CPPUNIT_ASSERT(xCellAreaLink->getPropertyValue(propName) >>= aUrl);
@@ -39,7 +39,7 @@ void CellAreaLink::testFilter()
{
uno::Reference<beans::XPropertySet> xCellAreaLink(init(), uno::UNO_QUERY_THROW);
- const OUString propName("Filter");
+ static const OUStringLiteral propName(u"Filter");
OUString aFilter;
CPPUNIT_ASSERT(xCellAreaLink->getPropertyValue(propName) >>= aFilter);
@@ -56,7 +56,7 @@ void CellAreaLink::testFilterOptions()
{
uno::Reference<beans::XPropertySet> xCellAreaLink(init(), uno::UNO_QUERY_THROW);
- const OUString propName("FilterOptions");
+ static const OUStringLiteral propName(u"FilterOptions");
OUString aFilterOptions;
CPPUNIT_ASSERT(xCellAreaLink->getPropertyValue(propName) >>= aFilterOptions);
@@ -75,7 +75,7 @@ void CellAreaLink::testRefreshDelay()
{
uno::Reference<beans::XPropertySet> xCellAreaLink(init(), uno::UNO_QUERY_THROW);
- const OUString propName("RefreshDelay");
+ static const OUStringLiteral propName(u"RefreshDelay");
sal_Int32 aRefreshDelay = 0;
CPPUNIT_ASSERT(xCellAreaLink->getPropertyValue(propName) >>= aRefreshDelay);
@@ -94,7 +94,7 @@ void CellAreaLink::testRefreshPeriod()
{
uno::Reference<beans::XPropertySet> xCellAreaLink(init(), uno::UNO_QUERY_THROW);
- const OUString propName("RefreshPeriod");
+ static const OUStringLiteral propName(u"RefreshPeriod");
sal_Int32 aRefreshPeriod = 0;
CPPUNIT_ASSERT(xCellAreaLink->getPropertyValue(propName) >>= aRefreshPeriod);
diff --git a/test/source/sheet/databaserange.cxx b/test/source/sheet/databaserange.cxx
index 302d88bc6b50..d87e3723ce3b 100644
--- a/test/source/sheet/databaserange.cxx
+++ b/test/source/sheet/databaserange.cxx
@@ -26,7 +26,7 @@ void DatabaseRange::testMoveCells()
{
uno::Reference<beans::XPropertySet> xDatabaseRange(init("DataArea"), UNO_QUERY_THROW);
- const OUString propName("MoveCells");
+ static const OUStringLiteral propName(u"MoveCells");
bool bMoveCells = true;
CPPUNIT_ASSERT(xDatabaseRange->getPropertyValue(propName) >>= bMoveCells);
@@ -43,7 +43,7 @@ void DatabaseRange::testKeepFormats()
{
uno::Reference<beans::XPropertySet> xDatabaseRange(init("DataArea"), UNO_QUERY_THROW);
- const OUString propName("KeepFormats");
+ static const OUStringLiteral propName(u"KeepFormats");
bool bKeepFormats = true;
CPPUNIT_ASSERT(xDatabaseRange->getPropertyValue(propName) >>= bKeepFormats);
@@ -60,7 +60,7 @@ void DatabaseRange::testStripData()
{
uno::Reference<beans::XPropertySet> xDatabaseRange(init("DataArea"), UNO_QUERY_THROW);
- const OUString propName("StripData");
+ static const OUStringLiteral propName(u"StripData");
bool bStripData = true;
CPPUNIT_ASSERT(xDatabaseRange->getPropertyValue(propName) >>= bStripData);
@@ -77,7 +77,7 @@ void DatabaseRange::testAutoFilter()
{
uno::Reference<beans::XPropertySet> xDatabaseRange(init("DataArea"), UNO_QUERY_THROW);
- const OUString propName("AutoFilter");
+ static const OUStringLiteral propName(u"AutoFilter");
bool bAutoFilter = true;
CPPUNIT_ASSERT(xDatabaseRange->getPropertyValue(propName) >>= bAutoFilter);
@@ -94,7 +94,7 @@ void DatabaseRange::testUseFilterCriteriaSource()
{
uno::Reference<beans::XPropertySet> xDatabaseRange(init("DataArea"), UNO_QUERY_THROW);
- const OUString propName("UseFilterCriteriaSource");
+ static const OUStringLiteral propName(u"UseFilterCriteriaSource");
bool bUseFilterCriteriaSource = true;
CPPUNIT_ASSERT(xDatabaseRange->getPropertyValue(propName) >>= bUseFilterCriteriaSource);
@@ -113,7 +113,7 @@ void DatabaseRange::testFilterCriteriaSource()
{
uno::Reference<beans::XPropertySet> xDatabaseRange(init("DataArea"), UNO_QUERY_THROW);
- const OUString propName("FilterCriteriaSource");
+ static const OUStringLiteral propName(u"FilterCriteriaSource");
table::CellRangeAddress cellRangeAddress;
CPPUNIT_ASSERT(xDatabaseRange->getPropertyValue(propName) >>= cellRangeAddress);
@@ -132,7 +132,7 @@ void DatabaseRange::testRefreshPeriod()
{
uno::Reference<beans::XPropertySet> xDatabaseRange(init("DataArea"), UNO_QUERY_THROW);
- const OUString propName("RefreshPeriod");
+ static const OUStringLiteral propName(u"RefreshPeriod");
sal_Int32 aRefreshPeriod = 1;
CPPUNIT_ASSERT(xDatabaseRange->getPropertyValue(propName) >>= aRefreshPeriod);
@@ -151,7 +151,7 @@ void DatabaseRange::testFromSelection()
{
uno::Reference<beans::XPropertySet> xDatabaseRange(init("DataArea"), UNO_QUERY_THROW);
- const OUString propName("FromSelection");
+ static const OUStringLiteral propName(u"FromSelection");
bool bFromSelection = true;
CPPUNIT_ASSERT(xDatabaseRange->getPropertyValue(propName) >>= bFromSelection);
@@ -168,7 +168,7 @@ void DatabaseRange::testTokenIndex()
{
uno::Reference<beans::XPropertySet> xDatabaseRange(init("DataArea"), UNO_QUERY_THROW);
- const OUString propName("TokenIndex");
+ static const OUStringLiteral propName(u"TokenIndex");
sal_Int32 aTokenIndex = 0;
CPPUNIT_ASSERT(xDatabaseRange->getPropertyValue(propName) >>= aTokenIndex);
@@ -185,7 +185,7 @@ void DatabaseRange::testTotalsRow()
{
uno::Reference<beans::XPropertySet> xDatabaseRange(init("DataArea"), UNO_QUERY_THROW);
- const OUString propName("TotalsRow");
+ static const OUStringLiteral propName(u"TotalsRow");
bool bTotalsRow = true;
CPPUNIT_ASSERT(xDatabaseRange->getPropertyValue(propName) >>= bTotalsRow);
@@ -202,7 +202,7 @@ void DatabaseRange::testContainsHeader()
{
uno::Reference<beans::XPropertySet> xDatabaseRange(init("DataArea"), UNO_QUERY_THROW);
- const OUString propName("ContainsHeader");
+ static const OUStringLiteral propName(u"ContainsHeader");
bool bContainsHeader = false;
CPPUNIT_ASSERT(xDatabaseRange->getPropertyValue(propName) >>= bContainsHeader);
diff --git a/test/source/sheet/datapilotitem.cxx b/test/source/sheet/datapilotitem.cxx
index 4b2299c0068f..bfbe2110afec 100644
--- a/test/source/sheet/datapilotitem.cxx
+++ b/test/source/sheet/datapilotitem.cxx
@@ -24,7 +24,7 @@ void DataPilotItem::testProperties()
{
uno::Reference<beans::XPropertySet> xItem(init(), UNO_QUERY_THROW);
- const OUString propNameIS("IsHidden");
+ static const OUStringLiteral propNameIS(u"IsHidden");
bool bIsHidden = true;
CPPUNIT_ASSERT(xItem->getPropertyValue(propNameIS) >>= bIsHidden);
@@ -36,7 +36,7 @@ void DataPilotItem::testProperties()
CPPUNIT_ASSERT(xItem->getPropertyValue(propNameIS) >>= bIsHidden);
CPPUNIT_ASSERT_MESSAGE("Value of IsHidden wasn't changed", !bIsHidden);
- const OUString propNameSD("ShowDetail");
+ static const OUStringLiteral propNameSD(u"ShowDetail");
bool bShowDetail = false;
CPPUNIT_ASSERT(xItem->getPropertyValue(propNameSD) >>= bShowDetail);
diff --git a/test/source/sheet/xarrayformularange.cxx b/test/source/sheet/xarrayformularange.cxx
index ab4ed7847a3a..f7f30a1af73e 100644
--- a/test/source/sheet/xarrayformularange.cxx
+++ b/test/source/sheet/xarrayformularange.cxx
@@ -27,7 +27,7 @@ void XArrayFormulaRange::testGetSetArrayFormula()
{
uno::Reference<sheet::XArrayFormulaRange> xAFR(init(), UNO_QUERY_THROW);
- const OUString sFormula("=1 + 2 * 5");
+ static const OUStringLiteral sFormula(u"=1 + 2 * 5");
xAFR->setArrayFormula(sFormula);
uno::Reference<sheet::XCellRangeAddressable> xCRA(xAFR, UNO_QUERY_THROW);
diff --git a/test/source/sheet/xspreadsheets2.cxx b/test/source/sheet/xspreadsheets2.cxx
index 406d8baf118a..f88de2a43055 100644
--- a/test/source/sheet/xspreadsheets2.cxx
+++ b/test/source/sheet/xspreadsheets2.cxx
@@ -242,7 +242,7 @@ void XSpreadsheets2::testImportCellStyle()
//new style created in dest
uno::Reference< beans::XPropertySet > xSrcCellPropSet (xSrcCell, UNO_QUERY_THROW);
- const OUString aCellProperty("CellStyle");
+ static const OUStringLiteral aCellProperty(u"CellStyle");
OUString aSrcStyleName;
CPPUNIT_ASSERT(xSrcCellPropSet->getPropertyValue(aCellProperty) >>= aSrcStyleName);
diff --git a/test/source/text/textsettings.cxx b/test/source/text/textsettings.cxx
index 5b8cef60cdd0..112fc939dee9 100644
--- a/test/source/text/textsettings.cxx
+++ b/test/source/text/textsettings.cxx
@@ -44,7 +44,7 @@ bool isPropertyReadOnly(css::uno::Reference<css::beans::XPropertySet> const& rxP
// [property] string PrinterName;
void testPrinterName(css::uno::Reference<css::beans::XPropertySet> const& rxSettings)
{
- const OUString rPropertyName("PrinterName");
+ static const OUStringLiteral rPropertyName(u"PrinterName");
if (!extstsProperty(rxSettings, rPropertyName))
return; // Property is sometimes not set - bug? it is not defined as optional
@@ -67,7 +67,7 @@ void testPrinterName(css::uno::Reference<css::beans::XPropertySet> const& rxSett
// [optional, property] short PrinterIndependentLayout;
void testPrinterIndependentLayout(css::uno::Reference<css::beans::XPropertySet> const& rxSettings)
{
- const OUString rPropertyName("PrinterIndependentLayout");
+ static const OUStringLiteral rPropertyName(u"PrinterIndependentLayout");
if (!extstsProperty(rxSettings, rPropertyName))
return; // Property is optional
@@ -91,7 +91,7 @@ void testPrinterIndependentLayout(css::uno::Reference<css::beans::XPropertySet>
// [optional, property] com::sun::star::i18n::XForbiddenCharacters ForbiddenCharacters;
void testForbiddenCharacters(css::uno::Reference<css::beans::XPropertySet> const& rxSettings)
{
- const OUString rPropertyName("ForbiddenCharacters");
+ static const OUStringLiteral rPropertyName(u"ForbiddenCharacters");
if (!extstsProperty(rxSettings, rPropertyName))
return; // Property is optional
diff --git a/ucb/source/core/ucbcmds.cxx b/ucb/source/core/ucbcmds.cxx
index 819f3a05c155..685767f6cbf9 100644
--- a/ucb/source/core/ucbcmds.cxx
+++ b/ucb/source/core/ucbcmds.cxx
@@ -1510,7 +1510,7 @@ void globalTransfer_(
0,
rContext.xEnv );
- const OUString cmdName("flush");
+ static const OUStringLiteral cmdName(u"flush");
if((aAny >>= xci) && xci->hasCommandByName(cmdName))
xcp->execute(
ucb::Command(
diff --git a/ucb/source/core/ucbstore.cxx b/ucb/source/core/ucbstore.cxx
index bf86eba5fefc..735d83fb2991 100644
--- a/ucb/source/core/ucbstore.cxx
+++ b/ucb/source/core/ucbstore.cxx
@@ -1746,9 +1746,9 @@ Sequence< PropertyValue > SAL_CALL PersistentPropertySet::getPropertyValues()
{
Sequence< PropertyValue > aValues( nCount );
- const OUString aHandleName("/Handle");
- const OUString aValueName("/Value");
- const OUString aStateName("/State");
+ static const OUStringLiteral aHandleName(u"/Handle");
+ static const OUStringLiteral aValueName(u"/Value");
+ static const OUStringLiteral aStateName(u"/State");
for ( sal_Int32 n = 0; n < nCount; ++n )
{
@@ -2087,9 +2087,9 @@ Sequence< Property > SAL_CALL PropertySetInfo_Impl::getProperties()
if ( xHierNameAccess.is() )
{
- const OUString aHandleName("/Handle");
- const OUString aValueName("/Value");
- const OUString aAttrName("/Attributes");
+ static const OUStringLiteral aHandleName(u"/Handle");
+ static const OUStringLiteral aValueName(u"/Value");
+ static const OUStringLiteral aAttrName(u"/Attributes");
Property* pProps = pPropSeq->getArray();
diff --git a/ucb/source/ucp/ext/ucpext_provider.cxx b/ucb/source/ucp/ext/ucpext_provider.cxx
index 3befadd28a81..eac919e4099b 100644
--- a/ucb/source/ucp/ext/ucpext_provider.cxx
+++ b/ucb/source/ucp/ext/ucpext_provider.cxx
@@ -93,7 +93,7 @@ namespace ucb::ucp::ext
Reference< XContent > SAL_CALL ContentProvider::queryContent( const Reference< XContentIdentifier >& i_rIdentifier )
{
// Check URL scheme...
- const OUString sScheme( "vnd.sun.star.extension" );
+ static const OUStringLiteral sScheme( u"vnd.sun.star.extension" );
if ( !i_rIdentifier->getContentProviderScheme().equalsIgnoreAsciiCase( sScheme ) )
throw IllegalIdentifierException();
diff --git a/ucb/source/ucp/file/bc.cxx b/ucb/source/ucp/file/bc.cxx
index e77f6ed45e22..d85a214063ba 100644
--- a/ucb/source/ucp/file/bc.cxx
+++ b/ucb/source/ucp/file/bc.cxx
@@ -696,7 +696,7 @@ BaseContent::setPropertyValues(
return Sequence< Any >( Values.getLength() );
}
- const OUString Title("Title");
+ static const OUStringLiteral Title(u"Title");
// Special handling for files which have to be inserted
if( m_nState & JustInserted )
diff --git a/unodevtools/source/unodevtools/options.cxx b/unodevtools/source/unodevtools/options.cxx
index 98db9cae00ae..eb34e723c38a 100644
--- a/unodevtools/source/unodevtools/options.cxx
+++ b/unodevtools/source/unodevtools/options.cxx
@@ -31,7 +31,7 @@ namespace unodevtools {
bool readOption( OUString * pValue, const char * pOpt,
sal_uInt32 * pnIndex, const OUString & aArg)
{
- const OUString dash = "-";
+ static const OUStringLiteral dash = u"-";
if(aArg.indexOf(dash) != 0)
return false;
diff --git a/vcl/source/filter/FilterConfigItem.cxx b/vcl/source/filter/FilterConfigItem.cxx
index 1514ab60dd72..90933bbcc2cc 100644
--- a/vcl/source/filter/FilterConfigItem.cxx
+++ b/vcl/source/filter/FilterConfigItem.cxx
@@ -378,11 +378,10 @@ void FilterConfigItem::WriteInt32( const OUString& rKey, sal_Int32 nNewValue )
Reference< XStatusIndicator > FilterConfigItem::GetStatusIndicator() const
{
Reference< XStatusIndicator > xStatusIndicator;
- const OUString sStatusIndicator( "StatusIndicator" );
auto pPropVal = std::find_if(aFilterData.begin(), aFilterData.end(),
- [&sStatusIndicator](const css::beans::PropertyValue& rPropVal) {
- return rPropVal.Name == sStatusIndicator; });
+ [](const css::beans::PropertyValue& rPropVal) {
+ return rPropVal.Name == "StatusIndicator"; });
if (pPropVal != aFilterData.end())
{
pPropVal->Value >>= xStatusIndicator;
diff --git a/vcl/source/image/ImplImageTree.cxx b/vcl/source/image/ImplImageTree.cxx
index 92ef534467dc..51f61f1f29b4 100644
--- a/vcl/source/image/ImplImageTree.cxx
+++ b/vcl/source/image/ImplImageTree.cxx
@@ -562,7 +562,7 @@ bool ImplImageTree::findImage(std::vector<OUString> const & rPaths, ImageRequest
void ImplImageTree::loadImageLinks()
{
- const OUString aLinkFilename("links.txt");
+ static const OUStringLiteral aLinkFilename(u"links.txt");
if (!checkPathAccess())
return;
diff --git a/vcl/source/treelist/transfer.cxx b/vcl/source/treelist/transfer.cxx
index e659eef56c04..ac3557d0efd5 100644
--- a/vcl/source/treelist/transfer.cxx
+++ b/vcl/source/treelist/transfer.cxx
@@ -171,14 +171,14 @@ static void ImplSetParameterString( TransferableObjectDescriptor& rObjDesc, cons
if( xMimeType.is() )
{
- const OUString aClassNameString( "classname" );
- const OUString aTypeNameString( "typename" );
- const OUString aDisplayNameString( "displayname" );
- const OUString aViewAspectString( "viewaspect" );
- const OUString aWidthString( "width" );
- const OUString aHeightString( "height" );
- const OUString aPosXString( "posx" );
- const OUString aPosYString( "posy" );
+ static const OUStringLiteral aClassNameString( u"classname" );
+ static const OUStringLiteral aTypeNameString( u"typename" );
+ static const OUStringLiteral aDisplayNameString( u"displayname" );
+ static const OUStringLiteral aViewAspectString( u"viewaspect" );
+ static const OUStringLiteral aWidthString( u"width" );
+ static const OUStringLiteral aHeightString( u"height" );
+ static const OUStringLiteral aPosXString( u"posx" );
+ static const OUStringLiteral aPosYString( u"posy" );
if( xMimeType->hasParameter( aClassNameString ) )
{
@@ -1226,7 +1226,7 @@ void TransferableDataHelper::FillDataFlavorExVector( const Sequence< DataFlavor
Reference< XComponentContext > xContext( ::comphelper::getProcessComponentContext() );
Reference< XMimeContentTypeFactory > xMimeFact = MimeContentTypeFactory::create( xContext );
DataFlavorEx aFlavorEx;
- const OUString aCharsetStr( "charset" );
+ static const OUStringLiteral aCharsetStr( u"charset" );
for (auto const& rFlavor : rDataFlavorSeq)
@@ -2216,7 +2216,7 @@ bool TransferableDataHelper::IsEqual( const css::datatransfer::DataFlavor& rInte
if( xRequestType1->getFullMediaType().equalsIgnoreAsciiCase( "text/plain" ) )
{
// special handling for text/plain media types
- const OUString aCharsetString( "charset" );
+ static const OUStringLiteral aCharsetString( u"charset" );
if( !xRequestType2->hasParameter( aCharsetString ) ||
xRequestType2->getParameterValue( aCharsetString ).equalsIgnoreAsciiCase( "utf-16" ) ||
@@ -2228,7 +2228,7 @@ bool TransferableDataHelper::IsEqual( const css::datatransfer::DataFlavor& rInte
else if( xRequestType1->getFullMediaType().equalsIgnoreAsciiCase( "application/x-openoffice" ) )
{
// special handling for application/x-openoffice media types
- const OUString aFormatString( "windows_formatname" );
+ static const OUStringLiteral aFormatString( u"windows_formatname" );
if( xRequestType1->hasParameter( aFormatString ) &&
xRequestType2->hasParameter( aFormatString ) &&
diff --git a/vcl/unx/gtk3_kde5/gtk3_kde5_filepicker_ipc.cxx b/vcl/unx/gtk3_kde5/gtk3_kde5_filepicker_ipc.cxx
index 4bccf1e24d72..840ef268d4b1 100644
--- a/vcl/unx/gtk3_kde5/gtk3_kde5_filepicker_ipc.cxx
+++ b/vcl/unx/gtk3_kde5/gtk3_kde5_filepicker_ipc.cxx
@@ -63,7 +63,7 @@ OUString applicationDirPath()
OUString findPickerExecutable()
{
const auto path = applicationDirPath();
- const OUString app("lo_kde5filepicker");
+ static const OUStringLiteral app(u"lo_kde5filepicker");
OUString ret;
osl_searchFileURL(app.pData, path.pData, &ret.pData);
if (ret.isEmpty())
diff --git a/vcl/win/dtrans/MimeAttrib.hxx b/vcl/win/dtrans/MimeAttrib.hxx
index 33e53d779f01..ed47f0a4e0ca 100644
--- a/vcl/win/dtrans/MimeAttrib.hxx
+++ b/vcl/win/dtrans/MimeAttrib.hxx
@@ -21,11 +21,11 @@
#include <rtl/ustring.hxx>
-const OUString TEXTPLAIN_PARAM_CHARSET("charset");
+static const OUStringLiteral TEXTPLAIN_PARAM_CHARSET(u"charset");
-const OUString PRE_WINDOWS_CODEPAGE("windows");
-const OUString PRE_OEM_CODEPAGE("cp");
-const OUString CHARSET_UTF16("utf-16");
-const OUString CHARSET_UNICODE("unicode");
+static const OUStringLiteral PRE_WINDOWS_CODEPAGE(u"windows");
+static const OUStringLiteral PRE_OEM_CODEPAGE(u"cp");
+static const OUStringLiteral CHARSET_UTF16(u"utf-16");
+static const OUStringLiteral CHARSET_UNICODE(u"unicode");
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index d12a2ca8970f..d83ed06526f8 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -570,7 +570,7 @@ void DomainMapper_Impl::RemoveLastParagraph( )
(sizeof(SAL_NEWLINE_STRING)-1 == 2 && xCursor->getString() == "\n"))
{
uno::Reference<beans::XPropertySet> xDocProps(GetTextDocument(), uno::UNO_QUERY);
- const OUString aRecordChanges("RecordChanges");
+ static const OUStringLiteral aRecordChanges(u"RecordChanges");
uno::Any aPreviousValue(xDocProps->getPropertyValue(aRecordChanges));
// disable redlining for this operation, otherwise we might
diff --git a/xmloff/source/chart/SchXMLSeries2Context.cxx b/xmloff/source/chart/SchXMLSeries2Context.cxx
index b02d35c331b8..544616846338 100644
--- a/xmloff/source/chart/SchXMLSeries2Context.cxx
+++ b/xmloff/source/chart/SchXMLSeries2Context.cxx
@@ -884,7 +884,7 @@ void SchXMLSeries2Context::setStylesToSeries( SeriesDefaultsAndStyles& rSeriesDe
// this property)
bool bHasErrorBarRangesFromData = false;
{
- const OUString aErrorBarStylePropName( "ErrorBarStyle");
+ static const OUStringLiteral aErrorBarStylePropName( u"ErrorBarStyle");
uno::Any aErrorBarStyle(
SchXMLTools::getPropertyFromContext( aErrorBarStylePropName, pPropStyleContext, pStylesCtxt ));
if( aErrorBarStyle.hasValue())
diff --git a/xmloff/source/chart/SchXMLTableContext.cxx b/xmloff/source/chart/SchXMLTableContext.cxx
index 01ebb74b84bd..6b86ad529daf 100644
--- a/xmloff/source/chart/SchXMLTableContext.cxx
+++ b/xmloff/source/chart/SchXMLTableContext.cxx
@@ -104,7 +104,7 @@ void lcl_fillRangeMapping(
sal_Int32 nColOffset = ( rTable.bHasHeaderColumn ? 1 : 0 );
const OUString lcl_aCategoriesRange(aCategoriesRange);
- const OUString lcl_aLabelPrefix("label ");
+ static const OUStringLiteral lcl_aLabelPrefix(u"label ");
// Fill range mapping
const size_t nTableRowCount( rTable.aData.size());
diff --git a/xmloff/source/chart/SchXMLTools.cxx b/xmloff/source/chart/SchXMLTools.cxx
index 4f9a161b3273..db6a2e6a68ee 100644
--- a/xmloff/source/chart/SchXMLTools.cxx
+++ b/xmloff/source/chart/SchXMLTools.cxx
@@ -90,7 +90,7 @@ sal_Int32 lcl_getBuildIDFromGenerator( const OUString& rGenerator )
{
//returns -1 if nothing found
sal_Int32 nBuildId = -1;
- const OUString sBuildCompare( "$Build-" );
+ static const OUStringLiteral sBuildCompare( u"$Build-" );
sal_Int32 nBegin = rGenerator.indexOf( sBuildCompare );
if( nBegin >= 0 )
{
@@ -630,7 +630,7 @@ void setXMLRangePropertyAtDataSequence(
return;
try
{
- const OUString aXMLRangePropName( "CachedXMLRange" );
+ static const OUStringLiteral aXMLRangePropName( u"CachedXMLRange" );
Reference< beans::XPropertySet > xProp( xDataSequence, uno::UNO_QUERY_THROW );
Reference< beans::XPropertySetInfo > xInfo( xProp->getPropertySetInfo());
if( xInfo.is() && xInfo->hasPropertyByName( aXMLRangePropName ))
@@ -652,7 +652,7 @@ bool getXMLRangePropertyFromDataSequence(
{
try
{
- const OUString aXMLRangePropName( "CachedXMLRange" );
+ static const OUStringLiteral aXMLRangePropName( u"CachedXMLRange" );
Reference< beans::XPropertySet > xProp( xDataSequence, uno::UNO_QUERY_THROW );
Reference< beans::XPropertySetInfo > xInfo( xProp->getPropertySetInfo());
bResult =
@@ -838,7 +838,7 @@ Reference< chart2::data::XDataProvider > getDataProviderFromParent( const Refere
Reference< lang::XMultiServiceFactory > xFact( xChild->getParent(), uno::UNO_QUERY );
if( xFact.is() )
{
- const OUString aDataProviderServiceName( "com.sun.star.chart2.data.DataProvider");
+ static const OUStringLiteral aDataProviderServiceName( u"com.sun.star.chart2.data.DataProvider");
const uno::Sequence< OUString > aServiceNames( xFact->getAvailableServiceNames());
const OUString * pBegin = aServiceNames.getConstArray();
const OUString * pEnd = pBegin + aServiceNames.getLength();
diff --git a/xmloff/source/core/SettingsExportHelper.cxx b/xmloff/source/core/SettingsExportHelper.cxx
index 202e3322226f..f2cdf55ce9fd 100644
--- a/xmloff/source/core/SettingsExportHelper.cxx
+++ b/xmloff/source/core/SettingsExportHelper.cxx
@@ -286,16 +286,16 @@ void XMLSettingsExportHelper::exportSymbolDescriptors(
{
uno::Reference< container::XIndexContainer > xBox = document::IndexedPropertyValues::create(m_rContext.GetComponentContext());
- const OUString sName ( "Name" );
- const OUString sExportName ( "ExportName" );
- const OUString sSymbolSet ( "SymbolSet" );
- const OUString sCharacter ( "Character" );
- const OUString sFontName ( "FontName" );
- const OUString sCharSet ( "CharSet" );
- const OUString sFamily ( "Family" );
- const OUString sPitch ( "Pitch" );
- const OUString sWeight ( "Weight" );
- const OUString sItalic ( "Italic" );
+ static const OUStringLiteral sName ( u"Name" );
+ static const OUStringLiteral sExportName ( u"ExportName" );
+ static const OUStringLiteral sSymbolSet ( u"SymbolSet" );
+ static const OUStringLiteral sCharacter ( u"Character" );
+ static const OUStringLiteral sFontName ( u"FontName" );
+ static const OUStringLiteral sCharSet ( u"CharSet" );
+ static const OUStringLiteral sFamily ( u"Family" );
+ static const OUStringLiteral sPitch ( u"Pitch" );
+ static const OUStringLiteral sWeight ( u"Weight" );
+ static const OUStringLiteral sItalic ( u"Italic" );
sal_Int32 nCount = rProps.getLength();
const formula::SymbolDescriptor *pDescriptor = rProps.getConstArray();
@@ -426,11 +426,11 @@ void XMLSettingsExportHelper::exportForbiddenCharacters(
* xmloff/source/core/DocumentSettingsContext.cxx
* XMLConfigItemMapIndexedContext::EndElement() */
- const OUString sLanguage ( "Language" );
- const OUString sCountry ( "Country" );
- const OUString sVariant ( "Variant" );
- const OUString sBeginLine ( "BeginLine" );
- const OUString sEndLine ( "EndLine" );
+ static const OUStringLiteral sLanguage ( u"Language" );
+ static const OUStringLiteral sCountry ( u"Country" );
+ static const OUStringLiteral sVariant ( u"Variant" );
+ static const OUStringLiteral sBeginLine ( u"BeginLine" );
+ static const OUStringLiteral sEndLine ( u"EndLine" );
sal_Int32 nPos = 0;
for( const auto& rLocale : aLocales )
diff --git a/xmloff/source/core/xmlexp.cxx b/xmloff/source/core/xmlexp.cxx
index a6b22c178729..3d20d3e33f41 100644
--- a/xmloff/source/core/xmlexp.cxx
+++ b/xmloff/source/core/xmlexp.cxx
@@ -716,8 +716,8 @@ void SAL_CALL SvXMLExport::initialize( const uno::Sequence< uno::Any >& aArgumen
mpImpl->mStreamName = sName; // Note: may be empty (XSLT)
// Written OpenDocument file format doesn't fit to the created text document (#i69627#)
- const OUString sOutlineStyleAsNormalListStyle(
- "OutlineStyleAsNormalListStyle" );
+ static const OUStringLiteral sOutlineStyleAsNormalListStyle(
+ u"OutlineStyleAsNormalListStyle" );
if( xPropertySetInfo->hasPropertyByName( sOutlineStyleAsNormalListStyle ) )
{
uno::Any aAny = mxExportInfo->getPropertyValue( sOutlineStyleAsNormalListStyle );
@@ -728,8 +728,8 @@ void SAL_CALL SvXMLExport::initialize( const uno::Sequence< uno::Any >& aArgumen
if( xPropertySetInfo->hasPropertyByName( sTargetStorage ) )
mxExportInfo->getPropertyValue( sTargetStorage ) >>= mpImpl->mxTargetStorage;
- const OUString sExportTextNumberElement(
- "ExportTextNumberElement" );
+ static const OUStringLiteral sExportTextNumberElement(
+ u"ExportTextNumberElement" );
if( xPropertySetInfo->hasPropertyByName( sExportTextNumberElement ) )
{
uno::Any aAny = mxExportInfo->getPropertyValue( sExportTextNumberElement );
diff --git a/xmloff/source/draw/XMLGraphicsDefaultStyle.cxx b/xmloff/source/draw/XMLGraphicsDefaultStyle.cxx
index c6c07e27ebcc..2224b236c7aa 100644
--- a/xmloff/source/draw/XMLGraphicsDefaultStyle.cxx
+++ b/xmloff/source/draw/XMLGraphicsDefaultStyle.cxx
@@ -122,7 +122,7 @@ void XMLGraphicsDefaultStyle::SetDefaults()
) )
bWordWrapDefault = false;
- const OUString sTextWordWrap( "TextWordWrap" );
+ static const OUStringLiteral sTextWordWrap( u"TextWordWrap" );
Reference< XPropertySetInfo > xInfo( xDefaults->getPropertySetInfo() );
if ( xInfo->hasPropertyByName( sTextWordWrap ) )
xDefaults->setPropertyValue( sTextWordWrap, Any( bWordWrapDefault ) );
diff --git a/xmloff/source/draw/layerexp.cxx b/xmloff/source/draw/layerexp.cxx
index 36f74ba5696d..9ac924e92c6c 100644
--- a/xmloff/source/draw/layerexp.cxx
+++ b/xmloff/source/draw/layerexp.cxx
@@ -53,12 +53,12 @@ void SdXMLayerExporter::exportLayer( SvXMLExport& rExport )
if( nCount == 0 )
return;
- const OUString strName( "Name" );
- const OUString strTitle( "Title" );
- const OUString strDescription( "Description" );
- const OUString strIsVisible( "IsVisible");
- const OUString strIsPrintable( "IsPrintable");
- const OUString strIsLocked( "IsLocked" );
+ static const OUStringLiteral strName( u"Name" );
+ static const OUStringLiteral strTitle( u"Title" );
+ static const OUStringLiteral strDescription( u"Description" );
+ static const OUStringLiteral strIsVisible( u"IsVisible");
+ static const OUStringLiteral strIsPrintable( u"IsPrintable");
+ static const OUStringLiteral strIsLocked( u"IsLocked" );
OUString sTmp;
diff --git a/xmloff/source/draw/sdxmlexp.cxx b/xmloff/source/draw/sdxmlexp.cxx
index 515644f953cd..bab2dc2aa27f 100644
--- a/xmloff/source/draw/sdxmlexp.cxx
+++ b/xmloff/source/draw/sdxmlexp.cxx
@@ -1373,7 +1373,7 @@ HeaderFooterPageSettingsImpl SdXMLExport::ImpPrepDrawPageHeaderFooterDecls( cons
OUString aStrText;
- const OUString aStrHeaderTextProp( "HeaderText" );
+ static const OUStringLiteral aStrHeaderTextProp( u"HeaderText" );
if( xInfo->hasPropertyByName( aStrHeaderTextProp ) )
{
xSet->getPropertyValue( aStrHeaderTextProp ) >>= aStrText;
@@ -1381,7 +1381,7 @@ HeaderFooterPageSettingsImpl SdXMLExport::ImpPrepDrawPageHeaderFooterDecls( cons
aSettings.maStrHeaderDeclName = findOrAppendImpl( maHeaderDeclsVector, aStrText, gpStrHeaderTextPrefix );
}
- const OUString aStrFooterTextProp( "FooterText" );
+ static const OUStringLiteral aStrFooterTextProp( u"FooterText" );
if( xInfo->hasPropertyByName( aStrFooterTextProp ) )
{
xSet->getPropertyValue( aStrFooterTextProp ) >>= aStrText;
@@ -1389,7 +1389,7 @@ HeaderFooterPageSettingsImpl SdXMLExport::ImpPrepDrawPageHeaderFooterDecls( cons
aSettings.maStrFooterDeclName = findOrAppendImpl( maFooterDeclsVector, aStrText, gpStrFooterTextPrefix );
}
- const OUString aStrDateTimeTextProp( "DateTimeText" );
+ static const OUStringLiteral aStrDateTimeTextProp( u"DateTimeText" );
if( xInfo->hasPropertyByName( aStrDateTimeTextProp ) )
{
bool bFixed = false;
@@ -1507,7 +1507,7 @@ OUString SdXMLExport::ImpCreatePresPageStyleName( const Reference<XDrawPage>& xD
// which itself is a property of the pages property set
// we now merge these two propertysets if possible to simulate
// a single propertyset with all draw page properties
- const OUString aBackground("Background");
+ static const OUStringLiteral aBackground(u"Background");
Reference< beans::XPropertySet > xPropSet2;
Reference< beans::XPropertySetInfo > xInfo( xPropSet1->getPropertySetInfo() );
if( xInfo.is() && xInfo->hasPropertyByName( aBackground ) )
diff --git a/xmloff/source/draw/shapeexport.cxx b/xmloff/source/draw/shapeexport.cxx
index 27f280d7ed9b..823f4dbefb3a 100644
--- a/xmloff/source/draw/shapeexport.cxx
+++ b/xmloff/source/draw/shapeexport.cxx
@@ -2345,7 +2345,7 @@ namespace
OUString getNameFromStreamURL(OUString const & rURL)
{
- const OUString sPackageURL("vnd.sun.star.Package:");
+ static const OUStringLiteral sPackageURL(u"vnd.sun.star.Package:");
OUString sResult;
@@ -3017,7 +3017,7 @@ void XMLShapeExport::ImpExportPageShape(
// export page number used for this page
uno::Reference< beans::XPropertySetInfo > xPropSetInfo( xPropSet->getPropertySetInfo() );
- const OUString aPageNumberStr("PageNumber");
+ static const OUStringLiteral aPageNumberStr(u"PageNumber");
if( xPropSetInfo.is() && xPropSetInfo->hasPropertyByName(aPageNumberStr))
{
sal_Int32 nPageNumber = 0;
@@ -3338,14 +3338,14 @@ void XMLShapeExport::ImpExportMediaShape(
const OUString aFalseStr( "false" ), aTrueStr( "true" );
bool bLoop = false;
- const OUString aLoopStr( "Loop" );
+ static const OUStringLiteral aLoopStr( u"Loop" );
xPropSet->getPropertyValue( aLoopStr ) >>= bLoop;
mrExport.AddAttribute( XML_NAMESPACE_DRAW, XML_NAME, aLoopStr );
mrExport.AddAttribute( XML_NAMESPACE_DRAW, XML_VALUE, bLoop ? aTrueStr : aFalseStr );
delete new SvXMLElementExport( mrExport, XML_NAMESPACE_DRAW, XML_PARAM, false, true );
bool bMute = false;
- const OUString aMuteStr( "Mute" );
+ static const OUStringLiteral aMuteStr( u"Mute" );
xPropSet->getPropertyValue( aMuteStr ) >>= bMute;
mrExport.AddAttribute( XML_NAMESPACE_DRAW, XML_NAME, aMuteStr );
mrExport.AddAttribute( XML_NAMESPACE_DRAW, XML_VALUE, bMute ? aTrueStr : aFalseStr );
@@ -3709,9 +3709,9 @@ void XMLShapeExport::export3DLamps( const css::uno::Reference< css::beans::XProp
OUString aStr;
OUStringBuffer sStringBuffer;
- const OUString aColorPropName("D3DSceneLightColor");
- const OUString aDirectionPropName("D3DSceneLightDirection");
- const OUString aLightOnPropName("D3DSceneLightOn");
+ static const OUStringLiteral aColorPropName(u"D3DSceneLightColor");
+ static const OUStringLiteral aDirectionPropName(u"D3DSceneLightDirection");
+ static const OUStringLiteral aLightOnPropName(u"D3DSceneLightOn");
::basegfx::B3DVector aLightDirection;
drawing::Direction3D aLightDir;
@@ -4163,7 +4163,7 @@ static void ImpExportEnhancedGeometry( SvXMLExport& rExport, const uno::Referenc
uno::Reference< beans::XPropertySetInfo > xPropSetInfo( xPropSet->getPropertySetInfo() );
// geometry
- const OUString sCustomShapeGeometry( "CustomShapeGeometry" );
+ static const OUStringLiteral sCustomShapeGeometry( u"CustomShapeGeometry" );
if ( xPropSetInfo.is() && xPropSetInfo->hasPropertyByName( sCustomShapeGeometry ) )
{
uno::Any aGeoPropSet( xPropSet->getPropertyValue( sCustomShapeGeometry ) );
diff --git a/xmloff/source/draw/xexptran.cxx b/xmloff/source/draw/xexptran.cxx
index ce3eeac8d45f..c8e7f51bb403 100644
--- a/xmloff/source/draw/xexptran.cxx
+++ b/xmloff/source/draw/xexptran.cxx
@@ -357,12 +357,12 @@ void SdXMLImExTransform2D::SetString(const OUString& rNew, const SvXMLUnitConver
const OUString aStr = msString;
const sal_Int32 nLen(aStr.getLength());
- const OUString aString_rotate( "rotate" );
- const OUString aString_scale( "scale" );
- const OUString aString_translate( "translate" );
- const OUString aString_skewX( "skewX" );
- const OUString aString_skewY( "skewY" );
- const OUString aString_matrix( "matrix" );
+ static const OUStringLiteral aString_rotate( u"rotate" );
+ static const OUStringLiteral aString_scale( u"scale" );
+ static const OUStringLiteral aString_translate( u"translate" );
+ static const OUStringLiteral aString_skewX( u"skewX" );
+ static const OUStringLiteral aString_skewY( u"skewY" );
+ static const OUStringLiteral aString_matrix( u"matrix" );
sal_Int32 nPos(0);
@@ -764,12 +764,12 @@ void SdXMLImExTransform3D::SetString(const OUString& rNew, const SvXMLUnitConver
const OUString aStr = msString;
const sal_Int32 nLen(aStr.getLength());
- const OUString aString_rotatex( "rotatex" );
- const OUString aString_rotatey( "rotatey" );
- const OUString aString_rotatez( "rotatez" );
- const OUString aString_scale( "scale" );
- const OUString aString_translate( "translate" );
- const OUString aString_matrix( "matrix" );
+ static const OUStringLiteral aString_rotatex( u"rotatex" );
+ static const OUStringLiteral aString_rotatey( u"rotatey" );
+ static const OUStringLiteral aString_rotatez( u"rotatez" );
+ static const OUStringLiteral aString_scale( u"scale" );
+ static const OUStringLiteral aString_translate( u"translate" );
+ static const OUStringLiteral aString_matrix( u"matrix" );
sal_Int32 nPos(0);
diff --git a/xmloff/source/draw/ximppage.cxx b/xmloff/source/draw/ximppage.cxx
index be6732d5fe96..c6777d015236 100644
--- a/xmloff/source/draw/ximppage.cxx
+++ b/xmloff/source/draw/ximppage.cxx
@@ -286,7 +286,7 @@ void SdXMLGenericPageContext::endFastElement(sal_Int32 )
if( !maUseHeaderDeclName.isEmpty() )
{
- const OUString aStrHeaderTextProp( "HeaderText" );
+ static const OUStringLiteral aStrHeaderTextProp( u"HeaderText" );
if( xInfo->hasPropertyByName( aStrHeaderTextProp ) )
xSet->setPropertyValue( aStrHeaderTextProp,
makeAny( GetSdImport().GetHeaderDecl( maUseHeaderDeclName ) ) );
@@ -294,7 +294,7 @@ void SdXMLGenericPageContext::endFastElement(sal_Int32 )
if( !maUseFooterDeclName.isEmpty() )
{
- const OUString aStrFooterTextProp( "FooterText" );
+ static const OUStringLiteral aStrFooterTextProp( u"FooterText" );
if( xInfo->hasPropertyByName( aStrFooterTextProp ) )
xSet->setPropertyValue( aStrFooterTextProp,
makeAny( GetSdImport().GetFooterDecl( maUseFooterDeclName ) ) );
@@ -302,7 +302,7 @@ void SdXMLGenericPageContext::endFastElement(sal_Int32 )
if( !maUseDateTimeDeclName.isEmpty() )
{
- const OUString aStrDateTimeTextProp( "DateTimeText" );
+ static const OUStringLiteral aStrDateTimeTextProp( u"DateTimeText" );
if( xInfo->hasPropertyByName( aStrDateTimeTextProp ) )
{
bool bFixed;
@@ -369,7 +369,7 @@ void SdXMLGenericPageContext::SetStyle( OUString const & rStyleName )
Reference< beans::XPropertySet > xPropSet( xPropSet1 );
Reference< beans::XPropertySet > xBackgroundSet;
- const OUString aBackground("Background");
+ static const OUStringLiteral aBackground(u"Background");
if( xPropSet1->getPropertySetInfo()->hasPropertyByName( aBackground ) )
{
Reference< beans::XPropertySetInfo > xInfo( xPropSet1->getPropertySetInfo() );
diff --git a/xmloff/source/draw/ximpshap.cxx b/xmloff/source/draw/ximpshap.cxx
index 1e2d11f6e850..a1fdad1cc41c 100644
--- a/xmloff/source/draw/ximpshap.cxx
+++ b/xmloff/source/draw/ximpshap.cxx
@@ -2158,7 +2158,7 @@ void SdXMLPageShapeContext::startFastElement (sal_Int32 nElement,
if(xPropSet.is())
{
uno::Reference< beans::XPropertySetInfo > xPropSetInfo( xPropSet->getPropertySetInfo() );
- const OUString aPageNumberStr("PageNumber");
+ static const OUStringLiteral aPageNumberStr(u"PageNumber");
if( xPropSetInfo.is() && xPropSetInfo->hasPropertyByName(aPageNumberStr))
xPropSet->setPropertyValue(aPageNumberStr, uno::makeAny( mnPageNumber ));
}
@@ -2585,7 +2585,7 @@ void SdXMLObjectShapeContext::startFastElement (sal_Int32 /*nElement*/,
if ( GetImport().IsPackageURL( maHref ) )
{
- const OUString sURL( "vnd.sun.star.EmbeddedObject:" );
+ static const OUStringLiteral sURL( u"vnd.sun.star.EmbeddedObject:" );
if ( aPersistName.startsWith( sURL ) )
aPersistName = aPersistName.copy( sURL.getLength() );
@@ -2633,7 +2633,7 @@ void SdXMLObjectShapeContext::endFastElement(sal_Int32 nElement)
if( mxBase64Stream.is() )
{
OUString aPersistName( GetImport().ResolveEmbeddedObjectURLFromBase64() );
- const OUString sURL( "vnd.sun.star.EmbeddedObject:" );
+ static const OUStringLiteral sURL( u"vnd.sun.star.EmbeddedObject:" );
aPersistName = aPersistName.copy( sURL.getLength() );
@@ -2942,7 +2942,7 @@ void SdXMLPluginShapeContext::endFastElement(sal_Int32 nElement)
{
if ( maSize.Width && maSize.Height )
{
- const OUString sVisibleArea( "VisibleArea" );
+ static const OUStringLiteral sVisibleArea( u"VisibleArea" );
uno::Reference< beans::XPropertySetInfo > aXPropSetInfo( xProps->getPropertySetInfo() );
if ( !aXPropSetInfo.is() || aXPropSetInfo->hasPropertyByName( sVisibleArea ) )
{
@@ -3588,10 +3588,10 @@ void SdXMLCustomShapeContext::endFastElement(sal_Int32 nElement)
if (aScale.getX() < 0.0)
{
- const OUString sName("MirroredX");
+ static const OUStringLiteral sName(u"MirroredX");
//fdo#84043 Merge, if property exists, otherwise append it
auto aI = std::find_if(maCustomShapeGeometry.begin(), maCustomShapeGeometry.end(),
- [&sName](beans::PropertyValue& rValue) { return rValue.Name == sName; });
+ [](beans::PropertyValue& rValue) { return rValue.Name == sName; });
if (aI != maCustomShapeGeometry.end())
{
beans::PropertyValue& rItem = *aI;
@@ -3614,10 +3614,10 @@ void SdXMLCustomShapeContext::endFastElement(sal_Int32 nElement)
if (aScale.getY() < 0.0)
{
- const OUString sName("MirroredY");
+ static const OUStringLiteral sName(u"MirroredY");
//fdo#84043 Merge, if property exists, otherwise append it
auto aI = std::find_if(maCustomShapeGeometry.begin(), maCustomShapeGeometry.end(),
- [&sName](beans::PropertyValue& rValue) { return rValue.Name == sName; });
+ [](beans::PropertyValue& rValue) { return rValue.Name == sName; });
if (aI != maCustomShapeGeometry.end())
{
beans::PropertyValue& rItem = *aI;
diff --git a/xmloff/source/meta/xmlmetai.cxx b/xmloff/source/meta/xmlmetai.cxx
index a4d67dd92374..89dbc505fac5 100644
--- a/xmloff/source/meta/xmlmetai.cxx
+++ b/xmloff/source/meta/xmlmetai.cxx
@@ -245,8 +245,8 @@ void SvXMLMetaDocumentContext::setBuildId(OUString const& i_rBuildId, const uno:
{
OUStringBuffer sBuffer(
i_rBuildId.subView( nBegin+1, nEnd-nBegin-1 ) );
- const OUString sBuildCompare(
- "$Build-" );
+ static const OUStringLiteral sBuildCompare(
+ u"$Build-" );
nBegin = i_rBuildId.indexOf( sBuildCompare, nEnd );
if ( nBegin != -1 )
{
@@ -305,7 +305,7 @@ void SvXMLMetaDocumentContext::setBuildId(OUString const& i_rBuildId, const uno:
{
if( xImportInfo.is() )
{
- const OUString aPropName("BuildId");
+ static const OUStringLiteral aPropName(u"BuildId");
uno::Reference< beans::XPropertySetInfo > xSetInfo(
xImportInfo->getPropertySetInfo());
if( xSetInfo.is() && xSetInfo->hasPropertyByName( aPropName ) )
diff --git a/xmloff/source/style/XMLPageExport.cxx b/xmloff/source/style/XMLPageExport.cxx
index 640e11b7094d..140b2d31a60e 100644
--- a/xmloff/source/style/XMLPageExport.cxx
+++ b/xmloff/source/style/XMLPageExport.cxx
@@ -215,7 +215,7 @@ XMLPageExport::XMLPageExport(SvXMLExport & rExp)
"getStyleFamilies() from XModel failed for export!" );
if( xFamilies.is() )
{
- const OUString aPageStyleName("PageStyles");
+ static const OUStringLiteral aPageStyleName(u"PageStyles");
if( xFamilies->hasByName( aPageStyleName ) )
{
diff --git a/xmloff/source/style/xmlnume.cxx b/xmloff/source/style/xmlnume.cxx
index 6c619fbc3b9c..b676d26e898c 100644
--- a/xmloff/source/style/xmlnume.cxx
+++ b/xmloff/source/style/xmlnume.cxx
@@ -792,7 +792,7 @@ void SvxXMLNumRuleExport::exportStyles( bool bUsed,
if( !xFamilies.is() )
return;
- const OUString aNumberStyleName( "NumberingStyles" );
+ static const OUStringLiteral aNumberStyleName( u"NumberingStyles" );
Reference< XIndexAccess > xStyles;
if( !xFamilies->hasByName( aNumberStyleName ) )
diff --git a/xmloff/source/table/XMLTableExport.cxx b/xmloff/source/table/XMLTableExport.cxx
index 203f25425816..9f1bcd88ff2e 100644
--- a/xmloff/source/table/XMLTableExport.cxx
+++ b/xmloff/source/table/XMLTableExport.cxx
@@ -689,7 +689,7 @@ void XMLCellStyleExport::exportStyleAttributes(const Reference<XStyle>& rStyle)
return;
Reference<XPropertySetInfo> xPropSetInfo(xPropSet->getPropertySetInfo());
- const OUString sNumberFormat("NumberFormat");
+ static const OUStringLiteral sNumberFormat(u"NumberFormat");
if (xPropSetInfo->hasPropertyByName(sNumberFormat))
{
Reference<XPropertyState> xPropState(xPropSet, UNO_QUERY);
diff --git a/xmloff/source/text/XMLSectionExport.cxx b/xmloff/source/text/XMLSectionExport.cxx
index 6ee77829170f..ca9ab26a9d42 100644
--- a/xmloff/source/text/XMLSectionExport.cxx
+++ b/xmloff/source/text/XMLSectionExport.cxx
@@ -1573,7 +1573,7 @@ void XMLSectionExport::ExportBibliographyConfiguration(SvXMLExport& rExport)
if ( !xTextFieldsSupp.is() )
return;
- const OUString sFieldMaster_Bibliography("com.sun.star.text.FieldMaster.Bibliography");
+ static const OUStringLiteral sFieldMaster_Bibliography(u"com.sun.star.text.FieldMaster.Bibliography");
// get bibliography field master
Reference<XNameAccess> xMasters =
diff --git a/xmloff/source/text/XMLTextFrameContext.cxx b/xmloff/source/text/XMLTextFrameContext.cxx
index 0e482c031838..39bbf597f9a5 100644
--- a/xmloff/source/text/XMLTextFrameContext.cxx
+++ b/xmloff/source/text/XMLTextFrameContext.cxx
@@ -305,14 +305,14 @@ XMLTextFrameContourContext_Impl::XMLTextFrameContourContext_Impl(
xPropSet->setPropertyValue( sContourPolyPolygon, Any(aPointSequenceSequence) );
}
- const OUString sIsPixelContour("IsPixelContour");
+ static const OUStringLiteral sIsPixelContour(u"IsPixelContour");
if( xPropSetInfo->hasPropertyByName( sIsPixelContour ) )
{
xPropSet->setPropertyValue( sIsPixelContour, Any(bPixelWidth) );
}
- const OUString sIsAutomaticContour("IsAutomaticContour");
+ static const OUStringLiteral sIsAutomaticContour(u"IsAutomaticContour");
if( xPropSetInfo->hasPropertyByName( sIsAutomaticContour ) )
{
diff --git a/xmloff/source/text/XMLTextHeaderFooterContext.cxx b/xmloff/source/text/XMLTextHeaderFooterContext.cxx
index 356e50f7260e..9c176c7f4f47 100644
--- a/xmloff/source/text/XMLTextHeaderFooterContext.cxx
+++ b/xmloff/source/text/XMLTextHeaderFooterContext.cxx
@@ -69,7 +69,7 @@ XMLTextHeaderFooterContext::XMLTextHeaderFooterContext( SvXMLImport& rImport,
}
if (bFirst)
{
- const OUString sShareContentFirst( "FirstIsShared" );
+ static const OUStringLiteral sShareContentFirst( u"FirstIsShared" );
aAny = xPropSet->getPropertyValue( sShareContentFirst );
bool bSharedFirst = bool();
if (!(aAny >>= bSharedFirst))
diff --git a/xmloff/source/text/txtimp.cxx b/xmloff/source/text/txtimp.cxx
index e88d5ed8b2e8..4d521f295b95 100644
--- a/xmloff/source/text/txtimp.cxx
+++ b/xmloff/source/text/txtimp.cxx
@@ -456,42 +456,42 @@ XMLTextImportHelper::XMLTextImportHelper(
{
Reference< XNameAccess > xFamilies(xFamiliesSupp->getStyleFamilies());
- const OUString aParaStyles("ParagraphStyles");
+ static const OUStringLiteral aParaStyles(u"ParagraphStyles");
if( xFamilies->hasByName( aParaStyles ) )
{
m_xImpl->m_xParaStyles.set(xFamilies->getByName(aParaStyles),
UNO_QUERY);
}
- const OUString aCharStyles("CharacterStyles");
+ static const OUStringLiteral aCharStyles(u"CharacterStyles");
if( xFamilies->hasByName( aCharStyles ) )
{
m_xImpl->m_xTextStyles.set(xFamilies->getByName(aCharStyles),
UNO_QUERY);
}
- const OUString aNumStyles("NumberingStyles");
+ static const OUStringLiteral aNumStyles(u"NumberingStyles");
if( xFamilies->hasByName( aNumStyles ) )
{
m_xImpl->m_xNumStyles.set(xFamilies->getByName(aNumStyles),
UNO_QUERY);
}
- const OUString aFrameStyles("FrameStyles");
+ static const OUStringLiteral aFrameStyles(u"FrameStyles");
if( xFamilies->hasByName( aFrameStyles ) )
{
m_xImpl->m_xFrameStyles.set(xFamilies->getByName(aFrameStyles),
UNO_QUERY);
}
- const OUString aPageStyles("PageStyles");
+ static const OUStringLiteral aPageStyles(u"PageStyles");
if( xFamilies->hasByName( aPageStyles ) )
{
m_xImpl->m_xPageStyles.set(xFamilies->getByName(aPageStyles),
UNO_QUERY);
}
- const OUString aCellStyles("CellStyles");
+ static const OUStringLiteral aCellStyles(u"CellStyles");
if( xFamilies->hasByName( aCellStyles ) )
{
m_xImpl->m_xCellStyles.set(xFamilies->getByName(aCellStyles),
diff --git a/xmloff/source/text/txtparae.cxx b/xmloff/source/text/txtparae.cxx
index d787537e26f0..bc12e93ba4be 100644
--- a/xmloff/source/text/txtparae.cxx
+++ b/xmloff/source/text/txtparae.cxx
@@ -379,8 +379,8 @@ void BoundFrames::Fill(const filter_t& rFilter)
const Reference< XEnumeration > xEnum = m_xEnumAccess->createEnumeration();
if(!xEnum.is())
return;
- const OUString our_sAnchorType("AnchorType");
- const OUString our_sAnchorFrame("AnchorFrame");
+ static const OUStringLiteral our_sAnchorType(u"AnchorType");
+ static const OUStringLiteral our_sAnchorFrame(u"AnchorFrame");
while(xEnum->hasMoreElements())
{
Reference<XPropertySet> xPropSet(xEnum->nextElement(), UNO_QUERY);
diff --git a/xmlsecurity/source/helper/documentsignaturemanager.cxx b/xmlsecurity/source/helper/documentsignaturemanager.cxx
index 78c2b4d59afa..b48a33fe2e05 100644
--- a/xmlsecurity/source/helper/documentsignaturemanager.cxx
+++ b/xmlsecurity/source/helper/documentsignaturemanager.cxx
@@ -172,9 +172,9 @@ bool DocumentSignatureManager::isXML(const OUString& rURI)
bool bIsXML = false;
bool bPropsAvailable = false;
- const OUString sPropFullPath("FullPath");
- const OUString sPropMediaType("MediaType");
- const OUString sPropDigest("Digest");
+ static const OUStringLiteral sPropFullPath(u"FullPath");
+ static const OUStringLiteral sPropMediaType(u"MediaType");
+ static const OUStringLiteral sPropDigest(u"Digest");
if (readManifest())
{