summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2016-08-30 07:43:52 +0200
committerStephan Bergmann <sbergman@redhat.com>2016-08-30 07:43:52 +0200
commit5536aea8228778e00b9f1ca8199d858cd03780ad (patch)
treed244654bc3c5aa4e5b3a87df5f004ef61049996c /sc
parent20f6a6b159c69771dc0e087f63b6c701908e32e2 (diff)
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
Diffstat (limited to 'sc')
-rw-r--r--sc/qa/extras/macros-test.cxx2
-rw-r--r--sc/qa/unit/subsequent_export-test.cxx8
-rw-r--r--sc/source/core/data/global2.cxx2
-rw-r--r--sc/source/core/tool/compiler.cxx6
-rw-r--r--sc/source/filter/excel/xelink.cxx2
-rw-r--r--sc/source/filter/excel/xihelper.cxx2
-rw-r--r--sc/source/filter/excel/xiname.cxx2
-rw-r--r--sc/source/ui/optdlg/tpusrlst.cxx4
-rw-r--r--sc/source/ui/view/prevwsh.cxx2
-rw-r--r--sc/source/ui/view/viewdata.cxx2
10 files changed, 16 insertions, 16 deletions
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<SAL_PATHDELIMITER>();
+ sTempDir += OUStringLiteral1(SAL_PATHDELIMITER);
OUString sTestFileName("My Test WorkBook.xls");
Sequence< uno::Any > aParams;
for ( sal_uInt32 i=0; i<SAL_N_ELEMENTS( testInfo ); ++i )
diff --git a/sc/qa/unit/subsequent_export-test.cxx b/sc/qa/unit/subsequent_export-test.cxx
index 539d071f88ff..bb6a350fc39a 100644
--- a/sc/qa/unit/subsequent_export-test.cxx
+++ b/sc/qa/unit/subsequent_export-test.cxx
@@ -3627,12 +3627,12 @@ void ScExportTest::testEscapeCharInNumberFormatXLSX()
assertXPath(pDoc, "/x:styleSheet/x:numFmts/x:numFmt[2]", "formatCode", "00\\ 00\\ 00\\ 00\\ 00");
assertXPath(pDoc, "/x:styleSheet/x:numFmts/x:numFmt[3]", "formatCode", "00\\.00\\.00\\.000\\.0"); // tdf#81939
// "_-* #,##0\ _€_-;\-* #,##0\ _€_-;_-* "- "_€_-;_-@_-" // tdf#81222
- OUString rFormatStrExpected ( "_-* #,##0\\ _" + OUStringLiteral1<cEuro>() + "_-;\\-* #,##0\\ _" +
- OUStringLiteral1<cEuro>() + "_-;_-* \"- \"_" + OUStringLiteral1<cEuro>() + "_-;_-@_-" );
+ OUString rFormatStrExpected ( "_-* #,##0\\ _" + OUStringLiteral1(cEuro) + "_-;\\-* #,##0\\ _" +
+ OUStringLiteral1(cEuro) + "_-;_-* \"- \"_" + OUStringLiteral1(cEuro) + "_-;_-@_-" );
assertXPath(pDoc, "/x:styleSheet/x:numFmts/x:numFmt[4]", "formatCode", rFormatStrExpected );
// "_-* #,##0" €"_-;\-* #,##0" €"_-;_-* "- €"_-;_-@_-");
- rFormatStrExpected = "_-* #,##0\" " + OUStringLiteral1<cEuro>() + "\"_-;\\-* #,##0\" " +
- OUStringLiteral1<cEuro>() + "\"_-;_-* \"- " + OUStringLiteral1<cEuro>() + "\"_-;_-@_-";
+ rFormatStrExpected = "_-* #,##0\" " + 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<SC_COMPILER_FILE_TAB_SEP>() + 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<cQuote>() + 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<cx>(), 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<cX>(), 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<sheetname>
- Init(OUStringLiteral1<EXC_EXTSH_TABNAME>() + 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<EXC_DDE_DELIM>();
+ 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<EXC_BUILTIN_FILTERDATABASE>();
+ 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<nSubCount; i++ )
{
if ( i!=0 )
- aEntryListStr += OUStringLiteral1<CR>();
+ 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<cDelimiter>();
+ 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<SC_USERDATA_SEP>()
+ + 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<SC_NEW_TABSEP>(); // 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 +