From d2fa59e4025050c9b668ecff379d668f0db52639 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Wed, 13 Nov 2013 16:32:09 +0200 Subject: remove unnecessary sal_Unicode casts in SVX module Change-Id: I5d39af3bda3f1197fd1d706e7ef8d28b58d4851a --- svx/source/accessibility/DescriptionGenerator.cxx | 36 +++++++++++------------ svx/source/accessibility/lookupcolorname.cxx | 2 +- svx/source/dialog/relfld.cxx | 4 +-- svx/source/svdraw/svdattr.cxx | 2 +- svx/source/svdraw/svdibrow.cxx | 10 +++---- svx/source/svdraw/svdmodel.cxx | 10 +++---- svx/source/svdraw/svdocirc.cxx | 4 +-- svx/source/svdraw/svdorect.cxx | 2 +- 8 files changed, 35 insertions(+), 35 deletions(-) diff --git a/svx/source/accessibility/DescriptionGenerator.cxx b/svx/source/accessibility/DescriptionGenerator.cxx index 1656a21caafb..f77314abd58f 100644 --- a/svx/source/accessibility/DescriptionGenerator.cxx +++ b/svx/source/accessibility/DescriptionGenerator.cxx @@ -96,12 +96,12 @@ void DescriptionGenerator::Initialize (OUString sPrefix) { SolarMutexGuard aGuard; - msDescription.append (sal_Unicode (' ')); - msDescription.append (OUString (SVX_RESSTR(RID_SVXSTR_A11Y_WITH))); - msDescription.append (sal_Unicode (' ')); + msDescription.append(' '); + msDescription.append(OUString (SVX_RESSTR(RID_SVXSTR_A11Y_WITH))); + msDescription.append(' '); - msDescription.append (OUString (SVX_RESSTR (RID_SVXSTR_A11Y_STYLE))); - msDescription.append (sal_Unicode ('=')); + msDescription.append(OUString (SVX_RESSTR (RID_SVXSTR_A11Y_STYLE))); + msDescription.append('='); } try @@ -128,7 +128,7 @@ void DescriptionGenerator::Initialize (OUString sPrefix) OUString DescriptionGenerator::operator() (void) { - msDescription.append (sal_Unicode ('.')); + msDescription.append('.'); return msDescription.makeStringAndClear(); } @@ -162,14 +162,14 @@ void DescriptionGenerator::AddProperty (const OUString& sPropertyName, { // Append a separator from previous Properties. if ( ! mbIsFirstProperty) - msDescription.append (sal_Unicode (',')); + msDescription.append(','); else { SolarMutexGuard aGuard; - msDescription.append (sal_Unicode (' ')); - msDescription.append (OUString (SVX_RESSTR(RID_SVXSTR_A11Y_AND))); - msDescription.append (sal_Unicode (' ')); + msDescription.append(' '); + msDescription.append(OUString (SVX_RESSTR(RID_SVXSTR_A11Y_AND))); + msDescription.append(' '); mbIsFirstProperty = false; } @@ -251,8 +251,8 @@ void DescriptionGenerator::AddTextProperties (void) void DescriptionGenerator::AddColor (const OUString& sPropertyName, const OUString& sLocalizedName) { - msDescription.append (sLocalizedName); - msDescription.append (sal_Unicode('=')); + msDescription.append(sLocalizedName); + msDescription.append('='); try { @@ -278,8 +278,8 @@ void DescriptionGenerator::AddColor (const OUString& sPropertyName, void DescriptionGenerator::AddInteger (const OUString& sPropertyName, const OUString& sLocalizedName) { - msDescription.append (sLocalizedName); - msDescription.append (sal_Unicode('=')); + msDescription.append(sLocalizedName); + msDescription.append('='); try { @@ -303,8 +303,8 @@ void DescriptionGenerator::AddInteger (const OUString& sPropertyName, void DescriptionGenerator::AddString (const OUString& sPropertyName, const OUString& sLocalizedName, long nWhichId) { - msDescription.append (sLocalizedName); - msDescription.append (sal_Unicode('=')); + msDescription.append(sLocalizedName); + msDescription.append('='); try { @@ -338,8 +338,8 @@ void DescriptionGenerator::AddString (const OUString& sPropertyName, void DescriptionGenerator::AddFillStyle (const OUString& sPropertyName, const OUString& sLocalizedName) { - msDescription.append (sLocalizedName); - msDescription.append (sal_Unicode('=')); + msDescription.append(sLocalizedName); + msDescription.append('='); try { diff --git a/svx/source/accessibility/lookupcolorname.cxx b/svx/source/accessibility/lookupcolorname.cxx index b31f8f97f9b5..bd8231c09f78 100644 --- a/svx/source/accessibility/lookupcolorname.cxx +++ b/svx/source/accessibility/lookupcolorname.cxx @@ -98,7 +98,7 @@ OUString ColorNameMap::lookUp(long color) const { } // Did not find the given color; return its RGB tuple representation: OUStringBuffer buf; - buf.append(sal_Unicode('#')); + buf.append('#'); buf.append(color, 16); return buf.makeStringAndClear(); } diff --git a/svx/source/dialog/relfld.cxx b/svx/source/dialog/relfld.cxx index a073598e2d14..67a4a59d4fca 100644 --- a/svx/source/dialog/relfld.cxx +++ b/svx/source/dialog/relfld.cxx @@ -55,8 +55,8 @@ void SvxRelativeField::Modify() while ( *pStr ) { - if( ( ( *pStr < sal_Unicode( '0' ) ) || ( *pStr > sal_Unicode( '9' ) ) ) && - ( *pStr != sal_Unicode( '%' ) ) ) + if( ( ( *pStr < '0' ) || ( *pStr > '9' ) ) && + ( *pStr != '%' ) ) { bNewMode = sal_False; break; diff --git a/svx/source/svdraw/svdattr.cxx b/svx/source/svdraw/svdattr.cxx index 0e0360f05a2f..bbb1d351c74c 100644 --- a/svx/source/svdraw/svdattr.cxx +++ b/svx/source/svdraw/svdattr.cxx @@ -915,7 +915,7 @@ SfxItemPresentation SdrAngleItem::GetPresentation( } if(bNeg) - aText.insert(0, sal_Unicode('-')); + aText.insert(0, '-'); if ( pMyIntlWrapper ) { diff --git a/svx/source/svdraw/svdibrow.cxx b/svx/source/svdraw/svdibrow.cxx index ee8682f397fc..393186ec9bbe 100644 --- a/svx/source/svdraw/svdibrow.cxx +++ b/svx/source/svdraw/svdibrow.cxx @@ -1166,9 +1166,9 @@ IMPL_LINK(SdrItemBrowser,ChangedHdl,_SdrItemBrowserControl*,pBrowse) sal_uInt16 nSepLen=1; long nLongX = aNewText.toInt32(); long nLongY=0; - sal_Int32 nPos = aNewText.indexOf(sal_Unicode('/')); - if (nPos==-1) nPos=aNewText.indexOf(sal_Unicode(':')); - if (nPos==-1) nPos=aNewText.indexOf(sal_Unicode(' ')); + sal_Int32 nPos = aNewText.indexOf('/'); + if (nPos==-1) nPos=aNewText.indexOf(':'); + if (nPos==-1) nPos=aNewText.indexOf(' '); if (nPos==-1) { nPos=aNewText.indexOf(".."); if (nPos!=-1) nSepLen=2; } if (nPos!=01) { @@ -1227,7 +1227,7 @@ IMPL_LINK(SdrItemBrowser,ChangedHdl,_SdrItemBrowserControl*,pBrowse) case ITEM_FONTHEIGHT: { sal_uIntPtr nHgt=0; sal_uInt16 nProp=100; - if (aNewText.indexOf(sal_Unicode('%')) != -1) { + if (aNewText.indexOf('%') != -1) { nProp=(sal_uInt16)nLongVal; } else { nHgt=nLongVal; @@ -1236,7 +1236,7 @@ IMPL_LINK(SdrItemBrowser,ChangedHdl,_SdrItemBrowserControl*,pBrowse) } break; case ITEM_FONTWIDTH: { sal_uInt16 nProp=100; - if (aNewText.indexOf(sal_Unicode('%')) != -1) { + if (aNewText.indexOf('%') != -1) { nProp=(sal_uInt16)nLongVal; } ((SvxCharScaleWidthItem*)pNewItem)->SetValue(nProp); diff --git a/svx/source/svdraw/svdmodel.cxx b/svx/source/svdraw/svdmodel.cxx index f0ab176ae1f1..6e29042008e9 100644 --- a/svx/source/svdraw/svdmodel.cxx +++ b/svx/source/svdraw/svdmodel.cxx @@ -1261,7 +1261,7 @@ void SdrModel::TakeMetricStr(long nVal, OUString& rStr, bool bNoUnitChars, sal_I sal_Int32 nAnz(-nKomma); for(sal_Int32 i=0; i