summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorJean-Noël Rouvignac <jn.rouvignac@gmail.com>2013-01-10 01:52:32 +0100
committerIvan Timofeev <timofeev.i.s@gmail.com>2013-01-13 11:21:25 +0400
commit6f3c367f9c2bff7520f2a55f1795fd718abea938 (patch)
treeb2bdabda32fef36b02c4972966490d6bbaa69f40 /svx
parentd28ccfbcdd459d21f8791cd7a61a52a12d3adbbc (diff)
fdo#38838 Some removal/replacement of the String/UniString with OUString
Change-Id: Ibce0f8542aa398147d74f7acf53b2898dc3e4eff
Diffstat (limited to 'svx')
-rw-r--r--svx/source/gallery2/galexpl.cxx1
-rw-r--r--svx/source/svdraw/svdattr.cxx9
-rw-r--r--svx/source/svdraw/svdibrow.cxx8
-rw-r--r--svx/source/svdraw/svdmark.cxx6
-rw-r--r--svx/source/svdraw/svdmodel.cxx20
-rw-r--r--svx/source/svdraw/svdmrkv.cxx2
-rw-r--r--svx/source/svdraw/svdtrans.cxx63
-rw-r--r--svx/source/svdraw/svdview.cxx2
8 files changed, 51 insertions, 60 deletions
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
}