diff options
author | Noel Grandin <noel@peralex.com> | 2013-10-11 17:22:15 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2013-10-15 12:25:46 +0200 |
commit | a8d9fef50ecea69a5b8cbf19d638be7a78eda0d3 (patch) | |
tree | 149c3b2c0f26e84cf3b299a82fffc69197322552 | |
parent | d76dbfde0e56da6dc7cb1f574c6f90178d4285b2 (diff) |
convert sw/source/ui/frmdlg/*.cxx from String to OUString
Change-Id: If423a14c8c94881c25418c5c99281a5d5a4320d1
-rw-r--r-- | sw/source/ui/frmdlg/column.cxx | 16 | ||||
-rw-r--r-- | sw/source/ui/frmdlg/cption.cxx | 46 | ||||
-rw-r--r-- | sw/source/ui/frmdlg/frmpage.cxx | 48 |
3 files changed, 55 insertions, 55 deletions
diff --git a/sw/source/ui/frmdlg/column.cxx b/sw/source/ui/frmdlg/column.cxx index ebbeae08e471..8f826deae88c 100644 --- a/sw/source/ui/frmdlg/column.cxx +++ b/sw/source/ui/frmdlg/column.cxx @@ -192,7 +192,7 @@ SwColumnDlg::SwColumnDlg(Window* pParent, SwWrtShell& rSh) sal_uInt16 nPagePos = m_pApplyToLB->GetEntryPos( (void*) LISTBOX_PAGE ); if (pPageSet && pPageDesc) { - String sPageStr = m_pApplyToLB->GetEntry(nPagePos); + OUString sPageStr = m_pApplyToLB->GetEntry(nPagePos); m_pApplyToLB->RemoveEntry(nPagePos); sPageStr += pPageDesc->GetName(); m_pApplyToLB->InsertEntry( sPageStr, nPagePos ); @@ -910,19 +910,19 @@ void SwColumnPage::SetLabels( sal_uInt16 nVis ) { OUString sLbl( '~' ); - String sLbl2( OUString::number( nVis + 1 )); - String tmp1(sLbl2); - sLbl2.Insert(sLbl, sLbl2.Len() - 1); + OUString sLbl2( OUString::number( nVis + 1 )); + OUString tmp1(sLbl2); + sLbl2 = sLbl2.replaceAt(sLbl2.getLength() - 1, 0, sLbl); m_pLbl1->SetText(sLbl2); sLbl2 = OUString::number( nVis + 2 ); - String tmp2(sLbl2); - sLbl2.Insert(sLbl, sLbl2.Len() - 1); + OUString tmp2(sLbl2); + sLbl2 = sLbl2.replaceAt(sLbl2.getLength() - 1, 0, sLbl); m_pLbl2->SetText(sLbl2); sLbl2 = OUString::number( nVis + 3 ); - String tmp3(sLbl2); - sLbl2.Insert(sLbl, sLbl2.Len() - 1); + OUString tmp3(sLbl2); + sLbl2 = sLbl2.replaceAt(sLbl2.getLength() - 1, 0, sLbl); m_pLbl3->SetText(sLbl2); OUString sColumnWidth = SW_RESSTR( STR_ACCESS_COLUMN_WIDTH ) ; aEd1.SetAccessibleName(sColumnWidth.replaceFirst("%1", tmp1)); diff --git a/sw/source/ui/frmdlg/cption.cxx b/sw/source/ui/frmdlg/cption.cxx index a03826328ec0..33dd37cd00ed 100644 --- a/sw/source/ui/frmdlg/cption.cxx +++ b/sw/source/ui/frmdlg/cption.cxx @@ -61,11 +61,11 @@ class SwSequenceOptionDialog : public SvxStandardDialog ListBox* m_pLbCaptionOrder; SwView& rView; - String aFldTypeName; + OUString aFldTypeName; public: SwSequenceOptionDialog( Window *pParent, SwView &rV, - const String& rSeqFldType ); + const OUString& rSeqFldType ); virtual ~SwSequenceOptionDialog(); virtual void Apply(); @@ -76,8 +76,8 @@ public: bool IsOrderNumberingFirst() const {return m_pLbCaptionOrder->GetSelectEntryPos() == 1;} void SetOrderNumberingFirst(bool bSet) { m_pLbCaptionOrder->SelectEntryPos( bSet ? 1 : 0 ); } - void SetCharacterStyle(const String& rStyle); - String GetCharacterStyle() const; + void SetCharacterStyle(const OUString& rStyle); + OUString GetCharacterStyle() const; }; OUString SwCaptionDialog::our_aSepTextSave(": "); // Caption separator text @@ -334,8 +334,8 @@ IMPL_LINK_NOARG(SwCaptionDialog, CaptionHdl) void SwCaptionDialog::DrawSample() { - String aStr; - String sCaption = m_pTextEdit->GetText(); + OUString aStr; + OUString sCaption = m_pTextEdit->GetText(); // number OUString sFldTypeName = m_pCategoryBox->GetText(); @@ -351,8 +351,8 @@ void SwCaptionDialog::DrawSample() if( !bOrderNumberingFirst ) { aStr += sFldTypeName; - if ( aStr.Len() > 0 ) - aStr += ' '; + if ( !aStr.isEmpty() ) + aStr += " "; } SwWrtShell &rSh = rView.GetWrtShell(); @@ -365,21 +365,21 @@ void SwCaptionDialog::DrawSample() for( sal_Int8 i = 0; i <= nLvl; ++i ) aNumVector.push_back(1); - String sNumber( rSh.GetOutlineNumRule()-> + OUString sNumber( rSh.GetOutlineNumRule()-> MakeNumString(aNumVector, sal_False )); - if( sNumber.Len() ) + if( !sNumber.isEmpty() ) (aStr += sNumber) += pFldType->GetDelimiter(); } switch( nNumFmt ) { - case SVX_NUM_CHARS_UPPER_LETTER: aStr += 'A'; break; - case SVX_NUM_CHARS_UPPER_LETTER_N: aStr += 'A'; break; - case SVX_NUM_CHARS_LOWER_LETTER: aStr += 'a'; break; - case SVX_NUM_CHARS_LOWER_LETTER_N: aStr += 'a'; break; - case SVX_NUM_ROMAN_UPPER: aStr += 'I'; break; - case SVX_NUM_ROMAN_LOWER: aStr += 'i'; break; - default: aStr += '1'; break; + case SVX_NUM_CHARS_UPPER_LETTER: aStr += "A"; break; + case SVX_NUM_CHARS_UPPER_LETTER_N: aStr += "A"; break; + case SVX_NUM_CHARS_LOWER_LETTER: aStr += "a"; break; + case SVX_NUM_CHARS_LOWER_LETTER_N: aStr += "a"; break; + case SVX_NUM_ROMAN_UPPER: aStr += "I"; break; + case SVX_NUM_ROMAN_LOWER: aStr += "i"; break; + default: aStr += "1"; break; } //#i61007# order of captions if( bOrderNumberingFirst ) @@ -389,7 +389,7 @@ void SwCaptionDialog::DrawSample() } } - if( sCaption.Len() > 0 ) + if( !sCaption.isEmpty() ) { aStr += m_pSepEdit->GetText(); } @@ -405,7 +405,7 @@ SwCaptionDialog::~SwCaptionDialog() } SwSequenceOptionDialog::SwSequenceOptionDialog( Window *pParent, SwView &rV, - const String& rSeqFldType ) + const OUString& rSeqFldType ) : SvxStandardDialog( pParent, "CaptionOptionsDialog", "modules/swriter/ui/captionoptions.ui" ), rView( rV ), aFldTypeName( rSeqFldType ) @@ -462,7 +462,7 @@ void SwSequenceOptionDialog::Apply() pFldType->SetDelimiter( OUString(cDelim) ); pFldType->SetOutlineLvl( nLvl ); } - else if( aFldTypeName.Len() && nLvl < MAXLEVEL ) + else if( !aFldTypeName.isEmpty() && nLvl < MAXLEVEL ) { // then we have to insert that SwSetExpFieldType aFldType( rSh.GetDoc(), aFldTypeName, nsSwGetSetExpType::GSE_SEQ ); @@ -477,15 +477,15 @@ void SwSequenceOptionDialog::Apply() rSh.UpdateExpFlds(); } -String SwSequenceOptionDialog::GetCharacterStyle() const +OUString SwSequenceOptionDialog::GetCharacterStyle() const { - String sRet; + OUString sRet; if(m_pLbCharStyle->GetSelectEntryPos()) sRet = m_pLbCharStyle->GetSelectEntry(); return sRet; } -void SwSequenceOptionDialog::SetCharacterStyle(const String& rStyle) +void SwSequenceOptionDialog::SetCharacterStyle(const OUString& rStyle) { m_pLbCharStyle->SelectEntryPos(0); m_pLbCharStyle->SelectEntry(rStyle); diff --git a/sw/source/ui/frmdlg/frmpage.cxx b/sw/source/ui/frmdlg/frmpage.cxx index d52e71e01214..f4777778d767 100644 --- a/sw/source/ui/frmdlg/frmpage.cxx +++ b/sw/source/ui/frmdlg/frmpage.cxx @@ -892,7 +892,7 @@ void SwFrmPage::Reset( const SfxItemSet &rSet ) // if ( !bVerticalChanged && pSh->IsFrmVertical(sal_True, bIsInRightToLeft) ) if ( pSh->IsFrmVertical( sal_True, bIsInRightToLeft, bIsVerticalL2R ) ) { - String sHLabel = m_pHorizontalFT->GetText(); + OUString sHLabel = m_pHorizontalFT->GetText(); m_pHorizontalFT->SetText(m_pVerticalFT->GetText()); m_pVerticalFT->SetText(sHLabel); bIsVerticalFrame = true; @@ -1347,7 +1347,7 @@ sal_uInt16 SwFrmPage::FillPosLB(const FrmMap* _pMap, const sal_uInt16 _nRel, ListBox& _rLB ) { - String sSelEntry, sOldEntry; + OUString sSelEntry, sOldEntry; sOldEntry = _rLB.GetSelectEntry(); _rLB.Clear(); @@ -1370,7 +1370,7 @@ sal_uInt16 SwFrmPage::FillPosLB(const FrmMap* _pMap, bIsVerticalFrame, bIsVerticalL2R, bIsInRightToLeft); - String sEntry(aFramePosString.GetString(eStrId)); + OUString sEntry(aFramePosString.GetString(eStrId)); if (_rLB.GetEntryPos(sEntry) == LISTBOX_ENTRY_NOTFOUND) { // don't insert entries when frames are character bound @@ -1405,7 +1405,7 @@ sal_uLong SwFrmPage::FillRelLB( const FrmMap* _pMap, ListBox& _rLB, FixedText& _rFT ) { - String sSelEntry; + OUString sSelEntry; sal_uLong nLBRelations = 0; size_t nMapCount = ::lcl_GetFrmMapCount(_pMap); @@ -1415,7 +1415,7 @@ sal_uLong SwFrmPage::FillRelLB( const FrmMap* _pMap, { if (_pMap == aVAsCharHtmlMap || _pMap == aVAsCharMap) { - String sOldEntry(_rLB.GetSelectEntry()); + OUString sOldEntry(_rLB.GetSelectEntry()); sal_uInt16 nRelCount = sizeof(aAsCharRelationMap) / sizeof(RelationMap); SvxSwFramePosString::StringId eStrId = _pMap[_nLBSelPos].eStrId; @@ -1436,7 +1436,7 @@ sal_uLong SwFrmPage::FillRelLB( const FrmMap* _pMap, bIsVerticalFrame, bIsVerticalL2R, bIsInRightToLeft); - String sEntry = aFramePosString.GetString(sStrId1); + OUString sEntry = aFramePosString.GetString(sStrId1); sal_uInt16 nPos = _rLB.InsertEntry(sEntry); _rLB.SetEntryData(nPos, &aAsCharRelationMap[nRelPos]); if (_pMap[nMapPos].nAlign == _nAlign) @@ -1446,7 +1446,7 @@ sal_uLong SwFrmPage::FillRelLB( const FrmMap* _pMap, } } } - if (sSelEntry.Len()) + if (!sSelEntry.isEmpty()) _rLB.SelectEntry(sSelEntry); else { @@ -1501,16 +1501,16 @@ sal_uLong SwFrmPage::FillRelLB( const FrmMap* _pMap, bIsVerticalFrame, bIsVerticalL2R, bIsInRightToLeft); - String sEntry = aFramePosString.GetString(eStrId1); + OUString sEntry = aFramePosString.GetString(eStrId1); sal_uInt16 nPos = _rLB.InsertEntry(sEntry); _rLB.SetEntryData(nPos, &aRelationMap[nRelPos]); - if (!sSelEntry.Len() && aRelationMap[nRelPos].nRelation == _nRel) + if (sSelEntry.isEmpty() && aRelationMap[nRelPos].nRelation == _nRel) sSelEntry = sEntry; } } } } - if (sSelEntry.Len()) + if (!sSelEntry.isEmpty()) _rLB.SelectEntry(sSelEntry); else { @@ -1621,13 +1621,13 @@ sal_uInt16 SwFrmPage::GetMapPos( const FrmMap *pMap, ListBox &rAlignLB ) if (pMap == aVAsCharHtmlMap || pMap == aVAsCharMap) { size_t nMapCount = ::lcl_GetFrmMapCount(pMap); - String sSelEntry(rAlignLB.GetSelectEntry()); + OUString sSelEntry(rAlignLB.GetSelectEntry()); for (size_t i = 0; i < nMapCount; i++) { SvxSwFramePosString::StringId eResId = pMap[i].eStrId; - String sEntry = aFramePosString.GetString(eResId); + OUString sEntry = aFramePosString.GetString(eResId); sEntry = MnemonicGenerator::EraseAllMnemonicChars( sEntry ); if (sEntry == sSelEntry) @@ -2749,7 +2749,7 @@ sal_Bool SwFrmURLPage::FillItemSet(SfxItemSet &rSet) pFmtURL = new SwFmtURL(); { - String sText = pURLED->GetText(); + OUString sText = pURLED->GetText(); if( pFmtURL->GetURL() != sText || OUString(pFmtURL->GetName()) != pNameED->GetText() || @@ -2789,8 +2789,8 @@ IMPL_LINK_NOARG(SwFrmURLPage, InsertFileHdl) try { - String sTemp(pURLED->GetText()); - if(sTemp.Len()) + OUString sTemp(pURLED->GetText()); + if(!sTemp.isEmpty()) xFP->setDisplayDirectory(sTemp); } catch( const uno::Exception& rEx ) @@ -2874,14 +2874,14 @@ void SwFrmAddPage::Reset(const SfxItemSet &rSet ) { // insert graphic - properties // bNew is not set, so recognise by selection - String aTmpName1; + OUString aTmpName1; if(SFX_ITEM_SET == rSet.GetItemState(FN_SET_FRM_NAME, sal_False, &pItem)) { aTmpName1 = ((const SfxStringItem*)pItem)->GetValue(); } OSL_ENSURE(pWrtSh, "keine Shell?"); - if( bNew || !aTmpName1.Len() ) + if( bNew || aTmpName1.isEmpty() ) { if (sDlgType == "PictureDialog") aTmpName1 = pWrtSh->GetUniqueGrfName(); @@ -2919,7 +2919,7 @@ void SwFrmAddPage::Reset(const SfxItemSet &rSet ) { const SwFmtChain &rChain = pFmt->GetChain(); const SwFlyFrmFmt* pFlyFmt; - String sNextChain, sPrevChain; + OUString sNextChain, sPrevChain; if ((pFlyFmt = rChain.GetPrev()) != 0) { sPrevChain = pFlyFmt->GetName(); @@ -2937,7 +2937,7 @@ void SwFrmAddPage::Reset(const SfxItemSet &rSet ) pWrtSh->GetConnectableFrmFmts(*pFmt, sNextChain, sal_False, aPrevPageFrames, aThisPageFrames, aNextPageFrames, aRemainFrames ); lcl_InsertVectors(*pPrevLB, aPrevPageFrames, aThisPageFrames, aNextPageFrames, aRemainFrames); - if(sPrevChain.Len()) + if(!sPrevChain.isEmpty()) { if(LISTBOX_ENTRY_NOTFOUND == pPrevLB->GetEntryPos(sPrevChain)) pPrevLB->InsertEntry(sPrevChain, 1); @@ -2953,7 +2953,7 @@ void SwFrmAddPage::Reset(const SfxItemSet &rSet ) pWrtSh->GetConnectableFrmFmts(*pFmt, sPrevChain, sal_True, aPrevPageFrames, aThisPageFrames, aNextPageFrames, aRemainFrames ); lcl_InsertVectors(*pNextLB, aPrevPageFrames, aThisPageFrames, aNextPageFrames, aRemainFrames); - if(sNextChain.Len()) + if(!sNextChain.isEmpty()) { if(LISTBOX_ENTRY_NOTFOUND == pNextLB->GetEntryPos(sNextChain)) pNextLB->InsertEntry(sNextChain, 1); @@ -3049,14 +3049,14 @@ sal_Bool SwFrmAddPage::FillItemSet(SfxItemSet &rSet) const SwFrmFmt* pFmt = pWrtSh->GetFlyFrmFmt(); if (pFmt) { - String sCurrentPrevChain, sCurrentNextChain; + OUString sCurrentPrevChain, sCurrentNextChain; if(pPrevLB->GetSelectEntryPos()) sCurrentPrevChain = pPrevLB->GetSelectEntry(); if(pNextLB->GetSelectEntryPos()) sCurrentNextChain = pNextLB->GetSelectEntry(); const SwFmtChain &rChain = pFmt->GetChain(); const SwFlyFrmFmt* pFlyFmt; - String sNextChain, sPrevChain; + OUString sNextChain, sPrevChain; if ((pFlyFmt = rChain.GetPrev()) != 0) sPrevChain = pFlyFmt->GetName(); @@ -3096,7 +3096,7 @@ void SwFrmAddPage::SetFormatUsed(sal_Bool bFmt) IMPL_LINK(SwFrmAddPage, ChainModifyHdl, ListBox*, pBox) { - String sCurrentPrevChain, sCurrentNextChain; + OUString sCurrentPrevChain, sCurrentNextChain; if(pPrevLB->GetSelectEntryPos()) sCurrentPrevChain = pPrevLB->GetSelectEntry(); if(pNextLB->GetSelectEntryPos()) @@ -3117,7 +3117,7 @@ IMPL_LINK(SwFrmAddPage, ChainModifyHdl, ListBox*, pBox) aPrevPageFrames, aThisPageFrames, aNextPageFrames, aRemainFrames ); lcl_InsertVectors(rChangeLB, aPrevPageFrames, aThisPageFrames, aNextPageFrames, aRemainFrames); - String sToSelect = bNextBox ? sCurrentPrevChain : sCurrentNextChain; + OUString sToSelect = bNextBox ? sCurrentPrevChain : sCurrentNextChain; if(rChangeLB.GetEntryPos(sToSelect) != LISTBOX_ENTRY_NOTFOUND) rChangeLB.SelectEntry(sToSelect); else |