diff options
author | Jean-Noël Rouvignac <jn.rouvignac@gmail.com> | 2013-01-23 12:41:52 +0100 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2013-01-28 17:36:20 +0100 |
commit | 0dc532bffcda35d15a4719c05bb258e470355b98 (patch) | |
tree | ec7adac5e52ca5aebb52d06a2498654af82e1200 /editeng/source/items | |
parent | 7e8e9031c6ef46d67d5579ca42d0c0f5975d4f98 (diff) |
fdo#38838 Some removal/replacement of the String/UniString with OUString
Changed SfxItemPool::GetPresentation( SfxItemPresentation ePres, SfxMapUnit eCoreMetric, SfxMapUnit ePresMetric, String &rText ) const; to use OUString.
Change-Id: I656c1d321ff96f1f2e5b77f6adc103ef0a6fdf66
Diffstat (limited to 'editeng/source/items')
-rw-r--r-- | editeng/source/items/bulitem.cxx | 4 | ||||
-rw-r--r-- | editeng/source/items/charhiddenitem.cxx | 4 | ||||
-rw-r--r-- | editeng/source/items/frmitems.cxx | 303 | ||||
-rw-r--r-- | editeng/source/items/justifyitem.cxx | 12 | ||||
-rw-r--r-- | editeng/source/items/optitems.cxx | 19 | ||||
-rw-r--r-- | editeng/source/items/paraitem.cxx | 110 | ||||
-rw-r--r-- | editeng/source/items/textitem.cxx | 153 | ||||
-rw-r--r-- | editeng/source/items/writingmodeitem.cxx | 4 | ||||
-rw-r--r-- | editeng/source/items/xmlcnitm.cxx | 2 |
9 files changed, 303 insertions, 308 deletions
diff --git a/editeng/source/items/bulitem.cxx b/editeng/source/items/bulitem.cxx index 0a433ecfa49e..6b93d576429f 100644 --- a/editeng/source/items/bulitem.cxx +++ b/editeng/source/items/bulitem.cxx @@ -381,14 +381,14 @@ SfxItemPresentation SvxBulletItem::GetPresentation SfxItemPresentation ePres, SfxMapUnit /*eCoreUnit*/, SfxMapUnit /*ePresUnit*/, - XubString& rText, const IntlWrapper * + OUString& rText, const IntlWrapper * ) const { SfxItemPresentation eRet = SFX_ITEM_PRESENTATION_NONE; switch ( ePres ) { case SFX_ITEM_PRESENTATION_NONE: - rText.Erase(); + rText = OUString(); eRet = SFX_ITEM_PRESENTATION_NONE; break; diff --git a/editeng/source/items/charhiddenitem.cxx b/editeng/source/items/charhiddenitem.cxx index 5fa79fae4abc..4a2d257c73b0 100644 --- a/editeng/source/items/charhiddenitem.cxx +++ b/editeng/source/items/charhiddenitem.cxx @@ -38,13 +38,13 @@ SfxItemPresentation SvxCharHiddenItem::GetPresentation SfxItemPresentation ePres, SfxMapUnit /*eCoreUnit*/, SfxMapUnit /*ePresUnit*/, - XubString& rText, const IntlWrapper * /*pIntl*/ + OUString& rText, const IntlWrapper * /*pIntl*/ ) const { switch ( ePres ) { case SFX_ITEM_PRESENTATION_NONE: - rText.Erase(); + rText = OUString(); return ePres; case SFX_ITEM_PRESENTATION_NAMELESS: case SFX_ITEM_PRESENTATION_COMPLETE: diff --git a/editeng/source/items/frmitems.cxx b/editeng/source/items/frmitems.cxx index 6e202da73a87..1d6798c495d8 100644 --- a/editeng/source/items/frmitems.cxx +++ b/editeng/source/items/frmitems.cxx @@ -207,17 +207,17 @@ SfxItemPresentation SvxPaperBinItem::GetPresentation SfxItemPresentation ePres, SfxMapUnit /*eCoreUnit*/, SfxMapUnit /*ePresUnit*/, - XubString& rText, const IntlWrapper * + OUString& rText, const IntlWrapper * ) const { switch ( ePres ) { case SFX_ITEM_PRESENTATION_NONE: - rText.Erase(); + rText = OUString(); return SFX_ITEM_PRESENTATION_NONE; case SFX_ITEM_PRESENTATION_NAMELESS: - rText = String::CreateFromInt32( GetValue() ); + rText = OUString::number( GetValue() ); return SFX_ITEM_PRESENTATION_NAMELESS; case SFX_ITEM_PRESENTATION_COMPLETE: @@ -228,9 +228,7 @@ SfxItemPresentation SvxPaperBinItem::GetPresentation rText = EE_RESSTR(RID_SVXSTR_PAPERBIN_SETTINGS); else { - rText = EE_RESSTR(RID_SVXSTR_PAPERBIN); - rText += sal_Unicode(' '); - rText += String::CreateFromInt32( nValue ); + rText = EE_RESSTR(RID_SVXSTR_PAPERBIN) + " " + OUString::number( nValue ); } return SFX_ITEM_PRESENTATION_COMPLETE; } @@ -355,29 +353,30 @@ SfxItemPresentation SvxSizeItem::GetPresentation SfxItemPresentation ePres, SfxMapUnit eCoreUnit, SfxMapUnit ePresUnit, - XubString& rText, const IntlWrapper *pIntl + OUString& rText, const IntlWrapper *pIntl ) const { + OUString cpDelimTmp(cpDelim); switch ( ePres ) { case SFX_ITEM_PRESENTATION_NONE: - rText.Erase(); + rText = OUString(); return SFX_ITEM_PRESENTATION_NONE; case SFX_ITEM_PRESENTATION_NAMELESS: - rText = GetMetricText( aSize.Width(), eCoreUnit, ePresUnit, pIntl ); - rText += cpDelim; - rText += GetMetricText( aSize.Height(), eCoreUnit, ePresUnit, pIntl ); + rText = GetMetricText( aSize.Width(), eCoreUnit, ePresUnit, pIntl ) + + cpDelimTmp + + GetMetricText( aSize.Height(), eCoreUnit, ePresUnit, pIntl ); return SFX_ITEM_PRESENTATION_NAMELESS; case SFX_ITEM_PRESENTATION_COMPLETE: - rText = EE_RESSTR(RID_SVXITEMS_SIZE_WIDTH); - rText += GetMetricText( aSize.Width(), eCoreUnit, ePresUnit, pIntl ); - rText += EE_RESSTR(GetMetricId(ePresUnit)); - rText += cpDelim; - rText += EE_RESSTR(RID_SVXITEMS_SIZE_HEIGHT); - rText += GetMetricText( aSize.Height(), eCoreUnit, ePresUnit, pIntl ); - rText += EE_RESSTR(GetMetricId(ePresUnit)); + rText = EE_RESSTR(RID_SVXITEMS_SIZE_WIDTH) + + GetMetricText( aSize.Width(), eCoreUnit, ePresUnit, pIntl ) + + EE_RESSTR(GetMetricId(ePresUnit)) + + cpDelimTmp + + EE_RESSTR(RID_SVXITEMS_SIZE_HEIGHT) + + GetMetricText( aSize.Height(), eCoreUnit, ePresUnit, pIntl ) + + EE_RESSTR(GetMetricId(ePresUnit)); return SFX_ITEM_PRESENTATION_COMPLETE; //no break necessary default: ;//prevent warning @@ -607,30 +606,30 @@ SfxItemPresentation SvxLRSpaceItem::GetPresentation SfxItemPresentation ePres, SfxMapUnit eCoreUnit, SfxMapUnit ePresUnit, - XubString& rText, const IntlWrapper* pIntl + OUString& rText, const IntlWrapper* pIntl ) const { switch ( ePres ) { case SFX_ITEM_PRESENTATION_NONE: - rText.Erase(); + rText = OUString(); return SFX_ITEM_PRESENTATION_NONE; case SFX_ITEM_PRESENTATION_NAMELESS: { if ( 100 != nPropLeftMargin ) - ( rText = String::CreateFromInt32( nPropLeftMargin )) += sal_Unicode('%'); + rText = OUString::number( nPropLeftMargin ) + "%"; else rText = GetMetricText( (long)nLeftMargin, eCoreUnit, ePresUnit, pIntl ); - rText += cpDelim; + rText += OUString(cpDelim); if ( 100 != nPropFirstLineOfst ) - ( rText += String::CreateFromInt32( nPropFirstLineOfst )) += sal_Unicode('%'); + rText = rText + OUString::number( nPropFirstLineOfst ) + "%"; else rText += GetMetricText( (long)nFirstLineOfst, eCoreUnit, ePresUnit, pIntl ); - rText += cpDelim; + rText += OUString(cpDelim); if ( 100 != nRightMargin ) - ( rText += String::CreateFromInt32( nRightMargin )) += sal_Unicode('%'); + rText = rText + OUString::number( nRightMargin ) + "%"; else rText += GetMetricText( (long)nRightMargin, eCoreUnit, ePresUnit, pIntl ); @@ -640,36 +639,37 @@ SfxItemPresentation SvxLRSpaceItem::GetPresentation { rText = EE_RESSTR(RID_SVXITEMS_LRSPACE_LEFT); if ( 100 != nPropLeftMargin ) - ( rText += String::CreateFromInt32( nPropLeftMargin )) += sal_Unicode('%'); + rText += OUString::number( nPropLeftMargin ) + "%"; else { - rText += GetMetricText( (long)nLeftMargin, - eCoreUnit, ePresUnit, pIntl ); - rText += EE_RESSTR(GetMetricId(ePresUnit)); + rText = rText + + GetMetricText( (long)nLeftMargin, eCoreUnit, ePresUnit, pIntl ) + + EE_RESSTR(GetMetricId(ePresUnit)); } - rText += cpDelim; + rText += OUString(cpDelim); if ( 100 != nPropFirstLineOfst || nFirstLineOfst ) { rText += EE_RESSTR(RID_SVXITEMS_LRSPACE_FLINE); if ( 100 != nPropFirstLineOfst ) - ( rText += String::CreateFromInt32( nPropFirstLineOfst )) - += sal_Unicode('%'); + rText = rText + OUString::number( nPropFirstLineOfst ) + "%"; else { - rText += GetMetricText( (long)nFirstLineOfst, - eCoreUnit, ePresUnit, pIntl ); - rText += EE_RESSTR(GetMetricId(ePresUnit)); + rText = rText + + GetMetricText( (long)nFirstLineOfst, + eCoreUnit, ePresUnit, pIntl ) + + EE_RESSTR(GetMetricId(ePresUnit)); } - rText += cpDelim; + rText += OUString(cpDelim); } rText += EE_RESSTR(RID_SVXITEMS_LRSPACE_RIGHT); if ( 100 != nPropRightMargin ) - ( rText += String::CreateFromInt32( nPropRightMargin )) += sal_Unicode('%'); + rText = rText + OUString::number( nPropRightMargin ) + "%"; else { - rText += GetMetricText( (long)nRightMargin, - eCoreUnit, ePresUnit, pIntl ); - rText += EE_RESSTR(GetMetricId(ePresUnit)); + rText = rText + + GetMetricText( (long)nRightMargin, + eCoreUnit, ePresUnit, pIntl ) + + EE_RESSTR(GetMetricId(ePresUnit)); } return SFX_ITEM_PRESENTATION_COMPLETE; } @@ -967,23 +967,23 @@ SfxItemPresentation SvxULSpaceItem::GetPresentation SfxItemPresentation ePres, SfxMapUnit eCoreUnit, SfxMapUnit ePresUnit, - XubString& rText, const IntlWrapper *pIntl + OUString& rText, const IntlWrapper *pIntl ) const { switch ( ePres ) { case SFX_ITEM_PRESENTATION_NONE: - rText.Erase(); + rText = OUString(); return SFX_ITEM_PRESENTATION_NONE; case SFX_ITEM_PRESENTATION_NAMELESS: { if ( 100 != nPropUpper ) - ( rText = String::CreateFromInt32( nPropUpper )) += sal_Unicode('%'); + rText = OUString::number( nPropUpper ) + "%"; else rText = GetMetricText( (long)nUpper, eCoreUnit, ePresUnit, pIntl ); - rText += cpDelim; + rText += OUString(cpDelim); if ( 100 != nPropLower ) - ( rText += String::CreateFromInt32( nPropLower )) += sal_Unicode('%'); + rText += OUString::number( nPropLower ) + "%"; else rText += GetMetricText( (long)nLower, eCoreUnit, ePresUnit, pIntl ); return SFX_ITEM_PRESENTATION_NAMELESS; @@ -992,20 +992,21 @@ SfxItemPresentation SvxULSpaceItem::GetPresentation { rText = EE_RESSTR(RID_SVXITEMS_ULSPACE_UPPER); if ( 100 != nPropUpper ) - ( rText += String::CreateFromInt32( nPropUpper )) += sal_Unicode('%'); + rText += OUString::number( nPropUpper ) + "%"; else { - rText += GetMetricText( (long)nUpper, eCoreUnit, ePresUnit, pIntl ); - rText += EE_RESSTR(GetMetricId(ePresUnit)); + rText = rText + + GetMetricText( (long)nUpper, eCoreUnit, ePresUnit, pIntl ) + + EE_RESSTR(GetMetricId(ePresUnit)); } - rText += cpDelim; - rText += EE_RESSTR(RID_SVXITEMS_ULSPACE_LOWER); + rText = rText + OUString(cpDelim) + EE_RESSTR(RID_SVXITEMS_ULSPACE_LOWER); if ( 100 != nPropLower ) - ( rText += String::CreateFromInt32( nPropLower )) += sal_Unicode('%'); + rText += OUString::number( nPropLower ) + "%"; else { - rText += GetMetricText( (long)nLower, eCoreUnit, ePresUnit, pIntl ); - rText += EE_RESSTR(GetMetricId(ePresUnit)); + rText = rText + + GetMetricText( (long)nLower, eCoreUnit, ePresUnit, pIntl ) + + EE_RESSTR(GetMetricId(ePresUnit)); } return SFX_ITEM_PRESENTATION_COMPLETE; } @@ -1103,13 +1104,13 @@ SfxItemPresentation SvxPrintItem::GetPresentation SfxItemPresentation ePres, SfxMapUnit /*eCoreUnit*/, SfxMapUnit /*ePresUnit*/, - XubString& rText, const IntlWrapper * + OUString& rText, const IntlWrapper * ) const { switch ( ePres ) { case SFX_ITEM_PRESENTATION_NONE: - rText.Erase(); + rText = OUString(); return ePres; case SFX_ITEM_PRESENTATION_NAMELESS: @@ -1158,13 +1159,13 @@ SfxItemPresentation SvxOpaqueItem::GetPresentation SfxItemPresentation ePres, SfxMapUnit /*eCoreUnit*/, SfxMapUnit /*ePresUnit*/, - XubString& rText, const IntlWrapper * + OUString& rText, const IntlWrapper * ) const { switch ( ePres ) { case SFX_ITEM_PRESENTATION_NONE: - rText.Erase(); + rText = OUString(); return ePres; case SFX_ITEM_PRESENTATION_NAMELESS: @@ -1241,13 +1242,13 @@ SfxItemPresentation SvxProtectItem::GetPresentation SfxItemPresentation ePres, SfxMapUnit /*eCoreUnit*/, SfxMapUnit /*ePresUnit*/, - XubString& rText, const IntlWrapper * + OUString& rText, const IntlWrapper * ) const { switch ( ePres ) { case SFX_ITEM_PRESENTATION_NONE: - rText.Erase(); + rText = OUString(); return ePres; case SFX_ITEM_PRESENTATION_NAMELESS: @@ -1257,14 +1258,12 @@ SfxItemPresentation SvxProtectItem::GetPresentation if ( bCntnt ) nId = RID_SVXITEMS_PROT_CONTENT_TRUE; - rText = EE_RESSTR(nId); - rText += cpDelim; + rText = EE_RESSTR(nId) + OUString(cpDelim); nId = RID_SVXITEMS_PROT_SIZE_FALSE; if ( bSize ) nId = RID_SVXITEMS_PROT_SIZE_TRUE; - rText += EE_RESSTR(nId); - rText += cpDelim; + rText = rText + EE_RESSTR(nId) + OUString(cpDelim); nId = RID_SVXITEMS_PROT_POS_FALSE; if ( bPos ) @@ -1464,45 +1463,46 @@ SfxItemPresentation SvxShadowItem::GetPresentation SfxItemPresentation ePres, SfxMapUnit eCoreUnit, SfxMapUnit ePresUnit, - XubString& rText, const IntlWrapper *pIntl + OUString& rText, const IntlWrapper *pIntl ) const { switch ( ePres ) { case SFX_ITEM_PRESENTATION_NONE: - rText.Erase(); + rText = OUString(); return ePres; case SFX_ITEM_PRESENTATION_NAMELESS: { - rText = ::GetColorString( aShadowColor ); - rText += cpDelim; + rText = ::GetColorString( aShadowColor ) + OUString(cpDelim); sal_uInt16 nId = RID_SVXITEMS_TRANSPARENT_FALSE; if ( aShadowColor.GetTransparency() ) nId = RID_SVXITEMS_TRANSPARENT_TRUE; - rText += EE_RESSTR(nId); - rText += cpDelim; - rText += GetMetricText( (long)nWidth, eCoreUnit, ePresUnit, pIntl ); - rText += cpDelim; - rText += EE_RESSTR(RID_SVXITEMS_SHADOW_BEGIN + eLocation); + rText = rText + + EE_RESSTR(nId) + + OUString(cpDelim) + + GetMetricText( (long)nWidth, eCoreUnit, ePresUnit, pIntl ) + + OUString(cpDelim) + + EE_RESSTR(RID_SVXITEMS_SHADOW_BEGIN + eLocation); return ePres; } case SFX_ITEM_PRESENTATION_COMPLETE: { - rText = EE_RESSTR(RID_SVXITEMS_SHADOW_COMPLETE); - rText += ::GetColorString( aShadowColor ); - rText += cpDelim; + rText = EE_RESSTR(RID_SVXITEMS_SHADOW_COMPLETE) + + ::GetColorString( aShadowColor ) + + OUString(cpDelim); sal_uInt16 nId = RID_SVXITEMS_TRANSPARENT_FALSE; if ( aShadowColor.GetTransparency() ) nId = RID_SVXITEMS_TRANSPARENT_TRUE; - rText += EE_RESSTR(nId); - rText += cpDelim; - rText += GetMetricText( (long)nWidth, eCoreUnit, ePresUnit, pIntl ); - rText += EE_RESSTR(GetMetricId(ePresUnit)); - rText += cpDelim; - rText += EE_RESSTR(RID_SVXITEMS_SHADOW_BEGIN + eLocation); + rText = rText + + EE_RESSTR(nId) + + OUString(cpDelim) + + GetMetricText( (long)nWidth, eCoreUnit, ePresUnit, pIntl ) + + EE_RESSTR(GetMetricId(ePresUnit)) + + OUString(cpDelim) + + EE_RESSTR(RID_SVXITEMS_SHADOW_BEGIN + eLocation); return ePres; } default: ;//prevent warning @@ -2063,54 +2063,52 @@ SfxItemPresentation SvxBoxItem::GetPresentation SfxItemPresentation ePres, SfxMapUnit eCoreUnit, SfxMapUnit ePresUnit, - XubString& rText, const IntlWrapper *pIntl + OUString& rText, const IntlWrapper *pIntl ) const { + OUString cpDelimTmp = OUString(cpDelim); switch ( ePres ) { case SFX_ITEM_PRESENTATION_NONE: - rText.Erase(); + rText = OUString(); return SFX_ITEM_PRESENTATION_NONE; case SFX_ITEM_PRESENTATION_NAMELESS: { - rText.Erase(); + rText = OUString(); if ( pTop ) { - rText = pTop->GetValueString( eCoreUnit, ePresUnit, pIntl ); - rText += cpDelim; + rText = pTop->GetValueString( eCoreUnit, ePresUnit, pIntl ) + cpDelimTmp; } if( !(pTop && pBottom && pLeft && pRight && *pTop == *pBottom && *pTop == *pLeft && *pTop == *pRight) ) { if ( pBottom ) { - rText += pBottom->GetValueString( eCoreUnit, ePresUnit, pIntl ); - rText += cpDelim; + rText = rText + pBottom->GetValueString( eCoreUnit, ePresUnit, pIntl ) + cpDelimTmp; } if ( pLeft ) { - rText += pLeft->GetValueString( eCoreUnit, ePresUnit, pIntl ); - rText += cpDelim; + rText = rText + pLeft->GetValueString( eCoreUnit, ePresUnit, pIntl ) + cpDelimTmp; } if ( pRight ) { - rText += pRight->GetValueString( eCoreUnit, ePresUnit, pIntl ); - rText += cpDelim; + rText = rText + pRight->GetValueString( eCoreUnit, ePresUnit, pIntl ) + cpDelimTmp; } } rText += GetMetricText( (long)nTopDist, eCoreUnit, ePresUnit, pIntl ); if( nTopDist != nBottomDist || nTopDist != nLeftDist || nTopDist != nRightDist ) { - (((((rText += cpDelim) - += GetMetricText( (long)nBottomDist, eCoreUnit, - ePresUnit, pIntl )) - += cpDelim) - += GetMetricText( (long)nLeftDist, eCoreUnit, ePresUnit, pIntl )) - += cpDelim) - += GetMetricText( (long)nRightDist, eCoreUnit, + rText = rText + + cpDelimTmp + + GetMetricText( (long)nBottomDist, eCoreUnit, + ePresUnit, pIntl ) + + cpDelimTmp + + GetMetricText( (long)nLeftDist, eCoreUnit, ePresUnit, pIntl ) + + cpDelimTmp + + GetMetricText( (long)nRightDist, eCoreUnit, ePresUnit, pIntl ); } return SFX_ITEM_PRESENTATION_NAMELESS; @@ -2119,8 +2117,7 @@ SfxItemPresentation SvxBoxItem::GetPresentation { if( !(pTop || pBottom || pLeft || pRight) ) { - rText = EE_RESSTR(RID_SVXITEMS_BORDER_NONE); - rText += cpDelim; + rText = EE_RESSTR(RID_SVXITEMS_BORDER_NONE) + cpDelimTmp; } else { @@ -2128,34 +2125,37 @@ SfxItemPresentation SvxBoxItem::GetPresentation if( pTop && pBottom && pLeft && pRight && *pTop == *pBottom && *pTop == *pLeft && *pTop == *pRight ) { - rText += pTop->GetValueString( eCoreUnit, ePresUnit, pIntl, sal_True ); - rText += cpDelim; + rText += pTop->GetValueString( eCoreUnit, ePresUnit, pIntl, sal_True ) + cpDelimTmp; } else { if ( pTop ) { - rText += EE_RESSTR(RID_SVXITEMS_BORDER_TOP); - rText += pTop->GetValueString( eCoreUnit, ePresUnit, pIntl, sal_True ); - rText += cpDelim; + rText = rText + + EE_RESSTR(RID_SVXITEMS_BORDER_TOP) + + pTop->GetValueString( eCoreUnit, ePresUnit, pIntl, sal_True ) + + cpDelimTmp; } if ( pBottom ) { - rText += EE_RESSTR(RID_SVXITEMS_BORDER_BOTTOM); - rText += pBottom->GetValueString( eCoreUnit, ePresUnit, pIntl, sal_True ); - rText += cpDelim; + rText = rText + + EE_RESSTR(RID_SVXITEMS_BORDER_BOTTOM) + + pBottom->GetValueString( eCoreUnit, ePresUnit, pIntl, sal_True ) + + cpDelimTmp; } if ( pLeft ) { - rText += EE_RESSTR(RID_SVXITEMS_BORDER_LEFT); - rText += pLeft->GetValueString( eCoreUnit, ePresUnit, pIntl, sal_True ); - rText += cpDelim; + rText = rText + + EE_RESSTR(RID_SVXITEMS_BORDER_LEFT) + + pLeft->GetValueString( eCoreUnit, ePresUnit, pIntl, sal_True ) + + cpDelimTmp; } if ( pRight ) { - rText += EE_RESSTR(RID_SVXITEMS_BORDER_RIGHT); - rText += pRight->GetValueString( eCoreUnit, ePresUnit, pIntl, sal_True ); - rText += cpDelim; + rText = rText + + EE_RESSTR(RID_SVXITEMS_BORDER_RIGHT) + + pRight->GetValueString( eCoreUnit, ePresUnit, pIntl, sal_True ) + + cpDelimTmp; } } } @@ -2164,31 +2164,33 @@ SfxItemPresentation SvxBoxItem::GetPresentation if( nTopDist == nBottomDist && nTopDist == nLeftDist && nTopDist == nRightDist ) { - rText += GetMetricText( (long)nTopDist, eCoreUnit, - ePresUnit, pIntl ); - rText += EE_RESSTR(GetMetricId(ePresUnit)); + rText = rText + + GetMetricText( (long)nTopDist, eCoreUnit, + ePresUnit, pIntl ) + + EE_RESSTR(GetMetricId(ePresUnit)); } else { - (((rText += EE_RESSTR(RID_SVXITEMS_BORDER_TOP)) - += GetMetricText( (long)nTopDist, eCoreUnit, - ePresUnit, pIntl )) - += EE_RESSTR(GetMetricId(ePresUnit))) - += cpDelim; - (((rText += EE_RESSTR(RID_SVXITEMS_BORDER_BOTTOM)) - += GetMetricText( (long)nBottomDist, eCoreUnit, - ePresUnit, pIntl )) - += EE_RESSTR(GetMetricId(ePresUnit))) - += cpDelim; - (((rText += EE_RESSTR(RID_SVXITEMS_BORDER_LEFT)) - += GetMetricText( (long)nLeftDist, eCoreUnit, - ePresUnit, pIntl )) - += EE_RESSTR(GetMetricId(ePresUnit))) - += cpDelim; - ((rText += EE_RESSTR(RID_SVXITEMS_BORDER_RIGHT)) - += GetMetricText( (long)nRightDist, eCoreUnit, - ePresUnit, pIntl )) - += EE_RESSTR(GetMetricId(ePresUnit)); + rText = rText + + EE_RESSTR(RID_SVXITEMS_BORDER_TOP) + + GetMetricText( (long)nTopDist, eCoreUnit, + ePresUnit, pIntl ) + + EE_RESSTR(GetMetricId(ePresUnit)) + + cpDelimTmp + + EE_RESSTR(RID_SVXITEMS_BORDER_BOTTOM) + + GetMetricText( (long)nBottomDist, eCoreUnit, + ePresUnit, pIntl ) + + EE_RESSTR(GetMetricId(ePresUnit)) + + cpDelimTmp + + EE_RESSTR(RID_SVXITEMS_BORDER_LEFT) + + GetMetricText( (long)nLeftDist, eCoreUnit, + ePresUnit, pIntl ) + + EE_RESSTR(GetMetricId(ePresUnit)) + + cpDelimTmp + + EE_RESSTR(RID_SVXITEMS_BORDER_RIGHT) + + GetMetricText( (long)nRightDist, eCoreUnit, + ePresUnit, pIntl ) + + EE_RESSTR(GetMetricId(ePresUnit)); } return SFX_ITEM_PRESENTATION_COMPLETE; } @@ -2583,10 +2585,10 @@ SfxItemPresentation SvxBoxInfoItem::GetPresentation SfxItemPresentation /*ePres*/, SfxMapUnit /*eCoreUnit*/, SfxMapUnit /*ePresUnit*/, - XubString& rText, const IntlWrapper * + OUString& rText, const IntlWrapper * ) const { - rText.Erase(); + rText = OUString(); return SFX_ITEM_PRESENTATION_NONE; } @@ -2929,13 +2931,13 @@ SfxItemPresentation SvxFmtBreakItem::GetPresentation SfxItemPresentation ePres, SfxMapUnit /*eCoreUnit*/, SfxMapUnit /*ePresUnit*/, - XubString& rText, const IntlWrapper * + OUString& rText, const IntlWrapper * ) const { switch ( ePres ) { case SFX_ITEM_PRESENTATION_NONE: - rText.Erase(); + rText = OUString(); return SFX_ITEM_PRESENTATION_NONE; case SFX_ITEM_PRESENTATION_NAMELESS: @@ -3080,13 +3082,13 @@ SfxItemPresentation SvxFmtKeepItem::GetPresentation SfxItemPresentation ePres, SfxMapUnit /*eCoreUnit*/, SfxMapUnit /*ePresUnit*/, - XubString& rText, const IntlWrapper * + OUString& rText, const IntlWrapper * ) const { switch ( ePres ) { case SFX_ITEM_PRESENTATION_NONE: - rText.Erase(); + rText = OUString(); return ePres; case SFX_ITEM_PRESENTATION_NAMELESS: @@ -3230,10 +3232,10 @@ SfxItemPresentation SvxLineItem::GetPresentation SfxItemPresentation ePres, SfxMapUnit eCoreUnit, SfxMapUnit ePresUnit, - XubString& rText, const IntlWrapper *pIntl + OUString& rText, const IntlWrapper *pIntl ) const { - rText.Erase(); + rText = OUString(); switch ( ePres ) { @@ -3766,13 +3768,13 @@ SfxItemPresentation SvxBrushItem::GetPresentation SfxItemPresentation ePres, SfxMapUnit /*eCoreUnit*/, SfxMapUnit /*ePresUnit*/, - XubString& rText, const IntlWrapper * + OUString& rText, const IntlWrapper * ) const { switch ( ePres ) { case SFX_ITEM_PRESENTATION_NONE: - rText.Erase(); + rText = OUString(); return ePres; case SFX_ITEM_PRESENTATION_NAMELESS: @@ -3780,8 +3782,7 @@ SfxItemPresentation SvxBrushItem::GetPresentation { if ( GPOS_NONE == eGraphicPos ) { - rText = ::GetColorString( aColor ); - rText += cpDelim; + rText = ::GetColorString( aColor ) + OUString(cpDelim); sal_uInt16 nId = RID_SVXITEMS_TRANSPARENT_FALSE; if ( aColor.GetTransparency() ) @@ -4194,13 +4195,13 @@ SfxItemPresentation SvxFrameDirectionItem::GetPresentation( SfxItemPresentation ePres, SfxMapUnit /*eCoreUnit*/, SfxMapUnit /*ePresUnit*/, - XubString& rText, const IntlWrapper *) const + OUString& rText, const IntlWrapper *) const { SfxItemPresentation eRet = ePres; switch( ePres ) { case SFX_ITEM_PRESENTATION_NONE: - rText.Erase(); + rText = OUString(); break; case SFX_ITEM_PRESENTATION_NAMELESS: diff --git a/editeng/source/items/justifyitem.cxx b/editeng/source/items/justifyitem.cxx index c92220346e33..e938426dbcde 100644 --- a/editeng/source/items/justifyitem.cxx +++ b/editeng/source/items/justifyitem.cxx @@ -55,12 +55,12 @@ SfxItemPresentation SvxHorJustifyItem::GetPresentation SfxItemPresentation ePres, SfxMapUnit /*eCoreUnit*/, SfxMapUnit /*ePresUnit*/, - XubString& rText, const IntlWrapper *) const + OUString& rText, const IntlWrapper *) const { switch ( ePres ) { case SFX_ITEM_PRESENTATION_NONE: - rText.Erase(); + rText = OUString(); return SFX_ITEM_PRESENTATION_NONE; case SFX_ITEM_PRESENTATION_NAMELESS: case SFX_ITEM_PRESENTATION_COMPLETE: @@ -212,13 +212,13 @@ SfxItemPresentation SvxVerJustifyItem::GetPresentation SfxItemPresentation ePres, SfxMapUnit /*eCoreUnit*/, SfxMapUnit /*ePresUnit*/, - XubString& rText, + OUString& rText, const IntlWrapper * ) const { switch ( ePres ) { case SFX_ITEM_PRESENTATION_NONE: - rText.Erase(); + rText = OUString(); return SFX_ITEM_PRESENTATION_NONE; case SFX_ITEM_PRESENTATION_NAMELESS: case SFX_ITEM_PRESENTATION_COMPLETE: @@ -353,13 +353,13 @@ SfxItemPresentation SvxJustifyMethodItem::GetPresentation SfxItemPresentation ePres, SfxMapUnit /*eCoreUnit*/, SfxMapUnit /*ePresUnit*/, - XubString& rText, + OUString& rText, const IntlWrapper * ) const { switch ( ePres ) { case SFX_ITEM_PRESENTATION_NONE: - rText.Erase(); + rText = OUString(); return SFX_ITEM_PRESENTATION_NONE; case SFX_ITEM_PRESENTATION_NAMELESS: case SFX_ITEM_PRESENTATION_COMPLETE: diff --git a/editeng/source/items/optitems.cxx b/editeng/source/items/optitems.cxx index f5b58883d385..3c5133421bd6 100644 --- a/editeng/source/items/optitems.cxx +++ b/editeng/source/items/optitems.cxx @@ -63,14 +63,14 @@ SfxItemPresentation SfxSpellCheckItem::GetPresentation SfxItemPresentation ePres, SfxMapUnit , SfxMapUnit , - String& rText, + OUString& rText, const IntlWrapper* ) const { switch ( ePres ) { case SFX_ITEM_PRESENTATION_NONE: - rText.Erase(); + rText = OUString(); return SFX_ITEM_PRESENTATION_NONE; case SFX_ITEM_PRESENTATION_NAMELESS: @@ -142,24 +142,25 @@ SfxItemPresentation SfxHyphenRegionItem::GetPresentation SfxItemPresentation ePres, SfxMapUnit , SfxMapUnit , - String& rText, + OUString& rText, const IntlWrapper* ) const { switch ( ePres ) { case SFX_ITEM_PRESENTATION_NONE: - rText.Erase(); + rText = OUString(); return SFX_ITEM_PRESENTATION_NONE; case SFX_ITEM_PRESENTATION_NAMELESS: case SFX_ITEM_PRESENTATION_COMPLETE: { - rText += String::CreateFromInt32( nMinLead ); - rText += EE_RESSTR( RID_SVXITEMS_HYPHEN_MINLEAD ); - rText += ','; - rText += String::CreateFromInt32( nMinTrail ); - rText += EE_RESSTR( RID_SVXITEMS_HYPHEN_MINTRAIL ); + rText = rText + + OUString::number( nMinLead ) + + EE_RESSTR( RID_SVXITEMS_HYPHEN_MINLEAD ) + + "," + + OUString::number( nMinTrail ) + + EE_RESSTR( RID_SVXITEMS_HYPHEN_MINTRAIL ); return ePres; } default: diff --git a/editeng/source/items/paraitem.cxx b/editeng/source/items/paraitem.cxx index f430dc92109e..f9e7c5ed7378 100644 --- a/editeng/source/items/paraitem.cxx +++ b/editeng/source/items/paraitem.cxx @@ -244,13 +244,13 @@ SfxItemPresentation SvxLineSpacingItem::GetPresentation SfxItemPresentation /*ePres*/, SfxMapUnit /*eCoreUnit*/, SfxMapUnit /*ePresUnit*/, - XubString& rText, const IntlWrapper * + OUString& rText, const IntlWrapper * ) const { #ifdef DBG_UTIL - rText.AssignAscii( RTL_CONSTASCII_STRINGPARAM( "SvxLineSpacingItem" )); + rText = "SvxLineSpacingItem"; #else - rText.Erase(); + rText = OUString(); #endif return SFX_ITEM_PRESENTATION_NONE; } @@ -437,13 +437,13 @@ SfxItemPresentation SvxAdjustItem::GetPresentation SfxItemPresentation ePres, SfxMapUnit /*eCoreUnit*/, SfxMapUnit /*ePresUnit*/, - XubString& rText, const IntlWrapper * + OUString& rText, const IntlWrapper * ) const { switch ( ePres ) { case SFX_ITEM_PRESENTATION_NONE: - rText.Erase(); + rText = OUString(); return SFX_ITEM_PRESENTATION_NONE; case SFX_ITEM_PRESENTATION_NAMELESS: case SFX_ITEM_PRESENTATION_COMPLETE: @@ -566,14 +566,14 @@ SfxItemPresentation SvxWidowsItem::GetPresentation SfxItemPresentation ePres, SfxMapUnit /*eCoreUnit*/, SfxMapUnit /*ePresUnit*/, - XubString& rText, const IntlWrapper * + OUString& rText, const IntlWrapper * ) const { switch ( ePres ) { case SFX_ITEM_PRESENTATION_NONE: { - rText.Erase(); + rText = OUString(); break; } @@ -585,9 +585,7 @@ SfxItemPresentation SvxWidowsItem::GetPresentation case SFX_ITEM_PRESENTATION_COMPLETE: { - rText = EE_RESSTR(RID_SVXITEMS_WIDOWS_COMPLETE); - rText += ' '; - rText += EE_RESSTR(RID_SVXITEMS_LINES); + rText = EE_RESSTR(RID_SVXITEMS_WIDOWS_COMPLETE) + " " + EE_RESSTR(RID_SVXITEMS_LINES); } default: @@ -596,7 +594,7 @@ SfxItemPresentation SvxWidowsItem::GetPresentation } } - rText.SearchAndReplace( rtl::OUString("%1"), String::CreateFromInt32( GetValue() ) ); + rText = rText.replaceFirst( "%1", OUString::number( GetValue() ) ); return ePres; } @@ -638,14 +636,14 @@ SfxItemPresentation SvxOrphansItem::GetPresentation SfxItemPresentation ePres, SfxMapUnit /*eCoreUnit*/, SfxMapUnit /*ePresUnit*/, - XubString& rText, const IntlWrapper * + OUString& rText, const IntlWrapper * ) const { switch ( ePres ) { case SFX_ITEM_PRESENTATION_NONE: { - rText.Erase(); + rText = OUString(); break; } @@ -657,9 +655,7 @@ SfxItemPresentation SvxOrphansItem::GetPresentation case SFX_ITEM_PRESENTATION_COMPLETE: { - rText = EE_RESSTR(RID_SVXITEMS_ORPHANS_COMPLETE); - rText += ' '; - rText += EE_RESSTR(RID_SVXITEMS_LINES); + rText = EE_RESSTR(RID_SVXITEMS_ORPHANS_COMPLETE) + " " + EE_RESSTR(RID_SVXITEMS_LINES); } default: @@ -668,7 +664,7 @@ SfxItemPresentation SvxOrphansItem::GetPresentation } } - rText.SearchAndReplace( rtl::OUString("%1"), String::CreateFromInt32( GetValue() ) ); + rText = rText.replaceFirst( "%1", OUString::number( GetValue() ) ); return ePres; } @@ -759,13 +755,14 @@ SfxItemPresentation SvxHyphenZoneItem::GetPresentation SfxItemPresentation ePres, SfxMapUnit /*eCoreUnit*/, SfxMapUnit /*ePresUnit*/, - XubString& rText, const IntlWrapper * + OUString& rText, const IntlWrapper * ) const { + OUString cpDelimTmp(cpDelim); switch ( ePres ) { case SFX_ITEM_PRESENTATION_NONE: - rText.Erase(); + rText = OUString(); return SFX_ITEM_PRESENTATION_NONE; case SFX_ITEM_PRESENTATION_NAMELESS: { @@ -773,19 +770,15 @@ SfxItemPresentation SvxHyphenZoneItem::GetPresentation if ( bHyphen ) nId = RID_SVXITEMS_HYPHEN_TRUE; - rText = EE_RESSTR(nId); - rText += cpDelim; + rText = EE_RESSTR(nId) + cpDelimTmp; nId = RID_SVXITEMS_PAGE_END_FALSE; if ( bPageEnd ) nId = RID_SVXITEMS_PAGE_END_TRUE; - rText += EE_RESSTR(nId); - rText += cpDelim; - rText += String::CreateFromInt32( nMinLead ); - rText += cpDelim; - rText += String::CreateFromInt32( nMinTrail ); - rText += cpDelim; - rText += String::CreateFromInt32( nMaxHyphens ); + rText = rText + EE_RESSTR(nId) + cpDelimTmp + + OUString::number( nMinLead ) + cpDelimTmp + + OUString::number( nMinTrail ) + cpDelimTmp + + OUString::number( nMaxHyphens ); return SFX_ITEM_PRESENTATION_COMPLETE; } case SFX_ITEM_PRESENTATION_COMPLETE: @@ -794,22 +787,22 @@ SfxItemPresentation SvxHyphenZoneItem::GetPresentation if ( bHyphen ) nId = RID_SVXITEMS_HYPHEN_TRUE; - rText = EE_RESSTR(nId); - rText += cpDelim; + rText = EE_RESSTR(nId) + cpDelimTmp; nId = RID_SVXITEMS_PAGE_END_FALSE; if ( bPageEnd ) nId = RID_SVXITEMS_PAGE_END_TRUE; - rText += EE_RESSTR(nId); - rText += cpDelim; - rText += String::CreateFromInt32(nMinLead); - rText += EE_RESSTR(RID_SVXITEMS_HYPHEN_MINLEAD); - rText += cpDelim; - rText += String::CreateFromInt32(nMinTrail); - rText += EE_RESSTR(RID_SVXITEMS_HYPHEN_MINTRAIL); - rText += cpDelim; - rText += String::CreateFromInt32(nMaxHyphens); - rText += EE_RESSTR(RID_SVXITEMS_HYPHEN_MAX); + rText = rText + + EE_RESSTR(nId) + + cpDelimTmp + + OUString::number( nMinLead ) + + EE_RESSTR(RID_SVXITEMS_HYPHEN_MINLEAD) + + cpDelimTmp + + OUString::number( nMinTrail ) + + EE_RESSTR(RID_SVXITEMS_HYPHEN_MINTRAIL) + + cpDelimTmp + + OUString::number( nMaxHyphens ) + + EE_RESSTR(RID_SVXITEMS_HYPHEN_MAX); return SFX_ITEM_PRESENTATION_COMPLETE; } default: ;//prevent warning @@ -1128,10 +1121,10 @@ SfxItemPresentation SvxTabStopItem::GetPresentation SfxItemPresentation ePres, SfxMapUnit eCoreUnit, SfxMapUnit ePresUnit, - XubString& rText, const IntlWrapper *pIntl + OUString& rText, const IntlWrapper *pIntl ) const { - rText.Erase(); + rText = OUString(); if ( ePres > SFX_ITEM_PRESENTATION_NONE ) { @@ -1142,7 +1135,7 @@ SfxItemPresentation SvxTabStopItem::GetPresentation if ( SVX_TAB_ADJUST_DEFAULT != ((*this)[i]).GetAdjustment() ) { if ( bComma ) - rText += sal_Unicode(','); + rText += ","; rText += GetMetricText( ((*this)[i]).GetTabPos(), eCoreUnit, ePresUnit, pIntl ); if ( SFX_ITEM_PRESENTATION_COMPLETE == ePres ) @@ -1294,13 +1287,13 @@ SfxItemPresentation SvxFmtSplitItem::GetPresentation SfxItemPresentation ePres, SfxMapUnit /*eCoreUnit*/, SfxMapUnit /*ePresUnit*/, - XubString& rText, const IntlWrapper * + OUString& rText, const IntlWrapper * ) const { switch ( ePres ) { case SFX_ITEM_PRESENTATION_NONE: - rText.Erase(); + rText = OUString(); return SFX_ITEM_PRESENTATION_NONE; case SFX_ITEM_PRESENTATION_NAMELESS: case SFX_ITEM_PRESENTATION_COMPLETE: @@ -1360,10 +1353,10 @@ SfxItemPresentation SvxPageModelItem::GetPresentation SfxItemPresentation ePres, SfxMapUnit /*eCoreUnit*/, SfxMapUnit /*ePresUnit*/, - XubString& rText, const IntlWrapper * + OUString& rText, const IntlWrapper * ) const { - rText.Erase(); + rText = OUString(); bool bSet = ( GetValue().Len() > 0 ); switch ( ePres ) @@ -1379,8 +1372,7 @@ SfxItemPresentation SvxPageModelItem::GetPresentation case SFX_ITEM_PRESENTATION_COMPLETE: if ( bSet ) { - rText = EE_RESSTR(RID_SVXITEMS_PAGEMODEL_COMPLETE); - rText += GetValue(); + rText = EE_RESSTR(RID_SVXITEMS_PAGEMODEL_COMPLETE) + GetValue(); } return SFX_ITEM_PRESENTATION_COMPLETE; default: ;//prevent warning @@ -1420,12 +1412,12 @@ sal_uInt16 SvxScriptSpaceItem::GetVersion( sal_uInt16 nFFVer ) const SfxItemPresentation SvxScriptSpaceItem::GetPresentation( SfxItemPresentation ePres, SfxMapUnit /*eCoreMetric*/, SfxMapUnit /*ePresMetric*/, - String &rText, const IntlWrapper* /*pIntl*/ ) const + OUString &rText, const IntlWrapper* /*pIntl*/ ) const { switch( ePres ) { case SFX_ITEM_PRESENTATION_NONE: - rText.Erase(); + rText = OUString(); break; case SFX_ITEM_PRESENTATION_NAMELESS: case SFX_ITEM_PRESENTATION_COMPLETE: @@ -1473,12 +1465,12 @@ sal_uInt16 SvxHangingPunctuationItem::GetVersion( sal_uInt16 nFFVer ) const SfxItemPresentation SvxHangingPunctuationItem::GetPresentation( SfxItemPresentation ePres, SfxMapUnit /*eCoreMetric*/, SfxMapUnit /*ePresMetric*/, - String &rText, const IntlWrapper* /*pIntl*/ ) const + OUString &rText, const IntlWrapper* /*pIntl*/ ) const { switch( ePres ) { case SFX_ITEM_PRESENTATION_NONE: - rText.Erase(); + rText = OUString(); break; case SFX_ITEM_PRESENTATION_NAMELESS: case SFX_ITEM_PRESENTATION_COMPLETE: @@ -1526,12 +1518,12 @@ sal_uInt16 SvxForbiddenRuleItem::GetVersion( sal_uInt16 nFFVer ) const SfxItemPresentation SvxForbiddenRuleItem::GetPresentation( SfxItemPresentation ePres, SfxMapUnit /*eCoreMetric*/, SfxMapUnit /*ePresMetric*/, - String &rText, const IntlWrapper* /*pIntl*/ ) const + OUString &rText, const IntlWrapper* /*pIntl*/ ) const { switch( ePres ) { case SFX_ITEM_PRESENTATION_NONE: - rText.Erase(); + rText = OUString(); break; case SFX_ITEM_PRESENTATION_NAMELESS: case SFX_ITEM_PRESENTATION_COMPLETE: @@ -1583,12 +1575,12 @@ sal_uInt16 SvxParaVertAlignItem::GetVersion( sal_uInt16 nFFVer ) const SfxItemPresentation SvxParaVertAlignItem::GetPresentation( SfxItemPresentation ePres, SfxMapUnit /*eCoreMetric*/, SfxMapUnit /*ePresMetric*/, - String &rText, const IntlWrapper* ) const + OUString &rText, const IntlWrapper* ) const { switch( ePres ) { case SFX_ITEM_PRESENTATION_NONE: - rText.Erase(); + rText = OUString(); break; case SFX_ITEM_PRESENTATION_NAMELESS: case SFX_ITEM_PRESENTATION_COMPLETE: @@ -1668,12 +1660,12 @@ sal_uInt16 SvxParaGridItem::GetVersion( sal_uInt16 nFFVer ) const SfxItemPresentation SvxParaGridItem::GetPresentation( SfxItemPresentation ePres, SfxMapUnit /*eCoreMetric*/, SfxMapUnit /*ePresMetric*/, - String &rText, const IntlWrapper* /*pIntl*/ ) const + OUString &rText, const IntlWrapper* /*pIntl*/ ) const { switch( ePres ) { case SFX_ITEM_PRESENTATION_NONE: - rText.Erase(); + rText = OUString(); break; case SFX_ITEM_PRESENTATION_NAMELESS: case SFX_ITEM_PRESENTATION_COMPLETE: diff --git a/editeng/source/items/textitem.cxx b/editeng/source/items/textitem.cxx index d5846a098afb..a993a15bc62c 100644 --- a/editeng/source/items/textitem.cxx +++ b/editeng/source/items/textitem.cxx @@ -203,10 +203,10 @@ SfxItemPresentation SvxFontListItem::GetPresentation SfxItemPresentation /*ePres*/, SfxMapUnit /*eCoreUnit*/, SfxMapUnit /*ePresUnit*/, - XubString& rText, const IntlWrapper * /*pIntl*/ + OUString& rText, const IntlWrapper * /*pIntl*/ ) const { - rText.Erase(); + rText = OUString(); return SFX_ITEM_PRESENTATION_NONE; } @@ -448,13 +448,13 @@ SfxItemPresentation SvxFontItem::GetPresentation SfxItemPresentation ePres, SfxMapUnit /*eCoreUnit*/, SfxMapUnit /*ePresUnit*/, - XubString& rText, const IntlWrapper * /*pIntl*/ + OUString& rText, const IntlWrapper * /*pIntl*/ ) const { switch ( ePres ) { case SFX_ITEM_PRESENTATION_NONE: - rText.Erase(); + rText = OUString(); return ePres; case SFX_ITEM_PRESENTATION_NAMELESS: case SFX_ITEM_PRESENTATION_COMPLETE: @@ -517,13 +517,13 @@ SfxItemPresentation SvxPostureItem::GetPresentation SfxItemPresentation ePres, SfxMapUnit /*eCoreUnit*/, SfxMapUnit /*ePresUnit*/, - XubString& rText, const IntlWrapper * /*pIntl*/ + OUString& rText, const IntlWrapper * /*pIntl*/ ) const { switch ( ePres ) { case SFX_ITEM_PRESENTATION_NONE: - rText.Erase(); + rText = OUString(); return ePres; case SFX_ITEM_PRESENTATION_NAMELESS: case SFX_ITEM_PRESENTATION_COMPLETE: @@ -682,13 +682,13 @@ SfxItemPresentation SvxWeightItem::GetPresentation SfxItemPresentation ePres, SfxMapUnit /*eCoreUnit*/, SfxMapUnit /*ePresUnit*/, - XubString& rText, const IntlWrapper * /*pIntl*/ + OUString& rText, const IntlWrapper * /*pIntl*/ ) const { switch ( ePres ) { case SFX_ITEM_PRESENTATION_NONE: - rText.Erase(); + rText = OUString(); return ePres; case SFX_ITEM_PRESENTATION_NAMELESS: case SFX_ITEM_PRESENTATION_COMPLETE: @@ -1046,32 +1046,32 @@ SfxItemPresentation SvxFontHeightItem::GetPresentation SfxItemPresentation ePres, SfxMapUnit eCoreUnit, SfxMapUnit /*ePresUnit*/, - XubString& rText, const IntlWrapper *pIntl + OUString& rText, const IntlWrapper *pIntl ) const { switch ( ePres ) { case SFX_ITEM_PRESENTATION_NONE: - rText.Erase(); + rText = OUString(); return ePres; case SFX_ITEM_PRESENTATION_NAMELESS: case SFX_ITEM_PRESENTATION_COMPLETE: { if( SFX_MAPUNIT_RELATIVE != ePropUnit ) { - ( rText = String::CreateFromInt32( (short)nProp ) ) += + rText = OUString::number( (short)nProp ) + EE_RESSTR( GetMetricId( ePropUnit ) ); if( 0 <= (short)nProp ) - rText.Insert( sal_Unicode('+'), 0 ); + rText = "+" + rText; } else if( 100 == nProp ) { rText = GetMetricText( (long)nHeight, - eCoreUnit, SFX_MAPUNIT_POINT, pIntl ); - rText += EE_RESSTR(GetMetricId(SFX_MAPUNIT_POINT)); + eCoreUnit, SFX_MAPUNIT_POINT, pIntl ) + + EE_RESSTR(GetMetricId(SFX_MAPUNIT_POINT)); } else - ( rText = String::CreateFromInt32( nProp )) += sal_Unicode('%'); + rText = OUString::number( nProp ) + "%"; return ePres; } default: ; //prevent warning @@ -1247,13 +1247,13 @@ SfxItemPresentation SvxFontWidthItem::GetPresentation SfxItemPresentation ePres, SfxMapUnit eCoreUnit, SfxMapUnit /*ePresUnit*/, - XubString& rText, const IntlWrapper *pIntl + OUString& rText, const IntlWrapper *pIntl ) const { switch ( ePres ) { case SFX_ITEM_PRESENTATION_NONE: - rText.Erase(); + rText = OUString(); return ePres; case SFX_ITEM_PRESENTATION_NAMELESS: case SFX_ITEM_PRESENTATION_COMPLETE: @@ -1261,11 +1261,11 @@ SfxItemPresentation SvxFontWidthItem::GetPresentation if ( 100 == nProp ) { rText = GetMetricText( (long)nWidth, - eCoreUnit, SFX_MAPUNIT_POINT, pIntl ); - rText += EE_RESSTR(GetMetricId(SFX_MAPUNIT_POINT)); + eCoreUnit, SFX_MAPUNIT_POINT, pIntl ) + + EE_RESSTR(GetMetricId(SFX_MAPUNIT_POINT)); } else - ( rText = String::CreateFromInt32( nProp )) += sal_Unicode('%'); + rText = OUString::number( nProp ) + "%"; return ePres; } default: ; //prevent warning @@ -1341,19 +1341,19 @@ SfxItemPresentation SvxTextLineItem::GetPresentation SfxItemPresentation ePres, SfxMapUnit /*eCoreUnit*/, SfxMapUnit /*ePresUnit*/, - XubString& rText, const IntlWrapper * /*pIntl*/ + OUString& rText, const IntlWrapper * /*pIntl*/ ) const { switch ( ePres ) { case SFX_ITEM_PRESENTATION_NONE: - rText.Erase(); + rText = OUString(); return ePres; case SFX_ITEM_PRESENTATION_NAMELESS: case SFX_ITEM_PRESENTATION_COMPLETE: rText = GetValueTextByPos( GetValue() ); if( !mColor.GetTransparency() ) - ( rText += cpDelim ) += ::GetColorString( mColor ); + rText = rText + OUString(cpDelim) + ::GetColorString( mColor ); return ePres; default: ; //prevent warning } @@ -1569,13 +1569,13 @@ SfxItemPresentation SvxCrossedOutItem::GetPresentation SfxItemPresentation ePres, SfxMapUnit /*eCoreUnit*/, SfxMapUnit /*ePresUnit*/, - XubString& rText, const IntlWrapper * /*pIntl*/ + OUString& rText, const IntlWrapper * /*pIntl*/ ) const { switch ( ePres ) { case SFX_ITEM_PRESENTATION_NONE: - rText.Erase(); + rText = OUString(); return ePres; case SFX_ITEM_PRESENTATION_NAMELESS: case SFX_ITEM_PRESENTATION_COMPLETE: @@ -1666,13 +1666,13 @@ SfxItemPresentation SvxShadowedItem::GetPresentation SfxItemPresentation ePres, SfxMapUnit /*eCoreUnit*/, SfxMapUnit /*ePresUnit*/, - XubString& rText, const IntlWrapper * /*pIntl*/ + OUString& rText, const IntlWrapper * /*pIntl*/ ) const { switch ( ePres ) { case SFX_ITEM_PRESENTATION_NONE: - rText.Erase(); + rText = OUString(); return ePres; case SFX_ITEM_PRESENTATION_NAMELESS: case SFX_ITEM_PRESENTATION_COMPLETE: @@ -1727,13 +1727,13 @@ SfxItemPresentation SvxAutoKernItem::GetPresentation SfxItemPresentation ePres, SfxMapUnit /*eCoreUnit*/, SfxMapUnit /*ePresUnit*/, - XubString& rText, const IntlWrapper * /*pIntl*/ + OUString& rText, const IntlWrapper * /*pIntl*/ ) const { switch ( ePres ) { case SFX_ITEM_PRESENTATION_NONE: - rText.Erase(); + rText = OUString(); return ePres; case SFX_ITEM_PRESENTATION_NAMELESS: case SFX_ITEM_PRESENTATION_COMPLETE: @@ -1789,13 +1789,13 @@ SfxItemPresentation SvxWordLineModeItem::GetPresentation SfxItemPresentation ePres, SfxMapUnit /*eCoreUnit*/, SfxMapUnit /*ePresUnit*/, - XubString& rText, const IntlWrapper * /*pIntl*/ + OUString& rText, const IntlWrapper * /*pIntl*/ ) const { switch ( ePres ) { case SFX_ITEM_PRESENTATION_NONE: - rText.Erase(); + rText = OUString(); return ePres; case SFX_ITEM_PRESENTATION_NAMELESS: case SFX_ITEM_PRESENTATION_COMPLETE: @@ -1850,13 +1850,13 @@ SfxItemPresentation SvxContourItem::GetPresentation SfxItemPresentation ePres, SfxMapUnit /*eCoreUnit*/, SfxMapUnit /*ePresUnit*/, - XubString& rText, const IntlWrapper * /*pIntl*/ + OUString& rText, const IntlWrapper * /*pIntl*/ ) const { switch ( ePres ) { case SFX_ITEM_PRESENTATION_NONE: - rText.Erase(); + rText = OUString(); return ePres; case SFX_ITEM_PRESENTATION_NAMELESS: case SFX_ITEM_PRESENTATION_COMPLETE: @@ -1911,10 +1911,10 @@ SfxItemPresentation SvxPropSizeItem::GetPresentation SfxItemPresentation /*ePres*/, SfxMapUnit /*eCoreUnit*/, SfxMapUnit /*ePresUnit*/, - XubString& rText, const IntlWrapper * /*pIntl*/ + OUString& rText, const IntlWrapper * /*pIntl*/ ) const { - rText.Erase(); + rText = OUString(); return SFX_ITEM_PRESENTATION_NONE; } @@ -2030,13 +2030,13 @@ SfxItemPresentation SvxColorItem::GetPresentation SfxItemPresentation ePres, SfxMapUnit /*eCoreUnit*/, SfxMapUnit /*ePresUnit*/, - XubString& rText, const IntlWrapper * /*pIntl*/ + OUString& rText, const IntlWrapper * /*pIntl*/ ) const { switch ( ePres ) { case SFX_ITEM_PRESENTATION_NONE: - rText.Erase(); + rText = OUString(); return ePres; case SFX_ITEM_PRESENTATION_NAMELESS: case SFX_ITEM_PRESENTATION_COMPLETE: @@ -2107,10 +2107,10 @@ SfxItemPresentation SvxCharSetColorItem::GetPresentation SfxItemPresentation /*ePres*/, SfxMapUnit /*eCoreUnit*/, SfxMapUnit /*ePresUnit*/, - XubString& rText, const IntlWrapper * /*pIntl*/ + OUString& rText, const IntlWrapper * /*pIntl*/ ) const { - rText.Erase(); + rText = OUString(); return SFX_ITEM_PRESENTATION_NONE; } @@ -2167,17 +2167,17 @@ SfxItemPresentation SvxKerningItem::GetPresentation SfxItemPresentation ePres, SfxMapUnit eCoreUnit, SfxMapUnit /*ePresUnit*/, - XubString& rText, const IntlWrapper *pIntl + OUString& rText, const IntlWrapper *pIntl ) const { switch ( ePres ) { case SFX_ITEM_PRESENTATION_NONE: - rText.Erase(); + rText = OUString(); return ePres; case SFX_ITEM_PRESENTATION_NAMELESS: - rText = GetMetricText( (long)GetValue(), eCoreUnit, SFX_MAPUNIT_POINT, pIntl ); - rText += EE_RESSTR(GetMetricId(SFX_MAPUNIT_POINT)); + rText = GetMetricText( (long)GetValue(), eCoreUnit, SFX_MAPUNIT_POINT, pIntl ) + + EE_RESSTR(GetMetricId(SFX_MAPUNIT_POINT)); return ePres; case SFX_ITEM_PRESENTATION_COMPLETE: { @@ -2191,8 +2191,9 @@ SfxItemPresentation SvxKerningItem::GetPresentation if ( nId ) rText += EE_RESSTR(nId); - rText += GetMetricText( (long)GetValue(), eCoreUnit, SFX_MAPUNIT_POINT, pIntl ); - rText += EE_RESSTR(GetMetricId(SFX_MAPUNIT_POINT)); + rText = rText + + GetMetricText( (long)GetValue(), eCoreUnit, SFX_MAPUNIT_POINT, pIntl ) + + EE_RESSTR(GetMetricId(SFX_MAPUNIT_POINT)); return ePres; } default: ; //prevent warning @@ -2265,13 +2266,13 @@ SfxItemPresentation SvxCaseMapItem::GetPresentation SfxItemPresentation ePres, SfxMapUnit /*eCoreUnit*/, SfxMapUnit /*ePresUnit*/, - XubString& rText, const IntlWrapper * /*pIntl*/ + OUString& rText, const IntlWrapper * /*pIntl*/ ) const { switch ( ePres ) { case SFX_ITEM_PRESENTATION_NONE: - rText.Erase(); + rText = OUString(); return ePres; case SFX_ITEM_PRESENTATION_NAMELESS: case SFX_ITEM_PRESENTATION_COMPLETE: @@ -2413,13 +2414,13 @@ SfxItemPresentation SvxEscapementItem::GetPresentation SfxItemPresentation ePres, SfxMapUnit /*eCoreUnit*/, SfxMapUnit /*ePresUnit*/, - XubString& rText, const IntlWrapper * /*pIntl*/ + OUString& rText, const IntlWrapper * /*pIntl*/ ) const { switch ( ePres ) { case SFX_ITEM_PRESENTATION_NONE: - rText.Erase(); + rText = OUString(); return ePres; case SFX_ITEM_PRESENTATION_NAMELESS: case SFX_ITEM_PRESENTATION_COMPLETE: @@ -2429,9 +2430,9 @@ SfxItemPresentation SvxEscapementItem::GetPresentation if ( nEsc != 0 ) { if( DFLT_ESC_AUTO_SUPER == nEsc || DFLT_ESC_AUTO_SUB == nEsc ) - rText += String( EE_RESSTR(RID_SVXITEMS_ESCAPEMENT_AUTO) ); + rText += EE_RESSTR(RID_SVXITEMS_ESCAPEMENT_AUTO); else - ( rText += String::CreateFromInt32( nEsc )) += sal_Unicode('%'); + rText = rText + OUString::number( nEsc ) + "%"; } return ePres; } @@ -2578,13 +2579,13 @@ SfxItemPresentation SvxLanguageItem::GetPresentation SfxItemPresentation ePres, SfxMapUnit /*eCoreUnit*/, SfxMapUnit /*ePresUnit*/, - XubString& rText, const IntlWrapper * /*pIntl*/ + OUString& rText, const IntlWrapper * /*pIntl*/ ) const { switch ( ePres ) { case SFX_ITEM_PRESENTATION_NONE: - rText.Erase(); + rText = OUString(); return ePres; case SFX_ITEM_PRESENTATION_NAMELESS: case SFX_ITEM_PRESENTATION_COMPLETE: @@ -2678,10 +2679,10 @@ SfxItemPresentation SvxNoLinebreakItem::GetPresentation SfxItemPresentation /*ePres*/, SfxMapUnit /*eCoreUnit*/, SfxMapUnit /*ePresUnit*/, - XubString& rText, const IntlWrapper * /*pIntl*/ + OUString& rText, const IntlWrapper * /*pIntl*/ ) const { - rText.Erase(); + rText = OUString(); return SFX_ITEM_PRESENTATION_NONE; } @@ -2723,10 +2724,10 @@ SfxItemPresentation SvxNoHyphenItem::GetPresentation SfxItemPresentation /*ePres*/, SfxMapUnit /*eCoreUnit*/, SfxMapUnit /*ePresUnit*/, - XubString& rText, const IntlWrapper * /*pIntl*/ + OUString& rText, const IntlWrapper * /*pIntl*/ ) const { - rText.Erase(); + rText = OUString(); return SFX_ITEM_PRESENTATION_NONE; } @@ -2764,7 +2765,7 @@ SfxItemPresentation SvxLineColorItem::GetPresentation SfxItemPresentation ePres, SfxMapUnit eCoreUnit, SfxMapUnit ePresUnit, - XubString& rText, + OUString& rText, const IntlWrapper * pIntlWrapper ) const { @@ -2811,13 +2812,13 @@ SfxItemPresentation SvxBlinkItem::GetPresentation SfxItemPresentation ePres, SfxMapUnit /*eCoreUnit*/, SfxMapUnit /*ePresUnit*/, - XubString& rText, const IntlWrapper * /*pIntl*/ + OUString& rText, const IntlWrapper * /*pIntl*/ ) const { switch ( ePres ) { case SFX_ITEM_PRESENTATION_NONE: - rText.Erase(); + rText = OUString(); return ePres; case SFX_ITEM_PRESENTATION_NAMELESS: case SFX_ITEM_PRESENTATION_COMPLETE: @@ -2874,14 +2875,14 @@ SfxItemPresentation SvxEmphasisMarkItem::GetPresentation SfxItemPresentation ePres, SfxMapUnit /*eCoreUnit*/, SfxMapUnit /*ePresUnit*/, - XubString& rText, + OUString& rText, const IntlWrapper * /*pIntl*/ ) const { switch ( ePres ) { case SFX_ITEM_PRESENTATION_NONE: - rText.Erase(); + rText = OUString(); return ePres; case SFX_ITEM_PRESENTATION_NAMELESS: case SFX_ITEM_PRESENTATION_COMPLETE: @@ -3073,12 +3074,12 @@ bool SvxTwoLinesItem::PutValue( const com::sun::star::uno::Any& rVal, SfxItemPresentation SvxTwoLinesItem::GetPresentation( SfxItemPresentation ePres, SfxMapUnit /*eCoreMetric*/, SfxMapUnit /*ePresMetric*/, - String &rText, const IntlWrapper* /*pIntl*/ ) const + OUString &rText, const IntlWrapper* /*pIntl*/ ) const { switch( ePres ) { case SFX_ITEM_PRESENTATION_NONE: - rText.Erase(); + rText = OUString(); break; case SFX_ITEM_PRESENTATION_NAMELESS: case SFX_ITEM_PRESENTATION_COMPLETE: @@ -3089,9 +3090,9 @@ SfxItemPresentation SvxTwoLinesItem::GetPresentation( SfxItemPresentation ePres, { rText = EE_RESSTR( RID_SVXITEMS_TWOLINES ); if( GetStartBracket() ) - rText.Insert( GetStartBracket(), 0 ); + rText = OUString(GetStartBracket()) + rText; if( GetEndBracket() ) - rText += GetEndBracket(); + rText += OUString(GetEndBracket()); } return ePres; } @@ -3165,12 +3166,12 @@ sal_uInt16 SvxCharRotateItem::GetVersion( sal_uInt16 nFFVer ) const SfxItemPresentation SvxCharRotateItem::GetPresentation( SfxItemPresentation ePres, SfxMapUnit /*eCoreMetric*/, SfxMapUnit /*ePresMetric*/, - String &rText, const IntlWrapper* ) const + OUString &rText, const IntlWrapper* ) const { switch( ePres ) { case SFX_ITEM_PRESENTATION_NONE: - rText.Erase(); + rText = OUString(); break; case SFX_ITEM_PRESENTATION_NAMELESS: case SFX_ITEM_PRESENTATION_COMPLETE: @@ -3180,8 +3181,8 @@ SfxItemPresentation SvxCharRotateItem::GetPresentation( else { rText = EE_RESSTR( RID_SVXITEMS_CHARROTATE ); - rText.SearchAndReplaceAscii( "$(ARG1)", - String::CreateFromInt32( GetValue() / 10 )); + rText = rText.replaceFirst( "$(ARG1)", + OUString::number( GetValue() / 10 )); if( IsFitToLine() ) rText += EE_RESSTR( RID_SVXITEMS_CHARROTATE_FITLINE ); } @@ -3308,12 +3309,12 @@ sal_uInt16 SvxCharScaleWidthItem::GetVersion( sal_uInt16 nFFVer ) const SfxItemPresentation SvxCharScaleWidthItem::GetPresentation( SfxItemPresentation ePres, SfxMapUnit /*eCoreMetric*/, SfxMapUnit /*ePresMetric*/, - String &rText, const IntlWrapper* ) const + OUString &rText, const IntlWrapper* ) const { switch( ePres ) { case SFX_ITEM_PRESENTATION_NONE: - rText.Erase(); + rText = OUString(); break; case SFX_ITEM_PRESENTATION_NAMELESS: case SFX_ITEM_PRESENTATION_COMPLETE: @@ -3323,8 +3324,8 @@ SfxItemPresentation SvxCharScaleWidthItem::GetPresentation( else { rText = EE_RESSTR( RID_SVXITEMS_CHARSCALE ); - rText.SearchAndReplaceAscii( "$(ARG1)", - String::CreateFromInt32( GetValue() )); + rText = rText.replaceFirst( "$(ARG1)", + OUString::number( GetValue() )); } return ePres; } @@ -3407,14 +3408,14 @@ SfxItemPresentation SvxCharReliefItem::GetPresentation SfxItemPresentation ePres, SfxMapUnit /*eCoreUnit*/, SfxMapUnit /*ePresUnit*/, - XubString& rText, const IntlWrapper * /*pIntl*/ + OUString& rText, const IntlWrapper * /*pIntl*/ ) const { SfxItemPresentation eRet = ePres; switch( ePres ) { case SFX_ITEM_PRESENTATION_NONE: - rText.Erase(); + rText = OUString(); break; case SFX_ITEM_PRESENTATION_NAMELESS: diff --git a/editeng/source/items/writingmodeitem.cxx b/editeng/source/items/writingmodeitem.cxx index a1cc20295939..3cca42722668 100644 --- a/editeng/source/items/writingmodeitem.cxx +++ b/editeng/source/items/writingmodeitem.cxx @@ -68,14 +68,14 @@ sal_uInt16 SvxWritingModeItem::GetVersion( sal_uInt16 /*nFVer*/ ) const SfxItemPresentation SvxWritingModeItem::GetPresentation( SfxItemPresentation ePres, SfxMapUnit /*eCoreMetric*/, SfxMapUnit /*ePresMetric*/, - String &rText, + OUString &rText, const IntlWrapper * ) const { SfxItemPresentation eRet = ePres; switch( ePres ) { case SFX_ITEM_PRESENTATION_NONE: - rText.Erase(); + rText = OUString(); break; case SFX_ITEM_PRESENTATION_NAMELESS: diff --git a/editeng/source/items/xmlcnitm.cxx b/editeng/source/items/xmlcnitm.cxx index 99566fee6704..8f04dc78238e 100644 --- a/editeng/source/items/xmlcnitm.cxx +++ b/editeng/source/items/xmlcnitm.cxx @@ -67,7 +67,7 @@ SfxItemPresentation SvXMLAttrContainerItem::GetPresentation( SfxItemPresentation /*ePresentation*/, SfxMapUnit /*eCoreMetric*/, SfxMapUnit /*ePresentationMetric*/, - XubString &/*rText*/, + OUString & /*rText*/, const IntlWrapper * /*pIntlWrapper*/ ) const { return SFX_ITEM_PRESENTATION_NONE; |