summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2014-12-17 15:47:01 +0100
committerStephan Bergmann <sbergman@redhat.com>2014-12-17 16:39:33 +0100
commit0f5e9170248df98ef7c7c6d475ff7d2bb9fa2214 (patch)
tree484d55e20e414c16202163b766fdd87777ebb46d /sw
parent0ba6360363fb73b5b200bbc486ed8eeac5f3d337 (diff)
Introduce rtl::OUStringLiteral1
...to use single ASCII character literals "more directly" in the OUString API (instead of having to go via an intermediary OUString ctor call). Especially useful for character literals that are defined as const variables or via macros ("direct" uses of character literals in the OUString API can often simply be replaced with single-character string literals, for improved readability). (The functions overloaded for OUStringLiteral1 are those that are actually used by the existing LO code; more could potentially be added. The asymmetry in the operator ==/!= parameter types is by design, though---writing code like 'x' == s is an abomination that shall not be abetted.) Change-Id: Ic5264714be7439eed56b5dfca6ccaee277306f1f
Diffstat (limited to 'sw')
-rw-r--r--sw/qa/core/uwriter.cxx4
-rw-r--r--sw/source/core/edit/autofmt.cxx5
-rw-r--r--sw/source/core/fields/cellfml.cxx6
-rw-r--r--sw/source/core/fields/dbfld.cxx2
-rw-r--r--sw/source/core/fields/tblcalc.cxx2
-rw-r--r--sw/source/core/frmedt/fetab.cxx4
-rw-r--r--sw/source/core/text/porexp.cxx2
-rw-r--r--sw/source/core/text/porfld.cxx2
-rw-r--r--sw/source/core/tox/tox.cxx4
-rw-r--r--sw/source/core/tox/txmsrt.cxx6
-rw-r--r--sw/source/filter/html/wrthtml.cxx2
-rw-r--r--sw/source/filter/ww8/wrtw8nds.cxx2
-rw-r--r--sw/source/filter/ww8/ww8par.cxx2
-rw-r--r--sw/source/ui/dbui/dbinsdlg.cxx2
-rw-r--r--sw/source/ui/dialog/ascfldlg.cxx2
-rw-r--r--sw/source/ui/frmdlg/frmdlg.cxx2
-rw-r--r--sw/source/ui/index/cnttab.cxx12
-rw-r--r--sw/source/ui/index/swuiidxmrk.cxx2
-rw-r--r--sw/source/ui/misc/glosbib.cxx8
-rw-r--r--sw/source/ui/misc/glossary.cxx12
-rw-r--r--sw/source/ui/vba/vbalisthelper.cxx88
-rw-r--r--sw/source/uibase/dochdl/gloshdl.cxx4
-rw-r--r--sw/source/uibase/misc/glosdoc.cxx10
-rw-r--r--sw/source/uibase/uno/unoatxt.cxx4
-rw-r--r--sw/source/uibase/utlui/gloslst.cxx2
25 files changed, 95 insertions, 96 deletions
diff --git a/sw/qa/core/uwriter.cxx b/sw/qa/core/uwriter.cxx
index e1de0209d6f4..f1232ccb4662 100644
--- a/sw/qa/core/uwriter.cxx
+++ b/sw/qa/core/uwriter.cxx
@@ -402,7 +402,7 @@ void SwDocTest::testModelToViewHelperExpandFieldsHideInvisible()
ModelToViewHelper aModelToViewHelper(*pTxtNode, HIDEINVISIBLE);
OUString sViewText = aModelToViewHelper.getViewText();
CPPUNIT_ASSERT_EQUAL(
- OUString("AAAAA CCCCC " + OUString(CH_TXTATR_BREAKWORD) + " DDDDD"),
+ OUString("AAAAA CCCCC " + OUStringLiteral1<CH_TXTATR_BREAKWORD>() + " DDDDD"),
sViewText);
}
@@ -413,7 +413,7 @@ void SwDocTest::testModelToViewHelperExpandFieldsHideRedlined()
ModelToViewHelper aModelToViewHelper(*pTxtNode, HIDEDELETIONS);
OUString sViewText = aModelToViewHelper.getViewText();
CPPUNIT_ASSERT_EQUAL(
- OUString("AAAABB " + OUString(CH_TXTATR_BREAKWORD) + " CCCCC " + OUString(CH_TXTATR_BREAKWORD) + " DDDDD"),
+ OUString("AAAABB " + OUStringLiteral1<CH_TXTATR_BREAKWORD>() + " CCCCC " + OUStringLiteral1<CH_TXTATR_BREAKWORD>() + " DDDDD"),
sViewText);
}
diff --git a/sw/source/core/edit/autofmt.cxx b/sw/source/core/edit/autofmt.cxx
index e3d7ebf92853..1410cac9a320 100644
--- a/sw/source/core/edit/autofmt.cxx
+++ b/sw/source/core/edit/autofmt.cxx
@@ -936,8 +936,7 @@ CHECK_ROMAN_5:
{
eScan |= CHG;
if( pPrefix )
- *pPrefix += OUString((sal_Unicode)1)
- + OUString::number( nStart );
+ *pPrefix += "\x01" + OUString::number( nStart );
}
eScan &= ~NO_DELIM; // remove Delim
eScan |= DELIM; // add Digit
@@ -954,7 +953,7 @@ CHECK_ROMAN_5:
return USHRT_MAX;
if( (NO_DELIM & eScan) && pPrefix ) // do not forget the last one
- *pPrefix += OUString((sal_Unicode)1) + OUString::number( nStart );
+ *pPrefix += "\x01" + OUString::number( nStart );
rPos = nPos;
return nDigitLvl; // 0 .. 9 (MAXLEVEL - 1)
diff --git a/sw/source/core/fields/cellfml.cxx b/sw/source/core/fields/cellfml.cxx
index 247a9391af84..ad34b2d179a5 100644
--- a/sw/source/core/fields/cellfml.cxx
+++ b/sw/source/core/fields/cellfml.cxx
@@ -856,12 +856,12 @@ static OUString lcl_BoxNmToRel( const SwTable& rTbl, const SwTableNode& rTblNd,
const OUString sCpy = sTmp; //JP 01.11.95: add rest from box name
- sTmp = OUString(cRelIdentifier) + OUString::number( nBox )
- + OUString(cRelSeparator) + OUString::number( nLine );
+ sTmp = OUStringLiteral1<cRelIdentifier>() + OUString::number( nBox )
+ + OUStringLiteral1<cRelSeparator>() + OUString::number( nLine );
if (!sCpy.isEmpty())
{
- sTmp += OUString(cRelSeparator) + sCpy;
+ sTmp += OUStringLiteral1<cRelSeparator>() + sCpy;
}
}
diff --git a/sw/source/core/fields/dbfld.cxx b/sw/source/core/fields/dbfld.cxx
index eca0e539ff62..fb724d29bcdf 100644
--- a/sw/source/core/fields/dbfld.cxx
+++ b/sw/source/core/fields/dbfld.cxx
@@ -474,7 +474,7 @@ OUString SwDBNameInfField::GetFieldName() const
OUString sStr( SwField::GetFieldName() );
if (!aDBData.sDataSource.isEmpty())
{
- sStr += OUString(':')
+ sStr += ":"
+ aDBData.sDataSource
+ OUString(DB_DELIM)
+ aDBData.sCommand;
diff --git a/sw/source/core/fields/tblcalc.cxx b/sw/source/core/fields/tblcalc.cxx
index ce191fbe4b97..2f2087f00d3b 100644
--- a/sw/source/core/fields/tblcalc.cxx
+++ b/sw/source/core/fields/tblcalc.cxx
@@ -56,7 +56,7 @@ SwTblField::SwTblField( SwTblFieldType* pInitType, const OUString& rFormel,
: SwValueField( pInitType, nFmt ), SwTableFormula( rFormel ),
nSubType(nType)
{
- sExpand = OUString('0');
+ sExpand = "0";
}
SwField* SwTblField::Copy() const
diff --git a/sw/source/core/frmedt/fetab.cxx b/sw/source/core/frmedt/fetab.cxx
index 35ab82331489..cef2cee83c70 100644
--- a/sw/source/core/frmedt/fetab.cxx
+++ b/sw/source/core/frmedt/fetab.cxx
@@ -2275,7 +2275,7 @@ bool SwFEShell::GetAutoSum( OUString& rFml ) const
GetTabBox()->GetFrmFmt()->GetTblBoxFormula(), aCells ))
break;
else if( USHRT_MAX != nBoxW )
- sFields = OUString(cListDelim) + sFields;
+ sFields = OUStringLiteral1<cListDelim>() + sFields;
else
break;
}
@@ -2300,7 +2300,7 @@ bool SwFEShell::GetAutoSum( OUString& rFml ) const
}
}
else
- sFields = OUString(cListDelim) + sFields;
+ sFields = OUStringLiteral1<cListDelim>() + sFields;
}
else if( USHRT_MAX == nBoxW )
break;
diff --git a/sw/source/core/text/porexp.cxx b/sw/source/core/text/porexp.cxx
index f3518494e017..50f23702c46a 100644
--- a/sw/source/core/text/porexp.cxx
+++ b/sw/source/core/text/porexp.cxx
@@ -232,7 +232,7 @@ bool SwPostItsPortion::Format( SwTxtFormatInfo &rInf )
bool SwPostItsPortion::GetExpTxt( const SwTxtSizeInfo &rInf, OUString &rTxt ) const
{
if( rInf.OnWin() && rInf.GetOpt().IsPostIts() )
- rTxt = OUString(' ');
+ rTxt = " ";
else
rTxt.clear();
return true;
diff --git a/sw/source/core/text/porfld.cxx b/sw/source/core/text/porfld.cxx
index 7b9a73702d1d..2db653d07a21 100644
--- a/sw/source/core/text/porfld.cxx
+++ b/sw/source/core/text/porfld.cxx
@@ -438,7 +438,7 @@ bool SwFldPortion::GetExpTxt( const SwTxtSizeInfo &rInf, OUString &rTxt ) const
!rInf.GetOpt().IsPagePreview() && !rInf.GetOpt().IsReadonly() &&
SwViewOption::IsFieldShadings() &&
!HasFollow() )
- rTxt = OUString(' ');
+ rTxt = " ";
return true;
}
diff --git a/sw/source/core/tox/tox.cxx b/sw/source/core/tox/tox.cxx
index 3e13274be437..146ce53b974c 100644
--- a/sw/source/core/tox/tox.cxx
+++ b/sw/source/core/tox/tox.cxx
@@ -626,9 +626,9 @@ OUString SwFormToken::GetString() const
+ OUString::number( nOutlineLevel );
break;
case TOKEN_TEXT:
- sData += OUString(TOX_STYLE_DELIMITER)
+ sData += OUStringLiteral1<TOX_STYLE_DELIMITER>()
+ sText.replaceAll(OUString(TOX_STYLE_DELIMITER), OUString())
- + OUString(TOX_STYLE_DELIMITER);
+ + OUStringLiteral1<TOX_STYLE_DELIMITER>();
break;
case TOKEN_AUTHORITY:
if (nAuthorityField<10)
diff --git a/sw/source/core/tox/txmsrt.cxx b/sw/source/core/tox/txmsrt.cxx
index 9dd601411c0f..ce75ce98950b 100644
--- a/sw/source/core/tox/txmsrt.cxx
+++ b/sw/source/core/tox/txmsrt.cxx
@@ -586,7 +586,7 @@ OUString SwTOXPara::GetURL() const
SwFrmFmt* pFly = pNd->GetFlyFmt();
if( pFly )
{
- aTxt = "#" + pFly->GetName() + OUString(cMarkSeparator);
+ aTxt = "#" + pFly->GetName() + OUStringLiteral1<cMarkSeparator>();
const sal_Char* pStr;
switch( eType )
{
@@ -602,7 +602,7 @@ OUString SwTOXPara::GetURL() const
break;
case nsSwTOXElement::TOX_SEQUENCE:
{
- aTxt = "#" + m_sSequenceName + OUString(cMarkSeparator)
+ aTxt = "#" + m_sSequenceName + OUStringLiteral1<cMarkSeparator>()
+ "sequence";
}
break;
@@ -654,7 +654,7 @@ OUString SwTOXTable::GetURL() const
if ( sName.isEmpty() )
return OUString();
- return "#" + sName + OUString(cMarkSeparator) + "table";
+ return "#" + sName + OUStringLiteral1<cMarkSeparator>() + "table";
}
SwTOXAuthority::SwTOXAuthority( const SwCntntNode& rNd,
diff --git a/sw/source/filter/html/wrthtml.cxx b/sw/source/filter/html/wrthtml.cxx
index fdead9ace3fe..07aa27f6bac7 100644
--- a/sw/source/filter/html/wrthtml.cxx
+++ b/sw/source/filter/html/wrthtml.cxx
@@ -1171,7 +1171,7 @@ void SwHTMLWriter::OutImplicitMark( const OUString& rMark,
if( !rMark.isEmpty() && !aImplicitMarks.empty() )
{
OUString sMark( rMark );
- sMark + OUString(cMarkSeparator) + OUString::createFromAscii(pMarkType);
+ sMark + OUStringLiteral1<cMarkSeparator>() + OUString::createFromAscii(pMarkType);
if( 0 != aImplicitMarks.erase( sMark ) )
{
OutAnchor(sMark.replace('?', '_')); // '?' causes problems in IE/Netscape 5
diff --git a/sw/source/filter/ww8/wrtw8nds.cxx b/sw/source/filter/ww8/wrtw8nds.cxx
index 12339906c9a0..4bcd6225b31f 100644
--- a/sw/source/filter/ww8/wrtw8nds.cxx
+++ b/sw/source/filter/ww8/wrtw8nds.cxx
@@ -2234,7 +2234,7 @@ void MSWordExportBase::OutputTextNode( const SwTxtNode& rNode )
{
// Insert tab for aesthetic purposes #i24762#
if ( aSnippet[0] != 0x09 )
- aSnippet = OUString( 0x09 ) + aSnippet;
+ aSnippet = "\x09" + aSnippet;
}
if ( bPostponeWritingText && ( FLY_POSTPONED != nStateOfFlyFrame ) )
diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
index 94962bc07ad3..7c42b694dc37 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -6351,7 +6351,7 @@ bool SwMSDffManager::GetOLEStorageName(long nOLEId, OUString& rStorageName,
if( bRet )
{
- rStorageName = OUString('_');
+ rStorageName = "_";
rStorageName += OUString::number(nPictureId);
rSrcStorage = rReader.pStg->OpenSotStorage(OUString(
SL::aObjectPool));
diff --git a/sw/source/ui/dbui/dbinsdlg.cxx b/sw/source/ui/dbui/dbinsdlg.cxx
index 4bbcd590f175..e25749690afc 100644
--- a/sw/source/ui/dbui/dbinsdlg.cxx
+++ b/sw/source/ui/dbui/dbinsdlg.cxx
@@ -573,7 +573,7 @@ IMPL_LINK( SwInsertDBColAutoPilot, TblToFromHdl, Button*, pButton )
// first delete the existing selection
aStr = aStr.replaceAt( nPos, nSel, "" );
- aFld = OUString(cDBFldStart) + aFld + OUString(cDBFldEnd);
+ aFld = OUStringLiteral1<cDBFldStart>() + aFld + OUStringLiteral1<cDBFldEnd>();
if( !aStr.isEmpty() )
{
if( nPos ) // one blank in front
diff --git a/sw/source/ui/dialog/ascfldlg.cxx b/sw/source/ui/dialog/ascfldlg.cxx
index 90d09a5476a4..f097f0f89903 100644
--- a/sw/source/ui/dialog/ascfldlg.cxx
+++ b/sw/source/ui/dialog/ascfldlg.cxx
@@ -277,7 +277,7 @@ void SwAsciiFilterDlg::FillOptions( SwAsciiOptions& rOptions )
if( -1 != nEnd )
GetExtraData() = GetExtraData().replaceAt( nStt, nEnd - nStt + 1, "" );
}
- GetExtraData() += sFindNm + sData + OUString(cDialogExtraDataClose);
+ GetExtraData() += sFindNm + sData + OUStringLiteral1<cDialogExtraDataClose>();
}
}
diff --git a/sw/source/ui/frmdlg/frmdlg.cxx b/sw/source/ui/frmdlg/frmdlg.cxx
index 94f5b90ed8ae..fbea5bf60151 100644
--- a/sw/source/ui/frmdlg/frmdlg.cxx
+++ b/sw/source/ui/frmdlg/frmdlg.cxx
@@ -82,7 +82,7 @@ SwFrmDlg::SwFrmDlg( SfxViewFrame* pViewFrame,
if(pStr)
{
- SetText(GetText() + SW_RESSTR(STR_COLL_HEADER) + *pStr + OUString(')'));
+ SetText(GetText() + SW_RESSTR(STR_COLL_HEADER) + *pStr + ")");
}
m_nStdId = AddTabPage("type", SwFrmPage::Create, 0);
diff --git a/sw/source/ui/index/cnttab.cxx b/sw/source/ui/index/cnttab.cxx
index 1703860b10d9..8bf0653b43d4 100644
--- a/sw/source/ui/index/cnttab.cxx
+++ b/sw/source/ui/index/cnttab.cxx
@@ -3536,9 +3536,9 @@ void SwTOXStylesTabPage::ActivatePage( const SfxItemSet& )
OUString aStr( SW_RES( STR_TITLE ));
if( !m_pCurrentForm->GetTemplate( 0 ).isEmpty() )
{
- aStr += " " + OUString(aDeliStart)
+ aStr += " " + OUStringLiteral1<aDeliStart>()
+ m_pCurrentForm->GetTemplate( 0 )
- + OUString(aDeliEnd);
+ + OUStringLiteral1<aDeliEnd>();
}
m_pLevelLB->InsertEntry(aStr);
@@ -3556,9 +3556,9 @@ void SwTOXStylesTabPage::ActivatePage( const SfxItemSet& )
}
if( !m_pCurrentForm->GetTemplate( i ).isEmpty() )
{
- aStr += " " + OUString(aDeliStart)
+ aStr += " " + OUStringLiteral1<aDeliStart>()
+ m_pCurrentForm->GetTemplate( i )
- + OUString(aDeliEnd);
+ + OUStringLiteral1<aDeliEnd>();
}
m_pLevelLB->InsertEntry( aStr );
}
@@ -3622,9 +3622,9 @@ IMPL_LINK_NOARG(SwTOXStylesTabPage, AssignHdl)
nTemplPos != LISTBOX_ENTRY_NOTFOUND)
{
const OUString aStr(m_pLevelLB->GetEntry(nLevPos).getToken(0, aDeliStart)
- + " " + OUString(aDeliStart)
+ + " " + OUStringLiteral1<aDeliStart>()
+ m_pParaLayLB->GetSelectEntry()
- + OUString(aDeliEnd));
+ + OUStringLiteral1<aDeliEnd>());
m_pCurrentForm->SetTemplate(nLevPos, m_pParaLayLB->GetSelectEntry());
diff --git a/sw/source/ui/index/swuiidxmrk.cxx b/sw/source/ui/index/swuiidxmrk.cxx
index e70c697e8013..6e76ef318c5f 100644
--- a/sw/source/ui/index/swuiidxmrk.cxx
+++ b/sw/source/ui/index/swuiidxmrk.cxx
@@ -1214,7 +1214,7 @@ IMPL_LINK_NOARG(SwAuthorMarkPane, InsertHdl)
OUString sFields;
for(int i = 0; i < AUTH_FIELD_END; i++)
{
- sFields += m_sFields[i] + OUString(TOX_STYLE_DELIMITER);
+ sFields += m_sFields[i] + OUStringLiteral1<TOX_STYLE_DELIMITER>();
}
if(bNewEntry)
{
diff --git a/sw/source/ui/misc/glosbib.cxx b/sw/source/ui/misc/glosbib.cxx
index 6f93bc1e30ae..ca1eff0631ad 100644
--- a/sw/source/ui/misc/glosbib.cxx
+++ b/sw/source/ui/misc/glosbib.cxx
@@ -198,7 +198,7 @@ IMPL_LINK( SwGlossaryGroupDlg, SelectHdl, SvTabListBox*, EMPTYARG )
IMPL_LINK_NOARG(SwGlossaryGroupDlg, NewHdl)
{
OUString sGroup = m_pNameED->GetText()
- + OUString(GLOS_DELIM)
+ + OUStringLiteral1<GLOS_DELIM>()
+ OUString::number(m_pPathLB->GetSelectEntryPos());
OSL_ENSURE(!pGlosHdl->FindGroupName(sGroup), "group already available!");
m_InsertedArr.push_back(sGroup);
@@ -274,7 +274,7 @@ IMPL_LINK_NOARG(SwGlossaryGroupDlg, RenameHdl)
const OUString sNewTitle(m_pNameED->GetText());
OUString sNewName = sNewTitle
- + OUString(GLOS_DELIM)
+ + OUStringLiteral1<GLOS_DELIM>()
+ OUString::number(m_pPathLB->GetSelectEntryPos());
OSL_ENSURE(!pGlosHdl->FindGroupName(sNewName), "group already available!");
@@ -293,8 +293,8 @@ IMPL_LINK_NOARG(SwGlossaryGroupDlg, RenameHdl)
}
if(!bDone)
{
- sEntry += OUString(RENAME_TOKEN_DELIM) + sNewName
- + OUString(RENAME_TOKEN_DELIM) + sNewTitle;
+ sEntry += OUStringLiteral1<RENAME_TOKEN_DELIM>() + sNewName
+ + OUStringLiteral1<RENAME_TOKEN_DELIM>() + sNewTitle;
m_RenamedArr.push_back(sEntry);
}
delete (GlosBibUserData*)pEntry->GetUserData();
diff --git a/sw/source/ui/misc/glossary.cxx b/sw/source/ui/misc/glossary.cxx
index 2b9a3d536b13..db6123318cb7 100644
--- a/sw/source/ui/misc/glossary.cxx
+++ b/sw/source/ui/misc/glossary.cxx
@@ -245,7 +245,7 @@ IMPL_LINK( SwGlossaryDlg, GrpSelect, SvTreeListBox *, pBox )
SvTreeListEntry* pParent = pBox->GetParent(pEntry) ? pBox->GetParent(pEntry) : pEntry;
GroupUserData* pGroupData = (GroupUserData*)pParent->GetUserData();
::SetCurrGlosGroup(pGroupData->sGroupName
- + OUString(GLOS_DELIM)
+ + OUStringLiteral1<GLOS_DELIM>()
+ OUString::number(pGroupData->nPathIdx));
pGlossaryHdl->SetCurGroup(::GetCurrGlosGroup());
// set current text block
@@ -629,7 +629,7 @@ IMPL_LINK_NOARG(SwGlossaryDlg, BibHdl)
{
GroupUserData* pGroupData = (GroupUserData*)pEntry->GetUserData();
const OUString sGroup = pGroupData->sGroupName
- + OUString(GLOS_DELIM)
+ + OUStringLiteral1<GLOS_DELIM>()
+ OUString::number(pGroupData->nPathIdx);
if(sGroup == sNewGroup)
{
@@ -901,7 +901,7 @@ DragDropMode SwGlTreeListBox::NotifyStartDrag(
GroupUserData* pGroupData = (GroupUserData*)pParent->GetUserData();
OUString sEntry = pGroupData->sGroupName
- + OUString(GLOS_DELIM)
+ + OUStringLiteral1<GLOS_DELIM>()
+ OUString::number(pGroupData->nPathIdx);
sal_Int8 nDragOption = DND_ACTION_COPY;
eRet = SV_DRAGDROP_CTRL_COPY;
@@ -966,7 +966,7 @@ TriState SwGlTreeListBox::NotifyCopyingOrMoving(
GroupUserData* pGroupData = (GroupUserData*)pSrcParent->GetUserData();
OUString sSourceGroup = pGroupData->sGroupName
- + OUString(GLOS_DELIM)
+ + OUStringLiteral1<GLOS_DELIM>()
+ OUString::number(pGroupData->nPathIdx);
pDlg->pGlossaryHdl->SetCurGroup(sSourceGroup);
@@ -975,7 +975,7 @@ TriState SwGlTreeListBox::NotifyCopyingOrMoving(
GroupUserData* pDestData = (GroupUserData*)pDestParent->GetUserData();
OUString sDestName = pDestData->sGroupName
- + OUString(GLOS_DELIM)
+ + OUStringLiteral1<GLOS_DELIM>()
+ OUString::number(pDestData->nPathIdx);
bRet = pDlg->pGlossaryHdl->CopyOrMove( sSourceGroup, sShortName,
@@ -1001,7 +1001,7 @@ OUString SwGlossaryDlg::GetCurrGrpName() const
pEntry =
m_pCategoryBox->GetParent(pEntry) ? m_pCategoryBox->GetParent(pEntry) : pEntry;
GroupUserData* pGroupData = (GroupUserData*)pEntry->GetUserData();
- return pGroupData->sGroupName + OUString(GLOS_DELIM) + OUString::number(pGroupData->nPathIdx);
+ return pGroupData->sGroupName + OUStringLiteral1<GLOS_DELIM>() + OUString::number(pGroupData->nPathIdx);
}
return OUString();
}
diff --git a/sw/source/ui/vba/vbalisthelper.cxx b/sw/source/ui/vba/vbalisthelper.cxx
index 542302e0ccc0..2cec7b34bcbf 100644
--- a/sw/source/ui/vba/vbalisthelper.cxx
+++ b/sw/source/ui/vba/vbalisthelper.cxx
@@ -151,7 +151,7 @@ void SwVbaListHelper::CreateBulletListTemplate() throw( css::uno::RuntimeExcepti
}
case 2:
{
- aBulletChar = OUString( sal_Unicode( CHAR_EMPTY_DOT ) );
+ aBulletChar = OUStringLiteral1<CHAR_EMPTY_DOT>();
break;
}
case 3:
@@ -204,43 +204,43 @@ void SwVbaListHelper::CreateNumberListTemplate() throw( css::uno::RuntimeExcepti
case 1:
{
nNumberingType = style::NumberingType::ARABIC;
- sSuffix = OUString( '.' );
+ sSuffix = ".";
break;
}
case 2:
{
nNumberingType = style::NumberingType::ARABIC;
- sSuffix = OUString( ')' );
+ sSuffix = ")";
break;
}
case 3:
{
nNumberingType = style::NumberingType::ROMAN_UPPER;
- sSuffix = OUString( '.' );
+ sSuffix = ".";
break;
}
case 4:
{
nNumberingType = style::NumberingType::CHARS_UPPER_LETTER;
- sSuffix = OUString( '.' );
+ sSuffix = ".";
break;
}
case 5:
{
nNumberingType = style::NumberingType::CHARS_LOWER_LETTER;
- sSuffix = OUString( ')' );
+ sSuffix = ")";
break;
}
case 6:
{
nNumberingType = style::NumberingType::CHARS_LOWER_LETTER;
- sSuffix = OUString( '.' );
+ sSuffix = ".";
break;
}
case 7:
{
nNumberingType = style::NumberingType::ROMAN_LOWER;
- sSuffix = OUString( '.' );
+ sSuffix = ".";
break;
}
default:
@@ -319,56 +319,56 @@ void SwVbaListHelper::CreateOutlineNumberForType1() throw( css::uno::RuntimeExce
{
nNumberingType = style::NumberingType::ARABIC;
sPrefix.clear();
- sSuffix = OUString( ')' );
+ sSuffix = ")";
break;
}
case 2:
{
nNumberingType = style::NumberingType::ROMAN_LOWER;
sPrefix.clear();
- sSuffix = OUString( ')' );
+ sSuffix = ")";
break;
}
case 3:
{
nNumberingType = style::NumberingType::ARABIC;
- sPrefix = OUString( '(' );
- sSuffix = OUString( ')' );
+ sPrefix = "(";
+ sSuffix = ")";
break;
}
case 4:
{
nNumberingType = style::NumberingType::CHARS_LOWER_LETTER;
- sPrefix = OUString( '(' );
- sSuffix = OUString( ')' );
+ sPrefix = "(";
+ sSuffix = ")";
break;
}
case 5:
{
nNumberingType = style::NumberingType::ROMAN_LOWER;
- sPrefix = OUString( '(' );
- sSuffix = OUString( ')' );
+ sPrefix = "(";
+ sSuffix = ")";
break;
}
case 6:
{
nNumberingType = style::NumberingType::ARABIC;
sPrefix.clear();
- sSuffix = OUString( '.' );
+ sSuffix = ".";
break;
}
case 7:
{
nNumberingType = style::NumberingType::CHARS_LOWER_LETTER;
sPrefix.clear();
- sSuffix = OUString( '.' );
+ sSuffix = ".";
break;
}
case 8:
{
nNumberingType = style::NumberingType::ROMAN_LOWER;
sPrefix.clear();
- sSuffix = OUString( '.' );
+ sSuffix = ".";
break;
}
}
@@ -465,14 +465,14 @@ void SwVbaListHelper::CreateOutlineNumberForType4() throw( css::uno::RuntimeExce
{
nNumberingType = style::NumberingType::ROMAN_UPPER;
sPrefix.clear();
- sSuffix = OUString( '.' );
+ sSuffix = ".";
break;
}
case 1:
{
nNumberingType = style::NumberingType::ARABIC;
sPrefix.clear();
- sSuffix = OUString( '.' );
+ sSuffix = ".";
sal_Int16 nParentNumbering = 0;
setOrAppendPropertyValue( aPropertyValues, OUString(UNO_NAME_PARENT_NUMBERING ), uno::makeAny( nParentNumbering ) );
break;
@@ -480,50 +480,50 @@ void SwVbaListHelper::CreateOutlineNumberForType4() throw( css::uno::RuntimeExce
case 2:
{
nNumberingType = style::NumberingType::CHARS_LOWER_LETTER;
- sPrefix = OUString( '(' );
- sSuffix = OUString( ')' );
+ sPrefix = "(";
+ sSuffix = ")";
break;
}
case 3:
{
nNumberingType = style::NumberingType::ROMAN_LOWER;
- sPrefix = OUString( '(' );
- sSuffix = OUString( ')' );
+ sPrefix = "(";
+ sSuffix = ")";
break;
}
case 4:
{
nNumberingType = style::NumberingType::ARABIC;
sPrefix.clear();
- sSuffix = OUString( ')' );
+ sSuffix = ")";
break;
}
case 5:
{
nNumberingType = style::NumberingType::CHARS_LOWER_LETTER;
sPrefix.clear();
- sSuffix = OUString( ')' );
+ sSuffix = ")";
break;
}
case 6:
{
nNumberingType = style::NumberingType::ROMAN_LOWER;
sPrefix.clear();
- sSuffix = OUString( ')' );
+ sSuffix = ")";
break;
}
case 7:
{
nNumberingType = style::NumberingType::CHARS_LOWER_LETTER;
sPrefix.clear();
- sSuffix = OUString( '.' );
+ sSuffix = ".";
break;
}
case 8:
{
nNumberingType = style::NumberingType::ROMAN_LOWER;
sPrefix.clear();
- sSuffix = OUString( '.' );
+ sSuffix = ".";
break;
}
}
@@ -569,63 +569,63 @@ void SwVbaListHelper::CreateOutlineNumberForType6() throw( css::uno::RuntimeExce
{
nNumberingType = style::NumberingType::ROMAN_UPPER;
sPrefix.clear();
- sSuffix = OUString( '.' );
+ sSuffix = ".";
break;
}
case 1:
{
nNumberingType = style::NumberingType::CHARS_UPPER_LETTER;
sPrefix.clear();
- sSuffix = OUString( '.' );
+ sSuffix = ".";
break;
}
case 2:
{
nNumberingType = style::NumberingType::ARABIC;
sPrefix.clear();
- sSuffix = OUString( ')' );
+ sSuffix = ")";
break;
}
case 3:
{
nNumberingType = style::NumberingType::CHARS_LOWER_LETTER;
sPrefix.clear();
- sSuffix = OUString( ')' );
+ sSuffix = ")";
break;
}
case 4:
{
nNumberingType = style::NumberingType::ARABIC;
- sPrefix = OUString( '(' );
- sSuffix = OUString( ')' );
+ sPrefix = "(";
+ sSuffix = ")";
break;
}
case 5:
{
nNumberingType = style::NumberingType::CHARS_LOWER_LETTER;
- sPrefix = OUString( '(' );
- sSuffix = OUString( ')' );
+ sPrefix = "(";
+ sSuffix = ")";
break;
}
case 6:
{
nNumberingType = style::NumberingType::ROMAN_LOWER;
- sPrefix = OUString( '(' );
- sSuffix = OUString( ')' );
+ sPrefix = "(";
+ sSuffix = ")";
break;
}
case 7:
{
nNumberingType = style::NumberingType::CHARS_LOWER_LETTER;
- sPrefix = OUString( '(' );
- sSuffix = OUString( '.' );
+ sPrefix = "(";
+ sSuffix = ".";
break;
}
case 8:
{
nNumberingType = style::NumberingType::ROMAN_LOWER;
- sPrefix = OUString( '(' );
- sSuffix = OUString( '.' );
+ sPrefix = "(";
+ sSuffix = ".";
break;
}
}
diff --git a/sw/source/uibase/dochdl/gloshdl.cxx b/sw/source/uibase/dochdl/gloshdl.cxx
index eada932a3124..cf9ae1509940 100644
--- a/sw/source/uibase/dochdl/gloshdl.cxx
+++ b/sw/source/uibase/dochdl/gloshdl.cxx
@@ -106,7 +106,7 @@ void SwGlossaryHdl::SetCurGroup(const OUString &rGrp, bool bApi, bool bAlwaysCre
OUString sGroup(rGrp);
if (sGroup.indexOf(GLOS_DELIM)<0 && !FindGroupName(sGroup))
{
- sGroup += OUString(GLOS_DELIM) + "0";
+ sGroup += OUStringLiteral1<GLOS_DELIM>() + "0";
}
if(pCurGrp)
{
@@ -204,7 +204,7 @@ bool SwGlossaryHdl::RenameGroup(const OUString& rOld, OUString& rNew, const OUSt
OUString sNewGroup(rNew);
if (sNewGroup.indexOf(GLOS_DELIM)<0)
{
- sNewGroup += OUString(GLOS_DELIM) + "0";
+ sNewGroup += OUStringLiteral1<GLOS_DELIM>() + "0";
}
bRet = rStatGlossaries.RenameGroupDoc(sOldGroup, sNewGroup, rNewTitle);
rNew = sNewGroup;
diff --git a/sw/source/uibase/misc/glosdoc.cxx b/sw/source/uibase/misc/glosdoc.cxx
index 38bdfc6fe42a..8acbe1e754df 100644
--- a/sw/source/uibase/misc/glosdoc.cxx
+++ b/sw/source/uibase/misc/glosdoc.cxx
@@ -188,7 +188,7 @@ bool SwGlossaries::NewGroupDoc(OUString& rGroupName, const OUString& rTitle)
return false;
const OUString sNewFilePath(m_PathArr[nNewPath]);
const OUString sNewGroup = lcl_CheckFileName(sNewFilePath, rGroupName.getToken(0, GLOS_DELIM))
- + OUString(GLOS_DELIM) + sNewPath;
+ + OUStringLiteral1<GLOS_DELIM>() + sNewPath;
SwTextBlocks *pBlock = GetGlosDoc( sNewGroup );
if(pBlock)
{
@@ -236,7 +236,7 @@ bool SwGlossaries::RenameGroupDoc(
RemoveFileFromList( rOldGroup );
- rNewGroup = sNewFileName + OUString(GLOS_DELIM) + OUString::number(nNewPath);
+ rNewGroup = sNewFileName + OUStringLiteral1<GLOS_DELIM>() + OUString::number(nNewPath);
if (m_GlosArr.empty())
{
GetNameList();
@@ -260,7 +260,7 @@ bool SwGlossaries::DelGroupDoc(const OUString &rName)
return false;
const OUString sBaseName(rName.getToken(0, GLOS_DELIM));
const OUString sFileURL = lcl_FullPathName(m_PathArr[nPath], sBaseName);
- const OUString aName = sBaseName + OUString(GLOS_DELIM) + OUString::number(nPath);
+ const OUString aName = sBaseName + OUStringLiteral1<GLOS_DELIM>() + OUString::number(nPath);
// Even if the file doesn't exist it has to be deleted from
// the list of text block regions
// no && because of CFfront
@@ -323,14 +323,14 @@ std::vector<OUString> & SwGlossaries::GetNameList()
{
const OUString aTitle = *filesIt;
const OUString sName( aTitle.copy( 0, aTitle.getLength() - sExt.getLength() )
- + OUString(GLOS_DELIM) + OUString::number( static_cast<sal_Int16>(i) ));
+ + OUStringLiteral1<GLOS_DELIM>() + OUString::number( static_cast<sal_Int16>(i) ));
m_GlosArr.push_back(sName);
}
}
if (m_GlosArr.empty())
{
// the standard block is inside of the path's first part
- m_GlosArr.push_back( SwGlossaries::GetDefName() + OUString(GLOS_DELIM) + "0" );
+ m_GlosArr.push_back( SwGlossaries::GetDefName() + OUStringLiteral1<GLOS_DELIM>() + "0" );
}
}
return m_GlosArr;
diff --git a/sw/source/uibase/uno/unoatxt.cxx b/sw/source/uibase/uno/unoatxt.cxx
index 02870aaf5851..9b237ffe2c1a 100644
--- a/sw/source/uibase/uno/unoatxt.cxx
+++ b/sw/source/uibase/uno/unoatxt.cxx
@@ -197,7 +197,7 @@ uno::Reference< text::XAutoTextGroup > SwXAutoTextContainer::insertNewByName(
OUString sGroup(aGroupName);
if (sGroup.indexOf(GLOS_DELIM)<0)
{
- sGroup += OUString(GLOS_DELIM) + "0";
+ sGroup += OUStringLiteral1<GLOS_DELIM>() + "0";
}
pGlossaries->NewGroupDoc(sGroup, sGroup.getToken(0, GLOS_DELIM));
@@ -505,7 +505,7 @@ void SwXAutoTextGroup::setName(const OUString& rName) throw( uno::RuntimeExcepti
OUString sNewGroup(rName);
if (sNewGroup.indexOf(GLOS_DELIM)<0)
{
- sNewGroup += OUString(GLOS_DELIM) + "0";
+ sNewGroup += OUStringLiteral1<GLOS_DELIM>() + "0";
}
//the name must be saved, the group may be invalidated while in RenameGroupDoc()
diff --git a/sw/source/uibase/utlui/gloslst.cxx b/sw/source/uibase/utlui/gloslst.cxx
index ad506f5fcf0b..13f148656ac8 100644
--- a/sw/source/uibase/utlui/gloslst.cxx
+++ b/sw/source/uibase/utlui/gloslst.cxx
@@ -290,7 +290,7 @@ void SwGlossaryList::Update()
OUString sName( aTitle.copy( 0, aTitle.getLength() - sExt.getLength() ));
aFoundGroupNames.push_back(sName);
- sName += OUString(GLOS_DELIM) + OUString::number( static_cast<sal_uInt16>(nPath) );
+ sName += OUStringLiteral1<GLOS_DELIM>() + OUString::number( static_cast<sal_uInt16>(nPath) );
AutoTextGroup* pFound = FindGroup( sName );
if( !pFound )
{