[Libreoffice-commits] core.git: 29 commits - basic/source chart2/qa chart2/source compilerplugins/clang connectivity/source cppcanvas/source cui/source desktop/source editeng/source embeddedobj/source filter/source forms/source i18npool/qa i18npool/source oox/source opencl/source package/source sax/source scaddins/source sc/source sd/source starmath/source svl/source svtools/source svx/source sw/source tools/source unoidl/source unotools/source vcl/source writerfilter/source
Stephan Bergmann
sbergman at redhat.com
Tue Aug 30 13:32:08 UTC 2016
basic/source/sbx/sbxexec.cxx | 2
basic/source/sbx/sbxvar.cxx | 4
chart2/qa/extras/chart2_trendcalculators.cxx | 2
chart2/source/view/charttypes/VSeriesPlotter.cxx | 2
compilerplugins/clang/stringconstant.cxx | 42 ++++------
connectivity/source/drivers/flat/ETable.cxx | 2
cppcanvas/source/mtfrenderer/implrenderer.cxx | 2
cui/source/dialogs/multipat.cxx | 6 -
desktop/source/pkgchk/unopkg/unopkg_misc.cxx | 2
editeng/source/accessibility/AccessibleStaticTextBase.cxx | 10 +-
editeng/source/editeng/impedit4.cxx | 4
editeng/source/items/textitem.cxx | 4
editeng/source/lookuptree/Trie.cxx | 2
editeng/source/misc/svxacorr.cxx | 2
editeng/source/outliner/outliner.cxx | 2
embeddedobj/source/msole/ownview.cxx | 2
filter/source/msfilter/svdfppt.cxx | 2
filter/source/svg/svgexport.cxx | 2
filter/source/xsltdialog/xmlfiltertabpagebasic.cxx | 2
forms/source/xforms/model_ui.cxx | 2
i18npool/qa/cppunit/test_breakiterator.cxx | 8 -
i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx | 12 +-
i18npool/source/indexentry/indexentrysupplier_default.cxx | 4
oox/source/helper/textinputstream.cxx | 2
opencl/source/openclconfig.cxx | 2
package/source/zippackage/zipfileaccess.cxx | 2
sax/source/tools/converter.cxx | 2
sc/source/core/data/global.cxx | 6 -
sc/source/core/tool/compiler.cxx | 20 ++--
sc/source/core/tool/editutil.cxx | 2
sc/source/core/tool/interpr2.cxx | 6 -
sc/source/core/tool/rangelst.cxx | 2
sc/source/core/tool/rangeutl.cxx | 2
sc/source/filter/excel/xehelper.cxx | 2
sc/source/filter/excel/xicontent.cxx | 7 -
sc/source/filter/excel/xiescher.cxx | 2
sc/source/filter/excel/xihelper.cxx | 10 +-
sc/source/filter/excel/xlformula.cxx | 2
sc/source/filter/qpro/qpro.cxx | 2
sc/source/ui/app/inputhdl.cxx | 2
sc/source/ui/dbgui/asciiopt.cxx | 2
sc/source/ui/docshell/docsh8.cxx | 2
sc/source/ui/docshell/impex.cxx | 6 -
sc/source/ui/optdlg/tpusrlst.cxx | 4
sc/source/ui/pagedlg/areasdlg.cxx | 7 -
sc/source/ui/view/formatsh.cxx | 2
scaddins/source/analysis/analysishelper.cxx | 3
sd/source/core/drawdoc4.cxx | 4
sd/source/core/stlsheet.cxx | 2
sd/source/filter/eppt/eppt.cxx | 2
sd/source/filter/eppt/pptx-epptbase.cxx | 2
sd/source/ui/annotations/annotationtag.cxx | 2
sd/source/ui/slideshow/slideshowimpl.cxx | 2
starmath/source/mathtype.cxx | 30 +++----
starmath/source/node.cxx | 2
starmath/source/ooxmlimport.cxx | 4
svl/source/numbers/zformat.cxx | 3
svl/source/numbers/zforscan.cxx | 38 ++++-----
svl/source/passwordcontainer/passwordcontainer.cxx | 6 -
svtools/source/contnr/fileview.cxx | 2
svtools/source/control/inettbc.cxx | 2
svtools/source/misc/langtab.cxx | 2
svtools/source/svhtml/htmlout.cxx | 2
svx/source/dialog/pagectrl.cxx | 2
svx/source/gallery2/galmisc.cxx | 12 --
svx/source/items/rotmodit.cxx | 2
svx/source/stbctrls/pszctrl.cxx | 2
svx/source/unodraw/UnoGraphicExporter.cxx | 4
sw/source/core/access/accportions.cxx | 2
sw/source/core/edit/autofmt.cxx | 10 +-
sw/source/core/edit/editsh.cxx | 2
sw/source/core/fields/authfld.cxx | 2
sw/source/core/fields/cellfml.cxx | 24 ++---
sw/source/core/table/swtable.cxx | 4
sw/source/core/text/porfld.cxx | 2
sw/source/core/tox/ToxTextGenerator.cxx | 6 -
sw/source/core/tox/tox.cxx | 2
sw/source/core/undo/unins.cxx | 2
sw/source/core/undo/unovwr.cxx | 8 -
sw/source/filter/html/css1atr.cxx | 4
sw/source/filter/html/htmlftn.cxx | 6 -
sw/source/filter/ww8/wrtw8nds.cxx | 2
sw/source/filter/ww8/ww8par2.cxx | 4
sw/source/filter/ww8/ww8par3.cxx | 2
sw/source/ui/index/cnttab.cxx | 8 -
sw/source/ui/misc/bookmark.cxx | 4
sw/source/ui/misc/glossary.cxx | 2
sw/source/ui/vba/vbatablehelper.cxx | 4
sw/source/ui/vba/vbatemplate.cxx | 2
sw/source/uibase/app/docstyle.cxx | 2
sw/source/uibase/config/modcfg.cxx | 6 -
sw/source/uibase/dbui/dbmgr.cxx | 2
sw/source/uibase/dbui/mmconfigitem.cxx | 2
sw/source/uibase/docvw/edtwin.cxx | 2
sw/source/uibase/sidebar/PageSizeControl.cxx | 2
sw/source/uibase/wrtsh/wrtsh1.cxx | 2
tools/source/inet/inetmime.cxx | 6 -
unoidl/source/sourceprovider-scanner.l | 2
unotools/source/misc/datetime.cxx | 6 -
vcl/source/control/combobox.cxx | 4
vcl/source/control/edit.cxx | 2
vcl/source/control/quickselectionengine.cxx | 2
vcl/source/gdi/pdfwriter_impl.cxx | 2
vcl/source/outdev/text.cxx | 4
writerfilter/source/dmapper/DomainMapper_Impl.cxx | 3
105 files changed, 241 insertions(+), 258 deletions(-)
New commits:
commit c5d8cb41a5bb26927b183defdc36daef523c9ce6
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Tue Aug 30 15:30:36 2016 +0200
loplugin:stringconstant: adapt to improved OUStringLiteral1
Change-Id: I5c9bfbb97f0eabe1ea691faf522d22070243d234
diff --git a/compilerplugins/clang/stringconstant.cxx b/compilerplugins/clang/stringconstant.cxx
index d499207..9b9c934 100644
--- a/compilerplugins/clang/stringconstant.cxx
+++ b/compilerplugins/clang/stringconstant.cxx
@@ -659,20 +659,15 @@ bool StringConstant::VisitCXXConstructExpr(CXXConstructExpr const * expr) {
PassThrough pass;
switch (expr->getConstructor()->getNumParams()) {
case 1:
+ if (!loplugin::TypeCheck(
+ expr->getConstructor()->getParamDecl(0)->getType())
+ .Typedef("sal_Unicode").GlobalNamespace())
{
- APSInt v;
- if (!expr->getArg(0)->isIntegerConstantExpr(
- v, compiler.getASTContext()))
- {
- return true;
- }
- if (v.ugt(0xFFFF)) {
- return true;
- }
- kind = ChangeKind::SingleChar;
- pass = PassThrough::NonEmptyConstantString;
- break;
+ return true;
}
+ kind = ChangeKind::SingleChar;
+ pass = PassThrough::NonEmptyConstantString;
+ break;
case 2:
{
auto arg = expr->getArg(0);
@@ -1436,24 +1431,21 @@ void StringConstant::handleOUStringCtor(
<< callee->getQualifiedNameAsString() << expr->getSourceRange();
return;
}
- APSInt res;
if (e3->getNumArgs() == 1
- && e3->getArg(0)->IgnoreParenImpCasts()->isIntegerConstantExpr(
- res, compiler.getASTContext()))
+ && e3->getConstructor()->getNumParams() == 1
+ && (loplugin::TypeCheck(
+ e3->getConstructor()->getParamDecl(0)->getType())
+ .Typedef("sal_Unicode").GlobalNamespace()))
{
// It may not be easy to rewrite OUString(c), esp. given there is no
// OUString ctor taking an OUStringLiteral1 arg, so don't warn there:
if (!explicitFunctionalCastNotation) {
- uint64_t n = res.getZExtValue();
- if (n <= 0xFFFF) {
- report(
- DiagnosticsEngine::Warning,
- ("in call of %0, replace OUString constructed from a"
- " sal_Unicode constant with an OUStringLiteral1"),
- e3->getExprLoc())
- << callee->getQualifiedNameAsString()
- << expr->getSourceRange();
- }
+ report(
+ DiagnosticsEngine::Warning,
+ ("in call of %0, replace OUString constructed from a"
+ " sal_Unicode with an OUStringLiteral1"),
+ e3->getExprLoc())
+ << callee->getQualifiedNameAsString() << expr->getSourceRange();
}
return;
}
commit 6427b84b39d2f31f93615f9499c4a3d683e46a4d
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Tue Aug 30 15:30:12 2016 +0200
loplugin:stringconstant: adapt to improved OUStringLiteral1 (writerfilter)
Change-Id: Ia156b152a5df279d879e91cc0311c2f4da27cd05
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index 256e690..cb2e28d 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -2372,8 +2372,7 @@ bool lcl_FindInCommand(
OUString& rValue )
{
bool bRet = false;
- OUString sSearch('\\');
- sSearch += OUString( cSwitch );
+ OUString sSearch = "\\" + OUStringLiteral1( cSwitch );
sal_Int32 nIndex = rCommand.indexOf( sSearch );
if( nIndex >= 0 )
{
commit 8baef341d5a6f6199f4bce2ab88d53b471d7a760
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Tue Aug 30 15:30:04 2016 +0200
loplugin:stringconstant: adapt to improved OUStringLiteral1 (vcl)
Change-Id: Ic04f33413713b592c10ebf27c1e3460a44e3794f
diff --git a/vcl/source/control/combobox.cxx b/vcl/source/control/combobox.cxx
index ddc49a9..9c5aa7c 100644
--- a/vcl/source/control/combobox.cxx
+++ b/vcl/source/control/combobox.cxx
@@ -422,11 +422,11 @@ IMPL_LINK_NOARG_TYPED(ComboBox::Impl, ImplSelectHdl, LinkParamNone*, void)
if ( !aSelInText.count( nP ) )
{
if (!aText.isEmpty() && (aText[aText.getLength()-1] != m_cMultiSep))
- aText += OUString(m_cMultiSep);
+ aText += OUStringLiteral1(m_cMultiSep);
if ( !aText.isEmpty() )
aText += " "; // slightly loosen
aText += m_pImplLB->GetEntryList()->GetEntryText( nP );
- aText += OUString(m_cMultiSep);
+ aText += OUStringLiteral1(m_cMultiSep);
}
}
aText = comphelper::string::stripEnd( aText, m_cMultiSep );
diff --git a/vcl/source/control/edit.cxx b/vcl/source/control/edit.cxx
index d4d9936..fcd35f9 100644
--- a/vcl/source/control/edit.cxx
+++ b/vcl/source/control/edit.cxx
@@ -2330,7 +2330,7 @@ OUString TextFilter::filter(const OUString &rText)
OUString sTemp(rText);
for (sal_Int32 i = 0; i < sForbiddenChars.getLength(); ++i)
{
- sTemp = sTemp.replaceAll(OUString(sForbiddenChars[i]), "");
+ sTemp = sTemp.replaceAll(OUStringLiteral1(sForbiddenChars[i]), "");
}
return sTemp;
}
diff --git a/vcl/source/control/quickselectionengine.cxx b/vcl/source/control/quickselectionengine.cxx
index 146b48e..1e2e251 100644
--- a/vcl/source/control/quickselectionengine.cxx
+++ b/vcl/source/control/quickselectionengine.cxx
@@ -117,7 +117,7 @@ namespace vcl
if ( ( c >= 32 ) && ( c != 127 ) && !_keyEvent.GetKeyCode().IsMod2() )
{
- m_pData->sCurrentSearchString += OUString(c);
+ m_pData->sCurrentSearchString += OUStringLiteral1(c);
OSL_TRACE( "QuickSelectionEngine::HandleKeyEvent: searching for %s", OUStringToOString(m_pData->sCurrentSearchString, RTL_TEXTENCODING_UTF8).getStr() );
if ( m_pData->sCurrentSearchString.getLength() == 1 )
diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx
index 76beeaa..e80d986 100644
--- a/vcl/source/gdi/pdfwriter_impl.cxx
+++ b/vcl/source/gdi/pdfwriter_impl.cxx
@@ -7715,7 +7715,7 @@ static void escapeStringXML( const OUString& rStr, OUString &rValue)
rValue += """;
break;
default:
- rValue += OUString( *pUni );
+ rValue += OUStringLiteral1( *pUni );
break;
}
}
diff --git a/vcl/source/outdev/text.cxx b/vcl/source/outdev/text.cxx
index 4368113..8dfd44d 100644
--- a/vcl/source/outdev/text.cxx
+++ b/vcl/source/outdev/text.cxx
@@ -881,7 +881,7 @@ void OutputDevice::DrawText( const Point& rStartPt, const OUString& rStr,
{
pVector->push_back( *it );
if( pDisplayText )
- *pDisplayText += OUString(rStr[ nIndex ]);
+ *pDisplayText += OUStringLiteral1(rStr[ nIndex ]);
bInserted = true;
}
}
@@ -2043,7 +2043,7 @@ OUString OutputDevice::ImplGetEllipsisString( const OutputDevice& rTargetDevice,
}
if ( aStr.isEmpty() && (nStyle & DrawTextFlags::Clip) )
- aStr += OUString(rOrigStr[ 0 ]);
+ aStr += OUStringLiteral1(rOrigStr[ 0 ]);
}
else if ( nStyle & DrawTextFlags::PathEllipsis )
{
commit e29b6be3c4c7843459ba7b9307af3272c4d94fff
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Tue Aug 30 15:29:59 2016 +0200
loplugin:stringconstant: adapt to improved OUStringLiteral1 (unotools)
Change-Id: Ic87ea0139f0c8624a8af5700d97375075c091f73
diff --git a/unotools/source/misc/datetime.cxx b/unotools/source/misc/datetime.cxx
index 60a7fa2..bbe7405 100644
--- a/unotools/source/misc/datetime.cxx
+++ b/unotools/source/misc/datetime.cxx
@@ -97,7 +97,7 @@ namespace
return true;
if (c < c0 || c > c9)
return false;
- resInt += OUString(c);
+ resInt += OUStringLiteral1(c);
}
if (nPos == i_str.getLength() || i_str[nPos] == sep)
return true;
@@ -118,7 +118,7 @@ namespace
return false;
if (c < c0 || c > c9)
return false;
- resFrac += OUString(c);
+ resFrac += OUStringLiteral1(c);
}
OSL_ENSURE(nPos == i_str.getLength(), "impl_getISO8601TimeToken internal error; expected to be at end of string");
return true;
@@ -168,7 +168,7 @@ namespace
const sal_Unicode c = i_str[io_index];
if ((c < c0 || c > c9) && c != sep)
return false;
- o_strInt += OUString(c);
+ o_strInt += OUStringLiteral1(c);
}
return true;
}
commit 172b8a5cdb8b11116d666e460cfabe651004efec
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Tue Aug 30 15:29:54 2016 +0200
loplugin:stringconstant: adapt to improved OUStringLiteral1 (unoidl)
Change-Id: I8f7fb8bba65f99732bb172b45e309868047f545c
diff --git a/unoidl/source/sourceprovider-scanner.l b/unoidl/source/sourceprovider-scanner.l
index b0e9299..d9b60ba 100644
--- a/unoidl/source/sourceprovider-scanner.l
+++ b/unoidl/source/sourceprovider-scanner.l
@@ -242,7 +242,7 @@ ALNUM {DIGIT}|{ALPHA}
. {
unsigned char c = yytext[0];
yyextra->errorMessage = c >= ' ' && c <= '~'
- ? OUString("invalid character \"" + OUString(sal_Unicode(c)) + "\"")
+ ? OUString("invalid character \"" + OUStringLiteral1(c) + "\"")
: OUString(
"invalid byte x" + OUString::number(c, 16).toAsciiUpperCase());
return TOK_ERROR;
commit 70986cc3d4b283ce58f659507c57062eeb4b4b98
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Tue Aug 30 15:29:47 2016 +0200
loplugin:stringconstant: adapt to improved OUStringLiteral1 (tools)
Change-Id: I624505ceee232a531826915755717f2e09dc0a72
diff --git a/tools/source/inet/inetmime.cxx b/tools/source/inet/inetmime.cxx
index 2e4b74a..34fb6aa 100644
--- a/tools/source/inet/inetmime.cxx
+++ b/tools/source/inet/inetmime.cxx
@@ -666,15 +666,15 @@ bool parseParameters(ParameterList const & rInput,
if (pNext->m_bExtended)
{
for (sal_Int32 i = 0; i < pNext->m_aValue.getLength(); ++i)
- aValue += OUString(sal_Unicode(
+ aValue += OUStringLiteral1(
sal_Unicode(
static_cast<unsigned char>(pNext->m_aValue[i]))
- | 0xF800));
+ | 0xF800);
}
else
{
for (sal_Int32 i = 0; i < pNext->m_aValue.getLength(); ++i)
- aValue += OUString( sal_Unicode(static_cast<unsigned char>(pNext->m_aValue[i])) );
+ aValue += OUStringLiteral1( static_cast<unsigned char>(pNext->m_aValue[i]) );
}
pNext = pNext->m_pNext;
if (!pNext || pNext->m_nSection == 0)
commit 32f9120fa076ef9dcee1d29e0a596a36aade353c
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Tue Aug 30 15:29:41 2016 +0200
loplugin:stringconstant: adapt to improved OUStringLiteral1 (sw)
Change-Id: Ifa1a6bafd3628b48ebceb09f8cd864361848e81c
diff --git a/sw/source/core/access/accportions.cxx b/sw/source/core/access/accportions.cxx
index ec6eb87..315b83f 100644
--- a/sw/source/core/access/accportions.cxx
+++ b/sw/source/core/access/accportions.cxx
@@ -184,7 +184,7 @@ void SwAccessiblePortionData::Special(
// #i111768# - apply patch from kstribley:
// Include the control characters.
case POR_CONTROLCHAR:
- sDisplay = rText + OUString( pTextNode->GetText()[nModelPosition] );
+ sDisplay = rText + OUStringLiteral1( pTextNode->GetText()[nModelPosition] );
break;
default:
sDisplay = rText;
diff --git a/sw/source/core/edit/autofmt.cxx b/sw/source/core/edit/autofmt.cxx
index 61a87aa..22ba7c6 100644
--- a/sw/source/core/edit/autofmt.cxx
+++ b/sw/source/core/edit/autofmt.cxx
@@ -858,11 +858,11 @@ sal_uInt16 SwAutoFormat::GetDigitLevel( const SwTextNode& rNd, sal_Int32& rPos,
}
if( pNumTypes )
- *pNumTypes += OUString(cNumTyp);
+ *pNumTypes += OUStringLiteral1(cNumTyp);
eScan = eScan | CHG;
}
else if( pNumTypes && !(eScan & eTmpScan) )
- *pNumTypes += OUString(cNumTyp);
+ *pNumTypes += OUStringLiteral1(cNumTyp);
eScan &= ~DELIM; // remove Delim
@@ -956,9 +956,9 @@ CHECK_ROMAN_5:
nClosingParentheses++;
// only if no numbers were read until here
if( pPrefix && !( eScan & ( NO_DELIM | CHG )) )
- *pPrefix += OUString(rText[nPos]);
+ *pPrefix += OUStringLiteral1(rText[nPos]);
else if( pPostfix )
- *pPostfix += OUString(rText[nPos]);
+ *pPostfix += OUStringLiteral1(rText[nPos]);
if( NO_DELIM & eScan )
{
@@ -1631,7 +1631,7 @@ void SwAutoFormat::BuildEnum( sal_uInt16 nLvl, sal_uInt16 nDigitLevel )
{
OUString sChgStr('\t');
if( bChgBullet )
- sChgStr = OUString( m_aFlags.cBullet ) + sChgStr;
+ sChgStr = OUStringLiteral1( m_aFlags.cBullet ) + sChgStr;
m_pDoc->getIDocumentContentOperations().InsertString( m_aDelPam, sChgStr );
SfxItemSet aSet( m_pDoc->GetAttrPool(), aTextNodeSetRange );
diff --git a/sw/source/core/edit/editsh.cxx b/sw/source/core/edit/editsh.cxx
index 7fa98e0..20b5765 100644
--- a/sw/source/core/edit/editsh.cxx
+++ b/sw/source/core/edit/editsh.cxx
@@ -553,7 +553,7 @@ OUString SwEditShell::Calculate()
aFormel += sVar;
}
else
- aFormel += OUString(ch);
+ aFormel += OUStringLiteral1(ch);
}
}
}
diff --git a/sw/source/core/fields/authfld.cxx b/sw/source/core/fields/authfld.cxx
index ed0b65d..76004cc 100644
--- a/sw/source/core/fields/authfld.cxx
+++ b/sw/source/core/fields/authfld.cxx
@@ -542,7 +542,7 @@ OUString SwAuthorityField::ConditionalExpandAuthIdentifier() const
sRet += pEntry->GetAuthorField(AUTH_FIELD_IDENTIFIER);
}
if(pAuthType->GetSuffix())
- sRet += OUString(pAuthType->GetSuffix());
+ sRet += OUStringLiteral1(pAuthType->GetSuffix());
return sRet;
}
diff --git a/sw/source/core/fields/cellfml.cxx b/sw/source/core/fields/cellfml.cxx
index 959b871..cb8da52 100644
--- a/sw/source/core/fields/cellfml.cxx
+++ b/sw/source/core/fields/cellfml.cxx
@@ -386,7 +386,7 @@ void SwTableFormula::RelNmsToBoxNms( const SwTable& rTable, OUString& rNewStr,
const SwTableBox *pBox = rTable.GetTableBox(
pNd->FindTableBoxStartNode()->GetIndex() );
- rNewStr += OUString(rFirstBox[0]); // get label for the box
+ rNewStr += OUStringLiteral1(rFirstBox[0]); // get label for the box
rFirstBox = rFirstBox.copy(1);
if( pLastBox )
{
@@ -407,7 +407,7 @@ void SwTableFormula::RelNmsToBoxNms( const SwTable& rTable, OUString& rNewStr,
rNewStr += "A1";
// get label for the box
- rNewStr += OUString(rFirstBox[ rFirstBox.getLength()-1 ]);
+ rNewStr += OUStringLiteral1(rFirstBox[ rFirstBox.getLength()-1 ]);
}
void SwTableFormula::RelBoxNmsToPtr( const SwTable& rTable, OUString& rNewStr,
@@ -419,7 +419,7 @@ void SwTableFormula::RelBoxNmsToPtr( const SwTable& rTable, OUString& rNewStr,
const SwTableBox *pBox = rTable.GetTableBox(
pNd->FindTableBoxStartNode()->GetIndex() );
- rNewStr += OUString(rFirstBox[0]); // get label for the box
+ rNewStr += OUStringLiteral1(rFirstBox[0]); // get label for the box
rFirstBox = rFirstBox.copy(1);
if( pLastBox )
{
@@ -439,7 +439,7 @@ void SwTableFormula::RelBoxNmsToPtr( const SwTable& rTable, OUString& rNewStr,
rNewStr += "0";
// get label for the box
- rNewStr += OUString(rFirstBox[ rFirstBox.getLength()-1 ]);
+ rNewStr += OUStringLiteral1(rFirstBox[ rFirstBox.getLength()-1 ]);
}
void SwTableFormula::BoxNmsToRelNm( const SwTable& rTable, OUString& rNewStr,
@@ -459,7 +459,7 @@ void SwTableFormula::BoxNmsToRelNm( const SwTable& rTable, OUString& rNewStr,
sRefBoxNm = pBox->GetName();
}
- rNewStr += OUString(rFirstBox[0]); // get label for the box
+ rNewStr += OUStringLiteral1(rFirstBox[0]); // get label for the box
rFirstBox = rFirstBox.copy(1);
if( pLastBox )
{
@@ -473,7 +473,7 @@ void SwTableFormula::BoxNmsToRelNm( const SwTable& rTable, OUString& rNewStr,
m_eNmType == EXTRNL_NAME );
// get label for the box
- rNewStr += OUString(rFirstBox[ rFirstBox.getLength()-1 ]);
+ rNewStr += OUStringLiteral1(rFirstBox[ rFirstBox.getLength()-1 ]);
}
void SwTableFormula::PtrToBoxNms( const SwTable& rTable, OUString& rNewStr,
@@ -482,7 +482,7 @@ void SwTableFormula::PtrToBoxNms( const SwTable& rTable, OUString& rNewStr,
// area in these parentheses?
SwTableBox* pBox;
- rNewStr += OUString(rFirstBox[0]); // get label for the box
+ rNewStr += OUStringLiteral1(rFirstBox[0]); // get label for the box
rFirstBox = rFirstBox.copy(1);
if( pLastBox )
{
@@ -505,7 +505,7 @@ void SwTableFormula::PtrToBoxNms( const SwTable& rTable, OUString& rNewStr,
rNewStr += "?";
// get label for the box
- rNewStr += OUString(rFirstBox[ rFirstBox.getLength()-1 ]);
+ rNewStr += OUStringLiteral1(rFirstBox[ rFirstBox.getLength()-1 ]);
}
void SwTableFormula::BoxNmsToPtr( const SwTable& rTable, OUString& rNewStr,
@@ -514,7 +514,7 @@ void SwTableFormula::BoxNmsToPtr( const SwTable& rTable, OUString& rNewStr,
// area in these parentheses?
const SwTableBox* pBox;
- rNewStr += OUString(rFirstBox[0]); // get label for the box
+ rNewStr += OUStringLiteral1(rFirstBox[0]); // get label for the box
rFirstBox = rFirstBox.copy(1);
if( pLastBox )
{
@@ -526,7 +526,7 @@ void SwTableFormula::BoxNmsToPtr( const SwTable& rTable, OUString& rNewStr,
pBox = rTable.GetTableBox( rFirstBox );
rNewStr += OUString::number(reinterpret_cast<sal_PtrDiff>(pBox))
- + OUString(rFirstBox[ rFirstBox.getLength()-1 ]); // get label for the box
+ + OUStringLiteral1(rFirstBox[ rFirstBox.getLength()-1 ]); // get label for the box
}
/// create external formula (for UI)
@@ -1048,7 +1048,7 @@ void SwTableFormula::SplitMergeBoxNm_( const SwTable& rTable, OUString& rNewStr,
{
SwTableFormulaUpdate& rTableUpd = *static_cast<SwTableFormulaUpdate*>(pPara);
- rNewStr += OUString(rFirstBox[0]); // get label for the box
+ rNewStr += OUStringLiteral1(rFirstBox[0]); // get label for the box
rFirstBox = rFirstBox.copy(1);
OUString sTableNm;
@@ -1185,7 +1185,7 @@ void SwTableFormula::SplitMergeBoxNm_( const SwTable& rTable, OUString& rNewStr,
rNewStr += OUString::number(reinterpret_cast<sal_PtrDiff>(pEndBox)) + ":";
rNewStr += OUString::number(reinterpret_cast<sal_PtrDiff>(pSttBox))
- + OUString(rFirstBox[ rFirstBox.getLength()-1] );
+ + OUStringLiteral1(rFirstBox[ rFirstBox.getLength()-1] );
}
/// Create external formula but remember that the formula is placed in a split/merged table
diff --git a/sw/source/core/table/swtable.cxx b/sw/source/core/table/swtable.cxx
index 617bf17..4ae7636 100644
--- a/sw/source/core/table/swtable.cxx
+++ b/sw/source/core/table/swtable.cxx
@@ -1795,9 +1795,9 @@ void sw_GetTableBoxColStr( sal_uInt16 nCol, OUString& rNm )
do {
const sal_uInt16 nCalc = nCol % coDiff;
if( nCalc >= 26 )
- rNm = OUString( sal_Unicode('a' - 26 + nCalc ) ) + rNm;
+ rNm = OUStringLiteral1( 'a' - 26 + nCalc ) + rNm;
else
- rNm = OUString( sal_Unicode('A' + nCalc ) ) + rNm;
+ rNm = OUStringLiteral1( 'A' + nCalc ) + rNm;
if( 0 == (nCol = nCol - nCalc) )
break;
diff --git a/sw/source/core/text/porfld.cxx b/sw/source/core/text/porfld.cxx
index 8c489de..b06affb 100644
--- a/sw/source/core/text/porfld.cxx
+++ b/sw/source/core/text/porfld.cxx
@@ -744,7 +744,7 @@ SwBulletPortion::SwBulletPortion( const sal_Unicode cBullet,
const bool bCntr,
const sal_uInt16 nMinDst,
const bool bLabelAlignmentPosAndSpaceModeActive )
- : SwNumberPortion( OUString(cBullet) + rBulletFollowedBy,
+ : SwNumberPortion( OUStringLiteral1(cBullet) + rBulletFollowedBy,
pFont, bLft, bCntr, nMinDst,
bLabelAlignmentPosAndSpaceModeActive )
{
diff --git a/sw/source/core/tox/ToxTextGenerator.cxx b/sw/source/core/tox/ToxTextGenerator.cxx
index dade91c..5c868d3 100644
--- a/sw/source/core/tox/ToxTextGenerator.cxx
+++ b/sw/source/core/tox/ToxTextGenerator.cxx
@@ -343,12 +343,12 @@ ToxTextGenerator::ConstructPageNumberPlaceholder(size_t numberOfToxSources)
return retval;
}
// Place holder for the PageNumber; we only respect the first one
- retval += OUString(C_NUM_REPL);
+ retval += OUStringLiteral1(C_NUM_REPL);
for (size_t i = 1; i < numberOfToxSources; ++i) {
retval += S_PAGE_DELI;
- retval += OUString(C_NUM_REPL);
+ retval += OUStringLiteral1(C_NUM_REPL);
}
- retval += OUString(C_END_PAGE_NUM);
+ retval += OUStringLiteral1(C_END_PAGE_NUM);
return retval;
}
diff --git a/sw/source/core/tox/tox.cxx b/sw/source/core/tox/tox.cxx
index 83d42b80..f05f5d2 100644
--- a/sw/source/core/tox/tox.cxx
+++ b/sw/source/core/tox/tox.cxx
@@ -610,7 +610,7 @@ OUString SwFormToken::GetString() const
case TOKEN_TAB_STOP:
sData += OUString::number( nTabStopPosition ) + ","
+ OUString::number( static_cast< sal_Int32 >(eTabAlign) ) + ","
- + OUString(cTabFillChar) + ","
+ + OUStringLiteral1(cTabFillChar) + ","
+ OUString::number( bWithTab ? 1 : 0 );
break;
case TOKEN_CHAPTER_INFO:
diff --git a/sw/source/core/undo/unins.cxx b/sw/source/core/undo/unins.cxx
index 02bb04d..ef84ed1 100644
--- a/sw/source/core/undo/unins.cxx
+++ b/sw/source/core/undo/unins.cxx
@@ -142,7 +142,7 @@ bool SwUndoInsert::CanGrouping( sal_Unicode cIns )
nContent++;
if (pUndoText)
- (*pUndoText) += OUString(cIns);
+ (*pUndoText) += OUStringLiteral1(cIns);
return true;
}
diff --git a/sw/source/core/undo/unovwr.cxx b/sw/source/core/undo/unovwr.cxx
index a64586a..0f537ea 100644
--- a/sw/source/core/undo/unovwr.cxx
+++ b/sw/source/core/undo/unovwr.cxx
@@ -67,7 +67,7 @@ SwUndoOverwrite::SwUndoOverwrite( SwDoc* pDoc, SwPosition& rPos,
sal_Int32 nTextNdLen = pTextNd->GetText().getLength();
if( nSttContent < nTextNdLen ) // no pure insert?
{
- aDelStr += OUString( pTextNd->GetText()[nSttContent] );
+ aDelStr += OUStringLiteral1( pTextNd->GetText()[nSttContent] );
if( !pHistory )
pHistory = new SwHistory;
SwRegHistory aRHst( *pTextNd, pHistory );
@@ -82,7 +82,7 @@ SwUndoOverwrite::SwUndoOverwrite( SwDoc* pDoc, SwPosition& rPos,
pTextNd->InsertText( OUString(cIns), rPos.nContent,
SwInsertFlags::EMPTYEXPAND );
- aInsStr += OUString( cIns );
+ aInsStr += OUStringLiteral1( cIns );
if( !bInsChar )
{
@@ -147,7 +147,7 @@ bool SwUndoOverwrite::CanGrouping( SwDoc* pDoc, SwPosition& rPos,
{
if (rPos.nContent.GetIndex() < pDelTextNd->GetText().getLength())
{
- aDelStr += OUString( pDelTextNd->GetText()[rPos.nContent.GetIndex()] );
+ aDelStr += OUStringLiteral1( pDelTextNd->GetText()[rPos.nContent.GetIndex()] );
++rPos.nContent;
}
else
@@ -161,7 +161,7 @@ bool SwUndoOverwrite::CanGrouping( SwDoc* pDoc, SwPosition& rPos,
SwInsertFlags::EMPTYEXPAND) );
assert(ins.getLength() == 1); // check in SwDoc::Overwrite => cannot fail
(void) ins;
- aInsStr += OUString( cIns );
+ aInsStr += OUStringLiteral1( cIns );
if( !bInsChar )
{
diff --git a/sw/source/filter/html/css1atr.cxx b/sw/source/filter/html/css1atr.cxx
index 238bc1b..44f0bd5 100644
--- a/sw/source/filter/html/css1atr.cxx
+++ b/sw/source/filter/html/css1atr.cxx
@@ -1174,10 +1174,10 @@ void SwHTMLWriter::PrepareFontList( const SvxFontItem& rFontItem,
if( !rNames.isEmpty() )
rNames += ", ";
if( cQuote && !bIsKeyword )
- rNames += OUString( cQuote );
+ rNames += OUStringLiteral1( cQuote );
rNames += aName;
if( cQuote && !bIsKeyword )
- rNames += OUString( cQuote );
+ rNames += OUStringLiteral1( cQuote );
}
}
diff --git a/sw/source/filter/html/htmlftn.cxx b/sw/source/filter/html/htmlftn.cxx
index 686fbc3..f6a8d02 100644
--- a/sw/source/filter/html/htmlftn.cxx
+++ b/sw/source/filter/html/htmlftn.cxx
@@ -61,20 +61,20 @@ sal_Int32 lcl_html_getNextPart( OUString& rPart, const OUString& rContent,
{
case '\\':
if( bQuoted )
- rPart += OUString( c );
+ rPart += OUStringLiteral1( c );
bQuoted = !bQuoted;
break;
case ';':
if( bQuoted )
- rPart += OUString( c );
+ rPart += OUStringLiteral1( c );
else
bDone = true;
bQuoted = false;
break;
default:
- rPart += OUString( c );
+ rPart += OUStringLiteral1( c );
bQuoted = false;
break;
}
diff --git a/sw/source/filter/ww8/wrtw8nds.cxx b/sw/source/filter/ww8/wrtw8nds.cxx
index 327b169..dc070a66 100644
--- a/sw/source/filter/ww8/wrtw8nds.cxx
+++ b/sw/source/filter/ww8/wrtw8nds.cxx
@@ -1684,7 +1684,7 @@ OUString SwWW8AttrIter::GetSnippet(const OUString &rStr, sal_Int32 nAktPos,
rStr, nAktPos, g_pBreakIt->GetLocale(nLanguage),
i18n::WordType::ANYWORD_IGNOREWHITESPACES ) )
{
- aSnippet = OUString(rStr[nAktPos]) + aSnippet.copy(1);
+ aSnippet = OUStringLiteral1(rStr[nAktPos]) + aSnippet.copy(1);
}
}
m_rExport.m_aCurrentCharPropStarts.pop();
diff --git a/sw/source/filter/ww8/ww8par2.cxx b/sw/source/filter/ww8/ww8par2.cxx
index cc60100..b483fbc 100644
--- a/sw/source/filter/ww8/ww8par2.cxx
+++ b/sw/source/filter/ww8/ww8par2.cxx
@@ -309,7 +309,7 @@ sal_uInt16 SwWW8ImplReader::End_Footnote()
//There should have been a footnote char, we will replace this.
if (pText && nPos)
{
- sChar += OUString(pText->GetText()[--nPos]);
+ sChar += OUStringLiteral1(pText->GetText()[--nPos]);
m_pPaM->SetMark();
--m_pPaM->GetMark()->nContent;
m_rDoc.getIDocumentContentOperations().DeleteRange( *m_pPaM );
@@ -663,7 +663,7 @@ void SwWW8ImplReader::SetAnlvStrings(SwNumFormat &rNum, WW8_ANLV const &rAV,
{
for(sal_Int32 i = 0; i < rAV.cbTextBefore + rAV.cbTextAfter; ++i, pText += 2)
{
- sText += OUString(sal_Unicode(SVBT16ToShort(*reinterpret_cast<SVBT16 const *>(pText))));
+ sText += OUStringLiteral1(SVBT16ToShort(*reinterpret_cast<SVBT16 const *>(pText)));
}
}
diff --git a/sw/source/filter/ww8/ww8par3.cxx b/sw/source/filter/ww8/ww8par3.cxx
index 801184b..782ae88 100644
--- a/sw/source/filter/ww8/ww8par3.cxx
+++ b/sw/source/filter/ww8/ww8par3.cxx
@@ -487,7 +487,7 @@ static void lcl_CopyGreaterEight(OUString &rDest, OUString &rSrc,
{
sal_Unicode nChar = rSrc[nI];
if (nChar > WW8ListManager::nMaxLevel)
- rDest += OUString(nChar);
+ rDest += OUStringLiteral1(nChar);
}
}
diff --git a/sw/source/ui/index/cnttab.cxx b/sw/source/ui/index/cnttab.cxx
index 9e0b2cc..5f63737 100644
--- a/sw/source/ui/index/cnttab.cxx
+++ b/sw/source/ui/index/cnttab.cxx
@@ -287,9 +287,9 @@ SwMultiTOXTabDialog::SwMultiTOXTabDialog(vcl::Window* pParent, const SfxItemSet&
{
OUString sBrackets;
if(pFType->GetPrefix())
- sBrackets += OUString(pFType->GetPrefix());
+ sBrackets += OUStringLiteral1(pFType->GetPrefix());
if(pFType->GetSuffix())
- sBrackets += OUString(pFType->GetSuffix());
+ sBrackets += OUStringLiteral1(pFType->GetSuffix());
pDescArr[nArrayIndex]->SetAuthBrackets(sBrackets);
pDescArr[nArrayIndex]->SetAuthSequence(pFType->IsSequence());
}
@@ -433,8 +433,8 @@ SwTOXDescription& SwMultiTOXTabDialog::GetTOXDescription(CurTOXType eType)
rSh.GetFieldType(RES_AUTHORITY, aEmptyOUStr));
if(pFType)
{
- pDescArr[nIndex]->SetAuthBrackets(OUString(pFType->GetPrefix()) +
- OUString(pFType->GetSuffix()));
+ pDescArr[nIndex]->SetAuthBrackets(OUStringLiteral1(pFType->GetPrefix()) +
+ OUStringLiteral1(pFType->GetSuffix()));
pDescArr[nIndex]->SetAuthSequence(pFType->IsSequence());
}
else
diff --git a/sw/source/ui/misc/bookmark.cxx b/sw/source/ui/misc/bookmark.cxx
index 1a94408..ec6f3a3 100644
--- a/sw/source/ui/misc/bookmark.cxx
+++ b/sw/source/ui/misc/bookmark.cxx
@@ -56,9 +56,9 @@ IMPL_LINK_NOARG_TYPED(SwInsertBookmarkDlg, ModifyHdl, Edit&, void)
for (sal_Int32 i = 0; i < BookmarkTable::aForbiddenChars.getLength(); i++)
{
const sal_Int32 nTmpLen = sTmp.getLength();
- sTmp = sTmp.replaceAll(OUString(BookmarkTable::aForbiddenChars[i]), "");
+ sTmp = sTmp.replaceAll(OUStringLiteral1(BookmarkTable::aForbiddenChars[i]), "");
if (sTmp.getLength() != nTmpLen)
- sMsg += OUString(BookmarkTable::aForbiddenChars[i]);
+ sMsg += OUStringLiteral1(BookmarkTable::aForbiddenChars[i]);
}
if (sTmp.getLength() != nLen)
{
diff --git a/sw/source/ui/misc/glossary.cxx b/sw/source/ui/misc/glossary.cxx
index 33de3eb..9deb0fe 100644
--- a/sw/source/ui/misc/glossary.cxx
+++ b/sw/source/ui/misc/glossary.cxx
@@ -98,7 +98,7 @@ static OUString lcl_GetValidShortCut( const OUString& rName )
for( ; nStart < nSz; ++nStart )
{
if( rName[nStart-1]==' ' && rName[nStart]!=' ')
- aBuf += OUString(rName[nStart]);
+ aBuf += OUStringLiteral1(rName[nStart]);
}
return aBuf;
}
diff --git a/sw/source/ui/vba/vbatablehelper.cxx b/sw/source/ui/vba/vbatablehelper.cxx
index 62b81ae..19d333b 100644
--- a/sw/source/ui/vba/vbatablehelper.cxx
+++ b/sw/source/ui/vba/vbatablehelper.cxx
@@ -102,9 +102,9 @@ OUString SwVbaTableHelper::getColumnStr( sal_Int32 nCol )
do{
nCalc = nCol % coDiff;
if( nCalc >= 26 )
- sRet = OUString( sal_Unicode('a' - 26 + nCalc ) ) + sRet;
+ sRet = OUStringLiteral1( 'a' - 26 + nCalc ) + sRet;
else
- sRet = OUString( sal_Unicode('A' + nCalc ) ) + sRet;
+ sRet = OUStringLiteral1( 'A' + nCalc ) + sRet;
if( 0 == ( nCol = nCol - nCalc ) )
break;
diff --git a/sw/source/ui/vba/vbatemplate.cxx b/sw/source/ui/vba/vbatemplate.cxx
index 6d8d1dd..69ff6ee 100644
--- a/sw/source/ui/vba/vbatemplate.cxx
+++ b/sw/source/ui/vba/vbatemplate.cxx
@@ -40,7 +40,7 @@ static OUString lcl_CheckGroupName( const OUString& rGroupName )
if (rtl::isAsciiAlphanumeric(cChar) ||
cChar == '_' || cChar == 0x20)
{
- sRet += OUString(cChar);
+ sRet += OUStringLiteral1(cChar);
}
}
return comphelper::string::strip(sRet, ' ');
diff --git a/sw/source/uibase/app/docstyle.cxx b/sw/source/uibase/app/docstyle.cxx
index 4506dfb..f7a176a 100644
--- a/sw/source/uibase/app/docstyle.cxx
+++ b/sw/source/uibase/app/docstyle.cxx
@@ -400,7 +400,7 @@ sal_uInt32 SwStyleSheetIterator::SwPoolFormatList::FindName(SfxStyleFamily eFam,
cStyle = ' ';
break;
}
- const OUString sSrch = OUString(cStyle) + rName;
+ const OUString sSrch = OUStringLiteral1(cStyle) + rName;
UniqueHash::const_iterator it = maUnique.find(sSrch);
if (it != maUnique.end())
diff --git a/sw/source/uibase/config/modcfg.cxx b/sw/source/uibase/config/modcfg.cxx
index 0d954ab..eb3be33 100644
--- a/sw/source/uibase/config/modcfg.cxx
+++ b/sw/source/uibase/config/modcfg.cxx
@@ -177,7 +177,7 @@ OUString SwModuleOptions::ConvertWordDelimiter(const OUString& rDelim, bool bFro
nChar += nVal;
}
if( bValidData )
- sReturn += OUString(nChar);
+ sReturn += OUStringLiteral1(nChar);
break;
}
@@ -188,7 +188,7 @@ OUString SwModuleOptions::ConvertWordDelimiter(const OUString& rDelim, bool bFro
}
}
else
- sReturn += OUString(c);
+ sReturn += OUStringLiteral1(c);
}
}
else
@@ -210,7 +210,7 @@ OUString SwModuleOptions::ConvertWordDelimiter(const OUString& rDelim, bool bFro
}
else
{
- sReturn += OUString(c);
+ sReturn += OUStringLiteral1(c);
}
}
}
diff --git a/sw/source/uibase/dbui/dbmgr.cxx b/sw/source/uibase/dbui/dbmgr.cxx
index 8b920661..f906c55 100644
--- a/sw/source/uibase/dbui/dbmgr.cxx
+++ b/sw/source/uibase/dbui/dbmgr.cxx
@@ -629,7 +629,7 @@ static OUString lcl_FindColumn(const OUString& sFormatStr,sal_uInt16 &nUsedPos
nSeparator = DB_SEP_NEWLINE;
break;
default:
- sReturn += OUString(cAkt);
+ sReturn += OUStringLiteral1(cAkt);
}
nUsedPos++;
diff --git a/sw/source/uibase/dbui/mmconfigitem.cxx b/sw/source/uibase/dbui/mmconfigitem.cxx
index 14b13a1..7ff7008 100644
--- a/sw/source/uibase/dbui/mmconfigitem.cxx
+++ b/sw/source/uibase/dbui/mmconfigitem.cxx
@@ -396,7 +396,7 @@ static void lcl_ConvertToNumbers(OUString& rBlock, const ResStringArray& rHeader
for(sal_uInt32 i = 0; i < rHeaders.Count(); ++i)
{
OUString sHeader = "<" + rHeaders.GetString( i ) + ">";
- OUString sReplace = "<" + OUString(sal_Unicode('0' + i)) + ">";
+ OUString sReplace = "<" + OUStringLiteral1('0' + i) + ">";
sBlock = sBlock.replaceAll(sHeader, sReplace);
}
rBlock = sBlock;
diff --git a/sw/source/uibase/docvw/edtwin.cxx b/sw/source/uibase/docvw/edtwin.cxx
index 1c637ba..e493e71 100644
--- a/sw/source/uibase/docvw/edtwin.cxx
+++ b/sw/source/uibase/docvw/edtwin.cxx
@@ -942,7 +942,7 @@ void SwEditWin::FlushInBuffer()
if (xISC->checkInputSequence( aNewText, nTmpPos - 1, cChar, nCheckMode ))
{
// character can be inserted:
- aNewText += OUString( (sal_Unicode) cChar );
+ aNewText += OUStringLiteral1( cChar );
++nTmpPos;
}
}
diff --git a/sw/source/uibase/sidebar/PageSizeControl.cxx b/sw/source/uibase/sidebar/PageSizeControl.cxx
index 98784d3..4ad77ae 100644
--- a/sw/source/uibase/sidebar/PageSizeControl.cxx
+++ b/sw/source/uibase/sidebar/PageSizeControl.cxx
@@ -74,7 +74,7 @@ PageSizeControl::PageSizeControl(
sal_Unicode c = aText[i];
if ( rtl::isAsciiAlpha(c) || (c == '\'') || (c == '\"') || (c == '%') )
{
- aMetricStr = OUString(c) + aMetricStr;
+ aMetricStr = OUStringLiteral1(c) + aMetricStr;
}
else
{
diff --git a/sw/source/uibase/wrtsh/wrtsh1.cxx b/sw/source/uibase/wrtsh/wrtsh1.cxx
index c096eec..dbe9b27 100644
--- a/sw/source/uibase/wrtsh/wrtsh1.cxx
+++ b/sw/source/uibase/wrtsh/wrtsh1.cxx
@@ -1605,7 +1605,7 @@ void SwWrtShell::AutoCorrect( SvxAutoCorrect& rACorr, sal_Unicode cChar )
aTmpStr1 += SW_RES(STR_END_QUOTE);
OUString aTmpStr3;
aTmpStr3 += SW_RES(STR_START_QUOTE);
- aTmpStr3 += OUString(cChar);
+ aTmpStr3 += OUStringLiteral1(cChar);
aTmpStr3 += SW_RES(STR_END_QUOTE);
aRewriter.AddRule( UndoArg1, aTmpStr1 );
aRewriter.AddRule( UndoArg2, SW_RES(STR_YIELDS) );
commit 185c3c8207de78ebb4f4dc053b5fe16f810929cc
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Tue Aug 30 15:29:36 2016 +0200
loplugin:stringconstant: adapt to improved OUStringLiteral1 (svx)
Change-Id: I4d95f15896327101c1c19abc00edcecd7fee26a2
diff --git a/svx/source/dialog/pagectrl.cxx b/svx/source/dialog/pagectrl.cxx
index 2f727e9..f5e12dd 100644
--- a/svx/source/dialog/pagectrl.cxx
+++ b/svx/source/dialog/pagectrl.cxx
@@ -285,7 +285,7 @@ void SvxPageWindow::DrawPage(vcl::RenderContext& rRenderContext, const Point& rO
aMove.X() = 0;
break;
}
- sText += OUString(cArrow);
+ sText += OUStringLiteral1(cArrow);
for (sal_Int32 i = 0; i < sText.getLength(); i++)
{
OUString sDraw(sText.copy(i,1));
diff --git a/svx/source/gallery2/galmisc.cxx b/svx/source/gallery2/galmisc.cxx
index 1fb0777..2578ac3 100644
--- a/svx/source/gallery2/galmisc.cxx
+++ b/svx/source/gallery2/galmisc.cxx
@@ -204,17 +204,13 @@ OUString GetReducedString( const INetURLObject& rURL, sal_Int32 nMaxLen )
if (nPathPrefixLen >= 0)
{
- aReduced = aPath.copy(0, nPathPrefixLen);
- aReduced += "...";
- aReduced += OUString(aDelimiter);
- aReduced += aName;
+ aReduced = aPath.copy(0, nPathPrefixLen) + "..."
+ + OUStringLiteral1(aDelimiter) + aName;
}
else
{
- aReduced += "...";
- aReduced += OUString(aDelimiter);
- aReduced += "...";
- aReduced += aName.copy( aName.getLength() - (nMaxLen - 7) );
+ aReduced += "..." + OUStringLiteral1(aDelimiter) + "..."
+ + aName.copy( aName.getLength() - (nMaxLen - 7) );
}
}
else
diff --git a/svx/source/items/rotmodit.cxx b/svx/source/items/rotmodit.cxx
index 7c00734..1ea243e 100644
--- a/svx/source/items/rotmodit.cxx
+++ b/svx/source/items/rotmodit.cxx
@@ -78,7 +78,7 @@ bool SvxRotateModeItem::GetPresentation(
SAL_FALLTHROUGH; // break; // FALL THROUGH!!!
case SFX_ITEM_PRESENTATION_NAMELESS:
- rText += OUString( sal_Unicode(GetValue()) );
+ rText += OUStringLiteral1( GetValue() );
return true;
break;
default: ;//prevent warning
diff --git a/svx/source/stbctrls/pszctrl.cxx b/svx/source/stbctrls/pszctrl.cxx
index 0f27306..d623a86 100644
--- a/svx/source/stbctrls/pszctrl.cxx
+++ b/svx/source/stbctrls/pszctrl.cxx
@@ -73,7 +73,7 @@ OUString SvxPosSizeStatusBarControl::GetMetricStr_Impl( long nVal )
if( FUNIT_NONE != eOutUnit )
{
- sMetric += OUString(cSep);
+ sMetric += OUStringLiteral1(cSep);
sal_Int64 nFract = nConvVal % 100;
if ( nFract < 0 )
diff --git a/svx/source/unodraw/UnoGraphicExporter.cxx b/svx/source/unodraw/UnoGraphicExporter.cxx
index 3d734ad..e87055b 100644
--- a/svx/source/unodraw/UnoGraphicExporter.cxx
+++ b/svx/source/unodraw/UnoGraphicExporter.cxx
@@ -356,10 +356,10 @@ IMPL_LINK_TYPED(GraphicExporter, CalcFieldValueHdl, EditFieldInfo*, pInfo, void)
switch(mpDoc->GetPageNumType())
{
case SVX_CHARS_UPPER_LETTER:
- aPageNumValue += OUString( (sal_Unicode)(char)((mnPageNumber - 1) % 26 + 'A') );
+ aPageNumValue += OUStringLiteral1( (mnPageNumber - 1) % 26 + 'A' );
break;
case SVX_CHARS_LOWER_LETTER:
- aPageNumValue += OUString( (sal_Unicode)(char)((mnPageNumber - 1) % 26 + 'a') );
+ aPageNumValue += OUStringLiteral1( (mnPageNumber - 1) % 26 + 'a' );
break;
case SVX_ROMAN_UPPER:
bUpper = true;
commit 4d21c085e6acdc6b61d0e890ebcabeb4a4b8151e
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Tue Aug 30 15:29:32 2016 +0200
loplugin:stringconstant: adapt to improved OUStringLiteral1 (svtools)
Change-Id: Ifdfc684ea894e637617de845facbad645ed6331c
diff --git a/svtools/source/contnr/fileview.cxx b/svtools/source/contnr/fileview.cxx
index 30e13de..43156a5 100644
--- a/svtools/source/contnr/fileview.cxx
+++ b/svtools/source/contnr/fileview.cxx
@@ -872,7 +872,7 @@ void ViewTabListBox_Impl::DoQuickSearch( sal_Unicode rChar )
bool bFound = mpParent->SearchNextEntry( mnSearchIndex, maQuickSearchText, false );
if ( !bFound && ( aLastText.getLength() == 1 ) &&
- ( aLastText == OUString(rChar) ) )
+ ( aLastText == OUStringLiteral1(rChar) ) )
{
mnSearchIndex = aLastPos + 1;
maQuickSearchText = aLastText;
diff --git a/svtools/source/control/inettbc.cxx b/svtools/source/control/inettbc.cxx
index 7fc2b0f..b40f262 100644
--- a/svtools/source/control/inettbc.cxx
+++ b/svtools/source/control/inettbc.cxx
@@ -442,7 +442,7 @@ void SvtMatchContext_Impl::ReadFolder( const OUString& rURL,
// folders should get a final slash automatically
if ( bIsFolder )
- aInput += OUString(aDelimiter);
+ aInput += OUStringLiteral1(aDelimiter);
Insert( aInput, aObj.GetMainURL( INetURLObject::NO_DECODE ), true );
}
diff --git a/svtools/source/misc/langtab.cxx b/svtools/source/misc/langtab.cxx
index 120c826..3540c31 100644
--- a/svtools/source/misc/langtab.cxx
+++ b/svtools/source/misc/langtab.cxx
@@ -119,7 +119,7 @@ const OUString ApplyLreOrRleEmbedding( const OUString &rText )
OUString aRes( rText );
if (bFound)
{
- aRes = OUString(cStart) + aRes
+ aRes = OUStringLiteral1(cStart) + aRes
+ OUStringLiteral1(cPopDirectionalFormat);
}
diff --git a/svtools/source/svhtml/htmlout.cxx b/svtools/source/svhtml/htmlout.cxx
index 99d9e38..285718d 100644
--- a/svtools/source/svhtml/htmlout.cxx
+++ b/svtools/source/svhtml/htmlout.cxx
@@ -470,7 +470,7 @@ static OString lcl_ConvertCharToHTML( sal_Unicode c,
.append(';');
if( pNonConvertableChars &&
-1 == pNonConvertableChars->indexOf( c ) )
- (*pNonConvertableChars) += OUString(c);
+ (*pNonConvertableChars) += OUStringLiteral1(c);
}
}
return aDest.makeStringAndClear();
commit d7beb36e94a65f7cfea44b964aa7fbd2a734937b
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Tue Aug 30 15:29:26 2016 +0200
loplugin:stringconstant: adapt to improved OUStringLiteral1 (svl)
Change-Id: I5b9c503fd28209b893688e81ddd00eb843b44e37
diff --git a/svl/source/numbers/zformat.cxx b/svl/source/numbers/zformat.cxx
index 9e90167..767dadd 100644
--- a/svl/source/numbers/zformat.cxx
+++ b/svl/source/numbers/zformat.cxx
@@ -776,10 +776,9 @@ SvNumberformat::SvNumberformat(OUString& rString,
}
else
{
- sStr = "DBNum";
//! eSymbolType is negative
sal_uInt8 nNum = (sal_uInt8)(1 - (eSymbolType - BRACKET_SYMBOLTYPE_DBNUM1));
- sStr += OUString((sal_Unicode)('0' + nNum));
+ sStr = "DBNum" + OUStringLiteral1('0' + nNum);
NumFor[nIndex].SetNatNumNum( nNum, true );
}
break;
diff --git a/svl/source/numbers/zforscan.cxx b/svl/source/numbers/zforscan.cxx
index 82971a5..40cc9d3 100644
--- a/svl/source/numbers/zforscan.cxx
+++ b/svl/source/numbers/zforscan.cxx
@@ -676,28 +676,28 @@ short ImpSvNumberformatScan::Next_Symbol( const OUString& rStr,
case ':':
case '-':
eType = NF_SYMBOLTYPE_DEL;
- sSymbol += OUString(cToken);
+ sSymbol += OUStringLiteral1(cToken);
eState = SsStop;
break;
case '*':
eType = NF_SYMBOLTYPE_STAR;
- sSymbol += OUString(cToken);
+ sSymbol += OUStringLiteral1(cToken);
eState = SsGetStar;
break;
case '_':
eType = NF_SYMBOLTYPE_BLANK;
- sSymbol += OUString(cToken);
+ sSymbol += OUStringLiteral1(cToken);
eState = SsGetBlank;
break;
case '"':
eType = NF_SYMBOLTYPE_STRING;
eState = SsGetString;
- sSymbol += OUString(cToken);
+ sSymbol += OUStringLiteral1(cToken);
break;
case '\\':
eType = NF_SYMBOLTYPE_STRING;
eState = SsGetChar;
- sSymbol += OUString(cToken);
+ sSymbol += OUStringLiteral1(cToken);
break;
case '$':
case '+':
@@ -705,7 +705,7 @@ short ImpSvNumberformatScan::Next_Symbol( const OUString& rStr,
case ')':
eType = NF_SYMBOLTYPE_STRING;
eState = SsStop;
- sSymbol += OUString(cToken);
+ sSymbol += OUStringLiteral1(cToken);
break;
default :
if (StringEqualsChar( pFormatter->GetNumDecimalSep(), cToken) ||
@@ -716,7 +716,7 @@ short ImpSvNumberformatScan::Next_Symbol( const OUString& rStr,
{
// Another separator than pre-known ASCII
eType = NF_SYMBOLTYPE_DEL;
- sSymbol += OUString(cToken);
+ sSymbol += OUStringLiteral1(cToken);
eState = SsStop;
}
else if ( pChrCls->isLetter( rStr, nPos-1 ) )
@@ -740,7 +740,7 @@ short ImpSvNumberformatScan::Next_Symbol( const OUString& rStr,
if ( bCurrency )
{
eState = SsGetWord;
- sSymbol += OUString(cToken);
+ sSymbol += OUStringLiteral1(cToken);
}
else
{
@@ -754,7 +754,7 @@ short ImpSvNumberformatScan::Next_Symbol( const OUString& rStr,
{
case '+' :
case '-' : // E+ E- combine to one symbol
- sSymbol += OUString(cNext);
+ sSymbol += OUStringLiteral1(cNext);
eType = NF_KEY_E;
nPos++;
break;
@@ -772,20 +772,20 @@ short ImpSvNumberformatScan::Next_Symbol( const OUString& rStr,
else
{
eState = SsGetWord;
- sSymbol += OUString(cToken);
+ sSymbol += OUStringLiteral1(cToken);
}
}
else
{
eType = NF_SYMBOLTYPE_STRING;
eState = SsStop;
- sSymbol += OUString(cToken);
+ sSymbol += OUStringLiteral1(cToken);
}
break;
}
break;
case SsGetChar:
- sSymbol += OUString(cToken);
+ sSymbol += OUStringLiteral1(cToken);
eState = SsStop;
break;
case SsGetString:
@@ -793,7 +793,7 @@ short ImpSvNumberformatScan::Next_Symbol( const OUString& rStr,
{
eState = SsStop;
}
- sSymbol += OUString(cToken);
+ sSymbol += OUStringLiteral1(cToken);
break;
case SsGetWord:
if ( pChrCls->isLetter( rStr, nPos-1 ) )
@@ -808,7 +808,7 @@ short ImpSvNumberformatScan::Next_Symbol( const OUString& rStr,
}
else
{
- sSymbol += OUString(cToken);
+ sSymbol += OUStringLiteral1(cToken);
}
}
else
@@ -828,7 +828,7 @@ short ImpSvNumberformatScan::Next_Symbol( const OUString& rStr,
(nLen == 2 && (sSymbol[1] == 'M' || sSymbol[1] == 'm')
&& (rStr[nPos + 1] == 'M' || rStr[nPos + 1] == 'm'))))
{
- sSymbol += OUString(cToken);
+ sSymbol += OUStringLiteral1(cToken);
bDontStop = true;
}
}
@@ -845,11 +845,11 @@ short ImpSvNumberformatScan::Next_Symbol( const OUString& rStr,
break;
case SsGetStar:
eState = SsStop;
- sSymbol += OUString(cToken);
+ sSymbol += OUStringLiteral1(cToken);
break;
case SsGetBlank:
eState = SsStop;
- sSymbol += OUString(cToken);
+ sSymbol += OUStringLiteral1(cToken);
break;
default:
break;
@@ -2715,7 +2715,7 @@ sal_Int32 ImpSvNumberformatScan::FinalScan( OUString& rString )
{
case '+':
case '-':
- rString += OUString(c);
+ rString += OUStringLiteral1(c);
break;
case ' ':
case '.':
@@ -2746,7 +2746,7 @@ sal_Int32 ImpSvNumberformatScan::FinalScan( OUString& rString )
}
else
{
- rString += OUString(c);
+ rString += OUStringLiteral1(c);
}
break;
default:
diff --git a/svl/source/passwordcontainer/passwordcontainer.cxx b/svl/source/passwordcontainer/passwordcontainer.cxx
index 3971ed0..d5be5b4 100644
--- a/svl/source/passwordcontainer/passwordcontainer.cxx
+++ b/svl/source/passwordcontainer/passwordcontainer.cxx
@@ -97,7 +97,7 @@ static vector< OUString > getInfoFromInd( const OUString& aInd )
while( *pLine && !( pLine[0] == '_' && pLine[1] == '_' ))
if( *pLine != '_' )
{
- newItem += OUString( (sal_Unicode) *pLine );
+ newItem += OUStringLiteral1( *pLine );
pLine++;
}
else
@@ -114,10 +114,10 @@ static vector< OUString > getInfoFromInd( const OUString& aInd )
return aResult;
}
- aNum += OUString( (sal_Unicode) pLine[i] );
+ aNum += OUStringLiteral1( pLine[i] );
}
- newItem += OUString( (sal_Unicode) aNum.toUInt32( 16 ) );
+ newItem += OUStringLiteral1( aNum.toUInt32( 16 ) );
pLine += 3;
}
commit f5a99c3748b9221ae58e38f85d549deeef425abb
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Tue Aug 30 15:29:20 2016 +0200
loplugin:stringconstant: adapt to improved OUStringLiteral1 (starmath)
Change-Id: Ic0a3a2ae6c0e2601cb415cba971620a71ded02a5
diff --git a/starmath/source/mathtype.cxx b/starmath/source/mathtype.cxx
index 92aa6c4..5fec1eb 100644
--- a/starmath/source/mathtype.cxx
+++ b/starmath/source/mathtype.cxx
@@ -110,56 +110,56 @@ bool MathType::LookupChar(sal_Unicode nChar,OUString &rRet,sal_uInt8 nVersion,
pC = " rightarrow ";
else
{
- rRet += OUString( nChar );
+ rRet += OUStringLiteral1( nChar );
bRet=true;
}
break;
case 0x00fb:
if ((nVersion < 3) && (nTypeFace == 0x81))
nChar = 0xDF;
- rRet += OUString( nChar );
+ rRet += OUStringLiteral1( nChar );
bRet=true;
break;
case 'a':
if ((nVersion < 3) && (nTypeFace == 0x84))
nChar = 0x3b1;
- rRet += OUString( nChar );
+ rRet += OUStringLiteral1( nChar );
bRet=true;
break;
case 'b':
if ((nVersion < 3) && (nTypeFace == 0x84))
nChar = 0x3b2;
- rRet += OUString( nChar );
+ rRet += OUStringLiteral1( nChar );
bRet=true;
break;
case 'l':
if ((nVersion < 3) && (nTypeFace == 0x84))
nChar = 0x3bb;
- rRet += OUString( nChar );
+ rRet += OUStringLiteral1( nChar );
bRet=true;
break;
case 'n':
if ((nVersion < 3) && (nTypeFace == 0x84))
nChar = 0x3bd;
- rRet += OUString( nChar );
+ rRet += OUStringLiteral1( nChar );
bRet=true;
break;
case 'r':
if ((nVersion < 3) && (nTypeFace == 0x84))
nChar = 0x3c1;
- rRet += OUString( nChar );
+ rRet += OUStringLiteral1( nChar );
bRet=true;
break;
case 'D':
if ((nVersion < 3) && (nTypeFace == 0x84))
nChar = 0x394;
- rRet += OUString( nChar );
+ rRet += OUStringLiteral1( nChar );
bRet=true;
break;
case 0xa9:
if ((nVersion < 3) && (nTypeFace == 0x82))
nChar = '\'';
- rRet += OUString( nChar );
+ rRet += OUStringLiteral1( nChar );
bRet=true;
break;
case 0x00f1:
@@ -167,7 +167,7 @@ bool MathType::LookupChar(sal_Unicode nChar,OUString &rRet,sal_uInt8 nVersion,
pC = " \\rangle ";
else
{
- rRet += OUString( nChar );
+ rRet += OUStringLiteral1( nChar );
bRet=true;
}
break;
@@ -176,7 +176,7 @@ bool MathType::LookupChar(sal_Unicode nChar,OUString &rRet,sal_uInt8 nVersion,
pC = " <= ";
else
{
- rRet += OUString( nChar );
+ rRet += OUStringLiteral1( nChar );
bRet=true;
}
break;
@@ -185,7 +185,7 @@ bool MathType::LookupChar(sal_Unicode nChar,OUString &rRet,sal_uInt8 nVersion,
pC = " drarrow ";
else
{
- rRet += OUString( nChar );
+ rRet += OUStringLiteral1( nChar );
bRet=true;
}
break;
@@ -194,7 +194,7 @@ bool MathType::LookupChar(sal_Unicode nChar,OUString &rRet,sal_uInt8 nVersion,
pC = " %OMEGA ";
else
{
- rRet += OUString( nChar );
+ rRet += OUStringLiteral1( nChar );
bRet=true;
}
break;
@@ -442,7 +442,7 @@ bool MathType::LookupChar(sal_Unicode nChar,OUString &rRet,sal_uInt8 nVersion,
break;
case 0x22b2:
case 0x22b3:
- rRet += " " + OUString( nChar ) + " ";
+ rRet += " " + OUStringLiteral1( nChar ) + " ";
break;
case 0x22a5:
pC = " ortho ";
@@ -513,7 +513,7 @@ bool MathType::LookupChar(sal_Unicode nChar,OUString &rRet,sal_uInt8 nVersion,
pC = " %OMEGA ";
break;
default:
- rRet += OUString( nChar );
+ rRet += OUStringLiteral1( nChar );
bRet=true;
break;
}
diff --git a/starmath/source/node.cxx b/starmath/source/node.cxx
index 511db430..efd26e7 100644
--- a/starmath/source/node.cxx
+++ b/starmath/source/node.cxx
@@ -2602,7 +2602,7 @@ void SmAttributNode::CreateTextFromNode(OUString &rText)
rText += "bar ";
break;
default:
- rText += OUString( nLast );
+ rText += OUStringLiteral1( nLast );
break;
}
}
diff --git a/starmath/source/ooxmlimport.cxx b/starmath/source/ooxmlimport.cxx
index 577535f..da29c93 100644
--- a/starmath/source/ooxmlimport.cxx
+++ b/starmath/source/ooxmlimport.cxx
@@ -462,9 +462,9 @@ OUString SmOoxmlImport::handleGroupChr()
if( pos == bot && chr == sal_Unicode( 0x23df ))
return "{" + e + "} underbrace { }";
if( pos == top )
- return "{" + e + "} csup {" + OUString( chr ) + "}";
+ return "{" + e + "} csup {" + OUStringLiteral1( chr ) + "}";
else
- return "{" + e + "} csub {" + OUString( chr ) + "}";
+ return "{" + e + "} csub {" + OUStringLiteral1( chr ) + "}";
}
OUString SmOoxmlImport::handleM()
commit a86df4bbe0e4f3f3d20f3e33da77911019ad6350
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Tue Aug 30 15:28:57 2016 +0200
loplugin:stringconstant: adapt to improved OUStringLiteral1 (sd)
Change-Id: Ib044294174c665407dd2c1e8fd083e9f34733ec6
diff --git a/sd/source/core/drawdoc4.cxx b/sd/source/core/drawdoc4.cxx
index 046bb13..59a8167 100644
--- a/sd/source/core/drawdoc4.cxx
+++ b/sd/source/core/drawdoc4.cxx
@@ -1039,10 +1039,10 @@ OUString SdDrawDocument::CreatePageNumValue(sal_uInt16 nNum) const
switch (mePageNumType)
{
case SVX_CHARS_UPPER_LETTER:
- aPageNumValue += OUString( (sal_Unicode)(char)((nNum - 1) % 26 + 'A') );
+ aPageNumValue += OUStringLiteral1( (nNum - 1) % 26 + 'A' );
break;
case SVX_CHARS_LOWER_LETTER:
- aPageNumValue += OUString( (sal_Unicode)(char)((nNum - 1) % 26 + 'a') );
+ aPageNumValue += OUStringLiteral1( (nNum - 1) % 26 + 'a' );
break;
case SVX_ROMAN_UPPER:
bUpper = true;
diff --git a/sd/source/core/stlsheet.cxx b/sd/source/core/stlsheet.cxx
index 2550a68..2ddbdb1 100644
--- a/sd/source/core/stlsheet.cxx
+++ b/sd/source/core/stlsheet.cxx
@@ -624,7 +624,7 @@ void SdStyleSheet::SetHelpId( const OUString& r, sal_uLong nId )
if( (nId >= HID_PSEUDOSHEET_OUTLINE1) && ( nId <= HID_PSEUDOSHEET_OUTLINE9 ) )
{
msApiName = "outline";
- msApiName += OUString( (sal_Unicode)( '1' + (nId - HID_PSEUDOSHEET_OUTLINE1) ) );
+ msApiName += OUStringLiteral1( '1' + (nId - HID_PSEUDOSHEET_OUTLINE1) );
}
else
{
diff --git a/sd/source/filter/eppt/eppt.cxx b/sd/source/filter/eppt/eppt.cxx
index a7e6353..380e0bc 100644
--- a/sd/source/filter/eppt/eppt.cxx
+++ b/sd/source/filter/eppt/eppt.cxx
@@ -1050,7 +1050,7 @@ static OUString getInitials( const OUString& rName )
// take letter
if( nLength )
{
- sInitials += OUString( *pStr );
+ sInitials += OUStringLiteral1( *pStr );
nLength--; pStr++;
}
diff --git a/sd/source/filter/eppt/pptx-epptbase.cxx b/sd/source/filter/eppt/pptx-epptbase.cxx
index 48ad287..3503376 100644
--- a/sd/source/filter/eppt/pptx-epptbase.cxx
+++ b/sd/source/filter/eppt/pptx-epptbase.cxx
@@ -601,7 +601,7 @@ bool PPTWriterBase::GetStyleSheets()
if ( nInstance == EPP_TEXTTYPE_Body )
{
sal_Unicode cTemp = aStyle[aStyle.getLength() - 1];
- aStyle = aStyle.copy(0, aStyle.getLength() - 1) + OUString(++cTemp);
+ aStyle = aStyle.copy(0, aStyle.getLength() - 1) + OUStringLiteral1(++cTemp);
if ( aXFamily->hasByName( aStyle ) )
{
aXFamily->getByName( aStyle ) >>= xStyle;
diff --git a/sd/source/ui/annotations/annotationtag.cxx b/sd/source/ui/annotations/annotationtag.cxx
index 8fcd3da..c90bfc2 100644
--- a/sd/source/ui/annotations/annotationtag.cxx
+++ b/sd/source/ui/annotations/annotationtag.cxx
@@ -76,7 +76,7 @@ static OUString getInitials( const OUString& rName )
// take letter
if( nLength )
{
- sInitials += OUString( *pStr );
+ sInitials += OUStringLiteral1( *pStr );
nLength--; pStr++;
}
diff --git a/sd/source/ui/slideshow/slideshowimpl.cxx b/sd/source/ui/slideshow/slideshowimpl.cxx
index 73a4255..c9f0adb 100644
--- a/sd/source/ui/slideshow/slideshowimpl.cxx
+++ b/sd/source/ui/slideshow/slideshowimpl.cxx
@@ -1835,7 +1835,7 @@ bool SlideshowImpl::keyInput(const KeyEvent& rKEvt)
case KEY_7:
case KEY_8:
case KEY_9:
- maCharBuffer += OUString( rKEvt.GetCharCode() );
+ maCharBuffer += OUStringLiteral1( rKEvt.GetCharCode() );
break;
case KEY_PAGEUP:
commit 7a63e5f69add05afcfe2fb14f1c46dab54de66b1
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Tue Aug 30 15:28:52 2016 +0200
loplugin:stringconstant: adapt to improved OUStringLiteral1 (scaddins)
Change-Id: I30a66d2ff5233d6a2a6ec076e188f75a74843cc7
diff --git a/scaddins/source/analysis/analysishelper.cxx b/scaddins/source/analysis/analysishelper.cxx
index 4eed2ca..5eebb2e 100644
--- a/scaddins/source/analysis/analysishelper.cxx
+++ b/scaddins/source/analysis/analysishelper.cxx
@@ -2179,8 +2179,7 @@ sal_Int16 ConvertData::GetMatchingLevel( const OUString& rRef ) const
if( nIndex > 0 && nIndex == ( nLen - 2 ) )
{
const sal_Unicode* p = aStr.getStr();
- aStr = OUString( p, nLen - 2 );
- aStr += OUString( p[ nLen - 1 ] );
+ aStr = OUString( p, nLen - 2 ) + OUStringLiteral1( p[ nLen - 1 ] );
}
if( aName.equals( aStr ) )
return 0;
commit d488a646b5a703aef34396041c997902dcbbf98d
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Tue Aug 30 15:28:44 2016 +0200
loplugin:stringconstant: adapt to improved OUStringLiteral1 (sc)
Change-Id: I41af3d6acdb5dfdaa27febf99cc3c5aa031ad779
diff --git a/sc/source/core/data/global.cxx b/sc/source/core/data/global.cxx
index f6a012c..2605f98 100644
--- a/sc/source/core/data/global.cxx
+++ b/sc/source/core/data/global.cxx
@@ -767,9 +767,9 @@ void ScGlobal::AddQuotes( OUString& rString, sal_Unicode cQuote, bool bEscapeEmb
pQ[0] = pQ[1] = cQuote;
pQ[2] = 0;
OUString aQuotes( pQ );
- rString = rString.replaceAll( OUString(cQuote), aQuotes);
+ rString = rString.replaceAll( OUStringLiteral1(cQuote), aQuotes);
}
- rString = OUString( cQuote ) + rString + OUString( cQuote );
+ rString = OUStringLiteral1( cQuote ) + rString + OUStringLiteral1( cQuote );
}
void ScGlobal::EraseQuotes( OUString& rString, sal_Unicode cQuote, bool bUnescapeEmbedded )
@@ -783,7 +783,7 @@ void ScGlobal::EraseQuotes( OUString& rString, sal_Unicode cQuote, bool bUnescap
pQ[0] = pQ[1] = cQuote;
pQ[2] = 0;
OUString aQuotes( pQ );
- rString = rString.replaceAll( aQuotes, OUString(cQuote));
+ rString = rString.replaceAll( aQuotes, OUStringLiteral1(cQuote));
}
}
}
diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx
index 09bd9fb..921ee97 100644
--- a/sc/source/core/tool/compiler.cxx
+++ b/sc/source/core/tool/compiler.cxx
@@ -532,7 +532,7 @@ static bool lcl_parseExternalName(
{
// two consecutive quotes equal a single quote in
// the file name.
- aTmpFile += OUString(c);
+ aTmpFile += OUStringLiteral1(c);
cPrev = 'a';
}
else
@@ -550,10 +550,10 @@ static bool lcl_parseExternalName(
i = j;
bInName = true;
- aTmpName += OUString(c); // Keep the separator as part of the name.
+ aTmpName += OUStringLiteral1(c); // Keep the separator as part of the name.
break;
}
- aTmpFile += OUString(c);
+ aTmpFile += OUStringLiteral1(c);
cPrev = c;
}
@@ -580,14 +580,14 @@ static bool lcl_parseExternalName(
// A second separator ? Not a valid external name.
return false;
}
- aTmpName += OUString(c);
+ aTmpName += OUStringLiteral1(c);
}
else
{
if (c == cSep)
{
bInName = true;
- aTmpName += OUString(c); // Keep the separator as part of the name.
+ aTmpName += OUStringLiteral1(c); // Keep the separator as part of the name.
}
else
{
@@ -617,7 +617,7 @@ static bool lcl_parseExternalName(
return false;
}
while (false);
- aTmpFile += OUString(c);
+ aTmpFile += OUStringLiteral1(c);
}
}
}
@@ -664,7 +664,7 @@ static OUString lcl_makeExternalNameStr(const OUString& rFile, const OUString& r
OUStringBuffer aBuf(aFile.getLength() + aName.getLength() + 9);
if (bODF)
aBuf.append( '[');
- aBuf.append( "'" + aFile + "'" + OUString(cSep));
+ aBuf.append( "'" + aFile + "'" + OUStringLiteral1(cSep));
if (bODF)
aBuf.append( "$$'" );
aBuf.append( aName);
@@ -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), OUStringLiteral1(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), OUStringLiteral1(c));
bCorrected = true;
}
}
@@ -3978,7 +3978,7 @@ void ScCompiler::AutoCorrectParsedSymbol()
OUString aStr2;
const sal_Unicode* p = aRef[j].getStr();
while ( *p && CharClass::isAsciiNumeric( OUString(*p) ) )
- aStr2 += OUString(*p++);
+ aStr2 += OUStringLiteral1(*p++);
aRef[j] = OUString( p );
aRef[j] += aStr2;
if ( bColons || aRef[j] != aOld )
diff --git a/sc/source/core/tool/editutil.cxx b/sc/source/core/tool/editutil.cxx
index 9eae3d4..01c4280 100644
--- a/sc/source/core/tool/editutil.cxx
+++ b/sc/source/core/tool/editutil.cxx
@@ -735,7 +735,7 @@ static OUString lcl_GetCharStr( sal_Int32 nNo )
nCalc = nNo % coDiff;
if( !nCalc )
nCalc = coDiff;
- aStr = OUString( (sal_Unicode)('a' - 1 + nCalc ) ) + aStr;
+ aStr = OUStringLiteral1( 'a' - 1 + nCalc ) + aStr;
nNo = sal::static_int_cast<sal_Int32>( nNo - nCalc );
if( nNo )
nNo /= coDiff;
diff --git a/sc/source/core/tool/interpr2.cxx b/sc/source/core/tool/interpr2.cxx
index b71d1ba..e214d39 100644
--- a/sc/source/core/tool/interpr2.cxx
+++ b/sc/source/core/tool/interpr2.cxx
@@ -3032,8 +3032,8 @@ void ScInterpreter::ScRoman()
else
nSteps = nMode;
}
- aRoman += OUString( pChars[ nIndex ] );
- aRoman += OUString( pChars[ nIndex2 ] );
+ aRoman += OUStringLiteral1( pChars[ nIndex ] )
+ + OUStringLiteral1( pChars[ nIndex2 ] );
nVal = sal::static_int_cast<sal_uInt16>( nVal + pValues[ nIndex ] );
nVal = sal::static_int_cast<sal_uInt16>( nVal - pValues[ nIndex2 ] );
}
@@ -3043,7 +3043,7 @@ void ScInterpreter::ScRoman()
{
// assert can't happen with nVal<4000 precondition
assert( nIndex >= 1 );
- aRoman += OUString( pChars[ nIndex - 1 ] );
+ aRoman += OUStringLiteral1( pChars[ nIndex - 1 ] );
}
sal_Int32 nPad = nDigit % 5;
if (nPad)
diff --git a/sc/source/core/tool/rangelst.cxx b/sc/source/core/tool/rangelst.cxx
index daa2ffe..b680eb4 100644
--- a/sc/source/core/tool/rangelst.cxx
+++ b/sc/source/core/tool/rangelst.cxx
@@ -137,7 +137,7 @@ public:
if (mbFirst)
mbFirst = false;
else
- mrStr += OUString(mcDelim);
+ mrStr += OUStringLiteral1(mcDelim);
mrStr += aStr;
}
private:
diff --git a/sc/source/core/tool/rangeutl.cxx b/sc/source/core/tool/rangeutl.cxx
index 22d803b..2ea7a86 100644
--- a/sc/source/core/tool/rangeutl.cxx
+++ b/sc/source/core/tool/rangeutl.cxx
@@ -340,7 +340,7 @@ void ScRangeStringConverter::AssignString(
if( !rNewStr.isEmpty() )
{
if( !rString.isEmpty() )
- rString += OUString(cSeparator);
+ rString += OUStringLiteral1(cSeparator);
rString += rNewStr;
}
}
diff --git a/sc/source/filter/excel/xehelper.cxx b/sc/source/filter/excel/xehelper.cxx
index 1df1135..3a3c11c 100644
--- a/sc/source/filter/excel/xehelper.cxx
+++ b/sc/source/filter/excel/xehelper.cxx
@@ -867,7 +867,7 @@ void XclExpHFConverter::AppendPortion( const EditTextObject* pTextObj, sal_Unico
if( !aText.isEmpty() )
{
- maHFString += "&" + OUString(cPortionCode) + aText;
+ maHFString += "&" + OUStringLiteral1(cPortionCode) + aText;
mnTotalHeight = ::std::max( mnTotalHeight, nHeight );
}
}
diff --git a/sc/source/filter/excel/xicontent.cxx b/sc/source/filter/excel/xicontent.cxx
index 84c43e0..bec74d6 100644
--- a/sc/source/filter/excel/xicontent.cxx
+++ b/sc/source/filter/excel/xicontent.cxx
@@ -389,8 +389,7 @@ void XclImpHyperlink::ConvertToValidTabName(OUString& rUrl)
// quite. When this occurs, the whole table name needs to be
// quoted.
bQuoteTabName = true;
- aTabName += OUString(c);
- aTabName += OUString(c);
+ aTabName += OUStringLiteral1(c) + OUStringLiteral1(c);
++i;
continue;
}
@@ -406,9 +405,9 @@ void XclImpHyperlink::ConvertToValidTabName(OUString& rUrl)
}
}
else if (bInQuote)
- aTabName += OUString(c);
+ aTabName += OUStringLiteral1(c);
else
- aNewUrl += OUString(c);
+ aNewUrl += OUStringLiteral1(c);
}
if (bInQuote)
diff --git a/sc/source/filter/excel/xiescher.cxx b/sc/source/filter/excel/xiescher.cxx
index 8328378..11a46f4 100644
--- a/sc/source/filter/excel/xiescher.cxx
+++ b/sc/source/filter/excel/xiescher.cxx
@@ -2862,7 +2862,7 @@ OUString XclImpPictureObj::GetOleStorageName() const
aStrgName = mbEmbedded ? OUString(EXC_STORAGE_OLE_EMBEDDED) : OUString(EXC_STORAGE_OLE_LINKED);
static const sal_Char spcHexChars[] = "0123456789ABCDEF";
for( sal_uInt8 nIndex = 32; nIndex > 0; nIndex -= 4 )
- aStrgName += OUString( sal_Unicode( spcHexChars[ ::extract_value< sal_uInt8 >( mnStorageId, nIndex - 4, 4 ) ] ) );
+ aStrgName += OUStringLiteral1( spcHexChars[ ::extract_value< sal_uInt8 >( mnStorageId, nIndex - 4, 4 ) ] );
}
return aStrgName;
}
diff --git a/sc/source/filter/excel/xihelper.cxx b/sc/source/filter/excel/xihelper.cxx
index f2f850a..f562714 100644
--- a/sc/source/filter/excel/xihelper.cxx
+++ b/sc/source/filter/excel/xihelper.cxx
@@ -321,7 +321,7 @@ void XclImpHFConverter::ParseString( const OUString& rHFString )
InsertLineBreak();
break;
default:
- maCurrText += OUString(*pChar);
+ maCurrText += OUStringLiteral1(*pChar);
}
}
break;
@@ -410,7 +410,7 @@ void XclImpHFConverter::ParseString( const OUString& rHFString )
eState = xlPSFontStyle;
break;
default:
- aReadFont += OUString(*pChar);
+ aReadFont += OUStringLiteral1(*pChar);
}
}
break;
@@ -429,7 +429,7 @@ void XclImpHFConverter::ParseString( const OUString& rHFString )
eState = xlPSText;
break;
default:
- aReadStyle += OUString(*pChar);
+ aReadStyle += OUStringLiteral1(*pChar);
}
}
break;
@@ -600,7 +600,7 @@ void lclAppendUrlChar( OUString& rUrl, sal_Unicode cChar )
{
case '#': rUrl += "%23"; break;
case '%': rUrl += "%25"; break;
- default: rUrl += OUString( cChar );
+ default: rUrl += OUStringLiteral1( cChar );
}
}
@@ -736,7 +736,7 @@ void XclImpUrlHelper::DecodeUrl(
// --- sheet name ---
case xlUrlSheetName:
- rTabName += OUString( *pChar );
+ rTabName += OUStringLiteral1( *pChar );
break;
// --- raw read mode ---
diff --git a/sc/source/filter/excel/xlformula.cxx b/sc/source/filter/excel/xlformula.cxx
index b7dd25f..f22a259 100644
--- a/sc/source/filter/excel/xlformula.cxx
+++ b/sc/source/filter/excel/xlformula.cxx
@@ -879,7 +879,7 @@ bool XclTokenArrayHelper::GetStringList( OUString& rStringList, const ScTokenArr
break;
case STATE_SEP:
bRet = aIt->GetOpCode() == ocSep;
- if( bRet ) rStringList += OUString(cSep);
+ if( bRet ) rStringList += OUStringLiteral1(cSep);
eState = (bRet && (++aIt).Is()) ? STATE_STR : STATE_END;
break;
default:;
diff --git a/sc/source/filter/qpro/qpro.cxx b/sc/source/filter/qpro/qpro.cxx
index 153c693..77334a2 100644
--- a/sc/source/filter/qpro/qpro.cxx
+++ b/sc/source/filter/qpro/qpro.cxx
@@ -163,7 +163,7 @@ FltError ScQProReader::import( ScDocument *pDoc )
if( nTab < 26 )
{
OUString aName;
- aName += OUString( sal_Unicode( 'A' + nTab ) );
+ aName += OUStringLiteral1( 'A' + nTab );
if (!nTab)
pDoc->RenameTab( nTab, aName, false );
else
diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx
index 543bc7e..0a4cfe1 100644
--- a/sc/source/ui/app/inputhdl.cxx
+++ b/sc/source/ui/app/inputhdl.cxx
@@ -1140,7 +1140,7 @@ bool ScInputHandler::GetFuncName( OUString& aStart, OUString& aResult )
::std::vector<sal_Unicode>::reverse_iterator rIt = aTemp.rbegin();
aResult = OUString( *rIt++ );
while ( rIt != aTemp.rend() )
- aResult += OUString( *rIt++ );
+ aResult += OUStringLiteral1( *rIt++ );
return true;
}
diff --git a/sc/source/ui/dbgui/asciiopt.cxx b/sc/source/ui/dbgui/asciiopt.cxx
index 3447b98..1d91334 100644
--- a/sc/source/ui/dbgui/asciiopt.cxx
+++ b/sc/source/ui/dbgui/asciiopt.cxx
@@ -155,7 +155,7 @@ static OUString lcl_decodeSepString( const OUString & rSepNums, bool & o_bMergeF
{
sal_Int32 nVal = aCode.toInt32();
if ( nVal )
- aFieldSeps += OUString((sal_Unicode) nVal);
+ aFieldSeps += OUStringLiteral1(nVal);
}
}
while ( nPos >= 0 );
diff --git a/sc/source/ui/docshell/docsh8.cxx b/sc/source/ui/docshell/docsh8.cxx
index d264d64..646656e 100644
--- a/sc/source/ui/docshell/docsh8.cxx
+++ b/sc/source/ui/docshell/docsh8.cxx
@@ -564,7 +564,7 @@ void lcl_GetColumnTypes(
for ( const sal_Unicode* p = aFieldName.getStr(); ( c = *p ) != 0; p++ )
{
if ( rtl::isAsciiAlpha(c) || rtl::isAsciiDigit(c) || c == '_' )
- aTmpStr += OUString(c);
+ aTmpStr += OUStringLiteral1(c);
else
aTmpStr += "_";
}
diff --git a/sc/source/ui/docshell/impex.cxx b/sc/source/ui/docshell/impex.cxx
index 0b63cc1..85efd9a 100644
--- a/sc/source/ui/docshell/impex.cxx
+++ b/sc/source/ui/docshell/impex.cxx
@@ -845,7 +845,7 @@ static void lcl_WriteString( SvStream& rStrm, OUString& rString, sal_Unicode cQu
if (cQuote)
{
- rString = OUString(cQuote) + rString + OUString(cQuote);
+ rString = OUStringLiteral1(cQuote) + rString + OUStringLiteral1(cQuote);
}
ScImportExport::WriteUnicodeOrByteString( rStrm, rString );
@@ -1664,7 +1664,7 @@ bool ScImportExport::Doc2Text( SvStream& rStrm )
}
if( mExportTextOptions.mcSeparatorConvertTo && cSep )
- aCellStr = aCellStr.replaceAll( OUString(cSep), OUString(mExportTextOptions.mcSeparatorConvertTo) );
+ aCellStr = aCellStr.replaceAll( OUStringLiteral1(cSep), OUStringLiteral1(mExportTextOptions.mcSeparatorConvertTo) );
if( mExportTextOptions.mbAddQuotes && ( aCellStr.indexOf( cSep ) != -1 ) )
lcl_WriteString( rStrm, aCellStr, cStr, cStr );
@@ -1697,7 +1697,7 @@ bool ScImportExport::Doc2Text( SvStream& rStrm )
}
if( mExportTextOptions.mcSeparatorConvertTo && cSep )
- aCellStr = aCellStr.replaceAll( OUString(cSep), OUString(mExportTextOptions.mcSeparatorConvertTo) );
+ aCellStr = aCellStr.replaceAll( OUStringLiteral1(cSep), OUStringLiteral1(mExportTextOptions.mcSeparatorConvertTo) );
if( mExportTextOptions.mbAddQuotes && hasLineBreaksOrSeps(aCellStr, cSep) )
lcl_WriteString( rStrm, aCellStr, cStr, cStr );
diff --git a/sc/source/ui/optdlg/tpusrlst.cxx b/sc/source/ui/optdlg/tpusrlst.cxx
index 3ba0569..a6b9edd 100644
--- a/sc/source/ui/optdlg/tpusrlst.cxx
+++ b/sc/source/ui/optdlg/tpusrlst.cxx
@@ -317,12 +317,12 @@ void ScTpUserLists::MakeListStr( OUString& rListStr )
sal_Int32 c = 0;
while ( c < nLen )
{
- rListStr += OUString(aStr[c]);
+ rListStr += OUStringLiteral1(aStr[c]);
++c;
if ((c < nLen) && (aStr[c] == cDelimiter))
{
- rListStr += OUString(aStr[c]);
+ rListStr += OUStringLiteral1(aStr[c]);
while ((c < nLen) && (aStr[c] == cDelimiter))
++c;
diff --git a/sc/source/ui/pagedlg/areasdlg.cxx b/sc/source/ui/pagedlg/areasdlg.cxx
index 07c4dcc..de2a9e2 100644
--- a/sc/source/ui/pagedlg/areasdlg.cxx
+++ b/sc/source/ui/pagedlg/areasdlg.cxx
@@ -216,8 +216,7 @@ void ScPrintAreasDlg::AddRefEntry()
if ( pRefInputEdit == pEdPrintArea )
{
const sal_Unicode sep = ScCompiler::GetNativeSymbolChar(ocSep);
- OUString aVal = pEdPrintArea->GetText();
- aVal += OUString(sep);
+ OUString aVal = pEdPrintArea->GetText() + OUStringLiteral1(sep);
pEdPrintArea->SetText(aVal);
sal_Int32 nLen = aVal.getLength();
@@ -286,7 +285,7 @@ void ScPrintAreasDlg::Impl_Reset()
if (pPrintRange)
{
if ( !aStrRange.isEmpty() )
- aStrRange += OUString(sep);
+ aStrRange += OUStringLiteral1(sep);
aOne = pPrintRange->Format(ScRefFlags::RANGE_ABS, pDoc, eConv);
aStrRange += aOne;
}
@@ -771,7 +770,7 @@ static bool lcl_CheckRepeatString( const OUString& rStr, ScDocument* pDoc, bool
bEndPos = true;
}
else
- aBuf += OUString(c);
+ aBuf += OUStringLiteral1(c);
}
if (!aBuf.isEmpty())
diff --git a/sc/source/ui/view/formatsh.cxx b/sc/source/ui/view/formatsh.cxx
index d399687..569b04f 100644
--- a/sc/source/ui/view/formatsh.cxx
+++ b/sc/source/ui/view/formatsh.cxx
@@ -1191,7 +1191,7 @@ void ScFormatShell::ExecuteNumFormat( SfxRequest& rReq )
}
else
{
- sTmpStr += OUString(cChar);
+ sTmpStr += OUStringLiteral1(cChar);
}
nCount++;
commit 79a410daa9fbdc22eef2a0a4e4da4597c2071c4b
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Tue Aug 30 15:28:39 2016 +0200
loplugin:stringconstant: adapt to improved OUStringLiteral1 (sax)
Change-Id: Ia39a4f4689ae0d6e2b7303a89251634bfe0eeb2f
diff --git a/sax/source/tools/converter.cxx b/sax/source/tools/converter.cxx
index dc21f05..32e1ceb 100644
--- a/sax/source/tools/converter.cxx
+++ b/sax/source/tools/converter.cxx
@@ -820,7 +820,7 @@ bool Converter::convertDuration(double& rfTime,
}
else
{
- sDoubleStr += OUString(c);
+ sDoubleStr += OUStringLiteral1(c);
}
}
}
commit 0cdfe1cdc167b355e3f88cb1c693210d074bf546
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Tue Aug 30 15:28:34 2016 +0200
loplugin:stringconstant: adapt to improved OUStringLiteral1 (package)
Change-Id: I359fcf33039b406d614bf71361a7882a101667d2
diff --git a/package/source/zippackage/zipfileaccess.cxx b/package/source/zippackage/zipfileaccess.cxx
index 5a59c00..0b716d6 100644
--- a/package/source/zippackage/zipfileaccess.cxx
+++ b/package/source/zippackage/zipfileaccess.cxx
@@ -106,7 +106,7 @@ uno::Sequence< OUString > OZipFileAccess::GetPatternsFromString_Impl( const OUSt
}
else
{
- aPattern[nInd] += OUString( *pString );
+ aPattern[nInd] += OUStringLiteral1( *pString );
pString++;
}
}
commit cd252e3ad8ca1b2c5c21c4279784a0c2ff9521b6
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Tue Aug 30 15:28:28 2016 +0200
loplugin:stringconstant: adapt to improved OUStringLiteral1 (opencl)
Change-Id: I0da7434b67148824d1c2343f8ecb2b069df6baa2
diff --git a/opencl/source/openclconfig.cxx b/opencl/source/openclconfig.cxx
index 79262be..eaa0bba 100644
--- a/opencl/source/openclconfig.cxx
+++ b/opencl/source/openclconfig.cxx
@@ -79,7 +79,7 @@ OUString getToken(const OUString& string, sal_Int32& index)
result += token.copy(i, p - i);
if (p < token.getLength() - 2)
{
- result += OUString(static_cast<sal_Unicode>(token.copy(p+1, 2).toInt32(16)));
+ result += OUStringLiteral1(token.copy(p+1, 2).toInt32(16));
i = p + 3;
}
else
commit bbecf9313404d0741ff1edd9fe85e653f0ed48a1
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Tue Aug 30 15:28:22 2016 +0200
loplugin:stringconstant: adapt to improved OUStringLiteral1 (oox)
Change-Id: I1a3190f136b69702615cdf796ff45abfd89155dc
diff --git a/oox/source/helper/textinputstream.cxx b/oox/source/helper/textinputstream.cxx
index 9aa5449..1c4f4c1 100644
--- a/oox/source/helper/textinputstream.cxx
+++ b/oox/source/helper/textinputstream.cxx
@@ -202,7 +202,7 @@ OUString TextInputStream::createFinalString( const OUString& rString )
if( mcPendingChar == 0 )
return rString;
- OUString aString = OUString( mcPendingChar ) + rString;
+ OUString aString = OUStringLiteral1( mcPendingChar ) + rString;
mcPendingChar = 0;
return aString;
}
commit 82b27577d20025bc8e9b68bfe365a860992be0cb
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Tue Aug 30 15:28:17 2016 +0200
loplugin:stringconstant: adapt to improved OUStringLiteral1 (i18npool)
Change-Id: If4bc7dd5af49cca85f474e817cc3cc358c2b48c2
diff --git a/i18npool/qa/cppunit/test_breakiterator.cxx b/i18npool/qa/cppunit/test_breakiterator.cxx
index 1c8b1f9..58b6a98 100644
--- a/i18npool/qa/cppunit/test_breakiterator.cxx
+++ b/i18npool/qa/cppunit/test_breakiterator.cxx
@@ -267,7 +267,7 @@ void TestBreakIterator::testWordBoundaries()
if (aBreakTests[i] == 0x200B)
continue;
#endif
- OUString aTest = "Word" + OUString(aBreakTests[i]) + "Word";
+ OUString aTest = "Word" + OUStringLiteral1(aBreakTests[i]) + "Word";
aBounds = m_xBreak->getWordBoundary(aTest, 0, aLocale, mode, true);
switch (mode)
{
@@ -296,7 +296,7 @@ void TestBreakIterator::testWordBoundaries()
//make sure that in all cases isBeginWord and isEndWord matches getWordBoundary
for (size_t i = 0; i < SAL_N_ELEMENTS(aJoinTests); ++i)
{
- OUString aTest = "Word" + OUString(aJoinTests[i]) + "Word";
+ OUString aTest = "Word" + OUStringLiteral1(aJoinTests[i]) + "Word";
aBounds = m_xBreak->getWordBoundary(aTest, 0, aLocale, mode, true);
switch (mode)
{
@@ -355,7 +355,7 @@ void TestBreakIterator::testWordBoundaries()
const sal_Int32 aSinglePositions[] = {0, 1, 3, 4, 6, 7, 9, 10};
for (size_t j = 1; j < SAL_N_ELEMENTS(aTests); ++j)
{
- OUString aTest = aBase.replaceAll("xx", OUString(aTests[j]));
+ OUString aTest = aBase.replaceAll("xx", OUStringLiteral1(aTests[j]));
sal_Int32 nPos = -1;
size_t i = 0;
do
@@ -378,7 +378,7 @@ void TestBreakIterator::testWordBoundaries()
const sal_Int32 aSingleQuotePositions[] = {0, 1, 9, 10};
CPPUNIT_ASSERT(aTests[0] == '\'');
{
- OUString aTest = aBase.replaceAll("xx", OUString(aTests[0]));
+ OUString aTest = aBase.replaceAll("xx", OUStringLiteral1(aTests[0]));
sal_Int32 nPos = -1;
size_t i = 0;
do
diff --git a/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx b/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx
index 6109745..fe5bf48 100644
--- a/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx
+++ b/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx
@@ -343,7 +343,7 @@ void lcl_formatChars( const sal_Unicode table[], int tableSize, int n, OUString&
if( n>=tableSize ) lcl_formatChars( table, tableSize, (n-tableSize)/tableSize, s );
- s += OUString( table[ n % tableSize ] );
+ s += OUStringLiteral1( table[ n % tableSize ] );
}
static
@@ -356,7 +356,7 @@ void lcl_formatChars1( const sal_Unicode table[], int tableSize, int n, OUString
int repeat_count = n / tableSize + 1;
for( int i=0; i<repeat_count; i++ )
- s += OUString( table[ n%tableSize ] );
+ s += OUStringLiteral1( table[ n%tableSize ] );
}
static
@@ -368,9 +368,9 @@ void lcl_formatChars2( const sal_Unicode table_capital[], const sal_Unicode tabl
if( n>=tableSize )
{
lcl_formatChars2( table_capital, table_small, tableSize, (n-tableSize)/tableSize, s );
- s += OUString( table_small[ n % tableSize ] );
+ s += OUStringLiteral1( table_small[ n % tableSize ] );
} else
- s += OUString( table_capital[ n % tableSize ] );
+ s += OUStringLiteral1( table_capital[ n % tableSize ] );
}
static
@@ -380,10 +380,10 @@ void lcl_formatChars3( const sal_Unicode table_capital[], const sal_Unicode tabl
// if A=='A' then 0=>A, 1=>B, ..., 25=>Z, 26=>Aa, 27=>Bb, ...
int repeat_count = n / tableSize + 1;
- s += OUString( table_capital[ n%tableSize ] );
+ s += OUStringLiteral1( table_capital[ n%tableSize ] );
for( int i=1; i<repeat_count; i++ )
- s += OUString( table_small[ n%tableSize ] );
+ s += OUStringLiteral1( table_small[ n%tableSize ] );
}
diff --git a/i18npool/source/indexentry/indexentrysupplier_default.cxx b/i18npool/source/indexentry/indexentrysupplier_default.cxx
index ee0c3f5..aae0e74 100644
--- a/i18npool/source/indexentry/indexentrysupplier_default.cxx
+++ b/i18npool/source/indexentry/indexentrysupplier_default.cxx
@@ -205,10 +205,10 @@ void Index::makeIndexKeys(const lang::Locale &rLocale, const OUString &algorithm
continue;
} else if (keyStr[i] == '_') {
for (curr=keyStr[i-1]+1; curr <= keyStr[i+1]; curr++)
- skipping_chars+=OUString(curr);
+ skipping_chars+=OUStringLiteral1(curr);
i+=2;
} else {
- skipping_chars+=OUString(keyStr[i]);
+ skipping_chars+=OUStringLiteral1(keyStr[i]);
}
}
break;
commit 1a212efd3a3ef0d87abae0299c2da2fc5249492c
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Tue Aug 30 15:28:09 2016 +0200
loplugin:stringconstant: adapt to improved OUStringLiteral1 (forms)
Change-Id: I25323e586bb80b833d1b2dace5498de853aa039e
diff --git a/forms/source/xforms/model_ui.cxx b/forms/source/xforms/model_ui.cxx
index baebd0d..2aba1c1 100644
--- a/forms/source/xforms/model_ui.cxx
+++ b/forms/source/xforms/model_ui.cxx
@@ -759,7 +759,7 @@ static OUString lcl_serializeForDisplay( const Reference< XAttr >& _rxAttrNode )
if ( sValue.indexOf( nQuote ) >= 0 )
nQuote = '\'';
- sResult = _rxAttrNode->getName() + "=" + OUString(nQuote) + sValue + OUString(nQuote) + " ";
+ sResult = _rxAttrNode->getName() + "=" + OUStringLiteral1(nQuote) + sValue + OUStringLiteral1(nQuote) + " ";
}
return sResult;
}
commit 0b288bf8e90fbf6bc0208d223085238e77b6b0e2
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Tue Aug 30 15:28:03 2016 +0200
loplugin:stringconstant: adapt to improved OUStringLiteral1 (filter)
Change-Id: I3c58c694e869c0825b90479ac572f6af9d030c4d
diff --git a/filter/source/msfilter/svdfppt.cxx b/filter/source/msfilter/svdfppt.cxx
index 7bf2191..3cf9ee9 100644
--- a/filter/source/msfilter/svdfppt.cxx
+++ b/filter/source/msfilter/svdfppt.cxx
@@ -6845,7 +6845,7 @@ PPTTextObj::PPTTextObj( SvStream& rIn, SdrPowerPointImport& rSdrPowerPointImport
}
else
{
- aStr += OUString(n);
+ aStr += OUStringLiteral1(n);
}
}
}
diff --git a/filter/source/svg/svgexport.cxx b/filter/source/svg/svgexport.cxx
index 61529da..715f25b 100644
--- a/filter/source/svg/svgexport.cxx
+++ b/filter/source/svg/svgexport.cxx
@@ -2317,7 +2317,7 @@ IMPL_LINK_TYPED( SVGFilter, CalcFieldHdl, EditFieldInfo*, pInfo, void )
UCharSet::const_iterator aChar = pCharSet->begin();
for( ; aChar != pCharSet->end(); ++aChar )
{
- aRepresentation += OUString( *aChar );
+ aRepresentation += OUStringLiteral1( *aChar );
}
}
pInfo->SetRepresentation( aRepresentation );
diff --git a/filter/source/xsltdialog/xmlfiltertabpagebasic.cxx b/filter/source/xsltdialog/xmlfiltertabpagebasic.cxx
index 8739824..e635798 100644
--- a/filter/source/xsltdialog/xmlfiltertabpagebasic.cxx
+++ b/filter/source/xsltdialog/xmlfiltertabpagebasic.cxx
@@ -74,7 +74,7 @@ static OUString checkExtensions( const OUString& rExtensions )
case sal_Unicode('*'):
break;
default:
- aRet += OUString( *pSource );
+ aRet += OUStringLiteral1( *pSource );
}
pSource++;
commit 5d268dcbaf135e4e03c39960ccc3a22cc75f170d
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Tue Aug 30 15:27:57 2016 +0200
loplugin:stringconstant: adapt to improved OUStringLiteral1 (embeddedobj)
Change-Id: I4d1d29155c09b15514f96a8b53f9865eefc78704
diff --git a/embeddedobj/source/msole/ownview.cxx b/embeddedobj/source/msole/ownview.cxx
index b81627f..6d81bef 100644
--- a/embeddedobj/source/msole/ownview.cxx
+++ b/embeddedobj/source/msole/ownview.cxx
@@ -299,7 +299,7 @@ bool OwnView_Impl::ReadContentsAndGenerateTempFile( const uno::Reference< io::XI
aReadSeq[0] == '.'
)
{
- aFileSuffix += OUString( (sal_Unicode) aReadSeq[0] );
+ aFileSuffix += OUStringLiteral1( aReadSeq[0] );
}
} while( aReadSeq[0] );
commit 0c9a71a7b2fd0a004e980724460a3763b76eb772
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Tue Aug 30 15:27:48 2016 +0200
loplugin:stringconstant: adapt to improved OUStringLiteral1 (editeng)
Change-Id: If8d2eb5e02a107cc1805e349a70df54160fed02a
diff --git a/editeng/source/accessibility/AccessibleStaticTextBase.cxx b/editeng/source/accessibility/AccessibleStaticTextBase.cxx
index bacc1dc..2e184f3 100644
--- a/editeng/source/accessibility/AccessibleStaticTextBase.cxx
+++ b/editeng/source/accessibility/AccessibleStaticTextBase.cxx
@@ -731,7 +731,7 @@ namespace accessibility
// paragraphs inbetween are fully included
for( ; i<aEndIndex.nPara; ++i )
{
- aRes += OUString(cNewLine);
+ aRes += OUStringLiteral1(cNewLine);
aRes += mpImpl->GetParagraph(i).getText();
}
@@ -741,7 +741,7 @@ namespace accessibility
//we need to add a "\n" before we add the last part of the string.
if ( !bEnd && aEndIndex.nIndex )
{
- aRes += OUString(cNewLine);
+ aRes += OUStringLiteral1(cNewLine);
}
aRes += mpImpl->GetParagraph(i).getTextRange( 0, aEndIndex.nIndex );
}
@@ -750,11 +750,11 @@ namespace accessibility
//or at the end of the result string.
if ( bStart )
{
- aRes = OUString(cNewLine) + aRes;
+ aRes = OUStringLiteral1(cNewLine) + aRes;
}
if ( bEnd )
{
- aRes += OUString(cNewLine);
+ aRes += OUStringLiteral1(cNewLine);
}
return aRes;
}
@@ -890,7 +890,7 @@ namespace accessibility
mpImpl->CorrectTextSegment( aResult, aPos.nPara );
if ( bLineBreak )
{
- aResult.SegmentText = OUString(cNewLine) + aResult.SegmentText;
+ aResult.SegmentText = OUStringLiteral1(cNewLine) + aResult.SegmentText;
}
}
diff --git a/editeng/source/editeng/impedit4.cxx b/editeng/source/editeng/impedit4.cxx
index 1b97adc..c231c84 100644
--- a/editeng/source/editeng/impedit4.cxx
+++ b/editeng/source/editeng/impedit4.cxx
@@ -1886,7 +1886,7 @@ Reference< XSpellAlternatives > ImpEditEngine::ImpSpell( EditView* pEditView )
if ( cNext == '.' )
{
aCurSel.Max().SetIndex( aCurSel.Max().GetIndex()+1 );
- aWord += OUString(cNext);
+ aWord += OUStringLiteral1(cNext);
}
}
@@ -1937,7 +1937,7 @@ Reference< XSpellAlternatives > ImpEditEngine::ImpFindNextError(EditSelection& r
if ( cNext == '.' )
{
aCurSel.Max().SetIndex( aCurSel.Max().GetIndex()+1 );
- aWord += OUString(cNext);
+ aWord += OUStringLiteral1(cNext);
}
}
diff --git a/editeng/source/items/textitem.cxx b/editeng/source/items/textitem.cxx
index 64efe96..ae857c8 100644
--- a/editeng/source/items/textitem.cxx
+++ b/editeng/source/items/textitem.cxx
@@ -2839,9 +2839,9 @@ bool SvxTwoLinesItem::GetPresentation( SfxItemPresentation /*ePres*/,
{
rText = EE_RESSTR( RID_SVXITEMS_TWOLINES );
if( GetStartBracket() )
- rText = OUString(GetStartBracket()) + rText;
+ rText = OUStringLiteral1(GetStartBracket()) + rText;
if( GetEndBracket() )
- rText += OUString(GetEndBracket());
+ rText += OUStringLiteral1(GetEndBracket());
}
return true;
}
diff --git a/editeng/source/lookuptree/Trie.cxx b/editeng/source/lookuptree/Trie.cxx
index 8f2fddb..cc5c126 100644
--- a/editeng/source/lookuptree/Trie.cxx
+++ b/editeng/source/lookuptree/Trie.cxx
@@ -120,7 +120,7 @@ void TrieNode::collectSuggestions(const OUString& sPath, vector<OUString>& rSugg
void TrieNode::collectSuggestionsForCurrentNode(TrieNode* pCurrent, const OUString& sPath, vector<OUString>& rSuggestionList)
{
- OUString aStringPath = sPath + OUString(pCurrent->mCharacter);
... etc. - the rest is truncated
More information about the Libreoffice-commits
mailing list