diff options
author | Caolán McNamara <caolanm@redhat.com> | 2012-07-04 23:58:05 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2012-07-09 12:16:56 +0100 |
commit | 104261010aa5ccbb7df4a82a3a3cafcfb0591fa7 (patch) | |
tree | b8db79d2707ff5925ad01dba8a41bd8ab6d66847 /sw/source/ui | |
parent | 1a1e953ee33c213dc8b88dd96a69ca9fc5e42d50 (diff) |
some UniString->rtl::OUString
Change-Id: Ie69b30094da25df23a36baca2c7723d6a41f48c3
Diffstat (limited to 'sw/source/ui')
39 files changed, 96 insertions, 93 deletions
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 ) ); } } /*------------------------------------------------------------------------ |