From 5536aea8228778e00b9f1ca8199d858cd03780ad Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Tue, 30 Aug 2016 07:43:52 +0200 Subject: Let OUStringLiteral1 take its arg as ctor arg, not template arg ...which makes it more flexible, can now also be used on non-const arguments. The drawback of the argument no longer being a compile-time constant is remedied by making the ctor constexpr. Change-Id: Ia4903a2cc86791fece92eac0cb8406b6659dd19d --- chart2/qa/extras/chart2_trendcalculators.cxx | 8 +++--- .../tools/ExponentialRegressionCurveCalculator.cxx | 4 +-- .../tools/LogarithmicRegressionCurveCalculator.cxx | 4 +-- .../tools/PolynomialRegressionCurveCalculator.cxx | 2 +- .../tools/PotentialRegressionCurveCalculator.cxx | 2 +- comphelper/qa/string/test_string.cxx | 2 +- connectivity/source/drivers/evoab2/NStatement.cxx | 6 ++--- cui/source/dialogs/hlinettp.cxx | 2 +- cui/source/options/optjava.cxx | 2 +- cui/source/options/optpath.cxx | 14 +++++----- cui/source/tabpages/grfpage.cxx | 4 +-- editeng/source/editeng/editeng.cxx | 2 +- editeng/source/editeng/impedit.cxx | 2 +- editeng/source/editeng/impedit3.cxx | 2 +- filter/source/graphicfilter/idxf/dxfreprd.cxx | 6 ++--- idl/source/prj/command.cxx | 4 +-- include/rtl/stringconcat.hxx | 6 ++--- include/rtl/stringutils.hxx | 29 +++++++++++---------- .../rtl/strings/test_oustring_stringliterals.cxx | 23 +++++++++-------- sc/qa/extras/macros-test.cxx | 2 +- sc/qa/unit/subsequent_export-test.cxx | 8 +++--- sc/source/core/data/global2.cxx | 2 +- sc/source/core/tool/compiler.cxx | 6 ++--- sc/source/filter/excel/xelink.cxx | 2 +- sc/source/filter/excel/xihelper.cxx | 2 +- sc/source/filter/excel/xiname.cxx | 2 +- sc/source/ui/optdlg/tpusrlst.cxx | 4 +-- sc/source/ui/view/prevwsh.cxx | 2 +- sc/source/ui/view/viewdata.cxx | 2 +- sd/source/filter/eppt/pptx-text.cxx | 2 +- sd/source/ui/dlg/tpaction.cxx | 2 +- sd/source/ui/dlg/tpoption.cxx | 2 +- sfx2/source/appl/fileobj.cxx | 8 +++--- sfx2/source/appl/linkmgr2.cxx | 6 ++--- starmath/source/ooxmlimport.cxx | 20 +++++++-------- svl/qa/unit/svl.cxx | 8 +++--- svl/source/misc/lngmisc.cxx | 4 +-- svtools/source/misc/langtab.cxx | 2 +- svtools/source/urlobj/inetimg.cxx | 10 ++++---- svx/source/tbxctrls/layctrl.cxx | 2 +- sw/qa/core/uwriter.cxx | 14 +++++----- sw/qa/extras/uiwriter/uiwriter.cxx | 14 +++++----- sw/source/core/bastyp/calc.cxx | 2 +- sw/source/core/crsr/crstrvl.cxx | 2 +- sw/source/core/doc/DocumentFieldsManager.cxx | 4 +-- sw/source/core/doc/acmplwrd.cxx | 4 +-- sw/source/core/doc/docfld.cxx | 10 ++++---- sw/source/core/doc/doctxm.cxx | 2 +- sw/source/core/docnode/ndsect.cxx | 2 +- sw/source/core/docnode/section.cxx | 4 +-- sw/source/core/edit/autofmt.cxx | 4 +-- sw/source/core/edit/editsh.cxx | 2 +- sw/source/core/edit/edlingu.cxx | 4 +-- sw/source/core/fields/cellfml.cxx | 8 +++--- sw/source/core/fields/dbfld.cxx | 12 ++++----- sw/source/core/fields/ddefld.cxx | 2 +- sw/source/core/fields/docufld.cxx | 2 +- sw/source/core/fields/reffld.cxx | 2 +- sw/source/core/frmedt/fetab.cxx | 4 +-- sw/source/core/graphic/ndgrf.cxx | 4 +-- sw/source/core/tox/tox.cxx | 6 ++--- sw/source/core/tox/txmsrt.cxx | 6 ++--- sw/source/core/txtnode/thints.cxx | 4 +-- sw/source/core/unocore/unofield.cxx | 6 ++--- sw/source/core/unocore/unoidx.cxx | 2 +- sw/source/core/unocore/unosect.cxx | 14 +++++----- sw/source/filter/ascii/ascatr.cxx | 2 +- sw/source/filter/html/htmlsect.cxx | 4 +-- sw/source/filter/html/wrthtml.cxx | 2 +- sw/source/filter/ww8/docxattributeoutput.cxx | 2 +- sw/source/filter/ww8/ww8atr.cxx | 2 +- sw/source/filter/ww8/ww8par5.cxx | 6 ++--- sw/source/filter/xml/xmltbli.cxx | 4 +-- sw/source/ui/dbui/dbinsdlg.cxx | 2 +- sw/source/ui/dbui/mmlayoutpage.cxx | 12 ++++----- sw/source/ui/dialog/ascfldlg.cxx | 2 +- sw/source/ui/dialog/uiregionsw.cxx | 30 +++++++++++----------- sw/source/ui/envelp/envlop1.cxx | 4 +-- sw/source/ui/fldui/changedb.cxx | 6 ++--- sw/source/ui/fldui/flddb.cxx | 8 +++--- sw/source/ui/fldui/fldfunc.cxx | 2 +- sw/source/ui/fldui/fldvar.cxx | 12 ++++----- sw/source/ui/index/cnttab.cxx | 14 +++++----- sw/source/ui/index/swuiidxmrk.cxx | 2 +- sw/source/ui/misc/bookmark.cxx | 2 +- sw/source/ui/misc/glosbib.cxx | 8 +++--- sw/source/ui/misc/glossary.cxx | 12 ++++----- sw/source/ui/vba/vbalisthelper.cxx | 2 +- sw/source/uibase/dbui/dbmgr.cxx | 8 +++--- sw/source/uibase/dialog/regionsw.cxx | 4 +-- sw/source/uibase/dochdl/gloshdl.cxx | 4 +-- sw/source/uibase/docvw/edtwin2.cxx | 2 +- sw/source/uibase/fldui/fldmgr.cxx | 8 +++--- sw/source/uibase/misc/glosdoc.cxx | 10 ++++---- sw/source/uibase/ribbar/inputwin.cxx | 8 +++--- sw/source/uibase/shells/textfld.cxx | 6 ++--- sw/source/uibase/shells/textsh2.cxx | 6 ++--- sw/source/uibase/uno/unoatxt.cxx | 4 +-- sw/source/uibase/utlui/content.cxx | 2 +- sw/source/uibase/utlui/glbltree.cxx | 4 +-- sw/source/uibase/utlui/gloslst.cxx | 6 ++--- sw/source/uibase/wrtsh/wrtsh2.cxx | 4 +-- unotools/source/config/bootstrap.cxx | 4 +-- 103 files changed, 292 insertions(+), 290 deletions(-) diff --git a/chart2/qa/extras/chart2_trendcalculators.cxx b/chart2/qa/extras/chart2_trendcalculators.cxx index dd79dadab345..56cc6aa8c952 100644 --- a/chart2/qa/extras/chart2_trendcalculators.cxx +++ b/chart2/qa/extras/chart2_trendcalculators.cxx @@ -136,7 +136,7 @@ void Chart2TrendCalculators::testPotentialRegression2() xValues[i] = d; yValues[i] = -2.0 * pow ( d, 3 ); } - checkCalculator( xValues, yValues, "f(x) = "+ OUStringLiteral1() +" 2 x^3"); + checkCalculator( xValues, yValues, "f(x) = "+ OUStringLiteral1(aMinusSign) +" 2 x^3"); } // test y = - 2 X - 5 @@ -152,7 +152,7 @@ void Chart2TrendCalculators::testLinearRegression1() xValues[i] = d; yValues[i] = - 2.0 * d - 5.0 ; } - checkCalculator( xValues, yValues, "f(x) = "+ OUStringLiteral1() +" 2x "+ OUStringLiteral1() +" 5"); + checkCalculator( xValues, yValues, "f(x) = "+ OUStringLiteral1(aMinusSign) +" 2x "+ OUStringLiteral1(aMinusSign) +" 5"); } // test y = A x ^ B @@ -168,7 +168,7 @@ void Chart2TrendCalculators::testPolynomialRegression1() xValues[i] = d; yValues[i] = - 2.0 * d * d + 4 * d - 5; } - OUString sExpectedFormula( "f(x) = "+ OUStringLiteral1() +" 2x" + OUString( aSuperscriptFigures[2] ) + " + 4x "+ OUStringLiteral1() +" 5" ); + OUString sExpectedFormula( "f(x) = "+ OUStringLiteral1(aMinusSign) +" 2x" + OUString( aSuperscriptFigures[2] ) + " + 4x "+ OUStringLiteral1(aMinusSign) +" 5" ); checkCalculator( xValues, yValues, sExpectedFormula ); } @@ -199,7 +199,7 @@ void Chart2TrendCalculators::testExponentialRegression2() xValues[i] = d; yValues[i] = -2.0 * exp ( 0.3 * d ); } - checkCalculator( xValues, yValues, "f(x) = "+ OUStringLiteral1() + " 2 exp( 0.3 x )"); + checkCalculator( xValues, yValues, "f(x) = "+ OUStringLiteral1(aMinusSign) + " 2 exp( 0.3 x )"); } diff --git a/chart2/source/tools/ExponentialRegressionCurveCalculator.cxx b/chart2/source/tools/ExponentialRegressionCurveCalculator.cxx index 35c85e373ac6..7b6250428148 100644 --- a/chart2/source/tools/ExponentialRegressionCurveCalculator.cxx +++ b/chart2/source/tools/ExponentialRegressionCurveCalculator.cxx @@ -185,7 +185,7 @@ OUString ExponentialRegressionCurveCalculator::ImplGetRepresentation( // if nValueLength not calculated then nullptr sal_Int32* pValueLength = nValueLength ? &nValueLength : nullptr; if ( m_fSign < 0.0 ) - aTmpBuf.append( OUStringLiteral1() + " " ); + aTmpBuf.append( OUStringLiteral1(aMinusSign) + " " ); if ( bHasIntercept ) { OUString aValueString = getFormattedString( xNumFormatter, nNumberFormatKey, fIntercept, pValueLength ); @@ -210,7 +210,7 @@ OUString ExponentialRegressionCurveCalculator::ImplGetRepresentation( } } if ( m_fLogSlope < 0.0 ) - aTmpBuf.append( OUStringLiteral1() + " " ); + aTmpBuf.append( OUStringLiteral1(aMinusSign) + " " ); 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 93cbf3a70263..c50a8c361b24 100644 --- a/chart2/source/tools/LogarithmicRegressionCurveCalculator.cxx +++ b/chart2/source/tools/LogarithmicRegressionCurveCalculator.cxx @@ -162,7 +162,7 @@ OUString LogarithmicRegressionCurveCalculator::ImplGetRepresentation( { if( m_fSlope < 0.0 ) { - aTmpBuf.append( OUStringLiteral1() + " " ); + aTmpBuf.append( OUStringLiteral1(aMinusSign) + " " ); } if( bHasSlope ) { @@ -181,7 +181,7 @@ OUString LogarithmicRegressionCurveCalculator::ImplGetRepresentation( } // add intercept value if( m_fIntercept < 0.0 ) - aTmpBuf.append( OUStringLiteral1()+" " ); + aTmpBuf.append( OUStringLiteral1(aMinusSign)+" " ); 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 120c33e86386..9b885993d563 100644 --- a/chart2/source/tools/PolynomialRegressionCurveCalculator.cxx +++ b/chart2/source/tools/PolynomialRegressionCurveCalculator.cxx @@ -278,7 +278,7 @@ OUString PolynomialRegressionCurveCalculator::ImplGetRepresentation( { if ( bFindValue ) // if it is not the first aValue aTmpBuf.append( " " ); - aTmpBuf.append( OUStringLiteral1() + " "); + aTmpBuf.append( OUStringLiteral1(aMinusSign) + " "); aValue = - aValue; } else diff --git a/chart2/source/tools/PotentialRegressionCurveCalculator.cxx b/chart2/source/tools/PotentialRegressionCurveCalculator.cxx index b767412bc6b5..512b3736cfaa 100644 --- a/chart2/source/tools/PotentialRegressionCurveCalculator.cxx +++ b/chart2/source/tools/PotentialRegressionCurveCalculator.cxx @@ -176,7 +176,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()+" " ); + aTmpBuf.append( OUStringLiteral1(aMinusSign)+" " ); if( bHasIntercept ) { OUString aValueString = getFormattedString( xNumFormatter, nNumberFormatKey, fabs(m_fIntercept), pValueLength ); diff --git a/comphelper/qa/string/test_string.cxx b/comphelper/qa/string/test_string.cxx index b9650a3a199f..636c30587370 100644 --- a/comphelper/qa/string/test_string.cxx +++ b/comphelper/qa/string/test_string.cxx @@ -62,7 +62,7 @@ void TestString::testDecimalStringToNumber() { OUString s1("1234"); CPPUNIT_ASSERT_EQUAL((sal_uInt32)1234, comphelper::string::decimalStringToNumber(s1)); - s1 += OUStringLiteral1<0x07C6>(); + s1 += OUStringLiteral1(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/connectivity/source/drivers/evoab2/NStatement.cxx b/connectivity/source/drivers/evoab2/NStatement.cxx index aec05c3a3327..98dd28a37524 100644 --- a/connectivity/source/drivers/evoab2/NStatement.cxx +++ b/connectivity/source/drivers/evoab2/NStatement.cxx @@ -368,7 +368,7 @@ EBookQuery *OCommonStatement::whereAnalysis( const OSQLParseNode* parseTree ) aMatchString = pAtom->getTokenValue(); // Determine where '%' character is... - if( aMatchString == OUStringLiteral1() ) + if( aMatchString == OUStringLiteral1(WILDCARD) ) { // String containing only a '%' and nothing else matches everything pResult = createTest( aColumnName, E_BOOK_QUERY_CONTAINS, @@ -388,7 +388,7 @@ EBookQuery *OCommonStatement::whereAnalysis( const OSQLParseNode* parseTree ) } else if( (aMatchString.indexOf ( WILDCARD ) == aMatchString.lastIndexOf ( WILDCARD ) ) ) { // One occurrence of '%' matches... - if ( aMatchString.startsWith(OUStringLiteral1()) ) + if ( aMatchString.startsWith(OUStringLiteral1(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 ) ); @@ -396,7 +396,7 @@ EBookQuery *OCommonStatement::whereAnalysis( const OSQLParseNode* parseTree ) m_pConnection->throwGenericSQLException(STR_QUERY_LIKE_WILDCARD,*this); } else if( aMatchString.getLength() >= 3 && - aMatchString.startsWith(OUStringLiteral1()) && + aMatchString.startsWith(OUStringLiteral1(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/cui/source/dialogs/hlinettp.cxx b/cui/source/dialogs/hlinettp.cxx index 7c92332f36a6..2508f123c812 100644 --- a/cui/source/dialogs/hlinettp.cxx +++ b/cui/source/dialogs/hlinettp.cxx @@ -407,7 +407,7 @@ void SvxHyperlinkInternetTp::SetMarkStr ( const OUString& aStrMark ) if( nPos != -1 ) aStrURL = aStrURL.copy(0, nPos); - aStrURL += OUStringLiteral1() + aStrMark; + aStrURL += OUStringLiteral1(sUHash) + aStrMark; m_pCbbTarget->SetText ( aStrURL ); } diff --git a/cui/source/options/optjava.cxx b/cui/source/options/optjava.cxx index 9fba0a917e05..70db94543c09 100644 --- a/cui/source/options/optjava.cxx +++ b/cui/source/options/optjava.cxx @@ -1117,7 +1117,7 @@ OUString SvxJavaClassPathDlg::GetClassPath() const for ( sal_Int32 i = 0; i < nCount; ++i ) { if ( !sPath.isEmpty() ) - sPath += OUStringLiteral1(); + sPath += OUStringLiteral1(CLASSPATH_DELIMITER); OUString* pFullPath = static_cast< OUString* >( m_pPathList->GetEntryData(i) ); if ( pFullPath ) sPath += *pFullPath; diff --git a/cui/source/options/optpath.cxx b/cui/source/options/optpath.cxx index 2380d9a4fa8d..8d332e0dd707 100644 --- a/cui/source/options/optpath.cxx +++ b/cui/source/options/optpath.cxx @@ -161,7 +161,7 @@ static OUString Convert_Impl( const OUString& rValue ) aReturn += aObj.PathToFileName(); if ( nPos < 0 ) break; - aReturn += OUStringLiteral1(); + aReturn += OUStringLiteral1(MULTIPATH_DELIMITER); } return aReturn; @@ -321,7 +321,7 @@ void SvxPathTabPage::Reset( const SfxItemSet* ) GetPathList( i, sInternal, sUser, sWritable, bReadOnly ); OUString sTmpPath = sUser; if ( !sTmpPath.isEmpty() && !sWritable.isEmpty() ) - sTmpPath += OUStringLiteral1(); + sTmpPath += OUStringLiteral1(MULTIPATH_DELIMITER); sTmpPath += sWritable; const OUString aValue = Convert_Impl( sTmpPath ); nWidth2 = std::max(nWidth2, pPathBox->GetTextWidth(aValue)); @@ -440,7 +440,7 @@ IMPL_LINK_NOARG_TYPED(SvxPathTabPage, StandardHdl_Impl, Button*, void) if ( !bFound ) { if ( !sTemp.isEmpty() ) - sTemp += OUStringLiteral1(); + sTemp += OUStringLiteral1(MULTIPATH_DELIMITER); sTemp += sOnePath; } } @@ -460,7 +460,7 @@ IMPL_LINK_NOARG_TYPED(SvxPathTabPage, StandardHdl_Impl, Button*, void) break; } if ( !sUserPath.isEmpty() ) - sUserPath += OUStringLiteral1(); + sUserPath += OUStringLiteral1(MULTIPATH_DELIMITER); sUserPath += sToken; } } @@ -572,7 +572,7 @@ IMPL_LINK_NOARG_TYPED(SvxPathTabPage, PathHdl_Impl, Button*, void) OUString sPath( sUser ); if ( !sPath.isEmpty() ) - sPath += OUStringLiteral1(); + sPath += OUStringLiteral1(MULTIPATH_DELIMITER); sPath += sWritable; pMultiDlg->SetPath( sPath ); @@ -599,12 +599,12 @@ IMPL_LINK_NOARG_TYPED(SvxPathTabPage, PathHdl_Impl, Button*, void) break; } if ( !sUser.isEmpty() ) - sUser += OUStringLiteral1(); + sUser += OUStringLiteral1(MULTIPATH_DELIMITER); sUser += sToken; } sFullPath = sUser; if ( !sFullPath.isEmpty() ) - sFullPath += OUStringLiteral1(); + sFullPath += OUStringLiteral1(MULTIPATH_DELIMITER); sFullPath += sWritable; } diff --git a/cui/source/tabpages/grfpage.cxx b/cui/source/tabpages/grfpage.cxx index b692be407304..f6a1a8716af1 100644 --- a/cui/source/tabpages/grfpage.cxx +++ b/cui/source/tabpages/grfpage.cxx @@ -699,7 +699,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 += OUStringLiteral1(0x00D7) + aFld->GetText(); if ( aOrigPixelSize.Width() && aOrigPixelSize.Height() ) { sal_Int32 ax = sal_Int32(floor((float)aOrigPixelSize.Width() / @@ -710,7 +710,7 @@ void SvxGrfCropPage::GraphicHasChanged( bool bFound ) sTemp += CUI_RESSTR( RID_SVXSTR_PPI ); OUString sPPI = OUString::number(ax); if (abs(ax - ay) > 1) { - sPPI += OUStringLiteral1<0x00D7>() + OUString::number(ay); + sPPI += OUStringLiteral1(0x00D7) + OUString::number(ay); } sTemp = sTemp.replaceAll("%1", sPPI); } diff --git a/editeng/source/editeng/editeng.cxx b/editeng/source/editeng/editeng.cxx index 37718c5f75e4..596d4715429f 100644 --- a/editeng/source/editeng/editeng.cxx +++ b/editeng/source/editeng/editeng.cxx @@ -2097,7 +2097,7 @@ void EditEngine::SetWordDelimiters( const OUString& rDelimiters ) { pImpEditEngine->aWordDelimiters = rDelimiters; if (pImpEditEngine->aWordDelimiters.indexOf(CH_FEATURE) == -1) - pImpEditEngine->aWordDelimiters += OUStringLiteral1(); + pImpEditEngine->aWordDelimiters += OUStringLiteral1(CH_FEATURE); } const OUString& EditEngine::GetWordDelimiters() const diff --git a/editeng/source/editeng/impedit.cxx b/editeng/source/editeng/impedit.cxx index 2ef02909e6ee..701e66b60965 100644 --- a/editeng/source/editeng/impedit.cxx +++ b/editeng/source/editeng/impedit.cxx @@ -1482,7 +1482,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(), " " ); + aText = aText.replaceAll( OUStringLiteral1(LINE_SEP), " " ); aSel = pEditEngine->InsertText(aSel, aText); } catch( ... ) diff --git a/editeng/source/editeng/impedit3.cxx b/editeng/source/editeng/impedit3.cxx index f8917685c583..0ec971186558 100644 --- a/editeng/source/editeng/impedit3.cxx +++ b/editeng/source/editeng/impedit3.cxx @@ -3225,7 +3225,7 @@ void ImpEditEngine::Paint( OutputDevice* pOutDev, Rectangle aClipRect, Point aSt { if ( rTextPortion.GetExtraValue() ) aText = OUString(rTextPortion.GetExtraValue()); - aText += OUStringLiteral1(); + aText += OUStringLiteral1(CH_HYPH); nTextStart = 0; nTextLen = aText.getLength(); diff --git a/filter/source/graphicfilter/idxf/dxfreprd.cxx b/filter/source/graphicfilter/idxf/dxfreprd.cxx index ff66914fa2e9..6a80a9686db6 100644 --- a/filter/source/graphicfilter/idxf/dxfreprd.cxx +++ b/filter/source/graphicfilter/idxf/dxfreprd.cxx @@ -405,9 +405,9 @@ OUString DXFRepresentation::ToOUString(const OString& s) const OUString result = OStringToOUString(s, getTextEncoding()); 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", OUStringLiteral1(0x00B0)) // Degrees symbol (°) + .replaceAll("%%p", OUStringLiteral1(0x00B1)) // Tolerance symbol (±) + .replaceAll("%%c", OUStringLiteral1(0x2205)) // Diameter symbol .replaceAll("%%%", "%"); // Percent symbol sal_Int32 pos = result.indexOf("%%"); // %%nnn, where nnn - 3-digit decimal ASCII code diff --git a/idl/source/prj/command.cxx b/idl/source/prj/command.cxx index 41ea28b016fc..a939ee5a2be9 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(); + aPath += OUStringLiteral1(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(); + aPath += OUStringLiteral1(SAL_PATHSEPARATOR); aPath += OStringToOUString(aInc, RTL_TEXTENCODING_ASCII_US); } } diff --git a/include/rtl/stringconcat.hxx b/include/rtl/stringconcat.hxx index ff8ad95f93c2..d5bc4e8eb500 100644 --- a/include/rtl/stringconcat.hxx +++ b/include/rtl/stringconcat.hxx @@ -150,10 +150,10 @@ template struct ToStringHelper { static bool const allowOUStringConcat = true; }; -template struct ToStringHelper> { - static int length(OUStringLiteral1_) { return 1; } +template<> struct ToStringHelper { + static int length(OUStringLiteral1_) { return 1; } static sal_Unicode * addData( - sal_Unicode * buffer, OUStringLiteral1_ literal) + sal_Unicode * buffer, OUStringLiteral1_ 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 6965347788a0..dadbda61ec97 100644 --- a/include/rtl/stringutils.hxx +++ b/include/rtl/stringutils.hxx @@ -54,7 +54,7 @@ namespace rtl ... if (s[i] == WILDCARD) ... ... - if (s.endsWith(OUStringLiteral1())) ... + if (s.endsWith(OUStringLiteral1(WILDCARD))) ... to avoid creating a temporary OUString instance, and instead pick the endsWith overload actually designed to take an argument of type @@ -64,22 +64,23 @@ namespace rtl functions take the literal argument by non-const lvalue reference, for technical reasons. Except with MSVC, at least up to Visual Studio 2013: For one, it fails to take that const-ness into account when trying to match - "OUStringLiteral1_ const" against T in a "T & literal" parameter of a + "OUStringLiteral1_ const" against T in a "T & literal" parameter of a function template. But for another, as a language extension, it allows to bind non-const temporary OUStringLiteral1_ instances to non-const lvalue references, but also with a warning that thus needs to be disabled. @since LibreOffice 5.0 */ -template struct SAL_WARN_UNUSED OUStringLiteral1_ { - sal_Unicode const c = C; +struct SAL_WARN_UNUSED OUStringLiteral1_ { + SAL_CONSTEXPR OUStringLiteral1_(sal_Unicode theC): c(theC) {} + sal_Unicode const c; }; #if defined _MSC_VER && _MSC_VER <= 1900 && !defined __clang__ // Visual Studio 2015 -template using OUStringLiteral1 = OUStringLiteral1_; +using OUStringLiteral1 = OUStringLiteral1_; #pragma warning(disable: 4239) #else -template using OUStringLiteral1 = OUStringLiteral1_ const; +using OUStringLiteral1 = OUStringLiteral1_ const; #endif /// @endcond @@ -178,12 +179,12 @@ struct ConstCharArrayDetector { sal_Unicode const (& literal)[N]) { return literal; } }; -template struct ConstCharArrayDetector< +template struct ConstCharArrayDetector< #if defined __GNUC__ && __GNUC__ == 4 && __GNUC_MINOR__ <= 8 \ && !defined __clang__ - OUStringLiteral1_ const, + OUStringLiteral1_ const, #else - OUStringLiteral1, + OUStringLiteral1, #endif T> { @@ -191,7 +192,7 @@ template struct ConstCharArrayDetector< static SAL_CONSTEXPR bool const ok = true; static SAL_CONSTEXPR std::size_t const length = 1; static SAL_CONSTEXPR sal_Unicode const * toPointer( - OUStringLiteral1_ const & literal) + OUStringLiteral1_ const & literal) { return &literal.c; } }; #endif @@ -209,12 +210,12 @@ struct ExceptConstCharArrayDetector< const char[ N ] > #if defined LIBO_INTERNAL_ONLY template struct ExceptConstCharArrayDetector {}; -template struct ExceptConstCharArrayDetector< +template<> struct ExceptConstCharArrayDetector< #if defined __GNUC__ && __GNUC__ == 4 && __GNUC_MINOR__ <= 8 \ && !defined __clang__ - OUStringLiteral1_ const + OUStringLiteral1_ const #else - OUStringLiteral1 + OUStringLiteral1 #endif > {}; @@ -240,7 +241,7 @@ struct ExceptCharArrayDetector< const char[ N ] > #if defined LIBO_INTERNAL_ONLY template struct ExceptCharArrayDetector {}; template struct ExceptCharArrayDetector {}; -template struct ExceptCharArrayDetector> {}; +template<> struct ExceptCharArrayDetector {}; #endif template< typename T1, typename T2 = void > diff --git a/sal/qa/rtl/strings/test_oustring_stringliterals.cxx b/sal/qa/rtl/strings/test_oustring_stringliterals.cxx index ec4bbe244862..e257d7d13f9e 100644 --- a/sal/qa/rtl/strings/test_oustring_stringliterals.cxx +++ b/sal/qa/rtl/strings/test_oustring_stringliterals.cxx @@ -217,36 +217,37 @@ void test::oustring::StringLiterals::checkOUStringLiteral() void test::oustring::StringLiterals::checkOUStringLiteral1() { - auto l1 = rtlunittest::OUStringLiteral1<'A'>(); + auto l1 = rtlunittest::OUStringLiteral1('A'); CPPUNIT_ASSERT_EQUAL(sal_Unicode('A'), l1.c); char const c2 = 'A'; - auto l2 = rtlunittest::OUStringLiteral1(); + auto l2 = rtlunittest::OUStringLiteral1(c2); CPPUNIT_ASSERT_EQUAL(sal_Unicode('A'), l2.c); - // char c3 = 'A'; auto l3 = rtlunittest::OUStringLiteral1(); + char c3 = 'A'; auto l3 = rtlunittest::OUStringLiteral1(c3); + CPPUNIT_ASSERT_EQUAL(sal_Unicode('A'), l3.c); - auto l4 = rtlunittest::OUStringLiteral1(); + auto l4 = rtlunittest::OUStringLiteral1(sal_Unicode('A')); CPPUNIT_ASSERT_EQUAL(sal_Unicode('A'), l4.c); sal_Unicode const c5 = 0x100; - auto l5 = rtlunittest::OUStringLiteral1(); + auto l5 = rtlunittest::OUStringLiteral1(c5); CPPUNIT_ASSERT_EQUAL(c5, l5.c); - rtl::OUString s1{rtlunittest::OUStringLiteral1<'A'>()}; + rtl::OUString s1{rtlunittest::OUStringLiteral1('A')}; CPPUNIT_ASSERT_EQUAL(sal_Int32(1), s1.getLength()); CPPUNIT_ASSERT_EQUAL(sal_Unicode('A'), s1[0]); CPPUNIT_ASSERT_EQUAL( - true, rtl::OUString("A") == rtlunittest::OUStringLiteral1<'A'>()); + true, rtl::OUString("A") == rtlunittest::OUStringLiteral1('A')); CPPUNIT_ASSERT_EQUAL( - false, rtl::OUString("AB") == rtlunittest::OUStringLiteral1<'A'>()); + false, rtl::OUString("AB") == rtlunittest::OUStringLiteral1('A')); CPPUNIT_ASSERT_EQUAL( - false, rtl::OUString("A") != rtlunittest::OUStringLiteral1<'A'>()); + false, rtl::OUString("A") != rtlunittest::OUStringLiteral1('A')); CPPUNIT_ASSERT_EQUAL( - true, rtl::OUString("AB") != rtlunittest::OUStringLiteral1<'A'>()); + true, rtl::OUString("AB") != rtlunittest::OUStringLiteral1('A')); - rtl::OUString s2("A" + rtlunittest::OUStringLiteral1<'b'>()); + rtl::OUString s2("A" + rtlunittest::OUStringLiteral1('b')); CPPUNIT_ASSERT_EQUAL(sal_Int32(2), s2.getLength()); CPPUNIT_ASSERT_EQUAL(sal_Unicode('A'), s2[0]); CPPUNIT_ASSERT_EQUAL(sal_Unicode('b'), s2[1]); diff --git a/sc/qa/extras/macros-test.cxx b/sc/qa/extras/macros-test.cxx index e216721e045a..f07ab311766d 100644 --- a/sc/qa/extras/macros-test.cxx +++ b/sc/qa/extras/macros-test.cxx @@ -292,7 +292,7 @@ void ScMacrosTest::testVba() OUString sTempDirURL; osl::FileBase:: getTempDirURL( sTempDirURL ); osl::FileBase::getSystemPathFromFileURL( sTempDirURL, sTempDir ); - sTempDir += OUStringLiteral1(); + sTempDir += OUStringLiteral1(SAL_PATHDELIMITER); OUString sTestFileName("My Test WorkBook.xls"); Sequence< uno::Any > aParams; for ( sal_uInt32 i=0; i() + "_-;\\-* #,##0\\ _" + - OUStringLiteral1() + "_-;_-* \"- \"_" + OUStringLiteral1() + "_-;_-@_-" ); + OUString rFormatStrExpected ( "_-* #,##0\\ _" + OUStringLiteral1(cEuro) + "_-;\\-* #,##0\\ _" + + OUStringLiteral1(cEuro) + "_-;_-* \"- \"_" + OUStringLiteral1(cEuro) + "_-;_-@_-" ); assertXPath(pDoc, "/x:styleSheet/x:numFmts/x:numFmt[4]", "formatCode", rFormatStrExpected ); // "_-* #,##0" €"_-;\-* #,##0" €"_-;_-* "- €"_-;_-@_-"); - rFormatStrExpected = "_-* #,##0\" " + OUStringLiteral1() + "\"_-;\\-* #,##0\" " + - OUStringLiteral1() + "\"_-;_-* \"- " + OUStringLiteral1() + "\"_-;_-@_-"; + rFormatStrExpected = "_-* #,##0\" " + OUStringLiteral1(cEuro) + "\"_-;\\-* #,##0\" " + + OUStringLiteral1(cEuro) + "\"_-;_-* \"- " + OUStringLiteral1(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/source/core/data/global2.cxx b/sc/source/core/data/global2.cxx index 1862fa527fcd..5be7bf0f9272 100644 --- a/sc/source/core/data/global2.cxx +++ b/sc/source/core/data/global2.cxx @@ -353,7 +353,7 @@ OUString ScGlobal::GetDocTabName( const OUString& rFileName, aDocTab = aDocTab.replaceAt( nPos, 0, "\\" ); nPos += 2; } - aDocTab += "'" + OUStringLiteral1() + rTabName; + aDocTab += "'" + OUStringLiteral1(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 1d9899a4f76d..09bd9fbdc953 100644 --- a/sc/source/core/tool/compiler.cxx +++ b/sc/source/core/tool/compiler.cxx @@ -3851,7 +3851,7 @@ void ScCompiler::AutoCorrectParsedSymbol() } else if ( c1 != cQuote && c2 == cQuote ) { // ..." - aCorrectedSymbol = OUStringLiteral1() + aCorrectedSymbol; + aCorrectedSymbol = OUStringLiteral1(cQuote) + aCorrectedSymbol; bCorrected = true; } else if ( nPos == 0 && (c1 == cx || c1 == cX) ) @@ -3865,13 +3865,13 @@ void ScCompiler::AutoCorrectParsedSymbol() if ( comphelper::string::getTokenCount(aCorrectedSymbol, cx) > 1 ) { // x => * sal_Unicode c = mxSymbols->getSymbolChar(ocMul); - aCorrectedSymbol = aCorrectedSymbol.replaceAll(OUStringLiteral1(), OUString(c)); + aCorrectedSymbol = aCorrectedSymbol.replaceAll(OUStringLiteral1(cx), OUString(c)); bCorrected = true; } if ( comphelper::string::getTokenCount(aCorrectedSymbol, cX) > 1 ) { // X => * sal_Unicode c = mxSymbols->getSymbolChar(ocMul); - aCorrectedSymbol = aCorrectedSymbol.replaceAll(OUStringLiteral1(), OUString(c)); + aCorrectedSymbol = aCorrectedSymbol.replaceAll(OUStringLiteral1(cX), OUString(c)); bCorrected = true; } } diff --git a/sc/source/filter/excel/xelink.cxx b/sc/source/filter/excel/xelink.cxx index bcf3a56890af..96b6394bea06 100644 --- a/sc/source/filter/excel/xelink.cxx +++ b/sc/source/filter/excel/xelink.cxx @@ -1464,7 +1464,7 @@ XclExpExternSheet::XclExpExternSheet( const XclExpRoot& rRoot, const OUString& r XclExpExternSheetBase( rRoot, EXC_ID_EXTERNSHEET ) { // reference to own sheet: \03 - Init(OUStringLiteral1() + rTabName); + Init(OUStringLiteral1(EXC_EXTSH_TABNAME) + rTabName); } void XclExpExternSheet::Save( XclExpStream& rStrm ) diff --git a/sc/source/filter/excel/xihelper.cxx b/sc/source/filter/excel/xihelper.cxx index be44668716be..f2f850a8b64d 100644 --- a/sc/source/filter/excel/xihelper.cxx +++ b/sc/source/filter/excel/xihelper.cxx @@ -694,7 +694,7 @@ void XclImpUrlHelper::DecodeUrl( rUrl += "\\"; else // control character in raw name -> DDE link { - rUrl += OUStringLiteral1(); + rUrl += OUStringLiteral1(EXC_DDE_DELIM); eState = xlUrlRaw; } break; diff --git a/sc/source/filter/excel/xiname.cxx b/sc/source/filter/excel/xiname.cxx index d09661503c6b..7189c2a0a2f2 100644 --- a/sc/source/filter/excel/xiname.cxx +++ b/sc/source/filter/excel/xiname.cxx @@ -109,7 +109,7 @@ XclImpName::XclImpName( XclImpStream& rStrm, sal_uInt16 nXclNameIdx ) : if( (GetBiff() == EXC_BIFF5) && (maXclName == XclTools::GetXclBuiltInDefName(EXC_BUILTIN_FILTERDATABASE)) ) { bBuiltIn = true; - maXclName = OUStringLiteral1(); + maXclName = OUStringLiteral1(EXC_BUILTIN_FILTERDATABASE); } // convert Excel name to Calc name diff --git a/sc/source/ui/optdlg/tpusrlst.cxx b/sc/source/ui/optdlg/tpusrlst.cxx index d601e28801fb..3ba056962988 100644 --- a/sc/source/ui/optdlg/tpusrlst.cxx +++ b/sc/source/ui/optdlg/tpusrlst.cxx @@ -283,7 +283,7 @@ void ScTpUserLists::UpdateEntries( size_t nList ) for ( size_t i=0; i(); + aEntryListStr += OUStringLiteral1(CR); aEntryListStr += rList.GetSubStr(i); } @@ -305,7 +305,7 @@ void ScTpUserLists::MakeListStr( OUString& rListStr ) { OUString aString = comphelper::string::strip(rListStr.getToken(i, LF), ' '); aStr += aString; - aStr += OUStringLiteral1(); + aStr += OUStringLiteral1(cDelimiter); } aStr = comphelper::string::strip(aStr, cDelimiter); diff --git a/sc/source/ui/view/prevwsh.cxx b/sc/source/ui/view/prevwsh.cxx index fb4171c84131..e1792b7abdc6 100644 --- a/sc/source/ui/view/prevwsh.cxx +++ b/sc/source/ui/view/prevwsh.cxx @@ -915,7 +915,7 @@ void ScPreviewShell::WriteUserData(OUString& rData, bool /* bBrowse */) // nPageNo rData = OUString::number(pPreview->GetZoom()) - + OUStringLiteral1() + + OUStringLiteral1(SC_USERDATA_SEP) + OUString::number(pPreview->GetPageNo()); } diff --git a/sc/source/ui/view/viewdata.cxx b/sc/source/ui/view/viewdata.cxx index aff29aec0e64..cbc64bd22cf2 100644 --- a/sc/source/ui/view/viewdata.cxx +++ b/sc/source/ui/view/viewdata.cxx @@ -2253,7 +2253,7 @@ void ScViewData::WriteUserData(OUString& rData) ( maTabData[i]->eVSplitMode == SC_SPLIT_FIX && maTabData[i]->nFixPosY > MAXROW_30 ) ) { - cTabSep = OUStringLiteral1(); // in order to not kill a 3.1-version + cTabSep = OUStringLiteral1(SC_NEW_TABSEP); // in order to not kill a 3.1-version } rData += OUString::number( maTabData[i]->nCurX ) + cTabSep + diff --git a/sd/source/filter/eppt/pptx-text.cxx b/sd/source/filter/eppt/pptx-text.cxx index 00c9feb3642c..0c6c28a1a68e 100644 --- a/sd/source/filter/eppt/pptx-text.cxx +++ b/sd/source/filter/eppt/pptx-text.cxx @@ -1056,7 +1056,7 @@ void ParagraphObj::ImplGetNumberingLevel( PPTExBulletProvider* pBuProv, sal_Int1 break; case SVX_NUM_NUMBER_LOWER_ZH : { - if ( sSuffix == OUStringLiteral1<0xff0e>() ) + if ( sSuffix == OUStringLiteral1(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/tpaction.cxx b/sd/source/ui/dlg/tpaction.cxx index 9e158bdd22bc..8579ce9f4f4b 100644 --- a/sd/source/ui/dlg/tpaction.cxx +++ b/sd/source/ui/dlg/tpaction.cxx @@ -831,7 +831,7 @@ OUString SdTPAction::GetEditText( bool bFullDocDestination ) OUString aTmpStr( m_pLbTreeDocument->GetSelectEntry() ); if( !aTmpStr.isEmpty() ) { - aStr += OUStringLiteral1() + aTmpStr; + aStr += OUStringLiteral1(DOCUMENT_TOKEN) + aTmpStr; } } diff --git a/sd/source/ui/dlg/tpoption.cxx b/sd/source/ui/dlg/tpoption.cxx index 06f49290ae97..4f38e6204a3d 100644 --- a/sd/source/ui/dlg/tpoption.cxx +++ b/sd/source/ui/dlg/tpoption.cxx @@ -585,7 +585,7 @@ void SdTpOptionsMisc::SetDrawMode() OUString SdTpOptionsMisc::GetScale( sal_Int32 nX, sal_Int32 nY ) { - return OUString::number(nX) + OUStringLiteral1() + OUString::number(nY); + return OUString::number(nX) + OUStringLiteral1(TOKEN) + OUString::number(nY); } bool SdTpOptionsMisc::SetScale( const OUString& aScale, sal_Int32& rX, sal_Int32& rY ) diff --git a/sfx2/source/appl/fileobj.cxx b/sfx2/source/appl/fileobj.cxx index 2a5464832c9a..9d3bb975cab4 100644 --- a/sfx2/source/appl/fileobj.cxx +++ b/sfx2/source/appl/fileobj.cxx @@ -411,8 +411,8 @@ void SvFileObject::Edit( vcl::Window* /*pParent*/, sfx2::SvBaseLink* pLink, cons if( !aDlg.Execute() ) { sFile = aDlg.GetPath() - + OUStringLiteral1() - + OUStringLiteral1() + + OUStringLiteral1(sfx2::cTokenSeparator) + + OUStringLiteral1(sfx2::cTokenSeparator) + aDlg.GetCurrentFilter(); aEndEditLink.Call( sFile ); @@ -501,8 +501,8 @@ IMPL_LINK_TYPED( SvFileObject, DialogClosedHdl, sfx2::FileDialogHelper*, _pFileD if ( _pFileDlg && _pFileDlg->GetError() == ERRCODE_NONE ) { OUString sURL( _pFileDlg->GetPath() ); - sFile = sURL + OUStringLiteral1() - + OUStringLiteral1() + sFile = sURL + OUStringLiteral1(sfx2::cTokenSeparator) + + OUStringLiteral1(sfx2::cTokenSeparator) + impl_getFilter( sURL ); } } diff --git a/sfx2/source/appl/linkmgr2.cxx b/sfx2/source/appl/linkmgr2.cxx index bc1c3a856d66..7b6a0681d691 100644 --- a/sfx2/source/appl/linkmgr2.cxx +++ b/sfx2/source/appl/linkmgr2.cxx @@ -378,7 +378,7 @@ void MakeLnkName( OUString& rName, const OUString* pType, const OUString& rFile, if( pType ) { rName = comphelper::string::strip(*pType, ' ') - + OUStringLiteral1(); + + OUStringLiteral1(cTokenSeparator); } else rName.clear(); @@ -386,11 +386,11 @@ void MakeLnkName( OUString& rName, const OUString* pType, const OUString& rFile, rName += rFile; rName = comphelper::string::strip(rName, ' ') - + OUStringLiteral1(); + + OUStringLiteral1(cTokenSeparator); rName = comphelper::string::strip(rName, ' ') + rLink; if( pFilter ) { - rName += OUStringLiteral1() + *pFilter; + rName += OUStringLiteral1(cTokenSeparator) + *pFilter; rName = comphelper::string::strip(rName, ' '); } } diff --git a/starmath/source/ooxmlimport.cxx b/starmath/source/ooxmlimport.cxx index 97eaacec6b11..577535f1fca9 100644 --- a/starmath/source/ooxmlimport.cxx +++ b/starmath/source/ooxmlimport.cxx @@ -312,25 +312,25 @@ OUString SmOoxmlImport::handleD() opening = "left lbrace "; if( closing == "}" ) closing = " right rbrace"; - if( opening == OUStringLiteral1<0x27e6>() ) + if( opening == OUStringLiteral1(0x27e6) ) opening = "left ldbracket "; - if( closing == OUStringLiteral1<0x27e7>() ) + if( closing == OUStringLiteral1(0x27e7) ) closing = " right rdbracket"; if( opening == "|" ) opening = "left lline "; if( closing == "|" ) closing = " right rline"; - if (opening == OUStringLiteral1() - || opening == OUStringLiteral1()) + if (opening == OUStringLiteral1(MS_DLINE) + || opening == OUStringLiteral1(MS_DVERTLINE)) opening = "left ldline "; - if (closing == OUStringLiteral1() - || closing == OUStringLiteral1()) + if (closing == OUStringLiteral1(MS_DLINE) + || closing == OUStringLiteral1(MS_DVERTLINE)) closing = " right rdline"; - if (opening == OUStringLiteral1() - || opening == OUStringLiteral1()) + if (opening == OUStringLiteral1(MS_LANGLE) + || opening == OUStringLiteral1(MS_LMATHANGLE)) opening = "left langle "; - if (closing == OUStringLiteral1() - || closing == OUStringLiteral1()) + if (closing == OUStringLiteral1(MS_RANGLE) + || closing == OUStringLiteral1(MS_RMATHANGLE)) closing = " right rangle"; // use scalable brackets (the explicit "left" or "right") if( opening == "(" || opening == "[" ) diff --git a/svl/qa/unit/svl.cxx b/svl/qa/unit/svl.cxx index 9a7cb261c441..321e382ae6fd 100644 --- a/svl/qa/unit/svl.cxx +++ b/svl/qa/unit/svl.cxx @@ -1185,10 +1185,10 @@ void Test::testUserDefinedNumberFormats() } { // tdf#79399 tdf#101462 Native Number Formats sCode = "[NatNum5][$-0404]General\\ "; - sExpected = OUStringLiteral1<22777>() + // 壹 - OUStringLiteral1<20336>() + // 佰 - OUStringLiteral1<36019>() + // 貳 - OUStringLiteral1<25342>() + // 拾 + sExpected = OUStringLiteral1(22777) + // 壹 + OUStringLiteral1(20336) + // 佰 + OUStringLiteral1(36019) + // 貳 + OUStringLiteral1(25342) + // 拾 " "; checkPreviewString(aFormatter, sCode, 120, eLang, sExpected); sCode = "[DBNum2][$-0404]General\\ "; diff --git a/svl/source/misc/lngmisc.cxx b/svl/source/misc/lngmisc.cxx index d0fe8b501dfe..1c7928fc6ba9 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(), ""); - rTxt = rTxt.replaceAll(OUStringLiteral1(), ""); + rTxt = rTxt.replaceAll(OUStringLiteral1(SVT_SOFT_HYPHEN), ""); + rTxt = rTxt.replaceAll(OUStringLiteral1(SVT_HARD_HYPHEN), ""); return n != rTxt.getLength(); } diff --git a/svtools/source/misc/langtab.cxx b/svtools/source/misc/langtab.cxx index de365590843e..120c82643462 100644 --- a/svtools/source/misc/langtab.cxx +++ b/svtools/source/misc/langtab.cxx @@ -120,7 +120,7 @@ const OUString ApplyLreOrRleEmbedding( const OUString &rText ) if (bFound) { aRes = OUString(cStart) + aRes - + OUStringLiteral1(); + + OUStringLiteral1(cPopDirectionalFormat); } return aRes; diff --git a/svtools/source/urlobj/inetimg.cxx b/svtools/source/urlobj/inetimg.cxx index 74b5beb1f728..36efa809fb4b 100644 --- a/svtools/source/urlobj/inetimg.cxx +++ b/svtools/source/urlobj/inetimg.cxx @@ -32,12 +32,12 @@ void INetImage::Write( SvStream& rOStm, SotClipboardFormatId nFormat ) const case SotClipboardFormatId::INET_IMAGE: { OUString sString( - aImageURL + OUStringLiteral1() + aTargetURL - + OUStringLiteral1() + aTargetFrame - + OUStringLiteral1() + aAlternateText - + OUStringLiteral1() + aImageURL + OUStringLiteral1(TOKEN_SEPARATOR) + aTargetURL + + OUStringLiteral1(TOKEN_SEPARATOR) + aTargetFrame + + OUStringLiteral1(TOKEN_SEPARATOR) + aAlternateText + + OUStringLiteral1(TOKEN_SEPARATOR) + OUString::number(aSizePixel.Width()) - + OUStringLiteral1() + + OUStringLiteral1(TOKEN_SEPARATOR) + OUString::number(aSizePixel.Height())); OString sOut(OUStringToOString(sString, diff --git a/svx/source/tbxctrls/layctrl.cxx b/svx/source/tbxctrls/layctrl.cxx index e2961a66e46b..102652f87cc5 100644 --- a/svx/source/tbxctrls/layctrl.cxx +++ b/svx/source/tbxctrls/layctrl.cxx @@ -307,7 +307,7 @@ void TableWindow::Paint(vcl::RenderContext& rRenderContext, const Rectangle&) // #i95350# force RTL output if (IsRTLEnabled()) - aText = OUStringLiteral1<0x202D>() + aText; + aText = OUStringLiteral1(0x202D) + aText; rRenderContext.DrawText(Point(nTextX, nTextY), aText); } diff --git a/sw/qa/core/uwriter.cxx b/sw/qa/core/uwriter.cxx index 2fafc7416386..e994fcbfbe27 100644 --- a/sw/qa/core/uwriter.cxx +++ b/sw/qa/core/uwriter.cxx @@ -377,7 +377,7 @@ void SwDocTest::testModelToViewHelperExpandFieldsExpandFootnoteReplaceMode() ExpandMode::ExpandFields | ExpandMode::ExpandFootnote | ExpandMode::ReplaceMode); OUString sViewText = aModelToViewHelper.getViewText(); CPPUNIT_ASSERT_EQUAL( - OUString("AAAAA BBBBB " + OUStringLiteral1() + " CCCCC " + OUStringLiteral1() + " DDDDD"), + OUString("AAAAA BBBBB " + OUStringLiteral1(CHAR_ZWSP) + " CCCCC " + OUStringLiteral1(CHAR_ZWSP) + " DDDDD"), sViewText); CPPUNIT_ASSERT_EQUAL(static_cast(2), aModelToViewHelper.getFootnotePositions().size()); @@ -421,7 +421,7 @@ void SwDocTest::testModelToViewHelperExpandFieldsHideInvisible() ModelToViewHelper aModelToViewHelper(*pTextNode, ExpandMode::HideInvisible); OUString sViewText = aModelToViewHelper.getViewText(); CPPUNIT_ASSERT_EQUAL( - OUString("AAAAA CCCCC " + OUStringLiteral1() + " DDDDD"), + OUString("AAAAA CCCCC " + OUStringLiteral1(CH_TXTATR_BREAKWORD) + " DDDDD"), sViewText); } @@ -432,7 +432,7 @@ void SwDocTest::testModelToViewHelperExpandFieldsHideRedlined() ModelToViewHelper aModelToViewHelper(*pTextNode, ExpandMode::HideDeletions); OUString sViewText = aModelToViewHelper.getViewText(); CPPUNIT_ASSERT_EQUAL( - OUString("AAAABB " + OUStringLiteral1() + " CCCCC " + OUStringLiteral1() + " DDDDD"), + OUString("AAAABB " + OUStringLiteral1(CH_TXTATR_BREAKWORD) + " CCCCC " + OUStringLiteral1(CH_TXTATR_BREAKWORD) + " DDDDD"), sViewText); } @@ -453,7 +453,7 @@ void SwDocTest::testModelToViewHelperExpandFieldsHideInvisibleExpandFootnoteRepl ExpandMode::ExpandFields | ExpandMode::HideInvisible | ExpandMode::ExpandFootnote | ExpandMode::ReplaceMode); OUString sViewText = aModelToViewHelper.getViewText(); CPPUNIT_ASSERT_EQUAL( - OUString("AAAAA CCCCC " + OUStringLiteral1() + " DDDDD"), + OUString("AAAAA CCCCC " + OUStringLiteral1(CHAR_ZWSP) + " DDDDD"), sViewText); CPPUNIT_ASSERT_EQUAL(static_cast(1), aModelToViewHelper.getFootnotePositions().size()); @@ -481,7 +481,7 @@ void SwDocTest::testModelToViewHelperExpandFieldsHideHideRedlinedExpandFootnoteR ExpandMode::ExpandFields | ExpandMode::HideDeletions | ExpandMode::ExpandFootnote | ExpandMode::ReplaceMode); OUString sViewText = aModelToViewHelper.getViewText(); CPPUNIT_ASSERT_EQUAL( - OUString("AAAABB " + OUStringLiteral1() + " CCCCC " + OUStringLiteral1() + " DDDDD"), + OUString("AAAABB " + OUStringLiteral1(CHAR_ZWSP) + " CCCCC " + OUStringLiteral1(CHAR_ZWSP) + " DDDDD"), sViewText); CPPUNIT_ASSERT_EQUAL(static_cast(2), aModelToViewHelper.getFootnotePositions().size()); @@ -523,7 +523,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() + " DDDDD")); + OUString("AAAACCCCC " + OUStringLiteral1(CHAR_ZWSP) + " DDDDD")); CPPUNIT_ASSERT_EQUAL(static_cast(1), aModelToViewHelper.getFootnotePositions().size()); CPPUNIT_ASSERT_EQUAL(static_cast(10), @@ -549,7 +549,7 @@ void SwDocTest::testModelToViewHelperExpandFieldsExpandFootnoteReplaceMode2() ExpandMode::ExpandFields | ExpandMode::ExpandFootnote | ExpandMode::ReplaceMode); OUString sViewText = aModelToViewHelper.getViewText(); CPPUNIT_ASSERT_EQUAL( - OUString("AAAAA" + OUStringLiteral1() + "CCCCC"), + OUString("AAAAA" + OUStringLiteral1(CHAR_ZWSP) + "CCCCC"), sViewText); CPPUNIT_ASSERT_EQUAL(static_cast(0), aModelToViewHelper.getFootnotePositions().size()); diff --git a/sw/qa/extras/uiwriter/uiwriter.cxx b/sw/qa/extras/uiwriter/uiwriter.cxx index 5f5e8339495b..b2ebfffca846 100644 --- a/sw/qa/extras/uiwriter/uiwriter.cxx +++ b/sw/qa/extras/uiwriter/uiwriter.cxx @@ -729,9 +729,9 @@ void SwUiWriterTest::testTdf98512() pWrtShell->SetMark(); pWrtShell->SttEndDoc(/*bStt=*/false); OUString const expected1( - OUStringLiteral1() + "foo" + OUStringLiteral1()); + OUStringLiteral1(CH_TXT_ATR_INPUTFIELDSTART) + "foo" + OUStringLiteral1(CH_TXT_ATR_INPUTFIELDEND)); OUString const expected2( - OUStringLiteral1() + "baz" + OUStringLiteral1() + OUStringLiteral1(CH_TXT_ATR_INPUTFIELDSTART) + "baz" + OUStringLiteral1(CH_TXT_ATR_INPUTFIELDEND) + expected1); CPPUNIT_ASSERT_EQUAL(expected2, pWrtShell->getShellCursor(false)->GetText()); sw::UndoManager& rUndoManager = pDoc->GetUndoManager(); @@ -1984,10 +1984,10 @@ void SwUiWriterTest::testTdf73660() { SwDoc* pDoc = createDoc(); SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell(); - OUString aData1 = "First" + OUStringLiteral1() + "Word"; - OUString aData2 = "Seco" + OUStringLiteral1() + "nd"; - OUString aData3 = OUStringLiteral1() + "Third"; - OUString aData4 = "Fourth" + OUStringLiteral1(); + 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 aData5 = "Fifth"; pWrtShell->Insert("We are inserting some text in the document to check the search feature "); pWrtShell->Insert(aData1 + " "); @@ -3534,7 +3534,7 @@ void SwUiWriterTest::testTdf96479() { // We want to verify the empty input text field in the bookmark static const OUString emptyInputTextField = - OUStringLiteral1() + OUStringLiteral1(); + OUStringLiteral1(CH_TXT_ATR_INPUTFIELDSTART) + OUStringLiteral1(CH_TXT_ATR_INPUTFIELDEND); SwDoc* pDoc = createDoc(); SwXTextDocument *pTextDoc = dynamic_cast(mxComponent.get()); diff --git a/sw/source/core/bastyp/calc.cxx b/sw/source/core/bastyp/calc.cxx index cba7c3cec371..6d12a7dc4bbf 100644 --- a/sw/source/core/bastyp/calc.cxx +++ b/sw/source/core/bastyp/calc.cxx @@ -1494,7 +1494,7 @@ OUString SwCalc::GetDBName(const OUString& rName) return rName.copy( 0, nPos ); } SwDBData aData = m_rDoc.GetDBData(); - return aData.sDataSource + OUStringLiteral1() + aData.sCommand; + return aData.sDataSource + OUStringLiteral1(DB_DELIM) + aData.sCommand; } namespace diff --git a/sw/source/core/crsr/crstrvl.cxx b/sw/source/core/crsr/crstrvl.cxx index 5c30d0b0b000..d9ec2180c893 100644 --- a/sw/source/core/crsr/crstrvl.cxx +++ b/sw/source/core/crsr/crstrvl.cxx @@ -2222,7 +2222,7 @@ bool SwCursorShell::SelectNxtPrvHyperlink( bool bNext ) OUString sText( pTextNd->GetExpandText( rAttr.GetStart(), *rAttr.GetEnd() - rAttr.GetStart() ) ); - sText = sText.replaceAll(OUStringLiteral1<0x0a>(), ""); + sText = sText.replaceAll(OUStringLiteral1(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 022b0553dcc2..7b7226dab204 100644 --- a/sw/source/core/doc/DocumentFieldsManager.cxx +++ b/sw/source/core/doc/DocumentFieldsManager.cxx @@ -65,8 +65,8 @@ namespace if( aDBData != aDocData ) { - sDBNumNm = aDBData.sDataSource + OUStringLiteral1() - + aDBData.sCommand + OUStringLiteral1(); + sDBNumNm = aDBData.sDataSource + OUStringLiteral1(DB_DELIM) + + aDBData.sCommand + OUStringLiteral1(DB_DELIM); } sDBNumNm += SwFieldType::GetTypeStr(TYP_DBSETNUMBERFLD); diff --git a/sw/source/core/doc/acmplwrd.cxx b/sw/source/core/doc/acmplwrd.cxx index 89acde7df587..26ba49bcb908 100644 --- a/sw/source/core/doc/acmplwrd.cxx +++ b/sw/source/core/doc/acmplwrd.cxx @@ -244,8 +244,8 @@ bool SwAutoCompleteWord::InsertWord( const OUString& rWord, SwDoc& rDoc ) return false; } - OUString aNewWord = rWord.replaceAll(OUStringLiteral1(), "") - .replaceAll(OUStringLiteral1(), ""); + OUString aNewWord = rWord.replaceAll(OUStringLiteral1(CH_TXTATR_INWORD), "") + .replaceAll(OUStringLiteral1(CH_TXTATR_BREAKWORD), ""); pImpl->AddDocument(rDoc); bool bRet = false; diff --git a/sw/source/core/doc/docfld.cxx b/sw/source/core/doc/docfld.cxx index 66b6b01ab9f9..d450dcd5d647 100644 --- a/sw/source/core/doc/docfld.cxx +++ b/sw/source/core/doc/docfld.cxx @@ -418,8 +418,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() - + rData.sCommand + OUStringLiteral1() + return rData.sDataSource + OUStringLiteral1(DB_DELIM) + + rData.sCommand + OUStringLiteral1(DB_DELIM) + OUString::number(rData.nCommandType); } @@ -515,7 +515,7 @@ void SwDoc::GetAllDBNames( std::vector& rAllDBNames ) const SwDSParams_t& rArr = pMgr->GetDSParamArray(); for (const auto& pParam : rArr) { - rAllDBNames.push_back(pParam->sDataSource + OUStringLiteral1() + pParam->sCommand); + rAllDBNames.push_back(pParam->sDataSource + OUStringLiteral1(DB_DELIM) + pParam->sCommand); } #endif } @@ -543,7 +543,7 @@ std::vector& SwDoc::FindUsedDBs( const std::vector& rAllDBNa const sal_Int32 nEndPos = sFormula.indexOf('.', nPos); if( nEndPos>=0 ) { - rUsedDBNames.push_back(sItem + OUStringLiteral1() + sFormula.copy( nPos, nEndPos - nPos )); + rUsedDBNames.push_back(sItem + OUStringLiteral1(DB_DELIM) + sFormula.copy( nPos, nEndPos - nPos )); } } } @@ -691,7 +691,7 @@ namespace inline OUString lcl_CutOffDBCommandType(const OUString& rName) { - return rName.replaceFirst(OUStringLiteral1(), ".").getToken(0, DB_DELIM); + return rName.replaceFirst(OUStringLiteral1(DB_DELIM), ".").getToken(0, DB_DELIM); } } diff --git a/sw/source/core/doc/doctxm.cxx b/sw/source/core/doc/doctxm.cxx index 7585c2d400ec..5ac636757cf3 100644 --- a/sw/source/core/doc/doctxm.cxx +++ b/sw/source/core/doc/doctxm.cxx @@ -1273,7 +1273,7 @@ void SwTOXBaseSection::UpdateSequence( const SwTextNode* pOwnChapterNode ) { const SwSetExpField& rSeqField = dynamic_cast(*(pFormatField->GetField())); const OUString sName = GetSequenceName() - + OUStringLiteral1() + + OUStringLiteral1(cSequenceMarkSeparator) + OUString::number( rSeqField.GetSeqNumber() ); SwTOXPara * pNew = new SwTOXPara( rTextNode, nsSwTOXElement::TOX_SEQUENCE, 1, sName ); // set indexes if the number or the reference text are to be displayed diff --git a/sw/source/core/docnode/ndsect.cxx b/sw/source/core/docnode/ndsect.cxx index 36e1e846b5d7..306f15e23114 100644 --- a/sw/source/core/docnode/ndsect.cxx +++ b/sw/source/core/docnode/ndsect.cxx @@ -682,7 +682,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() + OUStringLiteral1(); + OUString sCompareString = OUStringLiteral1(sfx2::cTokenSeparator) + OUStringLiteral1(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 34e1ef2d93c0..5aa3b5c3c49d 100644 --- a/sw/source/core/docnode/section.cxx +++ b/sw/source/core/docnode/section.cxx @@ -562,8 +562,8 @@ OUString SwSection::GetLinkFileName() const sfx2::LinkManager::GetDisplayNames( m_RefLink, nullptr, &sTmp, &sRange, &sFilter )) { - sTmp += OUStringLiteral1() + sFilter - + OUStringLiteral1() + sRange; + sTmp += OUStringLiteral1(sfx2::cTokenSeparator) + sFilter + + OUStringLiteral1(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 0cf4b47652c9..61a87aa71012 100644 --- a/sw/source/core/edit/autofmt.cxx +++ b/sw/source/core/edit/autofmt.cxx @@ -764,12 +764,12 @@ sal_uInt16 SwAutoFormat::GetDigitLevel( const SwTextNode& rNd, sal_Int32& rPos, } if( pNumTypes ) - *pNumTypes += OUStringLiteral1<'0' + SVX_NUM_ARABIC>(); + *pNumTypes += OUStringLiteral1('0' + SVX_NUM_ARABIC); eScan = eScan | CHG; } else if( pNumTypes && !(eScan & DIGIT) ) - *pNumTypes += OUStringLiteral1<'0' + SVX_NUM_ARABIC>(); + *pNumTypes += OUStringLiteral1('0' + SVX_NUM_ARABIC); eScan &= ~DELIM; // remove Delim if( 0 != (eScan & ~CHG) && DIGIT != (eScan & ~CHG)) diff --git a/sw/source/core/edit/editsh.cxx b/sw/source/core/edit/editsh.cxx index 83cc9dfd9793..7fa98e0be980 100644 --- a/sw/source/core/edit/editsh.cxx +++ b/sw/source/core/edit/editsh.cxx @@ -673,7 +673,7 @@ void SwEditShell::GetINetAttrs( SwGetINetAttrs& rArr ) OUString sText( pTextNd->GetExpandText( rAttr.GetStart(), *rAttr.GetEnd() - rAttr.GetStart() ) ); - sText = sText.replaceAll(OUStringLiteral1<0x0a>(), ""); + sText = sText.replaceAll(OUStringLiteral1(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 6928e48494ad..4d0c46eb6e83 100644 --- a/sw/source/core/edit/edlingu.cxx +++ b/sw/source/core/edit/edlingu.cxx @@ -861,8 +861,8 @@ uno::Reference< XSpellAlternatives > if( pWrong->InWrongWord(nBegin,nLen) && !pNode->IsSymbol(nBegin) ) { const OUString aText(pNode->GetText().copy(nBegin, nLen)); - OUString aWord = aText.replaceAll(OUStringLiteral1(), "") - .replaceAll(OUStringLiteral1(), ""); + OUString aWord = aText.replaceAll(OUStringLiteral1(CH_TXTATR_BREAKWORD), "") + .replaceAll(OUStringLiteral1(CH_TXTATR_INWORD), ""); uno::Reference< XSpellChecker1 > xSpell( ::GetSpellChecker() ); if( xSpell.is() ) diff --git a/sw/source/core/fields/cellfml.cxx b/sw/source/core/fields/cellfml.cxx index bbb33f9f611b..959b87109e04 100644 --- a/sw/source/core/fields/cellfml.cxx +++ b/sw/source/core/fields/cellfml.cxx @@ -352,7 +352,7 @@ void SwTableFormula::MakeFormula_( const SwTable& rTable, OUString& rNewStr, if ( pTableBox->getRowSpan() >= 1 ) { if( bDelim ) - rNewStr += OUStringLiteral1(); + rNewStr += OUStringLiteral1(cListDelim); bDelim = true; rNewStr += pCalcPara->rCalc.GetStrResult( pTableBox->GetValue( *pCalcPara ), false ); @@ -858,12 +858,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() + OUString::number( nBox ) - + OUStringLiteral1() + OUString::number( nLine ); + sTmp = OUStringLiteral1(cRelIdentifier) + OUString::number( nBox ) + + OUStringLiteral1(cRelSeparator) + OUString::number( nLine ); if (!sCpy.isEmpty()) { - sTmp += OUStringLiteral1() + sCpy; + sTmp += OUStringLiteral1(cRelSeparator) + sCpy; } } diff --git a/sw/source/core/fields/dbfld.cxx b/sw/source/core/fields/dbfld.cxx index 35352daad596..85db205c400c 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_DBTrennConv(const OUString& aContent) { - return aContent.replaceAll(OUStringLiteral1(), "."); + return aContent.replaceAll(OUStringLiteral1(DB_DELIM), "."); } // database field type @@ -62,9 +62,9 @@ SwDBFieldType::SwDBFieldType(SwDoc* pDocPtr, const OUString& rNam, const SwDBDat if(!aDBData.sDataSource.isEmpty() || !aDBData.sCommand.isEmpty()) { sName = aDBData.sDataSource - + OUStringLiteral1() + + OUStringLiteral1(DB_DELIM) + aDBData.sCommand - + OUStringLiteral1() + + OUStringLiteral1(DB_DELIM) + sName; } } @@ -237,9 +237,9 @@ OUString SwDBField::GetFieldName() const if (sContent.getLength() > 1) { - sContent += OUStringLiteral1() + sContent += OUStringLiteral1(DB_DELIM) + rDBName.getToken(1, DB_DELIM) - + OUStringLiteral1() + + OUStringLiteral1(DB_DELIM) + rDBName.getToken(2, DB_DELIM); } return lcl_DBTrennConv(sContent); @@ -477,7 +477,7 @@ OUString SwDBNameInfField::GetFieldName() const { sStr += ":" + aDBData.sDataSource - + OUStringLiteral1() + + OUStringLiteral1(DB_DELIM) + aDBData.sCommand; } return lcl_DBTrennConv(sStr); diff --git a/sw/source/core/fields/ddefld.cxx b/sw/source/core/fields/ddefld.cxx index 0e1f08a0f500..69493290342d 100644 --- a/sw/source/core/fields/ddefld.cxx +++ b/sw/source/core/fields/ddefld.cxx @@ -367,7 +367,7 @@ bool SwDDEFieldType::PutValue( const uno::Any& rVal, sal_uInt16 nWhichId ) rVal >>= sToken; } sNewCmd += (i < 2) - ? sToken + OUStringLiteral1() : sToken; + ? sToken + OUStringLiteral1(sfx2::cTokenSeparator) : sToken; } SetCmd( sNewCmd ); } diff --git a/sw/source/core/fields/docufld.cxx b/sw/source/core/fields/docufld.cxx index 2e4d8f333f89..ba7ff9318505 100644 --- a/sw/source/core/fields/docufld.cxx +++ b/sw/source/core/fields/docufld.cxx @@ -1548,7 +1548,7 @@ OUString SwHiddenTextField::GetDBName(const OUString& rName, SwDoc *pDoc) } SwDBData aData = pDoc->GetDBData(); - return aData.sDataSource + OUStringLiteral1() + aData.sCommand; + return aData.sDataSource + OUStringLiteral1(DB_DELIM) + aData.sCommand; } // field type for line height 0 diff --git a/sw/source/core/fields/reffld.cxx b/sw/source/core/fields/reffld.cxx index f91382656ce5..bd1d359e3658 100644 --- a/sw/source/core/fields/reffld.cxx +++ b/sw/source/core/fields/reffld.cxx @@ -398,7 +398,7 @@ void SwGetRefField::UpdateField( const SwTextField* pFieldTextAttr ) // remove all special characters (replace them with blanks) if( !sText.isEmpty() ) { - sText = sText.replaceAll(OUStringLiteral1<0xad>(), ""); + sText = sText.replaceAll(OUStringLiteral1(0xad), ""); OUStringBuffer aBuf(sText); const sal_Int32 l = aBuf.getLength(); for (sal_Int32 i=0; iGetFrameFormat()->GetTableBoxFormula(), aCells )) break; else if( USHRT_MAX != nBoxW ) - sFields = OUStringLiteral1() + sFields; + sFields = OUStringLiteral1(cListDelim) + sFields; else break; } @@ -2346,7 +2346,7 @@ bool SwFEShell::GetAutoSum( OUString& rFormula ) const } } else - sFields = OUStringLiteral1() + sFields; + sFields = OUStringLiteral1(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 7659ef06de30..9614e039fbf0 100644 --- a/sw/source/core/graphic/ndgrf.cxx +++ b/sw/source/core/graphic/ndgrf.cxx @@ -641,8 +641,8 @@ bool SwGrfNode::GetFileFilterNms( OUString* pFileNm, OUString* pFilterNm ) const if( sfx2::LinkManager::GetDisplayNames( refLink, &sApp, &sTopic, &sItem ) ) { - *pFileNm = sApp + OUStringLiteral1() - + sTopic + OUStringLiteral1() + *pFileNm = sApp + OUStringLiteral1(sfx2::cTokenSeparator) + + sTopic + OUStringLiteral1(sfx2::cTokenSeparator) + sItem; *pFilterNm = "DDE"; bRet = true; diff --git a/sw/source/core/tox/tox.cxx b/sw/source/core/tox/tox.cxx index 70f58388125f..83d42b8074da 100644 --- a/sw/source/core/tox/tox.cxx +++ b/sw/source/core/tox/tox.cxx @@ -620,9 +620,9 @@ OUString SwFormToken::GetString() const + OUString::number( nOutlineLevel ); break; case TOKEN_TEXT: - sData += OUStringLiteral1() - + sText.replaceAll(OUStringLiteral1(), "") - + OUStringLiteral1(); + sData += OUStringLiteral1(TOX_STYLE_DELIMITER) + + sText.replaceAll(OUStringLiteral1(TOX_STYLE_DELIMITER), "") + + OUStringLiteral1(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 955fd898e6fc..65393a506fa6 100644 --- a/sw/source/core/tox/txmsrt.cxx +++ b/sw/source/core/tox/txmsrt.cxx @@ -587,7 +587,7 @@ OUString SwTOXPara::GetURL() const SwFrameFormat* pFly = pNd->GetFlyFormat(); if( pFly ) { - aText = "#" + pFly->GetName() + OUStringLiteral1(); + aText = "#" + pFly->GetName() + OUStringLiteral1(cMarkSeparator); const sal_Char* pStr; switch( eType ) { @@ -603,7 +603,7 @@ OUString SwTOXPara::GetURL() const break; case nsSwTOXElement::TOX_SEQUENCE: { - aText = "#" + m_sSequenceName + OUStringLiteral1() + aText = "#" + m_sSequenceName + OUStringLiteral1(cMarkSeparator) + "sequence"; } break; @@ -655,7 +655,7 @@ OUString SwTOXTable::GetURL() const if ( sName.isEmpty() ) return OUString(); - return "#" + sName + OUStringLiteral1() + "table"; + return "#" + sName + OUStringLiteral1(cMarkSeparator) + "table"; } SwTOXAuthority::SwTOXAuthority( const SwContentNode& rNd, diff --git a/sw/source/core/txtnode/thints.cxx b/sw/source/core/txtnode/thints.cxx index f4094c574a44..b53efe506090 100644 --- a/sw/source/core/txtnode/thints.cxx +++ b/sw/source/core/txtnode/thints.cxx @@ -1508,8 +1508,8 @@ bool SwTextNode::InsertHint( SwTextAttr * const pAttr, const SetAttrMode nMode ) if( !(SetAttrMode::NOTXTATRCHR & nMode) ) { SwIndex aIdx( this, pAttr->GetStart() ); - const OUString aContent = OUStringLiteral1() - + pTextInputField->GetFieldContent() + OUStringLiteral1(); + const OUString aContent = OUStringLiteral1(CH_TXT_ATR_INPUTFIELDSTART) + + pTextInputField->GetFieldContent() + OUStringLiteral1(CH_TXT_ATR_INPUTFIELDEND); InsertText( aContent, aIdx, nInsertFlags ); sal_Int32* const pEnd(pAttr->GetEnd()); diff --git a/sw/source/core/unocore/unofield.cxx b/sw/source/core/unocore/unofield.cxx index dcd1a2831552..75e0a1fb6907 100644 --- a/sw/source/core/unocore/unofield.cxx +++ b/sw/source/core/unocore/unofield.cxx @@ -749,8 +749,8 @@ throw (beans::UnknownPropertyException, beans::PropertyVetoException, if (m_pImpl->m_sParam1.isEmpty()) { m_pImpl->m_sParam1 - = OUStringLiteral1() - + OUStringLiteral1(); + = OUStringLiteral1(sfx2::cTokenSeparator) + + OUStringLiteral1(sfx2::cTokenSeparator); } OUString sTmp; rValue >>= sTmp; @@ -2781,7 +2781,7 @@ bool SwXTextFieldMasters::getInstanceName( break; case RES_DBFLD: - sField = "DataBase." + rFieldType.GetName().replaceAll(OUStringLiteral1(), "."); + sField = "DataBase." + rFieldType.GetName().replaceAll(OUStringLiteral1(DB_DELIM), "."); break; case RES_AUTHORITY: diff --git a/sw/source/core/unocore/unoidx.cxx b/sw/source/core/unocore/unoidx.cxx index 20e8bd602a2c..5597721c4d33 100644 --- a/sw/source/core/unocore/unoidx.cxx +++ b/sw/source/core/unocore/unoidx.cxx @@ -2690,7 +2690,7 @@ throw (lang::IllegalArgumentException, lang::IndexOutOfBoundsException, { if(i) { - sSetStyles += OUStringLiteral1(); + sSetStyles += OUStringLiteral1(TOX_STYLE_DELIMITER); } SwStyleNameMapper::FillUIName(pStyles[i], aString, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL, true); diff --git a/sw/source/core/unocore/unosect.cxx b/sw/source/core/unocore/unosect.cxx index 8482e2690934..64ffaebf29ee 100644 --- a/sw/source/core/unocore/unosect.cxx +++ b/sw/source/core/unocore/unosect.cxx @@ -340,9 +340,9 @@ throw (lang::IllegalArgumentException, uno::RuntimeException, std::exception) 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() + + OUStringLiteral1(sfx2::cTokenSeparator) + m_pImpl->m_pProps->m_sSectionFilter + - OUStringLiteral1() + + OUStringLiteral1(sfx2::cTokenSeparator) + m_pImpl->m_pProps->m_sSectionRegion); aSect.SetHidden(m_pImpl->m_pProps->m_bHidden); @@ -616,7 +616,7 @@ throw (beans::UnknownPropertyException, beans::PropertyVetoException, if (!m_pProps->m_bDDE) { m_pProps->m_sLinkFileName = - OUStringLiteral1() + OUStringLiteral1(); + OUStringLiteral1(sfx2::cTokenSeparator) + OUStringLiteral1(sfx2::cTokenSeparator); m_pProps->m_bDDE = true; } m_pProps->m_sLinkFileName = comphelper::string::setToken( @@ -628,7 +628,7 @@ throw (beans::UnknownPropertyException, beans::PropertyVetoException, OUString sLinkFileName(pSectionData->GetLinkFileName()); if (pSectionData->GetType() != DDE_LINK_SECTION) { - sLinkFileName = OUStringLiteral1() + OUStringLiteral1(); + sLinkFileName = OUStringLiteral1(sfx2::cTokenSeparator) + OUStringLiteral1(sfx2::cTokenSeparator); pSectionData->SetType(DDE_LINK_SECTION); } sLinkFileName = comphelper::string::setToken(sLinkFileName, @@ -682,8 +682,8 @@ throw (beans::UnknownPropertyException, beans::PropertyVetoException, aLink.FileURL, URIHelper::GetMaybeFileHdl()) : OUString()); const OUString sFileName( - sTmp + OUStringLiteral1() + - aLink.FilterName + OUStringLiteral1() + + sTmp + OUStringLiteral1(sfx2::cTokenSeparator) + + aLink.FilterName + OUStringLiteral1(sfx2::cTokenSeparator) + pSectionData->GetLinkFileName().getToken(2, sfx2::cTokenSeparator)); pSectionData->SetLinkFileName(sFileName); if (sFileName.getLength() < 3) @@ -713,7 +713,7 @@ throw (beans::UnknownPropertyException, beans::PropertyVetoException, for (sal_Int32 i = comphelper::string::getTokenCount(sSectLink, sfx2::cTokenSeparator); i < 3; ++i) { - sSectLink += OUStringLiteral1(); + sSectLink += OUStringLiteral1(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 b4554fe39b1f..4c0037a992c7 100644 --- a/sw/source/filter/ascii/ascatr.cxx +++ b/sw/source/filter/ascii/ascatr.cxx @@ -204,7 +204,7 @@ static Writer& OutASC_SwTextNode( Writer& rWrt, SwContentNode& rNode ) { OUString aOutStr( aStr.copy( nStrPos, nNextAttr - nStrPos ) ); if ( !bExportSoftHyphens ) - aOutStr = aOutStr.replaceAll(OUStringLiteral1(), ""); + aOutStr = aOutStr.replaceAll(OUStringLiteral1(CHAR_SOFTHYPHEN), ""); rWrt.Strm().WriteUnicodeOrByteText( aOutStr ); } diff --git a/sw/source/filter/html/htmlsect.cxx b/sw/source/filter/html/htmlsect.cxx index bfd284f2e27b..c8899324b606 100644 --- a/sw/source/filter/html/htmlsect.cxx +++ b/sw/source/filter/html/htmlsect.cxx @@ -288,7 +288,7 @@ void SwHTMLParser::NewDivision( int nToken ) else { aURL = URIHelper::SmartRel2Abs(INetURLObject( m_sBaseURL ), aHRef.copy( 0, nPos ), Link(), false ) - + OUStringLiteral1(); + + OUStringLiteral1(sfx2::cTokenSeparator); if( nPos2 == -1 ) { aURL += aHRef.copy( nPos+1 ); @@ -296,7 +296,7 @@ void SwHTMLParser::NewDivision( int nToken ) else { aURL += aHRef.copy( nPos+1, nPos2 - (nPos+1) ) - + OUStringLiteral1() + + OUStringLiteral1(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 b85cb22125dd..741dd6fe80a7 100644 --- a/sw/source/filter/html/wrthtml.cxx +++ b/sw/source/filter/html/wrthtml.cxx @@ -1177,7 +1177,7 @@ void SwHTMLWriter::OutImplicitMark( const OUString& rMark, { if( !rMark.isEmpty() && !m_aImplicitMarks.empty() ) { - OUString sMark(rMark + OUStringLiteral1() + OUString::createFromAscii(pMarkType)); + OUString sMark(rMark + OUStringLiteral1(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 630f82e444da..2f77017756ee 100644 --- a/sw/source/filter/ww8/docxattributeoutput.cxx +++ b/sw/source/filter/ww8/docxattributeoutput.cxx @@ -6091,7 +6091,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 == OUStringLiteral1(0) && nNumberingType == SVX_NUM_CHAR_SPECIAL ) { m_pSerializer->singleElementNS( XML_w, XML_lvlText, FSNS( XML_w, XML_val ), "", FSEND ); } diff --git a/sw/source/filter/ww8/ww8atr.cxx b/sw/source/filter/ww8/ww8atr.cxx index 79123eaded79..106c6c5a930b 100644 --- a/sw/source/filter/ww8/ww8atr.cxx +++ b/sw/source/filter/ww8/ww8atr.cxx @@ -2537,7 +2537,7 @@ void AttributeOutputBase::TextField( const SwFormatField& rField ) SwDBData aData = GetExport().m_pDoc->GetDBData(); const OUString sStr = FieldString(ww::eDATABASE) + aData.sDataSource - + OUStringLiteral1() + + OUStringLiteral1(DB_DELIM) + aData.sCommand; GetExport().OutputField(pField, ww::eDATABASE, sStr); } diff --git a/sw/source/filter/ww8/ww8par5.cxx b/sw/source/filter/ww8/ww8par5.cxx index cbb0708d6486..aef81a911178 100644 --- a/sw/source/filter/ww8/ww8par5.cxx +++ b/sw/source/filter/ww8/ww8par5.cxx @@ -2427,8 +2427,8 @@ eF_ResT SwWW8ImplReader::Read_F_IncludeText( WW8FieldDesc* /*pF*/, OUString& rSt { // Bereich aus Quelle ( kein Switch ) ? ConvertUFName(aBook); - aPara += OUStringLiteral1() - + OUStringLiteral1() + aBook; + aPara += OUStringLiteral1(sfx2::cTokenSeparator) + + OUStringLiteral1(sfx2::cTokenSeparator) + aBook; } /* @@ -2824,7 +2824,7 @@ static void lcl_toxMatchTSwitch(SwWW8ImplReader& rReader, SwTOXBase& rBase, OUString sStyles( rBase.GetStyleNames( nLevel ) ); if( !sStyles.isEmpty() ) - sStyles += OUStringLiteral1(); + sStyles += OUStringLiteral1(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 22c677b630dd..b8c85f312466 100644 --- a/sw/source/filter/xml/xmltbli.cxx +++ b/sw/source/filter/xml/xmltbli.cxx @@ -1173,9 +1173,9 @@ static SwDDEFieldType* lcl_GetDDEFieldType(SwXMLDDETableContext_Impl* pContext, { // make command string const OUString sCommand(pContext->GetDDEApplication() - + OUStringLiteral1() + + OUStringLiteral1(sfx2::cTokenSeparator) + pContext->GetDDEItem() - + OUStringLiteral1() + + OUStringLiteral1(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 cea9bd2aef4d..1aa7803b6ad1 100644 --- a/sw/source/ui/dbui/dbinsdlg.cxx +++ b/sw/source/ui/dbui/dbinsdlg.cxx @@ -599,7 +599,7 @@ IMPL_LINK_TYPED( SwInsertDBColAutoPilot, TableToFromHdl, Button*, pButton, void // first delete the existing selection aStr = aStr.replaceAt( nPos, nSel, "" ); - aField = OUStringLiteral1() + aField + OUStringLiteral1(); + aField = OUStringLiteral1(cDBFieldStart) + aField + OUStringLiteral1(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 79af0846c5a5..9745e49e2270 100644 --- a/sw/source/ui/dbui/mmlayoutpage.cxx +++ b/sw/source/ui/dbui/mmlayoutpage.cxx @@ -318,10 +318,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() - + rData.sCommand + OUStringLiteral1()); + OUString sDBName(rData.sDataSource + OUStringLiteral1(DB_DELIM) + + rData.sCommand + OUStringLiteral1(DB_DELIM)); const OUString sDatabaseConditionPrefix(sDBName.replace(DB_DELIM, '.')); - sDBName += OUString::number(rData.nCommandType) + OUStringLiteral1(); + sDBName += OUString::number(rData.nCommandType) + OUStringLiteral1(DB_DELIM); // if only the country is in an address line the // paragraph has to be hidden depending on the @@ -510,9 +510,9 @@ void SwMailMergeLayoutPage::InsertGreeting(SwWrtShell& rShell, SwMailMergeConfig const OUString sConditionBase("[" + sCommonBase + sGenderColumn + "]"); const OUString sNameColumnBase("[" + sCommonBase + sNameColumn + "]"); - const OUString sDBName(rData.sDataSource + OUStringLiteral1() - + rData.sCommand + OUStringLiteral1() - + OUString::number(rData.nCommandType) + OUStringLiteral1()); + const OUString sDBName(rData.sDataSource + OUStringLiteral1(DB_DELIM) + + rData.sCommand + OUStringLiteral1(DB_DELIM) + + OUString::number(rData.nCommandType) + OUStringLiteral1(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 2e39a69b396c..12b9f8c6da5f 100644 --- a/sw/source/ui/dialog/ascfldlg.cxx +++ b/sw/source/ui/dialog/ascfldlg.cxx @@ -292,7 +292,7 @@ void SwAsciiFilterDlg::FillOptions( SwAsciiOptions& rOptions ) if( -1 != nEnd ) GetExtraData() = GetExtraData().replaceAt( nStt, nEnd - nStt + 1, "" ); } - GetExtraData() += sFindNm + sData + OUStringLiteral1(); + GetExtraData() += sFindNm + sData + OUStringLiteral1(cDialogExtraDataClose); } } diff --git a/sw/source/ui/dialog/uiregionsw.cxx b/sw/source/ui/dialog/uiregionsw.cxx index e5332fa0fbbb..c15dd03c815b 100644 --- a/sw/source/ui/dialog/uiregionsw.cxx +++ b/sw/source/ui/dialog/uiregionsw.cxx @@ -210,11 +210,11 @@ void SectRepr::SetFile( const OUString& rFile ) if( !rFile.isEmpty() || !sSub.isEmpty() ) { - sNewFile += OUStringLiteral1(); + sNewFile += OUStringLiteral1(sfx2::cTokenSeparator); if( !rFile.isEmpty() ) // Filter only with FileName sNewFile += sOldFileName.getToken( 1, sfx2::cTokenSeparator ); - sNewFile += OUStringLiteral1() + sSub; + sNewFile += OUStringLiteral1(sfx2::cTokenSeparator) + sSub; } m_SectionData.SetLinkFileName( sNewFile ); @@ -237,10 +237,10 @@ void SectRepr::SetFilter( const OUString& rFilter ) const OUString sSub( sOldFileName.getToken( 2, sfx2::cTokenSeparator ) ); if( !sFile.isEmpty() ) - sNewFile = sFile + OUStringLiteral1() + - rFilter + OUStringLiteral1() + sSub; + sNewFile = sFile + OUStringLiteral1(sfx2::cTokenSeparator) + + rFilter + OUStringLiteral1(sfx2::cTokenSeparator) + sSub; else if( !sSub.isEmpty() ) - sNewFile = OUStringLiteral1() + OUStringLiteral1() + sSub; + sNewFile = OUStringLiteral1(sfx2::cTokenSeparator) + OUStringLiteral1(sfx2::cTokenSeparator) + sSub; m_SectionData.SetLinkFileName( sNewFile ); @@ -259,8 +259,8 @@ void SectRepr::SetSubRegion(const OUString& rSubRegion) const OUString sFilter( sLinkFileName.getToken( 0, sfx2::cTokenSeparator, n ) ); if( !rSubRegion.isEmpty() || !sOldFileName.isEmpty() ) - sNewFile = sOldFileName + OUStringLiteral1() + - sFilter + OUStringLiteral1() + rSubRegion; + sNewFile = sOldFileName + OUStringLiteral1(sfx2::cTokenSeparator) + + sFilter + OUStringLiteral1(sfx2::cTokenSeparator) + rSubRegion; m_SectionData.SetLinkFileName( sNewFile ); @@ -285,8 +285,8 @@ OUString SectRepr::GetFile() const if (DDE_LINK_SECTION == m_SectionData.GetType()) { sal_Int32 n = 0; - return sLinkFile.replaceFirst( OUStringLiteral1(), " ", &n ) - .replaceFirst( OUStringLiteral1(), " ", &n ); + return sLinkFile.replaceFirst( OUStringLiteral1(sfx2::cTokenSeparator), " ", &n ) + .replaceFirst( OUStringLiteral1(sfx2::cTokenSeparator), " ", &n ); } return INetURLObject::decode( sLinkFile.getToken( 0, sfx2::cTokenSeparator ), INetURLObject::DECODE_UNAMBIGUOUS ); @@ -1144,10 +1144,10 @@ IMPL_LINK_TYPED( SwEditRegionDlg, FileNameHdl, Edit&, rEdit, void ) { OUString sLink( SwSectionData::CollapseWhiteSpaces(rEdit.GetText()) ); sal_Int32 nPos = 0; - sLink = sLink.replaceFirst( " ", OUStringLiteral1(), &nPos ); + sLink = sLink.replaceFirst( " ", OUStringLiteral1(sfx2::cTokenSeparator), &nPos ); if (nPos>=0) { - sLink = sLink.replaceFirst( " ", OUStringLiteral1(), &nPos ); + sLink = sLink.replaceFirst( " ", OUStringLiteral1(sfx2::cTokenSeparator), &nPos ); } pSectRepr->GetSectionData().SetLinkFileName( sLink ); @@ -1619,10 +1619,10 @@ bool SwInsertSectionTabPage::FillItemSet( SfxItemSet* ) { aLinkFile = SwSectionData::CollapseWhiteSpaces(sFileName); sal_Int32 nPos = 0; - aLinkFile = aLinkFile.replaceFirst( " ", OUStringLiteral1(), &nPos ); + aLinkFile = aLinkFile.replaceFirst( " ", OUStringLiteral1(sfx2::cTokenSeparator), &nPos ); if (nPos>=0) { - aLinkFile = aLinkFile.replaceFirst( " ", OUStringLiteral1(), &nPos ); + aLinkFile = aLinkFile.replaceFirst( " ", OUStringLiteral1(sfx2::cTokenSeparator), &nPos ); } } else @@ -1638,8 +1638,8 @@ bool SwInsertSectionTabPage::FillItemSet( SfxItemSet* ) aSection.SetLinkFilePassword( m_sFilePasswd ); } - aLinkFile += OUStringLiteral1() + m_sFilterName - + OUStringLiteral1() + sSubRegion; + aLinkFile += OUStringLiteral1(sfx2::cTokenSeparator) + m_sFilterName + + OUStringLiteral1(sfx2::cTokenSeparator) + sSubRegion; } aSection.SetLinkFileName(aLinkFile); diff --git a/sw/source/ui/envelp/envlop1.cxx b/sw/source/ui/envelp/envlop1.cxx index 1c9d34d38007..0188619ef4a4 100644 --- a/sw/source/ui/envelp/envlop1.cxx +++ b/sw/source/ui/envelp/envlop1.cxx @@ -226,7 +226,7 @@ SwEnvPage::SwEnvPage(vcl::Window* pParent, const SfxItemSet& rSet) m_pPreview->SetBorderStyle( WindowBorderStyle::MONO ); SwDBData aData = pSh->GetDBData(); - sActDBName = aData.sDataSource + OUStringLiteral1() + aData.sCommand; + sActDBName = aData.sDataSource + OUStringLiteral1(DB_DELIM) + aData.sCommand; InitDatabaseBox(); } @@ -256,7 +256,7 @@ IMPL_LINK_TYPED( SwEnvPage, DatabaseHdl, ListBox&, rListBox, void ) { sActDBName = rListBox.GetSelectEntry(); pSh->GetDBManager()->GetTableNames(m_pTableLB, sActDBName); - sActDBName += OUStringLiteral1(); + sActDBName += OUStringLiteral1(DB_DELIM); } else { diff --git a/sw/source/ui/fldui/changedb.cxx b/sw/source/ui/fldui/changedb.cxx index 32a69db38ebd..bdcbad03dc0b 100644 --- a/sw/source/ui/fldui/changedb.cxx +++ b/sw/source/ui/fldui/changedb.cxx @@ -192,7 +192,7 @@ void SwChangeDBDlg::UpdateFields() if( m_pUsedDBTLB->GetParent( pEntry )) { OUString sTmp(m_pUsedDBTLB->GetEntryText( m_pUsedDBTLB->GetParent( pEntry )) + - OUStringLiteral1() + m_pUsedDBTLB->GetEntryText( pEntry ) + OUStringLiteral1() + + OUStringLiteral1(DB_DELIM) + m_pUsedDBTLB->GetEntryText( pEntry ) + OUStringLiteral1(DB_DELIM) + OUString::number((int)reinterpret_cast(pEntry->GetUserData()))); aDBNames.push_back(sTmp); } @@ -205,9 +205,9 @@ void SwChangeDBDlg::UpdateFields() sal_Bool bIsTable = false; const OUString DBName(m_pAvailDBTLB->GetDBName(sTableName, sColumnName, &bIsTable)); const OUString sTemp = DBName - + OUStringLiteral1() + + OUStringLiteral1(DB_DELIM) + sTableName - + OUStringLiteral1() + + OUStringLiteral1(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 cdd2cd71f839..a64ec9a60cec 100644 --- a/sw/source/ui/fldui/flddb.cxx +++ b/sw/source/ui/fldui/flddb.cxx @@ -219,14 +219,14 @@ bool SwFieldDBPage::FillItemSet(SfxItemSet* ) sal_uInt16 nSubType = 0; OUString sDBName = aData.sDataSource - + OUStringLiteral1() + + OUStringLiteral1(DB_DELIM) + aData.sCommand - + OUStringLiteral1() + + OUStringLiteral1(DB_DELIM) + OUString::number(aData.nCommandType) - + OUStringLiteral1(); + + OUStringLiteral1(DB_DELIM); if (!sColumnName.isEmpty()) { - sDBName += sColumnName + OUStringLiteral1(); + sDBName += sColumnName + OUStringLiteral1(DB_DELIM); } OUString aName = sDBName + m_pConditionED->GetText(); diff --git a/sw/source/ui/fldui/fldfunc.cxx b/sw/source/ui/fldui/fldfunc.cxx index 5e9713324f39..b5c79b24ea21 100644 --- a/sw/source/ui/fldui/fldfunc.cxx +++ b/sw/source/ui/fldui/fldfunc.cxx @@ -575,7 +575,7 @@ bool SwFieldFuncPage::FillItemSet(SfxItemSet* ) for(sal_Int32 i = 0; i < m_pListItemsLB->GetEntryCount(); i++) { if(i) - aVal += OUStringLiteral1(); + aVal += OUStringLiteral1(DB_DELIM); aVal += m_pListItemsLB->GetEntry(i); } } diff --git a/sw/source/ui/fldui/fldvar.cxx b/sw/source/ui/fldui/fldvar.cxx index 2fa1dad31833..98e073e045b4 100644 --- a/sw/source/ui/fldui/fldvar.cxx +++ b/sw/source/ui/fldui/fldvar.cxx @@ -473,8 +473,8 @@ void SwFieldVarPage::SubTypeHdl(ListBox* pBox) // That's not considered here yet OUString sCmd( pType->GetCmd() ); sal_Int32 nTmpPos = 0; - sCmd = sCmd.replaceFirst( OUStringLiteral1(), " ", &nTmpPos ); - sCmd = sCmd.replaceFirst( OUStringLiteral1(), " ", &nTmpPos ); + sCmd = sCmd.replaceFirst( OUStringLiteral1(sfx2::cTokenSeparator), " ", &nTmpPos ); + sCmd = sCmd.replaceFirst( OUStringLiteral1(sfx2::cTokenSeparator), " ", &nTmpPos ); m_pValueED->SetText( sCmd ); m_pFormatLB->SelectEntryPos(static_cast(pType->GetType())); @@ -1040,8 +1040,8 @@ IMPL_LINK_TYPED( SwFieldVarPage, TBClickHdl, ToolBox *, pBox, 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(), &nTmpPos ); - sValue = sValue.replaceFirst( " ", OUStringLiteral1(), &nTmpPos ); + sValue = sValue.replaceFirst( " ", OUStringLiteral1(sfx2::cTokenSeparator), &nTmpPos ); + sValue = sValue.replaceFirst( " ", OUStringLiteral1(sfx2::cTokenSeparator), &nTmpPos ); static_cast(pType)->SetCmd(sValue); static_cast(pType)->SetType(static_cast(nFormat)); } @@ -1079,8 +1079,8 @@ IMPL_LINK_TYPED( SwFieldVarPage, TBClickHdl, ToolBox *, pBox, 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(), &nTmpPos ); - sValue = sValue.replaceFirst( " ", OUStringLiteral1(), &nTmpPos ); + sValue = sValue.replaceFirst( " ", OUStringLiteral1(sfx2::cTokenSeparator), &nTmpPos ); + sValue = sValue.replaceFirst( " ", OUStringLiteral1(sfx2::cTokenSeparator), &nTmpPos ); SwDDEFieldType aType(sName, sValue, static_cast(nFormat)); m_pSelectionLB->InsertEntry(sName); diff --git a/sw/source/ui/index/cnttab.cxx b/sw/source/ui/index/cnttab.cxx index 6049e5d86767..9e0b2ccdc3ff 100644 --- a/sw/source/ui/index/cnttab.cxx +++ b/sw/source/ui/index/cnttab.cxx @@ -743,7 +743,7 @@ IMPL_LINK_NOARG_TYPED(SwAddStylesDlg_Impl, OkHdl, Button*, void) if(nLevel != USHRT_MAX) { if(!pStyleArr[nLevel].isEmpty()) - pStyleArr[nLevel] += OUStringLiteral1(); + pStyleArr[nLevel] += OUStringLiteral1(TOX_STYLE_DELIMITER); pStyleArr[nLevel] += SvTabListBox::GetEntryText(pEntry, 0); } pEntry = m_pHeaderTree->Next(pEntry); @@ -3670,9 +3670,9 @@ void SwTOXStylesTabPage::ActivatePage( const SfxItemSet& ) OUString aStr( SW_RES( STR_TITLE )); if( !m_pCurrentForm->GetTemplate( 0 ).isEmpty() ) { - aStr += " " + OUStringLiteral1() + aStr += " " + OUStringLiteral1(aDeliStart) + m_pCurrentForm->GetTemplate( 0 ) - + OUStringLiteral1(); + + OUStringLiteral1(aDeliEnd); } m_pLevelLB->InsertEntry(aStr); @@ -3690,9 +3690,9 @@ void SwTOXStylesTabPage::ActivatePage( const SfxItemSet& ) } if( !m_pCurrentForm->GetTemplate( i ).isEmpty() ) { - aStr += " " + OUStringLiteral1() + aStr += " " + OUStringLiteral1(aDeliStart) + m_pCurrentForm->GetTemplate( i ) - + OUStringLiteral1(); + + OUStringLiteral1(aDeliEnd); } m_pLevelLB->InsertEntry( aStr ); } @@ -3754,9 +3754,9 @@ IMPL_LINK_NOARG_TYPED(SwTOXStylesTabPage, AssignHdl, Button*, void) nTemplPos != LISTBOX_ENTRY_NOTFOUND) { const OUString aStr(m_pLevelLB->GetEntry(nLevPos).getToken(0, aDeliStart) - + OUStringLiteral1() + + OUStringLiteral1(aDeliStart) + m_pParaLayLB->GetSelectEntry() - + OUStringLiteral1()); + + OUStringLiteral1(aDeliEnd)); m_pCurrentForm->SetTemplate(nLevPos, m_pParaLayLB->GetSelectEntry()); diff --git a/sw/source/ui/index/swuiidxmrk.cxx b/sw/source/ui/index/swuiidxmrk.cxx index 50cf341183e8..361a91044105 100644 --- a/sw/source/ui/index/swuiidxmrk.cxx +++ b/sw/source/ui/index/swuiidxmrk.cxx @@ -1237,7 +1237,7 @@ IMPL_LINK_NOARG_TYPED(SwAuthorMarkPane, InsertHdl, Button*, void) OUString sFields; for(OUString & s : m_sFields) { - sFields += s + OUStringLiteral1(); + sFields += s + OUStringLiteral1(TOX_STYLE_DELIMITER); } if(bNewEntry) { diff --git a/sw/source/ui/misc/bookmark.cxx b/sw/source/ui/misc/bookmark.cxx index 5aeb4621c853..1a94408163b2 100644 --- a/sw/source/ui/misc/bookmark.cxx +++ b/sw/source/ui/misc/bookmark.cxx @@ -192,7 +192,7 @@ IMPL_LINK_NOARG_TYPED(SwInsertBookmarkDlg, RenameHdl, Button*, void) OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!"); std::unique_ptr pDlg(pFact->CreateSwRenameXNamedDlg(this, xNamed, xNameAccess)); OSL_ENSURE(pDlg, "Dialog creation failed!"); - pDlg->SetForbiddenChars(BookmarkTable::aForbiddenChars + OUStringLiteral1()); + pDlg->SetForbiddenChars(BookmarkTable::aForbiddenChars + OUStringLiteral1(BookmarkTable::cSeparator)); if (pDlg->Execute()) { diff --git a/sw/source/ui/misc/glosbib.cxx b/sw/source/ui/misc/glosbib.cxx index 576e8821ecb8..9f7942147a9a 100644 --- a/sw/source/ui/misc/glosbib.cxx +++ b/sw/source/ui/misc/glosbib.cxx @@ -210,7 +210,7 @@ IMPL_LINK_NOARG_TYPED( SwGlossaryGroupDlg, SelectHdl, SvTreeListBox*, void ) IMPL_LINK_NOARG_TYPED(SwGlossaryGroupDlg, NewHdl, Button*, void) { OUString sGroup = m_pNameED->GetText() - + OUStringLiteral1() + + OUStringLiteral1(GLOS_DELIM) + OUString::number(m_pPathLB->GetSelectEntryPos()); OSL_ENSURE(!pGlosHdl->FindGroupName(sGroup), "group already available!"); m_InsertedArr.push_back(sGroup); @@ -283,7 +283,7 @@ IMPL_LINK_NOARG_TYPED(SwGlossaryGroupDlg, RenameHdl, Button*, void) const OUString sNewTitle(m_pNameED->GetText()); OUString sNewName = sNewTitle - + OUStringLiteral1() + + OUStringLiteral1(GLOS_DELIM) + OUString::number(m_pPathLB->GetSelectEntryPos()); OSL_ENSURE(!pGlosHdl->FindGroupName(sNewName), "group already available!"); @@ -302,8 +302,8 @@ IMPL_LINK_NOARG_TYPED(SwGlossaryGroupDlg, RenameHdl, Button*, void) } if(!bDone) { - sEntry += OUStringLiteral1() + sNewName - + OUStringLiteral1() + sNewTitle; + sEntry += OUStringLiteral1(RENAME_TOKEN_DELIM) + sNewName + + OUStringLiteral1(RENAME_TOKEN_DELIM) + sNewTitle; m_RenamedArr.push_back(sEntry); } delete static_cast(pEntry->GetUserData()); diff --git a/sw/source/ui/misc/glossary.cxx b/sw/source/ui/misc/glossary.cxx index 93fccce83ddc..33de3ebcf575 100644 --- a/sw/source/ui/misc/glossary.cxx +++ b/sw/source/ui/misc/glossary.cxx @@ -282,7 +282,7 @@ IMPL_LINK_TYPED( SwGlossaryDlg, GrpSelect, SvTreeListBox *, pBox, void ) SvTreeListEntry* pParent = pBox->GetParent(pEntry) ? pBox->GetParent(pEntry) : pEntry; GroupUserData* pGroupData = static_cast(pParent->GetUserData()); ::SetCurrGlosGroup(pGroupData->sGroupName - + OUStringLiteral1() + + OUStringLiteral1(GLOS_DELIM) + OUString::number(pGroupData->nPathIdx)); pGlossaryHdl->SetCurGroup(::GetCurrGlosGroup()); // set current text block @@ -663,7 +663,7 @@ IMPL_LINK_NOARG_TYPED(SwGlossaryDlg, BibHdl, Button*, void) { GroupUserData* pGroupData = static_cast(pEntry->GetUserData()); const OUString sGroup = pGroupData->sGroupName - + OUStringLiteral1() + + OUStringLiteral1(GLOS_DELIM) + OUString::number(pGroupData->nPathIdx); if(sGroup == sNewGroup) { @@ -925,7 +925,7 @@ DragDropMode SwGlTreeListBox::NotifyStartDrag( GroupUserData* pGroupData = static_cast(pParent->GetUserData()); OUString sEntry = pGroupData->sGroupName - + OUStringLiteral1() + + OUStringLiteral1(GLOS_DELIM) + OUString::number(pGroupData->nPathIdx); sal_Int8 nDragOption = DND_ACTION_COPY; eRet = DragDropMode::CTRL_COPY; @@ -989,7 +989,7 @@ TriState SwGlTreeListBox::NotifyCopyingOrMoving( GroupUserData* pGroupData = static_cast(pSrcParent->GetUserData()); OUString sSourceGroup = pGroupData->sGroupName - + OUStringLiteral1() + + OUStringLiteral1(GLOS_DELIM) + OUString::number(pGroupData->nPathIdx); pDlg->pGlossaryHdl->SetCurGroup(sSourceGroup); @@ -998,7 +998,7 @@ TriState SwGlTreeListBox::NotifyCopyingOrMoving( GroupUserData* pDestData = static_cast(pDestParent->GetUserData()); OUString sDestName = pDestData->sGroupName - + OUStringLiteral1() + + OUStringLiteral1(GLOS_DELIM) + OUString::number(pDestData->nPathIdx); const bool bRet = pDlg->pGlossaryHdl->CopyOrMove( sSourceGroup, sShortName, @@ -1030,7 +1030,7 @@ OUString SwGlossaryDlg::GetCurrGrpName() const pEntry = m_pCategoryBox->GetParent(pEntry) ? m_pCategoryBox->GetParent(pEntry) : pEntry; GroupUserData* pGroupData = static_cast(pEntry->GetUserData()); - return pGroupData->sGroupName + OUStringLiteral1() + OUString::number(pGroupData->nPathIdx); + return pGroupData->sGroupName + OUStringLiteral1(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 d5c13db775e6..bc74abc5cd48 100644 --- a/sw/source/ui/vba/vbalisthelper.cxx +++ b/sw/source/ui/vba/vbalisthelper.cxx @@ -153,7 +153,7 @@ void SwVbaListHelper::CreateBulletListTemplate() throw( css::uno::RuntimeExcepti } case 2: { - aBulletChar = OUStringLiteral1(); + aBulletChar = OUStringLiteral1(CHAR_EMPTY_DOT); break; } case 3: diff --git a/sw/source/uibase/dbui/dbmgr.cxx b/sw/source/uibase/dbui/dbmgr.cxx index 9fd1ce6653a6..8b9206616564 100644 --- a/sw/source/uibase/dbui/dbmgr.cxx +++ b/sw/source/uibase/dbui/dbmgr.cxx @@ -528,8 +528,8 @@ bool SwDBManager::Merge( const SwMergeDescriptor& rMergeDesc ) aDBNames.push_back(OUString()); SwDBData aInsertData = pWorkShell->GetDBData(); OUString sDBName = aInsertData.sDataSource - + OUStringLiteral1() + aInsertData.sCommand - + OUStringLiteral1() + + OUStringLiteral1(DB_DELIM) + aInsertData.sCommand + + OUStringLiteral1(DB_DELIM) + OUString::number(aInsertData.nCommandType); pWorkShell->ChangeDBFields( aDBNames, sDBName); SetInitDBFields(false); @@ -664,9 +664,9 @@ void SwDBManager::ImportDBEntry(SwWrtShell* pSh) SwDBFormatData aDBFormat; OUString sInsert = GetDBField( xColumnProp, aDBFormat); if( DB_SEP_SPACE == nSeparator ) - sInsert += OUStringLiteral1(); + sInsert += OUStringLiteral1(cSpace); else if( DB_SEP_TAB == nSeparator) - sInsert += OUStringLiteral1(); + sInsert += OUStringLiteral1(cTab); pSh->Insert(sInsert); if( DB_SEP_RETURN == nSeparator) pSh->SplitNode(); diff --git a/sw/source/uibase/dialog/regionsw.cxx b/sw/source/uibase/dialog/regionsw.cxx index 8c6ce8279852..df7ae60cf74d 100644 --- a/sw/source/uibase/dialog/regionsw.cxx +++ b/sw/source/uibase/dialog/regionsw.cxx @@ -154,8 +154,8 @@ void SwBaseShell::InsertRegionDialog(SfxRequest& rReq) if(!aFile.isEmpty() || !aSub.isEmpty()) { - OUString sLinkFileName = OUStringLiteral1() - + OUStringLiteral1(); + OUString sLinkFileName = OUStringLiteral1(sfx2::cTokenSeparator) + + OUStringLiteral1(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 72bea275d9d2..0bc99dae7cc5 100644 --- a/sw/source/uibase/dochdl/gloshdl.cxx +++ b/sw/source/uibase/dochdl/gloshdl.cxx @@ -105,7 +105,7 @@ void SwGlossaryHdl::SetCurGroup(const OUString &rGrp, bool bApi, bool bAlwaysCre OUString sGroup(rGrp); if (sGroup.indexOf(GLOS_DELIM)<0 && !FindGroupName(sGroup)) { - sGroup += OUStringLiteral1() + "0"; + sGroup += OUStringLiteral1(GLOS_DELIM) + "0"; } if(pCurGrp) { @@ -201,7 +201,7 @@ void SwGlossaryHdl::RenameGroup(const OUString& rOld, OUString& rNew, const OUSt OUString sNewGroup(rNew); if (sNewGroup.indexOf(GLOS_DELIM)<0) { - sNewGroup += OUStringLiteral1() + "0"; + sNewGroup += OUStringLiteral1(GLOS_DELIM) + "0"; } rStatGlossaries.RenameGroupDoc(sOldGroup, sNewGroup, rNewTitle); rNew = sNewGroup; diff --git a/sw/source/uibase/docvw/edtwin2.cxx b/sw/source/uibase/docvw/edtwin2.cxx index edf3aab7ca9b..71a3e152487f 100644 --- a/sw/source/uibase/docvw/edtwin2.cxx +++ b/sw/source/uibase/docvw/edtwin2.cxx @@ -202,7 +202,7 @@ void SwEditWin::RequestHelp(const HelpEvent &rEvt) if( !sText.isEmpty() ) { - OUStringBuffer sTmp(sText.replaceAll(OUStringLiteral1<0xad>(), "")); + OUStringBuffer sTmp(sText.replaceAll(OUStringLiteral1(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 e6c9a174ce0f..a51dd7666f3d 100644 --- a/sw/source/uibase/fldui/fldmgr.cxx +++ b/sw/source/uibase/fldui/fldmgr.cxx @@ -946,10 +946,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(), &nIndex); + OUString sCmd = rData.m_sPar2.replaceFirst(" ", OUStringLiteral1(sfx2::cTokenSeparator), &nIndex); if (nIndex>=0 && ++nIndex(), &nIndex); + sCmd = sCmd.replaceFirst(" ", OUStringLiteral1(sfx2::cTokenSeparator), &nIndex); } SwDDEFieldType aType( rData.m_sPar1, sCmd, static_cast(nFormatId) ); @@ -1397,10 +1397,10 @@ void SwFieldMgr::UpdateCurField(sal_uLong nFormat, // DDE-Topics/-Items can have blanks in their names! // That's not yet considered here! sal_Int32 nIndex = 0; - sPar2 = sPar2.replaceFirst(" ", OUStringLiteral1(), &nIndex ); + sPar2 = sPar2.replaceFirst(" ", OUStringLiteral1(sfx2::cTokenSeparator), &nIndex ); if (nIndex>=0 && ++nIndex(), &nIndex); + sPar2 = sPar2.replaceFirst(" ", OUStringLiteral1(sfx2::cTokenSeparator), &nIndex); } break; } diff --git a/sw/source/uibase/misc/glosdoc.cxx b/sw/source/uibase/misc/glosdoc.cxx index 720bfcfdc8a1..0959f925d001 100644 --- a/sw/source/uibase/misc/glosdoc.cxx +++ b/sw/source/uibase/misc/glosdoc.cxx @@ -185,7 +185,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() + sNewPath; + + OUStringLiteral1(GLOS_DELIM) + sNewPath; SwTextBlocks *pBlock = GetGlosDoc( sNewGroup ); if(pBlock) { @@ -233,7 +233,7 @@ bool SwGlossaries::RenameGroupDoc( RemoveFileFromList( rOldGroup ); - rNewGroup = sNewFileName + OUStringLiteral1() + OUString::number(nNewPath); + rNewGroup = sNewFileName + OUStringLiteral1(GLOS_DELIM) + OUString::number(nNewPath); if (m_GlosArr.empty()) { GetNameList(); @@ -257,7 +257,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() + OUString::number(nPath); + const OUString aName = sBaseName + OUStringLiteral1(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 @@ -320,14 +320,14 @@ std::vector & SwGlossaries::GetNameList() { const OUString aTitle = *filesIt; const OUString sName( aTitle.copy( 0, aTitle.getLength() - sExt.getLength() ) - + OUStringLiteral1() + OUString::number( static_cast(i) )); + + OUStringLiteral1(GLOS_DELIM) + OUString::number( static_cast(i) )); m_GlosArr.push_back(sName); } } if (m_GlosArr.empty()) { // the standard block is inside of the path's first part - m_GlosArr.push_back( SwGlossaries::GetDefName() + OUStringLiteral1() + "0" ); + m_GlosArr.push_back( SwGlossaries::GetDefName() + OUStringLiteral1(GLOS_DELIM) + "0" ); } } return m_GlosArr; diff --git a/sw/source/uibase/ribbar/inputwin.cxx b/sw/source/uibase/ribbar/inputwin.cxx index 669457dbf4d1..71cdc006cb21 100644 --- a/sw/source/uibase/ribbar/inputwin.cxx +++ b/sw/source/uibase/ribbar/inputwin.cxx @@ -433,8 +433,8 @@ IMPL_LINK_TYPED( SwInputWindow, SelTableCellsNotify, SwWrtShell&, rCaller, void aEdit->UpdateRange( sBoxNms, sTableNm ); - OUString sNew = OUStringLiteral1() + aEdit->GetText() - + OUStringLiteral1(); + OUString sNew = OUStringLiteral1(CH_LRE) + aEdit->GetText() + + OUStringLiteral1(CH_PDF); if( sNew != sOldFormula ) { @@ -481,8 +481,8 @@ IMPL_LINK_NOARG_TYPED(SwInputWindow, ModifyHdl, Edit&, void) { pWrtShell->StartAllAction(); DelBoxContent(); - OUString sNew = OUStringLiteral1() + aEdit->GetText() - + OUStringLiteral1(); + OUString sNew = OUStringLiteral1(CH_LRE) + aEdit->GetText() + + OUStringLiteral1(CH_PDF); pWrtShell->SwEditShell::Insert2( sNew ); pWrtShell->EndAllAction(); sOldFormula = sNew; diff --git a/sw/source/uibase/shells/textfld.cxx b/sw/source/uibase/shells/textfld.cxx index 4279963a607c..1ac6ad56b9ee 100644 --- a/sw/source/uibase/shells/textfld.cxx +++ b/sw/source/uibase/shells/textfld.cxx @@ -232,7 +232,7 @@ void SwTextShell::ExecField(SfxRequest &rReq) if( SfxItemState::SET == pArgs->GetItemState( FN_PARAM_FIELD_TYPE, false, &pItem )) nType = static_cast(pItem)->GetValue(); - aPar1 += OUStringLiteral1(); + aPar1 += OUStringLiteral1(DB_DELIM); if( SfxItemState::SET == pArgs->GetItemState( FN_PARAM_1, false, &pItem )) { @@ -241,9 +241,9 @@ void SwTextShell::ExecField(SfxRequest &rReq) if( SfxItemState::SET == pArgs->GetItemState( FN_PARAM_3, false, &pItem )) nCommand = static_cast(pItem)->GetValue(); - aPar1 += OUStringLiteral1() + aPar1 += OUStringLiteral1(DB_DELIM) + OUString::number(nCommand) - + OUStringLiteral1(); + + OUStringLiteral1(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 b386e6ac20cc..5e5d384a3d38 100644 --- a/sw/source/uibase/shells/textsh2.cxx +++ b/sw/source/uibase/shells/textsh2.cxx @@ -196,10 +196,10 @@ void SwTextShell::ExecDB(SfxRequest &rReq) OUString sColumnName; if(pColumnNameItem) static_cast(pColumnNameItem)->GetValue() >>= sColumnName; - OUString sDBName = sSourceArg + OUStringLiteral1() - + sCommandArg + OUStringLiteral1() + OUString sDBName = sSourceArg + OUStringLiteral1(DB_DELIM) + + sCommandArg + OUStringLiteral1(DB_DELIM) + OUString::number(nCommandTypeArg) - + OUStringLiteral1() + sColumnName; + + OUStringLiteral1(DB_DELIM) + sColumnName; SwFieldMgr aFieldMgr(GetShellPtr()); SwInsertField_Data aData(TYP_DBFLD, 0, sDBName, OUString(), 0); diff --git a/sw/source/uibase/uno/unoatxt.cxx b/sw/source/uibase/uno/unoatxt.cxx index 21ff39b9c70d..d2fe10f53f5b 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() + "0"; + sGroup += OUStringLiteral1(GLOS_DELIM) + "0"; } pGlossaries->NewGroupDoc(sGroup, sGroup.getToken(0, GLOS_DELIM)); @@ -484,7 +484,7 @@ void SwXAutoTextGroup::setName(const OUString& rName) throw( uno::RuntimeExcepti OUString sNewGroup(rName); if (sNewGroup.indexOf(GLOS_DELIM)<0) { - sNewGroup += OUStringLiteral1() + "0"; + sNewGroup += OUStringLiteral1(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 7ae9017c0e67..0479e72e2251 100644 --- a/sw/source/uibase/utlui/content.cxx +++ b/sw/source/uibase/utlui/content.cxx @@ -1827,7 +1827,7 @@ bool SwContentTree::FillTransferData( TransferDataContainer& rTransfer, sUrl += "#" + sEntry; if(!rToken.isEmpty()) { - sUrl += OUStringLiteral1() + rToken; + sUrl += OUStringLiteral1(cMarkSeparator) + rToken; } } else diff --git a/sw/source/uibase/utlui/glbltree.cxx b/sw/source/uibase/utlui/glbltree.cxx index 8fc22cb2e39e..71a8dd5eeed9 100644 --- a/sw/source/uibase/utlui/glbltree.cxx +++ b/sw/source/uibase/utlui/glbltree.cxx @@ -1370,9 +1370,9 @@ IMPL_LINK_TYPED( SwGlobalTree, DialogClosedHdl, sfx2::FileDialogHelper*, _pFileD for (SfxMedium* pMed : *pMedList) { OUString sFileName = pMed->GetURLObject().GetMainURL( INetURLObject::NO_DECODE ) - + OUStringLiteral1() + + OUStringLiteral1(sfx2::cTokenSeparator) + pMed->GetFilter()->GetFilterName() - + OUStringLiteral1(); + + OUStringLiteral1(sfx2::cTokenSeparator); pFileNames[nPos++] = sFileName; } pMedList.reset(); diff --git a/sw/source/uibase/utlui/gloslst.cxx b/sw/source/uibase/utlui/gloslst.cxx index 03f479a31774..e86330977d24 100644 --- a/sw/source/uibase/utlui/gloslst.cxx +++ b/sw/source/uibase/utlui/gloslst.cxx @@ -301,7 +301,7 @@ void SwGlossaryList::Update() OUString sName( aTitle.copy( 0, aTitle.getLength() - sExt.getLength() )); aFoundGroupNames.push_back(sName); - sName += OUStringLiteral1() + OUString::number( static_cast(nPath) ); + sName += OUStringLiteral1(GLOS_DELIM) + OUString::number( static_cast(nPath) ); AutoTextGroup* pFound = FindGroup( sName ); if( !pFound ) { @@ -378,9 +378,9 @@ void SwGlossaryList::FillGroup(AutoTextGroup* pGroup, SwGlossaries* pGlossaries) for(sal_uInt16 j = 0; j < pGroup->nCount; j++) { pGroup->sLongNames += pBlock->GetLongName(j) - + OUStringLiteral1(); + + OUStringLiteral1(STRING_DELIM); pGroup->sShortNames += pBlock->GetShortName(j) - + OUStringLiteral1(); + + OUStringLiteral1(STRING_DELIM); } delete pBlock; } diff --git a/sw/source/uibase/wrtsh/wrtsh2.cxx b/sw/source/uibase/wrtsh/wrtsh2.cxx index 5b65e86a5ecd..12a20aae4d10 100644 --- a/sw/source/uibase/wrtsh/wrtsh2.cxx +++ b/sw/source/uibase/wrtsh/wrtsh2.cxx @@ -554,8 +554,8 @@ void SwWrtShell::NavigatorPaste( const NaviContentBookmark& rBkmk, { SwSectionData aSection( FILE_LINK_SECTION, GetUniqueSectionName() ); OUString aLinkFile = rBkmk.GetURL().getToken(0, '#') - + OUStringLiteral1() - + OUStringLiteral1() + + OUStringLiteral1(sfx2::cTokenSeparator) + + OUStringLiteral1(sfx2::cTokenSeparator) + rBkmk.GetURL().getToken(1, '#'); aSection.SetLinkFileName( aLinkFile ); aSection.SetProtectFlag( true ); diff --git a/unotools/source/config/bootstrap.cxx b/unotools/source/config/bootstrap.cxx index 8c2ed4fe4445..68868f63e5d9 100644 --- a/unotools/source/config/bootstrap.cxx +++ b/unotools/source/config/bootstrap.cxx @@ -199,7 +199,7 @@ 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()) ) + if ( !aNormalizedURL.endsWith(OUStringLiteral1(cURLSeparator)) ) _sURL = aNormalizedURL; else _sURL = aNormalizedURL.copy( 0, aNormalizedURL.getLength()-1 ); @@ -309,7 +309,7 @@ PathStatus getDerivedPath( // do we have a base path ? if (!_aBaseURL.isEmpty()) { - OSL_PRECOND(!_aBaseURL.endsWith(OUStringLiteral1()), "Unexpected: base URL ends in slash"); + OSL_PRECOND(!_aBaseURL.endsWith(OUStringLiteral1(cURLSeparator)), "Unexpected: base URL ends in slash"); sDerivedURL = OUStringBuffer(_aBaseURL).append(cURLSeparator).append(_sRelativeURL).makeStringAndClear(); -- cgit v1.2.3