summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
Diffstat (limited to 'sw')
-rw-r--r--sw/inc/swtypes.hxx3
-rw-r--r--sw/source/core/access/accpara.cxx2
-rw-r--r--sw/source/core/access/accportions.cxx2
-rw-r--r--sw/source/core/bastyp/swtypes.cxx4
-rw-r--r--sw/source/core/crsr/bookmrk.cxx4
-rw-r--r--sw/source/core/crsr/findtxt.cxx2
-rw-r--r--sw/source/core/doc/docdraw.cxx2
-rw-r--r--sw/source/core/doc/docedt.cxx2
-rw-r--r--sw/source/core/doc/doctxm.cxx9
-rw-r--r--sw/source/core/docnode/ndsect.cxx2
-rw-r--r--sw/source/core/docnode/ndtbl.cxx2
-rw-r--r--sw/source/core/edit/autofmt.cxx20
-rw-r--r--sw/source/core/edit/editsh.cxx2
-rw-r--r--sw/source/core/edit/edlingu.cxx2
-rw-r--r--sw/source/core/edit/edtox.cxx8
-rw-r--r--sw/source/core/fields/cellfml.cxx2
-rw-r--r--sw/source/core/fields/docufld.cxx7
-rw-r--r--sw/source/core/fields/tblcalc.cxx3
-rw-r--r--sw/source/core/frmedt/fetab.cxx9
-rw-r--r--sw/source/core/text/frmpaint.cxx2
-rw-r--r--sw/source/core/text/inftxt.cxx2
-rw-r--r--sw/source/core/text/itratr.cxx6
-rw-r--r--sw/source/core/text/porexp.cxx2
-rw-r--r--sw/source/core/text/porfld.cxx2
-rw-r--r--sw/source/core/text/porfly.cxx2
-rw-r--r--sw/source/core/text/porglue.cxx4
-rw-r--r--sw/source/core/text/pormulti.cxx8
-rw-r--r--sw/source/core/text/porref.cxx2
-rw-r--r--sw/source/core/text/porrst.cxx4
-rw-r--r--sw/source/core/text/portox.cxx2
-rw-r--r--sw/source/core/text/portxt.cxx4
-rw-r--r--sw/source/core/text/txthyph.cxx6
-rw-r--r--sw/source/core/text/txttab.cxx6
-rw-r--r--sw/source/core/txtnode/fntcache.cxx4
-rw-r--r--sw/source/core/txtnode/thints.cxx6
-rw-r--r--sw/source/core/txtnode/txtedt.cxx2
-rw-r--r--sw/source/core/undo/undel.cxx2
-rw-r--r--sw/source/core/undo/undobj.cxx2
-rw-r--r--sw/source/core/undo/unins.cxx2
-rw-r--r--sw/source/core/undo/unovwr.cxx14
-rw-r--r--sw/source/core/unocore/unofield.cxx2
-rw-r--r--sw/source/core/unocore/unoidx.cxx2
-rw-r--r--sw/source/core/unocore/unotext.cxx2
-rw-r--r--sw/source/filter/html/css1atr.cxx2
-rw-r--r--sw/source/filter/html/swhtml.cxx14
-rw-r--r--sw/source/filter/rtf/rtffld.cxx6
-rw-r--r--sw/source/filter/rtf/swparrtf.cxx2
-rw-r--r--sw/source/filter/ww1/fltshell.cxx2
-rw-r--r--sw/source/filter/ww1/w1filter.cxx2
-rw-r--r--sw/source/filter/ww8/wrtw8num.cxx2
-rw-r--r--sw/source/filter/ww8/wrtww8gr.cxx2
-rw-r--r--sw/source/filter/ww8/ww8atr.cxx4
-rw-r--r--sw/source/filter/ww8/ww8graf.cxx10
-rw-r--r--sw/source/filter/ww8/ww8par.cxx10
-rw-r--r--sw/source/filter/ww8/ww8par4.cxx2
-rw-r--r--sw/source/filter/ww8/ww8par5.cxx18
-rw-r--r--sw/source/filter/xml/xmltbli.cxx2
-rw-r--r--sw/source/ui/app/applab.cxx9
-rw-r--r--sw/source/ui/app/docsh2.cxx2
-rw-r--r--sw/source/ui/app/docstyle.cxx4
-rw-r--r--sw/source/ui/cctrl/actctrl.cxx2
-rw-r--r--sw/source/ui/chrdlg/drpcps.cxx2
-rw-r--r--sw/source/ui/dbui/addresslistdialog.cxx2
-rw-r--r--sw/source/ui/dbui/dbmgr.cxx7
-rw-r--r--sw/source/ui/dbui/mmaddressblockpage.cxx6
-rw-r--r--sw/source/ui/dbui/mmconfigitem.cxx2
-rw-r--r--sw/source/ui/dbui/mmoutputpage.cxx2
-rw-r--r--sw/source/ui/dialog/regionsw.cxx2
-rw-r--r--sw/source/ui/docvw/edtwin.cxx2
-rw-r--r--sw/source/ui/docvw/srcedtw.cxx2
-rw-r--r--sw/source/ui/envelp/envlop1.cxx21
-rw-r--r--sw/source/ui/envelp/label1.cxx21
-rw-r--r--sw/source/ui/envelp/labfmt.cxx2
-rw-r--r--sw/source/ui/envelp/mailmrge.cxx2
-rw-r--r--sw/source/ui/fldui/fldmgr.cxx2
-rw-r--r--sw/source/ui/fldui/fldpage.cxx4
-rw-r--r--sw/source/ui/fldui/fldvar.cxx2
-rw-r--r--sw/source/ui/frmdlg/column.cxx2
-rw-r--r--sw/source/ui/frmdlg/cption.cxx7
-rw-r--r--sw/source/ui/index/cnttab.cxx21
-rw-r--r--sw/source/ui/misc/bookmark.cxx2
-rw-r--r--sw/source/ui/misc/glossary.cxx2
-rw-r--r--sw/source/ui/misc/outline.cxx4
-rw-r--r--sw/source/ui/misc/srtdlg.cxx4
-rw-r--r--sw/source/ui/ribbar/inputwin.cxx18
-rw-r--r--sw/source/ui/shells/annotsh.cxx2
-rw-r--r--sw/source/ui/shells/basesh.cxx2
-rw-r--r--sw/source/ui/shells/drwtxtsh.cxx2
-rw-r--r--sw/source/ui/shells/textsh.cxx6
-rw-r--r--sw/source/ui/table/convert.cxx2
-rw-r--r--sw/source/ui/table/tabledlg.cxx5
-rw-r--r--sw/source/ui/uiview/srcview.cxx2
-rw-r--r--sw/source/ui/uno/unomailmerge.cxx2
-rw-r--r--sw/source/ui/uno/unotxdoc.cxx4
-rw-r--r--sw/source/ui/utlui/prcntfld.cxx2
-rw-r--r--sw/source/ui/wrtsh/wrtsh1.cxx2
96 files changed, 225 insertions, 219 deletions
diff --git a/sw/inc/swtypes.hxx b/sw/inc/swtypes.hxx
index 1b01121d1184..465901240b31 100644
--- a/sw/inc/swtypes.hxx
+++ b/sw/inc/swtypes.hxx
@@ -27,6 +27,7 @@
************************************************************************/
#ifndef _SWTYPES_HXX
#define _SWTYPES_HXX
+#include <rtl/ustring.hxx>
#include <tools/solar.h>
#include <SwGetPoolIdFromName.hxx>
@@ -89,7 +90,7 @@ const SwTwips lMinBorder = 1134;
// Constant strings.
SW_DLLPUBLIC extern UniString aEmptyStr; // ""
-SW_DLLPUBLIC extern UniString aDotStr; // '.'
+SW_DLLPUBLIC extern rtl::OUString aDotStr; // '.'
// For inserting of captions (what and where to insert).
// It's here because it is not big enough to justify its own hxx
diff --git a/sw/source/core/access/accpara.cxx b/sw/source/core/access/accpara.cxx
index 59249ad57a92..0ae229aefcb8 100644
--- a/sw/source/core/access/accpara.cxx
+++ b/sw/source/core/access/accpara.cxx
@@ -662,7 +662,7 @@ sal_Bool SwAccessibleParagraph::GetWordBoundary(
// It's a word if the first character is an alpha-numeric character.
bRet = GetAppCharClass().isLetterNumeric(
- rText.getStr()[ rBound.startPos ] );
+ rtl::OUString(rText[rBound.startPos]) );
}
else
{
diff --git a/sw/source/core/access/accportions.cxx b/sw/source/core/access/accportions.cxx
index 0da4e0adb383..a2b039d862f1 100644
--- a/sw/source/core/access/accportions.cxx
+++ b/sw/source/core/access/accportions.cxx
@@ -158,7 +158,7 @@ void SwAccessiblePortionData::Special(
case POR_POSTITS:
case POR_FLYCNT:
case POR_GRFNUM:
- sDisplay = String(sal_Unicode(0xfffc));
+ sDisplay = rtl::OUString(sal_Unicode(0xfffc));
break;
case POR_NUMBER:
diff --git a/sw/source/core/bastyp/swtypes.cxx b/sw/source/core/bastyp/swtypes.cxx
index c0d8608d516e..3ea3bddd7a02 100644
--- a/sw/source/core/bastyp/swtypes.cxx
+++ b/sw/source/core/bastyp/swtypes.cxx
@@ -56,8 +56,8 @@
using namespace com::sun::star;
-String aEmptyStr; // constant string
-String aDotStr('.'); // constant string
+UniString aEmptyStr; // constant string
+rtl::OUString aDotStr('.'); // constant string
IMPL_FIXEDMEMPOOL_NEWDEL( SwAttrSet )
IMPL_FIXEDMEMPOOL_NEWDEL( SwStartNode )
diff --git a/sw/source/core/crsr/bookmrk.cxx b/sw/source/core/crsr/bookmrk.cxx
index 93b65233e1c3..3b1f76a486b2 100644
--- a/sw/source/core/crsr/bookmrk.cxx
+++ b/sw/source/core/crsr/bookmrk.cxx
@@ -88,12 +88,12 @@ namespace
io_pDoc->GetIDocumentUndoRedo().StartUndo(UNDO_UI_REPLACE, NULL);
if( ( ch_start != aStartMark ) && ( aEndMark != CH_TXT_ATR_FORMELEMENT ) )
{
- io_pDoc->InsertString(aStartPaM, aStartMark);
+ io_pDoc->InsertString(aStartPaM, rtl::OUString(aStartMark));
rStart.nContent--;
}
if ( aEndMark && ( ch_end != aEndMark ) )
{
- io_pDoc->InsertString(aEndPaM, aEndMark);
+ io_pDoc->InsertString(aEndPaM, rtl::OUString(aEndMark));
rEnd.nContent++;
}
io_pDoc->GetIDocumentUndoRedo().EndUndo(UNDO_UI_REPLACE, NULL);
diff --git a/sw/source/core/crsr/findtxt.cxx b/sw/source/core/crsr/findtxt.cxx
index 8aa0a1b686a4..261e8378332d 100644
--- a/sw/source/core/crsr/findtxt.cxx
+++ b/sw/source/core/crsr/findtxt.cxx
@@ -673,7 +673,7 @@ String *ReplaceBackReferences( const SearchOptions& rSearchOpt, SwPaM* pPam )
aStr = comphelper::string::remove(aStr, CH_TXTATR_BREAKWORD);
aStr = comphelper::string::remove(aStr, CH_TXTATR_INWORD);
xub_StrLen nStart = 0;
- String sX( 'x' );
+ rtl::OUString sX( 'x' );
if( pPam->Start()->nContent > 0 )
{
aStr.Insert( sX, 0 );
diff --git a/sw/source/core/doc/docdraw.cxx b/sw/source/core/doc/docdraw.cxx
index 8e5db3d1a9b7..51d91efe1f44 100644
--- a/sw/source/core/doc/docdraw.cxx
+++ b/sw/source/core/doc/docdraw.cxx
@@ -922,7 +922,7 @@ IMPL_LINK(SwDoc, CalcFieldValueHdl, EditFieldInfo*, pInfo)
else
{
OSL_FAIL("unknown field command");
- pInfo->SetRepresentation( String( '?' ) );
+ pInfo->SetRepresentation( rtl::OUString( '?' ) );
}
}
diff --git a/sw/source/core/doc/docedt.cxx b/sw/source/core/doc/docedt.cxx
index 90f5e8c2ae38..fd7540337a0d 100644
--- a/sw/source/core/doc/docedt.cxx
+++ b/sw/source/core/doc/docedt.cxx
@@ -797,7 +797,7 @@ bool SwDoc::Overwrite( const SwPaM &rRg, const String &rStr )
// start behind the characters (to fix the attributes!)
if( nStart < pNode->GetTxt().Len() )
rIdx++;
- pNode->InsertText( c, rIdx, INS_EMPTYEXPAND );
+ pNode->InsertText( rtl::OUString(c), rIdx, INS_EMPTYEXPAND );
if( nStart+1 < rIdx.GetIndex() )
{
rIdx = nStart;
diff --git a/sw/source/core/doc/doctxm.cxx b/sw/source/core/doc/doctxm.cxx
index 4d39e3473f9e..2a2b3d41155d 100644
--- a/sw/source/core/doc/doctxm.cxx
+++ b/sw/source/core/doc/doctxm.cxx
@@ -1713,7 +1713,7 @@ void SwTOXBaseSection::GenerateText( sal_uInt16 nArrayIdx,
size_t nSize = rBase.aTOXSources.size();
if (nSize > 0)
{
- String aInsStr( cNumRepl );
+ String aInsStr = rtl::OUString(cNumRepl);
for (size_t i = 1; i < nSize; ++i)
{
aInsStr.AppendAscii( sPageDeli );
@@ -1984,10 +1984,11 @@ void SwTOXBaseSection::_UpdatePageNum( SwTxtNode* pNd,
// collect starts end ends of main entry character style
std::vector<sal_uInt16>* pCharStyleIdx = pMainEntryNums ? new std::vector<sal_uInt16> : 0;
- String sSrchStr( cNumRepl );
- sSrchStr.AppendAscii( sPageDeli ) += cNumRepl;
+ rtl::OUString sSrchStr = rtl::OUStringBuffer().append(cNumRepl).
+ append(sPageDeli).append(cNumRepl).makeStringAndClear();
xub_StrLen nStartPos = pNd->GetTxt().Search( sSrchStr );
- ( sSrchStr = cNumRepl ) += cEndPageNum;
+ sSrchStr = rtl::OUStringBuffer().append(cNumRepl).
+ append(cEndPageNum).makeStringAndClear();
xub_StrLen nEndPos = pNd->GetTxt().Search( sSrchStr );
sal_uInt16 i;
diff --git a/sw/source/core/docnode/ndsect.cxx b/sw/source/core/docnode/ndsect.cxx
index 12c59d7676cc..4d413a5742d6 100644
--- a/sw/source/core/docnode/ndsect.cxx
+++ b/sw/source/core/docnode/ndsect.cxx
@@ -690,7 +690,7 @@ void SwDoc::UpdateSection(sal_uInt16 const nPos, SwSectionData & rNewData,
::sw::UndoGuard const undoGuard(GetIDocumentUndoRedo());
// Der LinkFileName koennte auch nur aus Separatoren bestehen
- String sCompareString = sfx2::cTokenSeperator;
+ String sCompareString = rtl::OUString(sfx2::cTokenSeperator);
sCompareString += sfx2::cTokenSeperator;
const bool bUpdate =
(!pSection->IsLinkType() && rNewData.IsLinkType())
diff --git a/sw/source/core/docnode/ndtbl.cxx b/sw/source/core/docnode/ndtbl.cxx
index c55df61335ce..118eeb223d89 100644
--- a/sw/source/core/docnode/ndtbl.cxx
+++ b/sw/source/core/docnode/ndtbl.cxx
@@ -1513,7 +1513,7 @@ static void lcl_DelBox( SwTableBox* pBox, _DelTabPara* pDelPara )
{
// Inserting the seperator
SwIndex aCntIdx( pDelPara->pLastNd, pDelPara->pLastNd->GetTxt().Len());
- pDelPara->pLastNd->InsertText( pDelPara->cCh, aCntIdx,
+ pDelPara->pLastNd->InsertText( rtl::OUString(pDelPara->cCh), aCntIdx,
IDocumentContentOperations::INS_EMPTYEXPAND );
if( pDelPara->pUndo )
pDelPara->pUndo->AddBoxPos( *pDoc, nNdIdx, aDelRg.aEnd.GetIndex(),
diff --git a/sw/source/core/edit/autofmt.cxx b/sw/source/core/edit/autofmt.cxx
index 4bec51891fe9..2abc9304ec2e 100644
--- a/sw/source/core/edit/autofmt.cxx
+++ b/sw/source/core/edit/autofmt.cxx
@@ -1276,7 +1276,7 @@ void SwAutoFormat::DelMoreLinesBlanks( sal_Bool bWithLineBreaks )
DeleteSel( *pNxt );
if( !bHasBlnks )
{
- pDoc->InsertString( *pNxt, sal_Unicode(' ') );
+ pDoc->InsertString( *pNxt, rtl::OUString(' ') );
}
}
@@ -1335,7 +1335,7 @@ void SwAutoFormat::BuildIndent()
IsSentenceAtEnd( *pNxtNd );
if( DeleteAktNxtPara( pNxtNd->GetTxt() ))
{
- pDoc->InsertString( aDelPam, sal_Unicode(' ') );
+ pDoc->InsertString( aDelPam, rtl::OUString(' ') );
}
if( bBreak )
break;
@@ -1376,7 +1376,7 @@ void SwAutoFormat::BuildTextIndent()
IsSentenceAtEnd( *pNxtNd );
if( DeleteAktNxtPara( pNxtNd->GetTxt() ) )
{
- pDoc->InsertString( aDelPam, sal_Unicode(' ') );
+ pDoc->InsertString( aDelPam, rtl::OUString(' ') );
}
if( bBreak )
break;
@@ -1412,7 +1412,7 @@ void SwAutoFormat::BuildText()
IsSentenceAtEnd( *pNxtNd );
if( DeleteAktNxtPara( pNxtNd->GetTxt() ) )
{
- pDoc->InsertString( aDelPam, sal_Unicode(' ') );
+ pDoc->InsertString( aDelPam, rtl::OUString(' ') );
}
if( bBreak )
break;
@@ -1681,7 +1681,7 @@ void SwAutoFormat::BuildEnum( sal_uInt16 nLvl, sal_uInt16 nDigitLevel )
if( !aFlags.bSetNumRule )
{
- String sChgStr( '\t' );
+ String sChgStr = rtl::OUString('\t');
if( bChgBullet )
sChgStr.Insert( aFlags.cBullet, 0 );
pDoc->InsertString( aDelPam, sChgStr );
@@ -1725,7 +1725,7 @@ void SwAutoFormat::BuildEnum( sal_uInt16 nLvl, sal_uInt16 nDigitLevel )
IsSentenceAtEnd( *pNxtNd );
if( DeleteAktNxtPara( pNxtNd->GetTxt() ) )
{
- pDoc->InsertString( aDelPam, sal_Unicode(' ') );
+ pDoc->InsertString( aDelPam, rtl::OUString(' ') );
}
if( bBreak )
break;
@@ -1795,7 +1795,7 @@ void SwAutoFormat::BuildNegIndent( SwTwips nSpaces )
DeleteSel( aDelPam );
if( bInsTab )
{
- pDoc->InsertString( aDelPam, sal_Unicode('\t') );
+ pDoc->InsertString( aDelPam, rtl::OUString('\t') );
}
}
}
@@ -1815,7 +1815,7 @@ void SwAutoFormat::BuildNegIndent( SwTwips nSpaces )
IsSentenceAtEnd( *pNxtNd );
if( DeleteAktNxtPara( pNxtNd->GetTxt() ) )
{
- pDoc->InsertString( aDelPam, sal_Unicode(' ') );
+ pDoc->InsertString( aDelPam, rtl::OUString(' ') );
}
if( bBreak )
break;
@@ -1946,7 +1946,7 @@ void SwAutoFormat::AutoCorrect( xub_StrLen nPos )
aDelPam.DeleteMark();
if( bSetHardBlank )
{
- pDoc->InsertString( aDelPam, CHAR_HARDBLANK );
+ pDoc->InsertString( aDelPam, rtl::OUString(CHAR_HARDBLANK) );
++nPos;
}
}
@@ -2001,7 +2001,7 @@ void SwAutoFormat::AutoCorrect( xub_StrLen nPos )
if( bSetHardBlank )
{
aDelPam.GetPoint()->nContent = nPos;
- pDoc->InsertString( aDelPam, CHAR_HARDBLANK );
+ pDoc->InsertString( aDelPam, rtl::OUString(CHAR_HARDBLANK) );
aDelPam.GetPoint()->nContent = ++nPos;
}
}
diff --git a/sw/source/core/edit/editsh.cxx b/sw/source/core/edit/editsh.cxx
index 7889328e405e..5a989841dca3 100644
--- a/sw/source/core/edit/editsh.cxx
+++ b/sw/source/core/edit/editsh.cxx
@@ -81,7 +81,7 @@ void SwEditShell::Insert( sal_Unicode c, sal_Bool bOnlyCurrCrsr )
StartAllAction();
FOREACHPAM_START(this)
- const bool bSuccess = GetDoc()->InsertString(*PCURCRSR, c);
+ const bool bSuccess = GetDoc()->InsertString(*PCURCRSR, rtl::OUString(c));
OSL_ENSURE( bSuccess, "Doc->Insert() failed." );
(void) bSuccess;
diff --git a/sw/source/core/edit/edlingu.cxx b/sw/source/core/edit/edlingu.cxx
index e95f9676c701..a5e6f9fb6b92 100644
--- a/sw/source/core/edit/edlingu.cxx
+++ b/sw/source/core/edit/edlingu.cxx
@@ -661,7 +661,7 @@ void SwHyphIter::InsertSoftHyph( const xub_StrLen nHyphPos )
DelSoftHyph( *pCrsr );
pSttPos->nContent += nHyphPos;
SwPaM aRg( *pSttPos );
- pDoc->InsertString( aRg, CHAR_SOFTHYPHEN );
+ pDoc->InsertString( aRg, rtl::OUString(CHAR_SOFTHYPHEN) );
// Durch das Einfuegen des SoftHyphs ist ein Zeichen hinzugekommen
//JP 18.07.95: warum, ist doch ein SwIndex, dieser wird doch mitverschoben !!
// pSttPos->nContent++;
diff --git a/sw/source/core/edit/edtox.cxx b/sw/source/core/edit/edtox.cxx
index f09b5e01af95..fe8826a5b077 100644
--- a/sw/source/core/edit/edtox.cxx
+++ b/sw/source/core/edit/edtox.cxx
@@ -30,7 +30,7 @@
#include <com/sun/star/util/SearchOptions.hpp>
#include <com/sun/star/util/SearchFlags.hpp>
#include <com/sun/star/i18n/TransliterationModules.hpp>
-
+#include <comphelper/string.hxx>
#include <svl/fstathelper.hxx>
#include <svtools/txtcmp.hxx>
@@ -340,7 +340,7 @@ void SwEditShell::ApplyAutoMark()
//2.
SfxMedium aMedium( sAutoMarkURL, STREAM_STD_READ );
SvStream& rStrm = *aMedium.GetInStream();
- const String sZero('0');
+ const sal_Unicode cZero('0');
Push();
rtl_TextEncoding eChrSet = ::osl_getThreadTextEncoding();
@@ -402,8 +402,8 @@ void SwEditShell::ApplyAutoMark()
String sWordOnly = sLine.GetToken(0, ';', nTokenPos);
//3.
- bCaseSensitive = sCase.Len() && sCase != sZero;
- bWordOnly = sWordOnly.Len() && sWordOnly != sZero;
+ bCaseSensitive = sCase.Len() && !comphelper::string::equals(sCase, cZero);
+ bWordOnly = sWordOnly.Len() && !comphelper::string::equals(sWordOnly, cZero);
//
if (!bCaseSensitive)
{
diff --git a/sw/source/core/fields/cellfml.cxx b/sw/source/core/fields/cellfml.cxx
index 6d45a44df2cf..1c8f1e294a2b 100644
--- a/sw/source/core/fields/cellfml.cxx
+++ b/sw/source/core/fields/cellfml.cxx
@@ -836,7 +836,7 @@ String lcl_BoxNmToRel( const SwTable& rTbl, const SwTableNode& rTblNd,
// in die Externe Darstellung umwandeln.
SwTableBox* pBox = reinterpret_cast<SwTableBox*>(sal::static_int_cast<sal_IntPtr>(sTmp.ToInt64()));
if( !rTbl.GetTabSortBoxes().Seek_Entry( pBox ))
- return '?';
+ return rtl::OUString('?');
sTmp = pBox->GetName();
}
diff --git a/sw/source/core/fields/docufld.cxx b/sw/source/core/fields/docufld.cxx
index 8df55373e57f..9310e47b8fa5 100644
--- a/sw/source/core/fields/docufld.cxx
+++ b/sw/source/core/fields/docufld.cxx
@@ -1126,7 +1126,7 @@ String SwDocInfoField::Expand() const
}
else if( aAny >>= aDuration )
{
- String sText(aDuration.Negative ? '-' : '+');
+ String sText = aDuration.Negative ? rtl::OUString('-') : rtl::OUString('+');
sText += ViewShell::GetShellRes()->sDurationFormat;
sText.SearchAndReplace(rtl::OUString("%1"), String::CreateFromInt32( aDuration.Years ) );
sText.SearchAndReplace(rtl::OUString("%2"), String::CreateFromInt32( aDuration.Months ) );
@@ -2425,9 +2425,8 @@ SwJumpEditField::SwJumpEditField( SwJumpEditFieldType* pTyp, sal_uInt32 nForm,
String SwJumpEditField::Expand() const
{
- String sTmp( '<' );
- sTmp += sTxt;
- return sTmp += '>';
+ return rtl::OUStringBuffer().append('<').
+ append(sTxt).append('>').makeStringAndClear();
}
SwField* SwJumpEditField::Copy() const
diff --git a/sw/source/core/fields/tblcalc.cxx b/sw/source/core/fields/tblcalc.cxx
index 4657e0f8836b..03b66c47424e 100644
--- a/sw/source/core/fields/tblcalc.cxx
+++ b/sw/source/core/fields/tblcalc.cxx
@@ -71,8 +71,9 @@ void SwTblField::CalcField( SwTblCalcPara& rCalcPara )
SwTblField::SwTblField( SwTblFieldType* pInitType, const String& rFormel,
sal_uInt16 nType, sal_uLong nFmt )
: SwValueField( pInitType, nFmt ), SwTableFormula( rFormel ),
- sExpand( '0' ), nSubType(nType)
+ nSubType(nType)
{
+ sExpand = rtl::OUString('0');
}
diff --git a/sw/source/core/frmedt/fetab.cxx b/sw/source/core/frmedt/fetab.cxx
index 57c0c97818b3..0c1d219696c4 100644
--- a/sw/source/core/frmedt/fetab.cxx
+++ b/sw/source/core/frmedt/fetab.cxx
@@ -2448,10 +2448,11 @@ sal_Bool SwFEShell::GetAutoSum( String& rFml ) const
// possibly allow texts??
break;
- String sTmp( '<' );
- sTmp += pCFrm->GetTabBox()->GetName();
- sTmp += '>';
- rFml.Insert( sTmp, nInsPos );
+ rtl::OUStringBuffer sTmp;
+ sTmp.append('<');
+ sTmp.append(pCFrm->GetTabBox()->GetName());
+ sTmp.append('>');
+ rFml.Insert( sTmp.makeStringAndClear(), nInsPos );
}
if( nW )
{
diff --git a/sw/source/core/text/frmpaint.cxx b/sw/source/core/text/frmpaint.cxx
index 73588909b1d8..5e3991dc853e 100644
--- a/sw/source/core/text/frmpaint.cxx
+++ b/sw/source/core/text/frmpaint.cxx
@@ -552,7 +552,7 @@ sal_Bool SwTxtFrm::PaintEmpty( const SwRect &rRect, sal_Bool bCheck ) const
// Don't show the paragraph mark for collapsed paragraphs, when they are hidden
if ( EmptyHeight( ) > 1 )
{
- const XubString aTmp( CH_PAR );
+ const rtl::OUString aTmp( CH_PAR );
SwDrawTextInfo aDrawInf( pSh, *pSh->GetOut(), 0, aTmp, 0, 1 );
aDrawInf.SetLeft( rRect.Left() );
aDrawInf.SetRight( rRect.Right() );
diff --git a/sw/source/core/text/inftxt.cxx b/sw/source/core/text/inftxt.cxx
index 3970f312c095..554ba0f83632 100644
--- a/sw/source/core/text/inftxt.cxx
+++ b/sw/source/core/text/inftxt.cxx
@@ -819,7 +819,7 @@ static void lcl_DrawSpecial( const SwTxtPaintInfo& rInf, const SwLinePortion& rP
}
// check if char fits into rectangle
- const XubString aTmp( cChar );
+ const rtl::OUString aTmp( cChar );
aFontSize = rInf.GetTxtSize( aTmp ).SvLSize();
while ( aFontSize.Width() > nMaxWidth )
{
diff --git a/sw/source/core/text/itratr.cxx b/sw/source/core/text/itratr.cxx
index faf180439062..989b9f608105 100644
--- a/sw/source/core/text/itratr.cxx
+++ b/sw/source/core/text/itratr.cxx
@@ -684,7 +684,7 @@ void SwTxtNode::GetMinMaxSize( sal_uLong nIndex, sal_uLong& rMin, sal_uLong &rMa
case CHAR_HARDBLANK:
case CHAR_HARDHYPHEN:
{
- XubString sTmp( cChar );
+ rtl::OUString sTmp( cChar );
SwDrawTextInfo aDrawInf( const_cast<ViewShell *>(getIDocumentLayoutAccess()->GetCurrentViewShell()),
*pOut, 0, sTmp, 0, 1, 0, sal_False );//swmod 080311
nAktWidth = aIter.GetFnt()->_GetTxtSize( aDrawInf ).Width();
@@ -934,7 +934,7 @@ sal_uInt16 SwTxtNode::GetScalingOfSelectedText( xub_StrLen nStt, xub_StrLen nEnd
else if ( cChar == CH_TAB )
{
// tab receives width of one space
- XubString sTmp( CH_BLANK );
+ rtl::OUString sTmp( CH_BLANK );
SwDrawTextInfo aDrawInf( pSh, *pOut, 0, sTmp, 0, 1 );
nProWidth += aIter.GetFnt()->_GetTxtSize( aDrawInf ).Width();
nIdx++;
@@ -943,7 +943,7 @@ sal_uInt16 SwTxtNode::GetScalingOfSelectedText( xub_StrLen nStt, xub_StrLen nEnd
++nIdx;
else if ( cChar == CHAR_HARDBLANK || cChar == CHAR_HARDHYPHEN )
{
- XubString sTmp( cChar );
+ rtl::OUString sTmp( cChar );
SwDrawTextInfo aDrawInf( pSh, *pOut, 0, sTmp, 0, 1 );
nProWidth += aIter.GetFnt()->_GetTxtSize( aDrawInf ).Width();
nIdx++;
diff --git a/sw/source/core/text/porexp.cxx b/sw/source/core/text/porexp.cxx
index fe86048ab76a..3624ec042d0e 100644
--- a/sw/source/core/text/porexp.cxx
+++ b/sw/source/core/text/porexp.cxx
@@ -243,7 +243,7 @@ sal_Bool SwBlankPortion::GetExpTxt( const SwTxtSizeInfo&, XubString &rTxt ) cons
void SwBlankPortion::HandlePortion( SwPortionHandler& rPH ) const
{
- String aString( cChar );
+ rtl::OUString aString( cChar );
rPH.Special( GetLen(), aString, GetWhichPor() );
}
diff --git a/sw/source/core/text/porfld.cxx b/sw/source/core/text/porfld.cxx
index 4f31d01a3d3b..4ef411dcbaaf 100644
--- a/sw/source/core/text/porfld.cxx
+++ b/sw/source/core/text/porfld.cxx
@@ -133,7 +133,7 @@ KSHORT SwFldPortion::GetViewWidth( const SwTxtSizeInfo &rInf ) const
!rInf.GetOpt().IsReadonly() && SwViewOption::IsFieldShadings() )
{
if( !nViewWidth )
- pThis->nViewWidth = rInf.GetTxtSize( ' ' ).Width();
+ pThis->nViewWidth = rInf.GetTxtSize(rtl::OUString(' ')).Width();
}
else
pThis->nViewWidth = 0;
diff --git a/sw/source/core/text/porfly.cxx b/sw/source/core/text/porfly.cxx
index b91048f44576..80ce9dc018c9 100644
--- a/sw/source/core/text/porfly.cxx
+++ b/sw/source/core/text/porfly.cxx
@@ -92,7 +92,7 @@ sal_Bool SwFlyPortion::Format( SwTxtFormatInfo &rInf )
&& ' ' != rInf.GetChar( rInf.GetIdx() - 1 )
&& ( !rInf.GetLast() || !rInf.GetLast()->IsBreakPortion() ) )
{
- SetBlankWidth( rInf.GetTxtSize( ' ' ).Width() );
+ SetBlankWidth( rInf.GetTxtSize(rtl::OUString(' ')).Width() );
SetLen( 1 );
}
diff --git a/sw/source/core/text/porglue.cxx b/sw/source/core/text/porglue.cxx
index 606ad4492033..6cd9dfcc8e84 100644
--- a/sw/source/core/text/porglue.cxx
+++ b/sw/source/core/text/porglue.cxx
@@ -112,7 +112,7 @@ void SwGluePortion::Paint( const SwTxtPaintInfo &rInf ) const
#endif
if( 1 == GetLen() )
{
- String aBullet( CH_BULLET );
+ rtl::OUString aBullet( CH_BULLET );
SwPosSize aBulletSize( rInf.GetTxtSize( aBullet ) );
Point aPos( rInf.GetPos() );
aPos.X() += (Width()/2) - (aBulletSize.Width()/2);
@@ -122,7 +122,7 @@ void SwGluePortion::Paint( const SwTxtPaintInfo &rInf ) const
aBulletPor.Width( aBulletSize.Width() );
aBulletPor.Height( aBulletSize.Height() );
aBulletPor.SetAscent( GetAscent() );
- aInf.DrawText( aBulletPor, aBullet.Len(), sal_True );
+ aInf.DrawText( aBulletPor, aBullet.getLength(), sal_True );
}
else
{
diff --git a/sw/source/core/text/pormulti.cxx b/sw/source/core/text/pormulti.cxx
index ed072baba389..20b428a127da 100644
--- a/sw/source/core/text/pormulti.cxx
+++ b/sw/source/core/text/pormulti.cxx
@@ -328,14 +328,14 @@ SwDoubleLinePortion::SwDoubleLinePortion( const SwMultiCreator& rCreate,
sal_uInt8 nTmp = SW_SCRIPTS;
if( pBracket->cPre > 255 )
{
- String aTxt( pBracket->cPre );
+ String aTxt = rtl::OUString(pBracket->cPre);
nTmp = SwScriptInfo::WhichFont( 0, &aTxt, 0 );
}
pBracket->nPreScript = nTmp;
nTmp = SW_SCRIPTS;
if( pBracket->cPost > 255 )
{
- String aTxt( pBracket->cPost );
+ String aTxt = rtl::OUString(pBracket->cPost);
nTmp = SwScriptInfo::WhichFont( 0, &aTxt, 0 );
}
pBracket->nPostScript = nTmp;
@@ -428,7 +428,7 @@ void SwDoubleLinePortion::FormatBrackets( SwTxtFormatInfo &rInf, SwTwips& nMaxWi
pBracket->nHeight = 0;
if( pBracket->cPre )
{
- String aStr( pBracket->cPre );
+ rtl::OUString aStr( pBracket->cPre );
sal_uInt8 nActualScr = pTmpFnt->GetActual();
if( SW_SCRIPTS > pBracket->nPreScript )
pTmpFnt->SetActual( pBracket->nPreScript );
@@ -453,7 +453,7 @@ void SwDoubleLinePortion::FormatBrackets( SwTxtFormatInfo &rInf, SwTwips& nMaxWi
pBracket->nPreWidth = 0;
if( pBracket->cPost )
{
- String aStr( pBracket->cPost );
+ rtl::OUString aStr( pBracket->cPost );
if( SW_SCRIPTS > pBracket->nPostScript )
pTmpFnt->SetActual( pBracket->nPostScript );
SwFontSave aSave( rInf, pTmpFnt );
diff --git a/sw/source/core/text/porref.cxx b/sw/source/core/text/porref.cxx
index 2f090b198b70..b8dbc14b1cb5 100644
--- a/sw/source/core/text/porref.cxx
+++ b/sw/source/core/text/porref.cxx
@@ -70,7 +70,7 @@ KSHORT SwIsoRefPortion::GetViewWidth( const SwTxtSizeInfo &rInf ) const
!rInf.GetOpt().IsReadonly() && !rInf.GetOpt().IsPagePreview() )
{
if( !nViewWidth )
- pThis->nViewWidth = rInf.GetTxtSize( ' ' ).Width();
+ pThis->nViewWidth = rInf.GetTxtSize(rtl::OUString(' ')).Width();
}
else
pThis->nViewWidth = 0;
diff --git a/sw/source/core/text/porrst.cxx b/sw/source/core/text/porrst.cxx
index 26ba4ced124a..a89a37331dfd 100644
--- a/sw/source/core/text/porrst.cxx
+++ b/sw/source/core/text/porrst.cxx
@@ -79,7 +79,7 @@ void SwTmpEndPortion::Paint( const SwTxtPaintInfo &rInf ) const
if( rInf.OnWin() && rInf.GetOpt().IsParagraph() )
{
SwDefFontSave aSave( rInf );
- const XubString aTmp( CH_PAR );
+ const rtl::OUString aTmp( CH_PAR );
rInf.DrawText( aTmp, *this );
}
}
@@ -586,7 +586,7 @@ sal_Bool SwControlCharPortion::Format( SwTxtFormatInfo &rInf )
KSHORT SwControlCharPortion::GetViewWidth( const SwTxtSizeInfo& rInf ) const
{
if( !mnViewWidth )
- mnViewWidth = rInf.GetTxtSize( ' ' ).Width();
+ mnViewWidth = rInf.GetTxtSize(rtl::OUString(' ')).Width();
return mnViewWidth;
}
diff --git a/sw/source/core/text/portox.cxx b/sw/source/core/text/portox.cxx
index 08fe3b80db29..df10d88f69d8 100644
--- a/sw/source/core/text/portox.cxx
+++ b/sw/source/core/text/portox.cxx
@@ -72,7 +72,7 @@ KSHORT SwIsoToxPortion::GetViewWidth( const SwTxtSizeInfo &rInf ) const
!rInf.GetOpt().IsReadonly() && SwViewOption::IsFieldShadings() )
{
if( !nViewWidth )
- pThis->nViewWidth = rInf.GetTxtSize( ' ' ).Width();
+ pThis->nViewWidth = rInf.GetTxtSize(rtl::OUString(' ')).Width();
}
else
pThis->nViewWidth = 0;
diff --git a/sw/source/core/text/portxt.cxx b/sw/source/core/text/portxt.cxx
index 2654eaf58ebe..d51ece82b5e1 100644
--- a/sw/source/core/text/portxt.cxx
+++ b/sw/source/core/text/portxt.cxx
@@ -521,7 +521,7 @@ void SwTxtPortion::FormatEOL( SwTxtFormatInfo &rInf )
if( nHoleLen == GetLen() )
nBlankSize = Width();
else
- nBlankSize = nHoleLen * rInf.GetTxtSize( ' ' ).Width();
+ nBlankSize = nHoleLen * rInf.GetTxtSize(rtl::OUString(' ')).Width();
Width( Width() - nBlankSize );
rInf.X( rInf.X() - nBlankSize );
SetLen( GetLen() - nHoleLen );
@@ -728,7 +728,7 @@ void SwHolePortion::Paint( const SwTxtPaintInfo &rInf ) const
// #i16816# tagged pdf support
if( rInf.GetVsh() && rInf.GetVsh()->GetViewOptions()->IsPDFExport() )
{
- const XubString aTxt( ' ' );
+ const rtl::OUString aTxt( ' ' );
rInf.DrawText( aTxt, *this, 0, 1, false );
}
}
diff --git a/sw/source/core/text/txthyph.cxx b/sw/source/core/text/txthyph.cxx
index efdca9281be0..66c601f62ee1 100644
--- a/sw/source/core/text/txthyph.cxx
+++ b/sw/source/core/text/txthyph.cxx
@@ -399,7 +399,7 @@ sal_Bool SwHyphPortion::GetExpTxt( const SwTxtSizeInfo &rInf, XubString &rTxt )
void SwHyphPortion::HandlePortion( SwPortionHandler& rPH ) const
{
- String aString( '-' );
+ rtl::OUString aString( '-' );
rPH.Special( GetLen(), aString, GetWhichPor() );
}
@@ -467,7 +467,7 @@ KSHORT SwSoftHyphPortion::GetViewWidth( const SwTxtSizeInfo &rInf ) const
{
if( !nViewWidth )
((SwSoftHyphPortion*)this)->nViewWidth
- = rInf.GetTxtSize( '-' ).Width();
+ = rInf.GetTxtSize(rtl::OUString('-')).Width();
}
else
((SwSoftHyphPortion*)this)->nViewWidth = 0;
@@ -626,7 +626,7 @@ sal_Bool SwSoftHyphPortion::GetExpTxt( const SwTxtSizeInfo &rInf, XubString &rTx
void SwSoftHyphPortion::HandlePortion( SwPortionHandler& rPH ) const
{
- const String aString( '-' );
+ const rtl::OUString aString( '-' );
const sal_uInt16 nWhich = ! Width() ?
POR_SOFTHYPH_COMP :
GetWhichPor();
diff --git a/sw/source/core/text/txttab.cxx b/sw/source/core/text/txttab.cxx
index 8841e399fb04..137da97912ea 100644
--- a/sw/source/core/text/txttab.cxx
+++ b/sw/source/core/text/txttab.cxx
@@ -401,7 +401,7 @@ sal_Bool SwTabPortion::PreFormat( SwTxtFormatInfo &rInf )
static_cast<SwNumberPortion*>(rInf.GetLast())->GetFont();
pSave.reset( new SwFontSave( rInf, const_cast<SwFont*>(pNumberPortionFont) ) );
}
- XubString aTmp( ' ' );
+ rtl::OUString aTmp( ' ' );
SwTxtSizeInfo aInf( rInf, aTmp );
nMinimumTabWidth = aInf.GetTxtSize().Width();
}
@@ -619,7 +619,7 @@ void SwTabPortion::Paint( const SwTxtPaintInfo &rInf ) const
if( rInf.GetFont()->IsPaintBlank() )
{
// Tabs mit Fuellung
- XubString aTxt( ' ' );
+ UniString aTxt = rtl::OUString(' ');
const KSHORT nCharWidth = rInf.GetTxtSize( aTxt ).Width();
// robust:
if( nCharWidth )
@@ -634,7 +634,7 @@ void SwTabPortion::Paint( const SwTxtPaintInfo &rInf ) const
if( IsFilled() )
{
// Tabs mit Fuellung
- XubString aTxt( cFill );
+ UniString aTxt = rtl::OUString(cFill);
const KSHORT nCharWidth = rInf.GetTxtSize( aTxt ).Width();
OSL_ENSURE( nCharWidth, "!SwTabPortion::Paint: sophisticated tabchar" );
// robust:
diff --git a/sw/source/core/txtnode/fntcache.cxx b/sw/source/core/txtnode/fntcache.cxx
index a78890e16084..6442bea1587a 100644
--- a/sw/source/core/txtnode/fntcache.cxx
+++ b/sw/source/core/txtnode/fntcache.cxx
@@ -655,8 +655,8 @@ sal_uInt8 lcl_WhichPunctuation( xub_Unicode cChar )
static sal_Bool lcl_IsMonoSpaceFont( const OutputDevice& rOut )
{
- const String aStr1( xub_Unicode( 0x3008 ) );
- const String aStr2( xub_Unicode( 0x307C ) );
+ const rtl::OUString aStr1( xub_Unicode( 0x3008 ) );
+ const rtl::OUString aStr2( xub_Unicode( 0x307C ) );
const long nWidth1 = rOut.GetTextWidth( aStr1 );
const long nWidth2 = rOut.GetTextWidth( aStr2 );
return nWidth1 == nWidth2;
diff --git a/sw/source/core/txtnode/thints.cxx b/sw/source/core/txtnode/thints.cxx
index 88823b98f83c..fd419ef9d7f6 100644
--- a/sw/source/core/txtnode/thints.cxx
+++ b/sw/source/core/txtnode/thints.cxx
@@ -1262,7 +1262,7 @@ bool SwTxtNode::InsertHint( SwTxtAttr * const pAttr, const SetAttrMode nMode )
(const SfxPoolItem**)&pAnchor );
SwIndex aIdx( this, *pAttr->GetStart() );
- const sal_Unicode c = GetCharOfTxtAttr(*pAttr);
+ const rtl::OUString c(GetCharOfTxtAttr(*pAttr));
InsertText( c, aIdx, nInsertFlags );
nInsMode |= nsSetAttrMode::SETATTR_NOTXTATRCHR;
@@ -1379,7 +1379,7 @@ bool SwTxtNode::InsertHint( SwTxtAttr * const pAttr, const SetAttrMode nMode )
// entstehen koennen und das Attribut im _SortArr_ am
// Dokument nicht eingetrage wird.
SwIndex aNdIdx( this, *pAttr->GetStart() );
- const sal_Unicode c = GetCharOfTxtAttr(*pAttr);
+ const rtl::OUString c(GetCharOfTxtAttr(*pAttr));
InsertText( c, aNdIdx, nInsertFlags );
nInsMode |= nsSetAttrMode::SETATTR_NOTXTATRCHR;
}
@@ -1439,7 +1439,7 @@ bool SwTxtNode::InsertHint( SwTxtAttr * const pAttr, const SetAttrMode nMode )
if( !(nsSetAttrMode::SETATTR_NOTXTATRCHR & nInsMode) )
{
SwIndex aIdx( this, *pAttr->GetStart() );
- InsertText( GetCharOfTxtAttr(*pAttr), aIdx, nInsertFlags );
+ InsertText( rtl::OUString(GetCharOfTxtAttr(*pAttr)), aIdx, nInsertFlags );
// adjust end of hint to account for inserted CH_TXTATR
xub_StrLen * const pEnd(pAttr->GetEnd());
diff --git a/sw/source/core/txtnode/txtedt.cxx b/sw/source/core/txtnode/txtedt.cxx
index 497ceb2bf967..26716a7cf79c 100644
--- a/sw/source/core/txtnode/txtedt.cxx
+++ b/sw/source/core/txtnode/txtedt.cxx
@@ -744,7 +744,7 @@ sal_Bool SwScanner::NextWord()
if ( nWordType != i18n::WordType::WORD_COUNT )
{
rCC.setLocale( pBreakIt->GetLocale( aCurrLang ) );
- if ( rCC.isLetterNumeric( aText[nBegin] ) )
+ if ( rCC.isLetterNumeric(rtl::OUString(aText[nBegin])) )
break;
}
else
diff --git a/sw/source/core/undo/undel.cxx b/sw/source/core/undo/undel.cxx
index 576456a6788e..1cfa0a792aaa 100644
--- a/sw/source/core/undo/undel.cxx
+++ b/sw/source/core/undo/undel.cxx
@@ -467,7 +467,7 @@ sal_Bool SwUndoDelete::CanGrouping( SwDoc* pDoc, const SwPaM& rDelPam )
sal_Unicode cDelChar = pDelTxtNd->GetTxt().GetChar( pStt->nContent.GetIndex() );
CharClass& rCC = GetAppCharClass();
if( ( CH_TXTATR_BREAKWORD == cDelChar || CH_TXTATR_INWORD == cDelChar ) ||
- rCC.isLetterNumeric( String( cDelChar ), 0 ) !=
+ rCC.isLetterNumeric( rtl::OUString( cDelChar ), 0 ) !=
rCC.isLetterNumeric( *pSttStr, nUChrPos ) )
return sal_False;
diff --git a/sw/source/core/undo/undobj.cxx b/sw/source/core/undo/undobj.cxx
index b4aee5938d4b..28703e102367 100644
--- a/sw/source/core/undo/undobj.cxx
+++ b/sw/source/core/undo/undobj.cxx
@@ -392,7 +392,7 @@ void SwUndoSaveCntnt::MoveToUndoNds( SwPaM& rPaM, SwNodeIndex* pNodeIdx,
}
else
{
- pTxtNd->InsertText( sal_Unicode(' '), aPos.nContent,
+ pTxtNd->InsertText( rtl::OUString(' '), aPos.nContent,
IDocumentContentOperations::INS_NOHINTEXPAND );
}
}
diff --git a/sw/source/core/undo/unins.cxx b/sw/source/core/undo/unins.cxx
index 626ac4e475c3..03f50b6f00eb 100644
--- a/sw/source/core/undo/unins.cxx
+++ b/sw/source/core/undo/unins.cxx
@@ -136,7 +136,7 @@ SwUndoInsert::SwUndoInsert( const SwNodeIndex& rNd )
sal_Bool SwUndoInsert::CanGrouping( sal_Unicode cIns )
{
if( !bIsAppend && bIsWordDelim ==
- !GetAppCharClass().isLetterNumeric( String( cIns )) )
+ !GetAppCharClass().isLetterNumeric( rtl::OUString( cIns )) )
{
nLen++;
nCntnt++;
diff --git a/sw/source/core/undo/unovwr.cxx b/sw/source/core/undo/unovwr.cxx
index 944d45f27d4b..bba2d1e87c23 100644
--- a/sw/source/core/undo/unovwr.cxx
+++ b/sw/source/core/undo/unovwr.cxx
@@ -85,7 +85,7 @@ SwUndoOverwrite::SwUndoOverwrite( SwDoc* pDoc, SwPosition& rPos,
sal_Bool bOldExpFlg = pTxtNd->IsIgnoreDontExpand();
pTxtNd->SetIgnoreDontExpand( sal_True );
- pTxtNd->InsertText( cIns, rPos.nContent,
+ pTxtNd->InsertText( rtl::OUString(cIns), rPos.nContent,
IDocumentContentOperations::INS_EMPTYEXPAND );
aInsStr.Insert( cIns );
@@ -125,7 +125,7 @@ sal_Bool SwUndoOverwrite::CanGrouping( SwDoc* pDoc, SwPosition& rPos,
// ask the char that should be inserted
if (( CH_TXTATR_BREAKWORD == cIns || CH_TXTATR_INWORD == cIns ) ||
- rCC.isLetterNumeric( String( cIns ), 0 ) !=
+ rCC.isLetterNumeric( rtl::OUString( cIns ), 0 ) !=
rCC.isLetterNumeric( aInsStr, aInsStr.Len()-1 ) )
return sal_False;
@@ -163,7 +163,7 @@ sal_Bool SwUndoOverwrite::CanGrouping( SwDoc* pDoc, SwPosition& rPos,
sal_Bool bOldExpFlg = pDelTxtNd->IsIgnoreDontExpand();
pDelTxtNd->SetIgnoreDontExpand( sal_True );
- pDelTxtNd->InsertText( cIns, rPos.nContent,
+ pDelTxtNd->InsertText( rtl::OUString(cIns), rPos.nContent,
IDocumentContentOperations::INS_EMPTYEXPAND );
aInsStr.Insert( cIns );
@@ -208,7 +208,7 @@ void SwUndoOverwrite::UndoImpl(::sw::UndoRedoContext & rContext)
if( aDelStr.Len() )
{
- String aTmpStr( '1' );
+ String aTmpStr = rtl::OUString('1');
sal_Unicode* pTmpStr = aTmpStr.GetBufferAccess();
sal_Bool bOldExpFlg = pTxtNd->IsIgnoreDontExpand();
@@ -255,10 +255,10 @@ void SwUndoOverwrite::RepeatImpl(::sw::RepeatContext & rContext)
{
::sw::GroupUndoGuard const undoGuard(rDoc.GetIDocumentUndoRedo());
- rDoc.Overwrite(*pAktPam, aInsStr.GetChar(0));
+ rDoc.Overwrite(*pAktPam, rtl::OUString(aInsStr.GetChar(0)));
}
for( xub_StrLen n = 1; n < aInsStr.Len(); ++n )
- rDoc.Overwrite( *pAktPam, aInsStr.GetChar( n ) );
+ rDoc.Overwrite( *pAktPam, rtl::OUString(aInsStr.GetChar(n)) );
}
void SwUndoOverwrite::RedoImpl(::sw::UndoRedoContext & rContext)
@@ -288,7 +288,7 @@ void SwUndoOverwrite::RedoImpl(::sw::UndoRedoContext & rContext)
for( xub_StrLen n = 0; n < aInsStr.Len(); n++ )
{
// do it individually, to keep the attributes!
- pTxtNd->InsertText( aInsStr.GetChar( n ), rIdx,
+ pTxtNd->InsertText( rtl::OUString(aInsStr.GetChar(n)), rIdx,
IDocumentContentOperations::INS_EMPTYEXPAND );
if( n < aDelStr.Len() )
{
diff --git a/sw/source/core/unocore/unofield.cxx b/sw/source/core/unocore/unofield.cxx
index a1c7d0eb23d2..b2447f4752d8 100644
--- a/sw/source/core/unocore/unofield.cxx
+++ b/sw/source/core/unocore/unofield.cxx
@@ -606,7 +606,7 @@ void SwXFieldMaster::setPropertyValue( const OUString& rPropertyName,
{
SwSetExpFieldType aType(m_pDoc, sTypeName);
if(sParam1.Len())
- aType.SetDelimiter( sParam1.GetChar(0));
+ aType.SetDelimiter(rtl::OUString(sParam1.GetChar(0)));
if(nParam1 > -1 && nParam1 < MAXLEVEL)
aType.SetOutlineLvl(nParam1);
pType2 = m_pDoc->InsertFldType(aType);
diff --git a/sw/source/core/unocore/unoidx.cxx b/sw/source/core/unocore/unoidx.cxx
index b1fae476f182..5f22640bb63e 100644
--- a/sw/source/core/unocore/unoidx.cxx
+++ b/sw/source/core/unocore/unoidx.cxx
@@ -1914,7 +1914,7 @@ void SwXDocumentIndexMark::Impl::InsertTOXMark(
// deshalb hier ein Leerzeichen - ob das die ideale Loesung ist?
if (!bMark && !rMark.GetAlternativeText().Len())
{
- rMark.SetAlternativeText( String(' ') );
+ rMark.SetAlternativeText( rtl::OUString(' ') );
}
const bool bForceExpandHints( (!bMark && pTextCursor)
diff --git a/sw/source/core/unocore/unotext.cxx b/sw/source/core/unocore/unotext.cxx
index c61db3341706..f9cd4a0a4297 100644
--- a/sw/source/core/unocore/unotext.cxx
+++ b/sw/source/core/unocore/unotext.cxx
@@ -472,7 +472,7 @@ throw (lang::IllegalArgumentException, uno::RuntimeException)
}
if (cIns)
{
- m_pImpl->m_pDoc->InsertString( aTmp, cIns, nInsertFlags );
+ m_pImpl->m_pDoc->InsertString( aTmp, rtl::OUString(cIns), nInsertFlags );
}
if (bAbsorb)
diff --git a/sw/source/filter/html/css1atr.cxx b/sw/source/filter/html/css1atr.cxx
index d7beadca3c16..c8c504c2373c 100644
--- a/sw/source/filter/html/css1atr.cxx
+++ b/sw/source/filter/html/css1atr.cxx
@@ -1799,7 +1799,7 @@ static Writer& OutCSS1_SwPageDesc( Writer& rWrt, const SwPageDesc& rPageDesc,
else if( pTemplate )
pRefPageDesc = pTemplate->GetPageDescFromPool( nRefPoolId, false );
- String aSelector( '@' );
+ String aSelector = rtl::OUString('@');
aSelector.AppendAscii( sCSS1_page );
if( bPseudo )
diff --git a/sw/source/filter/html/swhtml.cxx b/sw/source/filter/html/swhtml.cxx
index 1fdf4cd2ea77..05d5adb88380 100644
--- a/sw/source/filter/html/swhtml.cxx
+++ b/sw/source/filter/html/swhtml.cxx
@@ -1439,11 +1439,11 @@ void SwHTMLParser::NextToken( int nToken )
break;
case HTML_NONBREAKSPACE:
- pDoc->InsertString( *pPam, CHAR_HARDBLANK );
+ pDoc->InsertString( *pPam, rtl::OUString(CHAR_HARDBLANK) );
break;
case HTML_SOFTHYPH:
- pDoc->InsertString( *pPam, CHAR_SOFTHYPHEN );
+ pDoc->InsertString( *pPam, rtl::OUString(CHAR_SOFTHYPHEN) );
break;
case HTML_LINEFEEDCHAR:
@@ -1965,9 +1965,9 @@ void SwHTMLParser::NextToken( int nToken )
}
else
{
- String aComment( '<' );
- (aComment += aToken) += '>';
- InsertComment( aComment );
+ rtl::OUStringBuffer aComment;
+ aComment.append('<').append(aToken).append('>');
+ InsertComment( aComment.makeStringAndClear() );
}
}
break;
@@ -4934,7 +4934,7 @@ void SwHTMLParser::InsertSpacer()
else
{
NewAttr( &aAttrTab.pKerning, SvxKerningItem( (short)nSize, RES_CHRATR_KERNING ) );
- String aTmp( ' ' );
+ rtl::OUString aTmp( ' ' );
pDoc->InsertString( *pPam, aTmp );
EndAttr( aAttrTab.pKerning );
}
@@ -5138,7 +5138,7 @@ void SwHTMLParser::InsertLineBreak()
{
// wenn kein CLEAR ausgefuehrt werden sollte oder konnte, wird
// ein Zeilenumbruch eingef?gt
- String sTmp( (sal_Unicode)0x0a ); // make the Mac happy :-)
+ rtl::OUString sTmp( (sal_Unicode)0x0a ); // make the Mac happy :-)
pDoc->InsertString( *pPam, sTmp );
}
else if( pPam->GetPoint()->nContent.GetIndex() )
diff --git a/sw/source/filter/rtf/rtffld.cxx b/sw/source/filter/rtf/rtffld.cxx
index b7888b0b7046..fb96136cb575 100644
--- a/sw/source/filter/rtf/rtffld.cxx
+++ b/sw/source/filter/rtf/rtffld.cxx
@@ -581,10 +581,10 @@ int SwRTFParser::MakeFieldInst( String& rFieldStr )
case 0:
if( !bCharIns )
{
- sal_Unicode nChar = (sal_Unicode)sParam.ToInt32();
- if( nChar )
+ sal_Unicode cChar = (sal_Unicode)sParam.ToInt32();
+ if( cChar )
{
- pDoc->InsertString( *pPam, nChar );
+ pDoc->InsertString( *pPam, rtl::OUString(cChar) );
bCharIns = sal_True;
}
}
diff --git a/sw/source/filter/rtf/swparrtf.cxx b/sw/source/filter/rtf/swparrtf.cxx
index 81a7dd2a98c5..031a63e30583 100644
--- a/sw/source/filter/rtf/swparrtf.cxx
+++ b/sw/source/filter/rtf/swparrtf.cxx
@@ -3565,7 +3565,7 @@ void SwRTFParser::ReadHeaderFooter( int nToken, SwPageDesc* pPageDesc )
{
pPam->GetPoint()->nContent--;
nPos--;
- aFtnNote.SetNumStr( pTxtNd->GetTxt().GetChar( nPos ) );
+ aFtnNote.SetNumStr(rtl::OUString(pTxtNd->GetTxt().GetChar(nPos)));
((String&)pTxtNd->GetTxt()).SetChar( nPos, CH_TXTATR_INWORD );
bDelFirstChar = sal_True;
}
diff --git a/sw/source/filter/ww1/fltshell.cxx b/sw/source/filter/ww1/fltshell.cxx
index b4d2e3fdc2a8..23ffe9a5a9ae 100644
--- a/sw/source/filter/ww1/fltshell.cxx
+++ b/sw/source/filter/ww1/fltshell.cxx
@@ -1074,7 +1074,7 @@ String SwFltShell::QuoteStr( const String& rIn )
SwFltShell& SwFltShell::operator << ( const sal_Unicode c )
{
OSL_ENSURE( eSubMode != Style, "char insert while in style-mode");
- GetDoc().InsertString( *pPaM, c );
+ GetDoc().InsertString( *pPaM, rtl::OUString(c) );
return *this;
}
diff --git a/sw/source/filter/ww1/w1filter.cxx b/sw/source/filter/ww1/w1filter.cxx
index 0a46f88ec661..b62e7845e669 100644
--- a/sw/source/filter/ww1/w1filter.cxx
+++ b/sw/source/filter/ww1/w1filter.cxx
@@ -844,7 +844,7 @@ oncemore:
aStr.Erase(0, 1);
if( !aFName.Len() )
break;
- aFName.SearchAndReplaceAscii( "\\\\", String( '\\' ));
+ aFName.SearchAndReplaceAscii( "\\\\", rtl::OUString('\\') );
aFName = URIHelper::SmartRel2Abs(
INetURLObject(rOut.GetBaseURL()), aFName );
diff --git a/sw/source/filter/ww8/wrtw8num.cxx b/sw/source/filter/ww8/wrtw8num.cxx
index 0f733416bdf9..118ef9acf0c0 100644
--- a/sw/source/filter/ww8/wrtw8num.cxx
+++ b/sw/source/filter/ww8/wrtw8num.cxx
@@ -634,7 +634,7 @@ void WW8Export::BuildAnlvBulletBase(WW8_ANLV& rAnlv, sal_uInt8*& rpCh,
const Font& rFont = rFmt.GetBulletFont()
? *rFmt.GetBulletFont()
: numfunc::GetDefBulletFont();
- String sNumStr = rFmt.GetBulletChar();
+ String sNumStr = rtl::OUString(rFmt.GetBulletChar());
rtl_TextEncoding eChrSet = rFont.GetCharSet();
String sFontName = rFont.GetName();
diff --git a/sw/source/filter/ww8/wrtww8gr.cxx b/sw/source/filter/ww8/wrtww8gr.cxx
index 041f7184330c..3b4de1e1d61f 100644
--- a/sw/source/filter/ww8/wrtww8gr.cxx
+++ b/sw/source/filter/ww8/wrtww8gr.cxx
@@ -253,7 +253,7 @@ void WW8Export::OutputOLENode( const SwOLENode& rOLENode )
bool bIsNotDuplicate = aRes.second; //.second is false when element already existed
nPictureId = aRes.first->second;
Set_UInt32(pDataAdr, nPictureId);
- String sStorageName( '_' );
+ String sStorageName = rtl::OUString('_');
sStorageName += String::CreateFromInt32( nPictureId );
SvStorageRef xOleStg = xObjStg->OpenSotStorage( sStorageName,
STREAM_READWRITE| STREAM_SHARE_DENYALL );
diff --git a/sw/source/filter/ww8/ww8atr.cxx b/sw/source/filter/ww8/ww8atr.cxx
index 78ff6bef1c0c..f00e78470cf6 100644
--- a/sw/source/filter/ww8/ww8atr.cxx
+++ b/sw/source/filter/ww8/ww8atr.cxx
@@ -2227,7 +2227,7 @@ void AttributeOutputBase::StartTOX( const SwSection& rSect )
if( rStyles.Len() )
{
xub_StrLen nPos = 0;
- String sLvl( ',' );
+ String sLvl = rtl::OUString(',');
sLvl += String::CreateFromInt32( n + 1 );
do {
String sStyle( rStyles.GetToken( 0,
@@ -2685,7 +2685,7 @@ void AttributeOutputBase::TextField( const SwFmtFld& rField )
case DI_CUSTOM:
eFld = ww::eDOCPROPERTY;
{
- static String sQuotes('\"');
+ rtl::OUString sQuotes('\"');
const SwDocInfoField * pDocInfoField =
dynamic_cast<const SwDocInfoField *> (pFld);
diff --git a/sw/source/filter/ww8/ww8graf.cxx b/sw/source/filter/ww8/ww8graf.cxx
index 1c350b22490f..a85e4985fb45 100644
--- a/sw/source/filter/ww8/ww8graf.cxx
+++ b/sw/source/filter/ww8/ww8graf.cxx
@@ -945,11 +945,11 @@ OutlinerParaObject* SwWW8ImplReader::ImportAsOutliner(String &rString, WW8_CP nS
InsertAttrsAsDrawingAttrs(nStartCp, nEndCp, eType);
//Annotations typically begin with a (useless) 0x5
- if ((eType == MAN_AND) && mpDrawEditEngine->GetTextLen())
- {
- ESelection aFirstChar(0, 0, 0, 1);
- if (mpDrawEditEngine->GetText( aFirstChar ) == String(sal_Unicode(0x5)))
- mpDrawEditEngine->QuickDelete(aFirstChar);
+ if ((eType == MAN_AND) && mpDrawEditEngine->GetTextLen())
+ {
+ ESelection aFirstChar(0, 0, 0, 1);
+ if (comphelper::string::equals(mpDrawEditEngine->GetText( aFirstChar ), 0x5))
+ mpDrawEditEngine->QuickDelete(aFirstChar);
}
EditTextObject* pTemporaryText = mpDrawEditEngine->CreateTextObject();
diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
index d804eeeb7760..f813a10e0526 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -2934,7 +2934,7 @@ bool SwWW8ImplReader::ReadChars(WW8_CP& rPos, WW8_CP nNextAttr, long nTextEnd,
{
for(sal_uInt16 nCh = 0; nCh < nEnd - rPos; ++nCh)
{
- rDoc.InsertString( *pPaM, cSymbol );
+ rDoc.InsertString( *pPaM, rtl::OUString(cSymbol) );
}
pCtrlStck->SetAttr( *pPaM->GetPoint(), RES_CHRATR_FONT );
}
@@ -3075,13 +3075,13 @@ bool SwWW8ImplReader::ReadChar(long nPosCp, long nCpOfs)
bRet = HandlePageBreakChar();
break;
case 0x1e: // Non-breaking hyphen
- rDoc.InsertString( *pPaM, CHAR_HARDHYPHEN );
+ rDoc.InsertString( *pPaM, rtl::OUString(CHAR_HARDHYPHEN) );
break;
case 0x1f: // Non-required hyphens
- rDoc.InsertString( *pPaM, CHAR_SOFTHYPHEN );
+ rDoc.InsertString( *pPaM, rtl::OUString(CHAR_SOFTHYPHEN) );
break;
case 0xa0: // Non-breaking spaces
- rDoc.InsertString( *pPaM, CHAR_HARDBLANK );
+ rDoc.InsertString( *pPaM, rtl::OUString(CHAR_HARDBLANK) );
break;
case 0x1:
/*
@@ -3567,7 +3567,7 @@ SwWW8ImplReader::SwWW8ImplReader(sal_uInt8 nVersionPara, SvStorage* pStorage,
m_aExtraneousParas(rD),
maInsertedTables(rD),
maSectionNameGenerator(rD, rtl::OUString("WW")),
- maGrfNameGenerator(bNewDoc,String('G')),
+ maGrfNameGenerator(bNewDoc, rtl::OUString('G')),
maParaStyleMapper(rD),
maCharStyleMapper(rD),
maTxtNodesHavingFirstLineOfstSet(), // #i103711#
diff --git a/sw/source/filter/ww8/ww8par4.cxx b/sw/source/filter/ww8/ww8par4.cxx
index 5e7f1aca5520..4a68b7bc5058 100644
--- a/sw/source/filter/ww8/ww8par4.cxx
+++ b/sw/source/filter/ww8/ww8par4.cxx
@@ -351,7 +351,7 @@ SdrObject* SwWW8ImplReader::ImportOleBase( Graphic& rGraph,
long nX=0, nY=0; // nX, nY is graphic size
bool bOleOk = true;
- String aSrcStgName = '_';
+ String aSrcStgName = rtl::OUString('_');
// ergibt Name "_4711"
aSrcStgName += String::CreateFromInt32( nObjLocFc );
diff --git a/sw/source/filter/ww8/ww8par5.cxx b/sw/source/filter/ww8/ww8par5.cxx
index 1377713a4382..bffc2409c1a4 100644
--- a/sw/source/filter/ww8/ww8par5.cxx
+++ b/sw/source/filter/ww8/ww8par5.cxx
@@ -432,8 +432,8 @@ long SwWW8ImplReader::Read_Book(WW8PLCFManResult*)
void SwWW8ImplReader::ConvertFFileName( String& rName, const String& rOrg )
{
rName = rOrg;
- rName.SearchAndReplaceAllAscii( "\\\\", String( '\\' ));
- rName.SearchAndReplaceAllAscii( "%20", String( ' ' ));
+ rName.SearchAndReplaceAllAscii( "\\\\", rtl::OUString( '\\' ));
+ rName.SearchAndReplaceAllAscii( "%20", rtl::OUString( ' ' ));
// ggfs. anhaengende Anfuehrungszeichen entfernen
if( rName.Len() && '"' == rName.GetChar( rName.Len()-1 ))
@@ -762,7 +762,7 @@ sal_uInt16 SwWW8ImplReader::End_Field()
if ( maFieldStack.back().mnObjLocFc > 0 )
{
// Store the OLE object as an internal link
- String sOleId = '_';
+ String sOleId = rtl::OUString('_');
sOleId += String::CreateFromInt32( maFieldStack.back().mnObjLocFc );
SvStorageRef xSrc0 = pStg->OpenSotStorage(rtl::OUString(SL::aObjectPool));
@@ -2002,7 +2002,7 @@ eF_ResT SwWW8ImplReader::Read_F_Symbol( WW8FieldDesc*, String& rStr )
NewAttr(aSz);
}
- rDoc.InsertString(*pPaM, cChar);
+ rDoc.InsertString(*pPaM, rtl::OUString(cChar));
if (nSize > 0)
pCtrlStck->SetAttr(*pPaM->GetPoint(), RES_CHRATR_FONTSIZE);
@@ -2265,7 +2265,7 @@ eF_ResT SwWW8ImplReader::Read_F_Macro( WW8FieldDesc*, String& rStr)
aVText += aReadParam.GetResult();
if (bNewVText)
{
- bBracket = aVText.EqualsIgnoreCaseAscii('[', 1, 0)
+ bBracket = aVText.EqualsIgnoreCaseAscii(rtl::OUString('['), 1, 0)
? true : false;
bNewVText = false;
}
@@ -2542,7 +2542,7 @@ void SwWW8ImplReader::Read_SubF_Combined( _ReadFieldParams& rReadParam)
{
String sCombinedCharacters;
if ((-2 == rReadParam.SkipToNextToken()) &&
- rReadParam.GetResult().EqualsIgnoreCaseAscii('(', 1, 0))
+ rReadParam.GetResult().EqualsIgnoreCaseAscii(rtl::OUString('('), 1, 0))
{
for (int i=0;i<2;i++)
{
@@ -2552,8 +2552,8 @@ void SwWW8ImplReader::Read_SubF_Combined( _ReadFieldParams& rReadParam)
if (-2 != rReadParam.SkipToNextToken())
break;
String sF = rReadParam.GetResult();
- if ((('u' == cChar) && sF.EqualsIgnoreCaseAscii('p', 1, 0))
- || (('d' == cChar) && sF.EqualsIgnoreCaseAscii('o', 1, 0)))
+ if ((('u' == cChar) && sF.EqualsIgnoreCaseAscii(rtl::OUString('p'), 1, 0))
+ || (('d' == cChar) && sF.EqualsIgnoreCaseAscii(rtl::OUString('o'), 1, 0)))
{
if (-2 == rReadParam.SkipToNextToken())
{
@@ -2623,7 +2623,7 @@ void SwWW8ImplReader::Read_SubF_Ruby( _ReadFieldParams& rReadParam)
if ('u' == nRet)
{
if (-2 == rReadParam.SkipToNextToken() &&
- (rReadParam.GetResult().EqualsIgnoreCaseAscii('p', 1, 0)))
+ (rReadParam.GetResult().EqualsIgnoreCaseAscii(rtl::OUString('p'), 1, 0)))
{
if (-2 == rReadParam.SkipToNextToken())
{
diff --git a/sw/source/filter/xml/xmltbli.cxx b/sw/source/filter/xml/xmltbli.cxx
index 7ab5756ac084..60fdf2a70907 100644
--- a/sw/source/filter/xml/xmltbli.cxx
+++ b/sw/source/filter/xml/xmltbli.cxx
@@ -1156,7 +1156,7 @@ String lcl_GenerateFldTypeName(OUString sPrefix, SwTableNode* pTableNode)
if (sPrefixStr.Len() == 0)
{
- sPrefixStr = String('_');
+ sPrefixStr = rtl::OUString('_');
}
// increase count until we find a name that is not yet taken
diff --git a/sw/source/ui/app/applab.cxx b/sw/source/ui/app/applab.cxx
index 66819aaa1ed5..55989b850ddb 100644
--- a/sw/source/ui/app/applab.cxx
+++ b/sw/source/ui/app/applab.cxx
@@ -375,10 +375,11 @@ void SwModule::InsertLab(SfxRequest& rReq, sal_Bool bLabel)
{
SwSectionData aSect(FILE_LINK_SECTION,
pSh->GetUniqueSectionName());
- String sLinkName(sfx2::cTokenSeperator);
- sLinkName += sfx2::cTokenSeperator;
- sLinkName += rtl::OUString(MASTER_LABEL);
- aSect.SetLinkFileName(sLinkName);
+ rtl::OUStringBuffer sLinkName;
+ sLinkName.append(sfx2::cTokenSeperator);
+ sLinkName.append(sfx2::cTokenSeperator);
+ sLinkName.append(MASTER_LABEL);
+ aSect.SetLinkFileName(sLinkName.makeStringAndClear());
aSect.SetProtectFlag(true);
pSh->Insert(aDotStr); // Dummytext to allocate the Section
pSh->SttDoc();
diff --git a/sw/source/ui/app/docsh2.cxx b/sw/source/ui/app/docsh2.cxx
index 9f64bfae107e..0c4bec127673 100644
--- a/sw/source/ui/app/docsh2.cxx
+++ b/sw/source/ui/app/docsh2.cxx
@@ -1066,7 +1066,7 @@ void SwDocShell::Execute(SfxRequest& rReq)
EnableSetModified( sal_False );
WriterRef xWrt;
// mba: looks as if relative URLs don't make sense here
- ::GetRTFWriter( 'O', String(), xWrt );
+ ::GetRTFWriter( rtl::OUString('O'), rtl::OUString(), xWrt );
SvMemoryStream *pStrm = new SvMemoryStream();
pStrm->SetBufferSize( 16348 );
SwWriter aWrt( *pStrm, *GetDoc() );
diff --git a/sw/source/ui/app/docstyle.cxx b/sw/source/ui/app/docstyle.cxx
index 344f684f3fde..8276247910f6 100644
--- a/sw/source/ui/app/docstyle.cxx
+++ b/sw/source/ui/app/docstyle.cxx
@@ -316,7 +316,7 @@ sal_uInt16 lcl_FindName(const SwPoolFmtList& rLst, SfxStyleFamily eFam,
{
if(!rLst.empty())
{
- String sSrch( ' ' );
+ String sSrch = rtl::OUString(' ');
switch( eFam )
{
case SFX_STYLE_FAMILY_CHAR: sSrch = cCHAR; break;
@@ -361,7 +361,7 @@ sal_Bool FindPhyStyle( SwDoc& rDoc, const String& rName, SfxStyleFamily eFam )
void SwPoolFmtList::Append( char cChar, const String& rStr )
{
- String aStr(cChar);
+ String aStr = rtl::OUString(cChar);
aStr += rStr;
for(std::vector<String>::const_iterator i = begin(); i != end(); ++i)
if(*i == aStr)
diff --git a/sw/source/ui/cctrl/actctrl.cxx b/sw/source/ui/cctrl/actctrl.cxx
index 4de3bca3d465..2910585b4df5 100644
--- a/sw/source/ui/cctrl/actctrl.cxx
+++ b/sw/source/ui/cctrl/actctrl.cxx
@@ -73,7 +73,7 @@ void NoSpaceEdit::KeyInput(const KeyEvent& rEvt)
sal_Bool bCallParent = sal_True;
if(rEvt.GetCharCode())
{
- String sKey = rEvt.GetCharCode();
+ rtl::OUString sKey(rEvt.GetCharCode());
if( STRING_NOTFOUND != sForbiddenChars.Search(sKey))
bCallParent = sal_False;
}
diff --git a/sw/source/ui/chrdlg/drpcps.cxx b/sw/source/ui/chrdlg/drpcps.cxx
index 8866bec1fd54..a6f479d78cfb 100644
--- a/sw/source/ui/chrdlg/drpcps.cxx
+++ b/sw/source/ui/chrdlg/drpcps.cxx
@@ -183,7 +183,7 @@ String GetDefaultString(sal_uInt16 nChars)
{
String aStr;
for (sal_uInt16 i = 0; i < nChars; i++)
- aStr += String((char) (i + 65));
+ aStr += rtl::OUString((char) (i + 65));
return aStr;
}
diff --git a/sw/source/ui/dbui/addresslistdialog.cxx b/sw/source/ui/dbui/addresslistdialog.cxx
index 0647b8d30936..1eb5afd236fe 100644
--- a/sw/source/ui/dbui/addresslistdialog.cxx
+++ b/sw/source/ui/dbui/addresslistdialog.cxx
@@ -409,7 +409,7 @@ IMPL_LINK(SwAddressListDialog, CreateHdl_Impl, PushButton*, pButton)
uno::Sequence<PropertyValue> aInfo(4);
PropertyValue* pInfo = aInfo.getArray();
pInfo[0].Name = C2U("FieldDelimiter");
- pInfo[0].Value <<= OUString(String('\t'));
+ pInfo[0].Value <<= OUString('\t');
pInfo[1].Name = C2U("StringDelimiter");
pInfo[1].Value <<= OUString('"');
pInfo[2].Name = C2U("Extension");
diff --git a/sw/source/ui/dbui/dbmgr.cxx b/sw/source/ui/dbui/dbmgr.cxx
index 27fc513a297b..16b70229199b 100644
--- a/sw/source/ui/dbui/dbmgr.cxx
+++ b/sw/source/ui/dbui/dbmgr.cxx
@@ -575,10 +575,9 @@ void SwNewDBMgr::ImportDBEntry(SwWrtShell* pSh)
else
{
// column not found -> show error
- String sInsert = '?';
- sInsert += sColumn;
- sInsert += '?';
- pSh->Insert(sInsert);
+ rtl::OUStringBuffer sInsert;
+ sInsert.append('?').append(sColumn).append('?');
+ pSh->Insert(sInsert.makeStringAndClear());
}
sColumn = lcl_FindColumn(sFormatStr, nUsedPos, nSeparator);
}
diff --git a/sw/source/ui/dbui/mmaddressblockpage.cxx b/sw/source/ui/dbui/mmaddressblockpage.cxx
index 5fc7ba5ff11b..5cde4aacbe74 100644
--- a/sw/source/ui/dbui/mmaddressblockpage.cxx
+++ b/sw/source/ui/dbui/mmaddressblockpage.cxx
@@ -517,7 +517,7 @@ void SwRestrictedComboBox::KeyInput(const KeyEvent& rEvt)
sal_Bool bCallParent = sal_True;
if(rEvt.GetCharCode())
{
- String sKey = rEvt.GetCharCode();
+ rtl::OUString sKey(rEvt.GetCharCode());
if( STRING_NOTFOUND != sForbiddenChars.Search(sKey))
bCallParent = sal_False;
}
@@ -1452,7 +1452,7 @@ void AddressMultiLineEdit::SetText( const String& rStr )
if(sPara.Len() && sPara.GetChar(sPara.Len() - 1) != ' ')
{
TextPaM aPaM(nPara, sPara.Len());
- pTextEngine->ReplaceText(TextSelection( aPaM ), String(' '));
+ pTextEngine->ReplaceText(TextSelection( aPaM ), rtl::OUString(' '));
}
while(true)
{
@@ -1596,7 +1596,7 @@ void AddressMultiLineEdit::MoveCurrentItem(sal_uInt16 nMove)
{
TextPaM aTemp(nPara - 1, pTextEngine->GetTextLen( nPara - 1 ));
- pTextEngine->ReplaceText( aTemp, String('\n'));
+ pTextEngine->ReplaceText( aTemp, rtl::OUString('\n'));
}
InsertNewEntryAtPosition( sCurrentItem, nPara, nIndex );
diff --git a/sw/source/ui/dbui/mmconfigitem.cxx b/sw/source/ui/dbui/mmconfigitem.cxx
index c74912e5cd21..52b93da9dfa1 100644
--- a/sw/source/ui/dbui/mmconfigitem.cxx
+++ b/sw/source/ui/dbui/mmconfigitem.cxx
@@ -421,7 +421,7 @@ void lcl_ConvertFromNumbers(OUString& rBlock, const ResStringArray& rHeaders)
//convert the numbers used for the configuration to strings used for UI to numbers
//doesn't use ReplaceAll to prevent expansion of numbers inside of the headers
String sBlock(rBlock);
- sBlock.SearchAndReplaceAllAscii("\\n", '\n');
+ sBlock.SearchAndReplaceAllAscii("\\n", rtl::OUString('\n'));
SwAddressIterator aGreetingIter(sBlock);
sBlock.Erase();
while(aGreetingIter.HasMore())
diff --git a/sw/source/ui/dbui/mmoutputpage.cxx b/sw/source/ui/dbui/mmoutputpage.cxx
index d4e346c218f8..7a0242ef595c 100644
--- a/sw/source/ui/dbui/mmoutputpage.cxx
+++ b/sw/source/ui/dbui/mmoutputpage.cxx
@@ -807,7 +807,7 @@ IMPL_LINK(SwMailMergeOutputPage, SaveOutputHdl_Impl, PushButton*, pButton)
pTargetView->GetWrtShell().EndAction();
//then save it
String sOutPath = aURL.GetMainURL(INetURLObject::DECODE_TO_IURI);
- String sCounter('_');
+ String sCounter = rtl::OUString('_');
sCounter += String::CreateFromInt32(nDoc);
sOutPath.Insert(sCounter, sOutPath.Len() - sExtension.Len() - 1);
diff --git a/sw/source/ui/dialog/regionsw.cxx b/sw/source/ui/dialog/regionsw.cxx
index 64b3f60bbb19..5a01247ef5b0 100644
--- a/sw/source/ui/dialog/regionsw.cxx
+++ b/sw/source/ui/dialog/regionsw.cxx
@@ -165,7 +165,7 @@ void SwBaseShell::InsertRegionDialog(SfxRequest& rReq)
if(aFile.Len() || aSub.Len())
{
- String sLinkFileName(sfx2::cTokenSeperator);
+ String sLinkFileName = rtl::OUString(sfx2::cTokenSeperator);
sLinkFileName += sfx2::cTokenSeperator;
sLinkFileName.SetToken(0, sfx2::cTokenSeperator,aFile);
diff --git a/sw/source/ui/docvw/edtwin.cxx b/sw/source/ui/docvw/edtwin.cxx
index f2d1f47325df..4fd5a68a6077 100644
--- a/sw/source/ui/docvw/edtwin.cxx
+++ b/sw/source/ui/docvw/edtwin.cxx
@@ -2321,7 +2321,7 @@ KEYINPUT_CHECKTABLE_INSDEL:
else if(!rSh.HasReadonlySel())
{
sal_Bool bIsNormalChar = GetAppCharClass().isLetterNumeric(
- String( aCh ), 0 );
+ rtl::OUString( aCh ), 0 );
if( bAppendSpace && bIsNormalChar &&
(aInBuffer.Len() || !rSh.IsSttPara() || !rSh.IsEndPara() ))
{
diff --git a/sw/source/ui/docvw/srcedtw.cxx b/sw/source/ui/docvw/srcedtw.cxx
index 2ffd91801bb3..c6bb14fecb14 100644
--- a/sw/source/ui/docvw/srcedtw.cxx
+++ b/sw/source/ui/docvw/srcedtw.cxx
@@ -564,7 +564,7 @@ void SwSrcEditWindow::InitScrollBars()
pVScrollbar->SetThumbPos( pTextView->GetStartDocPos().Y() );
pHScrollbar->SetVisibleSize( aOutSz.Width() );
pHScrollbar->SetPageSize( aOutSz.Width() * 8 / 10 );
- pHScrollbar->SetLineSize( pOutWin->GetTextWidth( 'x' ) );
+ pHScrollbar->SetLineSize( pOutWin->GetTextWidth(rtl::OUString('x')) );
pHScrollbar->SetThumbPos( pTextView->GetStartDocPos().X() );
}
diff --git a/sw/source/ui/envelp/envlop1.cxx b/sw/source/ui/envelp/envlop1.cxx
index 76b49be137cb..af84a36e55e1 100644
--- a/sw/source/ui/envelp/envlop1.cxx
+++ b/sw/source/ui/envelp/envlop1.cxx
@@ -263,16 +263,17 @@ IMPL_LINK( SwEnvPage, DatabaseHdl, ListBox *, pListBox )
IMPL_LINK_NOARG(SwEnvPage, FieldHdl)
{
- String aStr ( '<' );
- aStr += aDatabaseLB.GetSelectEntry();
- aStr += '.';
- aStr += aTableLB.GetSelectEntry();
- aStr += '.';
- aStr += aTableLB.GetEntryData(aTableLB.GetSelectEntryPos()) == 0 ? '0' : '1';
- aStr += '.';
- aStr += aDBFieldLB.GetSelectEntry();
- aStr += '>';
- aAddrEdit.ReplaceSelected(aStr);
+ rtl::OUStringBuffer aStr;
+ aStr.append('<');
+ aStr.append(aDatabaseLB.GetSelectEntry());
+ aStr.append('.');
+ aStr.append(aTableLB.GetSelectEntry());
+ aStr.append('.');
+ aStr.append(aTableLB.GetEntryData(aTableLB.GetSelectEntryPos()) == 0 ? '0' : '1');
+ aStr.append('.');
+ aStr.append(aDBFieldLB.GetSelectEntry());
+ aStr.append('>');
+ aAddrEdit.ReplaceSelected(aStr.makeStringAndClear());
Selection aSel = aAddrEdit.GetSelection();
aAddrEdit.GrabFocus();
aAddrEdit.SetSelection(aSel);
diff --git a/sw/source/ui/envelp/label1.cxx b/sw/source/ui/envelp/label1.cxx
index 25ca092ed5b5..4f816436f46d 100644
--- a/sw/source/ui/envelp/label1.cxx
+++ b/sw/source/ui/envelp/label1.cxx
@@ -380,16 +380,17 @@ IMPL_LINK( SwLabPage, DatabaseHdl, ListBox *, pListBox )
IMPL_LINK_NOARG(SwLabPage, FieldHdl)
{
- String aStr ( '<' );
- aStr += aDatabaseLB.GetSelectEntry();
- aStr += '.';
- aStr += aTableLB.GetSelectEntry();
- aStr += '.';
- aStr += aTableLB.GetEntryData(aTableLB.GetSelectEntryPos()) == 0 ? '0' : '1';
- aStr += '.';
- aStr += aDBFieldLB.GetSelectEntry();
- aStr += '>';
- aWritingEdit.ReplaceSelected(aStr);
+ rtl::OUStringBuffer aStr;
+ aStr.append('<');
+ aStr.append(aDatabaseLB.GetSelectEntry());
+ aStr.append('.');
+ aStr.append(aTableLB.GetSelectEntry());
+ aStr.append('.');
+ aStr.append(aTableLB.GetEntryData(aTableLB.GetSelectEntryPos()) == 0 ? '0' : '1');
+ aStr.append('.');
+ aStr.append(aDBFieldLB.GetSelectEntry());
+ aStr.append('>');
+ aWritingEdit.ReplaceSelected(aStr.makeStringAndClear());
Selection aSel = aWritingEdit.GetSelection();
aWritingEdit.GrabFocus();
aWritingEdit.SetSelection(aSel);
diff --git a/sw/source/ui/envelp/labfmt.cxx b/sw/source/ui/envelp/labfmt.cxx
index a83adb2c7a6e..4c1094c27a0c 100644
--- a/sw/source/ui/envelp/labfmt.cxx
+++ b/sw/source/ui/envelp/labfmt.cxx
@@ -97,7 +97,7 @@ SwLabPreview::SwLabPreview( const SwLabFmtPage* pParent, const ResId& rResID ) :
lPWidthWidth = GetTextWidth(aPWidthStr);
lPHeightWidth = GetTextWidth(aPHeightStr);
lXHeight = GetTextHeight();
- lXWidth = GetTextWidth('X');
+ lXWidth = GetTextWidth(rtl::OUString('X'));
// Scale factor
float fx = (float)(lOutWPix - (2 * (lLeftWidth + 15))) / (float)lOutWPix;
diff --git a/sw/source/ui/envelp/mailmrge.cxx b/sw/source/ui/envelp/mailmrge.cxx
index f7050da7e8a1..b277d888b3cb 100644
--- a/sw/source/ui/envelp/mailmrge.cxx
+++ b/sw/source/ui/envelp/mailmrge.cxx
@@ -693,7 +693,7 @@ bool SwMailMergeDlg::ExecQryShell()
URIHelper::SmartRel2Abs(
aAbs, aPathED.GetText(), URIHelper::GetMaybeFileHdl()));
pModOpt->SetMailingPath(sPath);
- String sDelim(INET_PATH_TOKEN);
+ String sDelim = rtl::OUString(INET_PATH_TOKEN);
if (sPath.Len() >= sDelim.Len() &&
sPath.Copy(sPath.Len()-sDelim.Len()).CompareTo(sDelim) != COMPARE_EQUAL)
diff --git a/sw/source/ui/fldui/fldmgr.cxx b/sw/source/ui/fldui/fldmgr.cxx
index 710fde8e92de..2d30341a09b4 100644
--- a/sw/source/ui/fldui/fldmgr.cxx
+++ b/sw/source/ui/fldui/fldmgr.cxx
@@ -1271,7 +1271,7 @@ sal_Bool SwFldMgr::InsertFld( const SwInsertFld_Data& rData )
if (nLevel != 0x7f && cSeparator == 0)
cSeparator = '.';
- pTyp->SetDelimiter(cSeparator);
+ pTyp->SetDelimiter(rtl::OUString(cSeparator));
SwSetExpField* pExpFld = new SwSetExpField(pTyp, rData.sPar2, nFormatId);
bExp = sal_True;
pFld = pExpFld;
diff --git a/sw/source/ui/fldui/fldpage.cxx b/sw/source/ui/fldui/fldpage.cxx
index 0cab6a9b8414..da07f5ff2292 100644
--- a/sw/source/ui/fldui/fldpage.cxx
+++ b/sw/source/ui/fldui/fldpage.cxx
@@ -186,7 +186,7 @@ sal_Bool SwFldPage::InsertFld(sal_uInt16 nTypeId, sal_uInt16 nSubType, const Str
{
aReq.AppendItem(SfxStringItem(FN_INSERT_FIELD, rPar1));
aReq.AppendItem(SfxStringItem
- (FN_PARAM_3,String(cSeparator)));
+ (FN_PARAM_3, rtl::OUString(cSeparator)));
aReq.AppendItem(SfxUInt16Item(FN_PARAM_FIELD_SUBTYPE, nSubType));
}
aReq.AppendItem(SfxUInt16Item(FN_PARAM_FIELD_TYPE , nTypeId));
@@ -257,7 +257,7 @@ sal_Bool SwFldPage::InsertFld(sal_uInt16 nTypeId, sal_uInt16 nSubType, const Str
{
SwSetExpFieldType* pTyp = (SwSetExpFieldType*)pTmpFld->GetTyp();
pTyp->SetOutlineLvl( static_cast< sal_uInt8 >(nSubType & 0xff));
- pTyp->SetDelimiter(cSeparator);
+ pTyp->SetDelimiter(rtl::OUString(cSeparator));
nSubType = nsSwGetSetExpType::GSE_SEQ;
}
diff --git a/sw/source/ui/fldui/fldvar.cxx b/sw/source/ui/fldui/fldvar.cxx
index c6477bbbce6f..e7e0ae701f43 100644
--- a/sw/source/ui/fldui/fldvar.cxx
+++ b/sw/source/ui/fldui/fldvar.cxx
@@ -1217,7 +1217,7 @@ sal_Bool SwFldVarPage::FillItemSet(SfxItemSet& )
else
{
nSubType--;
- String sSeparator(aSeparatorED.GetText().GetChar(0));
+ String sSeparator = rtl::OUString(aSeparatorED.GetText().GetChar(0));
cSeparator = sSeparator.Len() ? sSeparator.GetChar(0) : ' ';
}
break;
diff --git a/sw/source/ui/frmdlg/column.cxx b/sw/source/ui/frmdlg/column.cxx
index 039d2be03280..65ae8f3d7de5 100644
--- a/sw/source/ui/frmdlg/column.cxx
+++ b/sw/source/ui/frmdlg/column.cxx
@@ -909,7 +909,7 @@ void SwColumnPage::UpdateCols()
void SwColumnPage::SetLabels( sal_uInt16 nVis )
{
- String sLbl( '~' );
+ rtl::OUString sLbl( '~' );
String sLbl2( String::CreateFromInt32( nVis + 1 ));
String tmp1(sLbl2);
diff --git a/sw/source/ui/frmdlg/cption.cxx b/sw/source/ui/frmdlg/cption.cxx
index 535495ff3163..967c494dd705 100644
--- a/sw/source/ui/frmdlg/cption.cxx
+++ b/sw/source/ui/frmdlg/cption.cxx
@@ -537,14 +537,14 @@ void SwSequenceOptionDialog::Apply()
sal_Bool bUpdate = sal_True;
if( pFldType )
{
- pFldType->SetDelimiter( cDelim );
+ pFldType->SetDelimiter( rtl::OUString(cDelim) );
pFldType->SetOutlineLvl( nLvl );
}
else if( aFldTypeName.Len() && nLvl < MAXLEVEL )
{
// then we have to insert that
SwSetExpFieldType aFldType( rSh.GetDoc(), aFldTypeName, nsSwGetSetExpType::GSE_SEQ );
- aFldType.SetDelimiter( cDelim );
+ aFldType.SetDelimiter( rtl::OUString(cDelim) );
aFldType.SetOutlineLvl( nLvl );
rSh.InsertFldType( aFldType );
}
@@ -582,7 +582,8 @@ long SwCaptionDialog::CategoryBox::PreNotify( NotifyEvent& rNEvt )
if(nTmpCode != KEY_BACKSPACE && nTmpCode != KEY_RETURN
&& nTmpCode != KEY_TAB && nTmpCode != KEY_ESCAPE)
{
- String sKey( pEvent->GetCharCode() ), sName( GetText() );
+ rtl::OUString sKey( pEvent->GetCharCode() );
+ String sName( GetText() );
Selection aSel( GetSelection() );
aSel.Justify();
if( aSel.Len() )
diff --git a/sw/source/ui/index/cnttab.cxx b/sw/source/ui/index/cnttab.cxx
index 942a7a44beca..4be8d2f34d03 100644
--- a/sw/source/ui/index/cnttab.cxx
+++ b/sw/source/ui/index/cnttab.cxx
@@ -451,7 +451,7 @@ SwTOXDescription& SwMultiTOXTabDialog::GetTOXDescription(CurTOXType eType)
rSh.GetFldType(RES_AUTHORITY, aEmptyStr);
if(pFType)
{
- String sBrackets(pFType->GetPrefix());
+ String sBrackets = rtl::OUString(pFType->GetPrefix());
sBrackets += pFType->GetSuffix();
pDescArr[nIndex]->SetAuthBrackets(sBrackets);
pDescArr[nIndex]->SetAuthSequence(pFType->IsSequence());
@@ -1810,7 +1810,7 @@ void SwIdxTreeListBox::RequestHelp( const HelpEvent& rHEvt )
{
sal_uInt16 nLevel = static_cast< sal_uInt16 >(GetModel()->GetAbsPos(pEntry));
String sEntry = pParent->GetLevelHelp(++nLevel);
- if('*' == sEntry)
+ if (comphelper::string::equals(sEntry, '*'))
sEntry = GetEntryText(pEntry);
if(sEntry.Len())
{
@@ -1974,10 +1974,10 @@ SwTOXEntryTabPage::SwTOXEntryTabPage(Window* pParent, const SfxItemSet& rAttrSet
aSortDocPosRB.Check();
aFillCharCB.SetMaxTextLen(1);
- aFillCharCB.InsertEntry(' ');
- aFillCharCB.InsertEntry('.');
- aFillCharCB.InsertEntry('-');
- aFillCharCB.InsertEntry('_');
+ aFillCharCB.InsertEntry(rtl::OUString(' '));
+ aFillCharCB.InsertEntry(rtl::OUString('.'));
+ aFillCharCB.InsertEntry(rtl::OUString('-'));
+ aFillCharCB.InsertEntry(rtl::OUString('_'));
aButtonPositions[0] = aEntryNoPB.GetPosPixel();
aButtonPositions[1] = aEntryPB.GetPosPixel();
@@ -2590,7 +2590,7 @@ IMPL_LINK(SwTOXEntryTabPage, TokenSelectedHdl, SwFormToken*, pToken)
{
aTabPosMF.SetValue(aTabPosMF.Normalize(pToken->nTabStopPosition), FUNIT_TWIP);
aAutoRightCB.Check(SVX_TAB_ADJUST_END == pToken->eTabAlign);
- aFillCharCB.SetText(pToken->cTabFillChar);
+ aFillCharCB.SetText(rtl::OUString(pToken->cTabFillChar));
aTabPosFT.Enable(!aAutoRightCB.IsChecked());
aTabPosMF.Enable(!aAutoRightCB.IsChecked());
}
@@ -4068,7 +4068,6 @@ void SwEntryBrowseBox::InitController(
void SwEntryBrowseBox::ReadEntries(SvStream& rInStr)
{
AutoMarkEntry* pToInsert = 0;
- const String sZero('0');
rtl_TextEncoding eTEnc = osl_getThreadTextEncoding();
while( !rInStr.GetError() && !rInStr.IsEof() )
{
@@ -4095,10 +4094,10 @@ void SwEntryBrowseBox::ReadEntries(SvStream& rInStr)
pToInsert->sSecKey = sLine.GetToken(0, ';', nSttPos );
String sStr = sLine.GetToken(0, ';', nSttPos );
- pToInsert->bCase = sStr.Len() && sStr != sZero;
+ pToInsert->bCase = sStr.Len() && !comphelper::string::equals(sStr, '0');
sStr = sLine.GetToken(0, ';', nSttPos );
- pToInsert->bWord = sStr.Len() && sStr != sZero;
+ pToInsert->bWord = sStr.Len() && !comphelper::string::equals(sStr, '0');
aEntryArr.push_back( pToInsert );
pToInsert = 0;
@@ -4136,7 +4135,7 @@ void SwEntryBrowseBox::WriteEntries(SvStream& rOutStr)
AutoMarkEntry* pEntry = &aEntryArr[i];
if(pEntry->sComment.Len())
{
- String sWrite('#');
+ String sWrite = rtl::OUString('#');
sWrite += pEntry->sComment;
rOutStr.WriteByteStringLine( sWrite, eTEnc );
}
diff --git a/sw/source/ui/misc/bookmark.cxx b/sw/source/ui/misc/bookmark.cxx
index 0f2b3e773d95..5b20d5e8ec7d 100644
--- a/sw/source/ui/misc/bookmark.cxx
+++ b/sw/source/ui/misc/bookmark.cxx
@@ -249,7 +249,7 @@ long BookmarkCombo::PreNotify( NotifyEvent& rNEvt )
if( EVENT_KEYINPUT == rNEvt.GetType() &&
rNEvt.GetKeyEvent()->GetCharCode() )
{
- String sKey( rNEvt.GetKeyEvent()->GetCharCode() );
+ rtl::OUString sKey( rNEvt.GetKeyEvent()->GetCharCode() );
if(STRING_NOTFOUND != aForbiddenChars.Search(sKey))
nHandled = 1;
}
diff --git a/sw/source/ui/misc/glossary.cxx b/sw/source/ui/misc/glossary.cxx
index 2cbb826d9c55..376aab2abbd9 100644
--- a/sw/source/ui/misc/glossary.cxx
+++ b/sw/source/ui/misc/glossary.cxx
@@ -109,7 +109,7 @@ String lcl_GetValidShortCut( const String& rName )
while( rName.GetChar( nStart-1 ) == ' ' && nStart < nSz )
nStart++;
- String aBuf( rName.GetChar( nStart-1 ));
+ String aBuf = rtl::OUString(rName.GetChar(nStart-1));
for( ; nStart < nSz; ++nStart )
{
diff --git a/sw/source/ui/misc/outline.cxx b/sw/source/ui/misc/outline.cxx
index 41e00c591bad..cd32e693e8ee 100644
--- a/sw/source/ui/misc/outline.cxx
+++ b/sw/source/ui/misc/outline.cxx
@@ -888,7 +888,7 @@ sal_uInt16 lcl_DrawBullet(VirtualDevice* pVDev,
aFont.SetSize(rSize);
aFont.SetTransparent(sal_True);
pVDev->SetFont( aFont );
- String aText(rFmt.GetBulletChar());
+ rtl::OUString aText(rFmt.GetBulletChar());
pVDev->DrawText( Point(nXStart, nYStart), aText );
sal_uInt16 nRet = (sal_uInt16)pVDev->GetTextWidth(aText);
@@ -1042,7 +1042,7 @@ void NumberingPreview::Paint( const Rectangle& /*rRect*/ )
rFmt.GetLabelFollowedBy() == SvxNumberFormat::SPACE )
{
pVDev->SetFont(aStdFont);
- String aText(' ');
+ rtl::OUString aText(' ');
pVDev->DrawText( Point(nNumberXPos, nYStart), aText );
nBulletWidth = nBulletWidth + (sal_uInt16)pVDev->GetTextWidth(aText);
}
diff --git a/sw/source/ui/misc/srtdlg.cxx b/sw/source/ui/misc/srtdlg.cxx
index 59936afce4ae..7841c7085a8d 100644
--- a/sw/source/ui/misc/srtdlg.cxx
+++ b/sw/source/ui/misc/srtdlg.cxx
@@ -250,7 +250,7 @@ SwSortDlg::SwSortDlg(Window* pParent, SwWrtShell &rShell) :
aDelimTabRB.Check(cDeli == '\t');
if(!aDelimTabRB.IsChecked())
{
- aDelimEdt.SetText(cDeli);
+ aDelimEdt.SetText(rtl::OUString(cDeli));
aDelimFreeRB.Check(sal_True);
DelimHdl(&aDelimFreeRB);
}
@@ -416,7 +416,7 @@ IMPL_LINK_NOARG(SwSortDlg, DelimCharHdl)
{
SFX_ITEMSET_ARG( pMap->GetOutputItemSet(), pItem, SfxInt32Item, SID_ATTR_CHAR, sal_False );
if ( pItem )
- aDelimEdt.SetText( sal_Unicode ( pItem->GetValue() ) );
+ aDelimEdt.SetText( rtl::OUString(pItem->GetValue()) );
}
delete pMap;
diff --git a/sw/source/ui/ribbar/inputwin.cxx b/sw/source/ui/ribbar/inputwin.cxx
index c59dab2a96eb..838089875998 100644
--- a/sw/source/ui/ribbar/inputwin.cxx
+++ b/sw/source/ui/ribbar/inputwin.cxx
@@ -232,7 +232,7 @@ void SwInputWindow::ShowWin()
// Formel soll immer mit einem "=" beginnen, hier
// also setzen
- String sEdit( '=' );
+ String sEdit = rtl::OUString('=');
if( pMgr->GetCurFld() && TYP_FORMELFLD == pMgr->GetCurTypeId() )
{
sEdit += pMgr->GetCurFldPar2();
@@ -476,7 +476,7 @@ IMPL_LINK( SwInputWindow, SelTblCellsNotify, SwWrtShell *, pCaller )
void SwInputWindow::SetFormula( const String& rFormula, sal_Bool bDelFlag )
{
- String sEdit( '=' );
+ String sEdit = rtl::OUString('=');
if( rFormula.Len() )
{
if( '=' == rFormula.GetChar( 0 ) )
@@ -567,9 +567,9 @@ void InputEdit::UpdateRange(const String& rBoxes,
const sal_uInt16 nLen = aActText.Len();
if( !nLen )
{
- String aStr(cOpen);
- aStr += aBoxes;
- aStr += cClose;
+ String aStr = rtl::OUStringBuffer().
+ append(cOpen).append(aBoxes).append(cClose).
+ makeStringAndClear();
SetText(aStr);
sal_uInt16 nPos = aStr.Search( cClose );
OSL_ENSURE(nPos < aStr.Len(), "delimiter not found");
@@ -619,12 +619,12 @@ void InputEdit::UpdateRange(const String& rBoxes,
}
else
{
- String aTmp( (char)cOpen );
- aTmp += aBoxes;
- aTmp += (char)cClose;
+ rtl::OUString aTmp = rtl::OUStringBuffer().
+ append(cOpen).append(aBoxes).append(cClose).
+ makeStringAndClear();
nPos = (sal_uInt16)aSelection.Min();
aActText.Insert( aTmp, nPos );
- nPos = nPos + aTmp.Len();
+ nPos = nPos + aTmp.getLength();
}
if( GetText() != aActText )
{
diff --git a/sw/source/ui/shells/annotsh.cxx b/sw/source/ui/shells/annotsh.cxx
index 5f9e7d3f9d9d..5e56906a7160 100644
--- a/sw/source/ui/shells/annotsh.cxx
+++ b/sw/source/ui/shells/annotsh.cxx
@@ -348,7 +348,7 @@ void SwAnnotationShell::Exec( SfxRequest &rReq )
case SID_INSERT_ZWSP : cIns = CHAR_ZWSP ; break;
case SID_INSERT_ZWNBSP: cIns = CHAR_ZWNBSP; break;
}
- pOLV->InsertText( String(cIns));
+ pOLV->InsertText( rtl::OUString(cIns));
rReq.Done();
break;
}
diff --git a/sw/source/ui/shells/basesh.cxx b/sw/source/ui/shells/basesh.cxx
index 8d63e469a5c3..c10d28f79cf9 100644
--- a/sw/source/ui/shells/basesh.cxx
+++ b/sw/source/ui/shells/basesh.cxx
@@ -859,7 +859,7 @@ void SwBaseShell::Execute(SfxRequest &rReq)
if( SfxRequest::HasMacroRecorder(pViewFrame) )
{
SfxRequest aReq( pViewFrame, nSlot);
- aReq.AppendItem( SfxStringItem( FN_PARAM_1, String(cDelim) ));
+ aReq.AppendItem( SfxStringItem( FN_PARAM_1, rtl::OUString(cDelim) ));
if(bToTable)
{
if(pTAFmt)
diff --git a/sw/source/ui/shells/drwtxtsh.cxx b/sw/source/ui/shells/drwtxtsh.cxx
index eb8751514dfa..82c6bee50660 100644
--- a/sw/source/ui/shells/drwtxtsh.cxx
+++ b/sw/source/ui/shells/drwtxtsh.cxx
@@ -428,7 +428,7 @@ void SwDrawTextShell::ExecDraw(SfxRequest &rReq)
case SID_INSERT_ZWSP : cIns = CHAR_ZWSP ; break;
case SID_INSERT_ZWNBSP: cIns = CHAR_ZWNBSP; break;
}
- pOLV->InsertText( String(cIns));
+ pOLV->InsertText( rtl::OUString(cIns));
rReq.Done();
}
break;
diff --git a/sw/source/ui/shells/textsh.cxx b/sw/source/ui/shells/textsh.cxx
index d5eea66d6296..c6a55883f5d2 100644
--- a/sw/source/ui/shells/textsh.cxx
+++ b/sw/source/ui/shells/textsh.cxx
@@ -163,7 +163,7 @@ void SwTextShell::ExecInsert(SfxRequest &rReq)
case FN_INSERT_SOFT_HYPHEN:
if( CHAR_SOFTHYPHEN != rSh.SwCrsrShell::GetChar( sal_True, 0 ) &&
CHAR_SOFTHYPHEN != rSh.SwCrsrShell::GetChar( sal_True, -1 ))
- rSh.Insert( String( CHAR_SOFTHYPHEN ) );
+ rSh.Insert( rtl::OUString( CHAR_SOFTHYPHEN ) );
break;
case FN_INSERT_HARDHYPHEN:
@@ -180,7 +180,7 @@ void SwTextShell::ExecInsert(SfxRequest &rReq)
ChgToEnEmDash | SetINetAttr | Autocorrect ))
rSh.AutoCorrect( *pACorr, cIns );
else
- rSh.Insert( String( cIns ) );
+ rSh.Insert( rtl::OUString( cIns ) );
}
break;
case SID_INSERT_RLM :
@@ -196,7 +196,7 @@ void SwTextShell::ExecInsert(SfxRequest &rReq)
case SID_INSERT_ZWSP : cIns = CHAR_ZWSP ; break;
case SID_INSERT_ZWNBSP: cIns = CHAR_ZWNBSP; break;
}
- rSh.Insert( String( cIns ) );
+ rSh.Insert( rtl::OUString( cIns ) );
}
break;
case FN_INSERT_BREAK:
diff --git a/sw/source/ui/table/convert.cxx b/sw/source/ui/table/convert.cxx
index 332591f99d9c..fa86fd27ae7b 100644
--- a/sw/source/ui/table/convert.cxx
+++ b/sw/source/ui/table/convert.cxx
@@ -168,7 +168,7 @@ SwConvertTableDlg::SwConvertTableDlg( SwView& rView, bool bToTable )
case 3:
aOtherBtn.Check();
if(uOther)
- aOtherEd.SetText(uOther);
+ aOtherEd.SetText(rtl::OUString(uOther));
break;
}
diff --git a/sw/source/ui/table/tabledlg.cxx b/sw/source/ui/table/tabledlg.cxx
index 234827ac7f93..411337c86e98 100644
--- a/sw/source/ui/table/tabledlg.cxx
+++ b/sw/source/ui/table/tabledlg.cxx
@@ -32,6 +32,7 @@
#endif
#include <hintids.hxx>
+#include <comphelper/string.hxx>
#include <vcl/msgbox.hxx>
#include <svl/stritem.hxx>
#include <svl/intitem.hxx>
@@ -919,7 +920,7 @@ IMPL_LINK( SwTableColumnPage, AutoClickHdl, CheckBox *, pBox )
}
for( sal_uInt16 i = 0; (i < nNoOfVisibleCols ) && ( i < MET_FIELDS); i++ )
{
- String sEntry('~');
+ String sEntry = rtl::OUString('~');
String sIndex = String::CreateFromInt32( aValueTbl[i] + 1 );
sEntry += sIndex;
pTextArr[i]->SetText( sEntry );
@@ -1446,7 +1447,7 @@ sal_Bool SwTextFlowPage::FillItemSet( SfxItemSet& rSet )
sal_uInt16 nPgNum = static_cast< sal_uInt16 >(aPageNoNF.GetValue());
if ( !pDesc || !pDesc->GetPageDesc() ||
( pDesc->GetPageDesc() && ((pDesc->GetPageDesc()->GetName() != sPage) ||
- aPageNoNF.GetSavedValue() != (String)nPgNum)))
+ !comphelper::string::equals(aPageNoNF.GetSavedValue(), nPgNum))))
{
SwFmtPageDesc aFmt( pShell->FindPageDescByName( sPage, sal_True ) );
aFmt.SetNumOffset(bState ? nPgNum : 0);
diff --git a/sw/source/ui/uiview/srcview.cxx b/sw/source/ui/uiview/srcview.cxx
index 0799925cbdc1..bcad2aee9471 100644
--- a/sw/source/ui/uiview/srcview.cxx
+++ b/sw/source/ui/uiview/srcview.cxx
@@ -705,7 +705,7 @@ sal_Int32 SwSrcView::PrintSource(
// nLinepPage stimmt nicht, wenn Zeilen umgebrochen werden muessen...
sal_uInt16 nLinespPage = (sal_uInt16) (aPaperSz.Height() / nLineHeight);
- sal_uInt16 nCharspLine = (sal_uInt16) (aPaperSz.Width() / pOutDev->GetTextWidth( 'X' ));
+ sal_uInt16 nCharspLine = (sal_uInt16) (aPaperSz.Width() / pOutDev->GetTextWidth(rtl::OUString('X')));
sal_uInt16 nParas = static_cast< sal_uInt16 >( pTextEngine->GetParagraphCount() );
sal_uInt16 nPages = (sal_uInt16) (nParas / nLinespPage + 1 );
diff --git a/sw/source/ui/uno/unomailmerge.cxx b/sw/source/ui/uno/unomailmerge.cxx
index bdcc408ea5e4..ba871a79fe7f 100644
--- a/sw/source/ui/uno/unomailmerge.cxx
+++ b/sw/source/ui/uno/unomailmerge.cxx
@@ -738,7 +738,7 @@ uno::Any SAL_CALL SwXMailMerge::execute(
aURLObj.SetSmartURL( aCurOutputURL );
String aPath = aURLObj.GetMainURL( INetURLObject::DECODE_TO_IURI );
- String aDelim( INET_PATH_TOKEN );
+ String aDelim = rtl::OUString(INET_PATH_TOKEN);
if (aPath.Len() >= aDelim.Len() &&
aPath.Copy( aPath.Len()-aDelim.Len() ).CompareTo( aDelim ) != COMPARE_EQUAL)
aPath += aDelim;
diff --git a/sw/source/ui/uno/unotxdoc.cxx b/sw/source/ui/uno/unotxdoc.cxx
index 3f1028656c7c..d62ef84e32be 100644
--- a/sw/source/ui/uno/unotxdoc.cxx
+++ b/sw/source/ui/uno/unotxdoc.cxx
@@ -3283,7 +3283,7 @@ Any SwXLinkTargetSupplier::getByName(const OUString& rName)
if(!pxDoc)
throw RuntimeException();
String sToCompare(rName);
- String sSuffix('|');
+ String sSuffix = rtl::OUString('|');
if(sToCompare == sTables)
{
sSuffix += rtl::OUString::createFromAscii(pMarkToTable);
@@ -3498,7 +3498,7 @@ Sequence< OUString > SwXLinkNameAccessWrapper::getElementNames(void)
sal_uInt16 nOutlineCount = rOutlineNodes.Count();
aRet.realloc(nOutlineCount);
OUString* pResArr = aRet.getArray();
- String sSuffix('|');
+ String sSuffix = rtl::OUString('|');
sSuffix += rtl::OUString::createFromAscii(pMarkToOutline);
const SwNumRule* pOutlRule = pDoc->GetOutlineNumRule();
for (sal_uInt16 i = 0; i < nOutlineCount; ++i)
diff --git a/sw/source/ui/utlui/prcntfld.cxx b/sw/source/ui/utlui/prcntfld.cxx
index 4bfc06b9fbd7..bf7c76e44d7c 100644
--- a/sw/source/ui/utlui/prcntfld.cxx
+++ b/sw/source/ui/utlui/prcntfld.cxx
@@ -43,7 +43,7 @@ PercentField::PercentField( Window* pWin, const ResId& rResId ) :
nOldSpinSize = GetSpinSize();
nRefValue = DenormalizePercent(MetricField::GetMax(FUNIT_TWIP));
nOldDigits = GetDecimalDigits();
- SetCustomUnitText('%');
+ SetCustomUnitText(rtl::OUString('%'));
}
void PercentField::SetRefValue(sal_Int64 nValue)
diff --git a/sw/source/ui/wrtsh/wrtsh1.cxx b/sw/source/ui/wrtsh/wrtsh1.cxx
index 3934bd5c75d5..2de18edd448f 100644
--- a/sw/source/ui/wrtsh/wrtsh1.cxx
+++ b/sw/source/ui/wrtsh/wrtsh1.cxx
@@ -941,7 +941,7 @@ void SwWrtShell::InsertLineBreak()
if( pACorr )
AutoCorrect( *pACorr, cIns );
else
- SwWrtShell::Insert( String( cIns ) );
+ SwWrtShell::Insert( rtl::OUString( cIns ) );
}
}
/*------------------------------------------------------------------------