diff options
-rw-r--r-- | svl/source/items/custritm.cxx | 6 | ||||
-rw-r--r-- | svl/source/items/stritem.cxx | 3 | ||||
-rw-r--r-- | svtools/source/control/calendar.cxx | 4 | ||||
-rw-r--r-- | svtools/source/control/ruler.cxx | 8 | ||||
-rw-r--r-- | svtools/source/dialogs/filedlg2.cxx | 80 | ||||
-rw-r--r-- | svx/source/gallery2/galexpl.cxx | 1 | ||||
-rw-r--r-- | svx/source/svdraw/svdattr.cxx | 9 | ||||
-rw-r--r-- | svx/source/svdraw/svdibrow.cxx | 8 | ||||
-rw-r--r-- | svx/source/svdraw/svdmark.cxx | 6 | ||||
-rw-r--r-- | svx/source/svdraw/svdmodel.cxx | 20 | ||||
-rw-r--r-- | svx/source/svdraw/svdmrkv.cxx | 2 | ||||
-rw-r--r-- | svx/source/svdraw/svdtrans.cxx | 63 | ||||
-rw-r--r-- | svx/source/svdraw/svdview.cxx | 2 | ||||
-rw-r--r-- | ucb/workben/ucb/ucbdemo.cxx | 372 |
14 files changed, 199 insertions, 385 deletions
diff --git a/svl/source/items/custritm.cxx b/svl/source/items/custritm.cxx index f8c4f89f5316..b179643774d2 100644 --- a/svl/source/items/custritm.cxx +++ b/svl/source/items/custritm.cxx @@ -99,7 +99,7 @@ CntUnencodedStringItem::GetPresentation(SfxItemPresentation, SfxMapUnit, bool CntUnencodedStringItem::QueryValue(com::sun::star::uno::Any& rVal, sal_uInt8) const { - rVal <<= rtl::OUString(m_aValue); + rVal <<= OUString(m_aValue); return true; } @@ -108,10 +108,10 @@ bool CntUnencodedStringItem::QueryValue(com::sun::star::uno::Any& rVal, sal_uInt bool CntUnencodedStringItem::PutValue(const com::sun::star::uno::Any& rVal, sal_uInt8) { - rtl::OUString aTheValue; + OUString aTheValue; if (rVal >>= aTheValue) { - m_aValue = UniString(aTheValue); + m_aValue = aTheValue; return true; } OSL_FAIL("CntUnencodedStringItem::PutValue(): Wrong type"); diff --git a/svl/source/items/stritem.cxx b/svl/source/items/stritem.cxx index 30074d8b86d1..0cf799470636 100644 --- a/svl/source/items/stritem.cxx +++ b/svl/source/items/stritem.cxx @@ -32,8 +32,7 @@ TYPEINIT1_AUTOFACTORY(SfxStringItem, CntUnencodedStringItem) SfxStringItem::SfxStringItem(sal_uInt16 which, SvStream & rStream): CntUnencodedStringItem(which) { - UniString aValue = readByteString(rStream); - SetValue(aValue); + SetValue(readByteString(rStream)); } diff --git a/svtools/source/control/calendar.cxx b/svtools/source/control/calendar.cxx index 2712871324e6..6ddec6892bef 100644 --- a/svtools/source/control/calendar.cxx +++ b/svtools/source/control/calendar.cxx @@ -218,7 +218,7 @@ void Calendar::ImplInit( WinBits nWinStyle ) // Tagestexte anlegen for (sal_Int32 i = 0; i < 31; ++i) - mpDayText[i] = new UniString(rtl::OUString::valueOf(i+1)); + mpDayText[i] = new String(OUString::valueOf(i+1)); maDragScrollTimer.SetTimeoutHdl( STATIC_LINK( this, Calendar, ScrollHdl ) ); maDragScrollTimer.SetTimeout( GetSettings().GetMouseSettings().GetScrollRepeat() ); @@ -1289,7 +1289,7 @@ void Calendar::ImplShowMenu( const Point& rPos, const Date& rDate ) pYearPopupMenus[i]->InsertItem( nYearIdCount+j, maCalendarWrapper.getDisplayName( i18n::CalendarDisplayIndex::MONTH, j-1, 1)); - aPopupMenu.InsertItem( 10+i, UniString::CreateFromInt32( nYear+i ) ); + aPopupMenu.InsertItem( 10+i, OUString::valueOf( static_cast<sal_Int32>(nYear+i) ) ); aPopupMenu.SetPopupMenu( 10+i, pYearPopupMenus[i] ); nYearIdCount += 1000; } diff --git a/svtools/source/control/ruler.cxx b/svtools/source/control/ruler.cxx index 153e91530aa8..b99b90381a09 100644 --- a/svtools/source/control/ruler.cxx +++ b/svtools/source/control/ruler.cxx @@ -497,7 +497,7 @@ void Ruler::ImplDrawTicks( long nMin, long nMax, long nStart, long nCenter ) nMaxWidth /= nTickUnit; else nMaxWidth /= aImplRulerUnitTab[mnUnitIndex].nTickUnit; - UniString aNumStr(rtl::OUString::valueOf(static_cast<sal_Int32>(nMaxWidth))); + OUString aNumStr = OUString::valueOf(static_cast<sal_Int32>(nMaxWidth)); long nTxtWidth = GetTextWidth( aNumStr ); const long nTextOff = 4; if ( nTickWidth < nTxtWidth+nTextOff ) @@ -552,7 +552,7 @@ void Ruler::ImplDrawTicks( long nMin, long nMax, long nStart, long nCenter ) // 0 is only painted when Margin1 is not equal to zero if ( (mpData->nMargin1Style & RULER_STYLE_INVISIBLE) || (mpData->nMargin1 != 0) ) { - aNumStr = (sal_Unicode)'0'; + aNumStr = "0"; ImplVDrawText( nStart, nCenter, aNumStr ); } } @@ -570,9 +570,9 @@ void Ruler::ImplDrawTicks( long nMin, long nMax, long nStart, long nCenter ) if ( !(nTick % nTick3) ) { if ( ( mnUnitIndex == RULER_UNIT_CHAR ) || ( mnUnitIndex == RULER_UNIT_LINE ) ) - aNumStr = UniString::CreateFromInt32( nTick / nTickUnit ); + aNumStr = OUString::valueOf( static_cast<sal_Int64>( nTick / nTickUnit ) ); else - aNumStr = UniString::CreateFromInt32( nTick / aImplRulerUnitTab[mnUnitIndex].nTickUnit ); + aNumStr = OUString::valueOf( static_cast<sal_Int64>( nTick / aImplRulerUnitTab[mnUnitIndex].nTickUnit ) ); ImplVDrawText( nStart + n, nCenter, aNumStr, nMin, nMax ); ImplVDrawText( nStart - n, nCenter, aNumStr, nMin, nMax ); diff --git a/svtools/source/dialogs/filedlg2.cxx b/svtools/source/dialogs/filedlg2.cxx index bc197bb6db4d..db8913d1f8d3 100644 --- a/svtools/source/dialogs/filedlg2.cxx +++ b/svtools/source/dialogs/filedlg2.cxx @@ -67,21 +67,18 @@ KbdListBox::PreNotify( NotifyEvent& rNEvt ) for ( sal_uInt16 i = 1; i < nEntries; i++ ) { - UniString aEntry = GetEntry ( (i + nCurrentPos) % nEntries ); - aEntry = comphelper::string::stripStart(aEntry, ' '); - aEntry.ToUpperAscii(); - UniString aCompare = rtl::OUString(cCharCode); - aCompare.ToUpperAscii(); + OUString aEntry = GetEntry ( (i + nCurrentPos) % nEntries ); + aEntry = comphelper::string::stripStart(aEntry, ' ').toAsciiUpperCase(); + OUString aCompare = OUString(cCharCode).toAsciiUpperCase(); - if ( aEntry.CompareTo( aCompare, 1 ) == COMPARE_EQUAL ) + if ( aEntry.compareTo( aCompare, 1 ) == COMPARE_EQUAL ) { SelectEntryPos ( (i + nCurrentPos) % nEntries ); break; } } } - else - if ( aKeyEvt.GetKeyCode().GetCode() == KEY_RETURN ) + else if ( aKeyEvt.GetKeyCode().GetCode() == KEY_RETURN ) { DoubleClick(); } @@ -136,7 +133,7 @@ void ImpPathDialog::InitControls() Point aPnt( a6Siz.Width(), a6Siz.Height() ); long nLbH1 = pDlg->LogicToPixel( Size( 0, 93 ), MAP_APPFONT ).Height(); long nH = 0; - UniString aEmptyStr; + OUString aEmptyStr; INITCONTROL( pDirTitel, FixedText, 0, aPnt, aFTSiz, SVT_RESSTR( STR_FILEDLG_DIR ), HID_FILEDLG_DIR ); @@ -243,20 +240,19 @@ IMPL_LINK( ImpPathDialog, SelectHdl, ListBox *, p ) { if( p == pDriveList ) { - UniString aDrive( pDriveList->GetSelectEntry(), 0, 2); - aDrive += '\\'; + OUString aDrive = OUString( pDriveList->GetSelectEntry().Copy(0, 2) ) + "\\"; SetPath( aDrive ); } - else - if( p == pDirList ) + else if( p == pDirList ) { // isolate the pure name of the entry // removing trainling stuff and leading spaces - UniString aEntry( pDirList->GetSelectEntry() ); + OUString aEntry( pDirList->GetSelectEntry() ); aEntry = comphelper::string::stripStart(aEntry, ' '); - sal_uInt16 nPos = aEntry.Search( '/' ); - aEntry.Erase( nPos ); + sal_Int32 nPos = aEntry.indexOf( '/' ); + if (nPos >= 0) + aEntry = aEntry.replaceAt( nPos, aEntry.getLength()-nPos, "" ); // build the absolute path to the selected item DirEntry aNewPath; @@ -268,7 +264,7 @@ IMPL_LINK( ImpPathDialog, SelectHdl, ListBox *, p ) if( nCurPos < nDirCount ) aNewPath = aNewPath[nDirCount-nCurPos-1]; else - aNewPath += aEntry; + aNewPath += String(aEntry); pEdit->SetText( aNewPath.GetFull() ); } @@ -342,11 +338,12 @@ IMPL_LINK( ImpPathDialog, DblClickHdl, ListBox*, pBox ) { // isolate the pure name of the entry // removing trainling stuff and leading spaces - UniString aEntry( pBox->GetSelectEntry() ); + OUString aEntry( pBox->GetSelectEntry() ); aEntry = comphelper::string::stripStart(aEntry, ' '); - sal_uInt16 nPos = aEntry.Search( '/' ); - aEntry.Erase( nPos ); + sal_Int32 nPos = aEntry.indexOf( '/' ); + if (nPos >= 0) + aEntry = aEntry.replaceAt( nPos, aEntry.getLength()-nPos, "" ); // build the absolute path to the selected item DirEntry aNewPath; @@ -363,10 +360,10 @@ IMPL_LINK( ImpPathDialog, DblClickHdl, ListBox*, pBox ) if( nCurPos < nDirCount ) aNewPath = aNewPath[nDirCount-nCurPos-1]; else - aNewPath += aEntry; + aNewPath += String(aEntry); } else - aNewPath += aEntry; + aNewPath += String(aEntry); pSvPathDialog->EnterWait(); @@ -391,7 +388,7 @@ IMPL_LINK( ImpPathDialog, DblClickHdl, ListBox*, pBox ) void ImpPathDialog::UpdateEntries( const sal_Bool ) { - UniString aTabString; + OUString aTabString; DirEntry aTmpPath; aTmpPath.ToAbs(); @@ -402,10 +399,9 @@ void ImpPathDialog::UpdateEntries( const sal_Bool ) for( sal_uInt16 i = nDirCount; i > 0; i-- ) { - UniString aName( aTabString ); - aName += aTmpPath[i-1].GetName(); + OUString aName = aTabString + aTmpPath[i-1].GetName(); pDirList->InsertEntry( aName ); - aTabString.AppendAscii( " ", 2 ); + aTabString += " "; } // scan the directory @@ -465,7 +461,7 @@ void ImpPathDialog::UpdateDirs( const DirEntry& rTmpPath ) pDirList->Invalidate(); pDirList->Update(); - UniString aDirName = rTmpPath.GetFull(); + OUString aDirName = rTmpPath.GetFull(); if( pDirPath ) pDirPath->SetText( aDirName ); else @@ -481,8 +477,8 @@ sal_Bool ImpPathDialog::IsFileOk( const DirEntry& rDirEntry ) // Datei vorhanden ? if( ! rDirEntry.Exists() ) { - UniString aQueryTxt( SVT_RESSTR( STR_FILEDLG_ASKNEWDIR ) ); - aQueryTxt.SearchAndReplaceAscii( "%s", rDirEntry.GetFull() ); + OUString aQueryTxt( SVT_RESSTR( STR_FILEDLG_ASKNEWDIR ) ); + aQueryTxt = aQueryTxt.replaceFirst( "%s", rDirEntry.GetFull() ); QueryBox aQuery( GetPathDialog(), WB_YES_NO | WB_DEF_YES, aQueryTxt ); @@ -493,10 +489,7 @@ sal_Bool ImpPathDialog::IsFileOk( const DirEntry& rDirEntry ) } if( !FileStat( rDirEntry ).IsKind( FSYS_KIND_DIR ) ) { - UniString aBoxText( SVT_RESSTR( STR_FILEDLG_CANTOPENDIR ) ); - aBoxText.AppendAscii( "\n[" ); - aBoxText += rDirEntry.GetFull(); - aBoxText.AppendAscii( "]" ); + OUString aBoxText = SVT_RESSTR( STR_FILEDLG_CANTOPENDIR ) + "\n[" + rDirEntry.GetFull() + "]" ; InfoBox aBox( GetPathDialog(), aBoxText ); aBox.Execute(); return sal_False; @@ -598,26 +591,25 @@ void ImpPathDialog::PreExecute() for( i = 0; i < nCount; ++i ) { DirEntry& rEntry = aDir[i]; - UniString aStr = rEntry.GetFull( FSYS_STYLE_HOST, sal_False ); + OUString aStr = rEntry.GetFull( FSYS_STYLE_HOST, sal_False ); - UniString aVolume = rEntry.GetVolume() ; - aStr.ToUpperAscii(); - if ( aVolume.Len() ) + OUString aVolume = rEntry.GetVolume() ; + aStr = aStr.toAsciiUpperCase(); + if ( aVolume.getLength() ) { - aStr += ' '; - aStr += aVolume; + aStr = aStr + " " + aVolume; } - pDriveList->InsertEntry( aStr ); + pDriveList->InsertEntry( String(aStr) ); } - UniString aPathStr = aPath.GetFull(); + OUString aPathStr = aPath.GetFull(); for ( i = 0; i < pDriveList->GetEntryCount(); ++i ) { - UniString aEntry = pDriveList->GetEntry(i); - xub_StrLen nLen = aEntry.Len(); + OUString aEntry = pDriveList->GetEntry(i); + xub_StrLen nLen = aEntry.getLength(); nLen = nLen > 2 ? 2 : nLen; - if ( aEntry.CompareIgnoreCaseToAscii( aPathStr, nLen ) == COMPARE_EQUAL ) + if ( aEntry.compareTo( aPathStr, nLen ) == COMPARE_EQUAL ) { pDriveList->SelectEntryPos(i); break; diff --git a/svx/source/gallery2/galexpl.cxx b/svx/source/gallery2/galexpl.cxx index 3a185aa1fd8d..12981a04d891 100644 --- a/svx/source/gallery2/galexpl.cxx +++ b/svx/source/gallery2/galexpl.cxx @@ -150,7 +150,6 @@ bool GalleryExplorer::FillObjList( const sal_uInt32 nThemeId, std::vector<rtl::O if (!FillObjList(nThemeId, aObjList)) return false; - // Convert UniString to rtl::OUString. std::vector<rtl::OUString> aList; aList.reserve(aObjList.size()); std::vector<String>::const_iterator it = aObjList.begin(), itEnd = aObjList.end(); diff --git a/svx/source/svdraw/svdattr.cxx b/svx/source/svdraw/svdattr.cxx index 45042dd6a24b..fa47a5fead6f 100644 --- a/svx/source/svdraw/svdattr.cxx +++ b/svx/source/svdraw/svdattr.cxx @@ -648,8 +648,7 @@ SfxItemPresentation SdrFractionItem::GetPresentation( } else { - rText = UniString(); - rText += sal_Unicode('?'); + rText = OUString("?"); } if(ePresentation == SFX_ITEM_PRESENTATION_COMPLETE) @@ -701,8 +700,7 @@ SfxItemPresentation SdrScaleItem::GetPresentation( } else { - rText = UniString(); - rText += sal_Unicode('?'); + rText = OUString("?"); } if(ePresentation == SFX_ITEM_PRESENTATION_COMPLETE) @@ -1351,8 +1349,7 @@ SfxItemPresentation SdrTextAniAmountItem::GetPresentation( if(nValue < 0) { - rText = OUString::valueOf(-nValue); - rText += UniString(RTL_CONSTASCII_USTRINGPARAM("pixel")); + rText = OUString::valueOf(-nValue) + "pixel"; } else { diff --git a/svx/source/svdraw/svdibrow.cxx b/svx/source/svdraw/svdibrow.cxx index 9e724aa21d18..f7cbccab1910 100644 --- a/svx/source/svdraw/svdibrow.cxx +++ b/svx/source/svdraw/svdibrow.cxx @@ -321,7 +321,7 @@ String _SdrItemBrowserControl::GetCellText(long _nRow, sal_uInt16 _nColId) const switch (_nColId) { case ITEMBROWSER_WHICHCOL_ID: - sRet = UniString::CreateFromInt32(pEntry->nWhichId); break; + sRet = OUString::valueOf( static_cast<sal_Int32>(pEntry->nWhichId) ); break; case ITEMBROWSER_STATECOL_ID: { switch (pEntry->eState) @@ -518,9 +518,9 @@ bool _SdrItemBrowserControl::BegChangeEntry(sal_uIntPtr nPos) aNeuNam += pEntry->GetItemTypeStr(); if (pEntry->bCanNum) { aNeuNam.AppendAscii(": "); - aNeuNam += UniString::CreateFromInt32(pEntry->nMin); + aNeuNam += OUString::valueOf(pEntry->nMin); aNeuNam.AppendAscii(".."); - aNeuNam += UniString::CreateFromInt32(pEntry->nMax); + aNeuNam += OUString::valueOf(pEntry->nMax); } aNeuNam.AppendAscii(" - Type 'del' to reset to default."); pParent->SetText(aNeuNam); @@ -1019,7 +1019,7 @@ void _SdrItemBrowserControl::SetAttributes(const SfxItemSet* pSet, const SfxItem if (aEntry.bCanNum) { aEntry.aValue.InsertAscii(": ",0); - aEntry.aValue.Insert(UniString::CreateFromInt32(aEntry.nVal),0); + aEntry.aValue.Insert(OUString::valueOf(aEntry.nVal),0); } } else diff --git a/svx/source/svdraw/svdmark.cxx b/svx/source/svdraw/svdmark.cxx index 8a3023021dc9..0fe31f9e7abf 100644 --- a/svx/source/svdraw/svdmark.cxx +++ b/svx/source/svdraw/svdmark.cxx @@ -594,7 +594,7 @@ const XubString& SdrMarkList::GetMarkDescription() const } aNam.Insert(sal_Unicode(' '), 0); - aNam.Insert(UniString::CreateFromInt32(nAnz), 0); + aNam.Insert(OUString::valueOf( static_cast<sal_Int32>(nAnz) ), 0); } ((SdrMarkList*)(this))->maMarkName = aNam; @@ -694,7 +694,7 @@ const XubString& SdrMarkList::GetPointMarkDescription(sal_Bool bGlue) const } aNam.Insert(sal_Unicode(' '), 0); - aNam.Insert(UniString::CreateFromInt32(nMarkPtObjAnz), 0); + aNam.Insert(OUString::valueOf( static_cast<sal_Int32>(nMarkPtObjAnz) ), 0); } XubString aStr1; @@ -706,7 +706,7 @@ const XubString& SdrMarkList::GetPointMarkDescription(sal_Bool bGlue) const else { aStr1 = (ImpGetResStr(bGlue ? STR_ViewMarkedGluePoints : STR_ViewMarkedPoints)); - aStr1.SearchAndReplaceAscii("%2", UniString::CreateFromInt32(nMarkPtAnz)); + aStr1.SearchAndReplaceAscii("%2", OUString::valueOf( static_cast<sal_Int32>(nMarkPtAnz) )); } aStr1.SearchAndReplaceAscii("%1", aNam); diff --git a/svx/source/svdraw/svdmodel.cxx b/svx/source/svdraw/svdmodel.cxx index 4e9c6e45bda5..aae7534099a3 100644 --- a/svx/source/svdraw/svdmodel.cxx +++ b/svx/source/svdraw/svdmodel.cxx @@ -1177,17 +1177,17 @@ void SdrModel::TakeUnitStr(FieldUnit eUnit, XubString& rStr) } case FUNIT_100TH_MM: { - rStr = UniString(RTL_CONSTASCII_USTRINGPARAM("/100mm")); + rStr = OUString("/100mm"); break; } case FUNIT_MM : { - rStr = UniString(RTL_CONSTASCII_USTRINGPARAM("mm")); + rStr = OUString("mm"); break; } case FUNIT_CM : { - rStr = UniString(RTL_CONSTASCII_USTRINGPARAM("cm")); + rStr = OUString("cm"); break; } case FUNIT_M : @@ -1198,22 +1198,22 @@ void SdrModel::TakeUnitStr(FieldUnit eUnit, XubString& rStr) } case FUNIT_KM : { - rStr = UniString(RTL_CONSTASCII_USTRINGPARAM("km")); + rStr = OUString("km"); break; } case FUNIT_TWIP : { - rStr = UniString(RTL_CONSTASCII_USTRINGPARAM("twip")); + rStr = OUString("twip"); break; } case FUNIT_POINT : { - rStr = UniString(RTL_CONSTASCII_USTRINGPARAM("pt")); + rStr = OUString("pt"); break; } case FUNIT_PICA : { - rStr = UniString(RTL_CONSTASCII_USTRINGPARAM("pica")); + rStr = OUString("pica"); break; } case FUNIT_INCH : @@ -1224,12 +1224,12 @@ void SdrModel::TakeUnitStr(FieldUnit eUnit, XubString& rStr) } case FUNIT_FOOT : { - rStr = UniString(RTL_CONSTASCII_USTRINGPARAM("ft")); + rStr = OUString("ft"); break; } case FUNIT_MILE : { - rStr = UniString(RTL_CONSTASCII_USTRINGPARAM("mile(s)")); + rStr = OUString("mile(s)"); break; } case FUNIT_PERCENT: @@ -1407,7 +1407,7 @@ void SdrModel::TakePercentStr(const Fraction& rVal, XubString& rStr, bool bNoPer nMul += nDiv/2; nMul /= nDiv; - rStr = UniString::CreateFromInt32(nMul); + rStr = OUString::valueOf(nMul); if(bNeg) rStr.Insert(sal_Unicode('-'), 0); diff --git a/svx/source/svdraw/svdmrkv.cxx b/svx/source/svdraw/svdmrkv.cxx index afeb4534b550..d9b2d08ca660 100644 --- a/svx/source/svdraw/svdmrkv.cxx +++ b/svx/source/svdraw/svdmrkv.cxx @@ -1954,7 +1954,7 @@ void SdrMarkView::ImpTakeDescriptionStr(sal_uInt16 nStrCacheID, XubString& rStr, if(nPos != STRING_NOTFOUND) { rStr.Erase(nPos, 2); - rStr.Insert(UniString::CreateFromInt32(nVal), nPos); + rStr.Insert(OUString::valueOf( static_cast<sal_Int32>(nVal) ), nPos); } } diff --git a/svx/source/svdraw/svdtrans.cxx b/svx/source/svdraw/svdtrans.cxx index 536e5995c1fe..cd64052082d3 100644 --- a/svx/source/svdraw/svdtrans.cxx +++ b/svx/source/svdraw/svdtrans.cxx @@ -831,7 +831,7 @@ void SdrFormatter::TakeStr(long nVal, XubString& rStr) const if(!nVal) { - rStr = UniString(); + rStr = String(); rStr += aNullCode; return; } @@ -864,7 +864,7 @@ void SdrFormatter::TakeStr(long nVal, XubString& rStr) const if(nMul_ != nDiv_) nVal = BigMulDiv(nVal, nMul_, nDiv_); - aStr = UniString::CreateFromInt32(nVal); + aStr = OUString::valueOf(nVal); if(nK > 0 && aStr.Len() <= nK ) { @@ -945,78 +945,76 @@ void SdrFormatter::TakeUnitStr(MapUnit eUnit, XubString& rStr) // metrically case MAP_100TH_MM : { - rStr = UniString(RTL_CONSTASCII_USTRINGPARAM("/100mm")); + rStr = OUString("/100mm"); break; } case MAP_10TH_MM : { - rStr = UniString(RTL_CONSTASCII_USTRINGPARAM("/10mm")); + rStr = OUString("/10mm"); break; } case MAP_MM : { - rStr = UniString(RTL_CONSTASCII_USTRINGPARAM("mm")); + rStr = OUString("mm"); break; } case MAP_CM : { - rStr = UniString(RTL_CONSTASCII_USTRINGPARAM("cm")); + rStr = OUString("cm"); break; } // Inch case MAP_1000TH_INCH: { - rStr = UniString(RTL_CONSTASCII_USTRINGPARAM("/1000\"")); + rStr = OUString("/1000\""); break; } case MAP_100TH_INCH : { - rStr = UniString(RTL_CONSTASCII_USTRINGPARAM("/100\"")); + rStr = OUString("/100\""); break; } case MAP_10TH_INCH : { - rStr = UniString(RTL_CONSTASCII_USTRINGPARAM("/10\"")); + rStr = OUString("/10\""); break; } case MAP_INCH : { - rStr = UniString(); - rStr += sal_Unicode('"'); + rStr = OUString("\""); break; } case MAP_POINT : { - rStr = UniString(RTL_CONSTASCII_USTRINGPARAM("pt")); + rStr = OUString("pt"); break; } case MAP_TWIP : { - rStr = UniString(RTL_CONSTASCII_USTRINGPARAM("twip")); + rStr = OUString("twip"); break; } // others case MAP_PIXEL : { - rStr = UniString(RTL_CONSTASCII_USTRINGPARAM("pixel")); + rStr = OUString("pixel"); break; } case MAP_SYSFONT : { - rStr = UniString(RTL_CONSTASCII_USTRINGPARAM("sysfont")); + rStr = OUString("sysfont"); break; } case MAP_APPFONT : { - rStr = UniString(RTL_CONSTASCII_USTRINGPARAM("appfont")); + rStr = OUString("appfont"); break; } case MAP_RELATIVE : { - rStr = UniString(); - rStr += sal_Unicode('%'); + rStr = OUString("%"); break; } default: break; @@ -1031,76 +1029,73 @@ void SdrFormatter::TakeUnitStr(FieldUnit eUnit, XubString& rStr) case FUNIT_NONE : case FUNIT_CUSTOM : { - rStr = UniString(); + rStr = OUString(); break; } // metrically case FUNIT_100TH_MM: { - rStr = UniString(RTL_CONSTASCII_USTRINGPARAM("/100mm")); + rStr = OUString("/100mm"); break; } case FUNIT_MM : { - rStr = UniString(RTL_CONSTASCII_USTRINGPARAM("mm")); + rStr = OUString("mm"); break; } case FUNIT_CM : { - rStr = UniString(RTL_CONSTASCII_USTRINGPARAM("cm")); + rStr = OUString("cm"); break; } case FUNIT_M : { - rStr = UniString(); - rStr += sal_Unicode('m'); + rStr = OUString("m"); break; } case FUNIT_KM : { - rStr = UniString(RTL_CONSTASCII_USTRINGPARAM("km")); + rStr = OUString("km"); break; } // Inch case FUNIT_TWIP : { - rStr = UniString(RTL_CONSTASCII_USTRINGPARAM("twip")); + rStr = OUString("twip"); break; } case FUNIT_POINT : { - rStr = UniString(RTL_CONSTASCII_USTRINGPARAM("pt")); + rStr = OUString("pt"); break; } case FUNIT_PICA : { - rStr = UniString(RTL_CONSTASCII_USTRINGPARAM("pica")); + rStr = OUString("pica"); break; } case FUNIT_INCH : { - rStr = UniString(); - rStr += sal_Unicode('"'); + rStr = OUString("\""); break; } case FUNIT_FOOT : { - rStr = UniString(RTL_CONSTASCII_USTRINGPARAM("ft")); + rStr = OUString("ft"); break; } case FUNIT_MILE : { - rStr = UniString(RTL_CONSTASCII_USTRINGPARAM("mile(s)")); + rStr = OUString("mile(s)"); break; } // others case FUNIT_PERCENT: { - rStr = UniString(); - rStr += sal_Unicode('%'); + rStr = OUString("%"); break; } } diff --git a/svx/source/svdraw/svdview.cxx b/svx/source/svdraw/svdview.cxx index b28c9c1a5339..39b0e9996993 100644 --- a/svx/source/svdraw/svdview.cxx +++ b/svx/source/svdraw/svdview.cxx @@ -1254,7 +1254,7 @@ XubString SdrView::GetStatusText() aStr.SearchAndReplaceAscii("%3", OUString::valueOf(nCol + 1)); #ifdef DBG_UTIL - aStr += UniString( RTL_CONSTASCII_USTRINGPARAM( ", Level " ) ); + aStr += OUString( ", Level " ); aStr += OUString::valueOf( sal_Int32( pTextEditOutliner->GetDepth( aSel.nEndPara )) ); #endif } diff --git a/ucb/workben/ucb/ucbdemo.cxx b/ucb/workben/ucb/ucbdemo.cxx index f38447ab6f0d..09b93684bc16 100644 --- a/ucb/workben/ucb/ucbdemo.cxx +++ b/ucb/workben/ucb/ucbdemo.cxx @@ -141,7 +141,7 @@ public: //------------------------------------------------------------------------- void MessagePrinter::print( const sal_Char* pText ) { - print( UniString::CreateFromAscii( pText ) ); + print( OUString::createFromAscii(pText) ); } //------------------------------------------------------------------------- @@ -444,7 +444,7 @@ sal_Bool Ucb::init() for (sal_Int32 i = 0; i < aInfos.getLength(); ++i) { String aText(" "); - aText += UniString(aInfos[i].Scheme); + aText += OUString(aInfos[i].Scheme); print(aText); } } @@ -650,10 +650,7 @@ uno::Any UcbCommandProcessor::executeCommand( const rtl::OUString& rName, if ( bPrint ) { - UniString aText( UniString::CreateFromAscii( - RTL_CONSTASCII_STRINGPARAM( - "Executing command: " ) ) ); - aText += UniString( rName ); + OUString aText = "Executing command: " + rName; print( aText ); } @@ -1028,9 +1025,9 @@ void UcbContent::open( const rtl::OUString & rName, const UniString& rInput, if ( bPrint ) { print( "Folder object opened - iterating:" ); - print( UniString::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM( + print( OUString( "Content-ID : Title : Size : IsFolder : IsDocument\n" - "-------------------------------------------------" ) ) ); + "-------------------------------------------------" ) ); } if (nFetchSize > 0) @@ -1063,31 +1060,24 @@ void UcbContent::open( const rtl::OUString & rName, const UniString& rInput, while ( xResultSet->next() ) { - UniString aText; + OUString aText; if ( bPrint ) { - rtl::OUString aId( xContentAccess-> + OUString aId( xContentAccess-> queryContentIdentifierString() ); - aText += UniString::CreateFromInt32( ++n ); - aText.AppendAscii( RTL_CONSTASCII_STRINGPARAM( - ") " ) ); - aText += UniString( aId ); - aText.AppendAscii( RTL_CONSTASCII_STRINGPARAM( - " : " ) ); + aText = OUString::valueOf( static_cast<sal_Int64>(++n) ) + ") " + aId + " : "; } // Title: - UniString aTitle( xRow->getString( 1 ) ); + OUString aTitle( xRow->getString( 1 ) ); if ( bPrint ) { if ( aTitle.Len() == 0 && xRow->wasNull() ) - aText.AppendAscii( RTL_CONSTASCII_STRINGPARAM( - "<null>" ) ); + aText += "<null>"; else aText += aTitle; - aText.AppendAscii( RTL_CONSTASCII_STRINGPARAM( - " : " ) ); + aText += " : "; } // Size: @@ -1095,12 +1085,10 @@ void UcbContent::open( const rtl::OUString & rName, const UniString& rInput, if ( bPrint ) { if ( nSize == 0 && xRow->wasNull() ) - aText.AppendAscii( RTL_CONSTASCII_STRINGPARAM( - "<null>" ) ); + aText += "<null>"; else - aText += UniString::CreateFromInt32( nSize ); - aText.AppendAscii( RTL_CONSTASCII_STRINGPARAM( - " : " ) ); + aText += OUString::valueOf( nSize ); + aText += " : "; } // IsFolder: @@ -1111,14 +1099,7 @@ void UcbContent::open( const rtl::OUString & rName, const UniString& rInput, aText.AppendAscii( RTL_CONSTASCII_STRINGPARAM( "<null>" ) ); else - aText - += bFolder ? - UniString::CreateFromAscii( - RTL_CONSTASCII_STRINGPARAM( - "true" ) ) : - UniString::CreateFromAscii( - RTL_CONSTASCII_STRINGPARAM( - "false" ) ); + aText += bFolder ? OUString("true") : OUString("false"); aText.AppendAscii( RTL_CONSTASCII_STRINGPARAM( " : " ) ); } @@ -1132,13 +1113,7 @@ void UcbContent::open( const rtl::OUString & rName, const UniString& rInput, "<null>" ) ); else aText - += bDocument ? - UniString::CreateFromAscii( - RTL_CONSTASCII_STRINGPARAM( - "true" ) ) : - UniString::CreateFromAscii( - RTL_CONSTASCII_STRINGPARAM( - "false" ) ); // IsDocument + += bDocument ? OUString("true") : OUString("false"); // IsDocument } if ( bPrint ) @@ -1175,11 +1150,7 @@ void UcbContent::open( const rtl::OUString & rName, const UniString& rInput, if ( bTiming ) { nTime = Time::GetSystemTicks() - nTime; - UniString - aText( UniString::CreateFromAscii( - RTL_CONSTASCII_STRINGPARAM( "Operation took " ) ) ); - aText += rtl::OUString::valueOf(static_cast<sal_Int64>(nTime)); - aText.AppendAscii( RTL_CONSTASCII_STRINGPARAM( " ms." ) ); + OUString aText = "Operation took " + OUString::valueOf(static_cast<sal_Int64>(nTime)) + " ms."; print( aText ); } } @@ -1202,11 +1173,10 @@ void UcbContent::openAll( Ucb& rUCB, bool bPrint, bool bTiming, bool bSort, if ( bPrint ) { - UniString aText; + OUString aText; for ( sal_uInt32 i = aEntry.m_nLevel; i != 0; --i ) aText += '='; - aText.AppendAscii( RTL_CONSTASCII_STRINGPARAM( "LEVEL " ) ); - aText += rtl::OUString::valueOf(static_cast<sal_Int64>(aEntry.m_nLevel)); + aText = aText + "LEVEL " + OUString::valueOf(static_cast<sal_Int64>(aEntry.m_nLevel)); uno::Reference< ucb::XContentIdentifier > xID; if ( aEntry.m_bUseIdentifier ) @@ -1215,8 +1185,7 @@ void UcbContent::openAll( Ucb& rUCB, bool bPrint, bool bTiming, bool bSort, xID = aEntry.m_xContent->getIdentifier(); if ( xID.is() ) { - aText.AppendAscii( RTL_CONSTASCII_STRINGPARAM( ": " ) ); - aText += UniString( xID->getContentIdentifier() ); + aText = aText + ": " + xID->getContentIdentifier(); } print( aText ); @@ -1248,20 +1217,15 @@ void UcbContent::openAll( Ucb& rUCB, bool bPrint, bool bTiming, bool bSort, } UcbContent( m_rUCB, xChild, m_pOutEdit ). - open( UniString::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM( - "open" ) ), - UniString(), bPrint, false, bSort, &aStack, + open( "open", + OUString(), bPrint, false, bSort, &aStack, aEntry.m_nLevel, nFetchSize ); } if ( bTiming ) { nTime = Time::GetSystemTicks() - nTime; - UniString - aText( UniString::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM( - "Operation took " ) ) ); - aText += rtl::OUString::valueOf(static_cast<sal_Int64>(nTime)); - aText.AppendAscii( RTL_CONSTASCII_STRINGPARAM( " ms." ) ); + OUString aText = "Operation took " + OUString::valueOf(static_cast<sal_Int64>(nTime)) + " ms."; print( aText ); } } @@ -1354,14 +1318,11 @@ uno::Sequence< ucb::CommandInfo > UcbContent::getCommands() xInfo->getCommands() ); const ucb::CommandInfo* pCommands = aCommands.getConstArray(); - String aText( UniString::CreateFromAscii( - RTL_CONSTASCII_STRINGPARAM( "Commands:\n" ) ) ); + OUString aText("Commands:\n"); sal_uInt32 nCount = aCommands.getLength(); for ( sal_uInt32 n = 0; n < nCount; ++n ) { - aText.AppendAscii( RTL_CONSTASCII_STRINGPARAM( " " ) ); - aText += String( pCommands[ n ].Name ); - aText += '\n'; + aText = aText + " " + String( pCommands[ n ].Name ) + "\n"; } print( aText ); @@ -1384,14 +1345,11 @@ uno::Sequence< beans::Property > UcbContent::getProperties() uno::Sequence< beans::Property > aProps( xInfo->getProperties() ); const beans::Property* pProps = aProps.getConstArray(); - String aText( UniString::CreateFromAscii( - RTL_CONSTASCII_STRINGPARAM( "Properties:\n" ) ) ); + OUString aText("Properties:\n"); sal_uInt32 nCount = aProps.getLength(); for ( sal_uInt32 n = 0; n < nCount; ++n ) { - aText.AppendAscii( RTL_CONSTASCII_STRINGPARAM( " " ) ); - aText += UniString( pProps[ n ].Name ); - aText += '\n'; + aText = aText + " " + pProps[ n ].Name + "\n"; } print( aText ); @@ -1437,10 +1395,7 @@ rtl::OUString UcbContent::getStringPropertyValue( const rtl::OUString& rName ) const rtl::OUString aValue( * static_cast< const rtl::OUString * >( aAny.getValue() ) ); - UniString aText( rName ); - aText.AppendAscii( RTL_CONSTASCII_STRINGPARAM( " value: '" ) ); - aText += UniString( aValue ); - aText.AppendAscii( RTL_CONSTASCII_STRINGPARAM( "'" ) ); + OUString aText = rName + " value: '" + aValue + "'"; print( aText ); return aValue; @@ -1479,10 +1434,7 @@ void UcbContent::setStringPropertyValue( const rtl::OUString& rName, aAny <<= rValue; setPropertyValue( rName, aAny ); - UniString aText( rName ); - aText.AppendAscii( RTL_CONSTASCII_STRINGPARAM( " value set to: '" ) ); - aText += UniString( rValue ); - aText.AppendAscii( RTL_CONSTASCII_STRINGPARAM( "'" ) ); + OUString aText = rName + " value set to: '" + rValue + "'"; print( aText ); } @@ -1494,10 +1446,7 @@ void UcbContent::addProperty( const rtl::OUString& rName, uno::UNO_QUERY ); if ( xContainer.is() ) { - UniString aText( UniString::CreateFromAscii( - RTL_CONSTASCII_STRINGPARAM( - "Adding property: " ) ) ); - aText += UniString( rName ); + OUString aText = "Adding property: " + rName; print( aText ); try @@ -1543,10 +1492,7 @@ void UcbContent::removeProperty( const rtl::OUString& rName ) uno::UNO_QUERY ); if ( xContainer.is() ) { - UniString aText( UniString::CreateFromAscii( - RTL_CONSTASCII_STRINGPARAM( - "Removing property: " ) ) ); - aText += UniString( rName ); + OUString aText = "Removing property: " + rName; print( aText ); try @@ -1628,16 +1574,12 @@ void SAL_CALL UcbContent::contentEvent( const ucb::ContentEvent& evt ) { case ucb::ContentAction::INSERTED: { - UniString aText( UniString::CreateFromAscii( - RTL_CONSTASCII_STRINGPARAM( - "contentEvent: INSERTED: " ) ) ); + OUString aText = "contentEvent: INSERTED: "; if ( evt.Content.is() ) { uno::Reference< ucb::XContentIdentifier > xId( evt.Content->getIdentifier() ); - aText += UniString( xId->getContentIdentifier() ); - aText.AppendAscii( RTL_CONSTASCII_STRINGPARAM( " - " ) ); - aText += UniString( evt.Content->getContentType() ); + aText = aText + xId->getContentIdentifier() + " - " + evt.Content->getContentType(); } print( aText ); @@ -1699,9 +1641,7 @@ void SAL_CALL UcbContent::propertiesChange( const beans::PropertyChangeEvent* pEvents = evt.getConstArray(); for ( sal_uInt32 n = 0; n < nCount; ++n ) { - UniString aText( UniString::CreateFromAscii( - RTL_CONSTASCII_STRINGPARAM( " " ) ) ); - aText += UniString( pEvents[ n ].PropertyName ); + OUString aText = " " + pEvents[ n ].PropertyName; print( aText ); } } @@ -1786,236 +1726,146 @@ MyWin::MyWin( Window *pParent, WinBits nWinStyle, m_pTool = new ToolBox( this, WB_3DLOOK | WB_BORDER | WB_SCROLL ); m_pTool->InsertItem ( MYWIN_ITEMID_CLEAR, - UniString::CreateFromAscii( - RTL_CONSTASCII_STRINGPARAM( - "Clear" ) ) ); + OUString( "Clear" ); m_pTool->SetHelpText( MYWIN_ITEMID_CLEAR, - UniString::CreateFromAscii( - RTL_CONSTASCII_STRINGPARAM( - "Clear the Output Window" ) ) ); + OUString( "Clear the Output Window" ); m_pTool->InsertSeparator(); m_pTool->InsertItem ( MYWIN_ITEMID_CREATE, - UniString::CreateFromAscii( - RTL_CONSTASCII_STRINGPARAM( - "Create" ) ) ); + OUString( "Create" ); m_pTool->SetHelpText( MYWIN_ITEMID_CREATE, - UniString::CreateFromAscii( - RTL_CONSTASCII_STRINGPARAM( - "Create a content" ) ) ); + OUString( "Create a content" ); m_pTool->InsertItem ( MYWIN_ITEMID_RELEASE, - UniString::CreateFromAscii( - RTL_CONSTASCII_STRINGPARAM( - "Release" ) ) ); + OUString( "Release" ) ); m_pTool->SetHelpText( MYWIN_ITEMID_RELEASE, - UniString::CreateFromAscii( - RTL_CONSTASCII_STRINGPARAM( - "Release current content" ) ) ); + OUString( "Release current content" ); m_pTool->InsertSeparator(); m_pTool->InsertItem ( MYWIN_ITEMID_COMMANDS, - UniString::CreateFromAscii( - RTL_CONSTASCII_STRINGPARAM( - "Commands" ) ) ); + OUString( "Commands" ); m_pTool->SetHelpText( MYWIN_ITEMID_COMMANDS, - UniString::CreateFromAscii( - RTL_CONSTASCII_STRINGPARAM( - "Get Commands supported by the content" ) ) ); + OUString( "Get Commands supported by the content" ) ); m_pTool->InsertItem ( MYWIN_ITEMID_PROPS, - UniString::CreateFromAscii( - RTL_CONSTASCII_STRINGPARAM( - "Properties" ) ) ); + OUString( "Properties" ) ) ); m_pTool->SetHelpText( MYWIN_ITEMID_PROPS, - UniString::CreateFromAscii( - RTL_CONSTASCII_STRINGPARAM( - "Get Properties supported by the content" ) ) ); + OUString( "Get Properties supported by the content" ) ); m_pTool->InsertSeparator(); m_pTool->InsertItem ( MYWIN_ITEMID_ADD_PROP, - UniString::CreateFromAscii( - RTL_CONSTASCII_STRINGPARAM( - "addProperty" ) ) ); + OUString( "addProperty" ); m_pTool->SetHelpText( MYWIN_ITEMID_ADD_PROP, - UniString::CreateFromAscii( - RTL_CONSTASCII_STRINGPARAM( + OUString( "Add a new string(!) property to the content. " "Type the property name in the entry field and " "push this button. The default value for the " - "property will be set to the string 'DefaultValue'" ) ) ); + "property will be set to the string 'DefaultValue'" ) ); m_pTool->InsertItem ( MYWIN_ITEMID_REMOVE_PROP, - UniString::CreateFromAscii( - RTL_CONSTASCII_STRINGPARAM( - "removeProperty" ) ) ); + OUString( "removeProperty" ) ); m_pTool->SetHelpText( MYWIN_ITEMID_REMOVE_PROP, - UniString::CreateFromAscii( - RTL_CONSTASCII_STRINGPARAM( + OUString( "Removes a property from the content. " "Type the property name in the entry field and " - "push this button." ) ) ); + "push this button." ) ); m_pTool->InsertItem ( MYWIN_ITEMID_GET_PROP, - UniString::CreateFromAscii( - RTL_CONSTASCII_STRINGPARAM( - "getPropertyValue" ) ) ); + OUString( "getPropertyValue" ) ); m_pTool->SetHelpText( MYWIN_ITEMID_GET_PROP, - UniString::CreateFromAscii( - RTL_CONSTASCII_STRINGPARAM( + OUString( "Get a string(!) property value from the content. " "Type the property name in the entry field and " - "push this button to obtain the value" ) ) ); + "push this button to obtain the value" ) ); m_pTool->InsertItem ( MYWIN_ITEMID_SET_PROP, - UniString::CreateFromAscii( - RTL_CONSTASCII_STRINGPARAM( - "setPropertyValue" ) ) ); + OUString( "setPropertyValue" ) ); m_pTool->SetHelpText( MYWIN_ITEMID_SET_PROP, - UniString::CreateFromAscii( - RTL_CONSTASCII_STRINGPARAM( + OUString( "Set a string(!) property value of the content." "Type the property name in the entry field and " "push this button to set the value to the string " - "'NewValue'" ) ) ); + "'NewValue'" ) ); m_pTool->InsertSeparator(); m_pTool->InsertItem ( MYWIN_ITEMID_OPEN, - UniString::CreateFromAscii( - RTL_CONSTASCII_STRINGPARAM( - "Open" ) ) ); + OUString( "Open" ) ); m_pTool->SetHelpText( MYWIN_ITEMID_OPEN, - UniString::CreateFromAscii( - RTL_CONSTASCII_STRINGPARAM( - "Open the content" ) ) ); + OUString( "Open the content" ) ); m_pTool->InsertItem ( MYWIN_ITEMID_OPEN_ALL, - UniString::CreateFromAscii( - RTL_CONSTASCII_STRINGPARAM( - "Open All" ) ) ); + OUString( "Open All" ) ); m_pTool->SetHelpText( MYWIN_ITEMID_OPEN_ALL, - UniString::CreateFromAscii( - RTL_CONSTASCII_STRINGPARAM( + OUString( "Open the content and all of its" - " children" ) ) ); + " children" ) ); m_pTool->InsertItem ( MYWIN_ITEMID_UPDATE, - UniString::CreateFromAscii( - RTL_CONSTASCII_STRINGPARAM( - "Update" ) ) ); + OUString( "Update" ) ); m_pTool->SetHelpText( MYWIN_ITEMID_UPDATE, - UniString::CreateFromAscii( - RTL_CONSTASCII_STRINGPARAM( - "Update the content" ) ) ); + OUString( "Update the content" ) ); m_pTool->InsertItem ( MYWIN_ITEMID_SYNCHRONIZE, - UniString::CreateFromAscii( - RTL_CONSTASCII_STRINGPARAM( - "Synchronize" ) ) ); + OUString( "Synchronize" ) ); m_pTool->SetHelpText( MYWIN_ITEMID_SYNCHRONIZE, - UniString::CreateFromAscii( - RTL_CONSTASCII_STRINGPARAM( - "Synchronize the content" ) ) ); + OUString( "Synchronize the content" ) ); m_pTool->InsertItem ( MYWIN_ITEMID_SEARCH, - UniString::CreateFromAscii( - RTL_CONSTASCII_STRINGPARAM( - "Search" ) ) ); + OUString( "Search" ) ); m_pTool->SetHelpText( MYWIN_ITEMID_SEARCH, - UniString::CreateFromAscii( - RTL_CONSTASCII_STRINGPARAM( - "Search the content" ) ) ); + OUString( "Search the content" ) ); m_pTool->InsertItem ( MYWIN_ITEMID_REORGANIZE, - UniString::CreateFromAscii( - RTL_CONSTASCII_STRINGPARAM( - "Reorganize" ) ) ); + OUString( "Reorganize" ) ); m_pTool->SetHelpText( MYWIN_ITEMID_REORGANIZE, - UniString::CreateFromAscii( - RTL_CONSTASCII_STRINGPARAM( - "Reorganize the content storage" ) ) ); + OUString( "Reorganize the content storage" ) ); m_pTool->InsertSeparator(); m_pTool->InsertItem ( MYWIN_ITEMID_COPY, - UniString::CreateFromAscii( - RTL_CONSTASCII_STRINGPARAM( - "Copy" ) ) ); + OUString( "Copy" ) ); m_pTool->SetHelpText( MYWIN_ITEMID_COPY, - UniString::CreateFromAscii( - RTL_CONSTASCII_STRINGPARAM( + OUString( "Copy a content. Type the URL of the source " - "content into the entry field." ) ) ); + "content into the entry field." ) ); m_pTool->InsertItem ( MYWIN_ITEMID_MOVE, - UniString::CreateFromAscii( - RTL_CONSTASCII_STRINGPARAM( - "Move" ) ) ); + OUString( "Move" ) ); m_pTool->SetHelpText( MYWIN_ITEMID_MOVE, - UniString::CreateFromAscii( - RTL_CONSTASCII_STRINGPARAM( + OUString( "Move a content. Type the URL of the source " - "content into the entry field." ) ) ); + "content into the entry field." ) ); m_pTool->InsertItem ( MYWIN_ITEMID_DELETE, - UniString::CreateFromAscii( - RTL_CONSTASCII_STRINGPARAM( - "Delete" ) ) ); + OUString( "Delete" ) ); m_pTool->SetHelpText( MYWIN_ITEMID_DELETE, - UniString::CreateFromAscii( - RTL_CONSTASCII_STRINGPARAM( - "Delete the content." ) ) ); + OUString( "Delete the content." ) ); m_pTool->InsertSeparator(); m_pTool->InsertItem ( MYWIN_ITEMID_TIMING, - UniString::CreateFromAscii( - RTL_CONSTASCII_STRINGPARAM( - "Timing" ) ), + OUString( "Timing" ) ), TIB_CHECKABLE | TIB_AUTOCHECK ); m_pTool->SetHelpText( MYWIN_ITEMID_TIMING, - UniString::CreateFromAscii( - RTL_CONSTASCII_STRINGPARAM( + OUString( "Display execution times instead of" - " output" ) ) ); + " output" ) ); m_pTool->InsertItem ( MYWIN_ITEMID_SORT, - UniString::CreateFromAscii( - RTL_CONSTASCII_STRINGPARAM( - "Sort" ) ), + OUString( "Sort" ) ), TIB_CHECKABLE | TIB_AUTOCHECK ); m_pTool->SetHelpText( MYWIN_ITEMID_SORT, - UniString::CreateFromAscii( - RTL_CONSTASCII_STRINGPARAM( - "Sort result sets" ) ) ); + OUString( "Sort result sets" ) ); m_pTool->InsertItem ( MYWIN_ITEMID_FETCHSIZE, - UniString::CreateFromAscii( - RTL_CONSTASCII_STRINGPARAM( - "Fetch Size" ) ) ); + OUString( "Fetch Size" ) ); m_pTool->SetHelpText( MYWIN_ITEMID_FETCHSIZE, - UniString::CreateFromAscii( - RTL_CONSTASCII_STRINGPARAM( - "Set cached cursor fetch size to positive value" ) ) ); + OUString( "Set cached cursor fetch size to positive value" ) ); m_pTool->InsertSeparator(); m_pTool->InsertItem ( MYWIN_ITEMID_SYS2URI, - UniString::CreateFromAscii( - RTL_CONSTASCII_STRINGPARAM( - "UNC>URI" ) ) ); + OUString( "UNC>URI" ) ); m_pTool->SetHelpText( MYWIN_ITEMID_SYS2URI, - UniString::CreateFromAscii( - RTL_CONSTASCII_STRINGPARAM( + OUString( "Translate 'System File Path' to URI," - " if possible" ) ) ); + " if possible" ) ); m_pTool->InsertItem ( MYWIN_ITEMID_URI2SYS, - UniString::CreateFromAscii( - RTL_CONSTASCII_STRINGPARAM( - "URI>UNC" ) ) ); + OUString( "URI>UNC" ) ); m_pTool->SetHelpText( MYWIN_ITEMID_URI2SYS, - UniString::CreateFromAscii( - RTL_CONSTASCII_STRINGPARAM( + OUString( "Translate URI to 'System File Path'," - " if possible" ) ) ); + " if possible" ) ); m_pTool->InsertSeparator(); m_pTool->InsertItem ( MYWIN_ITEMID_OFFLINE, - UniString::CreateFromAscii( - RTL_CONSTASCII_STRINGPARAM( - "Offline" ) ) ); + OUString( "Offline" ) ); m_pTool->SetHelpText( MYWIN_ITEMID_OFFLINE, - UniString::CreateFromAscii( - RTL_CONSTASCII_STRINGPARAM( - "Go offline" ) ) ); + OUString( "Go offline" ) ); m_pTool->InsertItem ( MYWIN_ITEMID_ONLINE, - UniString::CreateFromAscii( - RTL_CONSTASCII_STRINGPARAM( - "Online" ) ) ); + OUString( "Online" ) ); m_pTool->SetHelpText( MYWIN_ITEMID_ONLINE, - UniString::CreateFromAscii( - RTL_CONSTASCII_STRINGPARAM( - "Go back online" ) ) ); + OUString( "Go back online" ) ); m_pTool->SetSelectHdl( LINK( this, MyWin, ToolBarHandler ) ); m_pTool->Show(); @@ -2023,8 +1873,7 @@ MyWin::MyWin( Window *pParent, WinBits nWinStyle, // Edit. m_pCmdEdit = new Edit( this ); m_pCmdEdit->SetReadOnly( FALSE ); - m_pCmdEdit->SetText( UniString::CreateFromAscii( - RTL_CONSTASCII_STRINGPARAM( "file:///" ) ) ); + m_pCmdEdit->SetText( OUString( "file:///" ) ); m_pCmdEdit->Show(); // MyOutWindow. @@ -2069,7 +1918,7 @@ void MyWin::Resize() //------------------------------------------------------------------------- void MyWin::print( const sal_Char* pText ) { - print( UniString::CreateFromAscii( pText ) ); + print( OUString.createFromAscii( pText ) ); } //------------------------------------------------------------------------- @@ -2088,7 +1937,7 @@ void MyWin::print( const UniString& rText ) IMPL_LINK( MyWin, ToolBarHandler, ToolBox*, pToolBox ) { USHORT nItemId = pToolBox->GetCurItemId(); - UniString aCmdLine = m_pCmdEdit->GetText(); + OUString aCmdLine = m_pCmdEdit->GetText(); ULONG n = Application::ReleaseSolarMutex(); @@ -2106,10 +1955,7 @@ IMPL_LINK( MyWin, ToolBarHandler, ToolBox*, pToolBox ) case MYWIN_ITEMID_CREATE: if ( m_pContent ) { - UniString aText( UniString::CreateFromAscii( - RTL_CONSTASCII_STRINGPARAM( - "Content released: " ) ) ); - aText += m_pContent->getURL(); + OUString aText = "Content released: " + m_pContent->getURL(); m_pContent->dispose(); m_pContent->release(); @@ -2121,20 +1967,12 @@ IMPL_LINK( MyWin, ToolBarHandler, ToolBox*, pToolBox ) m_pContent = UcbContent::create( m_aUCB, aCmdLine, m_pOutEdit ); if ( m_pContent ) { - String aText( UniString::CreateFromAscii( - RTL_CONSTASCII_STRINGPARAM( - "Created content: " ) ) ); - aText += String( m_pContent->getURL() ); - aText.AppendAscii( RTL_CONSTASCII_STRINGPARAM( " - " ) ); - aText += String( m_pContent->getType() ); + OUString aText = "Created content: " + m_pContent->getURL() + " - " + m_pContent->getType(); print( aText ); } else { - String aText( UniString::CreateFromAscii( - RTL_CONSTASCII_STRINGPARAM( - "Creation failed for content: " ) ) ); - aText += String( aCmdLine ); + OUString aText = "Creation failed for content: " + aCmdLine; print( aText ); } break; @@ -2142,10 +1980,7 @@ IMPL_LINK( MyWin, ToolBarHandler, ToolBox*, pToolBox ) case MYWIN_ITEMID_RELEASE: if ( m_pContent ) { - UniString aText( UniString::CreateFromAscii( - RTL_CONSTASCII_STRINGPARAM( - "Content released: " ) ) ); - aText += m_pContent->getURL(); + OUString aText = "Content released: " + m_pContent->getURL(); m_pContent->dispose(); m_pContent->release(); @@ -2497,10 +2332,7 @@ void MyApp::Main() MyWin *pMyWin = new MyWin( NULL, WB_APP | WB_STDWORK, xFac, aConfigurationKey1, aConfigurationKey2 ); - pMyWin-> - SetText( - UniString::CreateFromAscii( - RTL_CONSTASCII_STRINGPARAM( "UCB Demo/Test Application" ) ) ); + pMyWin->SetText( OUString( "UCB Demo/Test Application" ) ); pMyWin->SetPosSizePixel( 0, 0, 1024, 768 ); |