summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--chart2/qa/extras/chart2_trendcalculators.cxx8
-rw-r--r--chart2/source/tools/ExponentialRegressionCurveCalculator.cxx4
-rw-r--r--chart2/source/tools/LogarithmicRegressionCurveCalculator.cxx4
-rw-r--r--chart2/source/tools/PolynomialRegressionCurveCalculator.cxx2
-rw-r--r--chart2/source/tools/PotentialRegressionCurveCalculator.cxx2
-rw-r--r--chart2/source/view/charttypes/VSeriesPlotter.cxx2
-rw-r--r--comphelper/qa/string/test_string.cxx2
-rw-r--r--compilerplugins/clang/stringconstant.cxx16
-rw-r--r--connectivity/source/drivers/evoab2/NStatement.cxx6
-rw-r--r--connectivity/source/drivers/firebird/Util.cxx2
-rw-r--r--connectivity/source/drivers/flat/ETable.cxx2
-rw-r--r--cui/source/dialogs/FontFeaturesDialog.cxx2
-rw-r--r--cui/source/dialogs/hlinettp.cxx2
-rw-r--r--cui/source/options/optjava.cxx2
-rw-r--r--cui/source/options/optpath.cxx10
-rw-r--r--cui/source/tabpages/grfpage.cxx4
-rw-r--r--dbaccess/source/ui/app/AppControllerDnD.cxx2
-rw-r--r--desktop/source/pkgchk/unopkg/unopkg_misc.cxx2
-rw-r--r--editeng/source/accessibility/AccessibleStaticTextBase.cxx6
-rw-r--r--editeng/source/editeng/editeng.cxx2
-rw-r--r--editeng/source/editeng/impedit.cxx2
-rw-r--r--editeng/source/editeng/impedit3.cxx2
-rw-r--r--editeng/source/editeng/impedit4.cxx4
-rw-r--r--editeng/source/items/bulitem.cxx2
-rw-r--r--editeng/source/items/textitem.cxx4
-rw-r--r--editeng/source/lookuptree/Trie.cxx2
-rw-r--r--editeng/source/outliner/outliner.cxx2
-rw-r--r--embeddedobj/source/msole/ownview.cxx2
-rw-r--r--extensions/source/propctrlr/eventhandler.cxx2
-rw-r--r--filter/source/graphicfilter/idxf/dxfreprd.cxx6
-rw-r--r--filter/source/msfilter/svdfppt.cxx2
-rw-r--r--forms/source/xforms/model_ui.cxx2
-rw-r--r--fpicker/source/office/fileview.cxx2
-rw-r--r--helpcompiler/source/HelpIndexer.cxx2
-rw-r--r--i18npool/qa/cppunit/test_breakiterator.cxx8
-rw-r--r--i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx12
-rw-r--r--i18npool/source/indexentry/indexentrysupplier_default.cxx4
-rw-r--r--idl/source/prj/command.cxx4
-rw-r--r--include/rtl/stringconcat.hxx6
-rw-r--r--include/rtl/stringutils.hxx32
-rw-r--r--include/rtl/ustring.hxx2
-rw-r--r--jvmfwk/plugins/sunmajor/pluginlib/gnujre.cxx2
-rw-r--r--jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx2
-rw-r--r--jvmfwk/plugins/sunmajor/pluginlib/vendorbase.cxx2
-rw-r--r--oox/source/core/relations.cxx2
-rw-r--r--oox/source/dump/dumperbase.cxx2
-rw-r--r--oox/source/helper/containerhelper.cxx2
-rw-r--r--oox/source/helper/textinputstream.cxx2
-rw-r--r--oox/source/vml/vmlshape.cxx2
-rw-r--r--opencl/source/openclconfig.cxx2
-rw-r--r--package/qa/cppunit/test_package.cxx4
-rw-r--r--package/source/zippackage/zipfileaccess.cxx2
-rw-r--r--sal/qa/rtl/strings/test_oustring_stringliterals.cxx28
-rw-r--r--sal/qa/rtl/uri/rtl_testuri.cxx14
-rw-r--r--sc/qa/extras/macros-test.cxx2
-rw-r--r--sc/qa/unit/subsequent_export-test.cxx8
-rw-r--r--sc/qa/unit/subsequent_filters-test.cxx2
-rw-r--r--sc/source/core/data/global.cxx6
-rw-r--r--sc/source/core/data/global2.cxx2
-rw-r--r--sc/source/core/tool/compiler.cxx14
-rw-r--r--sc/source/core/tool/editutil.cxx2
-rw-r--r--sc/source/core/tool/rangelst.cxx2
-rw-r--r--sc/source/core/tool/rangeutl.cxx2
-rw-r--r--sc/source/core/tool/unitconv.cxx2
-rw-r--r--sc/source/filter/excel/xehelper.cxx4
-rw-r--r--sc/source/filter/excel/xelink.cxx2
-rw-r--r--sc/source/filter/excel/xiescher.cxx2
-rw-r--r--sc/source/filter/excel/xihelper.cxx8
-rw-r--r--sc/source/filter/excel/xiname.cxx2
-rw-r--r--sc/source/filter/excel/xlformula.cxx2
-rw-r--r--sc/source/filter/ftools/ftools.cxx8
-rw-r--r--sc/source/filter/oox/stylesbuffer.cxx2
-rw-r--r--sc/source/filter/oox/workbookhelper.cxx2
-rw-r--r--sc/source/filter/qpro/qpro.cxx2
-rw-r--r--sc/source/ui/app/inputhdl.cxx2
-rw-r--r--sc/source/ui/dbgui/asciiopt.cxx2
-rw-r--r--sc/source/ui/dbgui/scuiasciiopt.cxx2
-rw-r--r--sc/source/ui/docshell/impex.cxx8
-rw-r--r--sc/source/ui/optdlg/tpusrlst.cxx4
-rw-r--r--sc/source/ui/pagedlg/areasdlg.cxx6
-rw-r--r--sc/source/ui/vba/vbasheetobject.cxx2
-rw-r--r--sc/source/ui/view/prevwsh.cxx2
-rw-r--r--sc/source/ui/view/viewdata.cxx2
-rw-r--r--scaddins/source/analysis/analysishelper.cxx2
-rw-r--r--sd/source/core/drawdoc4.cxx4
-rw-r--r--sd/source/core/stlsheet.cxx2
-rw-r--r--sd/source/filter/eppt/pptx-epptbase.cxx2
-rw-r--r--sd/source/filter/eppt/pptx-text.cxx2
-rw-r--r--sd/source/ui/dlg/copydlg.cxx14
-rw-r--r--sd/source/ui/dlg/tpaction.cxx2
-rw-r--r--sd/source/ui/dlg/tpoption.cxx2
-rw-r--r--sd/source/ui/slideshow/slideshowimpl.cxx2
-rw-r--r--sfx2/source/appl/fileobj.cxx8
-rw-r--r--sfx2/source/appl/linkmgr2.cxx6
-rw-r--r--starmath/source/mathtype.cxx34
-rw-r--r--starmath/source/node.cxx2
-rw-r--r--starmath/source/ooxmlimport.cxx24
-rw-r--r--stoc/source/security/file_policy.cxx2
-rw-r--r--svl/qa/unit/svl.cxx8
-rw-r--r--svl/qa/unit/test_lngmisc.cxx2
-rw-r--r--svl/source/misc/lngmisc.cxx4
-rw-r--r--svl/source/numbers/zformat.cxx2
-rw-r--r--svl/source/numbers/zforscan.cxx38
-rw-r--r--svl/source/passwordcontainer/passwordcontainer.cxx4
-rw-r--r--svtools/source/control/inettbc.cxx4
-rw-r--r--svtools/source/misc/langtab.cxx4
-rw-r--r--svx/source/dialog/pagectrl.cxx2
-rw-r--r--svx/source/gallery2/galmisc.cxx4
-rw-r--r--svx/source/items/rotmodit.cxx2
-rw-r--r--svx/source/stbctrls/pszctrl.cxx2
-rw-r--r--svx/source/tbxctrls/layctrl.cxx2
-rw-r--r--svx/source/unodraw/UnoGraphicExporter.cxx4
-rw-r--r--sw/qa/core/uwriter.cxx16
-rw-r--r--sw/qa/extras/odfimport/odfimport.cxx4
-rw-r--r--sw/qa/extras/uiwriter/uiwriter.cxx26
-rw-r--r--sw/source/core/access/accportions.cxx2
-rw-r--r--sw/source/core/bastyp/calc.cxx2
-rw-r--r--sw/source/core/crsr/crstrvl.cxx2
-rw-r--r--sw/source/core/doc/DocumentFieldsManager.cxx4
-rw-r--r--sw/source/core/doc/acmplwrd.cxx4
-rw-r--r--sw/source/core/doc/docfld.cxx10
-rw-r--r--sw/source/core/doc/doctxm.cxx6
-rw-r--r--sw/source/core/docnode/ndsect.cxx2
-rw-r--r--sw/source/core/docnode/section.cxx4
-rw-r--r--sw/source/core/edit/autofmt.cxx14
-rw-r--r--sw/source/core/edit/editsh.cxx2
-rw-r--r--sw/source/core/edit/edlingu.cxx4
-rw-r--r--sw/source/core/fields/authfld.cxx2
-rw-r--r--sw/source/core/fields/cellfml.cxx6
-rw-r--r--sw/source/core/fields/dbfld.cxx12
-rw-r--r--sw/source/core/fields/ddefld.cxx2
-rw-r--r--sw/source/core/fields/docufld.cxx4
-rw-r--r--sw/source/core/fields/reffld.cxx2
-rw-r--r--sw/source/core/frmedt/fetab.cxx4
-rw-r--r--sw/source/core/graphic/ndgrf.cxx4
-rw-r--r--sw/source/core/table/swtable.cxx4
-rw-r--r--sw/source/core/text/porfld.cxx2
-rw-r--r--sw/source/core/tox/tox.cxx8
-rw-r--r--sw/source/core/tox/txmsrt.cxx6
-rw-r--r--sw/source/core/txtnode/thints.cxx4
-rw-r--r--sw/source/core/undo/unins.cxx2
-rw-r--r--sw/source/core/undo/unovwr.cxx8
-rw-r--r--sw/source/core/unocore/unofield.cxx6
-rw-r--r--sw/source/core/unocore/unosect.cxx14
-rw-r--r--sw/source/filter/ascii/ascatr.cxx2
-rw-r--r--sw/source/filter/html/css1atr.cxx4
-rw-r--r--sw/source/filter/html/htmlfld.cxx2
-rw-r--r--sw/source/filter/html/htmlftn.cxx6
-rw-r--r--sw/source/filter/html/htmlsect.cxx4
-rw-r--r--sw/source/filter/html/wrthtml.cxx2
-rw-r--r--sw/source/filter/ww8/docxattributeoutput.cxx2
-rw-r--r--sw/source/filter/ww8/rtfattributeoutput.cxx2
-rw-r--r--sw/source/filter/ww8/wrtw8nds.cxx6
-rw-r--r--sw/source/filter/ww8/ww8atr.cxx4
-rw-r--r--sw/source/filter/ww8/ww8par2.cxx2
-rw-r--r--sw/source/filter/ww8/ww8par3.cxx2
-rw-r--r--sw/source/filter/ww8/ww8par5.cxx6
-rw-r--r--sw/source/filter/xml/xmltbli.cxx4
-rw-r--r--sw/source/ui/dbui/dbinsdlg.cxx2
-rw-r--r--sw/source/ui/dbui/mmlayoutpage.cxx12
-rw-r--r--sw/source/ui/dialog/ascfldlg.cxx2
-rw-r--r--sw/source/ui/dialog/uiregionsw.cxx30
-rw-r--r--sw/source/ui/envelp/envlop1.cxx4
-rw-r--r--sw/source/ui/fldui/changedb.cxx6
-rw-r--r--sw/source/ui/fldui/flddb.cxx8
-rw-r--r--sw/source/ui/fldui/fldfunc.cxx2
-rw-r--r--sw/source/ui/fldui/fldvar.cxx12
-rw-r--r--sw/source/ui/index/cnttab.cxx22
-rw-r--r--sw/source/ui/misc/bookmark.cxx6
-rw-r--r--sw/source/ui/misc/glosbib.cxx10
-rw-r--r--sw/source/ui/misc/glossary.cxx6
-rw-r--r--sw/source/ui/vba/vbalisthelper.cxx2
-rw-r--r--sw/source/ui/vba/vbatablehelper.cxx4
-rw-r--r--sw/source/uibase/app/applab.cxx4
-rw-r--r--sw/source/uibase/app/docstyle.cxx4
-rw-r--r--sw/source/uibase/dbui/dbmgr.cxx8
-rw-r--r--sw/source/uibase/dbui/mmconfigitem.cxx2
-rw-r--r--sw/source/uibase/dialog/regionsw.cxx4
-rw-r--r--sw/source/uibase/dochdl/gloshdl.cxx4
-rw-r--r--sw/source/uibase/docvw/edtwin.cxx2
-rw-r--r--sw/source/uibase/docvw/edtwin2.cxx2
-rw-r--r--sw/source/uibase/fldui/fldmgr.cxx8
-rw-r--r--sw/source/uibase/misc/glosdoc.cxx10
-rw-r--r--sw/source/uibase/ribbar/inputwin.cxx12
-rw-r--r--sw/source/uibase/shells/textfld.cxx6
-rw-r--r--sw/source/uibase/shells/textsh2.cxx6
-rw-r--r--sw/source/uibase/sidebar/PageSizeControl.cxx2
-rw-r--r--sw/source/uibase/uno/unoatxt.cxx4
-rw-r--r--sw/source/uibase/utlui/content.cxx2
-rw-r--r--sw/source/uibase/utlui/glbltree.cxx4
-rw-r--r--sw/source/uibase/utlui/gloslst.cxx6
-rw-r--r--sw/source/uibase/wrtsh/wrtsh1.cxx2
-rw-r--r--sw/source/uibase/wrtsh/wrtsh2.cxx4
-rw-r--r--test/source/sheet/xsheetauditing.cxx2
-rw-r--r--unoidl/source/sourceprovider-scanner.l2
-rw-r--r--unotools/source/config/bootstrap.cxx6
-rw-r--r--unotools/source/i18n/resmgr.cxx4
-rw-r--r--unotools/source/misc/datetime.cxx6
-rw-r--r--vcl/source/control/combobox.cxx4
-rw-r--r--vcl/source/control/edit.cxx2
-rw-r--r--vcl/source/control/quickselectionengine.cxx2
-rw-r--r--vcl/source/font/OpenTypeFeatureDefinitonList.cxx2
-rw-r--r--vcl/source/gdi/pdfwriter_impl.cxx2
-rw-r--r--vcl/source/outdev/text.cxx4
-rw-r--r--vcl/source/treelist/inetimg.cxx10
-rw-r--r--vcl/source/uitest/logger.cxx4
-rw-r--r--vcl/source/window/mnemonic.cxx4
-rw-r--r--vcl/unx/generic/window/salframe.cxx2
-rw-r--r--vcl/win/window/salframe.cxx2
-rw-r--r--winaccessibility/source/UAccCOM/MAccessible.cxx2
-rw-r--r--writerfilter/source/dmapper/DomainMapper_Impl.cxx2
-rw-r--r--xmloff/source/style/xmlnumi.cxx4
212 files changed, 545 insertions, 533 deletions
diff --git a/chart2/qa/extras/chart2_trendcalculators.cxx b/chart2/qa/extras/chart2_trendcalculators.cxx
index a889b6637eb7..42dce791d83b 100644
--- a/chart2/qa/extras/chart2_trendcalculators.cxx
+++ b/chart2/qa/extras/chart2_trendcalculators.cxx
@@ -135,7 +135,7 @@ void Chart2TrendCalculators::testPotentialRegression2()
xValues[i] = d;
yValues[i] = -2.0 * pow ( d, 3 );
}
- checkCalculator( xValues, yValues, "f(x) = "+ OUStringLiteral1(aMinusSign) +" 2 x^3");
+ checkCalculator( xValues, yValues, "f(x) = "+ OUStringChar(aMinusSign) +" 2 x^3");
}
// test y = - 2 X - 5
@@ -151,7 +151,7 @@ void Chart2TrendCalculators::testLinearRegression1()
xValues[i] = d;
yValues[i] = - 2.0 * d - 5.0 ;
}
- checkCalculator( xValues, yValues, "f(x) = "+ OUStringLiteral1(aMinusSign) +" 2 x "+ OUStringLiteral1(aMinusSign) +" 5");
+ checkCalculator( xValues, yValues, "f(x) = "+ OUStringChar(aMinusSign) +" 2 x "+ OUStringChar(aMinusSign) +" 5");
}
// test y = A x ^ B
@@ -167,7 +167,7 @@ void Chart2TrendCalculators::testPolynomialRegression1()
xValues[i] = d;
yValues[i] = - 2.0 * d * d + 4 * d - 5;
}
- OUString sExpectedFormula( "f(x) = "+ OUStringLiteral1(aMinusSign) +" 2 x" + OUStringLiteral1( aSuperscriptFigures[2] ) + " + 4 x "+ OUStringLiteral1(aMinusSign) +" 5" );
+ OUString sExpectedFormula( "f(x) = "+ OUStringChar(aMinusSign) +" 2 x" + OUStringChar( aSuperscriptFigures[2] ) + " + 4 x "+ OUStringChar(aMinusSign) +" 5" );
checkCalculator( xValues, yValues, sExpectedFormula );
}
@@ -198,7 +198,7 @@ void Chart2TrendCalculators::testExponentialRegression2()
xValues[i] = d;
yValues[i] = -2.0 * exp ( 0.3 * d );
}
- checkCalculator( xValues, yValues, "f(x) = "+ OUStringLiteral1(aMinusSign) + " 2 exp( 0.3 x )");
+ checkCalculator( xValues, yValues, "f(x) = "+ OUStringChar(aMinusSign) + " 2 exp( 0.3 x )");
}
diff --git a/chart2/source/tools/ExponentialRegressionCurveCalculator.cxx b/chart2/source/tools/ExponentialRegressionCurveCalculator.cxx
index 42d0480d6b73..2c2b81359355 100644
--- a/chart2/source/tools/ExponentialRegressionCurveCalculator.cxx
+++ b/chart2/source/tools/ExponentialRegressionCurveCalculator.cxx
@@ -179,7 +179,7 @@ OUString ExponentialRegressionCurveCalculator::ImplGetRepresentation(
// if nValueLength not calculated then nullptr
sal_Int32* pValueLength = nValueLength ? &nValueLength : nullptr;
if ( m_fSign < 0.0 )
- aTmpBuf.append( OUStringLiteral1(aMinusSign) ).append( " " );
+ aTmpBuf.append( OUStringChar(aMinusSign) ).append( " " );
if ( bHasIntercept )
{
OUString aValueString = getFormattedString( xNumFormatter, nNumberFormatKey, fIntercept, pValueLength );
@@ -204,7 +204,7 @@ OUString ExponentialRegressionCurveCalculator::ImplGetRepresentation(
}
}
if ( m_fLogSlope < 0.0 )
- aTmpBuf.append( OUStringLiteral1(aMinusSign) ).append( " " );
+ aTmpBuf.append( OUStringChar(aMinusSign) ).append( " " );
if ( bHasLogSlope )
{
OUString aValueString = getFormattedString( xNumFormatter, nNumberFormatKey, fabs(m_fLogSlope), pValueLength );
diff --git a/chart2/source/tools/LogarithmicRegressionCurveCalculator.cxx b/chart2/source/tools/LogarithmicRegressionCurveCalculator.cxx
index aecbc4ed39c9..d164918970ba 100644
--- a/chart2/source/tools/LogarithmicRegressionCurveCalculator.cxx
+++ b/chart2/source/tools/LogarithmicRegressionCurveCalculator.cxx
@@ -156,7 +156,7 @@ OUString LogarithmicRegressionCurveCalculator::ImplGetRepresentation(
{
if( m_fSlope < 0.0 )
{
- aTmpBuf.append( OUStringLiteral1(aMinusSign) ).append( " " );
+ aTmpBuf.append( OUStringChar(aMinusSign) ).append( " " );
}
if( bHasSlope )
{
@@ -175,7 +175,7 @@ OUString LogarithmicRegressionCurveCalculator::ImplGetRepresentation(
}
// add intercept value
if( m_fIntercept < 0.0 )
- aTmpBuf.append( OUStringLiteral1(aMinusSign) ).append( " " );
+ aTmpBuf.append( OUStringChar(aMinusSign) ).append( " " );
OUString aValueString = getFormattedString( xNumFormatter, nNumberFormatKey, fabs(m_fIntercept), pValueLength );
if ( aValueString != "0" ) // aValueString may be rounded to 0 if nValueLength is small
{
diff --git a/chart2/source/tools/PolynomialRegressionCurveCalculator.cxx b/chart2/source/tools/PolynomialRegressionCurveCalculator.cxx
index b087fc52cede..8658f6004c1e 100644
--- a/chart2/source/tools/PolynomialRegressionCurveCalculator.cxx
+++ b/chart2/source/tools/PolynomialRegressionCurveCalculator.cxx
@@ -280,7 +280,7 @@ OUString PolynomialRegressionCurveCalculator::ImplGetRepresentation(
{
if ( bFindValue ) // if it is not the first aValue
aTmpBuf.append( " " );
- aTmpBuf.append( OUStringLiteral1(aMinusSign) ).append(" ");
+ aTmpBuf.append( OUStringChar(aMinusSign) ).append(" ");
aValue = - aValue;
}
else
diff --git a/chart2/source/tools/PotentialRegressionCurveCalculator.cxx b/chart2/source/tools/PotentialRegressionCurveCalculator.cxx
index 16b24b47392b..abda608a3c34 100644
--- a/chart2/source/tools/PotentialRegressionCurveCalculator.cxx
+++ b/chart2/source/tools/PotentialRegressionCurveCalculator.cxx
@@ -170,7 +170,7 @@ OUString PotentialRegressionCurveCalculator::ImplGetRepresentation(
// if nValueLength not calculated then nullptr
sal_Int32* pValueLength = nValueLength ? &nValueLength : nullptr;
if ( m_fIntercept < 0.0 ) // add intercept value
- aTmpBuf.append( OUStringLiteral1(aMinusSign) ).append( " " );
+ aTmpBuf.append( OUStringChar(aMinusSign) ).append( " " );
if( bHasIntercept )
{
OUString aValueString = getFormattedString( xNumFormatter, nNumberFormatKey, fabs(m_fIntercept), pValueLength );
diff --git a/chart2/source/view/charttypes/VSeriesPlotter.cxx b/chart2/source/view/charttypes/VSeriesPlotter.cxx
index cacba0bab258..33424056d720 100644
--- a/chart2/source/view/charttypes/VSeriesPlotter.cxx
+++ b/chart2/source/view/charttypes/VSeriesPlotter.cxx
@@ -1504,7 +1504,7 @@ void VSeriesPlotter::createRegressionCurveEquationShapes(
}
if( bShowCorrCoeff )
{
- aFormula.append( "R" ).append( OUStringLiteral1( aSuperscriptFigures[2] ) ).append( " = " );
+ aFormula.append( "R" ).append( OUStringChar( aSuperscriptFigures[2] ) ).append( " = " );
double fR( xRegressionCurveCalculator->getCorrelationCoefficient());
if (m_apNumberFormatterWrapper)
{
diff --git a/comphelper/qa/string/test_string.cxx b/comphelper/qa/string/test_string.cxx
index 47f001addcdf..08689d778d76 100644
--- a/comphelper/qa/string/test_string.cxx
+++ b/comphelper/qa/string/test_string.cxx
@@ -66,7 +66,7 @@ void TestString::testDecimalStringToNumber()
{
OUString s1("1234");
CPPUNIT_ASSERT_EQUAL(sal_uInt32(1234), comphelper::string::decimalStringToNumber(s1));
- s1 += OUStringLiteral1(0x07C6);
+ s1 += OUStringChar(0x07C6);
CPPUNIT_ASSERT_EQUAL(sal_uInt32(12346), comphelper::string::decimalStringToNumber(s1));
// Codepoints on 2 16bits words
sal_uInt32 utf16String[] = { 0x1D7FE /* 8 */, 0x1D7F7 /* 1 */};
diff --git a/compilerplugins/clang/stringconstant.cxx b/compilerplugins/clang/stringconstant.cxx
index ed332e5644e0..309bf900e377 100644
--- a/compilerplugins/clang/stringconstant.cxx
+++ b/compilerplugins/clang/stringconstant.cxx
@@ -194,7 +194,7 @@ private:
enum class TreatEmpty { DefaultCtor, CheckEmpty, Error };
- enum class ChangeKind { Char, CharLen, SingleChar, OUStringLiteral1 };
+ enum class ChangeKind { Char, CharLen, SingleChar, OUStringChar };
enum class PassThrough { No, EmptyConstantString, NonEmptyConstantString };
@@ -871,10 +871,10 @@ bool StringConstant::VisitCXXConstructExpr(CXXConstructExpr const * expr) {
{
auto arg = expr->getArg(0);
if (loplugin::TypeCheck(arg->getType())
- .Class("OUStringLiteral1_").Namespace("rtl")
+ .Class("OUStringChar_").Namespace("rtl")
.GlobalNamespace())
{
- kind = ChangeKind::OUStringLiteral1;
+ kind = ChangeKind::OUStringChar;
pass = PassThrough::NonEmptyConstantString;
simplify = false;
} else {
@@ -1206,7 +1206,7 @@ bool StringConstant::VisitCXXConstructExpr(CXXConstructExpr const * expr) {
DiagnosticsEngine::Warning,
("rewrite construction of %0 with %1 in"
" call of '%2' as construction of"
- " 'OUStringLiteral1'"),
+ " 'OUStringChar'"),
getMemberLocation(expr))
<< classdecl << describeChangeKind(kind)
<< fdecl->getQualifiedNameAsString()
@@ -1331,8 +1331,8 @@ std::string StringConstant::describeChangeKind(ChangeKind kind) {
return "string constant and matching length arguments";
case ChangeKind::SingleChar:
return "sal_Unicode argument";
- case ChangeKind::OUStringLiteral1:
- return "OUStringLiteral1 argument";
+ case ChangeKind::OUStringChar:
+ return "OUStringChar argument";
}
llvm_unreachable("unknown change kind");
}
@@ -2000,12 +2000,12 @@ void StringConstant::handleStringCtor(
.Typedef(stringKind == StringKind::Unicode ? "sal_Unicode" : "char").GlobalNamespace()))
{
// It may not be easy to rewrite OUString(c), esp. given there is no
- // OUString ctor taking an OUStringLiteral1 arg, so don't warn there:
+ // OUString ctor taking an OUStringChar arg, so don't warn there:
if (!explicitFunctionalCastNotation) {
report(
DiagnosticsEngine::Warning,
("in call of '%0', replace 'OUString' constructed from a"
- " 'sal_Unicode' with an 'OUStringLiteral1'"),
+ " 'sal_Unicode' with an 'OUStringChar'"),
e3->getExprLoc())
<< callee->getQualifiedNameAsString() << expr->getSourceRange();
}
diff --git a/connectivity/source/drivers/evoab2/NStatement.cxx b/connectivity/source/drivers/evoab2/NStatement.cxx
index 8f6d7959f222..e7f9dd6b794e 100644
--- a/connectivity/source/drivers/evoab2/NStatement.cxx
+++ b/connectivity/source/drivers/evoab2/NStatement.cxx
@@ -361,7 +361,7 @@ EBookQuery *OCommonStatement::whereAnalysis( const OSQLParseNode* parseTree )
OUString aMatchString = pAtom->getTokenValue();
// Determine where '%' character is...
- if( aMatchString == OUStringLiteral1(WILDCARD) )
+ if( aMatchString == OUStringChar(WILDCARD) )
{
// String containing only a '%' and nothing else matches everything
pResult = createTest( aColumnName, E_BOOK_QUERY_CONTAINS,
@@ -381,7 +381,7 @@ EBookQuery *OCommonStatement::whereAnalysis( const OSQLParseNode* parseTree )
}
else if( aMatchString.indexOf ( WILDCARD ) == aMatchString.lastIndexOf ( WILDCARD ) )
{ // One occurrence of '%' matches...
- if ( aMatchString.startsWith(OUStringLiteral1(WILDCARD)) )
+ if ( aMatchString.startsWith(OUStringChar(WILDCARD)) )
pResult = createTest( aColumnName, E_BOOK_QUERY_ENDS_WITH, aMatchString.copy( 1 ) );
else if ( aMatchString.indexOf ( WILDCARD ) == aMatchString.getLength() - 1 )
pResult = createTest( aColumnName, E_BOOK_QUERY_BEGINS_WITH, aMatchString.copy( 0, aMatchString.getLength() - 1 ) );
@@ -389,7 +389,7 @@ EBookQuery *OCommonStatement::whereAnalysis( const OSQLParseNode* parseTree )
m_xConnection->throwGenericSQLException(STR_QUERY_LIKE_WILDCARD,*this);
}
else if( aMatchString.getLength() >= 3 &&
- aMatchString.startsWith(OUStringLiteral1(WILDCARD)) &&
+ aMatchString.startsWith(OUStringChar(WILDCARD)) &&
aMatchString.indexOf ( WILDCARD, 1) == aMatchString.getLength() - 1 ) {
// one '%' at the start and another at the end
pResult = createTest( aColumnName, E_BOOK_QUERY_CONTAINS, aMatchString.copy (1, aMatchString.getLength() - 2) );
diff --git a/connectivity/source/drivers/firebird/Util.cxx b/connectivity/source/drivers/firebird/Util.cxx
index 0c63c048d32e..c4d6eeece4d1 100644
--- a/connectivity/source/drivers/firebird/Util.cxx
+++ b/connectivity/source/drivers/firebird/Util.cxx
@@ -395,7 +395,7 @@ OUString firebird::escapeWith( const OUString& sText, const char aKey, const cha
while( (aIndex = sRet.indexOf(aKey, aIndex)) > 0 &&
aIndex < sRet.getLength())
{
- sRet = sRet.replaceAt(aIndex, 1, OUStringLiteral1(aEscapeChar) + OUStringLiteral1(aKey) );
+ sRet = sRet.replaceAt(aIndex, 1, OUStringChar(aEscapeChar) + OUStringChar(aKey) );
aIndex+= 2;
}
diff --git a/connectivity/source/drivers/flat/ETable.cxx b/connectivity/source/drivers/flat/ETable.cxx
index 0e2290dddc91..05ac29b79ff2 100644
--- a/connectivity/source/drivers/flat/ETable.cxx
+++ b/connectivity/source/drivers/flat/ETable.cxx
@@ -673,7 +673,7 @@ bool OFlatTable::fetchRow(OValueRefRow& _rRow, const OSQLColumns & _rCols, bool
else
{
if ( cThousandDelimiter )
- aStrConverted = aStr.replaceAll(OUStringLiteral1(cThousandDelimiter), "");
+ aStrConverted = aStr.replaceAll(OUStringChar(cThousandDelimiter), "");
else
aStrConverted = aStr;
}
diff --git a/cui/source/dialogs/FontFeaturesDialog.cxx b/cui/source/dialogs/FontFeaturesDialog.cxx
index 6e9831561ce0..20ac4b67e3c8 100644
--- a/cui/source/dialogs/FontFeaturesDialog.cxx
+++ b/cui/source/dialogs/FontFeaturesDialog.cxx
@@ -207,7 +207,7 @@ OUString FontFeaturesDialog::createFontNameWithFeatures()
sResultFontName = vcl::font::trimFontNameFeatures(m_sFontName);
if (!sNameSuffix.isEmpty())
sResultFontName
- += OUStringLiteral1(vcl::font::FeaturePrefix) + sNameSuffix.makeStringAndClear();
+ += OUStringChar(vcl::font::FeaturePrefix) + sNameSuffix.makeStringAndClear();
return sResultFontName;
}
diff --git a/cui/source/dialogs/hlinettp.cxx b/cui/source/dialogs/hlinettp.cxx
index 4867a43bbe00..18df910f6054 100644
--- a/cui/source/dialogs/hlinettp.cxx
+++ b/cui/source/dialogs/hlinettp.cxx
@@ -376,7 +376,7 @@ void SvxHyperlinkInternetTp::SetMarkStr ( const OUString& aStrMark )
if( nPos != -1 )
aStrURL = aStrURL.copy(0, nPos);
- aStrURL += OUStringLiteral1(sUHash) + aStrMark;
+ aStrURL += OUStringChar(sUHash) + aStrMark;
m_xCbbTarget->set_entry_text(aStrURL);
}
diff --git a/cui/source/options/optjava.cxx b/cui/source/options/optjava.cxx
index bd88d04f7ce5..1073b71b23b6 100644
--- a/cui/source/options/optjava.cxx
+++ b/cui/source/options/optjava.cxx
@@ -155,7 +155,7 @@ IMPL_LINK_NOARG(SvxJavaOptionsPage, SelectHdl_Impl, weld::TreeView&, void)
OUString sLocation = m_xJavaList->get_selected_id();
OUString sInfo = m_sInstallText;
// tdf#80646 insert LTR mark after label
- sInfo += OUStringLiteral1(0x200E);
+ sInfo += OUStringChar(0x200E);
sInfo += sLocation;
m_xJavaPathText->set_label(sInfo);
}
diff --git a/cui/source/options/optpath.cxx b/cui/source/options/optpath.cxx
index 73110b9e193f..b287852f2329 100644
--- a/cui/source/options/optpath.cxx
+++ b/cui/source/options/optpath.cxx
@@ -292,7 +292,7 @@ void SvxPathTabPage::Reset( const SfxItemSet* )
OUString sTmpPath = sUser;
if ( !sTmpPath.isEmpty() && !sWritable.isEmpty() )
- sTmpPath += OUStringLiteral1(MULTIPATH_DELIMITER);
+ sTmpPath += OUStringChar(MULTIPATH_DELIMITER);
sTmpPath += sWritable;
const OUString aValue = Convert_Impl( sTmpPath );
@@ -364,7 +364,7 @@ IMPL_LINK_NOARG(SvxPathTabPage, StandardHdl_Impl, weld::Button&, void)
if ( !bFound )
{
if ( !sTemp.isEmpty() )
- sTemp += OUStringLiteral1(MULTIPATH_DELIMITER);
+ sTemp += OUStringChar(MULTIPATH_DELIMITER);
sTemp += sOnePath;
}
}
@@ -487,7 +487,7 @@ IMPL_LINK_NOARG(SvxPathTabPage, PathHdl_Impl, weld::Button&, void)
OUString sPath( sUser );
if ( !sPath.isEmpty() )
- sPath += OUStringLiteral1(MULTIPATH_DELIMITER);
+ sPath += OUStringChar(MULTIPATH_DELIMITER);
sPath += sWritable;
pMultiDlg->SetPath( sPath );
@@ -514,12 +514,12 @@ IMPL_LINK_NOARG(SvxPathTabPage, PathHdl_Impl, weld::Button&, void)
break;
}
if ( !sUser.isEmpty() )
- sUser += OUStringLiteral1(MULTIPATH_DELIMITER);
+ sUser += OUStringChar(MULTIPATH_DELIMITER);
sUser += sToken;
}
sFullPath = sUser;
if ( !sFullPath.isEmpty() )
- sFullPath += OUStringLiteral1(MULTIPATH_DELIMITER);
+ sFullPath += OUStringChar(MULTIPATH_DELIMITER);
sFullPath += sWritable;
}
diff --git a/cui/source/tabpages/grfpage.cxx b/cui/source/tabpages/grfpage.cxx
index f76d2da53fe2..b63f04ecb0c7 100644
--- a/cui/source/tabpages/grfpage.cxx
+++ b/cui/source/tabpages/grfpage.cxx
@@ -635,7 +635,7 @@ void SvxGrfCropPage::GraphicHasChanged( bool bFound )
OUString sTemp = aFld->GetText();
aFld->SetValue( aFld->Normalize( aOrigSize.Height() ), eUnit );
// multiplication sign (U+00D7)
- sTemp += OUStringLiteral1(0x00D7) + aFld->GetText();
+ sTemp += OUStringChar(0x00D7) + aFld->GetText();
if ( aOrigPixelSize.Width() && aOrigPixelSize.Height() ) {
sal_Int32 ax = sal_Int32(floor(static_cast<float>(aOrigPixelSize.Width()) /
@@ -645,7 +645,7 @@ void SvxGrfCropPage::GraphicHasChanged( bool bFound )
sTemp += " " + CuiResId( RID_SVXSTR_PPI );
OUString sPPI = OUString::number(ax);
if (abs(ax - ay) > 1) {
- sPPI += OUStringLiteral1(0x00D7) + OUString::number(ay);
+ sPPI += OUStringChar(0x00D7) + OUString::number(ay);
}
sTemp = sTemp.replaceAll("%1", sPPI);
}
diff --git a/dbaccess/source/ui/app/AppControllerDnD.cxx b/dbaccess/source/ui/app/AppControllerDnD.cxx
index ae1d4725c205..52bcae8d53bd 100644
--- a/dbaccess/source/ui/app/AppControllerDnD.cxx
+++ b/dbaccess/source/ui/app/AppControllerDnD.cxx
@@ -241,7 +241,7 @@ void OApplicationController::deleteObjects( ElementType _eType, const std::vecto
// which may also be a part of the list
// #i33353#
OSL_ENSURE( aThisRound->getLength() - 1 >= 0, "OApplicationController::deleteObjects: empty name?" );
- OUString sSmallestSiblingName = *aThisRound + OUStringLiteral1( sal_Unicode( '/' + 1) );
+ OUString sSmallestSiblingName = *aThisRound + OUStringChar( sal_Unicode( '/' + 1) );
std::set< OUString >::const_iterator aUpperChildrenBound = aDeleteNames.lower_bound( sSmallestSiblingName );
for ( std::set< OUString >::const_iterator aObsolete = aThisRound;
diff --git a/desktop/source/pkgchk/unopkg/unopkg_misc.cxx b/desktop/source/pkgchk/unopkg/unopkg_misc.cxx
index ff1b9dc6e0bf..aea709bc8c6e 100644
--- a/desktop/source/pkgchk/unopkg/unopkg_misc.cxx
+++ b/desktop/source/pkgchk/unopkg/unopkg_misc.cxx
@@ -107,7 +107,7 @@ bool isOption( OptionInfo const * option_info, sal_uInt32 * pIndex )
{
++(*pIndex);
dp_misc::TRACE(__FILE__ ": identified option \'\'"
- + OUStringLiteral1( option_info->m_short_option ) + "\n");
+ + OUStringChar( option_info->m_short_option ) + "\n");
return true;
}
if (arg[ 1 ] == '-' && rtl_ustr_ascii_compare(
diff --git a/editeng/source/accessibility/AccessibleStaticTextBase.cxx b/editeng/source/accessibility/AccessibleStaticTextBase.cxx
index 048f757542fe..c85cc3c9a589 100644
--- a/editeng/source/accessibility/AccessibleStaticTextBase.cxx
+++ b/editeng/source/accessibility/AccessibleStaticTextBase.cxx
@@ -719,11 +719,11 @@ namespace accessibility
//or at the end of the result string.
if ( bStart )
{
- aRes.insert(0, OUStringLiteral1(cNewLine));
+ aRes.insert(0, OUStringChar(cNewLine));
}
if ( bEnd )
{
- aRes.append(OUStringLiteral1(cNewLine));
+ aRes.append(OUStringChar(cNewLine));
}
return aRes.makeStringAndClear();
}
@@ -859,7 +859,7 @@ namespace accessibility
mpImpl->CorrectTextSegment( aResult, aPos.nPara );
if ( bLineBreak )
{
- aResult.SegmentText = OUStringLiteral1(cNewLine) + aResult.SegmentText;
+ aResult.SegmentText = OUStringChar(cNewLine) + aResult.SegmentText;
}
}
diff --git a/editeng/source/editeng/editeng.cxx b/editeng/source/editeng/editeng.cxx
index d787bc65628c..7d72d45c3194 100644
--- a/editeng/source/editeng/editeng.cxx
+++ b/editeng/source/editeng/editeng.cxx
@@ -2145,7 +2145,7 @@ void EditEngine::SetWordDelimiters( const OUString& rDelimiters )
{
pImpEditEngine->aWordDelimiters = rDelimiters;
if (pImpEditEngine->aWordDelimiters.indexOf(CH_FEATURE) == -1)
- pImpEditEngine->aWordDelimiters += OUStringLiteral1(CH_FEATURE);
+ pImpEditEngine->aWordDelimiters += OUStringChar(CH_FEATURE);
}
const OUString& EditEngine::GetWordDelimiters() const
diff --git a/editeng/source/editeng/impedit.cxx b/editeng/source/editeng/impedit.cxx
index 1137a1447e61..5006cd620d18 100644
--- a/editeng/source/editeng/impedit.cxx
+++ b/editeng/source/editeng/impedit.cxx
@@ -1620,7 +1620,7 @@ void ImpEditView::Paste( css::uno::Reference< css::datatransfer::clipboard::XCli
OUString aTmpText;
aData >>= aTmpText;
OUString aText(convertLineEnd(aTmpText, LINEEND_LF));
- aText = aText.replaceAll( OUStringLiteral1(LINE_SEP), " " );
+ aText = aText.replaceAll( OUStringChar(LINE_SEP), " " );
aSel = pEditEngine->InsertText(aSel, aText);
}
catch( ... )
diff --git a/editeng/source/editeng/impedit3.cxx b/editeng/source/editeng/impedit3.cxx
index 846687d763f8..826bdea59998 100644
--- a/editeng/source/editeng/impedit3.cxx
+++ b/editeng/source/editeng/impedit3.cxx
@@ -3365,7 +3365,7 @@ void ImpEditEngine::Paint( OutputDevice* pOutDev, tools::Rectangle aClipRect, Po
{
if ( rTextPortion.GetExtraValue() )
aText = OUString(rTextPortion.GetExtraValue());
- aText += OUStringLiteral1(CH_HYPH);
+ aText += OUStringChar(CH_HYPH);
nTextStart = 0;
nTextLen = aText.getLength();
diff --git a/editeng/source/editeng/impedit4.cxx b/editeng/source/editeng/impedit4.cxx
index 8a35b36c8beb..f1cb5072735b 100644
--- a/editeng/source/editeng/impedit4.cxx
+++ b/editeng/source/editeng/impedit4.cxx
@@ -1830,7 +1830,7 @@ Reference< XSpellAlternatives > ImpEditEngine::ImpSpell( EditView* pEditView )
if ( cNext == '.' )
{
aCurSel.Max().SetIndex( aCurSel.Max().GetIndex()+1 );
- aWord += OUStringLiteral1(cNext);
+ aWord += OUStringChar(cNext);
}
}
@@ -1880,7 +1880,7 @@ Reference< XSpellAlternatives > ImpEditEngine::ImpFindNextError(EditSelection& r
if ( cNext == '.' )
{
aCurSel.Max().SetIndex( aCurSel.Max().GetIndex()+1 );
- aWord += OUStringLiteral1(cNext);
+ aWord += OUStringChar(cNext);
}
}
diff --git a/editeng/source/items/bulitem.cxx b/editeng/source/items/bulitem.cxx
index 97b9b5370064..2b87196da1b6 100644
--- a/editeng/source/items/bulitem.cxx
+++ b/editeng/source/items/bulitem.cxx
@@ -122,7 +122,7 @@ bool SvxBulletItem::operator==( const SfxPoolItem& rItem ) const
OUString SvxBulletItem::GetFullText() const
{
- return aPrevText + OUStringLiteral1(cSymbol) + aFollowText;
+ return aPrevText + OUStringChar(cSymbol) + aFollowText;
}
diff --git a/editeng/source/items/textitem.cxx b/editeng/source/items/textitem.cxx
index ae7239a8e878..afd053da51e7 100644
--- a/editeng/source/items/textitem.cxx
+++ b/editeng/source/items/textitem.cxx
@@ -2163,9 +2163,9 @@ bool SvxTwoLinesItem::GetPresentation( SfxItemPresentation /*ePres*/,
{
rText = EditResId( RID_SVXITEMS_TWOLINES );
if( GetStartBracket() )
- rText = OUStringLiteral1(GetStartBracket()) + rText;
+ rText = OUStringChar(GetStartBracket()) + rText;
if( GetEndBracket() )
- rText += OUStringLiteral1(GetEndBracket());
+ rText += OUStringChar(GetEndBracket());
}
return true;
}
diff --git a/editeng/source/lookuptree/Trie.cxx b/editeng/source/lookuptree/Trie.cxx
index 184330ef4f2f..87a285fcdddc 100644
--- a/editeng/source/lookuptree/Trie.cxx
+++ b/editeng/source/lookuptree/Trie.cxx
@@ -99,7 +99,7 @@ void TrieNode::collectSuggestions(const OUString& sPath, vector<OUString>& rSugg
void TrieNode::collectSuggestionsForCurrentNode(TrieNode* pCurrent, const OUString& sPath, vector<OUString>& rSuggestionList)
{
- OUString aStringPath = sPath + OUStringLiteral1(pCurrent->mCharacter);
+ OUString aStringPath = sPath + OUStringChar(pCurrent->mCharacter);
if(pCurrent->mMarker)
{
rSuggestionList.push_back(aStringPath);
diff --git a/editeng/source/outliner/outliner.cxx b/editeng/source/outliner/outliner.cxx
index c6116b3b9520..e841c1fac408 100644
--- a/editeng/source/outliner/outliner.cxx
+++ b/editeng/source/outliner/outliner.cxx
@@ -1846,7 +1846,7 @@ void Outliner::ImplCalcBulletText( sal_Int32 nPara, bool bRecalcLevel, bool bRec
aBulletText += pFmt->GetPrefix();
if( pFmt->GetNumberingType() == SVX_NUM_CHAR_SPECIAL )
{
- aBulletText += OUStringLiteral1(pFmt->GetBulletChar());
+ aBulletText += OUStringChar(pFmt->GetBulletChar());
}
else if( pFmt->GetNumberingType() != SVX_NUM_NUMBER_NONE )
{
diff --git a/embeddedobj/source/msole/ownview.cxx b/embeddedobj/source/msole/ownview.cxx
index 306f51dfe973..244ab320e270 100644
--- a/embeddedobj/source/msole/ownview.cxx
+++ b/embeddedobj/source/msole/ownview.cxx
@@ -289,7 +289,7 @@ bool OwnView_Impl::ReadContentsAndGenerateTempFile( const uno::Reference< io::XI
aReadSeq[0] == '.'
)
{
- aFileSuffix += OUStringLiteral1( aReadSeq[0] );
+ aFileSuffix += OUStringChar( aReadSeq[0] );
}
} while( aReadSeq[0] );
diff --git a/extensions/source/propctrlr/eventhandler.cxx b/extensions/source/propctrlr/eventhandler.cxx
index cd25a2b3b656..e368bdf5f100 100644
--- a/extensions/source/propctrlr/eventhandler.cxx
+++ b/extensions/source/propctrlr/eventhandler.cxx
@@ -209,7 +209,7 @@ namespace pcr
OUString lcl_getEventPropertyName( const OUString& _rListenerClassName, const OUString& _rMethodName )
{
- return _rListenerClassName + OUStringLiteral1(';') + _rMethodName;
+ return _rListenerClassName + OUStringChar(';') + _rMethodName;
}
ScriptEventDescriptor lcl_getAssignedScriptEvent( const EventDescription& _rEvent, const std::vector< ScriptEventDescriptor >& _rAllAssignedMacros )
diff --git a/filter/source/graphicfilter/idxf/dxfreprd.cxx b/filter/source/graphicfilter/idxf/dxfreprd.cxx
index 1bd789876fd4..5de89903c499 100644
--- a/filter/source/graphicfilter/idxf/dxfreprd.cxx
+++ b/filter/source/graphicfilter/idxf/dxfreprd.cxx
@@ -460,9 +460,9 @@ OUString DXFRepresentation::ToOUString(const OString& s) const
| RTL_TEXTTOUNICODE_FLAGS_INVALID_ERROR);
result = result.replaceAll("%%o", "") // Overscore - simply remove
.replaceAll("%%u", "") // Underscore - simply remove
- .replaceAll("%%d", OUStringLiteral1(0x00B0)) // Degrees symbol (°)
- .replaceAll("%%p", OUStringLiteral1(0x00B1)) // Tolerance symbol (±)
- .replaceAll("%%c", OUStringLiteral1(0x2205)) // Diameter symbol
+ .replaceAll("%%d", OUStringChar(0x00B0)) // Degrees symbol (°)
+ .replaceAll("%%p", OUStringChar(0x00B1)) // Tolerance symbol (±)
+ .replaceAll("%%c", OUStringChar(0x2205)) // Diameter symbol
.replaceAll("%%%", "%"); // Percent symbol
sal_Int32 pos = result.indexOf("%%"); // %%nnn, where nnn - 3-digit decimal ASCII code
diff --git a/filter/source/msfilter/svdfppt.cxx b/filter/source/msfilter/svdfppt.cxx
index 9b5e83596f05..5cfa5a968650 100644
--- a/filter/source/msfilter/svdfppt.cxx
+++ b/filter/source/msfilter/svdfppt.cxx
@@ -6848,7 +6848,7 @@ PPTTextObj::PPTTextObj( SvStream& rIn, SdrPowerPointImport& rSdrPowerPointImport
}
else
{
- aStr.append(OUStringLiteral1(n));
+ aStr.append(OUStringChar(n));
}
}
}
diff --git a/forms/source/xforms/model_ui.cxx b/forms/source/xforms/model_ui.cxx
index b2ffffa2ec0c..da5674cb3b40 100644
--- a/forms/source/xforms/model_ui.cxx
+++ b/forms/source/xforms/model_ui.cxx
@@ -734,7 +734,7 @@ static OUString lcl_serializeForDisplay( const Reference< XAttr >& _rxAttrNode )
if ( sValue.indexOf( nQuote ) >= 0 )
nQuote = '\'';
- sResult = _rxAttrNode->getName() + "=" + OUStringLiteral1(nQuote) + sValue + OUStringLiteral1(nQuote) + " ";
+ sResult = _rxAttrNode->getName() + "=" + OUStringChar(nQuote) + sValue + OUStringChar(nQuote) + " ";
}
return sResult;
}
diff --git a/fpicker/source/office/fileview.cxx b/fpicker/source/office/fileview.cxx
index 09ff753dd373..36de5f043997 100644
--- a/fpicker/source/office/fileview.cxx
+++ b/fpicker/source/office/fileview.cxx
@@ -715,7 +715,7 @@ void ViewTabListBox_Impl::DoQuickSearch( sal_Unicode rChar )
bool bFound = mpParent->SearchNextEntry( mnSearchIndex, maQuickSearchText, false );
if ( !bFound && ( aLastText.getLength() == 1 ) &&
- ( aLastText == OUStringLiteral1(rChar) ) )
+ ( aLastText == OUStringChar(rChar) ) )
{
mnSearchIndex = aLastPos + 1;
maQuickSearchText = aLastText;
diff --git a/helpcompiler/source/HelpIndexer.cxx b/helpcompiler/source/HelpIndexer.cxx
index d8f0b82a4f20..198824d3b92f 100644
--- a/helpcompiler/source/HelpIndexer.cxx
+++ b/helpcompiler/source/HelpIndexer.cxx
@@ -26,7 +26,7 @@ HelpIndexer::HelpIndexer(OUString const &lang, OUString const &module,
OUString const &srcDir, OUString const &outDir)
: d_lang(lang), d_module(module)
{
- d_indexDir = outDir + OUStringLiteral1('/') + module + ".idxl";
+ d_indexDir = outDir + OUStringChar('/') + module + ".idxl";
d_captionDir = srcDir + "/caption";
d_contentDir = srcDir + "/content";
}
diff --git a/i18npool/qa/cppunit/test_breakiterator.cxx b/i18npool/qa/cppunit/test_breakiterator.cxx
index df51c575d06d..7daf9e98e573 100644
--- a/i18npool/qa/cppunit/test_breakiterator.cxx
+++ b/i18npool/qa/cppunit/test_breakiterator.cxx
@@ -280,7 +280,7 @@ void TestBreakIterator::testWordBoundaries()
if (aBreakTests[i] == 0x200B)
continue;
#endif
- OUString aTest = "Word" + OUStringLiteral1(aBreakTests[i]) + "Word";
+ OUString aTest = "Word" + OUStringChar(aBreakTests[i]) + "Word";
aBounds = m_xBreak->getWordBoundary(aTest, 0, aLocale, mode, true);
switch (mode)
{
@@ -309,7 +309,7 @@ void TestBreakIterator::testWordBoundaries()
//make sure that in all cases isBeginWord and isEndWord matches getWordBoundary
for (size_t i = 0; i < SAL_N_ELEMENTS(aJoinTests); ++i)
{
- OUString aTest = "Word" + OUStringLiteral1(aJoinTests[i]) + "Word";
+ OUString aTest = "Word" + OUStringChar(aJoinTests[i]) + "Word";
aBounds = m_xBreak->getWordBoundary(aTest, 0, aLocale, mode, true);
switch (mode)
{
@@ -370,7 +370,7 @@ void TestBreakIterator::testWordBoundaries()
const sal_Int32 aSinglePositions[] = {0, 1, 3, 4, 6, 7, 9, 10};
for (size_t j = 1; j < SAL_N_ELEMENTS(aTests); ++j)
{
- OUString aTest = aBase.replaceAll("xx", OUStringLiteral1(aTests[j]));
+ OUString aTest = aBase.replaceAll("xx", OUStringChar(aTests[j]));
sal_Int32 nPos = -1;
size_t i = 0;
do
@@ -395,7 +395,7 @@ void TestBreakIterator::testWordBoundaries()
const sal_Int32 aSingleQuotePositions[] = {0, 1, 9, 10};
CPPUNIT_ASSERT_EQUAL(u'\'', aTests[0]);
{
- OUString aTest = aBase.replaceAll("xx", OUStringLiteral1(aTests[0]));
+ OUString aTest = aBase.replaceAll("xx", OUStringChar(aTests[0]));
sal_Int32 nPos = -1;
size_t i = 0;
do
diff --git a/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx b/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx
index 0bc9b1870116..4a44dd841791 100644
--- a/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx
+++ b/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx
@@ -364,7 +364,7 @@ void lcl_formatChars( const sal_Unicode table[], int tableSize, int n, OUString&
if( n>=tableSize ) lcl_formatChars( table, tableSize, (n-tableSize)/tableSize, s );
- s += OUStringLiteral1( table[ n % tableSize ] );
+ s += OUStringChar( table[ n % tableSize ] );
}
static
@@ -377,7 +377,7 @@ void lcl_formatChars1( const sal_Unicode table[], int tableSize, int n, OUString
int repeat_count = n / tableSize + 1;
for( int i=0; i<repeat_count; i++ )
- s += OUStringLiteral1( table[ n%tableSize ] );
+ s += OUStringChar( table[ n%tableSize ] );
}
static
@@ -389,9 +389,9 @@ void lcl_formatChars2( const sal_Unicode table_capital[], const sal_Unicode tabl
if( n>=tableSize )
{
lcl_formatChars2( table_capital, table_small, tableSize, (n-tableSize)/tableSize, s );
- s += OUStringLiteral1( table_small[ n % tableSize ] );
+ s += OUStringChar( table_small[ n % tableSize ] );
} else
- s += OUStringLiteral1( table_capital[ n % tableSize ] );
+ s += OUStringChar( table_capital[ n % tableSize ] );
}
static
@@ -401,10 +401,10 @@ void lcl_formatChars3( const sal_Unicode table_capital[], const sal_Unicode tabl
// if A=='A' then 0=>A, 1=>B, ..., 25=>Z, 26=>Aa, 27=>Bb, ...
int repeat_count = n / tableSize + 1;
- s += OUStringLiteral1( table_capital[ n%tableSize ] );
+ s += OUStringChar( table_capital[ n%tableSize ] );
for( int i=1; i<repeat_count; i++ )
- s += OUStringLiteral1( table_small[ n%tableSize ] );
+ s += OUStringChar( table_small[ n%tableSize ] );
}
diff --git a/i18npool/source/indexentry/indexentrysupplier_default.cxx b/i18npool/source/indexentry/indexentrysupplier_default.cxx
index 186f3a511f59..399b19b17382 100644
--- a/i18npool/source/indexentry/indexentrysupplier_default.cxx
+++ b/i18npool/source/indexentry/indexentrysupplier_default.cxx
@@ -205,10 +205,10 @@ void Index::makeIndexKeys(const lang::Locale &rLocale, const OUString &algorithm
continue;
} else if (keyStr[i] == '_') {
for (curr=keyStr[i-1]+1; curr <= keyStr[i+1]; curr++)
- skipping_chars+=OUStringLiteral1(curr);
+ skipping_chars+=OUStringChar(curr);
i+=2;
} else {
- skipping_chars+=OUStringLiteral1(keyStr[i]);
+ skipping_chars+=OUStringChar(keyStr[i]);
}
}
break;
diff --git a/idl/source/prj/command.cxx b/idl/source/prj/command.cxx
index b04892165057..2e09351d5d68 100644
--- a/idl/source/prj/command.cxx
+++ b/idl/source/prj/command.cxx
@@ -250,7 +250,7 @@ SvCommand::SvCommand( int argc, char ** argv )
{ // define include paths
OUString aName( aParam.copy( 1 ) );
if( !aPath.isEmpty() )
- aPath += OUStringLiteral1(SAL_PATHSEPARATOR);
+ aPath += OUStringChar(SAL_PATHSEPARATOR);
aPath += aName;
}
else if( aParam.startsWithIgnoreAsciiCase( "rsc" ) )
@@ -289,7 +289,7 @@ SvCommand::SvCommand( int argc, char ** argv )
if( aInc.getLength() )
{
if( !aPath.isEmpty() )
- aPath += OUStringLiteral1(SAL_PATHSEPARATOR);
+ aPath += OUStringChar(SAL_PATHSEPARATOR);
aPath += OStringToOUString(aInc, RTL_TEXTENCODING_ASCII_US);
}
}
diff --git a/include/rtl/stringconcat.hxx b/include/rtl/stringconcat.hxx
index 96b018d23d7a..588be8f0073e 100644
--- a/include/rtl/stringconcat.hxx
+++ b/include/rtl/stringconcat.hxx
@@ -185,10 +185,10 @@ struct ToStringHelper<sal_Unicode const[N]>
};
template<>
-struct ToStringHelper<OUStringLiteral1_>
+struct ToStringHelper<OUStringChar_>
{
- static std::size_t length(OUStringLiteral1_) { return 1; }
- static sal_Unicode * addData(sal_Unicode * buffer, OUStringLiteral1_ literal)
+ static std::size_t length(OUStringChar_) { return 1; }
+ static sal_Unicode * addData(sal_Unicode * buffer, OUStringChar_ literal)
{ return addDataHelper(buffer, &literal.c, 1); }
static bool const allowOStringConcat = false;
static bool const allowOUStringConcat = true;
diff --git a/include/rtl/stringutils.hxx b/include/rtl/stringutils.hxx
index ec8c88211593..6ea44c72d8be 100644
--- a/include/rtl/stringutils.hxx
+++ b/include/rtl/stringutils.hxx
@@ -35,7 +35,7 @@ namespace rtl
#if defined LIBO_INTERNAL_ONLY
/// @cond INTERNAL
-/** A simple wrapper around a sal_Unicode character literal.
+/** A simple wrapper around a single sal_Unicode character.
Can be useful to pass a sal_Unicode constant into an OUString-related
function that is optimized for UTF-16 string literal arguments. That is,
@@ -53,23 +53,35 @@ namespace rtl
...
if (s[i] == WILDCARD) ...
...
- if (s.endsWith(OUStringLiteral1(WILDCARD))) ...
+ if (s.endsWith(OUStringChar(WILDCARD))) ...
to avoid creating a temporary OUString instance, and instead pick the
endsWith overload actually designed to take an argument of type
sal_Unicode const[N].
- Instances of OUStringLiteral1 need to be const, as those literal-optimized
+ (Because of the above use case,
+ instances of OUStringChar need to be const, as those literal-optimized
functions take the literal argument by non-const lvalue reference, for
technical reasons.
+ For actual arrays, it is important to distinguish string literals from other char or sal_Unicode
+ arrays, which may contain junk after the first NUL character or may be non-ASCII in the case of
+ char arrays. This is not so much a concern for single char and sal_Unicode values, where NUL is
+ assumed to always be meant as an actual character.)
+
+ Can also be useful in string concatenation contexts, like in
+
+ sal_Unicode const * s = ...;
+ sal_Unicode c = ...;
+ OUString t = s + OUStringChar(c);
+
@since LibreOffice 5.0
*/
-struct SAL_WARN_UNUSED OUStringLiteral1_ {
- constexpr OUStringLiteral1_(sal_Unicode theC): c(theC) {}
+struct SAL_WARN_UNUSED OUStringChar_ {
+ constexpr OUStringChar_(sal_Unicode theC): c(theC) {}
sal_Unicode const c;
};
-using OUStringLiteral1 = OUStringLiteral1_ const;
+using OUStringChar = OUStringChar_ const;
/// @endcond
#endif
@@ -222,14 +234,14 @@ struct ConstCharArrayDetector<sal_Unicode const [N], T> {
{ return literal; }
};
template<typename T> struct ConstCharArrayDetector<
- OUStringLiteral1,
+ OUStringChar,
T>
{
using TypeUtf16 = T;
static constexpr bool const ok = true;
static constexpr std::size_t const length = 1;
static constexpr sal_Unicode const * toPointer(
- OUStringLiteral1_ const & literal)
+ OUStringChar_ const & literal)
{ return &literal.c; }
};
#endif
@@ -248,7 +260,7 @@ struct ExceptConstCharArrayDetector< const char[ N ] >
template<std::size_t N>
struct ExceptConstCharArrayDetector<sal_Unicode const[N]> {};
template<> struct ExceptConstCharArrayDetector<
- OUStringLiteral1
+ OUStringChar
>
{};
#endif
@@ -273,7 +285,7 @@ struct ExceptCharArrayDetector< const char[ N ] >
#if defined LIBO_INTERNAL_ONLY
template<std::size_t N> struct ExceptCharArrayDetector<sal_Unicode[N]> {};
template<std::size_t N> struct ExceptCharArrayDetector<sal_Unicode const[N]> {};
-template<> struct ExceptCharArrayDetector<OUStringLiteral1_> {};
+template<> struct ExceptCharArrayDetector<OUStringChar_> {};
#endif
template< typename T1, typename T2 = void >
diff --git a/include/rtl/ustring.hxx b/include/rtl/ustring.hxx
index a2bb6c09c086..f648cddce1d8 100644
--- a/include/rtl/ustring.hxx
+++ b/include/rtl/ustring.hxx
@@ -3789,7 +3789,7 @@ using ::rtl::OUStringHash;
using ::rtl::OStringToOUString;
using ::rtl::OUStringToOString;
using ::rtl::OUStringLiteral;
-using ::rtl::OUStringLiteral1;
+using ::rtl::OUStringChar;
#endif
/// @cond INTERNAL
diff --git a/jvmfwk/plugins/sunmajor/pluginlib/gnujre.cxx b/jvmfwk/plugins/sunmajor/pluginlib/gnujre.cxx
index 199b3fcb67d0..d9c0e7d5d25f 100644
--- a/jvmfwk/plugins/sunmajor/pluginlib/gnujre.cxx
+++ b/jvmfwk/plugins/sunmajor/pluginlib/gnujre.cxx
@@ -268,7 +268,7 @@ bool GnuInfo::initialize(vector<pair<OUString, OUString> > props)
{
if(c > 0)
- m_sLD_LIBRARY_PATH+= OUStringLiteral1(SAL_PATHSEPARATOR);
+ m_sLD_LIBRARY_PATH+= OUStringChar(SAL_PATHSEPARATOR);
m_sLD_LIBRARY_PATH+= usSysPath;
}
else
diff --git a/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx b/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx
index 5981e325f080..b9f43ac2fad5 100644
--- a/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx
+++ b/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx
@@ -141,7 +141,7 @@ OString getPluginJarPath(
if (osl_getSystemPathFromFileURL(sName.pData, & sPath2.pData)
== osl_File_E_None)
{
- sPath = sPath1 + OUStringLiteral1(SAL_PATHSEPARATOR) + sPath2;
+ sPath = sPath1 + OUStringChar(SAL_PATHSEPARATOR) + sPath2;
}
}
OSL_ASSERT(!sPath.isEmpty());
diff --git a/jvmfwk/plugins/sunmajor/pluginlib/vendorbase.cxx b/jvmfwk/plugins/sunmajor/pluginlib/vendorbase.cxx
index efd6b92d550f..c4e70d1df27b 100644
--- a/jvmfwk/plugins/sunmajor/pluginlib/vendorbase.cxx
+++ b/jvmfwk/plugins/sunmajor/pluginlib/vendorbase.cxx
@@ -143,7 +143,7 @@ bool VendorBase::initialize(vector<pair<OUString, OUString> > props)
{
if(c > 0)
- m_sLD_LIBRARY_PATH+= OUStringLiteral1(SAL_PATHSEPARATOR);
+ m_sLD_LIBRARY_PATH+= OUStringChar(SAL_PATHSEPARATOR);
m_sLD_LIBRARY_PATH+= usSysPath;
}
else
diff --git a/oox/source/core/relations.cxx b/oox/source/core/relations.cxx
index 49a84d368e56..25e8646d1669 100644
--- a/oox/source/core/relations.cxx
+++ b/oox/source/core/relations.cxx
@@ -35,7 +35,7 @@ OUString lclRemoveFileName( const OUString& rPath )
OUString lclAppendFileName( const OUString& rPath, const OUString& rFileName )
{
return rPath.isEmpty() ? rFileName :
- rPath + OUStringLiteral1('/') + rFileName;
+ rPath + OUStringChar('/') + rFileName;
}
OUString createOfficeDocRelationTypeTransitional(const OUString& rType)
diff --git a/oox/source/dump/dumperbase.cxx b/oox/source/dump/dumperbase.cxx
index c1a5f04b4035..9f4d18165f10 100644
--- a/oox/source/dump/dumperbase.cxx
+++ b/oox/source/dump/dumperbase.cxx
@@ -2380,7 +2380,7 @@ void XmlStreamObject::implDumpText( TextInputStream& rTextStrm )
{
while( (nPos < aElem.getLength()) && (aElem[ nPos ] >= 32) ) ++nPos;
if( nPos < aElem.getLength() )
- aElem = aElem.copy( 0, nPos ) + OUStringLiteral1(' ') + aElem.copy( nPos ).trim();
+ aElem = aElem.copy( 0, nPos ) + OUStringChar(' ') + aElem.copy( nPos ).trim();
++nPos;
}
diff --git a/oox/source/helper/containerhelper.cxx b/oox/source/helper/containerhelper.cxx
index eea52e254ac2..32296fbbd8c8 100644
--- a/oox/source/helper/containerhelper.cxx
+++ b/oox/source/helper/containerhelper.cxx
@@ -86,7 +86,7 @@ OUString ContainerHelper::getUnusedName(
OUString aNewName = rSuggestedName;
sal_Int32 nIndex = -1;
while( rxNameAccess->hasByName( aNewName ) )
- aNewName = rSuggestedName + OUStringLiteral1(cSeparator) + OUString::number( nIndex++ );
+ aNewName = rSuggestedName + OUStringChar(cSeparator) + OUString::number( nIndex++ );
return aNewName;
}
diff --git a/oox/source/helper/textinputstream.cxx b/oox/source/helper/textinputstream.cxx
index 2884bd14d99d..3d284cfc8e72 100644
--- a/oox/source/helper/textinputstream.cxx
+++ b/oox/source/helper/textinputstream.cxx
@@ -194,7 +194,7 @@ OUString TextInputStream::createFinalString( const OUString& rString )
if( mcPendingChar == 0 )
return rString;
- OUString aString = OUStringLiteral1( mcPendingChar ) + rString;
+ OUString aString = OUStringChar( mcPendingChar ) + rString;
mcPendingChar = 0;
return aString;
}
diff --git a/oox/source/vml/vmlshape.cxx b/oox/source/vml/vmlshape.cxx
index c21471e5c475..e27700fec895 100644
--- a/oox/source/vml/vmlshape.cxx
+++ b/oox/source/vml/vmlshape.cxx
@@ -325,7 +325,7 @@ OUString ShapeBase::getShapeName() const
{
sal_Int32 nShapeIdx = mrDrawing.getLocalShapeIndex( getShapeId() );
if( nShapeIdx > 0 )
- return aBaseName + OUStringLiteral1(' ') + OUString::number( nShapeIdx );
+ return aBaseName + OUStringChar(' ') + OUString::number( nShapeIdx );
}
return OUString();
diff --git a/opencl/source/openclconfig.cxx b/opencl/source/openclconfig.cxx
index 6fcd59618789..ed122749bc3a 100644
--- a/opencl/source/openclconfig.cxx
+++ b/opencl/source/openclconfig.cxx
@@ -83,7 +83,7 @@ OUString getToken(const OUString& string, sal_Int32& index)
result.append(std::u16string_view(token).substr(i, p - i));
if (p < token.getLength() - 2)
{
- result.append(OUStringLiteral1(token.copy(p+1, 2).toInt32(16)));
+ result.append(OUStringChar(token.copy(p+1, 2).toInt32(16)));
i = p + 3;
}
else
diff --git a/package/qa/cppunit/test_package.cxx b/package/qa/cppunit/test_package.cxx
index cf191781ad30..29a8d9281cb5 100644
--- a/package/qa/cppunit/test_package.cxx
+++ b/package/qa/cppunit/test_package.cxx
@@ -152,7 +152,7 @@ namespace
for (char c = 'a'; c <= 'z'; ++c, ++itBuf)
{
- OUString aName = OUStringLiteral1(c) + ".txt";
+ OUString aName = OUStringChar(c) + ".txt";
uno::Reference<io::XInputStream> xStrm;
mxNA->getByName(aName) >>= xStrm;
@@ -174,7 +174,7 @@ namespace
for (char c = 'a'; c <= 'z'; ++c, ++itBuf)
{
- OUString aName = OUStringLiteral1(c) + ".txt";
+ OUString aName = OUStringChar(c) + ".txt";
uno::Reference<io::XInputStream> xStrm;
//Size of each stream is 1mb (>10000) => XBufferedThreadedStream
diff --git a/package/source/zippackage/zipfileaccess.cxx b/package/source/zippackage/zipfileaccess.cxx
index fe584deaf7d9..31e38aff1dcd 100644
--- a/package/source/zippackage/zipfileaccess.cxx
+++ b/package/source/zippackage/zipfileaccess.cxx
@@ -107,7 +107,7 @@ uno::Sequence< OUString > OZipFileAccess::GetPatternsFromString_Impl( const OUSt
}
else
{
- aPattern[nInd] += OUStringLiteral1( *pString );
+ aPattern[nInd] += OUStringChar( *pString );
pString++;
}
}
diff --git a/sal/qa/rtl/strings/test_oustring_stringliterals.cxx b/sal/qa/rtl/strings/test_oustring_stringliterals.cxx
index a98401351a7f..33902e28ad3b 100644
--- a/sal/qa/rtl/strings/test_oustring_stringliterals.cxx
+++ b/sal/qa/rtl/strings/test_oustring_stringliterals.cxx
@@ -36,7 +36,7 @@ private:
void checkNonconstChar();
void checkBuffer();
void checkOUStringLiteral();
- void checkOUStringLiteral1();
+ void checkOUStringChar();
void checkUtf16();
void testcall( const char str[] );
@@ -51,7 +51,7 @@ CPPUNIT_TEST(checkExtraIntArgument);
CPPUNIT_TEST(checkNonconstChar);
CPPUNIT_TEST(checkBuffer);
CPPUNIT_TEST(checkOUStringLiteral);
-CPPUNIT_TEST(checkOUStringLiteral1);
+CPPUNIT_TEST(checkOUStringChar);
CPPUNIT_TEST(checkUtf16);
CPPUNIT_TEST_SUITE_END();
};
@@ -317,39 +317,39 @@ void test::oustring::StringLiterals::checkOUStringLiteral()
sal_Int32(5), b.lastIndexOf(rtlunittest::OUStringLiteral("ab")));
}
-void test::oustring::StringLiterals::checkOUStringLiteral1()
+void test::oustring::StringLiterals::checkOUStringChar()
{
- auto l1 = rtlunittest::OUStringLiteral1('A');
+ auto l1 = rtlunittest::OUStringChar('A');
CPPUNIT_ASSERT_EQUAL(u'A', l1.c);
char const c2 = 'A';
- auto l2 = rtlunittest::OUStringLiteral1(c2);
+ auto l2 = rtlunittest::OUStringChar(c2);
CPPUNIT_ASSERT_EQUAL(u'A', l2.c);
- char c3 = 'A'; auto l3 = rtlunittest::OUStringLiteral1(c3);
+ char c3 = 'A'; auto l3 = rtlunittest::OUStringChar(c3);
CPPUNIT_ASSERT_EQUAL(u'A', l3.c);
- auto l4 = rtlunittest::OUStringLiteral1(u'A');
+ auto l4 = rtlunittest::OUStringChar(u'A');
CPPUNIT_ASSERT_EQUAL(u'A', l4.c);
sal_Unicode const c5 = 0x100;
- auto l5 = rtlunittest::OUStringLiteral1(c5);
+ auto l5 = rtlunittest::OUStringChar(c5);
CPPUNIT_ASSERT_EQUAL(c5, l5.c);
- rtl::OUString s1{rtlunittest::OUStringLiteral1('A')};
+ rtl::OUString s1{rtlunittest::OUStringChar('A')};
CPPUNIT_ASSERT_EQUAL(sal_Int32(1), s1.getLength());
CPPUNIT_ASSERT_EQUAL(u'A', s1[0]);
CPPUNIT_ASSERT_EQUAL(
- true, rtl::OUString("A") == rtlunittest::OUStringLiteral1('A'));
+ true, rtl::OUString("A") == rtlunittest::OUStringChar('A'));
CPPUNIT_ASSERT_EQUAL(
- false, rtl::OUString("AB") == rtlunittest::OUStringLiteral1('A'));
+ false, rtl::OUString("AB") == rtlunittest::OUStringChar('A'));
CPPUNIT_ASSERT_EQUAL(
- false, rtl::OUString("A") != rtlunittest::OUStringLiteral1('A'));
+ false, rtl::OUString("A") != rtlunittest::OUStringChar('A'));
CPPUNIT_ASSERT_EQUAL(
- true, rtl::OUString("AB") != rtlunittest::OUStringLiteral1('A'));
+ true, rtl::OUString("AB") != rtlunittest::OUStringChar('A'));
- rtl::OUString s2("A" + rtlunittest::OUStringLiteral1('b'));
+ rtl::OUString s2("A" + rtlunittest::OUStringChar('b'));
CPPUNIT_ASSERT_EQUAL(sal_Int32(2), s2.getLength());
CPPUNIT_ASSERT_EQUAL(u'A', s2[0]);
CPPUNIT_ASSERT_EQUAL(u'b', s2[1]);
diff --git a/sal/qa/rtl/uri/rtl_testuri.cxx b/sal/qa/rtl/uri/rtl_testuri.cxx
index aea0d50c6c54..b69013e1ed36 100644
--- a/sal/qa/rtl/uri/rtl_testuri.cxx
+++ b/sal/qa/rtl/uri/rtl_testuri.cxx
@@ -181,10 +181,10 @@ void Test::test_Uri() {
// Check surrogate handling:
- aText1 = OUStringLiteral1(u'\xD800') + // %ED%A0%80
- OUStringLiteral1(u'\xD800') + // %F0%90%8F%BF
- OUStringLiteral1(u'\xDFFF') +
- OUStringLiteral1(u'\xDFFF') + // %ED%BF%BF
+ aText1 = OUStringChar(u'\xD800') + // %ED%A0%80
+ OUStringChar(u'\xD800') + // %F0%90%8F%BF
+ OUStringChar(u'\xDFFF') +
+ OUStringChar(u'\xDFFF') + // %ED%BF%BF
"A"; // A
aText2 = "%ED%A0%80" "%F0%90%8F%BF" "%ED%BF%BF" "A";
CPPUNIT_ASSERT_EQUAL_MESSAGE(
@@ -208,8 +208,8 @@ void Test::test_Uri() {
aText1 = "%ed%a0%80" "%f0%90%8f%bf" "%ed%bf%bf" "A";
aText2 = "%ED%A0%80" +
- OUStringLiteral1(u'\xD800') +
- OUStringLiteral1(u'\xDFFF') +
+ OUStringChar(u'\xD800') +
+ OUStringChar(u'\xDFFF') +
"%ED%BF%BF"
"A";
CPPUNIT_ASSERT_EQUAL_MESSAGE(
@@ -248,7 +248,7 @@ void Test::test_Uri() {
aText1 = "%30%C3%BF";
aText2 = "%30" +
- OUStringLiteral1(u'\x00FF');
+ OUStringChar(u'\x00FF');
CPPUNIT_ASSERT_EQUAL_MESSAGE(
"failure 18",
aText2,
diff --git a/sc/qa/extras/macros-test.cxx b/sc/qa/extras/macros-test.cxx
index fea08dd0fa71..328cbb150baf 100644
--- a/sc/qa/extras/macros-test.cxx
+++ b/sc/qa/extras/macros-test.cxx
@@ -278,7 +278,7 @@ void ScMacrosTest::testVba()
OUString sTempDirURL;
osl::FileBase:: getTempDirURL( sTempDirURL );
osl::FileBase::getSystemPathFromFileURL( sTempDirURL, sTempDir );
- sTempDir += OUStringLiteral1(SAL_PATHDELIMITER);
+ sTempDir += OUStringChar(SAL_PATHDELIMITER);
OUString sTestFileName("My Test WorkBook.xls");
Sequence< uno::Any > aParams;
for ( size_t i=0; i<SAL_N_ELEMENTS( testInfo ); ++i )
diff --git a/sc/qa/unit/subsequent_export-test.cxx b/sc/qa/unit/subsequent_export-test.cxx
index 6711b3aecabb..32dd92481c36 100644
--- a/sc/qa/unit/subsequent_export-test.cxx
+++ b/sc/qa/unit/subsequent_export-test.cxx
@@ -4049,12 +4049,12 @@ void ScExportTest::testEscapeCharInNumberFormatXLSX()
assertXPath(pDoc, "/x:styleSheet/x:numFmts/x:numFmt[2]", "formatCode", "00\\ 00\\ 00\\ 00\\ 00");
assertXPath(pDoc, "/x:styleSheet/x:numFmts/x:numFmt[3]", "formatCode", "00\\.00\\.00\\.000\\.0"); // tdf#81939
// "_-* #,##0\ _€_-;\-* #,##0\ _€_-;_-* "- "_€_-;_-@_-" // tdf#81222
- OUString rFormatStrExpected ( "_-* #,##0\\ _" + OUStringLiteral1(cEuro) + "_-;\\-* #,##0\\ _" +
- OUStringLiteral1(cEuro) + "_-;_-* \"- \"_" + OUStringLiteral1(cEuro) + "_-;_-@_-" );
+ OUString rFormatStrExpected ( "_-* #,##0\\ _" + OUStringChar(cEuro) + "_-;\\-* #,##0\\ _" +
+ OUStringChar(cEuro) + "_-;_-* \"- \"_" + OUStringChar(cEuro) + "_-;_-@_-" );
assertXPath(pDoc, "/x:styleSheet/x:numFmts/x:numFmt[4]", "formatCode", rFormatStrExpected );
// "_-* #,##0" €"_-;\-* #,##0" €"_-;_-* "- €"_-;_-@_-");
- rFormatStrExpected = "_-* #,##0\" " + OUStringLiteral1(cEuro) + "\"_-;\\-* #,##0\" " +
- OUStringLiteral1(cEuro) + "\"_-;_-* \"- " + OUStringLiteral1(cEuro) + "\"_-;_-@_-";
+ rFormatStrExpected = "_-* #,##0\" " + OUStringChar(cEuro) + "\"_-;\\-* #,##0\" " +
+ OUStringChar(cEuro) + "\"_-;_-* \"- " + OUStringChar(cEuro) + "\"_-;_-@_-";
assertXPath(pDoc, "/x:styleSheet/x:numFmts/x:numFmt[5]", "formatCode", rFormatStrExpected );
// remove escape char in fraction
assertXPath(pDoc, "/x:styleSheet/x:numFmts/x:numFmt[6]", "formatCode", "# ?/?;[RED]\\-# #/#####");
diff --git a/sc/qa/unit/subsequent_filters-test.cxx b/sc/qa/unit/subsequent_filters-test.cxx
index 9f2f8854286a..b5ef29905a07 100644
--- a/sc/qa/unit/subsequent_filters-test.cxx
+++ b/sc/qa/unit/subsequent_filters-test.cxx
@@ -709,7 +709,7 @@ void ScFiltersTest::testCachedFormulaResultsODS()
for(SCROW nRow = 0; nRow < 2; ++nRow)
{
OUString aFormula = "=ISERROR(" +
- OUStringLiteral1(static_cast<char>('A'+nCol)) + OUString::number(nRow) +
+ OUStringChar(static_cast<char>('A'+nCol)) + OUString::number(nRow) +
")";
rDoc.SetString(nCol, nRow + 2, 2, aFormula);
CPPUNIT_ASSERT_EQUAL_MESSAGE(OUStringToOString(aFormula, RTL_TEXTENCODING_UTF8).getStr(), OUString("TRUE"), rDoc.GetString(nCol, nRow +2, 2));
diff --git a/sc/source/core/data/global.cxx b/sc/source/core/data/global.cxx
index 14c16fde8e33..050fd823b4ee 100644
--- a/sc/source/core/data/global.cxx
+++ b/sc/source/core/data/global.cxx
@@ -694,9 +694,9 @@ void ScGlobal::AddQuotes( OUString& rString, sal_Unicode cQuote, bool bEscapeEmb
pQ[0] = pQ[1] = cQuote;
pQ[2] = 0;
OUString aQuotes( pQ );
- rString = rString.replaceAll( OUStringLiteral1(cQuote), aQuotes);
+ rString = rString.replaceAll( OUStringChar(cQuote), aQuotes);
}
- rString = OUStringLiteral1( cQuote ) + rString + OUStringLiteral1( cQuote );
+ rString = OUStringChar( cQuote ) + rString + OUStringChar( cQuote );
}
void ScGlobal::EraseQuotes( OUString& rString, sal_Unicode cQuote, bool bUnescapeEmbedded )
@@ -710,7 +710,7 @@ void ScGlobal::EraseQuotes( OUString& rString, sal_Unicode cQuote, bool bUnescap
pQ[0] = pQ[1] = cQuote;
pQ[2] = 0;
OUString aQuotes( pQ );
- rString = rString.replaceAll( aQuotes, OUStringLiteral1(cQuote));
+ rString = rString.replaceAll( aQuotes, OUStringChar(cQuote));
}
}
}
diff --git a/sc/source/core/data/global2.cxx b/sc/source/core/data/global2.cxx
index 228c6f422104..95c6f81dffbc 100644
--- a/sc/source/core/data/global2.cxx
+++ b/sc/source/core/data/global2.cxx
@@ -328,7 +328,7 @@ OUString ScGlobal::GetDocTabName( const OUString& rFileName,
aDocTab = aDocTab.replaceAt( nPos, 0, "\\" );
nPos += 2;
}
- aDocTab += "'" + OUStringLiteral1(SC_COMPILER_FILE_TAB_SEP) + rTabName;
+ aDocTab += "'" + OUStringChar(SC_COMPILER_FILE_TAB_SEP) + rTabName;
// "'Doc'#Tab"
return aDocTab;
}
diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx
index 64b418ec73ee..bede44e52556 100644
--- a/sc/source/core/tool/compiler.cxx
+++ b/sc/source/core/tool/compiler.cxx
@@ -530,7 +530,7 @@ static bool lcl_parseExternalName(
{
// two consecutive quotes equal a single quote in
// the file name.
- aTmpFile += OUStringLiteral1(c);
+ aTmpFile += OUStringChar(c);
cPrev = 'a';
}
else
@@ -551,7 +551,7 @@ static bool lcl_parseExternalName(
aTmpName.append(c); // Keep the separator as part of the name.
break;
}
- aTmpFile += OUStringLiteral1(c);
+ aTmpFile += OUStringChar(c);
cPrev = c;
}
@@ -615,7 +615,7 @@ static bool lcl_parseExternalName(
return false;
}
while (false);
- aTmpFile += OUStringLiteral1(c);
+ aTmpFile += OUStringChar(c);
}
}
}
@@ -662,7 +662,7 @@ static OUString lcl_makeExternalNameStr(const OUString& rFile, const OUString& r
OUStringBuffer aBuf(aFile.getLength() + aName.getLength() + 9);
if (bODF)
aBuf.append( '[');
- aBuf.append( "'" ).append( aFile ).append( "'" ).append( OUStringLiteral1(cSep) );
+ aBuf.append( "'" ).append( aFile ).append( "'" ).append( OUStringChar(cSep) );
if (bODF)
aBuf.append( "$$'" );
aBuf.append( aName);
@@ -3964,7 +3964,7 @@ void ScCompiler::AutoCorrectParsedSymbol()
}
else if ( c1 != cQuote && c2 == cQuote )
{ // ..."
- aCorrectedSymbol = OUStringLiteral1(cQuote) + aCorrectedSymbol;
+ aCorrectedSymbol = OUStringChar(cQuote) + aCorrectedSymbol;
bCorrected = true;
}
else if ( nPos == 0 && (c1 == cx || c1 == cX) )
@@ -3978,13 +3978,13 @@ void ScCompiler::AutoCorrectParsedSymbol()
if ( aCorrectedSymbol.indexOf(cx) >= 0 ) // At least two tokens separated by cx
{ // x => *
sal_Unicode c = mxSymbols->getSymbolChar(ocMul);
- aCorrectedSymbol = aCorrectedSymbol.replaceAll(OUStringLiteral1(cx), OUStringLiteral1(c));
+ aCorrectedSymbol = aCorrectedSymbol.replaceAll(OUStringChar(cx), OUStringChar(c));
bCorrected = true;
}
if ( aCorrectedSymbol.indexOf(cX) >= 0 ) // At least two tokens separated by cX
{ // X => *
sal_Unicode c = mxSymbols->getSymbolChar(ocMul);
- aCorrectedSymbol = aCorrectedSymbol.replaceAll(OUStringLiteral1(cX), OUStringLiteral1(c));
+ aCorrectedSymbol = aCorrectedSymbol.replaceAll(OUStringChar(cX), OUStringChar(c));
bCorrected = true;
}
}
diff --git a/sc/source/core/tool/editutil.cxx b/sc/source/core/tool/editutil.cxx
index a90f29f749d0..dbbda0548754 100644
--- a/sc/source/core/tool/editutil.cxx
+++ b/sc/source/core/tool/editutil.cxx
@@ -735,7 +735,7 @@ static OUString lcl_GetCharStr( sal_Int32 nNo )
nCalc = nNo % coDiff;
if( !nCalc )
nCalc = coDiff;
- aStr = OUStringLiteral1( 'a' - 1 + nCalc ) + aStr;
+ aStr = OUStringChar( 'a' - 1 + nCalc ) + aStr;
nNo = sal::static_int_cast<sal_Int32>( nNo - nCalc );
if( nNo )
nNo /= coDiff;
diff --git a/sc/source/core/tool/rangelst.cxx b/sc/source/core/tool/rangelst.cxx
index 03ac8ebeec53..fb5434bd1cb0 100644
--- a/sc/source/core/tool/rangelst.cxx
+++ b/sc/source/core/tool/rangelst.cxx
@@ -158,7 +158,7 @@ void ScRangeList::Format( OUString& rStr, ScRefFlags nFlags, const ScDocument* p
if (bFirst)
bFirst = false;
else
- aBuf.append(OUStringLiteral1(cDelimiter));
+ aBuf.append(OUStringChar(cDelimiter));
aBuf.append(r.Format(nFlags, pDoc, eConv, bFullAddressNotation));
}
rStr = aBuf.makeStringAndClear();
diff --git a/sc/source/core/tool/rangeutl.cxx b/sc/source/core/tool/rangeutl.cxx
index ea87576d7df5..aa2c519cd4aa 100644
--- a/sc/source/core/tool/rangeutl.cxx
+++ b/sc/source/core/tool/rangeutl.cxx
@@ -339,7 +339,7 @@ void ScRangeStringConverter::AssignString(
if( !rNewStr.isEmpty() )
{
if( !rString.isEmpty() )
- rString += OUStringLiteral1(cSeparator);
+ rString += OUStringChar(cSeparator);
rString += rNewStr;
}
}
diff --git a/sc/source/core/tool/unitconv.cxx b/sc/source/core/tool/unitconv.cxx
index 9451db9c1809..3d6681a5caa3 100644
--- a/sc/source/core/tool/unitconv.cxx
+++ b/sc/source/core/tool/unitconv.cxx
@@ -37,7 +37,7 @@ ScUnitConverterData::ScUnitConverterData(
OUString ScUnitConverterData::BuildIndexString(
const OUString& rFromUnit, const OUString& rToUnit )
{
- return rFromUnit + OUStringLiteral1(cDelim) + rToUnit;
+ return rFromUnit + OUStringChar(cDelim) + rToUnit;
}
// ScUnitConverter
diff --git a/sc/source/filter/excel/xehelper.cxx b/sc/source/filter/excel/xehelper.cxx
index a6e41f742ed8..e75958935d69 100644
--- a/sc/source/filter/excel/xehelper.cxx
+++ b/sc/source/filter/excel/xehelper.cxx
@@ -871,7 +871,7 @@ void XclExpHFConverter::AppendPortion( const EditTextObject* pTextObj, sal_Unico
if( !aText.isEmpty() )
{
- maHFString += "&" + OUStringLiteral1(cPortionCode) + aText;
+ maHFString += "&" + OUStringChar(cPortionCode) + aText;
mnTotalHeight = ::std::max( mnTotalHeight, nHeight );
}
}
@@ -975,7 +975,7 @@ OUString XclExpUrlHelper::EncodeUrl( const XclExpRoot& rRoot, const OUString& rA
OUString XclExpUrlHelper::EncodeDde( const OUString& rApplic, const OUString& rTopic )
{
- return rApplic + OUStringLiteral1(EXC_DDE_DELIM) + rTopic;
+ return rApplic + OUStringChar(EXC_DDE_DELIM) + rTopic;
}
// Cached Value Lists =========================================================
diff --git a/sc/source/filter/excel/xelink.cxx b/sc/source/filter/excel/xelink.cxx
index 6f82b438b3b0..20fe2c914553 100644
--- a/sc/source/filter/excel/xelink.cxx
+++ b/sc/source/filter/excel/xelink.cxx
@@ -1457,7 +1457,7 @@ XclExpExternSheet::XclExpExternSheet( const XclExpRoot& rRoot, const OUString& r
XclExpExternSheetBase( rRoot, EXC_ID_EXTERNSHEET )
{
// reference to own sheet: \03<sheetname>
- Init(OUStringLiteral1(EXC_EXTSH_TABNAME) + rTabName);
+ Init(OUStringChar(EXC_EXTSH_TABNAME) + rTabName);
}
void XclExpExternSheet::Save( XclExpStream& rStrm )
diff --git a/sc/source/filter/excel/xiescher.cxx b/sc/source/filter/excel/xiescher.cxx
index bd88c7e2224c..cf214285f751 100644
--- a/sc/source/filter/excel/xiescher.cxx
+++ b/sc/source/filter/excel/xiescher.cxx
@@ -2918,7 +2918,7 @@ OUString XclImpPictureObj::GetOleStorageName() const
aStrgName = mbEmbedded ? OUString(EXC_STORAGE_OLE_EMBEDDED) : OUString(EXC_STORAGE_OLE_LINKED);
static const sal_Char spcHexChars[] = "0123456789ABCDEF";
for( sal_uInt8 nIndex = 32; nIndex > 0; nIndex -= 4 )
- aStrgName.append(OUStringLiteral1( spcHexChars[ ::extract_value< sal_uInt8 >( mnStorageId, nIndex - 4, 4 ) ] ));
+ aStrgName.append(OUStringChar( spcHexChars[ ::extract_value< sal_uInt8 >( mnStorageId, nIndex - 4, 4 ) ] ));
}
return aStrgName.makeStringAndClear();
}
diff --git a/sc/source/filter/excel/xihelper.cxx b/sc/source/filter/excel/xihelper.cxx
index 90d0d10ea807..df62f997daa9 100644
--- a/sc/source/filter/excel/xihelper.cxx
+++ b/sc/source/filter/excel/xihelper.cxx
@@ -320,7 +320,7 @@ void XclImpHFConverter::ParseString( const OUString& rHFString )
InsertLineBreak();
break;
default:
- maCurrText.append(OUStringLiteral1(*pChar));
+ maCurrText.append(OUStringChar(*pChar));
}
}
break;
@@ -594,7 +594,7 @@ void lclAppendUrlChar( OUString& rUrl, sal_Unicode cChar )
{
case '#': rUrl += "%23"; break;
case '%': rUrl += "%25"; break;
- default: rUrl += OUStringLiteral1( cChar );
+ default: rUrl += OUStringChar( cChar );
}
}
@@ -688,7 +688,7 @@ void XclImpUrlHelper::DecodeUrl(
rUrl += "\\";
else // control character in raw name -> DDE link
{
- rUrl += OUStringLiteral1(EXC_DDE_DELIM);
+ rUrl += OUStringChar(EXC_DDE_DELIM);
eState = xlUrlRaw;
}
break;
@@ -730,7 +730,7 @@ void XclImpUrlHelper::DecodeUrl(
// --- sheet name ---
case xlUrlSheetName:
- rTabName += OUStringLiteral1( *pChar );
+ rTabName += OUStringChar( *pChar );
break;
// --- raw read mode ---
diff --git a/sc/source/filter/excel/xiname.cxx b/sc/source/filter/excel/xiname.cxx
index 67a0c193b315..49885050cff0 100644
--- a/sc/source/filter/excel/xiname.cxx
+++ b/sc/source/filter/excel/xiname.cxx
@@ -108,7 +108,7 @@ XclImpName::XclImpName( XclImpStream& rStrm, sal_uInt16 nXclNameIdx ) :
if( (GetBiff() == EXC_BIFF5) && (maXclName == XclTools::GetXclBuiltInDefName(EXC_BUILTIN_FILTERDATABASE)) )
{
bBuiltIn = true;
- maXclName = OUStringLiteral1(EXC_BUILTIN_FILTERDATABASE);
+ maXclName = OUStringChar(EXC_BUILTIN_FILTERDATABASE);
}
// convert Excel name to Calc name
diff --git a/sc/source/filter/excel/xlformula.cxx b/sc/source/filter/excel/xlformula.cxx
index 99fb54a530d0..4665f6dde359 100644
--- a/sc/source/filter/excel/xlformula.cxx
+++ b/sc/source/filter/excel/xlformula.cxx
@@ -889,7 +889,7 @@ bool XclTokenArrayHelper::GetStringList( OUString& rStringList, const ScTokenArr
}
case STATE_SEP:
bRet = aIt->GetOpCode() == ocSep;
- if( bRet ) rStringList += OUStringLiteral1(cSep);
+ if( bRet ) rStringList += OUStringChar(cSep);
eState = (bRet && (++aIt).Is()) ? STATE_STR : STATE_END;
break;
default:;
diff --git a/sc/source/filter/ftools/ftools.cxx b/sc/source/filter/ftools/ftools.cxx
index a116d448d971..f90051af41ad 100644
--- a/sc/source/filter/ftools/ftools.cxx
+++ b/sc/source/filter/ftools/ftools.cxx
@@ -117,10 +117,10 @@ rtl_TextEncoding ScfTools::GetSystemTextEncoding()
OUString ScfTools::GetHexStr( sal_uInt16 nValue )
{
const sal_Char pHex[] = "0123456789ABCDEF";
- OUString aStr = OUStringLiteral1( pHex[ nValue >> 12 ] )
- + OUStringLiteral1( pHex[ (nValue >> 8) & 0x000F ] )
- + OUStringLiteral1( pHex[ (nValue >> 4) & 0x000F ] )
- + OUStringLiteral1( pHex[ nValue & 0x000F ] );
+ OUString aStr = OUStringChar( pHex[ nValue >> 12 ] )
+ + OUStringChar( pHex[ (nValue >> 8) & 0x000F ] )
+ + OUStringChar( pHex[ (nValue >> 4) & 0x000F ] )
+ + OUStringChar( pHex[ nValue & 0x000F ] );
return aStr;
}
diff --git a/sc/source/filter/oox/stylesbuffer.cxx b/sc/source/filter/oox/stylesbuffer.cxx
index 5e808c8c9a8e..a6887b7bd103 100644
--- a/sc/source/filter/oox/stylesbuffer.cxx
+++ b/sc/source/filter/oox/stylesbuffer.cxx
@@ -2611,7 +2611,7 @@ void CellStyleBuffer::finalizeImport()
OUString aUnusedName;
do
{
- aUnusedName = aStyleName + OUStringLiteral1(' ') + OUString::number( ++nIndex );
+ aUnusedName = aStyleName + OUStringChar(' ') + OUString::number( ++nIndex );
}
while( aCellStyles.find( aUnusedName ) != aCellStyles.end() );
aCellStyles[ aUnusedName ] = rxStyle;
diff --git a/sc/source/filter/oox/workbookhelper.cxx b/sc/source/filter/oox/workbookhelper.cxx
index 5fb3dca410a1..4925c7841ee2 100644
--- a/sc/source/filter/oox/workbookhelper.cxx
+++ b/sc/source/filter/oox/workbookhelper.cxx
@@ -377,7 +377,7 @@ OUString findUnusedName( const ScRangeName* pRangeName, const OUString& rSuggest
OUString aNewName = rSuggestedName;
sal_Int32 nIndex = 0;
while(pRangeName->findByUpperName(ScGlobal::pCharClass->uppercase(aNewName)))
- aNewName = rSuggestedName + OUStringLiteral1('_') + OUString::number( nIndex++ );
+ aNewName = rSuggestedName + OUStringChar('_') + OUString::number( nIndex++ );
return aNewName;
}
diff --git a/sc/source/filter/qpro/qpro.cxx b/sc/source/filter/qpro/qpro.cxx
index 87d52e36186e..116304c5ad7e 100644
--- a/sc/source/filter/qpro/qpro.cxx
+++ b/sc/source/filter/qpro/qpro.cxx
@@ -182,7 +182,7 @@ ErrCode ScQProReader::parse( ScDocument *pDoc )
if( nTab < 26 )
{
OUString aName;
- aName += OUStringLiteral1( 'A' + nTab );
+ aName += OUStringChar( 'A' + nTab );
if (!nTab)
pDoc->RenameTab( nTab, aName );
else
diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx
index 6d897489bfcc..219081a0da31 100644
--- a/sc/source/ui/app/inputhdl.cxx
+++ b/sc/source/ui/app/inputhdl.cxx
@@ -1268,7 +1268,7 @@ bool ScInputHandler::GetFuncName( OUString& aStart, OUString& aResult )
::std::vector<sal_Unicode>::reverse_iterator rIt = aTemp.rbegin();
aResult = OUString( *rIt++ );
while ( rIt != aTemp.rend() )
- aResult += OUStringLiteral1( *rIt++ );
+ aResult += OUStringChar( *rIt++ );
return true;
}
diff --git a/sc/source/ui/dbgui/asciiopt.cxx b/sc/source/ui/dbgui/asciiopt.cxx
index 40f62a357e63..70236bce8cbc 100644
--- a/sc/source/ui/dbgui/asciiopt.cxx
+++ b/sc/source/ui/dbgui/asciiopt.cxx
@@ -71,7 +71,7 @@ static OUString lcl_decodeSepString( const OUString & rSepNums, bool & o_bMergeF
{
sal_Int32 nVal = aCode.toInt32();
if ( nVal )
- aFieldSeps.append(OUStringLiteral1(nVal));
+ aFieldSeps.append(OUStringChar(nVal));
}
}
while ( nPos >= 0 );
diff --git a/sc/source/ui/dbgui/scuiasciiopt.cxx b/sc/source/ui/dbgui/scuiasciiopt.cxx
index b6f3b065df45..c3fa2fdc0651 100644
--- a/sc/source/ui/dbgui/scuiasciiopt.cxx
+++ b/sc/source/ui/dbgui/scuiasciiopt.cxx
@@ -679,7 +679,7 @@ void ScImportAsciiDlg::SetSeparators()
case ' ': pCkbSpace->Check(); break;
default:
pCkbOther->Check();
- pEdOther->SetText( pEdOther->GetText() + OUStringLiteral1(aSep[i]) );
+ pEdOther->SetText( pEdOther->GetText() + OUStringChar(aSep[i]) );
}
}
}
diff --git a/sc/source/ui/docshell/impex.cxx b/sc/source/ui/docshell/impex.cxx
index 494f0548a0c7..5f463d043de9 100644
--- a/sc/source/ui/docshell/impex.cxx
+++ b/sc/source/ui/docshell/impex.cxx
@@ -836,7 +836,7 @@ static void lcl_WriteString( SvStream& rStrm, OUString& rString, sal_Unicode cQu
if (cQuote)
{
- rString = OUStringLiteral1(cQuote) + rString + OUStringLiteral1(cQuote);
+ rString = OUStringChar(cQuote) + rString + OUStringChar(cQuote);
}
ScImportExport::WriteUnicodeOrByteString( rStrm, rString );
@@ -1174,7 +1174,7 @@ static bool lcl_PutString(
if (nFound > 6)
{
sal_Unicode cDec = '.';
- OUString aT = OUStringLiteral1(cDec) + rStr.copy( nStart[6], nEnd[6]+1-nStart[6]);
+ OUString aT = OUStringChar(cDec) + rStr.copy( nStart[6], nEnd[6]+1-nStart[6]);
rtl_math_ConversionStatus eStatus;
double fV = rtl::math::stringToDouble( aT, cDec, 0, &eStatus );
if (eStatus == rtl_math_ConversionStatus_Ok)
@@ -1695,7 +1695,7 @@ bool ScImportExport::Doc2Text( SvStream& rStrm )
}
if( mExportTextOptions.mcSeparatorConvertTo && cSep )
- aCellStr = aCellStr.replaceAll( OUStringLiteral1(cSep), OUStringLiteral1(mExportTextOptions.mcSeparatorConvertTo) );
+ aCellStr = aCellStr.replaceAll( OUStringChar(cSep), OUStringChar(mExportTextOptions.mcSeparatorConvertTo) );
if( mExportTextOptions.mbAddQuotes && ( aCellStr.indexOf( cSep ) != -1 ) )
lcl_WriteString( rStrm, aCellStr, cStr, cStr );
@@ -1728,7 +1728,7 @@ bool ScImportExport::Doc2Text( SvStream& rStrm )
}
if( mExportTextOptions.mcSeparatorConvertTo && cSep )
- aCellStr = aCellStr.replaceAll( OUStringLiteral1(cSep), OUStringLiteral1(mExportTextOptions.mcSeparatorConvertTo) );
+ aCellStr = aCellStr.replaceAll( OUStringChar(cSep), OUStringChar(mExportTextOptions.mcSeparatorConvertTo) );
if( mExportTextOptions.mbAddQuotes && hasLineBreaksOrSeps(aCellStr, cSep) )
lcl_WriteString( rStrm, aCellStr, cStr, cStr );
diff --git a/sc/source/ui/optdlg/tpusrlst.cxx b/sc/source/ui/optdlg/tpusrlst.cxx
index 652c4b2d0919..c50f171664fb 100644
--- a/sc/source/ui/optdlg/tpusrlst.cxx
+++ b/sc/source/ui/optdlg/tpusrlst.cxx
@@ -297,12 +297,12 @@ void ScTpUserLists::MakeListStr( OUString& rListStr )
sal_Int32 c = 0;
while ( c < nLen )
{
- rListStr += OUStringLiteral1(aStr[c]);
+ rListStr += OUStringChar(aStr[c]);
++c;
if ((c < nLen) && (aStr[c] == cDelimiter))
{
- rListStr += OUStringLiteral1(aStr[c]);
+ rListStr += OUStringChar(aStr[c]);
while ((c < nLen) && (aStr[c] == cDelimiter))
++c;
diff --git a/sc/source/ui/pagedlg/areasdlg.cxx b/sc/source/ui/pagedlg/areasdlg.cxx
index 6302fc3018cb..015535adf644 100644
--- a/sc/source/ui/pagedlg/areasdlg.cxx
+++ b/sc/source/ui/pagedlg/areasdlg.cxx
@@ -200,7 +200,7 @@ void ScPrintAreasDlg::AddRefEntry()
if (m_pRefInputEdit == m_xEdPrintArea.get())
{
const sal_Unicode sep = ScCompiler::GetNativeSymbolChar(ocSep);
- OUString aVal = m_xEdPrintArea->GetText() + OUStringLiteral1(sep);
+ OUString aVal = m_xEdPrintArea->GetText() + OUStringChar(sep);
m_xEdPrintArea->SetText(aVal);
sal_Int32 nLen = aVal.getLength();
@@ -268,7 +268,7 @@ void ScPrintAreasDlg::Impl_Reset()
if (pPrintRange)
{
if ( !aStrRange.isEmpty() )
- aStrRange += OUStringLiteral1(sep);
+ aStrRange += OUStringChar(sep);
aStrRange += pPrintRange->Format(ScRefFlags::RANGE_ABS, pDoc, eConv);
}
}
@@ -736,7 +736,7 @@ static bool lcl_CheckRepeatString( const OUString& rStr, const ScDocument* pDoc,
bEndPos = true;
}
else
- aBuf += OUStringLiteral1(c);
+ aBuf += OUStringChar(c);
}
if (!aBuf.isEmpty())
diff --git a/sc/source/ui/vba/vbasheetobject.cxx b/sc/source/ui/vba/vbasheetobject.cxx
index 469e67027d6c..b5fdcd159c10 100644
--- a/sc/source/ui/vba/vbasheetobject.cxx
+++ b/sc/source/ui/vba/vbasheetobject.cxx
@@ -282,7 +282,7 @@ void SAL_CALL ScVbaSheetObjectBase::setPrintObject( sal_Bool /*bPrintObject*/ )
void ScVbaSheetObjectBase::setDefaultProperties( sal_Int32 nIndex )
{
- OUString aName = implGetBaseName() + OUStringLiteral1(' ') + OUString::number( nIndex + 1 );
+ OUString aName = implGetBaseName() + OUStringChar(' ') + OUString::number( nIndex + 1 );
setName( aName );
implSetDefaultProperties();
}
diff --git a/sc/source/ui/view/prevwsh.cxx b/sc/source/ui/view/prevwsh.cxx
index 7530f9f1b46e..493ce87228ce 100644
--- a/sc/source/ui/view/prevwsh.cxx
+++ b/sc/source/ui/view/prevwsh.cxx
@@ -899,7 +899,7 @@ void ScPreviewShell::WriteUserData(OUString& rData, bool /* bBrowse */)
// nPageNo
rData = OUString::number(pPreview->GetZoom())
- + OUStringLiteral1(SC_USERDATA_SEP)
+ + OUStringChar(SC_USERDATA_SEP)
+ OUString::number(pPreview->GetPageNo());
}
diff --git a/sc/source/ui/view/viewdata.cxx b/sc/source/ui/view/viewdata.cxx
index c3e5482a8670..0eb317ff1eca 100644
--- a/sc/source/ui/view/viewdata.cxx
+++ b/sc/source/ui/view/viewdata.cxx
@@ -2835,7 +2835,7 @@ void ScViewData::WriteUserData(OUString& rData)
( maTabData[i]->eVSplitMode == SC_SPLIT_FIX &&
maTabData[i]->nFixPosY > MAXROW_30 ) )
{
- cTabSep = OUStringLiteral1(SC_NEW_TABSEP); // in order to not kill a 3.1-version
+ cTabSep = OUStringChar(SC_NEW_TABSEP); // in order to not kill a 3.1-version
}
rData += OUString::number( maTabData[i]->nCurX ) + cTabSep +
diff --git a/scaddins/source/analysis/analysishelper.cxx b/scaddins/source/analysis/analysishelper.cxx
index ae4b798effa8..a42c18b44d61 100644
--- a/scaddins/source/analysis/analysishelper.cxx
+++ b/scaddins/source/analysis/analysishelper.cxx
@@ -2064,7 +2064,7 @@ sal_Int16 ConvertData::GetMatchingLevel( const OUString& rRef ) const
sal_Int32 nLen = rRef.getLength();
sal_Int32 nIndex = rRef.lastIndexOf( '^' );
if( nIndex > 0 && nIndex == ( nLen - 2 ) )
- aStr = aStr.copy( 0, nLen - 2 ) + OUStringLiteral1( aStr[ nLen - 1 ] );
+ aStr = aStr.copy( 0, nLen - 2 ) + OUStringChar( aStr[ nLen - 1 ] );
if( aName == aStr )
return 0;
else
diff --git a/sd/source/core/drawdoc4.cxx b/sd/source/core/drawdoc4.cxx
index 9edf91062a16..8820252853d4 100644
--- a/sd/source/core/drawdoc4.cxx
+++ b/sd/source/core/drawdoc4.cxx
@@ -1075,10 +1075,10 @@ OUString SdDrawDocument::CreatePageNumValue(sal_uInt16 nNum) const
switch (mePageNumType)
{
case css::style::NumberingType::CHARS_UPPER_LETTER:
- aPageNumValue += OUStringLiteral1( (nNum - 1) % 26 + 'A' );
+ aPageNumValue += OUStringChar( (nNum - 1) % 26 + 'A' );
break;
case css::style::NumberingType::CHARS_LOWER_LETTER:
- aPageNumValue += OUStringLiteral1( (nNum - 1) % 26 + 'a' );
+ aPageNumValue += OUStringChar( (nNum - 1) % 26 + 'a' );
break;
case css::style::NumberingType::ROMAN_UPPER:
bUpper = true;
diff --git a/sd/source/core/stlsheet.cxx b/sd/source/core/stlsheet.cxx
index 99fdd72c6940..77f7908337bc 100644
--- a/sd/source/core/stlsheet.cxx
+++ b/sd/source/core/stlsheet.cxx
@@ -614,7 +614,7 @@ struct ApiNameMap
OUString GetApiNameForHelpId(sal_uLong nId)
{
if ((nId >= HID_PSEUDOSHEET_OUTLINE1) && (nId <= HID_PSEUDOSHEET_OUTLINE9))
- return "outline" + OUStringLiteral1('1' + (nId - HID_PSEUDOSHEET_OUTLINE1));
+ return "outline" + OUStringChar('1' + (nId - HID_PSEUDOSHEET_OUTLINE1));
for (const auto& i : pApiNameMap)
if (nId == i.mnHelpId)
diff --git a/sd/source/filter/eppt/pptx-epptbase.cxx b/sd/source/filter/eppt/pptx-epptbase.cxx
index 01b837c1870a..ca8dc682ea60 100644
--- a/sd/source/filter/eppt/pptx-epptbase.cxx
+++ b/sd/source/filter/eppt/pptx-epptbase.cxx
@@ -569,7 +569,7 @@ bool PPTWriterBase::GetStyleSheets()
if ( nInstance == EPP_TEXTTYPE_Body )
{
sal_Unicode cTemp = aStyle[aStyle.getLength() - 1];
- aStyle = aStyle.copy(0, aStyle.getLength() - 1) + OUStringLiteral1(++cTemp);
+ aStyle = aStyle.copy(0, aStyle.getLength() - 1) + OUStringChar(++cTemp);
if ( aXFamily->hasByName( aStyle ) )
{
aXFamily->getByName( aStyle ) >>= xStyle;
diff --git a/sd/source/filter/eppt/pptx-text.cxx b/sd/source/filter/eppt/pptx-text.cxx
index e7def2808185..5c141cb65103 100644
--- a/sd/source/filter/eppt/pptx-text.cxx
+++ b/sd/source/filter/eppt/pptx-text.cxx
@@ -1032,7 +1032,7 @@ void ParagraphObj::ImplGetNumberingLevel( PPTExBulletProvider* pBuProv, sal_Int1
break;
case SVX_NUM_NUMBER_LOWER_ZH :
{
- if ( sSuffix == OUStringLiteral1(0xff0e) )
+ if ( sSuffix == OUStringChar(0xff0e) )
nMappedNumType = 0x260001; // Japanese with double-byte period.
else if ( !sSuffix.isEmpty() )
nMappedNumType = 0x1B0001; // Japanese/Korean with single-byte period.
diff --git a/sd/source/ui/dlg/copydlg.cxx b/sd/source/ui/dlg/copydlg.cxx
index d83576b80abf..08d6dac24aef 100644
--- a/sd/source/ui/dlg/copydlg.cxx
+++ b/sd/source/ui/dlg/copydlg.cxx
@@ -71,13 +71,13 @@ CopyDlg::~CopyDlg()
{
SvtViewOptions aDlgOpt(EViewType::Dialog, OStringToOUString(m_xDialog->get_help_id(), RTL_TEXTENCODING_UTF8));
OUString sStr =
- OUString::number(m_xNumFldCopies->get_value()) + OUStringLiteral1(TOKEN) +
- OUString::number(m_xMtrFldMoveX->get_value(FieldUnit::NONE)) + OUStringLiteral1(TOKEN) +
- OUString::number(m_xMtrFldMoveY->get_value(FieldUnit::NONE)) + OUStringLiteral1(TOKEN) +
- OUString::number(m_xMtrFldAngle->get_value(FieldUnit::NONE)) + OUStringLiteral1(TOKEN) +
- OUString::number(m_xMtrFldWidth->get_value(FieldUnit::NONE)) + OUStringLiteral1(TOKEN) +
- OUString::number(m_xMtrFldHeight->get_value(FieldUnit::NONE)) + OUStringLiteral1(TOKEN) +
- OUString::number(static_cast<sal_uInt32>(m_xLbStartColor->GetSelectEntryColor())) + OUStringLiteral1(TOKEN) +
+ OUString::number(m_xNumFldCopies->get_value()) + OUStringChar(TOKEN) +
+ OUString::number(m_xMtrFldMoveX->get_value(FieldUnit::NONE)) + OUStringChar(TOKEN) +
+ OUString::number(m_xMtrFldMoveY->get_value(FieldUnit::NONE)) + OUStringChar(TOKEN) +
+ OUString::number(m_xMtrFldAngle->get_value(FieldUnit::NONE)) + OUStringChar(TOKEN) +
+ OUString::number(m_xMtrFldWidth->get_value(FieldUnit::NONE)) + OUStringChar(TOKEN) +
+ OUString::number(m_xMtrFldHeight->get_value(FieldUnit::NONE)) + OUStringChar(TOKEN) +
+ OUString::number(static_cast<sal_uInt32>(m_xLbStartColor->GetSelectEntryColor())) + OUStringChar(TOKEN) +
OUString::number(static_cast<sal_uInt32>(m_xLbEndColor->GetSelectEntryColor()));
aDlgOpt.SetUserItem("UserItem", css::uno::makeAny(sStr));
}
diff --git a/sd/source/ui/dlg/tpaction.cxx b/sd/source/ui/dlg/tpaction.cxx
index a908348123b8..a2b3a8cefb3c 100644
--- a/sd/source/ui/dlg/tpaction.cxx
+++ b/sd/source/ui/dlg/tpaction.cxx
@@ -798,7 +798,7 @@ OUString SdTPAction::GetEditText( bool bFullDocDestination )
OUString aTmpStr( m_xLbTreeDocument->get_selected_text() );
if( !aTmpStr.isEmpty() )
{
- aStr += OUStringLiteral1(DOCUMENT_TOKEN) + aTmpStr;
+ aStr += OUStringChar(DOCUMENT_TOKEN) + aTmpStr;
}
}
diff --git a/sd/source/ui/dlg/tpoption.cxx b/sd/source/ui/dlg/tpoption.cxx
index d26132af1496..2adcd977111f 100644
--- a/sd/source/ui/dlg/tpoption.cxx
+++ b/sd/source/ui/dlg/tpoption.cxx
@@ -525,7 +525,7 @@ void SdTpOptionsMisc::SetDrawMode()
OUString SdTpOptionsMisc::GetScale( sal_Int32 nX, sal_Int32 nY )
{
- return OUString::number(nX) + OUStringLiteral1(TOKEN) + OUString::number(nY);
+ return OUString::number(nX) + OUStringChar(TOKEN) + OUString::number(nY);
}
bool SdTpOptionsMisc::SetScale( const OUString& aScale, sal_Int32& rX, sal_Int32& rY )
diff --git a/sd/source/ui/slideshow/slideshowimpl.cxx b/sd/source/ui/slideshow/slideshowimpl.cxx
index 13904969f8e8..2e33d4a64f35 100644
--- a/sd/source/ui/slideshow/slideshowimpl.cxx
+++ b/sd/source/ui/slideshow/slideshowimpl.cxx
@@ -1788,7 +1788,7 @@ bool SlideshowImpl::keyInput(const KeyEvent& rKEvt)
case KEY_7:
case KEY_8:
case KEY_9:
- maCharBuffer += OUStringLiteral1( rKEvt.GetCharCode() );
+ maCharBuffer += OUStringChar( rKEvt.GetCharCode() );
break;
case KEY_PAGEUP:
diff --git a/sfx2/source/appl/fileobj.cxx b/sfx2/source/appl/fileobj.cxx
index 744793e0626e..cb6529fcfde2 100644
--- a/sfx2/source/appl/fileobj.cxx
+++ b/sfx2/source/appl/fileobj.cxx
@@ -280,8 +280,8 @@ void SvFileObject::Edit(weld::Window* pParent, sfx2::SvBaseLink* pLink, const Li
if( !aDlg.Execute() )
{
sFile = aDlg.GetPath()
- + OUStringLiteral1(sfx2::cTokenSeparator)
- + OUStringLiteral1(sfx2::cTokenSeparator)
+ + OUStringChar(sfx2::cTokenSeparator)
+ + OUStringChar(sfx2::cTokenSeparator)
+ aDlg.GetDetectedFilter();
aEndEditLink.Call( sFile );
@@ -368,8 +368,8 @@ IMPL_LINK( SvFileObject, DialogClosedHdl, sfx2::FileDialogHelper*, _pFileDlg, vo
if ( _pFileDlg && _pFileDlg->GetError() == ERRCODE_NONE )
{
OUString sURL( _pFileDlg->GetPath() );
- sFile = sURL + OUStringLiteral1(sfx2::cTokenSeparator)
- + OUStringLiteral1(sfx2::cTokenSeparator)
+ sFile = sURL + OUStringChar(sfx2::cTokenSeparator)
+ + OUStringChar(sfx2::cTokenSeparator)
+ impl_getFilter( sURL );
}
}
diff --git a/sfx2/source/appl/linkmgr2.cxx b/sfx2/source/appl/linkmgr2.cxx
index fa242e0c34e3..3109ac7ff28a 100644
--- a/sfx2/source/appl/linkmgr2.cxx
+++ b/sfx2/source/appl/linkmgr2.cxx
@@ -377,7 +377,7 @@ void MakeLnkName( OUString& rName, const OUString* pType, const OUString& rFile,
if( pType )
{
rName = comphelper::string::strip(*pType, ' ')
- + OUStringLiteral1(cTokenSeparator);
+ + OUStringChar(cTokenSeparator);
}
else
rName.clear();
@@ -385,11 +385,11 @@ void MakeLnkName( OUString& rName, const OUString* pType, const OUString& rFile,
rName += rFile;
rName = comphelper::string::strip(rName, ' ')
- + OUStringLiteral1(cTokenSeparator);
+ + OUStringChar(cTokenSeparator);
rName = comphelper::string::strip(rName, ' ') + rLink;
if( pFilter )
{
- rName += OUStringLiteral1(cTokenSeparator) + *pFilter;
+ rName += OUStringChar(cTokenSeparator) + *pFilter;
rName = comphelper::string::strip(rName, ' ');
}
}
diff --git a/starmath/source/mathtype.cxx b/starmath/source/mathtype.cxx
index da48da787fa5..8d785dde61c8 100644
--- a/starmath/source/mathtype.cxx
+++ b/starmath/source/mathtype.cxx
@@ -115,56 +115,56 @@ bool MathType::LookupChar(sal_Unicode nChar,OUStringBuffer &rRet,sal_uInt8 nVers
pC = " rightarrow ";
else
{
- rRet.append(OUStringLiteral1(nChar));
+ rRet.append(OUStringChar(nChar));
bRet=true;
}
break;
case 0x00fb:
if ((nVersion < 3) && (nTypeFace == 0x81))
nChar = 0xDF;
- rRet.append(OUStringLiteral1(nChar));
+ rRet.append(OUStringChar(nChar));
bRet=true;
break;
case 'a':
if ((nVersion < 3) && (nTypeFace == 0x84))
nChar = 0x3b1;
- rRet.append(OUStringLiteral1(nChar));
+ rRet.append(OUStringChar(nChar));
bRet=true;
break;
case 'b':
if ((nVersion < 3) && (nTypeFace == 0x84))
nChar = 0x3b2;
- rRet.append(OUStringLiteral1(nChar));
+ rRet.append(OUStringChar(nChar));
bRet=true;
break;
case 'l':
if ((nVersion < 3) && (nTypeFace == 0x84))
nChar = 0x3bb;
- rRet.append(OUStringLiteral1(nChar));
+ rRet.append(OUStringChar(nChar));
bRet=true;
break;
case 'n':
if ((nVersion < 3) && (nTypeFace == 0x84))
nChar = 0x3bd;
- rRet.append(OUStringLiteral1(nChar));
+ rRet.append(OUStringChar(nChar));
bRet=true;
break;
case 'r':
if ((nVersion < 3) && (nTypeFace == 0x84))
nChar = 0x3c1;
- rRet.append(OUStringLiteral1(nChar));
+ rRet.append(OUStringChar(nChar));
bRet=true;
break;
case 'D':
if ((nVersion < 3) && (nTypeFace == 0x84))
nChar = 0x394;
- rRet.append(OUStringLiteral1(nChar));
+ rRet.append(OUStringChar(nChar));
bRet=true;
break;
case 0xa9:
if ((nVersion < 3) && (nTypeFace == 0x82))
nChar = '\'';
- rRet.append(OUStringLiteral1(nChar));
+ rRet.append(OUStringChar(nChar));
bRet=true;
break;
case 0x00f1:
@@ -172,7 +172,7 @@ bool MathType::LookupChar(sal_Unicode nChar,OUStringBuffer &rRet,sal_uInt8 nVers
pC = " \\rangle ";
else
{
- rRet.append(OUStringLiteral1(nChar));
+ rRet.append(OUStringChar(nChar));
bRet=true;
}
break;
@@ -181,7 +181,7 @@ bool MathType::LookupChar(sal_Unicode nChar,OUStringBuffer &rRet,sal_uInt8 nVers
pC = " <= ";
else
{
- rRet.append(OUStringLiteral1(nChar));
+ rRet.append(OUStringChar(nChar));
bRet=true;
}
break;
@@ -190,7 +190,7 @@ bool MathType::LookupChar(sal_Unicode nChar,OUStringBuffer &rRet,sal_uInt8 nVers
pC = " drarrow ";
else
{
- rRet.append(OUStringLiteral1(nChar));
+ rRet.append(OUStringChar(nChar));
bRet=true;
}
break;
@@ -199,7 +199,7 @@ bool MathType::LookupChar(sal_Unicode nChar,OUStringBuffer &rRet,sal_uInt8 nVers
pC = " %OMEGA ";
else
{
- rRet.append(OUStringLiteral1(nChar));
+ rRet.append(OUStringChar(nChar));
bRet=true;
}
break;
@@ -313,10 +313,10 @@ bool MathType::LookupChar(sal_Unicode nChar,OUStringBuffer &rRet,sal_uInt8 nVers
break;
case 0x2208: // in
case 0x2209: // notin
- rRet.append(" func ").append(OUStringLiteral1(nChar)).append(" ");
+ rRet.append(" func ").append(OUStringChar(nChar)).append(" ");
break;
case 0x220d: // owns
- rRet.append(" func ").append(OUStringLiteral1(0x220b)).append(" ");
+ rRet.append(" func ").append(OUStringChar(0x220b)).append(" ");
break;
case 0x220f:
pC = " prod ";
@@ -429,7 +429,7 @@ bool MathType::LookupChar(sal_Unicode nChar,OUStringBuffer &rRet,sal_uInt8 nVers
case 0x2289: // nsupseteq
case 0x22b2: // NORMAL SUBGROUP OF
case 0x22b3: // CONTAINS AS NORMAL SUBGROUP
- rRet.append(" func ").append(OUStringLiteral1(nChar)).append(" ");
+ rRet.append(" func ").append(OUStringChar(nChar)).append(" ");
break;
case 0x22a5:
pC = " ortho ";
@@ -500,7 +500,7 @@ bool MathType::LookupChar(sal_Unicode nChar,OUStringBuffer &rRet,sal_uInt8 nVers
pC = " %OMEGA ";
break;
default:
- rRet.append(OUStringLiteral1(nChar));
+ rRet.append(OUStringChar(nChar));
bRet=true;
break;
}
diff --git a/starmath/source/node.cxx b/starmath/source/node.cxx
index ca5dd1a24a4e..f8f00cd8a949 100644
--- a/starmath/source/node.cxx
+++ b/starmath/source/node.cxx
@@ -2550,7 +2550,7 @@ void SmAttributNode::CreateTextFromNode(OUStringBuffer &rText)
rText.append("bar ");
break;
default:
- rText.append(OUStringLiteral1(nLast));
+ rText.append(OUStringChar(nLast));
break;
}
}
diff --git a/starmath/source/ooxmlimport.cxx b/starmath/source/ooxmlimport.cxx
index 912136e69aa8..4150dcba0209 100644
--- a/starmath/source/ooxmlimport.cxx
+++ b/starmath/source/ooxmlimport.cxx
@@ -317,25 +317,25 @@ OUString SmOoxmlImport::handleD()
opening = "left lbrace ";
if( closing == "}" )
closing = " right rbrace";
- if( opening == OUStringLiteral1(0x27e6) )
+ if( opening == OUStringChar(0x27e6) )
opening = "left ldbracket ";
- if( closing == OUStringLiteral1(0x27e7) )
+ if( closing == OUStringChar(0x27e7) )
closing = " right rdbracket";
if( opening == "|" )
opening = "left lline ";
if( closing == "|" )
closing = " right rline";
- if (opening == OUStringLiteral1(MS_DLINE)
- || opening == OUStringLiteral1(MS_DVERTLINE))
+ if (opening == OUStringChar(MS_DLINE)
+ || opening == OUStringChar(MS_DVERTLINE))
opening = "left ldline ";
- if (closing == OUStringLiteral1(MS_DLINE)
- || closing == OUStringLiteral1(MS_DVERTLINE))
+ if (closing == OUStringChar(MS_DLINE)
+ || closing == OUStringChar(MS_DVERTLINE))
closing = " right rdline";
- if (opening == OUStringLiteral1(MS_LANGLE)
- || opening == OUStringLiteral1(MS_LMATHANGLE))
+ if (opening == OUStringChar(MS_LANGLE)
+ || opening == OUStringChar(MS_LMATHANGLE))
opening = "left langle ";
- if (closing == OUStringLiteral1(MS_RANGLE)
- || closing == OUStringLiteral1(MS_RMATHANGLE))
+ if (closing == OUStringChar(MS_RANGLE)
+ || closing == OUStringChar(MS_RMATHANGLE))
closing = " right rangle";
// use scalable brackets (the explicit "left" or "right")
if( opening == "(" || opening == "[" )
@@ -467,9 +467,9 @@ OUString SmOoxmlImport::handleGroupChr()
if( pos == bot && chr == u'\x23df')
return "{" + e + "} underbrace { }";
if( pos == top )
- return "{" + e + "} csup {" + OUStringLiteral1( chr ) + "}";
+ return "{" + e + "} csup {" + OUStringChar( chr ) + "}";
else
- return "{" + e + "} csub {" + OUStringLiteral1( chr ) + "}";
+ return "{" + e + "} csub {" + OUStringChar( chr ) + "}";
}
OUString SmOoxmlImport::handleM()
diff --git a/stoc/source/security/file_policy.cxx b/stoc/source/security/file_policy.cxx
index 08d97cfdbf44..05cbddbfc4ab 100644
--- a/stoc/source/security/file_policy.cxx
+++ b/stoc/source/security/file_policy.cxx
@@ -172,7 +172,7 @@ void PolicyReader::assureToken( sal_Unicode token )
sal_Unicode c = get();
if (c == token)
return;
- OUString msg = "expected >" + OUStringLiteral1(c) + "<!";
+ OUString msg = "expected >" + OUStringChar(c) + "<!";
error( msg );
}
diff --git a/svl/qa/unit/svl.cxx b/svl/qa/unit/svl.cxx
index d61daae8dd30..e36136e61896 100644
--- a/svl/qa/unit/svl.cxx
+++ b/svl/qa/unit/svl.cxx
@@ -1400,10 +1400,10 @@ void Test::testUserDefinedNumberFormats()
{ // tdf#79399 tdf#101462 Native Number Formats
sCode = "[NatNum5][$-0404]General\\ ";
// Chinese upper case number characters for 120
- sExpected = OUStringLiteral1(22777) +
- OUStringLiteral1(20336) +
- OUStringLiteral1(36019) +
- OUStringLiteral1(25342) +
+ sExpected = OUStringChar(22777) +
+ OUStringChar(20336) +
+ OUStringChar(36019) +
+ OUStringChar(25342) +
" ";
checkPreviewString(aFormatter, sCode, 120, eLang, sExpected);
sCode = "[DBNum2][$-0404]General\\ ";
diff --git a/svl/qa/unit/test_lngmisc.cxx b/svl/qa/unit/test_lngmisc.cxx
index 748b61e2b57e..f3071111b189 100644
--- a/svl/qa/unit/test_lngmisc.cxx
+++ b/svl/qa/unit/test_lngmisc.cxx
@@ -42,7 +42,7 @@ namespace
OUString str1("");
OUString str2("a-b--c---");
- OUString str3 = OUStringLiteral1(SVT_SOFT_HYPHEN) + OUStringLiteral1(SVT_HARD_HYPHEN) + OUStringLiteral1(SVT_HARD_HYPHEN);
+ OUString str3 = OUStringChar(SVT_SOFT_HYPHEN) + OUStringChar(SVT_HARD_HYPHEN) + OUStringChar(SVT_HARD_HYPHEN);
OUString str4("asdf");
diff --git a/svl/source/misc/lngmisc.cxx b/svl/source/misc/lngmisc.cxx
index 1c7928fc6ba9..a5d38b1a21c6 100644
--- a/svl/source/misc/lngmisc.cxx
+++ b/svl/source/misc/lngmisc.cxx
@@ -38,8 +38,8 @@ namespace linguistic
bool RemoveHyphens(OUString &rTxt)
{
sal_Int32 n = rTxt.getLength();
- rTxt = rTxt.replaceAll(OUStringLiteral1(SVT_SOFT_HYPHEN), "");
- rTxt = rTxt.replaceAll(OUStringLiteral1(SVT_HARD_HYPHEN), "");
+ rTxt = rTxt.replaceAll(OUStringChar(SVT_SOFT_HYPHEN), "");
+ rTxt = rTxt.replaceAll(OUStringChar(SVT_HARD_HYPHEN), "");
return n != rTxt.getLength();
}
diff --git a/svl/source/numbers/zformat.cxx b/svl/source/numbers/zformat.cxx
index 092d6b2b5908..dfb41fb0f496 100644
--- a/svl/source/numbers/zformat.cxx
+++ b/svl/source/numbers/zformat.cxx
@@ -998,7 +998,7 @@ SvNumberformat::SvNumberformat(OUString& rString,
{
//! eSymbolType is negative
sal_uInt8 nNum = static_cast<sal_uInt8>(1 - (eSymbolType - BRACKET_SYMBOLTYPE_DBNUM1));
- sStr = "DBNum" + OUStringLiteral1('0' + nNum);
+ sStr = "DBNum" + OUStringChar('0' + nNum);
NumFor[nIndex].SetNatNumNum( nNum, true );
}
break;
diff --git a/svl/source/numbers/zforscan.cxx b/svl/source/numbers/zforscan.cxx
index cf036c8d39ed..04e86ea2ca5b 100644
--- a/svl/source/numbers/zforscan.cxx
+++ b/svl/source/numbers/zforscan.cxx
@@ -820,28 +820,28 @@ short ImpSvNumberformatScan::Next_Symbol( const OUString& rStr,
case ':':
case '-':
eType = NF_SYMBOLTYPE_DEL;
- sSymbolBuffer.append(OUStringLiteral1(cToken));
+ sSymbolBuffer.append(OUStringChar(cToken));
eState = SsStop;
break;
case '*':
eType = NF_SYMBOLTYPE_STAR;
- sSymbolBuffer.append(OUStringLiteral1(cToken));
+ sSymbolBuffer.append(OUStringChar(cToken));
eState = SsGetStar;
break;
case '_':
eType = NF_SYMBOLTYPE_BLANK;
- sSymbolBuffer.append(OUStringLiteral1(cToken));
+ sSymbolBuffer.append(OUStringChar(cToken));
eState = SsGetBlank;
break;
case '"':
eType = NF_SYMBOLTYPE_STRING;
eState = SsGetString;
- sSymbolBuffer.append(OUStringLiteral1(cToken));
+ sSymbolBuffer.append(OUStringChar(cToken));
break;
case '\\':
eType = NF_SYMBOLTYPE_STRING;
eState = SsGetChar;
- sSymbolBuffer.append(OUStringLiteral1(cToken));
+ sSymbolBuffer.append(OUStringChar(cToken));
break;
case '$':
case '+':
@@ -849,7 +849,7 @@ short ImpSvNumberformatScan::Next_Symbol( const OUString& rStr,
case ')':
eType = NF_SYMBOLTYPE_STRING;
eState = SsStop;
- sSymbolBuffer.append(OUStringLiteral1(cToken));
+ sSymbolBuffer.append(OUStringChar(cToken));
break;
default :
if (StringEqualsChar( pFormatter->GetNumDecimalSep(), cToken) ||
@@ -860,7 +860,7 @@ short ImpSvNumberformatScan::Next_Symbol( const OUString& rStr,
{
// Another separator than pre-known ASCII
eType = NF_SYMBOLTYPE_DEL;
- sSymbolBuffer.append(OUStringLiteral1(cToken));
+ sSymbolBuffer.append(OUStringChar(cToken));
eState = SsStop;
}
else if ( pChrCls->isLetter( rStr, nPos-1 ) )
@@ -885,7 +885,7 @@ short ImpSvNumberformatScan::Next_Symbol( const OUString& rStr,
if ( bCurrency )
{
eState = SsGetWord;
- sSymbolBuffer.append(OUStringLiteral1(cToken));
+ sSymbolBuffer.append(OUStringChar(cToken));
}
else
{
@@ -913,7 +913,7 @@ short ImpSvNumberformatScan::Next_Symbol( const OUString& rStr,
{
case '+' :
case '-' : // E+ E- combine to one symbol
- sSymbolBuffer.append(OUStringLiteral1(cNext));
+ sSymbolBuffer.append(OUStringChar(cNext));
eType = NF_KEY_E;
nPos++;
break;
@@ -931,20 +931,20 @@ short ImpSvNumberformatScan::Next_Symbol( const OUString& rStr,
else
{
eState = SsGetWord;
- sSymbolBuffer.append(OUStringLiteral1(cToken));
+ sSymbolBuffer.append(OUStringChar(cToken));
}
}
else
{
eType = NF_SYMBOLTYPE_STRING;
eState = SsStop;
- sSymbolBuffer.append(OUStringLiteral1(cToken));
+ sSymbolBuffer.append(OUStringChar(cToken));
}
break;
}
break;
case SsGetChar:
- sSymbolBuffer.append(OUStringLiteral1(cToken));
+ sSymbolBuffer.append(OUStringChar(cToken));
eState = SsStop;
break;
case SsGetString:
@@ -952,7 +952,7 @@ short ImpSvNumberformatScan::Next_Symbol( const OUString& rStr,
{
eState = SsStop;
}
- sSymbolBuffer.append(OUStringLiteral1(cToken));
+ sSymbolBuffer.append(OUStringChar(cToken));
break;
case SsGetWord:
if ( pChrCls->isLetter( rStr, nPos-1 ) )
@@ -968,7 +968,7 @@ short ImpSvNumberformatScan::Next_Symbol( const OUString& rStr,
}
else
{
- sSymbolBuffer.append(OUStringLiteral1(cToken));
+ sSymbolBuffer.append(OUStringChar(cToken));
}
}
else
@@ -990,7 +990,7 @@ short ImpSvNumberformatScan::Next_Symbol( const OUString& rStr,
(nLen == 2 && (sSymbolBuffer[1] == 'M' || sSymbolBuffer[1] == 'm')
&& (rStr[nPos + 1] == 'M' || rStr[nPos + 1] == 'm'))))
{
- sSymbolBuffer.append(OUStringLiteral1(cToken));
+ sSymbolBuffer.append(OUStringChar(cToken));
bDontStop = true;
}
}
@@ -1008,11 +1008,11 @@ short ImpSvNumberformatScan::Next_Symbol( const OUString& rStr,
break;
case SsGetStar:
eState = SsStop;
- sSymbolBuffer.append(OUStringLiteral1(cToken));
+ sSymbolBuffer.append(OUStringChar(cToken));
break;
case SsGetBlank:
eState = SsStop;
- sSymbolBuffer.append(OUStringLiteral1(cToken));
+ sSymbolBuffer.append(OUStringChar(cToken));
break;
default:
break;
@@ -3101,7 +3101,7 @@ sal_Int32 ImpSvNumberformatScan::FinalScan( OUString& rString )
{
case '+':
case '-':
- rString += OUStringLiteral1(c);
+ rString += OUStringChar(c);
break;
case ' ':
case '.':
@@ -3132,7 +3132,7 @@ sal_Int32 ImpSvNumberformatScan::FinalScan( OUString& rString )
}
else
{
- rString += OUStringLiteral1(c);
+ rString += OUStringChar(c);
}
break;
default:
diff --git a/svl/source/passwordcontainer/passwordcontainer.cxx b/svl/source/passwordcontainer/passwordcontainer.cxx
index 55f959cfc3a5..e72707c58cd8 100644
--- a/svl/source/passwordcontainer/passwordcontainer.cxx
+++ b/svl/source/passwordcontainer/passwordcontainer.cxx
@@ -112,10 +112,10 @@ static std::vector< OUString > getInfoFromInd( const OUString& aInd )
return aResult;
}
- aNum += OUStringLiteral1( pLine[i] );
+ aNum += OUStringChar( pLine[i] );
}
- newItem.append( OUStringLiteral1( aNum.toUInt32( 16 ) ) );
+ newItem.append( OUStringChar( aNum.toUInt32( 16 ) ) );
pLine += 3;
}
diff --git a/svtools/source/control/inettbc.cxx b/svtools/source/control/inettbc.cxx
index 2b359eb06509..0486958c067b 100644
--- a/svtools/source/control/inettbc.cxx
+++ b/svtools/source/control/inettbc.cxx
@@ -461,7 +461,7 @@ void SvtMatchContext_Impl::ReadFolder( const OUString& rURL,
// folders should get a final slash automatically
if ( bIsFolder )
- aInput += OUStringLiteral1(aDelimiter);
+ aInput += OUStringChar(aDelimiter);
Insert( aInput, aObj.GetMainURL( INetURLObject::DecodeMechanism::NONE ), true );
}
@@ -759,7 +759,7 @@ void MatchContext_Impl::ReadFolder( const OUString& rURL,
// folders should get a final slash automatically
if ( bIsFolder )
- aInput += OUStringLiteral1(aDelimiter);
+ aInput += OUStringChar(aDelimiter);
Insert( aInput, aObj.GetMainURL( INetURLObject::DecodeMechanism::NONE ), true );
}
diff --git a/svtools/source/misc/langtab.cxx b/svtools/source/misc/langtab.cxx
index 738f37ebfda4..2b4311cde7f6 100644
--- a/svtools/source/misc/langtab.cxx
+++ b/svtools/source/misc/langtab.cxx
@@ -144,8 +144,8 @@ OUString ApplyLreOrRleEmbedding( const OUString &rText )
OUString aRes( rText );
if (bFound)
{
- aRes = OUStringLiteral1(cStart) + aRes
- + OUStringLiteral1(cPopDirectionalFormat);
+ aRes = OUStringChar(cStart) + aRes
+ + OUStringChar(cPopDirectionalFormat);
}
return aRes;
diff --git a/svx/source/dialog/pagectrl.cxx b/svx/source/dialog/pagectrl.cxx
index 44e5fddc8622..6119973c7ebf 100644
--- a/svx/source/dialog/pagectrl.cxx
+++ b/svx/source/dialog/pagectrl.cxx
@@ -264,7 +264,7 @@ void SvxPageWindow::DrawPage(vcl::RenderContext& rRenderContext, const Point& rO
break;
default: break;
}
- sText += OUStringLiteral1(cArrow);
+ sText += OUStringChar(cArrow);
for (sal_Int32 i = 0; i < sText.getLength(); i++)
{
OUString sDraw(sText.copy(i,1));
diff --git a/svx/source/gallery2/galmisc.cxx b/svx/source/gallery2/galmisc.cxx
index b798263e7498..e933419c252c 100644
--- a/svx/source/gallery2/galmisc.cxx
+++ b/svx/source/gallery2/galmisc.cxx
@@ -186,11 +186,11 @@ OUString GetReducedString( const INetURLObject& rURL, sal_Int32 nMaxLen )
if (nPathPrefixLen >= 0)
{
aReduced = aPath.copy(0, nPathPrefixLen) + "..."
- + OUStringLiteral1(aDelimiter) + aName;
+ + OUStringChar(aDelimiter) + aName;
}
else
{
- aReduced += "..." + OUStringLiteral1(aDelimiter) + "..."
+ aReduced += "..." + OUStringChar(aDelimiter) + "..."
+ aName.copy( aName.getLength() - (nMaxLen - 7) );
}
}
diff --git a/svx/source/items/rotmodit.cxx b/svx/source/items/rotmodit.cxx
index 274a01d46160..8ae88d21cf66 100644
--- a/svx/source/items/rotmodit.cxx
+++ b/svx/source/items/rotmodit.cxx
@@ -70,7 +70,7 @@ bool SvxRotateModeItem::GetPresentation(
[[fallthrough]]; // break; // FALL THROUGH!!!
case SfxItemPresentation::Nameless:
- rText += OUStringLiteral1( GetValue() );
+ rText += OUStringChar( GetValue() );
return true;
break;
default: ;//prevent warning
diff --git a/svx/source/stbctrls/pszctrl.cxx b/svx/source/stbctrls/pszctrl.cxx
index 06877c8f06e4..ddb66bd5253a 100644
--- a/svx/source/stbctrls/pszctrl.cxx
+++ b/svx/source/stbctrls/pszctrl.cxx
@@ -78,7 +78,7 @@ OUString SvxPosSizeStatusBarControl::GetMetricStr_Impl( long nVal )
if( FieldUnit::NONE != eOutUnit )
{
- sMetric += OUStringLiteral1(cSep);
+ sMetric += OUStringChar(cSep);
sal_Int64 nFract = nConvVal % 100;
if ( nFract < 0 )
diff --git a/svx/source/tbxctrls/layctrl.cxx b/svx/source/tbxctrls/layctrl.cxx
index 4cb6101d6f9b..86083652274f 100644
--- a/svx/source/tbxctrls/layctrl.cxx
+++ b/svx/source/tbxctrls/layctrl.cxx
@@ -320,7 +320,7 @@ void TableWindow::Paint(vcl::RenderContext& rRenderContext, const tools::Rectang
// #i95350# force RTL output
if (IsRTLEnabled())
- aText = OUStringLiteral1(0x202D) + aText;
+ aText = OUStringChar(0x202D) + aText;
rRenderContext.DrawText(Point(nTextX, nTextY), aText);
}
diff --git a/svx/source/unodraw/UnoGraphicExporter.cxx b/svx/source/unodraw/UnoGraphicExporter.cxx
index 6ecd15af5d7c..0271af05eb69 100644
--- a/svx/source/unodraw/UnoGraphicExporter.cxx
+++ b/svx/source/unodraw/UnoGraphicExporter.cxx
@@ -346,10 +346,10 @@ IMPL_LINK(GraphicExporter, CalcFieldValueHdl, EditFieldInfo*, pInfo, void)
switch(mpDoc->GetPageNumType())
{
case css::style::NumberingType::CHARS_UPPER_LETTER:
- aPageNumValue += OUStringLiteral1( (mnPageNumber - 1) % 26 + 'A' );
+ aPageNumValue += OUStringChar( (mnPageNumber - 1) % 26 + 'A' );
break;
case css::style::NumberingType::CHARS_LOWER_LETTER:
- aPageNumValue += OUStringLiteral1( (mnPageNumber - 1) % 26 + 'a' );
+ aPageNumValue += OUStringChar( (mnPageNumber - 1) % 26 + 'a' );
break;
case css::style::NumberingType::ROMAN_UPPER:
bUpper = true;
diff --git a/sw/qa/core/uwriter.cxx b/sw/qa/core/uwriter.cxx
index 64ad23f53001..62756392113f 100644
--- a/sw/qa/core/uwriter.cxx
+++ b/sw/qa/core/uwriter.cxx
@@ -397,7 +397,7 @@ void SwDocTest::testModelToViewHelperExpandFieldsExpandFootnoteReplaceMode()
ExpandMode::ExpandFields | ExpandMode::ExpandFootnote | ExpandMode::ReplaceMode);
OUString sViewText = aModelToViewHelper.getViewText();
CPPUNIT_ASSERT_EQUAL(
- OUString("AAAAA BBBBB " + OUStringLiteral1(CHAR_ZWSP) + " CCCCC " + OUStringLiteral1(CHAR_ZWSP) + " DDDDD"),
+ OUString("AAAAA BBBBB " + OUStringChar(CHAR_ZWSP) + " CCCCC " + OUStringChar(CHAR_ZWSP) + " DDDDD"),
sViewText);
CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(2),
aModelToViewHelper.getFootnotePositions().size());
@@ -441,7 +441,7 @@ void SwDocTest::testModelToViewHelperExpandFieldsHideInvisible()
ModelToViewHelper aModelToViewHelper(*pTextNode, nullptr, ExpandMode::HideInvisible);
OUString sViewText = aModelToViewHelper.getViewText();
CPPUNIT_ASSERT_EQUAL(
- OUString("AAAAA CCCCC " + OUStringLiteral1(CH_TXTATR_BREAKWORD) + " DDDDD"),
+ OUString("AAAAA CCCCC " + OUStringChar(CH_TXTATR_BREAKWORD) + " DDDDD"),
sViewText);
}
@@ -452,7 +452,7 @@ void SwDocTest::testModelToViewHelperExpandFieldsHideRedlined()
ModelToViewHelper aModelToViewHelper(*pTextNode, nullptr, ExpandMode::HideDeletions);
OUString sViewText = aModelToViewHelper.getViewText();
CPPUNIT_ASSERT_EQUAL(
- OUString("AAAABB " + OUStringLiteral1(CH_TXTATR_BREAKWORD) + " CCCCC " + OUStringLiteral1(CH_TXTATR_BREAKWORD) + " DDDDD"),
+ OUString("AAAABB " + OUStringChar(CH_TXTATR_BREAKWORD) + " CCCCC " + OUStringChar(CH_TXTATR_BREAKWORD) + " DDDDD"),
sViewText);
}
@@ -474,7 +474,7 @@ void SwDocTest::testModelToViewHelperExpandFieldsHideInvisibleExpandFootnoteRepl
ExpandMode::ExpandFields | ExpandMode::HideInvisible | ExpandMode::ExpandFootnote | ExpandMode::ReplaceMode);
OUString sViewText = aModelToViewHelper.getViewText();
CPPUNIT_ASSERT_EQUAL(
- OUString("AAAAA CCCCC " + OUStringLiteral1(CHAR_ZWSP) + " DDDDD"),
+ OUString("AAAAA CCCCC " + OUStringChar(CHAR_ZWSP) + " DDDDD"),
sViewText);
CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(1),
aModelToViewHelper.getFootnotePositions().size());
@@ -503,7 +503,7 @@ void SwDocTest::testModelToViewHelperExpandFieldsHideHideRedlinedExpandFootnoteR
ExpandMode::ExpandFields | ExpandMode::HideDeletions | ExpandMode::ExpandFootnote | ExpandMode::ReplaceMode);
OUString sViewText = aModelToViewHelper.getViewText();
CPPUNIT_ASSERT_EQUAL(
- OUString("AAAABB " + OUStringLiteral1(CHAR_ZWSP) + " CCCCC " + OUStringLiteral1(CHAR_ZWSP) + " DDDDD"),
+ OUString("AAAABB " + OUStringChar(CHAR_ZWSP) + " CCCCC " + OUStringChar(CHAR_ZWSP) + " DDDDD"),
sViewText);
CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(2),
aModelToViewHelper.getFootnotePositions().size());
@@ -523,7 +523,7 @@ void SwDocTest::testModelToViewHelperHideInvisibleHideRedlined()
ExpandMode::HideInvisible | ExpandMode::HideDeletions);
OUString sViewText = aModelToViewHelper.getViewText();
OUString aBuffer = "AAAACCCCC " +
- OUStringLiteral1(CH_TXTATR_BREAKWORD) +
+ OUStringChar(CH_TXTATR_BREAKWORD) +
" DDDDD";
CPPUNIT_ASSERT_EQUAL(aBuffer, sViewText);
}
@@ -546,7 +546,7 @@ void SwDocTest::testModelToViewHelperExpandFieldsHideInvisibleHideRedlinedExpand
ExpandMode::ExpandFields | ExpandMode::HideInvisible | ExpandMode::HideDeletions | ExpandMode::ExpandFootnote | ExpandMode::ReplaceMode);
OUString sViewText = aModelToViewHelper.getViewText();
CPPUNIT_ASSERT_EQUAL(sViewText,
- OUString("AAAACCCCC " + OUStringLiteral1(CHAR_ZWSP) + " DDDDD"));
+ OUString("AAAACCCCC " + OUStringChar(CHAR_ZWSP) + " DDDDD"));
CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(1),
aModelToViewHelper.getFootnotePositions().size());
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(10),
@@ -573,7 +573,7 @@ void SwDocTest::testModelToViewHelperExpandFieldsExpandFootnoteReplaceMode2()
ExpandMode::ExpandFields | ExpandMode::ExpandFootnote | ExpandMode::ReplaceMode);
OUString sViewText = aModelToViewHelper.getViewText();
CPPUNIT_ASSERT_EQUAL(
- OUString("AAAAA" + OUStringLiteral1(CHAR_ZWSP) + "CCCCC"),
+ OUString("AAAAA" + OUStringChar(CHAR_ZWSP) + "CCCCC"),
sViewText);
CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(0),
aModelToViewHelper.getFootnotePositions().size());
diff --git a/sw/qa/extras/odfimport/odfimport.cxx b/sw/qa/extras/odfimport/odfimport.cxx
index 8703385f2398..08495526e572 100644
--- a/sw/qa/extras/odfimport/odfimport.cxx
+++ b/sw/qa/extras/odfimport/odfimport.cxx
@@ -968,8 +968,8 @@ DECLARE_ODFIMPORT_TEST(testTdf123968, "tdf123968.odt")
SwTextNode& rStart = dynamic_cast<SwTextNode&>(pShellCursor->Start()->nNode.GetNode());
// The field is now editable like any text, thus the field content "New value" shows up for the cursor.
- CPPUNIT_ASSERT_EQUAL(OUString("inputfield: " + OUStringLiteral1(CH_TXT_ATR_INPUTFIELDSTART)
- + "New value" + OUStringLiteral1(CH_TXT_ATR_INPUTFIELDEND)),
+ CPPUNIT_ASSERT_EQUAL(OUString("inputfield: " + OUStringChar(CH_TXT_ATR_INPUTFIELDSTART)
+ + "New value" + OUStringChar(CH_TXT_ATR_INPUTFIELDEND)),
rStart.GetText());
}
diff --git a/sw/qa/extras/uiwriter/uiwriter.cxx b/sw/qa/extras/uiwriter/uiwriter.cxx
index a859f152400e..2b1b04f8ae80 100644
--- a/sw/qa/extras/uiwriter/uiwriter.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter.cxx
@@ -1217,9 +1217,9 @@ void SwUiWriterTest::testTdf98512()
pWrtShell->SetMark();
pWrtShell->SttEndDoc(/*bStt=*/false);
OUString const expected1(
- OUStringLiteral1(CH_TXT_ATR_INPUTFIELDSTART) + "foo" + OUStringLiteral1(CH_TXT_ATR_INPUTFIELDEND));
+ OUStringChar(CH_TXT_ATR_INPUTFIELDSTART) + "foo" + OUStringChar(CH_TXT_ATR_INPUTFIELDEND));
OUString const expected2(
- OUStringLiteral1(CH_TXT_ATR_INPUTFIELDSTART) + "baz" + OUStringLiteral1(CH_TXT_ATR_INPUTFIELDEND)
+ OUStringChar(CH_TXT_ATR_INPUTFIELDSTART) + "baz" + OUStringChar(CH_TXT_ATR_INPUTFIELDEND)
+ expected1);
CPPUNIT_ASSERT_EQUAL(expected2, pWrtShell->getShellCursor(false)->GetText());
sw::UndoManager& rUndoManager = pDoc->GetUndoManager();
@@ -2582,10 +2582,10 @@ void SwUiWriterTest::testTdf73660()
{
SwDoc* pDoc = createDoc();
SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
- OUString aData1 = "First" + OUStringLiteral1(CHAR_SOFTHYPHEN) + "Word";
- OUString aData2 = "Seco" + OUStringLiteral1(CHAR_SOFTHYPHEN) + "nd";
- OUString aData3 = OUStringLiteral1(CHAR_SOFTHYPHEN) + "Third";
- OUString aData4 = "Fourth" + OUStringLiteral1(CHAR_SOFTHYPHEN);
+ OUString aData1 = "First" + OUStringChar(CHAR_SOFTHYPHEN) + "Word";
+ OUString aData2 = "Seco" + OUStringChar(CHAR_SOFTHYPHEN) + "nd";
+ OUString aData3 = OUStringChar(CHAR_SOFTHYPHEN) + "Third";
+ OUString aData4 = "Fourth" + OUStringChar(CHAR_SOFTHYPHEN);
OUString aData5 = "Fifth";
pWrtShell->Insert("We are inserting some text in the document to check the search feature ");
pWrtShell->Insert(aData1 + " ");
@@ -3716,7 +3716,7 @@ void SwUiWriterTest::testUndoDelAsCharTdf107512()
// now we have "\1foo\1" with the "foo" hidden
CPPUNIT_ASSERT(pShell->GetCursor()->GetNode().GetTextNode()->GetTextAttrForCharAt(0, RES_TXTATR_FLYCNT));
CPPUNIT_ASSERT(pShell->GetCursor()->GetNode().GetTextNode()->GetTextAttrForCharAt(4, RES_TXTATR_FLYCNT));
- CPPUNIT_ASSERT_EQUAL(OUString(OUStringLiteral1(CH_TXTATR_BREAKWORD) + u"foo" + OUStringLiteral1(CH_TXTATR_BREAKWORD)), pShell->GetCursor()->GetNode().GetTextNode()->GetText());
+ CPPUNIT_ASSERT_EQUAL(OUString(OUStringChar(CH_TXTATR_BREAKWORD) + u"foo" + OUStringChar(CH_TXTATR_BREAKWORD)), pShell->GetCursor()->GetNode().GetTextNode()->GetText());
SfxPoolItem const* pItem;
SfxItemSet query(pDoc->GetAttrPool(), svl::Items<RES_CHRATR_HIDDEN, RES_CHRATR_HIDDEN>{});
pShell->GetCursor()->GetNode().GetTextNode()->GetParaAttr(query, 1, 4);
@@ -3738,7 +3738,7 @@ void SwUiWriterTest::testUndoDelAsCharTdf107512()
CPPUNIT_ASSERT(pShell->GetCursor()->GetNode().GetTextNode()->GetTextAttrForCharAt(4, RES_TXTATR_FLYCNT));
CPPUNIT_ASSERT_EQUAL(size_t(2), pDoc->GetFlyCount(FLYCNTTYPE_GRF));
CPPUNIT_ASSERT_EQUAL(sal_Int32(5), pShell->GetCursor()->GetNode().GetTextNode()->Len());
- CPPUNIT_ASSERT_EQUAL(OUString(OUStringLiteral1(CH_TXTATR_BREAKWORD) + u"foo" + OUStringLiteral1(CH_TXTATR_BREAKWORD)), pShell->GetCursor()->GetNode().GetTextNode()->GetText());
+ CPPUNIT_ASSERT_EQUAL(OUString(OUStringChar(CH_TXTATR_BREAKWORD) + u"foo" + OUStringChar(CH_TXTATR_BREAKWORD)), pShell->GetCursor()->GetNode().GetTextNode()->GetText());
pShell->GetCursor()->GetNode().GetTextNode()->GetParaAttr(query, 0, 1);
CPPUNIT_ASSERT_EQUAL(SfxItemState::DEFAULT, query.GetItemState(RES_CHRATR_HIDDEN, false, &pItem));
query.ClearItem(RES_CHRATR_HIDDEN);
@@ -3758,7 +3758,7 @@ void SwUiWriterTest::testUndoDelAsCharTdf107512()
CPPUNIT_ASSERT(pShell->GetCursor()->GetNode().GetTextNode()->GetTextAttrForCharAt(4, RES_TXTATR_FLYCNT));
CPPUNIT_ASSERT_EQUAL(size_t(2), pDoc->GetFlyCount(FLYCNTTYPE_GRF));
CPPUNIT_ASSERT_EQUAL(sal_Int32(5), pShell->GetCursor()->GetNode().GetTextNode()->Len());
- CPPUNIT_ASSERT_EQUAL(OUString(OUStringLiteral1(CH_TXTATR_BREAKWORD) + u"foo" + OUStringLiteral1(CH_TXTATR_BREAKWORD)), pShell->GetCursor()->GetNode().GetTextNode()->GetText());
+ CPPUNIT_ASSERT_EQUAL(OUString(OUStringChar(CH_TXTATR_BREAKWORD) + u"foo" + OUStringChar(CH_TXTATR_BREAKWORD)), pShell->GetCursor()->GetNode().GetTextNode()->GetText());
pShell->GetCursor()->GetNode().GetTextNode()->GetParaAttr(query, 0, 1);
CPPUNIT_ASSERT_EQUAL(SfxItemState::DEFAULT, query.GetItemState(RES_CHRATR_HIDDEN, false, &pItem));
query.ClearItem(RES_CHRATR_HIDDEN);
@@ -3781,7 +3781,7 @@ void SwUiWriterTest::testUndoDelAsCharTdf107512()
CPPUNIT_ASSERT(pShell->GetCursor()->GetNode().GetTextNode()->GetTextAttrForCharAt(4, RES_TXTATR_FLYCNT));
CPPUNIT_ASSERT_EQUAL(size_t(2), pDoc->GetFlyCount(FLYCNTTYPE_GRF));
CPPUNIT_ASSERT_EQUAL(sal_Int32(5), pShell->GetCursor()->GetNode().GetTextNode()->Len());
- CPPUNIT_ASSERT_EQUAL(OUString(OUStringLiteral1(CH_TXTATR_BREAKWORD) + u"foo" + OUStringLiteral1(CH_TXTATR_BREAKWORD)), pShell->GetCursor()->GetNode().GetTextNode()->GetText());
+ CPPUNIT_ASSERT_EQUAL(OUString(OUStringChar(CH_TXTATR_BREAKWORD) + u"foo" + OUStringChar(CH_TXTATR_BREAKWORD)), pShell->GetCursor()->GetNode().GetTextNode()->GetText());
pShell->GetCursor()->GetNode().GetTextNode()->GetParaAttr(query, 4, 5);
CPPUNIT_ASSERT_EQUAL(SfxItemState::DEFAULT, query.GetItemState(RES_CHRATR_HIDDEN, false, &pItem));
query.ClearItem(RES_CHRATR_HIDDEN);
@@ -3801,7 +3801,7 @@ void SwUiWriterTest::testUndoDelAsCharTdf107512()
CPPUNIT_ASSERT(pShell->GetCursor()->GetNode().GetTextNode()->GetTextAttrForCharAt(4, RES_TXTATR_FLYCNT));
CPPUNIT_ASSERT_EQUAL(size_t(2), pDoc->GetFlyCount(FLYCNTTYPE_GRF));
CPPUNIT_ASSERT_EQUAL(sal_Int32(5), pShell->GetCursor()->GetNode().GetTextNode()->Len());
- CPPUNIT_ASSERT_EQUAL(OUString(OUStringLiteral1(CH_TXTATR_BREAKWORD) + u"foo" + OUStringLiteral1(CH_TXTATR_BREAKWORD)), pShell->GetCursor()->GetNode().GetTextNode()->GetText());
+ CPPUNIT_ASSERT_EQUAL(OUString(OUStringChar(CH_TXTATR_BREAKWORD) + u"foo" + OUStringChar(CH_TXTATR_BREAKWORD)), pShell->GetCursor()->GetNode().GetTextNode()->GetText());
pShell->GetCursor()->GetNode().GetTextNode()->GetParaAttr(query, 4, 5);
CPPUNIT_ASSERT_EQUAL(SfxItemState::DEFAULT, query.GetItemState(RES_CHRATR_HIDDEN, false, &pItem));
query.ClearItem(RES_CHRATR_HIDDEN);
@@ -4570,7 +4570,7 @@ void SwUiWriterTest::testTdf96479()
{
// We want to verify the empty input text field in the bookmark
static const OUString emptyInputTextField =
- OUStringLiteral1(CH_TXT_ATR_INPUTFIELDSTART) + OUStringLiteral1(CH_TXT_ATR_INPUTFIELDEND);
+ OUStringChar(CH_TXT_ATR_INPUTFIELDSTART) + OUStringChar(CH_TXT_ATR_INPUTFIELDEND);
SwDoc* pDoc = createDoc();
SwXTextDocument *pTextDoc = dynamic_cast<SwXTextDocument *>(mxComponent.get());
@@ -6945,7 +6945,7 @@ void SwUiWriterTest::testTdf108423()
pWrtShell->AutoCorrect(corr, cChar);
// The word "i" should be capitalized due to autocorrect, followed by a typographical apostrophe
sal_uLong nIndex = pWrtShell->GetCursor()->GetNode().GetIndex();
- OUString sIApostrophe(u"I" + OUStringLiteral1(0x2019));
+ OUString sIApostrophe(u"I" + OUStringChar(0x2019));
CPPUNIT_ASSERT_EQUAL(sIApostrophe, static_cast<SwTextNode*>(pDoc->GetNodes()[nIndex])->GetText());
pWrtShell->Insert(" i");
pWrtShell->AutoCorrect(corr, cChar);
diff --git a/sw/source/core/access/accportions.cxx b/sw/source/core/access/accportions.cxx
index 367630cdbd4e..00cabbe14eba 100644
--- a/sw/source/core/access/accportions.cxx
+++ b/sw/source/core/access/accportions.cxx
@@ -168,7 +168,7 @@ void SwAccessiblePortionData::Special(
// #i111768# - apply patch from kstribley:
// Include the control characters.
case PortionType::ControlChar:
- sDisplay = rText + OUStringLiteral1(m_pTextFrame->GetText()[sal_Int32(m_nViewPosition)]);
+ sDisplay = rText + OUStringChar(m_pTextFrame->GetText()[sal_Int32(m_nViewPosition)]);
break;
default:
sDisplay = rText;
diff --git a/sw/source/core/bastyp/calc.cxx b/sw/source/core/bastyp/calc.cxx
index 41b4352eee7a..19dd4e7751f0 100644
--- a/sw/source/core/bastyp/calc.cxx
+++ b/sw/source/core/bastyp/calc.cxx
@@ -1307,7 +1307,7 @@ OUString SwCalc::GetDBName(const OUString& rName)
return rName.copy( 0, nPos );
}
SwDBData aData = m_rDoc.GetDBData();
- return aData.sDataSource + OUStringLiteral1(DB_DELIM) + aData.sCommand;
+ return aData.sDataSource + OUStringChar(DB_DELIM) + aData.sCommand;
}
namespace
diff --git a/sw/source/core/crsr/crstrvl.cxx b/sw/source/core/crsr/crstrvl.cxx
index eed25eb2617e..374d0d940c7f 100644
--- a/sw/source/core/crsr/crstrvl.cxx
+++ b/sw/source/core/crsr/crstrvl.cxx
@@ -2452,7 +2452,7 @@ bool SwCursorShell::SelectNxtPrvHyperlink( bool bNext )
rAttr.GetStart(),
*rAttr.GetEnd() - rAttr.GetStart() ) );
- sText = sText.replaceAll(OUStringLiteral1(0x0a), "");
+ sText = sText.replaceAll(OUStringChar(0x0a), "");
sText = comphelper::string::strip(sText, ' ');
if( !sText.isEmpty() )
diff --git a/sw/source/core/doc/DocumentFieldsManager.cxx b/sw/source/core/doc/DocumentFieldsManager.cxx
index a76701348a1d..9d391b47fb83 100644
--- a/sw/source/core/doc/DocumentFieldsManager.cxx
+++ b/sw/source/core/doc/DocumentFieldsManager.cxx
@@ -87,8 +87,8 @@ namespace
if( aDBData != aDocData )
{
- sDBNumNm = aDBData.sDataSource + OUStringLiteral1(DB_DELIM)
- + aDBData.sCommand + OUStringLiteral1(DB_DELIM);
+ sDBNumNm = aDBData.sDataSource + OUStringChar(DB_DELIM)
+ + aDBData.sCommand + OUStringChar(DB_DELIM);
}
sDBNumNm += SwFieldType::GetTypeStr(SwFieldTypesEnum::DatabaseSetNumber);
diff --git a/sw/source/core/doc/acmplwrd.cxx b/sw/source/core/doc/acmplwrd.cxx
index db2472e76407..4a4c01de5b12 100644
--- a/sw/source/core/doc/acmplwrd.cxx
+++ b/sw/source/core/doc/acmplwrd.cxx
@@ -235,8 +235,8 @@ bool SwAutoCompleteWord::InsertWord( const OUString& rWord, SwDoc& rDoc )
return false;
}
- OUString aNewWord = rWord.replaceAll(OUStringLiteral1(CH_TXTATR_INWORD), "")
- .replaceAll(OUStringLiteral1(CH_TXTATR_BREAKWORD), "");
+ OUString aNewWord = rWord.replaceAll(OUStringChar(CH_TXTATR_INWORD), "")
+ .replaceAll(OUStringChar(CH_TXTATR_BREAKWORD), "");
m_pImpl->AddDocument(rDoc);
bool bRet = false;
diff --git a/sw/source/core/doc/docfld.cxx b/sw/source/core/doc/docfld.cxx
index bd62b5842b6a..1032f43ab260 100644
--- a/sw/source/core/doc/docfld.cxx
+++ b/sw/source/core/doc/docfld.cxx
@@ -414,8 +414,8 @@ void SwDoc::SetInitDBFields( bool b )
/// Get all databases that are used by fields
static OUString lcl_DBDataToString(const SwDBData& rData)
{
- return rData.sDataSource + OUStringLiteral1(DB_DELIM)
- + rData.sCommand + OUStringLiteral1(DB_DELIM)
+ return rData.sDataSource + OUStringChar(DB_DELIM)
+ + rData.sCommand + OUStringChar(DB_DELIM)
+ OUString::number(rData.nCommandType);
}
@@ -510,7 +510,7 @@ void SwDoc::GetAllDBNames( std::vector<OUString>& rAllDBNames )
const SwDSParams_t& rArr = pMgr->GetDSParamArray();
for (const auto& pParam : rArr)
{
- rAllDBNames.emplace_back(pParam->sDataSource + OUStringLiteral1(DB_DELIM) + pParam->sCommand);
+ rAllDBNames.emplace_back(pParam->sDataSource + OUStringChar(DB_DELIM) + pParam->sCommand);
}
#endif
}
@@ -538,7 +538,7 @@ std::vector<OUString>& SwDoc::FindUsedDBs( const std::vector<OUString>& rAllDBNa
const sal_Int32 nEndPos = sFormula.indexOf('.', nPos);
if( nEndPos>=0 )
{
- rUsedDBNames.emplace_back(sItem + OUStringLiteral1(DB_DELIM) + sFormula.copy( nPos, nEndPos - nPos ));
+ rUsedDBNames.emplace_back(sItem + OUStringChar(DB_DELIM) + sFormula.copy( nPos, nEndPos - nPos ));
}
}
}
@@ -686,7 +686,7 @@ namespace
OUString lcl_CutOffDBCommandType(const OUString& rName)
{
- return rName.replaceFirst(OUStringLiteral1(DB_DELIM), ".").getToken(0, DB_DELIM);
+ return rName.replaceFirst(OUStringChar(DB_DELIM), ".").getToken(0, DB_DELIM);
}
}
diff --git a/sw/source/core/doc/doctxm.cxx b/sw/source/core/doc/doctxm.cxx
index d5645c8ff312..7653ea4543a8 100644
--- a/sw/source/core/doc/doctxm.cxx
+++ b/sw/source/core/doc/doctxm.cxx
@@ -1337,7 +1337,7 @@ void SwTOXBaseSection::UpdateSequence(const SwTextNode* pOwnChapterNode,
{
const SwSetExpField& rSeqField = dynamic_cast<const SwSetExpField&>(*(pFormatField->GetField()));
const OUString sName = GetSequenceName()
- + OUStringLiteral1(cSequenceMarkSeparator)
+ + OUStringChar(cSequenceMarkSeparator)
+ OUString::number( rSeqField.GetSeqNumber() );
std::unique_ptr<SwTOXPara> pNew(new SwTOXPara( rTextNode, SwTOXElement::Sequence, 1, sName ));
// set indexes if the number or the reference text are to be displayed
@@ -1728,9 +1728,9 @@ void SwTOXBaseSection::UpdatePageNum_( SwTextNode* pNd,
// collect starts end ends of main entry character style
std::unique_ptr< std::vector<sal_uInt16> > xCharStyleIdx(pMainEntryNums ? new std::vector<sal_uInt16> : nullptr);
- OUString sSrchStr = OUStringLiteral1(C_NUM_REPL) + S_PAGE_DELI + OUStringLiteral1(C_NUM_REPL);
+ OUString sSrchStr = OUStringChar(C_NUM_REPL) + S_PAGE_DELI + OUStringChar(C_NUM_REPL);
sal_Int32 nStartPos = pNd->GetText().indexOf(sSrchStr);
- sSrchStr = OUStringLiteral1(C_NUM_REPL) + OUStringLiteral1(C_END_PAGE_NUM);
+ sSrchStr = OUStringChar(C_NUM_REPL) + OUStringChar(C_END_PAGE_NUM);
sal_Int32 nEndPos = pNd->GetText().indexOf(sSrchStr);
if (-1 == nEndPos || rNums.empty())
diff --git a/sw/source/core/docnode/ndsect.cxx b/sw/source/core/docnode/ndsect.cxx
index 5be1211da092..bf6fe8b71e31 100644
--- a/sw/source/core/docnode/ndsect.cxx
+++ b/sw/source/core/docnode/ndsect.cxx
@@ -679,7 +679,7 @@ void SwDoc::UpdateSection( size_t const nPos, SwSectionData & rNewData,
::sw::UndoGuard const undoGuard(GetIDocumentUndoRedo());
// The LinkFileName could only consist of separators
- OUString sCompareString = OUStringLiteral1(sfx2::cTokenSeparator) + OUStringLiteral1(sfx2::cTokenSeparator);
+ OUString sCompareString = OUStringChar(sfx2::cTokenSeparator) + OUStringChar(sfx2::cTokenSeparator);
const bool bUpdate =
(!pSection->IsLinkType() && rNewData.IsLinkType())
|| (!rNewData.GetLinkFileName().isEmpty()
diff --git a/sw/source/core/docnode/section.cxx b/sw/source/core/docnode/section.cxx
index be3d20e48869..7aff426c62cd 100644
--- a/sw/source/core/docnode/section.cxx
+++ b/sw/source/core/docnode/section.cxx
@@ -564,8 +564,8 @@ OUString const & SwSection::GetLinkFileName() const
sfx2::LinkManager::GetDisplayNames(
m_RefLink.get(), nullptr, &sTmp, &sRange, &sFilter ))
{
- sTmp += OUStringLiteral1(sfx2::cTokenSeparator) + sFilter
- + OUStringLiteral1(sfx2::cTokenSeparator) + sRange;
+ sTmp += OUStringChar(sfx2::cTokenSeparator) + sFilter
+ + OUStringChar(sfx2::cTokenSeparator) + sRange;
}
else if( GetFormat() && !GetFormat()->GetSectionNode() )
{
diff --git a/sw/source/core/edit/autofmt.cxx b/sw/source/core/edit/autofmt.cxx
index 6b6a3b9ff9fb..59de10036107 100644
--- a/sw/source/core/edit/autofmt.cxx
+++ b/sw/source/core/edit/autofmt.cxx
@@ -788,12 +788,12 @@ SwAutoFormat::GetDigitLevel(const SwTextFrame& rFrame, TextFrameIndex& rPos,
}
if( pNumTypes )
- *pNumTypes += OUStringLiteral1('0' + SVX_NUM_ARABIC);
+ *pNumTypes += OUStringChar('0' + SVX_NUM_ARABIC);
eScan = eScan | CHG;
}
else if( pNumTypes && !(eScan & DIGIT) )
- *pNumTypes += OUStringLiteral1('0' + SVX_NUM_ARABIC);
+ *pNumTypes += OUStringChar('0' + SVX_NUM_ARABIC);
eScan &= ~DELIM; // remove Delim
if( 0 != (eScan & ~CHG) && DIGIT != (eScan & ~CHG))
@@ -875,11 +875,11 @@ SwAutoFormat::GetDigitLevel(const SwTextFrame& rFrame, TextFrameIndex& rPos,
}
if( pNumTypes )
- *pNumTypes += OUStringLiteral1(cNumTyp);
+ *pNumTypes += OUStringChar(cNumTyp);
eScan = eScan | CHG;
}
else if( pNumTypes && !(eScan & eTmpScan) )
- *pNumTypes += OUStringLiteral1(cNumTyp);
+ *pNumTypes += OUStringChar(cNumTyp);
eScan &= ~DELIM; // remove Delim
@@ -973,9 +973,9 @@ CHECK_ROMAN_5:
nClosingParentheses++;
// only if no numbers were read until here
if( pPrefix && !( eScan & ( NO_DELIM | CHG )) )
- *pPrefix += OUStringLiteral1(rText[nPos]);
+ *pPrefix += OUStringChar(rText[nPos]);
else if( pPostfix )
- *pPostfix += OUStringLiteral1(rText[nPos]);
+ *pPostfix += OUStringChar(rText[nPos]);
if( NO_DELIM & eScan )
{
@@ -1734,7 +1734,7 @@ void SwAutoFormat::BuildEnum( sal_uInt16 nLvl, sal_uInt16 nDigitLevel )
{
OUString sChgStr('\t');
if( bChgBullet )
- sChgStr = OUStringLiteral1( m_aFlags.cBullet ) + sChgStr;
+ sChgStr = OUStringChar( m_aFlags.cBullet ) + sChgStr;
m_pDoc->getIDocumentContentOperations().InsertString( m_aDelPam, sChgStr );
SfxItemSet aSet( m_pDoc->GetAttrPool(), aTextNodeSetRange );
diff --git a/sw/source/core/edit/editsh.cxx b/sw/source/core/edit/editsh.cxx
index 26a0a411d159..cc19ed2b2e5b 100644
--- a/sw/source/core/edit/editsh.cxx
+++ b/sw/source/core/edit/editsh.cxx
@@ -714,7 +714,7 @@ void SwEditShell::GetINetAttrs( SwGetINetAttrs& rArr )
OUString sText( pTextNd->GetExpandText(GetLayout(),
rAttr.GetStart(), *rAttr.GetEnd() - rAttr.GetStart()) );
- sText = sText.replaceAll(OUStringLiteral1(0x0a), "");
+ sText = sText.replaceAll(OUStringChar(0x0a), "");
sText = comphelper::string::strip(sText, ' ');
if( !sText.isEmpty() )
diff --git a/sw/source/core/edit/edlingu.cxx b/sw/source/core/edit/edlingu.cxx
index 40df71f1500a..6d13356cee13 100644
--- a/sw/source/core/edit/edlingu.cxx
+++ b/sw/source/core/edit/edlingu.cxx
@@ -909,8 +909,8 @@ uno::Reference< XSpellAlternatives >
if (pWrong->InWrongWord(nBegin, nLen) && !pNode->IsSymbolAt(nBegin))
{
const OUString aText(pNode->GetText().copy(nBegin, nLen));
- OUString aWord = aText.replaceAll(OUStringLiteral1(CH_TXTATR_BREAKWORD), "")
- .replaceAll(OUStringLiteral1(CH_TXTATR_INWORD), "");
+ OUString aWord = aText.replaceAll(OUStringChar(CH_TXTATR_BREAKWORD), "")
+ .replaceAll(OUStringChar(CH_TXTATR_INWORD), "");
uno::Reference< XSpellChecker1 > xSpell( ::GetSpellChecker() );
if( xSpell.is() )
diff --git a/sw/source/core/fields/authfld.cxx b/sw/source/core/fields/authfld.cxx
index f6215b8cff9b..06e9ccabceba 100644
--- a/sw/source/core/fields/authfld.cxx
+++ b/sw/source/core/fields/authfld.cxx
@@ -515,7 +515,7 @@ OUString SwAuthorityField::ConditionalExpandAuthIdentifier(
}
}
if(pAuthType->GetSuffix())
- sRet += OUStringLiteral1(pAuthType->GetSuffix());
+ sRet += OUStringChar(pAuthType->GetSuffix());
return sRet;
}
diff --git a/sw/source/core/fields/cellfml.cxx b/sw/source/core/fields/cellfml.cxx
index bb0aad922518..c4232accddfa 100644
--- a/sw/source/core/fields/cellfml.cxx
+++ b/sw/source/core/fields/cellfml.cxx
@@ -868,12 +868,12 @@ static OUString lcl_BoxNmToRel( const SwTable& rTable, const SwTableNode& rTable
const OUString sCpy = sTmp; //JP 01.11.95: add rest from box name
- sTmp = OUStringLiteral1(cRelIdentifier) + OUString::number( nBox )
- + OUStringLiteral1(cRelSeparator) + OUString::number( nLine );
+ sTmp = OUStringChar(cRelIdentifier) + OUString::number( nBox )
+ + OUStringChar(cRelSeparator) + OUString::number( nLine );
if (!sCpy.isEmpty())
{
- sTmp += OUStringLiteral1(cRelSeparator) + sCpy;
+ sTmp += OUStringChar(cRelSeparator) + sCpy;
}
}
diff --git a/sw/source/core/fields/dbfld.cxx b/sw/source/core/fields/dbfld.cxx
index 2cf0f3c181c9..8b161561d846 100644
--- a/sw/source/core/fields/dbfld.cxx
+++ b/sw/source/core/fields/dbfld.cxx
@@ -47,7 +47,7 @@ using namespace ::com::sun::star;
/// replace database separator by dots for display
static OUString lcl_DBSeparatorConvert(const OUString& aContent)
{
- return aContent.replaceAll(OUStringLiteral1(DB_DELIM), ".");
+ return aContent.replaceAll(OUStringChar(DB_DELIM), ".");
}
// database field type
@@ -62,9 +62,9 @@ SwDBFieldType::SwDBFieldType(SwDoc* pDocPtr, const OUString& rNam, const SwDBDat
if(!m_aDBData.sDataSource.isEmpty() || !m_aDBData.sCommand.isEmpty())
{
m_sName = m_aDBData.sDataSource
- + OUStringLiteral1(DB_DELIM)
+ + OUStringChar(DB_DELIM)
+ m_aDBData.sCommand
- + OUStringLiteral1(DB_DELIM)
+ + OUStringChar(DB_DELIM)
+ m_sName;
}
}
@@ -239,9 +239,9 @@ OUString SwDBField::GetFieldName() const
if (sContent.getLength() > 1)
{
- sContent += OUStringLiteral1(DB_DELIM)
+ sContent += OUStringChar(DB_DELIM)
+ rDBName.getToken(1, DB_DELIM)
- + OUStringLiteral1(DB_DELIM)
+ + OUStringChar(DB_DELIM)
+ rDBName.getToken(2, DB_DELIM);
}
return lcl_DBSeparatorConvert(sContent);
@@ -482,7 +482,7 @@ OUString SwDBNameInfField::GetFieldName() const
{
sStr += ":"
+ m_aDBData.sDataSource
- + OUStringLiteral1(DB_DELIM)
+ + OUStringChar(DB_DELIM)
+ m_aDBData.sCommand;
}
return lcl_DBSeparatorConvert(sStr);
diff --git a/sw/source/core/fields/ddefld.cxx b/sw/source/core/fields/ddefld.cxx
index 4aaeadb7274e..700c3de2fc92 100644
--- a/sw/source/core/fields/ddefld.cxx
+++ b/sw/source/core/fields/ddefld.cxx
@@ -323,7 +323,7 @@ void SwDDEFieldType::PutValue( const uno::Any& rVal, sal_uInt16 nWhichId )
rVal >>= sToken;
}
sNewCmd.append((i < 2)
- ? sToken + OUStringLiteral1(sfx2::cTokenSeparator) : sToken);
+ ? sToken + OUStringChar(sfx2::cTokenSeparator) : sToken);
}
SetCmd( sNewCmd.makeStringAndClear() );
}
diff --git a/sw/source/core/fields/docufld.cxx b/sw/source/core/fields/docufld.cxx
index 6e9c1f1533e6..37a3a67d59f6 100644
--- a/sw/source/core/fields/docufld.cxx
+++ b/sw/source/core/fields/docufld.cxx
@@ -1076,7 +1076,7 @@ OUString SwDocInfoField::ExpandImpl(SwRootFrame const*const) const
}
else if( aAny >>= aDuration )
{
- sVal = OUStringLiteral1(aDuration.Negative ? '-' : '+')
+ sVal = OUStringChar(aDuration.Negative ? '-' : '+')
+ SwViewShell::GetShellRes()->sDurationFormat;
sVal = sVal.replaceFirst("%1", OUString::number( aDuration.Years ) );
sVal = sVal.replaceFirst("%2", OUString::number( aDuration.Months ) );
@@ -1532,7 +1532,7 @@ OUString SwHiddenTextField::GetDBName(const OUString& rName, SwDoc *pDoc)
}
SwDBData aData = pDoc->GetDBData();
- return aData.sDataSource + OUStringLiteral1(DB_DELIM) + aData.sCommand;
+ return aData.sDataSource + OUStringChar(DB_DELIM) + aData.sCommand;
}
// [aFieldDefinition] value sample : " IF A == B \"TrueText\" \"FalseText\""
diff --git a/sw/source/core/fields/reffld.cxx b/sw/source/core/fields/reffld.cxx
index 2d954c15db9c..e2262dff3a1e 100644
--- a/sw/source/core/fields/reffld.cxx
+++ b/sw/source/core/fields/reffld.cxx
@@ -439,7 +439,7 @@ static void FilterText(OUString & rText, LanguageType const eLang,
// remove all special characters (replace them with blanks)
if (!rText.isEmpty())
{
- rText = rText.replaceAll(OUStringLiteral1(0xad), "");
+ rText = rText.replaceAll(OUStringChar(0xad), "");
OUStringBuffer aBuf(rText);
const sal_Int32 l = aBuf.getLength();
for (sal_Int32 i = 0; i < l; ++i)
diff --git a/sw/source/core/frmedt/fetab.cxx b/sw/source/core/frmedt/fetab.cxx
index f4f7cac1accf..bf345ad64457 100644
--- a/sw/source/core/frmedt/fetab.cxx
+++ b/sw/source/core/frmedt/fetab.cxx
@@ -2257,7 +2257,7 @@ void SwFEShell::GetAutoSum( OUString& rFormula ) const
GetTabBox()->GetFrameFormat()->GetTableBoxFormula(), aCells ))
break;
else if( USHRT_MAX != nBoxW )
- sFields = OUStringLiteral1(cListDelim) + sFields;
+ sFields = OUStringChar(cListDelim) + sFields;
else
break;
}
@@ -2282,7 +2282,7 @@ void SwFEShell::GetAutoSum( OUString& rFormula ) const
}
}
else
- sFields = OUStringLiteral1(cListDelim) + sFields;
+ sFields = OUStringChar(cListDelim) + sFields;
}
else if( USHRT_MAX == nBoxW )
break;
diff --git a/sw/source/core/graphic/ndgrf.cxx b/sw/source/core/graphic/ndgrf.cxx
index fdeaf2491a2d..f52780ae9001 100644
--- a/sw/source/core/graphic/ndgrf.cxx
+++ b/sw/source/core/graphic/ndgrf.cxx
@@ -502,8 +502,8 @@ bool SwGrfNode::GetFileFilterNms( OUString* pFileNm, OUString* pFilterNm ) const
if( sfx2::LinkManager::GetDisplayNames(
refLink.get(), &sApp, &sTopic, &sItem ) )
{
- *pFileNm = sApp + OUStringLiteral1(sfx2::cTokenSeparator)
- + sTopic + OUStringLiteral1(sfx2::cTokenSeparator)
+ *pFileNm = sApp + OUStringChar(sfx2::cTokenSeparator)
+ + sTopic + OUStringChar(sfx2::cTokenSeparator)
+ sItem;
*pFilterNm = "DDE";
bRet = true;
diff --git a/sw/source/core/table/swtable.cxx b/sw/source/core/table/swtable.cxx
index 4723ba3e5fe6..9c9a4b95b03d 100644
--- a/sw/source/core/table/swtable.cxx
+++ b/sw/source/core/table/swtable.cxx
@@ -1790,9 +1790,9 @@ void sw_GetTableBoxColStr( sal_uInt16 nCol, OUString& rNm )
do {
const sal_uInt16 nCalc = nCol % coDiff;
if( nCalc >= 26 )
- rNm = OUStringLiteral1( 'a' - 26 + nCalc ) + rNm;
+ rNm = OUStringChar( 'a' - 26 + nCalc ) + rNm;
else
- rNm = OUStringLiteral1( 'A' + nCalc ) + rNm;
+ rNm = OUStringChar( 'A' + nCalc ) + rNm;
if( 0 == (nCol = nCol - nCalc) )
break;
diff --git a/sw/source/core/text/porfld.cxx b/sw/source/core/text/porfld.cxx
index 87a9b2524093..a964cfb9d51a 100644
--- a/sw/source/core/text/porfld.cxx
+++ b/sw/source/core/text/porfld.cxx
@@ -742,7 +742,7 @@ SwBulletPortion::SwBulletPortion( const sal_Unicode cBullet,
const bool bCntr,
const sal_uInt16 nMinDst,
const bool bLabelAlignmentPosAndSpaceModeActive )
- : SwNumberPortion( OUStringLiteral1(cBullet) + rBulletFollowedBy,
+ : SwNumberPortion( OUStringChar(cBullet) + rBulletFollowedBy,
std::move(pFont), bLft, bCntr, nMinDst,
bLabelAlignmentPosAndSpaceModeActive )
{
diff --git a/sw/source/core/tox/tox.cxx b/sw/source/core/tox/tox.cxx
index 95e160190fe6..c3167246fa2c 100644
--- a/sw/source/core/tox/tox.cxx
+++ b/sw/source/core/tox/tox.cxx
@@ -699,7 +699,7 @@ OUString SwFormToken::GetString() const
case TOKEN_TAB_STOP:
sData += OUString::number( nTabStopPosition ) + ","
+ OUString::number( static_cast< sal_Int32 >(eTabAlign) ) + ","
- + OUStringLiteral1(cTabFillChar) + ","
+ + OUStringChar(cTabFillChar) + ","
+ OUString::number( bWithTab ? 1 : 0 );
break;
case TOKEN_CHAPTER_INFO:
@@ -709,9 +709,9 @@ OUString SwFormToken::GetString() const
+ OUString::number( nOutlineLevel );
break;
case TOKEN_TEXT:
- sData += OUStringLiteral1(TOX_STYLE_DELIMITER)
- + sText.replaceAll(OUStringLiteral1(TOX_STYLE_DELIMITER), "")
- + OUStringLiteral1(TOX_STYLE_DELIMITER);
+ sData += OUStringChar(TOX_STYLE_DELIMITER)
+ + sText.replaceAll(OUStringChar(TOX_STYLE_DELIMITER), "")
+ + OUStringChar(TOX_STYLE_DELIMITER);
break;
case TOKEN_AUTHORITY:
if (nAuthorityField<10)
diff --git a/sw/source/core/tox/txmsrt.cxx b/sw/source/core/tox/txmsrt.cxx
index 1d14bbf9510e..aeb0f36f6a3d 100644
--- a/sw/source/core/tox/txmsrt.cxx
+++ b/sw/source/core/tox/txmsrt.cxx
@@ -681,7 +681,7 @@ OUString SwTOXPara::GetURL() const
SwFrameFormat* pFly = pNd->GetFlyFormat();
if( pFly )
{
- aText = "#" + pFly->GetName() + OUStringLiteral1(cMarkSeparator);
+ aText = "#" + pFly->GetName() + OUStringChar(cMarkSeparator);
const sal_Char* pStr;
switch( eType )
{
@@ -697,7 +697,7 @@ OUString SwTOXPara::GetURL() const
break;
case SwTOXElement::Sequence:
{
- aText = "#" + m_sSequenceName + OUStringLiteral1(cMarkSeparator)
+ aText = "#" + m_sSequenceName + OUStringChar(cMarkSeparator)
+ "sequence";
}
break;
@@ -762,7 +762,7 @@ OUString SwTOXTable::GetURL() const
if ( sName.isEmpty() )
return OUString();
- return "#" + sName + OUStringLiteral1(cMarkSeparator) + "table";
+ return "#" + sName + OUStringChar(cMarkSeparator) + "table";
}
SwTOXAuthority::SwTOXAuthority( const SwContentNode& rNd,
diff --git a/sw/source/core/txtnode/thints.cxx b/sw/source/core/txtnode/thints.cxx
index 79ab2193b5cf..1e4009a50f64 100644
--- a/sw/source/core/txtnode/thints.cxx
+++ b/sw/source/core/txtnode/thints.cxx
@@ -1509,8 +1509,8 @@ bool SwTextNode::InsertHint( SwTextAttr * const pAttr, const SetAttrMode nMode )
if( !(SetAttrMode::NOTXTATRCHR & nMode) )
{
SwIndex aIdx( this, pAttr->GetStart() );
- const OUString aContent = OUStringLiteral1(CH_TXT_ATR_INPUTFIELDSTART)
- + pTextInputField->GetFieldContent() + OUStringLiteral1(CH_TXT_ATR_INPUTFIELDEND);
+ const OUString aContent = OUStringChar(CH_TXT_ATR_INPUTFIELDSTART)
+ + pTextInputField->GetFieldContent() + OUStringChar(CH_TXT_ATR_INPUTFIELDEND);
InsertText( aContent, aIdx, nInsertFlags );
const sal_Int32* const pEnd(pAttr->GetEnd());
diff --git a/sw/source/core/undo/unins.cxx b/sw/source/core/undo/unins.cxx
index b1f1cb4ab25a..4ebe984116ae 100644
--- a/sw/source/core/undo/unins.cxx
+++ b/sw/source/core/undo/unins.cxx
@@ -139,7 +139,7 @@ bool SwUndoInsert::CanGrouping( sal_Unicode cIns )
nContent++;
if (maUndoText)
- (*maUndoText) += OUStringLiteral1(cIns);
+ (*maUndoText) += OUStringChar(cIns);
return true;
}
diff --git a/sw/source/core/undo/unovwr.cxx b/sw/source/core/undo/unovwr.cxx
index 0ce97ace711c..c5173a496454 100644
--- a/sw/source/core/undo/unovwr.cxx
+++ b/sw/source/core/undo/unovwr.cxx
@@ -68,7 +68,7 @@ SwUndoOverwrite::SwUndoOverwrite( SwDoc* pDoc, SwPosition& rPos,
bInsChar = true;
if( nSttContent < nTextNdLen ) // no pure insert?
{
- aDelStr += OUStringLiteral1( pTextNd->GetText()[nSttContent] );
+ aDelStr += OUStringChar( pTextNd->GetText()[nSttContent] );
if( !m_pHistory )
m_pHistory.reset( new SwHistory );
SwRegHistory aRHst( *pTextNd, m_pHistory.get() );
@@ -83,7 +83,7 @@ SwUndoOverwrite::SwUndoOverwrite( SwDoc* pDoc, SwPosition& rPos,
pTextNd->InsertText( OUString(cIns), rPos.nContent,
SwInsertFlags::EMPTYEXPAND );
- aInsStr += OUStringLiteral1( cIns );
+ aInsStr += OUStringChar( cIns );
if( !bInsChar )
{
@@ -148,7 +148,7 @@ bool SwUndoOverwrite::CanGrouping( SwDoc* pDoc, SwPosition& rPos,
{
if (rPos.nContent.GetIndex() < pDelTextNd->GetText().getLength())
{
- aDelStr += OUStringLiteral1( pDelTextNd->GetText()[rPos.nContent.GetIndex()] );
+ aDelStr += OUStringChar( pDelTextNd->GetText()[rPos.nContent.GetIndex()] );
++rPos.nContent;
}
else
@@ -162,7 +162,7 @@ bool SwUndoOverwrite::CanGrouping( SwDoc* pDoc, SwPosition& rPos,
SwInsertFlags::EMPTYEXPAND) );
assert(ins.getLength() == 1); // check in SwDoc::Overwrite => cannot fail
(void) ins;
- aInsStr += OUStringLiteral1( cIns );
+ aInsStr += OUStringChar( cIns );
if( !bInsChar )
{
diff --git a/sw/source/core/unocore/unofield.cxx b/sw/source/core/unocore/unofield.cxx
index 51ea73498e46..35dc5e95d3bc 100644
--- a/sw/source/core/unocore/unofield.cxx
+++ b/sw/source/core/unocore/unofield.cxx
@@ -755,8 +755,8 @@ void SAL_CALL SwXFieldMaster::setPropertyValue(
if (m_pImpl->m_sParam1.isEmpty())
{
m_pImpl->m_sParam1
- = OUStringLiteral1(sfx2::cTokenSeparator)
- + OUStringLiteral1(sfx2::cTokenSeparator);
+ = OUStringChar(sfx2::cTokenSeparator)
+ + OUStringChar(sfx2::cTokenSeparator);
}
OUString sTmp;
rValue >>= sTmp;
@@ -2802,7 +2802,7 @@ bool SwXTextFieldMasters::getInstanceName(
break;
case SwFieldIds::Database:
- sField = "DataBase." + rFieldType.GetName().replaceAll(OUStringLiteral1(DB_DELIM), ".");
+ sField = "DataBase." + rFieldType.GetName().replaceAll(OUStringChar(DB_DELIM), ".");
break;
case SwFieldIds::TableOfAuthorities:
diff --git a/sw/source/core/unocore/unosect.cxx b/sw/source/core/unocore/unosect.cxx
index 142c1e475881..05c4ba13275a 100644
--- a/sw/source/core/unocore/unosect.cxx
+++ b/sw/source/core/unocore/unosect.cxx
@@ -349,9 +349,9 @@ SwXTextSection::attach(const uno::Reference< text::XTextRange > & xTextRange)
SwSectionData aSect(eType, pDoc->GetUniqueSectionName(&m_pImpl->m_sName));
aSect.SetCondition(m_pImpl->m_pProps->m_sCondition);
aSect.SetLinkFileName(m_pImpl->m_pProps->m_sLinkFileName +
- OUStringLiteral1(sfx2::cTokenSeparator) +
+ OUStringChar(sfx2::cTokenSeparator) +
m_pImpl->m_pProps->m_sSectionFilter +
- OUStringLiteral1(sfx2::cTokenSeparator) +
+ OUStringChar(sfx2::cTokenSeparator) +
m_pImpl->m_pProps->m_sSectionRegion);
aSect.SetHidden(m_pImpl->m_pProps->m_bHidden);
@@ -618,7 +618,7 @@ void SwXTextSection::Impl::SetPropertyValues_Impl(
if (!m_pProps->m_bDDE)
{
m_pProps->m_sLinkFileName =
- OUStringLiteral1(sfx2::cTokenSeparator) + OUStringLiteral1(sfx2::cTokenSeparator);
+ OUStringChar(sfx2::cTokenSeparator) + OUStringChar(sfx2::cTokenSeparator);
m_pProps->m_bDDE = true;
}
m_pProps->m_sLinkFileName = comphelper::string::setToken(
@@ -630,7 +630,7 @@ void SwXTextSection::Impl::SetPropertyValues_Impl(
OUString sLinkFileName(pSectionData->GetLinkFileName());
if (pSectionData->GetType() != DDE_LINK_SECTION)
{
- sLinkFileName = OUStringLiteral1(sfx2::cTokenSeparator) + OUStringLiteral1(sfx2::cTokenSeparator);
+ sLinkFileName = OUStringChar(sfx2::cTokenSeparator) + OUStringChar(sfx2::cTokenSeparator);
pSectionData->SetType(DDE_LINK_SECTION);
}
sLinkFileName = comphelper::string::setToken(sLinkFileName,
@@ -684,8 +684,8 @@ void SwXTextSection::Impl::SetPropertyValues_Impl(
aLink.FileURL, URIHelper::GetMaybeFileHdl())
: OUString());
const OUString sFileName(
- sTmp + OUStringLiteral1(sfx2::cTokenSeparator) +
- aLink.FilterName + OUStringLiteral1(sfx2::cTokenSeparator) +
+ sTmp + OUStringChar(sfx2::cTokenSeparator) +
+ aLink.FilterName + OUStringChar(sfx2::cTokenSeparator) +
pSectionData->GetLinkFileName().getToken(2, sfx2::cTokenSeparator));
pSectionData->SetLinkFileName(sFileName);
if (sFileName.getLength() < 3)
@@ -715,7 +715,7 @@ void SwXTextSection::Impl::SetPropertyValues_Impl(
for (sal_Int32 i = comphelper::string::getTokenCount(sSectLink, sfx2::cTokenSeparator);
i < 3; ++i)
{
- sSectLink += OUStringLiteral1(sfx2::cTokenSeparator);
+ sSectLink += OUStringChar(sfx2::cTokenSeparator);
}
sSectLink = comphelper::string::setToken(sSectLink, 2, sfx2::cTokenSeparator, sLink);
pSectionData->SetLinkFileName(sSectLink);
diff --git a/sw/source/filter/ascii/ascatr.cxx b/sw/source/filter/ascii/ascatr.cxx
index 3da9c5a2117b..9490e1bfc926 100644
--- a/sw/source/filter/ascii/ascatr.cxx
+++ b/sw/source/filter/ascii/ascatr.cxx
@@ -339,7 +339,7 @@ static Writer& OutASC_SwTextNode( Writer& rWrt, SwContentNode& rNode )
}
OUString aOutStr(buf.makeStringAndClear());
if ( !bExportSoftHyphens )
- aOutStr = aOutStr.replaceAll(OUStringLiteral1(CHAR_SOFTHYPHEN), "");
+ aOutStr = aOutStr.replaceAll(OUStringChar(CHAR_SOFTHYPHEN), "");
// all INWORD/BREAKWORD should be already removed by OutAttr
// but the field-marks are not attributes so filter those
diff --git a/sw/source/filter/html/css1atr.cxx b/sw/source/filter/html/css1atr.cxx
index 0e0192063e31..1a5b304443e4 100644
--- a/sw/source/filter/html/css1atr.cxx
+++ b/sw/source/filter/html/css1atr.cxx
@@ -1135,10 +1135,10 @@ void SwHTMLWriter::PrepareFontList( const SvxFontItem& rFontItem,
if( !rNames.isEmpty() )
rNames += ", ";
if( cQuote && !bIsKeyword )
- rNames += OUStringLiteral1( cQuote );
+ rNames += OUStringChar( cQuote );
rNames += aName;
if( cQuote && !bIsKeyword )
- rNames += OUStringLiteral1( cQuote );
+ rNames += OUStringChar( cQuote );
}
}
diff --git a/sw/source/filter/html/htmlfld.cxx b/sw/source/filter/html/htmlfld.cxx
index ef27a0e91049..92ecf5578909 100644
--- a/sw/source/filter/html/htmlfld.cxx
+++ b/sw/source/filter/html/htmlfld.cxx
@@ -588,7 +588,7 @@ void SwHTMLParser::InsertCommentText( const sal_Char *pTag )
m_aContents += aToken;
if( bEmpty && pTag )
{
- m_aContents = OUStringLiteral("HTML: <") + OUStringLiteral1(*pTag) + ">" + m_aContents;
+ m_aContents = OUStringLiteral("HTML: <") + OUStringChar(*pTag) + ">" + m_aContents;
}
}
diff --git a/sw/source/filter/html/htmlftn.cxx b/sw/source/filter/html/htmlftn.cxx
index f0f2f6c5ac0f..f543fd279fae 100644
--- a/sw/source/filter/html/htmlftn.cxx
+++ b/sw/source/filter/html/htmlftn.cxx
@@ -51,20 +51,20 @@ static sal_Int32 lcl_html_getNextPart( OUString& rPart, const OUString& rContent
{
case '\\':
if( bQuoted )
- rPart += OUStringLiteral1( c );
+ rPart += OUStringChar( c );
bQuoted = !bQuoted;
break;
case ';':
if( bQuoted )
- rPart += OUStringLiteral1( c );
+ rPart += OUStringChar( c );
else
bDone = true;
bQuoted = false;
break;
default:
- rPart += OUStringLiteral1( c );
+ rPart += OUStringChar( c );
bQuoted = false;
break;
}
diff --git a/sw/source/filter/html/htmlsect.cxx b/sw/source/filter/html/htmlsect.cxx
index 0e0d6378ddfb..7e4e4a2358a8 100644
--- a/sw/source/filter/html/htmlsect.cxx
+++ b/sw/source/filter/html/htmlsect.cxx
@@ -291,7 +291,7 @@ void SwHTMLParser::NewDivision( HtmlTokenId nToken )
else
{
aURL = URIHelper::SmartRel2Abs(INetURLObject( m_sBaseURL ), aHRef.copy( 0, nPos ), Link<OUString *, bool>(), false )
- + OUStringLiteral1(sfx2::cTokenSeparator);
+ + OUStringChar(sfx2::cTokenSeparator);
if( nPos2 == -1 )
{
aURL += aHRef.copy( nPos+1 );
@@ -299,7 +299,7 @@ void SwHTMLParser::NewDivision( HtmlTokenId nToken )
else
{
aURL += aHRef.copy( nPos+1, nPos2 - (nPos+1) )
- + OUStringLiteral1(sfx2::cTokenSeparator)
+ + OUStringChar(sfx2::cTokenSeparator)
+ rtl::Uri::decode( aHRef.copy( nPos2+1 ),
rtl_UriDecodeWithCharset,
RTL_TEXTENCODING_ISO_8859_1 );
diff --git a/sw/source/filter/html/wrthtml.cxx b/sw/source/filter/html/wrthtml.cxx
index 9fc8d8298dd5..0f0b90fb6c9f 100644
--- a/sw/source/filter/html/wrthtml.cxx
+++ b/sw/source/filter/html/wrthtml.cxx
@@ -1211,7 +1211,7 @@ void SwHTMLWriter::OutImplicitMark( const OUString& rMark,
{
if( !rMark.isEmpty() && !m_aImplicitMarks.empty() )
{
- OUString sMark(rMark + OUStringLiteral1(cMarkSeparator) + OUString::createFromAscii(pMarkType));
+ OUString sMark(rMark + OUStringChar(cMarkSeparator) + OUString::createFromAscii(pMarkType));
if( 0 != m_aImplicitMarks.erase( sMark ) )
{
OutAnchor(sMark.replace('?', '_')); // '?' causes problems in IE/Netscape 5
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx
index 866cc7f0c863..7bbf9179b211 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -6675,7 +6675,7 @@ void DocxAttributeOutput::NumberingLevel( sal_uInt8 nLevel,
aBuffer.append( pPrev, pIt - pPrev );
// If bullet char is empty, set lvlText as empty
- if ( rNumberingString == OUStringLiteral1(0) && nNumberingType == SVX_NUM_CHAR_SPECIAL )
+ if ( rNumberingString == OUStringChar(0) && nNumberingType == SVX_NUM_CHAR_SPECIAL )
{
m_pSerializer->singleElementNS(XML_w, XML_lvlText, FSNS(XML_w, XML_val), "");
}
diff --git a/sw/source/filter/ww8/rtfattributeoutput.cxx b/sw/source/filter/ww8/rtfattributeoutput.cxx
index 65c1158686e0..1fdbcd307541 100644
--- a/sw/source/filter/ww8/rtfattributeoutput.cxx
+++ b/sw/source/filter/ww8/rtfattributeoutput.cxx
@@ -517,7 +517,7 @@ void RtfAttributeOutput::StartRuby(const SwTextNode& rNode, sal_Int32 nPos,
aStr += " \\o";
if (aWW8Ruby.GetDirective())
{
- aStr += "\\a" + OUStringLiteral1(aWW8Ruby.GetDirective());
+ aStr += "\\a" + OUStringChar(aWW8Ruby.GetDirective());
}
aStr += "(\\s\\up ";
diff --git a/sw/source/filter/ww8/wrtw8nds.cxx b/sw/source/filter/ww8/wrtw8nds.cxx
index ad1768d25d84..08e29ddb1a8f 100644
--- a/sw/source/filter/ww8/wrtw8nds.cxx
+++ b/sw/source/filter/ww8/wrtw8nds.cxx
@@ -837,7 +837,7 @@ void WW8AttributeOutput::StartRuby( const SwTextNode& rNode, sal_Int32 /*nPos*/,
aStr += " \\o";
if (aWW8Ruby.GetDirective())
{
- aStr += OUStringLiteral("\\a") + OUStringLiteral1(aWW8Ruby.GetDirective());
+ aStr += OUStringLiteral("\\a") + OUStringChar(aWW8Ruby.GetDirective());
}
aStr += "(\\s\\up ";
@@ -1241,7 +1241,7 @@ void AttributeOutputBase::TOXMark( const SwTextNode& rNode, const SwTOXMark& rAt
break;
case TOX_USER:
- sText += "\" \\f \"" + OUStringLiteral1(static_cast<sal_Char>( 'A' + GetExport( ).GetId( *rAttr.GetTOXType() ) ));
+ sText += "\" \\f \"" + OUStringChar(static_cast<sal_Char>( 'A' + GetExport( ).GetId( *rAttr.GetTOXType() ) ));
[[fallthrough]];
case TOX_CONTENT:
{
@@ -1725,7 +1725,7 @@ OUString SwWW8AttrIter::GetSnippet(const OUString &rStr, sal_Int32 nCurrentPos,
rStr, nCurrentPos, g_pBreakIt->GetLocale(nLanguage),
i18n::WordType::ANYWORD_IGNOREWHITESPACES ) )
{
- aSnippet = OUStringLiteral1(rStr[nCurrentPos]) + aSnippet.copy(1);
+ aSnippet = OUStringChar(rStr[nCurrentPos]) + aSnippet.copy(1);
}
}
m_rExport.m_aCurrentCharPropStarts.pop();
diff --git a/sw/source/filter/ww8/ww8atr.cxx b/sw/source/filter/ww8/ww8atr.cxx
index 4f959c18a28b..8672ec47de69 100644
--- a/sw/source/filter/ww8/ww8atr.cxx
+++ b/sw/source/filter/ww8/ww8atr.cxx
@@ -2289,7 +2289,7 @@ void AttributeOutputBase::StartTOX( const SwSection& rSect )
if( TOX_USER == pTOX->GetType() )
{
sStr += "\""
- + OUStringLiteral1(static_cast<sal_Char>( 'A' + GetExport( ).GetId( *pTOX->GetTOXType() ) ))
+ + OUStringChar(static_cast<sal_Char>( 'A' + GetExport( ).GetId( *pTOX->GetTOXType() ) ))
+ sEntryEnd;
}
}
@@ -2799,7 +2799,7 @@ void AttributeOutputBase::TextField( const SwFormatField& rField )
SwDBData aData = GetExport().m_pDoc->GetDBData();
const OUString sStr = FieldString(ww::eDATABASE)
+ aData.sDataSource
- + OUStringLiteral1(DB_DELIM)
+ + OUStringChar(DB_DELIM)
+ aData.sCommand;
GetExport().OutputField(pField, ww::eDATABASE, sStr);
}
diff --git a/sw/source/filter/ww8/ww8par2.cxx b/sw/source/filter/ww8/ww8par2.cxx
index 936bf6789018..b02d1441e691 100644
--- a/sw/source/filter/ww8/ww8par2.cxx
+++ b/sw/source/filter/ww8/ww8par2.cxx
@@ -200,7 +200,7 @@ sal_uInt16 SwWW8ImplReader::End_Footnote()
//There should have been a footnote char, we will replace this.
if (pText && nPos)
{
- sChar += OUStringLiteral1(pText->GetText()[--nPos]);
+ sChar += OUStringChar(pText->GetText()[--nPos]);
m_pPaM->SetMark();
--m_pPaM->GetMark()->nContent;
std::shared_ptr<SwUnoCursor> xLastAnchorCursor(m_pLastAnchorPos ? m_rDoc.CreateUnoCursor(*m_pLastAnchorPos) : nullptr);
diff --git a/sw/source/filter/ww8/ww8par3.cxx b/sw/source/filter/ww8/ww8par3.cxx
index 3b5deed3e5ff..d9cce7602e21 100644
--- a/sw/source/filter/ww8/ww8par3.cxx
+++ b/sw/source/filter/ww8/ww8par3.cxx
@@ -485,7 +485,7 @@ static void lcl_CopyGreaterEight(OUString &rDest, OUString const &rSrc,
{
sal_Unicode nChar = rSrc[nI];
if (nChar > WW8ListManager::nMaxLevel)
- rDest += OUStringLiteral1(nChar);
+ rDest += OUStringChar(nChar);
}
}
diff --git a/sw/source/filter/ww8/ww8par5.cxx b/sw/source/filter/ww8/ww8par5.cxx
index 3cd069d56dba..1c27d73c3021 100644
--- a/sw/source/filter/ww8/ww8par5.cxx
+++ b/sw/source/filter/ww8/ww8par5.cxx
@@ -2483,8 +2483,8 @@ eF_ResT SwWW8ImplReader::Read_F_IncludeText( WW8FieldDesc* /*pF*/, OUString& rSt
{
// Section from Source (no switch)?
ConvertUFName(aBook);
- aPara += OUStringLiteral1(sfx2::cTokenSeparator)
- + OUStringLiteral1(sfx2::cTokenSeparator) + aBook;
+ aPara += OUStringChar(sfx2::cTokenSeparator)
+ + OUStringChar(sfx2::cTokenSeparator) + aBook;
}
/*
@@ -2874,7 +2874,7 @@ static void lcl_toxMatchTSwitch(SwWW8ImplReader const & rReader, SwTOXBase& rBas
OUString sStyles( rBase.GetStyleNames( nLevel ) );
if( !sStyles.isEmpty() )
- sStyles += OUStringLiteral1(TOX_STYLE_DELIMITER);
+ sStyles += OUStringChar(TOX_STYLE_DELIMITER);
sStyles += sTemplate;
rBase.SetStyleNames( sStyles, nLevel );
}
diff --git a/sw/source/filter/xml/xmltbli.cxx b/sw/source/filter/xml/xmltbli.cxx
index 3f6fff362ff6..ed0049353326 100644
--- a/sw/source/filter/xml/xmltbli.cxx
+++ b/sw/source/filter/xml/xmltbli.cxx
@@ -1117,9 +1117,9 @@ static SwDDEFieldType* lcl_GetDDEFieldType(SwXMLDDETableContext_Impl* pContext,
{
// make command string
const OUString sCommand(pContext->GetDDEApplication()
- + OUStringLiteral1(sfx2::cTokenSeparator)
+ + OUStringChar(sfx2::cTokenSeparator)
+ pContext->GetDDEItem()
- + OUStringLiteral1(sfx2::cTokenSeparator)
+ + OUStringChar(sfx2::cTokenSeparator)
+ pContext->GetDDETopic());
const SfxLinkUpdateMode nType = pContext->GetIsAutomaticUpdate()
diff --git a/sw/source/ui/dbui/dbinsdlg.cxx b/sw/source/ui/dbui/dbinsdlg.cxx
index 3a130a79d317..4ead5f41f49b 100644
--- a/sw/source/ui/dbui/dbinsdlg.cxx
+++ b/sw/source/ui/dbui/dbinsdlg.cxx
@@ -567,7 +567,7 @@ IMPL_LINK( SwInsertDBColAutoPilot, TableToFromHdl, weld::Button&, rButton, void
// first delete the existing selection
aStr = aStr.replaceAt( nPos, nSel, "" );
- aField = OUStringLiteral1(cDBFieldStart) + aField + OUStringLiteral1(cDBFieldEnd);
+ aField = OUStringChar(cDBFieldStart) + aField + OUStringChar(cDBFieldEnd);
if( !aStr.isEmpty() )
{
if( nPos ) // one blank in front
diff --git a/sw/source/ui/dbui/mmlayoutpage.cxx b/sw/source/ui/dbui/mmlayoutpage.cxx
index ad2c452eae3b..8a2dcf3f6766 100644
--- a/sw/source/ui/dbui/mmlayoutpage.cxx
+++ b/sw/source/ui/dbui/mmlayoutpage.cxx
@@ -296,10 +296,10 @@ SwFrameFormat* SwMailMergeLayoutPage::InsertAddressFrame(
SwFieldMgr aFieldMgr(&rShell);
//create a database string source.command.commandtype.column
const SwDBData& rData = rConfigItem.GetCurrentDBData();
- OUString sDBName(rData.sDataSource + OUStringLiteral1(DB_DELIM)
- + rData.sCommand + OUStringLiteral1(DB_DELIM));
+ OUString sDBName(rData.sDataSource + OUStringChar(DB_DELIM)
+ + rData.sCommand + OUStringChar(DB_DELIM));
const OUString sDatabaseConditionPrefix(sDBName.replace(DB_DELIM, '.'));
- sDBName += OUString::number(rData.nCommandType) + OUStringLiteral1(DB_DELIM);
+ sDBName += OUString::number(rData.nCommandType) + OUStringChar(DB_DELIM);
// if only the country is in an address line the
// paragraph has to be hidden depending on the
@@ -487,9 +487,9 @@ void SwMailMergeLayoutPage::InsertGreeting(SwWrtShell& rShell, SwMailMergeConfig
const OUString sConditionBase("[" + sCommonBase + sGenderColumn + "]");
const OUString sNameColumnBase("[" + sCommonBase + sNameColumn + "]");
- const OUString sDBName(rData.sDataSource + OUStringLiteral1(DB_DELIM)
- + rData.sCommand + OUStringLiteral1(DB_DELIM)
- + OUString::number(rData.nCommandType) + OUStringLiteral1(DB_DELIM));
+ const OUString sDBName(rData.sDataSource + OUStringChar(DB_DELIM)
+ + rData.sCommand + OUStringChar(DB_DELIM)
+ + OUString::number(rData.nCommandType) + OUStringChar(DB_DELIM));
// Female: [database.sGenderColumn] != "rFemaleGenderValue" && [database.NameColumn]
// Male: [database.sGenderColumn] == "rFemaleGenderValue" && [database.rGenderColumn]
diff --git a/sw/source/ui/dialog/ascfldlg.cxx b/sw/source/ui/dialog/ascfldlg.cxx
index 0715f8e85009..a37be3c24dff 100644
--- a/sw/source/ui/dialog/ascfldlg.cxx
+++ b/sw/source/ui/dialog/ascfldlg.cxx
@@ -296,7 +296,7 @@ void SwAsciiFilterDlg::FillOptions( SwAsciiOptions& rOptions )
if( -1 != nEnd )
m_sExtraData = m_sExtraData.replaceAt( nStt, nEnd - nStt + 1, "" );
}
- m_sExtraData += sFindNm + sData + OUStringLiteral1(cDialogExtraDataClose);
+ m_sExtraData += sFindNm + sData + OUStringChar(cDialogExtraDataClose);
}
}
diff --git a/sw/source/ui/dialog/uiregionsw.cxx b/sw/source/ui/dialog/uiregionsw.cxx
index 49f398fc5777..e4147262859e 100644
--- a/sw/source/ui/dialog/uiregionsw.cxx
+++ b/sw/source/ui/dialog/uiregionsw.cxx
@@ -223,11 +223,11 @@ void SectRepr::SetFile( const OUString& rFile )
if( !rFile.isEmpty() || !sSub.isEmpty() )
{
- sNewFile += OUStringLiteral1(sfx2::cTokenSeparator);
+ sNewFile += OUStringChar(sfx2::cTokenSeparator);
if( !rFile.isEmpty() ) // Filter only with FileName
sNewFile += sOldFileName.getToken( 1, sfx2::cTokenSeparator );
- sNewFile += OUStringLiteral1(sfx2::cTokenSeparator) + sSub;
+ sNewFile += OUStringChar(sfx2::cTokenSeparator) + sSub;
}
m_SectionData.SetLinkFileName( sNewFile );
@@ -251,10 +251,10 @@ void SectRepr::SetFilter( const OUString& rFilter )
const OUString sSub( sOldFileName.getToken( 1, sfx2::cTokenSeparator, nIdx ) ); // token 2
if( !sFile.isEmpty() )
- sNewFile = sFile + OUStringLiteral1(sfx2::cTokenSeparator) +
- rFilter + OUStringLiteral1(sfx2::cTokenSeparator) + sSub;
+ sNewFile = sFile + OUStringChar(sfx2::cTokenSeparator) +
+ rFilter + OUStringChar(sfx2::cTokenSeparator) + sSub;
else if( !sSub.isEmpty() )
- sNewFile = OUStringLiteral1(sfx2::cTokenSeparator) + OUStringLiteral1(sfx2::cTokenSeparator) + sSub;
+ sNewFile = OUStringChar(sfx2::cTokenSeparator) + OUStringChar(sfx2::cTokenSeparator) + sSub;
m_SectionData.SetLinkFileName( sNewFile );
@@ -273,8 +273,8 @@ void SectRepr::SetSubRegion(const OUString& rSubRegion)
const OUString sFilter( sLinkFileName.getToken( 0, sfx2::cTokenSeparator, n ) );
if( !rSubRegion.isEmpty() || !sOldFileName.isEmpty() )
- sNewFile = sOldFileName + OUStringLiteral1(sfx2::cTokenSeparator) +
- sFilter + OUStringLiteral1(sfx2::cTokenSeparator) + rSubRegion;
+ sNewFile = sOldFileName + OUStringChar(sfx2::cTokenSeparator) +
+ sFilter + OUStringChar(sfx2::cTokenSeparator) + rSubRegion;
m_SectionData.SetLinkFileName( sNewFile );
@@ -299,8 +299,8 @@ OUString SectRepr::GetFile() const
if (DDE_LINK_SECTION == m_SectionData.GetType())
{
sal_Int32 n = 0;
- return sLinkFile.replaceFirst( OUStringLiteral1(sfx2::cTokenSeparator), " ", &n )
- .replaceFirst( OUStringLiteral1(sfx2::cTokenSeparator), " ", &n );
+ return sLinkFile.replaceFirst( OUStringChar(sfx2::cTokenSeparator), " ", &n )
+ .replaceFirst( OUStringChar(sfx2::cTokenSeparator), " ", &n );
}
return INetURLObject::decode( sLinkFile.getToken( 0, sfx2::cTokenSeparator ),
INetURLObject::DecodeMechanism::Unambiguous );
@@ -1133,10 +1133,10 @@ IMPL_LINK(SwEditRegionDlg, FileNameEntryHdl, weld::Entry&, rEdit, void)
{
OUString sLink( SwSectionData::CollapseWhiteSpaces(rEdit.get_text()) );
sal_Int32 nPos = 0;
- sLink = sLink.replaceFirst( " ", OUStringLiteral1(sfx2::cTokenSeparator), &nPos );
+ sLink = sLink.replaceFirst( " ", OUStringChar(sfx2::cTokenSeparator), &nPos );
if (nPos>=0)
{
- sLink = sLink.replaceFirst( " ", OUStringLiteral1(sfx2::cTokenSeparator), &nPos );
+ sLink = sLink.replaceFirst( " ", OUStringChar(sfx2::cTokenSeparator), &nPos );
}
pSectRepr->GetSectionData().SetLinkFileName( sLink );
@@ -1576,10 +1576,10 @@ bool SwInsertSectionTabPage::FillItemSet( SfxItemSet* )
{
aLinkFile = SwSectionData::CollapseWhiteSpaces(sFileName);
sal_Int32 nPos = 0;
- aLinkFile = aLinkFile.replaceFirst( " ", OUStringLiteral1(sfx2::cTokenSeparator), &nPos );
+ aLinkFile = aLinkFile.replaceFirst( " ", OUStringChar(sfx2::cTokenSeparator), &nPos );
if (nPos>=0)
{
- aLinkFile = aLinkFile.replaceFirst( " ", OUStringLiteral1(sfx2::cTokenSeparator), &nPos );
+ aLinkFile = aLinkFile.replaceFirst( " ", OUStringChar(sfx2::cTokenSeparator), &nPos );
}
}
else
@@ -1595,8 +1595,8 @@ bool SwInsertSectionTabPage::FillItemSet( SfxItemSet* )
aSection.SetLinkFilePassword( m_sFilePasswd );
}
- aLinkFile += OUStringLiteral1(sfx2::cTokenSeparator) + m_sFilterName
- + OUStringLiteral1(sfx2::cTokenSeparator) + sSubRegion;
+ aLinkFile += OUStringChar(sfx2::cTokenSeparator) + m_sFilterName
+ + OUStringChar(sfx2::cTokenSeparator) + sSubRegion;
}
aSection.SetLinkFileName(aLinkFile);
diff --git a/sw/source/ui/envelp/envlop1.cxx b/sw/source/ui/envelp/envlop1.cxx
index 23117247e948..8bf64749c9bd 100644
--- a/sw/source/ui/envelp/envlop1.cxx
+++ b/sw/source/ui/envelp/envlop1.cxx
@@ -220,7 +220,7 @@ void SwEnvPage::Init(SwEnvDlg* pDialog)
m_xSenderBox->connect_clicked(LINK(this, SwEnvPage, SenderHdl));
SwDBData aData = m_pSh->GetDBData();
- m_sActDBName = aData.sDataSource + OUStringLiteral1(DB_DELIM) + aData.sCommand;
+ m_sActDBName = aData.sDataSource + OUStringChar(DB_DELIM) + aData.sCommand;
InitDatabaseBox();
}
@@ -236,7 +236,7 @@ IMPL_LINK( SwEnvPage, DatabaseHdl, weld::ComboBox&, rListBox, void )
{
m_sActDBName = rListBox.get_active_text();
m_pSh->GetDBManager()->GetTableNames(*m_xTableLB, m_sActDBName);
- m_sActDBName += OUStringLiteral1(DB_DELIM);
+ m_sActDBName += OUStringChar(DB_DELIM);
}
else
{
diff --git a/sw/source/ui/fldui/changedb.cxx b/sw/source/ui/fldui/changedb.cxx
index 5f076a0681c7..4586a067cff7 100644
--- a/sw/source/ui/fldui/changedb.cxx
+++ b/sw/source/ui/fldui/changedb.cxx
@@ -184,7 +184,7 @@ void SwChangeDBDlg::UpdateFields()
std::unique_ptr<weld::TreeIter> xIter(m_xUsedDBTLB->make_iterator(&rEntry));
m_xUsedDBTLB->iter_parent(*xIter);
OUString sTmp(m_xUsedDBTLB->get_text(*xIter) +
- OUStringLiteral1(DB_DELIM) + m_xUsedDBTLB->get_text(rEntry) + OUStringLiteral1(DB_DELIM) +
+ OUStringChar(DB_DELIM) + m_xUsedDBTLB->get_text(rEntry) + OUStringChar(DB_DELIM) +
m_xUsedDBTLB->get_id(rEntry));
aDBNames.push_back(sTmp);
}
@@ -197,9 +197,9 @@ void SwChangeDBDlg::UpdateFields()
sal_Bool bIsTable = false;
const OUString DBName(m_xAvailDBTLB->GetDBName(sTableName, sColumnName, &bIsTable));
const OUString sTemp = DBName
- + OUStringLiteral1(DB_DELIM)
+ + OUStringChar(DB_DELIM)
+ sTableName
- + OUStringLiteral1(DB_DELIM)
+ + OUStringChar(DB_DELIM)
+ OUString::number(bIsTable
? CommandType::TABLE
: CommandType::QUERY);
diff --git a/sw/source/ui/fldui/flddb.cxx b/sw/source/ui/fldui/flddb.cxx
index fc4dbde5f978..dfa97a5c1a5b 100644
--- a/sw/source/ui/fldui/flddb.cxx
+++ b/sw/source/ui/fldui/flddb.cxx
@@ -210,14 +210,14 @@ bool SwFieldDBPage::FillItemSet(SfxItemSet* )
sal_uInt16 nSubType = 0;
OUString sDBName = aData.sDataSource
- + OUStringLiteral1(DB_DELIM)
+ + OUStringChar(DB_DELIM)
+ aData.sCommand
- + OUStringLiteral1(DB_DELIM)
+ + OUStringChar(DB_DELIM)
+ OUString::number(aData.nCommandType)
- + OUStringLiteral1(DB_DELIM);
+ + OUStringChar(DB_DELIM);
if (!sColumnName.isEmpty())
{
- sDBName += sColumnName + OUStringLiteral1(DB_DELIM);
+ sDBName += sColumnName + OUStringChar(DB_DELIM);
}
OUString aName = sDBName + m_xConditionED->get_text();
diff --git a/sw/source/ui/fldui/fldfunc.cxx b/sw/source/ui/fldui/fldfunc.cxx
index 38ec5c9d2952..1a3b94d2d19a 100644
--- a/sw/source/ui/fldui/fldfunc.cxx
+++ b/sw/source/ui/fldui/fldfunc.cxx
@@ -550,7 +550,7 @@ bool SwFieldFuncPage::FillItemSet(SfxItemSet* )
for (sal_Int32 i = 0, nEntryCount = m_xListItemsLB->n_children(); i < nEntryCount; ++i)
{
if(i)
- aVal += OUStringLiteral1(DB_DELIM);
+ aVal += OUStringChar(DB_DELIM);
aVal += m_xListItemsLB->get_text(i);
}
}
diff --git a/sw/source/ui/fldui/fldvar.cxx b/sw/source/ui/fldui/fldvar.cxx
index 38a5b6a81520..f3626ddac505 100644
--- a/sw/source/ui/fldui/fldvar.cxx
+++ b/sw/source/ui/fldui/fldvar.cxx
@@ -438,8 +438,8 @@ void SwFieldVarPage::SubTypeHdl(const weld::TreeView* pBox)
// That's not considered here yet
OUString sCmd( pType->GetCmd() );
sal_Int32 nTmpPos = 0;
- sCmd = sCmd.replaceFirst( OUStringLiteral1(sfx2::cTokenSeparator), " ", &nTmpPos );
- sCmd = sCmd.replaceFirst( OUStringLiteral1(sfx2::cTokenSeparator), " ", &nTmpPos );
+ sCmd = sCmd.replaceFirst( OUStringChar(sfx2::cTokenSeparator), " ", &nTmpPos );
+ sCmd = sCmd.replaceFirst( OUStringChar(sfx2::cTokenSeparator), " ", &nTmpPos );
m_xValueED->set_text( sCmd );
m_xFormatLB->select(static_cast<int>(pType->GetType()));
@@ -1005,8 +1005,8 @@ IMPL_LINK(SwFieldVarPage, TBClickHdl, weld::Button&, rBox, void)
// DDE-Topics/-Items can have blanks in their names!
// That's not being considered here yet.
sal_Int32 nTmpPos = 0;
- sValue = sValue.replaceFirst( " ", OUStringLiteral1(sfx2::cTokenSeparator), &nTmpPos );
- sValue = sValue.replaceFirst( " ", OUStringLiteral1(sfx2::cTokenSeparator), &nTmpPos );
+ sValue = sValue.replaceFirst( " ", OUStringChar(sfx2::cTokenSeparator), &nTmpPos );
+ sValue = sValue.replaceFirst( " ", OUStringChar(sfx2::cTokenSeparator), &nTmpPos );
static_cast<SwDDEFieldType*>(pType)->SetCmd(sValue);
static_cast<SwDDEFieldType*>(pType)->SetType(static_cast<SfxLinkUpdateMode>(nFormat));
}
@@ -1044,8 +1044,8 @@ IMPL_LINK(SwFieldVarPage, TBClickHdl, weld::Button&, rBox, void)
// DDE-Topics/-Items can have blanks in their names!
// That's not being considered here yet.
sal_Int32 nTmpPos = 0;
- sValue = sValue.replaceFirst( " ", OUStringLiteral1(sfx2::cTokenSeparator), &nTmpPos );
- sValue = sValue.replaceFirst( " ", OUStringLiteral1(sfx2::cTokenSeparator), &nTmpPos );
+ sValue = sValue.replaceFirst( " ", OUStringChar(sfx2::cTokenSeparator), &nTmpPos );
+ sValue = sValue.replaceFirst( " ", OUStringChar(sfx2::cTokenSeparator), &nTmpPos );
SwDDEFieldType aType(sName, sValue, static_cast<SfxLinkUpdateMode>(nFormat));
m_xSelectionLB->append_text(sName);
diff --git a/sw/source/ui/index/cnttab.cxx b/sw/source/ui/index/cnttab.cxx
index 3600d05bcb8e..33febe28630a 100644
--- a/sw/source/ui/index/cnttab.cxx
+++ b/sw/source/ui/index/cnttab.cxx
@@ -263,9 +263,9 @@ SwMultiTOXTabDialog::SwMultiTOXTabDialog(weld::Window* pParent, const SfxItemSet
{
OUString sBrackets;
if(pFType->GetPrefix())
- sBrackets += OUStringLiteral1(pFType->GetPrefix());
+ sBrackets += OUStringChar(pFType->GetPrefix());
if(pFType->GetSuffix())
- sBrackets += OUStringLiteral1(pFType->GetSuffix());
+ sBrackets += OUStringChar(pFType->GetSuffix());
m_vTypeData[nArrayIndex].m_pDescription->SetAuthBrackets(sBrackets);
m_vTypeData[nArrayIndex].m_pDescription->SetAuthSequence(pFType->IsSequence());
}
@@ -377,8 +377,8 @@ SwTOXDescription& SwMultiTOXTabDialog::GetTOXDescription(CurTOXType eType)
m_rWrtShell.GetFieldType(SwFieldIds::TableOfAuthorities, OUString()));
if(pFType)
{
- m_vTypeData[nIndex].m_pDescription->SetAuthBrackets(OUStringLiteral1(pFType->GetPrefix()) +
- OUStringLiteral1(pFType->GetSuffix()));
+ m_vTypeData[nIndex].m_pDescription->SetAuthBrackets(OUStringChar(pFType->GetPrefix()) +
+ OUStringChar(pFType->GetSuffix()));
m_vTypeData[nIndex].m_pDescription->SetAuthSequence(pFType->IsSequence());
}
else
@@ -654,7 +654,7 @@ IMPL_LINK_NOARG(SwAddStylesDlg_Impl, OkHdl, weld::Button&, void)
{
int nLevel = nToggleColumn - 1;
if(!pStyleArr[nLevel].isEmpty())
- pStyleArr[nLevel] += OUStringLiteral1(TOX_STYLE_DELIMITER);
+ pStyleArr[nLevel] += OUStringChar(TOX_STYLE_DELIMITER);
pStyleArr[nLevel] += m_xHeaderTree->get_text(i, 0);
}
}
@@ -3397,9 +3397,9 @@ void SwTOXStylesTabPage::ActivatePage( const SfxItemSet& )
OUString aStr( SwResId( STR_TITLE ));
if( !m_pCurrentForm->GetTemplate( 0 ).isEmpty() )
{
- aStr += " " + OUStringLiteral1(aDeliStart)
+ aStr += " " + OUStringChar(aDeliStart)
+ m_pCurrentForm->GetTemplate( 0 )
- + OUStringLiteral1(aDeliEnd);
+ + OUStringChar(aDeliEnd);
}
m_xLevelLB->append_text(aStr);
@@ -3417,9 +3417,9 @@ void SwTOXStylesTabPage::ActivatePage( const SfxItemSet& )
}
if( !m_pCurrentForm->GetTemplate( i ).isEmpty() )
{
- aStr += " " + OUStringLiteral1(aDeliStart)
+ aStr += " " + OUStringChar(aDeliStart)
+ m_pCurrentForm->GetTemplate( i )
- + OUStringLiteral1(aDeliEnd);
+ + OUStringChar(aDeliEnd);
}
m_xLevelLB->append_text(aStr);
}
@@ -3483,9 +3483,9 @@ IMPL_LINK_NOARG(SwTOXStylesTabPage, AssignHdl, weld::Button&, void)
if (nLevPos != -1 && nTemplPos != -1)
{
const OUString aStr(m_xLevelLB->get_text(nLevPos).getToken(0, aDeliStart)
- + OUStringLiteral1(aDeliStart)
+ + OUStringChar(aDeliStart)
+ m_xParaLayLB->get_selected_text()
- + OUStringLiteral1(aDeliEnd));
+ + OUStringChar(aDeliEnd));
m_pCurrentForm->SetTemplate(nLevPos, m_xParaLayLB->get_selected_text());
diff --git a/sw/source/ui/misc/bookmark.cxx b/sw/source/ui/misc/bookmark.cxx
index faf59a18c107..5d6f08cf48fa 100644
--- a/sw/source/ui/misc/bookmark.cxx
+++ b/sw/source/ui/misc/bookmark.cxx
@@ -55,9 +55,9 @@ IMPL_LINK_NOARG(SwInsertBookmarkDlg, ModifyHdl, weld::Entry&, void)
for (sal_Int32 i = 0; i < BookmarkTable::aForbiddenChars.getLength(); i++)
{
const sal_Int32 nTmpLen = sTmp.getLength();
- sTmp = sTmp.replaceAll(OUStringLiteral1(BookmarkTable::aForbiddenChars[i]), "");
+ sTmp = sTmp.replaceAll(OUStringChar(BookmarkTable::aForbiddenChars[i]), "");
if (sTmp.getLength() != nTmpLen)
- sMsg += OUStringLiteral1(BookmarkTable::aForbiddenChars[i]);
+ sMsg += OUStringChar(BookmarkTable::aForbiddenChars[i]);
}
if (sTmp.getLength() != nLen)
{
@@ -196,7 +196,7 @@ IMPL_LINK_NOARG(SwInsertBookmarkDlg, RenameHdl, weld::Button&, void)
uno::Reference<container::XNamed> xNamed(xTmp, uno::UNO_QUERY);
SwAbstractDialogFactory& rFact = swui::GetFactory();
ScopedVclPtr<AbstractSwRenameXNamedDlg> pDlg(rFact.CreateSwRenameXNamedDlg(m_xDialog.get(), xNamed, xNameAccess));
- pDlg->SetForbiddenChars(BookmarkTable::aForbiddenChars + OUStringLiteral1(BookmarkTable::cSeparator));
+ pDlg->SetForbiddenChars(BookmarkTable::aForbiddenChars + OUStringChar(BookmarkTable::cSeparator));
if (pDlg->Execute())
{
diff --git a/sw/source/ui/misc/glosbib.cxx b/sw/source/ui/misc/glosbib.cxx
index c653199e74ae..746fca46ef87 100644
--- a/sw/source/ui/misc/glosbib.cxx
+++ b/sw/source/ui/misc/glosbib.cxx
@@ -220,7 +220,7 @@ IMPL_LINK_NOARG( SwGlossaryGroupDlg, SelectHdl, weld::TreeView&, void )
IMPL_LINK_NOARG(SwGlossaryGroupDlg, NewHdl, weld::Button&, void)
{
OUString sGroup = m_xNameED->get_text()
- + OUStringLiteral1(GLOS_DELIM)
+ + OUStringChar(GLOS_DELIM)
+ OUString::number(m_xPathLB->get_active());
OSL_ENSURE(!pGlosHdl->FindGroupName(sGroup), "group already available!");
m_InsertedArr.push_back(sGroup);
@@ -298,7 +298,7 @@ IMPL_LINK_NOARG(SwGlossaryGroupDlg, RenameHdl, weld::Button&, void)
const OUString sNewTitle(m_xNameED->get_text());
OUString sNewName = sNewTitle
- + OUStringLiteral1(GLOS_DELIM)
+ + OUStringChar(GLOS_DELIM)
+ OUString::number(m_xPathLB->get_active());
OSL_ENSURE(!pGlosHdl->FindGroupName(sNewName), "group already available!");
@@ -313,8 +313,8 @@ IMPL_LINK_NOARG(SwGlossaryGroupDlg, RenameHdl, weld::Button&, void)
}
if(!bDone)
{
- sEntry += OUStringLiteral1(RENAME_TOKEN_DELIM) + sNewName
- + OUStringLiteral1(RENAME_TOKEN_DELIM) + sNewTitle;
+ sEntry += OUStringChar(RENAME_TOKEN_DELIM) + sNewName
+ + OUStringChar(RENAME_TOKEN_DELIM) + sNewTitle;
m_RenamedArr.push_back(sEntry);
}
delete pUserData;
@@ -407,7 +407,7 @@ bool SwGlossaryGroupDlg::IsDeleteAllowed(const OUString &rGroup)
IMPL_STATIC_LINK(SwGlossaryGroupDlg, EditInsertTextHdl, OUString&, rText, bool)
{
- rText = rText.replaceAll(OUStringLiteral1(SVT_SEARCHPATH_DELIMITER), "");
+ rText = rText.replaceAll(OUStringChar(SVT_SEARCHPATH_DELIMITER), "");
return true;
}
diff --git a/sw/source/ui/misc/glossary.cxx b/sw/source/ui/misc/glossary.cxx
index 9585129767a0..3fd85a31895a 100644
--- a/sw/source/ui/misc/glossary.cxx
+++ b/sw/source/ui/misc/glossary.cxx
@@ -288,7 +288,7 @@ IMPL_LINK(SwGlossaryDlg, GrpSelect, weld::TreeView&, rBox, void)
pParent = xEntry.get();
GroupUserData* pGroupData = reinterpret_cast<GroupUserData*>(rBox.get_id(*pParent).toInt64());
::SetCurrGlosGroup(pGroupData->sGroupName
- + OUStringLiteral1(GLOS_DELIM)
+ + OUStringChar(GLOS_DELIM)
+ OUString::number(pGroupData->nPathIdx));
m_pGlossaryHdl->SetCurGroup(::GetCurrGlosGroup());
// set current text block
@@ -668,7 +668,7 @@ IMPL_LINK_NOARG(SwGlossaryDlg, BibHdl, weld::Button&, void)
{
GroupUserData* pGroupData = reinterpret_cast<GroupUserData*>(m_xCategoryBox->get_id(*xEntry).toInt64());
const OUString sGroup = pGroupData->sGroupName
- + OUStringLiteral1(GLOS_DELIM)
+ + OUStringChar(GLOS_DELIM)
+ OUString::number(pGroupData->nPathIdx);
if(sGroup == sNewGroup)
{
@@ -863,7 +863,7 @@ OUString SwGlossaryDlg::GetCurrGrpName() const
if (m_xCategoryBox->get_iter_depth(*xEntry))
m_xCategoryBox->iter_parent(*xEntry);
GroupUserData* pGroupData = reinterpret_cast<GroupUserData*>(m_xCategoryBox->get_id(*xEntry).toInt64());
- return pGroupData->sGroupName + OUStringLiteral1(GLOS_DELIM) + OUString::number(pGroupData->nPathIdx);
+ return pGroupData->sGroupName + OUStringChar(GLOS_DELIM) + OUString::number(pGroupData->nPathIdx);
}
return OUString();
}
diff --git a/sw/source/ui/vba/vbalisthelper.cxx b/sw/source/ui/vba/vbalisthelper.cxx
index 1bc73773ac2c..7f83374990d1 100644
--- a/sw/source/ui/vba/vbalisthelper.cxx
+++ b/sw/source/ui/vba/vbalisthelper.cxx
@@ -149,7 +149,7 @@ void SwVbaListHelper::CreateBulletListTemplate()
}
case 2:
{
- aBulletChar = OUStringLiteral1(CHAR_EMPTY_DOT);
+ aBulletChar = OUStringChar(CHAR_EMPTY_DOT);
break;
}
case 3:
diff --git a/sw/source/ui/vba/vbatablehelper.cxx b/sw/source/ui/vba/vbatablehelper.cxx
index 50c3493a5973..45de339fb978 100644
--- a/sw/source/ui/vba/vbatablehelper.cxx
+++ b/sw/source/ui/vba/vbatablehelper.cxx
@@ -104,9 +104,9 @@ OUString SwVbaTableHelper::getColumnStr( sal_Int32 nCol )
do{
nCalc = nCol % coDiff;
if( nCalc >= 26 )
- sRet = OUStringLiteral1( 'a' - 26 + nCalc ) + sRet;
+ sRet = OUStringChar( 'a' - 26 + nCalc ) + sRet;
else
- sRet = OUStringLiteral1( 'A' + nCalc ) + sRet;
+ sRet = OUStringChar( 'A' + nCalc ) + sRet;
if( 0 == ( nCol = nCol - nCalc ) )
break;
diff --git a/sw/source/uibase/app/applab.cxx b/sw/source/uibase/app/applab.cxx
index d59ad9cd171e..edd697814378 100644
--- a/sw/source/uibase/app/applab.cxx
+++ b/sw/source/uibase/app/applab.cxx
@@ -341,8 +341,8 @@ void SwModule::InsertLab(SfxRequest& rReq, bool bLabel)
SwSectionData aSect(FILE_LINK_SECTION,
pSh->GetUniqueSectionName());
OUString sLinkName =
- OUStringLiteral1(sfx2::cTokenSeparator) +
- OUStringLiteral1(sfx2::cTokenSeparator) +
+ OUStringChar(sfx2::cTokenSeparator) +
+ OUStringChar(sfx2::cTokenSeparator) +
MASTER_LABEL;
aSect.SetLinkFileName(sLinkName);
aSect.SetProtectFlag(true);
diff --git a/sw/source/uibase/app/docstyle.cxx b/sw/source/uibase/app/docstyle.cxx
index 10a1ed6a9fed..7c191a16a7e3 100644
--- a/sw/source/uibase/app/docstyle.cxx
+++ b/sw/source/uibase/app/docstyle.cxx
@@ -401,7 +401,7 @@ sal_uInt32 SwStyleSheetIterator::SwPoolFormatList::FindName(SfxStyleFamily eFam,
cStyle = ' ';
break;
}
- const OUString sSrch = OUStringLiteral1(cStyle) + rName;
+ const OUString sSrch = OUStringChar(cStyle) + rName;
UniqueHash::const_iterator it = maUnique.find(sSrch);
if (it != maUnique.end())
@@ -438,7 +438,7 @@ void SwStyleSheetIterator::SwPoolFormatList::RemoveName(SfxStyleFamily eFam,
// Add Strings to the list of templates
void SwStyleSheetIterator::SwPoolFormatList::Append( char cChar, const OUString& rStr )
{
- const OUString aStr = OUStringLiteral1(cChar) + rStr;
+ const OUString aStr = OUStringChar(cChar) + rStr;
UniqueHash::const_iterator it = maUnique.find(aStr);
if (it != maUnique.end())
diff --git a/sw/source/uibase/dbui/dbmgr.cxx b/sw/source/uibase/dbui/dbmgr.cxx
index 58bba479a432..4eeb3a32a3a9 100644
--- a/sw/source/uibase/dbui/dbmgr.cxx
+++ b/sw/source/uibase/dbui/dbmgr.cxx
@@ -532,8 +532,8 @@ bool SwDBManager::Merge( const SwMergeDescriptor& rMergeDesc )
aDBNames.emplace_back();
SwDBData aInsertData = pWorkShell->GetDBData();
OUString sDBName = aInsertData.sDataSource
- + OUStringLiteral1(DB_DELIM) + aInsertData.sCommand
- + OUStringLiteral1(DB_DELIM)
+ + OUStringChar(DB_DELIM) + aInsertData.sCommand
+ + OUStringChar(DB_DELIM)
+ OUString::number(aInsertData.nCommandType);
pWorkShell->ChangeDBFields( aDBNames, sDBName);
SetInitDBFields(false);
@@ -666,9 +666,9 @@ void SwDBManager::ImportDBEntry(SwWrtShell* pSh)
SwDBFormatData aDBFormat;
OUString sInsert = GetDBField( xColumnProp, aDBFormat);
if( DB_SEP_SPACE == nSeparator )
- sInsert += OUStringLiteral1(cSpace);
+ sInsert += OUStringChar(cSpace);
else if( DB_SEP_TAB == nSeparator)
- sInsert += OUStringLiteral1(cTab);
+ sInsert += OUStringChar(cTab);
pSh->Insert(sInsert);
if( DB_SEP_RETURN == nSeparator)
pSh->SplitNode();
diff --git a/sw/source/uibase/dbui/mmconfigitem.cxx b/sw/source/uibase/dbui/mmconfigitem.cxx
index 2a0cb3aa7ff9..51df1fc8b202 100644
--- a/sw/source/uibase/dbui/mmconfigitem.cxx
+++ b/sw/source/uibase/dbui/mmconfigitem.cxx
@@ -373,7 +373,7 @@ static void lcl_ConvertToNumbers(OUString& rBlock, const std::vector<std::pair<O
for (size_t i = 0; i < rHeaders.size(); ++i)
{
OUString sHeader = "<" + rHeaders[i].first + ">";
- OUString sReplace = "<" + OUStringLiteral1('0' + i) + ">";
+ OUString sReplace = "<" + OUStringChar('0' + i) + ">";
sBlock = sBlock.replaceAll(sHeader, sReplace);
}
rBlock = sBlock;
diff --git a/sw/source/uibase/dialog/regionsw.cxx b/sw/source/uibase/dialog/regionsw.cxx
index 79586fe54033..40b20a9c268a 100644
--- a/sw/source/uibase/dialog/regionsw.cxx
+++ b/sw/source/uibase/dialog/regionsw.cxx
@@ -153,8 +153,8 @@ void SwBaseShell::InsertRegionDialog(SfxRequest& rReq)
if(!aFile.isEmpty() || !aSub.isEmpty())
{
- OUString sLinkFileName = OUStringLiteral1(sfx2::cTokenSeparator)
- + OUStringLiteral1(sfx2::cTokenSeparator);
+ OUString sLinkFileName = OUStringChar(sfx2::cTokenSeparator)
+ + OUStringChar(sfx2::cTokenSeparator);
sLinkFileName = comphelper::string::setToken(sLinkFileName, 0, sfx2::cTokenSeparator, aFile);
if(SfxItemState::SET ==
diff --git a/sw/source/uibase/dochdl/gloshdl.cxx b/sw/source/uibase/dochdl/gloshdl.cxx
index 766f00b631ce..12a95c773e86 100644
--- a/sw/source/uibase/dochdl/gloshdl.cxx
+++ b/sw/source/uibase/dochdl/gloshdl.cxx
@@ -104,7 +104,7 @@ void SwGlossaryHdl::SetCurGroup(const OUString &rGrp, bool bApi, bool bAlwaysCre
OUString sGroup(rGrp);
if (sGroup.indexOf(GLOS_DELIM)<0 && !FindGroupName(sGroup))
{
- sGroup += OUStringLiteral1(GLOS_DELIM) + "0";
+ sGroup += OUStringChar(GLOS_DELIM) + "0";
}
if(pCurGrp)
{
@@ -196,7 +196,7 @@ void SwGlossaryHdl::RenameGroup(const OUString& rOld, OUString& rNew, const OUSt
OUString sNewGroup(rNew);
if (sNewGroup.indexOf(GLOS_DELIM)<0)
{
- sNewGroup += OUStringLiteral1(GLOS_DELIM) + "0";
+ sNewGroup += OUStringChar(GLOS_DELIM) + "0";
}
rStatGlossaries.RenameGroupDoc(sOldGroup, sNewGroup, rNewTitle);
rNew = sNewGroup;
diff --git a/sw/source/uibase/docvw/edtwin.cxx b/sw/source/uibase/docvw/edtwin.cxx
index fa1e8681fe10..2928945e9903 100644
--- a/sw/source/uibase/docvw/edtwin.cxx
+++ b/sw/source/uibase/docvw/edtwin.cxx
@@ -935,7 +935,7 @@ void SwEditWin::FlushInBuffer()
if (xISC->checkInputSequence( aNewText, nTmpPos - 1, cChar, nCheckMode ))
{
// character can be inserted:
- aNewText += OUStringLiteral1( cChar );
+ aNewText += OUStringChar( cChar );
++nTmpPos;
}
}
diff --git a/sw/source/uibase/docvw/edtwin2.cxx b/sw/source/uibase/docvw/edtwin2.cxx
index 4ca09ecab32a..a319308290af 100644
--- a/sw/source/uibase/docvw/edtwin2.cxx
+++ b/sw/source/uibase/docvw/edtwin2.cxx
@@ -205,7 +205,7 @@ void SwEditWin::RequestHelp(const HelpEvent &rEvt)
if( !sText.isEmpty() )
{
- OUStringBuffer sTmp(sText.replaceAll(OUStringLiteral1(0xad), ""));
+ OUStringBuffer sTmp(sText.replaceAll(OUStringChar(0xad), ""));
for (sal_Int32 i = 0; i < sTmp.getLength(); ++i)
{
if (sTmp[i] < 0x20)
diff --git a/sw/source/uibase/fldui/fldmgr.cxx b/sw/source/uibase/fldui/fldmgr.cxx
index bf65c6034008..eccca960fc43 100644
--- a/sw/source/uibase/fldui/fldmgr.cxx
+++ b/sw/source/uibase/fldui/fldmgr.cxx
@@ -1109,10 +1109,10 @@ bool SwFieldMgr::InsertField(
//JP 28.08.95: DDE-Topics/-Items can have blanks in their names!
// That's not yet considered here.
sal_Int32 nIndex = 0;
- OUString sCmd = rData.m_sPar2.replaceFirst(" ", OUStringLiteral1(sfx2::cTokenSeparator), &nIndex);
+ OUString sCmd = rData.m_sPar2.replaceFirst(" ", OUStringChar(sfx2::cTokenSeparator), &nIndex);
if (nIndex>=0 && ++nIndex<sCmd.getLength())
{
- sCmd = sCmd.replaceFirst(" ", OUStringLiteral1(sfx2::cTokenSeparator), &nIndex);
+ sCmd = sCmd.replaceFirst(" ", OUStringChar(sfx2::cTokenSeparator), &nIndex);
}
SwDDEFieldType aType( rData.m_sPar1, sCmd, static_cast<SfxLinkUpdateMode>(nFormatId) );
@@ -1561,10 +1561,10 @@ void SwFieldMgr::UpdateCurField(sal_uInt32 nFormat,
// DDE-Topics/-Items can have blanks in their names!
// That's not yet considered here!
sal_Int32 nIndex = 0;
- sPar2 = sPar2.replaceFirst(" ", OUStringLiteral1(sfx2::cTokenSeparator), &nIndex );
+ sPar2 = sPar2.replaceFirst(" ", OUStringChar(sfx2::cTokenSeparator), &nIndex );
if (nIndex>=0 && ++nIndex<sPar2.getLength())
{
- sPar2 = sPar2.replaceFirst(" ", OUStringLiteral1(sfx2::cTokenSeparator), &nIndex);
+ sPar2 = sPar2.replaceFirst(" ", OUStringChar(sfx2::cTokenSeparator), &nIndex);
}
break;
}
diff --git a/sw/source/uibase/misc/glosdoc.cxx b/sw/source/uibase/misc/glosdoc.cxx
index d64a39456d45..69a2df2237cc 100644
--- a/sw/source/uibase/misc/glosdoc.cxx
+++ b/sw/source/uibase/misc/glosdoc.cxx
@@ -181,7 +181,7 @@ bool SwGlossaries::NewGroupDoc(OUString& rGroupName, const OUString& rTitle)
return false;
const OUString sNewFilePath(m_PathArr[nNewPath]);
const OUString sNewGroup = lcl_CheckFileName(sNewFilePath, rGroupName.getToken(0, GLOS_DELIM))
- + OUStringLiteral1(GLOS_DELIM) + sNewPath;
+ + OUStringChar(GLOS_DELIM) + sNewPath;
std::unique_ptr<SwTextBlocks> pBlock = GetGlosDoc( sNewGroup );
if(pBlock)
{
@@ -228,7 +228,7 @@ bool SwGlossaries::RenameGroupDoc(
RemoveFileFromList( rOldGroup );
- rNewGroup = sNewFileName + OUStringLiteral1(GLOS_DELIM) + OUString::number(nNewPath);
+ rNewGroup = sNewFileName + OUStringChar(GLOS_DELIM) + OUString::number(nNewPath);
if (m_GlosArr.empty())
{
GetNameList();
@@ -252,7 +252,7 @@ bool SwGlossaries::DelGroupDoc(const OUString &rName)
return false;
const OUString sBaseName(rName.getToken(0, GLOS_DELIM));
const OUString sFileURL = lcl_FullPathName(m_PathArr[nPath], sBaseName);
- const OUString aName = sBaseName + OUStringLiteral1(GLOS_DELIM) + OUString::number(nPath);
+ const OUString aName = sBaseName + OUStringChar(GLOS_DELIM) + OUString::number(nPath);
// Even if the file doesn't exist it has to be deleted from
// the list of text block regions
// no && because of CFfront
@@ -313,14 +313,14 @@ std::vector<OUString> & SwGlossaries::GetNameList()
for (const OUString& aTitle : aFiles)
{
const OUString sName( aTitle.copy( 0, aTitle.getLength() - sExt.getLength() )
- + OUStringLiteral1(GLOS_DELIM) + OUString::number( static_cast<sal_Int16>(i) ));
+ + OUStringChar(GLOS_DELIM) + OUString::number( static_cast<sal_Int16>(i) ));
m_GlosArr.push_back(sName);
}
}
if (m_GlosArr.empty())
{
// the standard block is inside of the path's first part
- m_GlosArr.emplace_back(SwGlossaries::GetDefName() + OUStringLiteral1(GLOS_DELIM) + "0" );
+ m_GlosArr.emplace_back(SwGlossaries::GetDefName() + OUStringChar(GLOS_DELIM) + "0" );
}
}
return m_GlosArr;
diff --git a/sw/source/uibase/ribbar/inputwin.cxx b/sw/source/uibase/ribbar/inputwin.cxx
index 91bffa18df6a..1c278137cb16 100644
--- a/sw/source/uibase/ribbar/inputwin.cxx
+++ b/sw/source/uibase/ribbar/inputwin.cxx
@@ -384,8 +384,8 @@ IMPL_LINK( SwInputWindow, SelTableCellsNotify, SwWrtShell&, rCaller, void )
aEdit->UpdateRange( sBoxNms, sTableNm );
- OUString sNew = OUStringLiteral1(CH_LRE) + aEdit->GetText()
- + OUStringLiteral1(CH_PDF);
+ OUString sNew = OUStringChar(CH_LRE) + aEdit->GetText()
+ + OUStringChar(CH_PDF);
if( sNew != sOldFormula )
{
@@ -432,8 +432,8 @@ IMPL_LINK_NOARG(SwInputWindow, ModifyHdl, Edit&, void)
{
pWrtShell->StartAllAction();
DelBoxContent();
- OUString sNew = OUStringLiteral1(CH_LRE) + aEdit->GetText()
- + OUStringLiteral1(CH_PDF);
+ OUString sNew = OUStringChar(CH_LRE) + aEdit->GetText()
+ + OUStringChar(CH_PDF);
pWrtShell->SwEditShell::Insert2( sNew );
pWrtShell->EndAllAction();
sOldFormula = sNew;
@@ -494,7 +494,7 @@ void InputEdit::UpdateRange(const OUString& rBoxes,
const sal_uInt16 nLen = aActText.getLength();
if( !nLen )
{
- OUString aStr = OUStringLiteral1(cOpen) + aBoxes + OUStringLiteral1(cClose);
+ OUString aStr = OUStringChar(cOpen) + aBoxes + OUStringChar(cClose);
SetText(aStr);
sal_Int32 nPos = aStr.indexOf( cClose );
OSL_ENSURE(nPos != -1, "delimiter not found");
@@ -543,7 +543,7 @@ void InputEdit::UpdateRange(const OUString& rBoxes,
}
else
{
- OUString aTmp = OUStringLiteral1(cOpen) + aBoxes + OUStringLiteral1(cClose);
+ OUString aTmp = OUStringChar(cOpen) + aBoxes + OUStringChar(cClose);
nPos = static_cast<sal_uInt16>(aSelection.Min());
aActText = aActText.replaceAt( nPos, 0, aTmp );
nPos = nPos + aTmp.getLength();
diff --git a/sw/source/uibase/shells/textfld.cxx b/sw/source/uibase/shells/textfld.cxx
index 4b11b081882a..d5c4e6b73154 100644
--- a/sw/source/uibase/shells/textfld.cxx
+++ b/sw/source/uibase/shells/textfld.cxx
@@ -236,7 +236,7 @@ void SwTextShell::ExecField(SfxRequest &rReq)
if( SfxItemState::SET == pArgs->GetItemState( FN_PARAM_FIELD_TYPE,
false, &pItem ))
nType = static_cast<SwFieldTypesEnum>(static_cast<const SfxUInt16Item *>(pItem)->GetValue());
- aPar1 += OUStringLiteral1(DB_DELIM);
+ aPar1 += OUStringChar(DB_DELIM);
if( SfxItemState::SET == pArgs->GetItemState(
FN_PARAM_1, false, &pItem ))
{
@@ -245,9 +245,9 @@ void SwTextShell::ExecField(SfxRequest &rReq)
if( SfxItemState::SET == pArgs->GetItemState(
FN_PARAM_3, false, &pItem ))
nCommand = static_cast<const SfxInt32Item*>(pItem)->GetValue();
- aPar1 += OUStringLiteral1(DB_DELIM)
+ aPar1 += OUStringChar(DB_DELIM)
+ OUString::number(nCommand)
- + OUStringLiteral1(DB_DELIM);
+ + OUStringChar(DB_DELIM);
if( SfxItemState::SET == pArgs->GetItemState(
FN_PARAM_2, false, &pItem ))
{
diff --git a/sw/source/uibase/shells/textsh2.cxx b/sw/source/uibase/shells/textsh2.cxx
index 1f7b59fea20b..1dbcf1639fc2 100644
--- a/sw/source/uibase/shells/textsh2.cxx
+++ b/sw/source/uibase/shells/textsh2.cxx
@@ -186,10 +186,10 @@ void SwTextShell::ExecDB(SfxRequest const &rReq)
OUString sColumnName;
if(pColumnNameItem)
static_cast<const SfxUnoAnyItem*>(pColumnNameItem)->GetValue() >>= sColumnName;
- OUString sDBName = sSourceArg + OUStringLiteral1(DB_DELIM)
- + sCommandArg + OUStringLiteral1(DB_DELIM)
+ OUString sDBName = sSourceArg + OUStringChar(DB_DELIM)
+ + sCommandArg + OUStringChar(DB_DELIM)
+ OUString::number(nCommandTypeArg)
- + OUStringLiteral1(DB_DELIM) + sColumnName;
+ + OUStringChar(DB_DELIM) + sColumnName;
SwFieldMgr aFieldMgr(GetShellPtr());
SwInsertField_Data aData(SwFieldTypesEnum::Database, 0, sDBName, OUString(), 0);
diff --git a/sw/source/uibase/sidebar/PageSizeControl.cxx b/sw/source/uibase/sidebar/PageSizeControl.cxx
index 02dbfe007343..ae224e062925 100644
--- a/sw/source/uibase/sidebar/PageSizeControl.cxx
+++ b/sw/source/uibase/sidebar/PageSizeControl.cxx
@@ -114,7 +114,7 @@ PageSizeControl::PageSizeControl( sal_uInt16 nId, vcl::Window* pParent )
sal_Unicode c = aText[i];
if ( rtl::isAsciiAlpha(c) || (c == '\'') || (c == '\"') || (c == '%') )
{
- aMetricStr = OUStringLiteral1(c) + aMetricStr;
+ aMetricStr = OUStringChar(c) + aMetricStr;
}
else
{
diff --git a/sw/source/uibase/uno/unoatxt.cxx b/sw/source/uibase/uno/unoatxt.cxx
index 6151fb1d785c..d226b52ae31d 100644
--- a/sw/source/uibase/uno/unoatxt.cxx
+++ b/sw/source/uibase/uno/unoatxt.cxx
@@ -174,7 +174,7 @@ uno::Reference< text::XAutoTextGroup > SwXAutoTextContainer::insertNewByName(
OUString sGroup(aGroupName);
if (sGroup.indexOf(GLOS_DELIM)<0)
{
- sGroup += OUStringLiteral1(GLOS_DELIM) + "0";
+ sGroup += OUStringChar(GLOS_DELIM) + "0";
}
pGlossaries->NewGroupDoc(sGroup, sGroup.getToken(0, GLOS_DELIM));
@@ -476,7 +476,7 @@ void SwXAutoTextGroup::setName(const OUString& rName)
OUString sNewGroup(rName);
if (sNewGroup.indexOf(GLOS_DELIM)<0)
{
- sNewGroup += OUStringLiteral1(GLOS_DELIM) + "0";
+ sNewGroup += OUStringChar(GLOS_DELIM) + "0";
}
//the name must be saved, the group may be invalidated while in RenameGroupDoc()
diff --git a/sw/source/uibase/utlui/content.cxx b/sw/source/uibase/utlui/content.cxx
index f1d2f22cde72..94452b24fdcf 100644
--- a/sw/source/uibase/utlui/content.cxx
+++ b/sw/source/uibase/utlui/content.cxx
@@ -1982,7 +1982,7 @@ bool SwContentTree::FillTransferData( TransferDataContainer& rTransfer,
sUrl += "#" + sEntry;
if(!rToken.isEmpty())
{
- sUrl += OUStringLiteral1(cMarkSeparator) + rToken;
+ sUrl += OUStringChar(cMarkSeparator) + rToken;
}
}
else
diff --git a/sw/source/uibase/utlui/glbltree.cxx b/sw/source/uibase/utlui/glbltree.cxx
index 59fe11eb9145..2b056fca6ffe 100644
--- a/sw/source/uibase/utlui/glbltree.cxx
+++ b/sw/source/uibase/utlui/glbltree.cxx
@@ -1367,9 +1367,9 @@ IMPL_LINK( SwGlobalTree, DialogClosedHdl, sfx2::FileDialogHelper*, _pFileDlg, vo
for (const std::unique_ptr<SfxMedium>& pMed : aMedList)
{
OUString sFileName = pMed->GetURLObject().GetMainURL( INetURLObject::DecodeMechanism::NONE )
- + OUStringLiteral1(sfx2::cTokenSeparator)
+ + OUStringChar(sfx2::cTokenSeparator)
+ pMed->GetFilter()->GetFilterName()
- + OUStringLiteral1(sfx2::cTokenSeparator);
+ + OUStringChar(sfx2::cTokenSeparator);
pFileNames[nPos++] = sFileName;
}
InsertRegion( m_pDocContent.get(), aFileNames );
diff --git a/sw/source/uibase/utlui/gloslst.cxx b/sw/source/uibase/utlui/gloslst.cxx
index eea76b98181a..9dd2a26a2a03 100644
--- a/sw/source/uibase/utlui/gloslst.cxx
+++ b/sw/source/uibase/utlui/gloslst.cxx
@@ -283,7 +283,7 @@ void SwGlossaryList::Update()
OUString sName( aTitle.copy( 0, aTitle.getLength() - sExt.getLength() ));
aFoundGroupNames.push_back(sName);
- sName += OUStringLiteral1(GLOS_DELIM) + OUString::number( static_cast<sal_uInt16>(nPath) );
+ sName += OUStringChar(GLOS_DELIM) + OUString::number( static_cast<sal_uInt16>(nPath) );
AutoTextGroup* pFound = FindGroup( sName );
if( !pFound )
{
@@ -355,9 +355,9 @@ void SwGlossaryList::FillGroup(AutoTextGroup* pGroup, SwGlossaries* pGlossaries)
for(sal_uInt16 j = 0; j < pGroup->nCount; j++)
{
pGroup->sLongNames += pBlock->GetLongName(j)
- + OUStringLiteral1(STRING_DELIM);
+ + OUStringChar(STRING_DELIM);
pGroup->sShortNames += pBlock->GetShortName(j)
- + OUStringLiteral1(STRING_DELIM);
+ + OUStringChar(STRING_DELIM);
}
}
diff --git a/sw/source/uibase/wrtsh/wrtsh1.cxx b/sw/source/uibase/wrtsh/wrtsh1.cxx
index 36878840658e..d89174bbb979 100644
--- a/sw/source/uibase/wrtsh/wrtsh1.cxx
+++ b/sw/source/uibase/wrtsh/wrtsh1.cxx
@@ -1648,7 +1648,7 @@ void SwWrtShell::AutoCorrect( SvxAutoCorrect& rACorr, sal_Unicode cChar )
aTmpStr1 += GetSelText();
aTmpStr1 += SwResId(STR_END_QUOTE);
OUString aTmpStr3 = SwResId(STR_START_QUOTE);
- aTmpStr3 += OUStringLiteral1(cChar);
+ aTmpStr3 += OUStringChar(cChar);
aTmpStr3 += SwResId(STR_END_QUOTE);
aRewriter.AddRule( UndoArg1, aTmpStr1 );
aRewriter.AddRule( UndoArg2, SwResId(STR_YIELDS) );
diff --git a/sw/source/uibase/wrtsh/wrtsh2.cxx b/sw/source/uibase/wrtsh/wrtsh2.cxx
index 034e987591de..82d7c27cb0c6 100644
--- a/sw/source/uibase/wrtsh/wrtsh2.cxx
+++ b/sw/source/uibase/wrtsh/wrtsh2.cxx
@@ -584,8 +584,8 @@ void SwWrtShell::NavigatorPaste( const NaviContentBookmark& rBkmk,
{
SwSectionData aSection( FILE_LINK_SECTION, GetUniqueSectionName() );
OUString aLinkFile = rBkmk.GetURL().getToken(0, '#')
- + OUStringLiteral1(sfx2::cTokenSeparator)
- + OUStringLiteral1(sfx2::cTokenSeparator)
+ + OUStringChar(sfx2::cTokenSeparator)
+ + OUStringChar(sfx2::cTokenSeparator)
+ rBkmk.GetURL().getToken(1, '#');
aSection.SetLinkFileName( aLinkFile );
aSection.SetProtectFlag( true );
diff --git a/test/source/sheet/xsheetauditing.cxx b/test/source/sheet/xsheetauditing.cxx
index 61e96d09d92f..82ffbf5c5332 100644
--- a/test/source/sheet/xsheetauditing.cxx
+++ b/test/source/sheet/xsheetauditing.cxx
@@ -87,7 +87,7 @@ void XSheetAuditing::testShowErrors()
uno::Reference<sheet::XSpreadsheet> xSheet(xAuditing, UNO_QUERY_THROW);
uno::Reference<table::XCell> xCell = xSheet->getCellByPosition(7, 6);
xCell->setValue(-9);
- xCell->setFormula("=SQRT(" + OUStringLiteral1(static_cast<char>('A' + 7)) + OUString::number(7)
+ xCell->setFormula("=SQRT(" + OUStringChar(static_cast<char>('A' + 7)) + OUString::number(7)
+ ")");
uno::Reference<text::XText> xText(xCell, UNO_QUERY_THROW);
diff --git a/unoidl/source/sourceprovider-scanner.l b/unoidl/source/sourceprovider-scanner.l
index 1700259e5878..a688dd24c9e5 100644
--- a/unoidl/source/sourceprovider-scanner.l
+++ b/unoidl/source/sourceprovider-scanner.l
@@ -243,7 +243,7 @@ ALNUM {DIGIT}|{ALPHA}
. {
unsigned char c = yytext[0];
yyextra->errorMessage = c >= ' ' && c <= '~'
- ? OUString("invalid character \"" + OUStringLiteral1(c) + "\"")
+ ? OUString("invalid character \"" + OUStringChar(c) + "\"")
: OUString("invalid byte x" + OUString::number(c, 16).toAsciiUpperCase());
return TOK_ERROR;
}
diff --git a/unotools/source/config/bootstrap.cxx b/unotools/source/config/bootstrap.cxx
index b413e883ab2a..4ea07ea99c67 100644
--- a/unotools/source/config/bootstrap.cxx
+++ b/unotools/source/config/bootstrap.cxx
@@ -216,7 +216,7 @@ static bool implNormalizeURL(OUString & _sURL, osl::DirectoryItem& aDirItem)
// #109863# sal/osl returns final slash for file URLs contradicting
// the URL/URI RFCs.
- if ( !aNormalizedURL.endsWith(OUStringLiteral1(cURLSeparator)) )
+ if ( !aNormalizedURL.endsWith(OUStringChar(cURLSeparator)) )
_sURL = aNormalizedURL;
else
_sURL = aNormalizedURL.copy( 0, aNormalizedURL.getLength()-1 );
@@ -318,9 +318,9 @@ static PathStatus getDerivedPath(
// do we have a base path ?
if (!_aBaseURL.isEmpty())
{
- OSL_PRECOND(!_aBaseURL.endsWith(OUStringLiteral1(cURLSeparator)), "Unexpected: base URL ends in slash");
+ OSL_PRECOND(!_aBaseURL.endsWith(OUStringChar(cURLSeparator)), "Unexpected: base URL ends in slash");
- sDerivedURL = _aBaseURL + OUStringLiteral1(cURLSeparator) + _sRelativeURL;
+ sDerivedURL = _aBaseURL + OUStringChar(cURLSeparator) + _sRelativeURL;
// a derived (nested) URL can only exist or have a lesser status, if the parent exists
if (aStatus == Bootstrap::PATH_EXISTS)
diff --git a/unotools/source/i18n/resmgr.cxx b/unotools/source/i18n/resmgr.cxx
index c55de86ee89b..0f58039509fb 100644
--- a/unotools/source/i18n/resmgr.cxx
+++ b/unotools/source/i18n/resmgr.cxx
@@ -196,7 +196,7 @@ namespace Translate
if (std::use_facet<boost::locale::info>(loc).language() == "qtz")
{
OString sKeyId(genKeyId(OString(pContextAndId).replace('\004', '|')));
- return OUString::fromUtf8(sKeyId) + OUStringLiteral1(0x2016) + createFromUtf8(pId, strlen(pId));
+ return OUString::fromUtf8(sKeyId) + OUStringChar(0x2016) + createFromUtf8(pId, strlen(pId));
}
//otherwise translate it
@@ -230,7 +230,7 @@ namespace Translate
{
OString sKeyId(genKeyId(aContextIdId[0] + "|" + aContextIdId[1]));
int nForm = n == 0 ? 1 : 2;
- return OUString::fromUtf8(sKeyId) + OUStringLiteral1(0x2016) + createFromUtf8(aContextIdId[nForm].getStr(), aContextIdId[nForm].getLength());
+ return OUString::fromUtf8(sKeyId) + OUStringChar(0x2016) + createFromUtf8(aContextIdId[nForm].getStr(), aContextIdId[nForm].getLength());
}
//otherwise translate it
diff --git a/unotools/source/misc/datetime.cxx b/unotools/source/misc/datetime.cxx
index 88d5095bd385..7b2ef0eb2c40 100644
--- a/unotools/source/misc/datetime.cxx
+++ b/unotools/source/misc/datetime.cxx
@@ -114,7 +114,7 @@ namespace
return true;
if (c < c0 || c > c9)
return false;
- resInt += OUStringLiteral1(c);
+ resInt += OUStringChar(c);
}
if (nPos == i_str.getLength() || i_str[nPos] == sep)
return true;
@@ -135,7 +135,7 @@ namespace
return false;
if (c < c0 || c > c9)
return false;
- resFrac += OUStringLiteral1(c);
+ resFrac += OUStringChar(c);
}
OSL_ENSURE(nPos == i_str.getLength(), "impl_getISO8601TimeToken internal error; expected to be at end of string");
return true;
@@ -185,7 +185,7 @@ namespace
const sal_Unicode c = i_str[io_index];
if ((c < c0 || c > c9) && c != sep)
return false;
- o_strInt += OUStringLiteral1(c);
+ o_strInt += OUStringChar(c);
}
return true;
}
diff --git a/vcl/source/control/combobox.cxx b/vcl/source/control/combobox.cxx
index aee7037e60fe..9cdba187953c 100644
--- a/vcl/source/control/combobox.cxx
+++ b/vcl/source/control/combobox.cxx
@@ -393,11 +393,11 @@ IMPL_LINK_NOARG(ComboBox::Impl, ImplSelectHdl, LinkParamNone*, void)
if ( !aSelInText.count( nP ) )
{
if (!aText.isEmpty() && (aText[aText.getLength()-1] != m_cMultiSep))
- aText += OUStringLiteral1(m_cMultiSep);
+ aText += OUStringChar(m_cMultiSep);
if ( !aText.isEmpty() )
aText += " "; // slightly loosen
aText += m_pImplLB->GetEntryList()->GetEntryText( nP );
- aText += OUStringLiteral1(m_cMultiSep);
+ aText += OUStringChar(m_cMultiSep);
}
}
aText = comphelper::string::stripEnd( aText, m_cMultiSep );
diff --git a/vcl/source/control/edit.cxx b/vcl/source/control/edit.cxx
index 1620532ffba3..ab3314510496 100644
--- a/vcl/source/control/edit.cxx
+++ b/vcl/source/control/edit.cxx
@@ -2279,7 +2279,7 @@ OUString TextFilter::filter(const OUString &rText)
OUString sTemp(rText);
for (sal_Int32 i = 0; i < sForbiddenChars.getLength(); ++i)
{
- sTemp = sTemp.replaceAll(OUStringLiteral1(sForbiddenChars[i]), "");
+ sTemp = sTemp.replaceAll(OUStringChar(sForbiddenChars[i]), "");
}
return sTemp;
}
diff --git a/vcl/source/control/quickselectionengine.cxx b/vcl/source/control/quickselectionengine.cxx
index 3773a3afd039..aff324a4eb65 100644
--- a/vcl/source/control/quickselectionengine.cxx
+++ b/vcl/source/control/quickselectionengine.cxx
@@ -119,7 +119,7 @@ namespace vcl
if ( ( c >= 32 ) && ( c != 127 ) && !_keyEvent.GetKeyCode().IsMod2() )
{
- m_pData->sCurrentSearchString += OUStringLiteral1(c);
+ m_pData->sCurrentSearchString += OUStringChar(c);
SAL_INFO( "vcl", "QuickSelectionEngine::HandleKeyEvent: searching for " << m_pData->sCurrentSearchString );
if ( m_pData->sCurrentSearchString.getLength() == 1 )
diff --git a/vcl/source/font/OpenTypeFeatureDefinitonList.cxx b/vcl/source/font/OpenTypeFeatureDefinitonList.cxx
index c68ad6cd68b2..9a7b2993a7c1 100644
--- a/vcl/source/font/OpenTypeFeatureDefinitonList.cxx
+++ b/vcl/source/font/OpenTypeFeatureDefinitonList.cxx
@@ -145,7 +145,7 @@ OUString getNumericLowerPart(sal_uInt32 nFeatureCode)
if (rtl::isAsciiDigit(static_cast<unsigned char>(cChar1))
&& rtl::isAsciiDigit(static_cast<unsigned char>(cChar2)))
{
- return OUStringLiteral1(cChar1) + OUStringLiteral1(cChar2);
+ return OUStringChar(cChar1) + OUStringChar(cChar2);
}
return OUString();
}
diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx
index b2c885086ead..d937244532fc 100644
--- a/vcl/source/gdi/pdfwriter_impl.cxx
+++ b/vcl/source/gdi/pdfwriter_impl.cxx
@@ -5227,7 +5227,7 @@ static void escapeStringXML( const OUString& rStr, OUString &rValue)
rValue += "&quot;";
break;
default:
- rValue += OUStringLiteral1( *pUni );
+ rValue += OUStringChar( *pUni );
break;
}
}
diff --git a/vcl/source/outdev/text.cxx b/vcl/source/outdev/text.cxx
index 63a68966c819..3c69069929a8 100644
--- a/vcl/source/outdev/text.cxx
+++ b/vcl/source/outdev/text.cxx
@@ -835,7 +835,7 @@ void OutputDevice::DrawText( const Point& rStartPt, const OUString& rStr,
{
pVector->push_back( *it );
if( pDisplayText )
- *pDisplayText += OUStringLiteral1(rStr[ nIndex ]);
+ *pDisplayText += OUStringChar(rStr[ nIndex ]);
bInserted = true;
}
}
@@ -1959,7 +1959,7 @@ OUString OutputDevice::ImplGetEllipsisString( const OutputDevice& rTargetDevice,
}
if ( aStr.isEmpty() && (nStyle & DrawTextFlags::Clip) )
- aStr += OUStringLiteral1(rOrigStr[ 0 ]);
+ aStr += OUStringChar(rOrigStr[ 0 ]);
}
else if ( nStyle & DrawTextFlags::PathEllipsis )
{
diff --git a/vcl/source/treelist/inetimg.cxx b/vcl/source/treelist/inetimg.cxx
index fe549a94ce3a..9c7329e3065c 100644
--- a/vcl/source/treelist/inetimg.cxx
+++ b/vcl/source/treelist/inetimg.cxx
@@ -32,12 +32,12 @@ void INetImage::Write( SvStream& rOStm, SotClipboardFormatId nFormat ) const
case SotClipboardFormatId::INET_IMAGE:
{
OUString sString(
- aImageURL + OUStringLiteral1(TOKEN_SEPARATOR) + aTargetURL
- + OUStringLiteral1(TOKEN_SEPARATOR) + aTargetFrame
- + OUStringLiteral1(TOKEN_SEPARATOR) /* + aAlternateText */
- + OUStringLiteral1(TOKEN_SEPARATOR)
+ aImageURL + OUStringChar(TOKEN_SEPARATOR) + aTargetURL
+ + OUStringChar(TOKEN_SEPARATOR) + aTargetFrame
+ + OUStringChar(TOKEN_SEPARATOR) /* + aAlternateText */
+ + OUStringChar(TOKEN_SEPARATOR)
+ OUString::number(aSizePixel.Width())
- + OUStringLiteral1(TOKEN_SEPARATOR)
+ + OUStringChar(TOKEN_SEPARATOR)
+ OUString::number(aSizePixel.Height()));
OString sOut(OUStringToOString(sString,
diff --git a/vcl/source/uitest/logger.cxx b/vcl/source/uitest/logger.cxx
index 2ab6026de4af..858dd0353d14 100644
--- a/vcl/source/uitest/logger.cxx
+++ b/vcl/source/uitest/logger.cxx
@@ -225,13 +225,13 @@ void UITestLogger::logKeyInput(VclPtr<vcl::Window> const& xUIElement, const KeyE
aKeyCode += "ALT+";
if (aFound.isEmpty())
- aKeyCode += OUStringLiteral1(nChar) + "\"}";
+ aKeyCode += OUStringChar(nChar) + "\"}";
else
aKeyCode += aFound + "\"}";
}
else
{
- aKeyCode = "{\"TEXT\": \"" + OUStringLiteral1(nChar) + "\"}";
+ aKeyCode = "{\"TEXT\": \"" + OUStringChar(nChar) + "\"}";
}
std::unique_ptr<UIObject> pUIObject = xUIElement->GetUITestFactory()(xUIElement.get());
diff --git a/vcl/source/window/mnemonic.cxx b/vcl/source/window/mnemonic.cxx
index bbe12299abc5..6108621918e6 100644
--- a/vcl/source/window/mnemonic.cxx
+++ b/vcl/source/window/mnemonic.cxx
@@ -262,8 +262,8 @@ OUString MnemonicGenerator::CreateMnemonic( const OUString& _rKey )
if ( maMnemonics[nMnemonicIndex] )
{
maMnemonics[nMnemonicIndex] = 0;
- OUString aStr = OUStringLiteral("(") + OUStringLiteral1(m_cMnemonic) +
- OUStringLiteral1(sal_Unicode(rtl::toAsciiUpperCase(c))) +
+ OUString aStr = OUStringLiteral("(") + OUStringChar(m_cMnemonic) +
+ OUStringChar(sal_Unicode(rtl::toAsciiUpperCase(c))) +
")";
nIndex = rKey.getLength();
if( nIndex >= 2 )
diff --git a/vcl/unx/generic/window/salframe.cxx b/vcl/unx/generic/window/salframe.cxx
index 87b795513367..83dfaf35e434 100644
--- a/vcl/unx/generic/window/salframe.cxx
+++ b/vcl/unx/generic/window/salframe.cxx
@@ -2881,7 +2881,7 @@ bool X11SalFrame::appendUnicodeSequence( sal_Unicode c )
(c >= 'a' && c <= 'f') ||
(c >= 'A' && c <= 'F') )
{
- rSeq += OUStringLiteral1(c);
+ rSeq += OUStringChar(c);
std::vector<ExtTextInputAttr> attribs( rSeq.getLength(), ExtTextInputAttr::Underline );
SalExtTextInputEvent aEv;
diff --git a/vcl/win/window/salframe.cxx b/vcl/win/window/salframe.cxx
index 4546031b20b3..73028b8a48ec 100644
--- a/vcl/win/window/salframe.cxx
+++ b/vcl/win/window/salframe.cxx
@@ -4379,7 +4379,7 @@ static LRESULT ImplMenuChar( HWND, WPARAM wParam, LPARAM lParam )
{
LRESULT nRet = MNC_IGNORE;
HMENU hMenu = reinterpret_cast<HMENU>(lParam);
- OUString aMnemonic( "&" + OUStringLiteral1(static_cast<sal_Unicode>(LOWORD(wParam))) );
+ OUString aMnemonic( "&" + OUStringChar(static_cast<sal_Unicode>(LOWORD(wParam))) );
aMnemonic = aMnemonic.toAsciiLowerCase(); // we only have ascii mnemonics
// search the mnemonic in the current menu
diff --git a/winaccessibility/source/UAccCOM/MAccessible.cxx b/winaccessibility/source/UAccCOM/MAccessible.cxx
index 3537f23c6cf7..d681c38a793c 100644
--- a/winaccessibility/source/UAccCOM/MAccessible.cxx
+++ b/winaccessibility/source/UAccCOM/MAccessible.cxx
@@ -729,7 +729,7 @@ COM_DECLSPEC_NOTHROW STDMETHODIMP CMAccessible::get_accKeyboardShortcut(VARIANT
sal_Unicode key;
if(GetMnemonicChar(ouStr, &key))
{
- wString = "Alt+" + OUStringLiteral1(key);
+ wString = "Alt+" + OUStringChar(key);
}
else
return S_FALSE;
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index c2d087fe4d59..b9c053700574 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -2991,7 +2991,7 @@ static bool lcl_FindInCommand(
OUString& rValue )
{
bool bRet = false;
- OUString sSearch = "\\" + OUStringLiteral1( cSwitch );
+ OUString sSearch = "\\" + OUStringChar( cSwitch );
sal_Int32 nIndex = rCommand.indexOf( sSearch );
if( nIndex >= 0 )
{
diff --git a/xmloff/source/style/xmlnumi.cxx b/xmloff/source/style/xmlnumi.cxx
index ed6304d00d84..0da58ed8ab11 100644
--- a/xmloff/source/style/xmlnumi.cxx
+++ b/xmloff/source/style/xmlnumi.cxx
@@ -517,7 +517,7 @@ Sequence<beans::PropertyValue> SvxXMLListLevelStyleContext_Impl::GetProperties()
// Must append 'cBullet' even if it is zero
// if 'bBullet' is true and 'cBullet' is zero - BulletChar property must be 0.
- OUString sTmp = OUStringLiteral1( cBullet );
+ OUString sTmp = OUStringChar( cBullet );
pProps[nPos].Name = "BulletChar";
pProps[nPos++].Value <<= sTmp;
@@ -1248,7 +1248,7 @@ void SvxXMLListStyleContext::SetDefaultStyle(
pProps->Name = "BulletFont";
(pProps++)->Value <<= aFDesc;
- OUString sTmp = OUStringLiteral1(sal_Unicode(0xF000 + 149));
+ OUString sTmp = OUStringChar(sal_Unicode(0xF000 + 149));
pProps->Name = "BulletChar";
(pProps++)->Value <<= sTmp;
pProps->Name = "CharStyleName";