summaryrefslogtreecommitdiff
path: root/sw/source
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2016-08-30 15:29:41 +0200
committerStephan Bergmann <sbergman@redhat.com>2016-08-30 15:29:41 +0200
commit32f9120fa076ef9dcee1d29e0a596a36aade353c (patch)
tree8f5ca4bc9f37598ee2e04726a124ed767a826edd /sw/source
parent185c3c8207de78ebb4f4dc053b5fe16f810929cc (diff)
loplugin:stringconstant: adapt to improved OUStringLiteral1 (sw)
Change-Id: Ifa1a6bafd3628b48ebceb09f8cd864361848e81c
Diffstat (limited to 'sw/source')
-rw-r--r--sw/source/core/access/accportions.cxx2
-rw-r--r--sw/source/core/edit/autofmt.cxx10
-rw-r--r--sw/source/core/edit/editsh.cxx2
-rw-r--r--sw/source/core/fields/authfld.cxx2
-rw-r--r--sw/source/core/fields/cellfml.cxx24
-rw-r--r--sw/source/core/table/swtable.cxx4
-rw-r--r--sw/source/core/text/porfld.cxx2
-rw-r--r--sw/source/core/tox/ToxTextGenerator.cxx6
-rw-r--r--sw/source/core/tox/tox.cxx2
-rw-r--r--sw/source/core/undo/unins.cxx2
-rw-r--r--sw/source/core/undo/unovwr.cxx8
-rw-r--r--sw/source/filter/html/css1atr.cxx4
-rw-r--r--sw/source/filter/html/htmlftn.cxx6
-rw-r--r--sw/source/filter/ww8/wrtw8nds.cxx2
-rw-r--r--sw/source/filter/ww8/ww8par2.cxx4
-rw-r--r--sw/source/filter/ww8/ww8par3.cxx2
-rw-r--r--sw/source/ui/index/cnttab.cxx8
-rw-r--r--sw/source/ui/misc/bookmark.cxx4
-rw-r--r--sw/source/ui/misc/glossary.cxx2
-rw-r--r--sw/source/ui/vba/vbatablehelper.cxx4
-rw-r--r--sw/source/ui/vba/vbatemplate.cxx2
-rw-r--r--sw/source/uibase/app/docstyle.cxx2
-rw-r--r--sw/source/uibase/config/modcfg.cxx6
-rw-r--r--sw/source/uibase/dbui/dbmgr.cxx2
-rw-r--r--sw/source/uibase/dbui/mmconfigitem.cxx2
-rw-r--r--sw/source/uibase/docvw/edtwin.cxx2
-rw-r--r--sw/source/uibase/sidebar/PageSizeControl.cxx2
-rw-r--r--sw/source/uibase/wrtsh/wrtsh1.cxx2
28 files changed, 60 insertions, 60 deletions
diff --git a/sw/source/core/access/accportions.cxx b/sw/source/core/access/accportions.cxx
index ec6eb87ae886..315b83ffc165 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 61a87aa71012..22ba7c6e595c 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 7fa98e0be980..20b576547a53 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 ed0b65d9acfc..76004ccc0b7a 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 959b87109e04..cb8da529f2dd 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 617bf177c4d8..4ae7636876bb 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 8c489de68590..b06affbf068e 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 dade91ce2065..5c868d3a3321 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 83d42b8074da..f05f5d22cea3 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 02bb04dbb1b6..ef84ed184b47 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 a64586a0031d..0f537eaeaa3d 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 238bc1bb7c03..44f0bd517cc6 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 686fbc399ca7..f6a8d0251050 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 327b169e89d9..dc070a66c5ef 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 cc60100bcb7e..b483fbcff414 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 801184beae10..782ae88a610a 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 9e0b2ccdc3ff..5f6373771e3a 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 1a94408163b2..ec6f3a306ea5 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 33de3ebcf575..9deb0fe237fd 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 62b81aeb8d14..19d333b660e9 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 6d8d1dd45276..69ff6ee85fea 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 4506dfb9d5dd..f7a176a54d32 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 0d954ab60de7..eb3be3341226 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 8b9206616564..f906c5535a40 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 14b13a1aecf7..7ff7008ce374 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 1c637baec29d..e493e719c9c4 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 98784d3e625f..4ad77aee5727 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 c096eec78fdc..dbe9b27335ab 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) );