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 /svx/source/xoutdev | |
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 'svx/source/xoutdev')
-rw-r--r-- | svx/source/xoutdev/xattr.cxx | 86 | ||||
-rw-r--r-- | svx/source/xoutdev/xattr2.cxx | 79 | ||||
-rw-r--r-- | svx/source/xoutdev/xattrbmp.cxx | 10 |
3 files changed, 85 insertions, 90 deletions
diff --git a/svx/source/xoutdev/xattr.cxx b/svx/source/xoutdev/xattr.cxx index e2e8a15a94d8..d16b8f5f1b1e 100644 --- a/svx/source/xoutdev/xattr.cxx +++ b/svx/source/xoutdev/xattr.cxx @@ -506,10 +506,10 @@ SfxItemPresentation XLineStyleItem::GetPresentation SfxItemPresentation ePres, SfxMapUnit /*eCoreUnit*/, SfxMapUnit /*ePresUnit*/, - XubString& rText, const IntlWrapper * + OUString& rText, const IntlWrapper * ) const { - rText.Erase(); + rText = OUString(); switch ( ePres ) { @@ -934,13 +934,13 @@ SfxItemPresentation XLineDashItem::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: case SFX_ITEM_PRESENTATION_COMPLETE: @@ -1295,19 +1295,19 @@ SfxItemPresentation XLineWidthItem::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 = GetMetricText( (long) GetValue(), - eCoreUnit, ePresUnit, pIntl); - rText += SVX_RESSTR( GetMetricId( ePresUnit) ); + eCoreUnit, ePresUnit, pIntl) + + SVX_RESSTR( GetMetricId( ePresUnit) ); return ePres; default: return SFX_ITEM_PRESENTATION_NONE; @@ -1402,13 +1402,13 @@ SfxItemPresentation XLineColorItem::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: case SFX_ITEM_PRESENTATION_COMPLETE: @@ -1671,13 +1671,13 @@ SfxItemPresentation XLineStartItem::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: case SFX_ITEM_PRESENTATION_COMPLETE: @@ -2318,13 +2318,13 @@ SfxItemPresentation XLineEndItem::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: case SFX_ITEM_PRESENTATION_COMPLETE: @@ -2440,19 +2440,19 @@ SfxItemPresentation XLineStartWidthItem::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 = GetMetricText( (long) GetValue(), - eCoreUnit, ePresUnit, pIntl); - rText += SVX_RESSTR( GetMetricId( ePresUnit) ); + eCoreUnit, ePresUnit, pIntl) + + SVX_RESSTR( GetMetricId( ePresUnit) ); return ePres; default: return SFX_ITEM_PRESENTATION_NONE; @@ -2531,19 +2531,19 @@ SfxItemPresentation XLineEndWidthItem::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 = GetMetricText( (long) GetValue(), - eCoreUnit, ePresUnit, pIntl); - rText += SVX_RESSTR( GetMetricId( ePresUnit) ); + eCoreUnit, ePresUnit, pIntl) + + SVX_RESSTR( GetMetricId( ePresUnit) ); return ePres; default: return SFX_ITEM_PRESENTATION_NONE; @@ -2622,17 +2622,17 @@ SfxItemPresentation XLineStartCenterItem::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: case SFX_ITEM_PRESENTATION_COMPLETE: - rText = XubString( ResId( GetValue() ? RID_SVXSTR_CENTERED : + rText = OUString( ResId( GetValue() ? RID_SVXSTR_CENTERED : RID_SVXSTR_NOTCENTERED, DIALOG_MGR() ) ); return ePres; default: @@ -2714,17 +2714,17 @@ SfxItemPresentation XLineEndCenterItem::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: case SFX_ITEM_PRESENTATION_COMPLETE: - rText = XubString( ResId( GetValue() ? RID_SVXSTR_CENTERED : + rText = OUString( ResId( GetValue() ? RID_SVXSTR_CENTERED : RID_SVXSTR_NOTCENTERED, DIALOG_MGR() ) ); return ePres; default: @@ -2814,10 +2814,10 @@ SfxItemPresentation XFillStyleItem::GetPresentation SfxItemPresentation ePres, SfxMapUnit /*eCoreUnit*/, SfxMapUnit /*ePresUnit*/, - XubString& rText, const IntlWrapper * + OUString& rText, const IntlWrapper * ) const { - rText.Erase(); + rText = OUString(); switch ( ePres ) { @@ -2960,13 +2960,13 @@ SfxItemPresentation XFillColorItem::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: case SFX_ITEM_PRESENTATION_COMPLETE: @@ -3034,13 +3034,13 @@ SfxItemPresentation XSecondaryFillColorItem::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: case SFX_ITEM_PRESENTATION_COMPLETE: @@ -3162,10 +3162,10 @@ XFillGradientItem::XFillGradientItem(sal_Int32 nIndex, |* *************************************************************************/ -XFillGradientItem::XFillGradientItem(const XubString& rName, - const XGradient& rTheGradient, sal_uInt16 nWhich_) : - NameOrIndex(nWhich_, rName), - aGradient(rTheGradient) +XFillGradientItem::XFillGradientItem(const OUString& rName, + const XGradient& rTheGradient, sal_uInt16 nWhich) + : NameOrIndex(nWhich, rName) + , aGradient(rTheGradient) { } @@ -3344,13 +3344,13 @@ SfxItemPresentation XFillGradientItem::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: case SFX_ITEM_PRESENTATION_COMPLETE: @@ -3691,7 +3691,7 @@ bool XFillFloatTransparenceItem::PutValue( const ::com::sun::star::uno::Any& rVa SfxItemPresentation XFillFloatTransparenceItem::GetPresentation( SfxItemPresentation ePres, SfxMapUnit eCoreUnit, SfxMapUnit ePresUnit, - XubString& rText, + OUString& rText, const IntlWrapper * pIntlWrapper ) const { return XFillGradientItem::GetPresentation( ePres, eCoreUnit, ePresUnit, rText, pIntlWrapper ); @@ -3923,13 +3923,13 @@ SfxItemPresentation XFillHatchItem::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: case SFX_ITEM_PRESENTATION_COMPLETE: diff --git a/svx/source/xoutdev/xattr2.cxx b/svx/source/xoutdev/xattr2.cxx index 64e2ed82c8b6..5e2fa6ba2a2d 100644 --- a/svx/source/xoutdev/xattr2.cxx +++ b/svx/source/xoutdev/xattr2.cxx @@ -86,21 +86,19 @@ SfxItemPresentation XLineTransparenceItem::GetPresentation SfxItemPresentation ePres, SfxMapUnit /*eCoreUnit*/, SfxMapUnit /*ePresUnit*/, - XubString& rText, const IntlWrapper * + OUString& rText, const IntlWrapper * ) const { - rText.Erase(); + rText = OUString(); switch ( ePres ) { case SFX_ITEM_PRESENTATION_NONE: return ePres; case SFX_ITEM_PRESENTATION_COMPLETE: - rText = XubString( ResId( RID_SVXSTR_TRANSPARENCE, DIALOG_MGR() ) ); - rText.AppendAscii(": "); + rText = OUString( ResId( RID_SVXSTR_TRANSPARENCE, DIALOG_MGR() ) ) + ": "; case SFX_ITEM_PRESENTATION_NAMELESS: - rText += OUString::number(GetValue()); - rText += sal_Unicode('%'); + rText = rText + OUString::number( GetValue() ) + "%"; return ePres; default: return SFX_ITEM_PRESENTATION_NONE; @@ -156,9 +154,9 @@ SfxPoolItem* XLineJointItem::Clone(SfxItemPool* /*pPool*/) const // ----------------------------------------------------------------------------- SfxItemPresentation XLineJointItem::GetPresentation( SfxItemPresentation ePres, SfxMapUnit /*eCoreUnit*/, - SfxMapUnit /*ePresUnit*/, XubString& rText, const IntlWrapper*) const + SfxMapUnit /*ePresUnit*/, OUString& rText, const IntlWrapper*) const { - rText.Erase(); + rText = OUString(); switch( ePres ) { @@ -331,9 +329,9 @@ SfxPoolItem* XLineCapItem::Clone(SfxItemPool* /*pPool*/) const // ----------------------------------------------------------------------------- SfxItemPresentation XLineCapItem::GetPresentation( SfxItemPresentation ePres, SfxMapUnit /*eCoreUnit*/, - SfxMapUnit /*ePresUnit*/, XubString& rText, const IntlWrapper*) const + SfxMapUnit /*ePresUnit*/, OUString& rText, const IntlWrapper*) const { - rText.Erase(); + rText = OUString(); switch( ePres ) { @@ -482,21 +480,19 @@ SfxItemPresentation XFillTransparenceItem::GetPresentation SfxItemPresentation ePres, SfxMapUnit /*eCoreUnit*/, SfxMapUnit /*ePresUnit*/, - XubString& rText, const IntlWrapper * + OUString& rText, const IntlWrapper * ) const { - rText.Erase(); + rText = OUString(); switch ( ePres ) { case SFX_ITEM_PRESENTATION_NONE: return ePres; case SFX_ITEM_PRESENTATION_COMPLETE: - rText = XubString( ResId( RID_SVXSTR_TRANSPARENCE, DIALOG_MGR() ) ); - rText.AppendAscii(": "); + rText = OUString( ResId( RID_SVXSTR_TRANSPARENCE, DIALOG_MGR() ) ) + ": "; case SFX_ITEM_PRESENTATION_NAMELESS: - rText += OUString::number(GetValue()); - rText += sal_Unicode('%'); + rText = rText + OUString::number( GetValue() ) + "%"; return ePres; default: return SFX_ITEM_PRESENTATION_NONE; @@ -609,18 +605,17 @@ SfxItemPresentation XGradientStepCountItem::GetPresentation SfxItemPresentation ePres, SfxMapUnit /*eCoreUnit*/, SfxMapUnit /*ePresUnit*/, - XubString& rText, const IntlWrapper * + OUString& rText, const IntlWrapper * ) const { - rText.Erase(); + rText = OUString(); switch ( ePres ) { case SFX_ITEM_PRESENTATION_NONE: return ePres; case SFX_ITEM_PRESENTATION_COMPLETE: -// rText = XubString( ResId( RID_SVXSTR_GRADIENTSTEPCOUNT, DIALOG_MGR() ) ); -// rText += ": "; +// rText = OUString( ResId( RID_SVXSTR_GRADIENTSTEPCOUNT, DIALOG_MGR() ) ) + ": "; case SFX_ITEM_PRESENTATION_NAMELESS: rText += OUString::number(GetValue()); return ePres; @@ -660,10 +655,10 @@ SfxItemPresentation XFillBmpTileItem::GetPresentation SfxItemPresentation ePres, SfxMapUnit /*eCoreUnit*/, SfxMapUnit /*ePresUnit*/, - XubString& rText, const IntlWrapper * + OUString& rText, const IntlWrapper * ) const { - rText.Erase(); + rText = OUString(); switch ( ePres ) { @@ -708,10 +703,10 @@ SfxItemPresentation XFillBmpPosItem::GetPresentation SfxItemPresentation ePres, SfxMapUnit /*eCoreUnit*/, SfxMapUnit /*ePresUnit*/, - XubString& rText, const IntlWrapper * + OUString& rText, const IntlWrapper * ) const { - rText.Erase(); + rText = OUString(); switch ( ePres ) { @@ -761,10 +756,10 @@ SfxItemPresentation XFillBmpSizeXItem::GetPresentation SfxItemPresentation ePres, SfxMapUnit /*eCoreUnit*/, SfxMapUnit /*ePresUnit*/, - XubString& rText, const IntlWrapper * + OUString& rText, const IntlWrapper * ) const { - rText.Erase(); + rText = OUString(); switch ( ePres ) { @@ -814,10 +809,10 @@ SfxItemPresentation XFillBmpSizeYItem::GetPresentation SfxItemPresentation ePres, SfxMapUnit /*eCoreUnit*/, SfxMapUnit /*ePresUnit*/, - XubString& rText, const IntlWrapper * + OUString& rText, const IntlWrapper * ) const { - rText.Erase(); + rText = OUString(); switch ( ePres ) { @@ -867,10 +862,10 @@ SfxItemPresentation XFillBmpSizeLogItem::GetPresentation SfxItemPresentation ePres, SfxMapUnit /*eCoreUnit*/, SfxMapUnit /*ePresUnit*/, - XubString& rText, const IntlWrapper * + OUString& rText, const IntlWrapper * ) const { - rText.Erase(); + rText = OUString(); switch ( ePres ) { @@ -915,10 +910,10 @@ SfxItemPresentation XFillBmpTileOffsetXItem::GetPresentation SfxItemPresentation ePres, SfxMapUnit /*eCoreUnit*/, SfxMapUnit /*ePresUnit*/, - XubString& rText, const IntlWrapper * + OUString& rText, const IntlWrapper * ) const { - rText.Erase(); + rText = OUString(); switch ( ePres ) { @@ -963,10 +958,10 @@ SfxItemPresentation XFillBmpTileOffsetYItem::GetPresentation SfxItemPresentation ePres, SfxMapUnit /*eCoreUnit*/, SfxMapUnit /*ePresUnit*/, - XubString& rText, const IntlWrapper * + OUString& rText, const IntlWrapper * ) const { - rText.Erase(); + rText = OUString(); switch ( ePres ) { @@ -1011,10 +1006,10 @@ SfxItemPresentation XFillBmpStretchItem::GetPresentation SfxItemPresentation ePres, SfxMapUnit /*eCoreUnit*/, SfxMapUnit /*ePresUnit*/, - XubString& rText, const IntlWrapper * + OUString& rText, const IntlWrapper * ) const { - rText.Erase(); + rText = OUString(); switch ( ePres ) { @@ -1059,10 +1054,10 @@ SfxItemPresentation XFillBmpPosOffsetXItem::GetPresentation SfxItemPresentation ePres, SfxMapUnit /*eCoreUnit*/, SfxMapUnit /*ePresUnit*/, - XubString& rText, const IntlWrapper * + OUString& rText, const IntlWrapper * ) const { - rText.Erase(); + rText = OUString(); switch ( ePres ) { @@ -1107,10 +1102,10 @@ SfxItemPresentation XFillBmpPosOffsetYItem::GetPresentation SfxItemPresentation ePres, SfxMapUnit /*eCoreUnit*/, SfxMapUnit /*ePresUnit*/, - XubString& rText, const IntlWrapper * + OUString& rText, const IntlWrapper * ) const { - rText.Erase(); + rText = OUString(); switch ( ePres ) { @@ -1176,9 +1171,9 @@ SfxPoolItem* XFillBackgroundItem::Create(SvStream& rIn, sal_uInt16 /*nVer*/) con //------------------------------------------------------------------------ SfxItemPresentation XFillBackgroundItem::GetPresentation( SfxItemPresentation ePres, SfxMapUnit /*eCoreUnit*/, - SfxMapUnit /*ePresUnit*/, XubString& rText, const IntlWrapper*) const + SfxMapUnit /*ePresUnit*/, OUString& rText, const IntlWrapper*) const { - rText.Erase(); + rText = OUString(); switch( ePres ) { diff --git a/svx/source/xoutdev/xattrbmp.cxx b/svx/source/xoutdev/xattrbmp.cxx index 8b8a34dc5ea6..ad524bbe7b37 100644 --- a/svx/source/xoutdev/xattrbmp.cxx +++ b/svx/source/xoutdev/xattrbmp.cxx @@ -583,13 +583,13 @@ SfxItemPresentation XFillBitmapItem::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: case SFX_ITEM_PRESENTATION_COMPLETE: @@ -608,11 +608,11 @@ bool XFillBitmapItem::QueryValue( ::com::sun::star::uno::Any& rVal, sal_uInt8 nM nMemberId &= ~CONVERT_TWIPS; // needed for MID_NAME - ::rtl::OUString aApiName; + OUString aApiName; // needed for complete item (MID 0) - ::rtl::OUString aInternalName; + OUString aInternalName; - ::rtl::OUString aURL; + OUString aURL; ::com::sun::star::uno::Reference< ::com::sun::star::awt::XBitmap > xBmp; if( nMemberId == MID_NAME ) |